#
whycq
2023-10-16 67271e43ba60ea115e0e92d9639ecb5a50e59e2c
pages/api/addMat.js
@@ -1,7 +1,9 @@
async function addMat() {
let network = uni.getStorageSync('Network')
let baseUrl = `http://${network[0].ip}:${network[0].port}/${network[0].address}`
async function addMat(matnr) {
   let that = this,item = {};
   var ress = await uni.request({
      url: 'http://127.0.0.1:8089/bfwms/mat/auth',
      url: `${baseUrl}/mat/auth`,
      data: {matnr: '3CPPJ.B.GMB.LZ.QBY4-10/15P316LLZ'},
   }).then((result)=> {
      let mat = result.data.data
@@ -9,7 +11,8 @@
         {key: '商品码',value: mat.matnr},
         {key: '商品名称',value: mat.maktx},
         {key: '规格',value: mat.specs},
         {key: '数量',value: 100},
         {key: '批号',value: '',type: 'input'},
         {key: '数量',value: 0,type: 'number-box'},
      ]
   },(res)=>{
      console.log(res);
@@ -17,11 +20,6 @@
   return item
}
function isEmpty(obj) {
   return typeof obj == "undefined" || obj == null || obj === "";
}
module.exports = {
   addMat: addMat,
   isEmpty: isEmpty
}