小小儁爺
6 天以前 2a12da2908a1be0d5174ab9a5217a426736f60fe
src/views/produce/productWarehouse.vue
@@ -783,9 +783,11 @@
          })
          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'
              },
@@ -837,7 +839,8 @@
                'Code': this.form.stockcode// 仓库编码
              },
              'Code': this.form.hbillno, // 单据编码
              'IsModifiedCode': true,
              // 'IsModifiedCode': true,
              'IsModifiedCode': false,
              'BusiType': {
                'Code': '03'// 业务类型编码
              },
@@ -869,17 +872,24 @@
                '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
@@ -909,6 +919,7 @@
              [
                {
                  '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,
@@ -937,9 +948,9 @@
          // 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 = ''
@@ -949,8 +960,6 @@
            await this.getProductInHouseOrderCodeSearch()
          }
        } else {
          // console.log(res.data)
          this.$store.state.app.buttonIsDisabled = false
          this.$message.error(res.data.message)
        }