| | |
| | | }) |
| | | 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) |
| | | } |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="销售订单" prop=""> |
| | | <el-input |
| | | v-model="dialogForm.saleordercode" |
| | | style="width: 200px" |
| | | :disabled="!(dialogForm.mesorderstus==='NEW'&&dialogForm.data_sources==='MES')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="预计交付日期" prop="deliverydate"> |
| | | <el-date-picker |
| | | v-model="dialogForm.deliverydate" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="销售订单" prop=""> |
| | | <el-input |
| | | v-model="i.saleordercode" |
| | | style="width: 200px" |
| | | :disabled="!(i.mesorderstus==='NEW'&&i.data_sources==='MES')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="预计交付日期" prop="deliverydate"> |
| | | <el-date-picker |
| | | v-model="i.deliverydate" |
| | |
| | | ordertype: 'PO', // 工单类型 |
| | | sourceorderid: '', // 源单id |
| | | sourceorder: '', // 源单单号 |
| | | |
| | | saleordercode: '', // 销售订单号 |
| | | |
| | | partcode: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | |
| | | ordertype: i.wotype, // 工单类型 |
| | | sourceorderid: i.sourceid, // 源单id |
| | | sourceorder: i.m_po, // 源单单号 |
| | | saleordercode: i.saleOrderCode, |
| | | partcode: i.partcode, // 产品编码 |
| | | partname: i.partname, // 产品名称 |
| | | partspec: i.partspec, // 产品规格 |
| | |
| | | sourceid: i.sourceorderid, // 源单id |
| | | sourcewo: i.sourceorder, // 源单单号 |
| | | partcode: i.partcode, // 产品编号 |
| | | saleordercode: i.saleordercode, // 销售单号 |
| | | wkshopcode: i.wkshopcode, |
| | | woqty: i.mesqty, // 工单数量 |
| | | deliverydate: i.deliverydate, // 交付时间 |
| | |
| | | this.form.ordertype = '' |
| | | // this.form.createdate = '' |
| | | |
| | | this.form.saleordercode = '' |
| | | |
| | | this.form.timeValue = [] |
| | | this.cycleTime = null |
| | | this.$refs.DateTypeRef.clearValue() |
| | |
| | | this.dialogForm.ordertype = row.wotype |
| | | this.dialogForm.sourceorderid = row.sourceid |
| | | this.dialogForm.sourceorder = row.m_po |
| | | this.dialogForm.saleordercode = row.saleOrderCode |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.partname = row.partname |
| | | this.dialogForm.partspec = row.partspec |
| | |
| | | ordertype: 'PO', // 工单类型 |
| | | sourceorderid: '', // 源单id |
| | | sourceorder: '', // 源单单号 |
| | | |
| | | saleordercode: '', // 销售订单号 |
| | | partcode: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | |
| | | wotype: this.dialogForm.ordertype, // 工单类型 |
| | | sourceid: this.dialogForm.sourceorderid, // 源单id |
| | | sourcewo: this.dialogForm.sourceorder, // 源单单号 |
| | | saleordercode: this.dialogForm.saleordercode, // 销售订单号 |
| | | partcode: this.dialogForm.partcode, // 产品编号 |
| | | wkshopcode: this.dialogForm.wkshopcode, |
| | | woqty: this.dialogForm.mesqty, // 工单数量 |