| | |
| | | }) |
| | | const D1 = { |
| | | 'dto': { |
| | | 'IsModifiedCode': true, |
| | | // 'IsModifiedCode': true, |
| | | 'IsModifiedCode': false, |
| | | 'ExternalCode': this.form.hbillno, |
| | | 'Code': this.form.hbillno, |
| | | // 'Code': this.form.hbillno, |
| | | 'Code': '', |
| | | 'VoucherType': { |
| | | 'Code': 'ST1002' |
| | | }, |
| | |
| | | 'Code': this.form.stockcode// 仓库编码 |
| | | }, |
| | | 'Code': this.form.hbillno, // 单据编码 |
| | | 'IsModifiedCode': true, |
| | | // 'IsModifiedCode': true, |
| | | 'IsModifiedCode': false, |
| | | 'BusiType': { |
| | | 'Code': '03'// 业务类型编码 |
| | | }, |
| | |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | } |
| | | ) |
| | | ).catch(e => { |
| | | // this.$message.error(JSON.stringify(e.response.data.message)) |
| | | this.$message.error(e.response.data.message) |
| | | }) |
| | | } |
| | | |
| | | // console.log(res) |
| | | // console.log(res.data.code) |
| | | console.log(res) |
| | | console.log(res.data.code) |
| | | console.log('``````````') |
| | | console.log(res.data.data.Code) |
| | | // || res.data === null |
| | | |
| | | if (res.data.code === 0) { |
| | | const TableDetailData = [] |
| | | this.multipleSelection.forEach((i, index) => { |
| | | TableDetailData.push({ |
| | | 'hbillno': this.form.hbillno, // 入库单号 |
| | | 'InOrdercode': res.data.data.Code, |
| | | 'wocode': i.wo_code, // 工单号 |
| | | 'rownumber': (index + 1).toString(), // 行号 |
| | | 'sourceVoucherId': i.mpoid ? i.mpoid.toString() : '', // 来源单据id |
| | |
| | | [ |
| | | { |
| | | 'hbillno': this.form.hbillno, // 入库单号 |
| | | 'InOrdercode': res.data.data.Code, |
| | | 'madedate': handleDatetime(this.form.hbdate) + ' 00:00:00', // 制单日期(年月日 00:00:00) |
| | | 'hbdate': this.multipleSelection[this.multipleSelection.length - 1].voucherdate, |
| | | |
| | |
| | | // console.log(JSON.stringify(data)) |
| | | |
| | | // this.$store.state.app.buttonIsDisabled = true |
| | | const res = await InHouseOrderSpSeave(data) |
| | | const res2 = await InHouseOrderSpSeave(data) |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | if (res.code === '200') { |
| | | if (res2.code === '200') { |
| | | this.$message.success('入库成功!') |
| | | this.multipleSelection = [] |
| | | // this.form.deptno = '' |
| | |
| | | await this.getProductInHouseOrderCodeSearch() |
| | | } |
| | | } else { |
| | | // console.log(res.data) |
| | | |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.$message.error(res.data.message) |
| | | } |