| | |
| | | HPageTitle: '采购入库单', |
| | | |
| | | |
| | | materMeta: [ |
| | | |
| | | ], |
| | | |
| | | showHStockPlaceName: false, |
| | | showHMainSourceBillType: true, |
| | | showHSourceBillNo: true, |
| | |
| | | this.showHSupName = false |
| | | this.tabs = 2 |
| | | } else { //物料条码 |
| | | this.materMeta.push(data) |
| | | this.tabs = 2 |
| | | if (!this.hform.HSourceBillNo) { |
| | | this.hform.HSupName = data.hSupNameField |
| | |
| | | console.log('物料', res.data) |
| | | if (res.data.count == 1) { |
| | | var data = res.data.data |
| | | this.materMeta = data.BarCodeDetailslist |
| | | this.Materlist = data.Materlist |
| | | if (!data.BarCodeDetailslist[0].HBarCode) { |
| | | this.hform.HMaterName_B = '' |
| | |
| | | data: { |
| | | oMain: sMainStr |
| | | }, |
| | | success: (res) => { |
| | | success: async (res) => { |
| | | console.log(1, res); |
| | | uni.hideLoading() |
| | | if (res.data.count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/caigouruku/form?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | let sMain = JSON.stringify(this.materMeta) + ';' + this.hform.HBillType + ';' + this.hform.HBillNo |
| | | try { |
| | | // 为条码设置出库单号和出库次数 |
| | | await this.Set_BarCodeBill(sMain) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/caigouruku/form?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | }catch(err) { |
| | | uni.showToast({ |
| | | title: err, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | | }, |
| | | |
| | | Set_BarCodeBill(sMain) { |
| | | return new Promise((resolve, reject) => { |
| | | CommonUtils.doRequest2({ |
| | | method: 'POST', |
| | | url: 'Sc_BarCode/Set_BarCodeBill', |
| | | data: { |
| | | msg: sMain |
| | | }, |
| | | resFunction: (res) => { |
| | | let {data, count, Message} = res.data |
| | | if(count == 1) { |
| | | resolve() |
| | | }else { |
| | | reject(Message) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.showModal({ |
| | | title: '提示', |