Selaa lähdekoodia

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

achao 3 vuotta sitten
vanhempi
commit
43cc393b2d

+ 0 - 4
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -998,7 +998,6 @@
                     inOutDate: new Date(),
                     netWeight: 0,
                     pureWeight: 0,
-                    deductionWeight: 0,
                     waterContent: '',
                     reWaterContent: '',
                     reGrade: '',
@@ -1084,7 +1083,6 @@
                 inOutDate: new Date(),
                 netWeight: 0,
                 pureWeight: 0,
-                deductionWeight: 0,
                 waterContent: '',
                 reWaterContent: '',
                 reGrade: '',
@@ -2179,7 +2177,6 @@
                             inOutDate: new Date(),
                             netWeight: 0,
                             pureWeight: 0,
-                            deductionWeight: 0,
                             waterContent: '',
                             reWaterContent: '',
                             reGrade: '',
@@ -2581,7 +2578,6 @@
               inOutDate: new Date(),
               netWeight: 0,
               pureWeight: 0,
-              deductionWeight: 0,
               waterContent: '',
               reWaterContent: '',
               reGrade: '',

+ 117 - 84
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -447,7 +447,7 @@
         pListTotal: [],
         submitAllow: false,
         id: '',
-        inOutDate: {},
+        inOutData: {},
         idPrint: '',
         ewCustomerOptions: [{
           value: '黑龙江利润元粮食贸易有限公司',
@@ -1265,7 +1265,7 @@
             }).then((response) => {
               //编辑接口
               if (this.inWarehouseType == 1) {
-                this.weighingList = this.inOutDate
+                this.weighingList = this.inOutData
                 this.weighingList.pictureAddress = response.data.url
                 tare(this.weighingList)
                   .toPromise()
@@ -1552,93 +1552,126 @@
               // let _url3 = process.env.VUE_APP_BASE_API + '/warehouseInOutInfo/InOutWarehouse'
 
               console.log(this.inWarehouseType)
-              this.weighingList.warehouseId = this.cangid;
-              this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
-              tare(this.weighingList)
-                .toPromise()
-                .then((response) => {
-                  console.log(1111)
-                  // if (this.reader) {
-                  //   this.reader.cancel()
-                  // }
-                  this.$notify.success({
-                    title: '成功',
-                    message: '保存成功',
+               //贸易入库需要再走入库接口
+              if (this.inWarehouseType == 1) {
+                getsettleaccout({
+                  id: this.weighingList.warehouseInOutId
+                }).toPromise().then((response) => {
+                  that.inOutData = response
+                  that.$set(that.inOutData, 'statusFlag', 3)
+                  that.$set(that.inOutData, 'grossWeight', warehousing.grossWeight / 1000)
+                  that.$set(that.inOutData, 'tare', warehousing.tare / 1000)
+                  that.$set(that.inOutData, 'netWeight', warehousing.netWeight / 1000)
+                  // that.$set(that.inOutData,'pureWeight',warehousing.pureWeight /1000)
+                  that.$set(that.inOutData, 'deductionAmount', Number(warehousing.deductionAmount) * 1000)
+                  that.$set(that.inOutData, 'deductionWeight', warehousing.deductionWeight / 1000)
+                  that.$set(that.inOutData, 'inOutFlag', 2)
+                  // that.inOutDate = response
+                  // that.$set(that.inOutDate)
+                  // .statusFlag = 3
+                  // that.inOutDate.grossWeight=warehousing.grossWeight /1000
+                  // that.inOutDate.tare=warehousing.tare /1000
+                  // that.inOutDate.netWeight=warehousing.netWeight /1000
+                  // that.inOutDate.pureWeight=warehousing.pureWeight /1000
+                  // that.inOutDate.deductionAmount= Number(warehousing.deductionAmount) * 1000
+                  // that.inOutDate.deductionWeight=warehousing.deductionWeight /1000
+                  // that.inOutDate.inOutFlag = 2
+                  console.log(that.inOutData)
+
+                  // warehousing.statusFlag = 3
+                  // warehousing.grossWeight /= 1000
+                  // warehousing.tare /= 1000
+                  // warehousing.netWeight /= 1000
+                  // warehousing.pureWeight = 1000
+                  // warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
+                  // warehousing.deductionWeight /= 1000
+                  // warehousing.inOutFlag = 2
+                  // console.log(that.weighingList)
+                  // warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
+                  // warehousing.inOutType = that.weighingList.inOutType
+                  // warehousing.deductionAmount = that.weighingList.deductionAmount
+                  // warehousing.id = warehousing.warehouseInOutId
+                  // // delete that.inOutDate.status
+                  // that.inOutDate = Object.assign(that.inOutDate, warehousing)
+                  addstorageputList(that.inOutData).toPromise().then((response) => {
+                    this.weighingList.warehouseId = this.cangid;
+                    this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
+                    tare(this.weighingList)
+                      .toPromise()
+                      .then((response) => {
+                        console.log(1111)
+                        // if (this.reader) {
+                        //   this.reader.cancel()
+                        // }
+                        this.$notify.success({
+                          title: '成功',
+                          message: '保存成功',
+                        })
+                        this.idPrint = response
+                        if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
+                            .warehouseName == '哈尔滨依兰库' || this
+                            .warehouseName == '白城内陆港')) {
+                          if (this.weighingList.seller && this.weighingList.buyer) {
+                            let cang = {}
+                            cang.value = this.weighingList.seller
+                            cang.label = this.weighingList.seller
+                            if (this.check(this.weighingList.seller, 1)) {
+                              this.ewCustomerOptions.push(cang)
+                            }
+                            let cang1 = {}
+                            cang1.value = this.weighingList.buyer
+                            cang1.label = this.weighingList.buyer
+                            if (this.check(this.weighingList.buyer, 2)) {
+                              this.companyNameEWOptions.push(cang1)
+                            }
+                          }
+                        }
+                        this.isShowPrintType = true
+                        this.getList()
+                      
+                      })
+                      .catch((response) => {})
                   })
-                  this.idPrint = response
-                  if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
-                      .warehouseName == '哈尔滨依兰库' || this
-                      .warehouseName == '白城内陆港')) {
-                    if (this.weighingList.seller && this.weighingList.buyer) {
-                      let cang = {}
-                      cang.value = this.weighingList.seller
-                      cang.label = this.weighingList.seller
-                      if (this.check(this.weighingList.seller, 1)) {
-                        this.ewCustomerOptions.push(cang)
-                      }
-                      let cang1 = {}
-                      cang1.value = this.weighingList.buyer
-                      cang1.label = this.weighingList.buyer
-                      if (this.check(this.weighingList.buyer, 2)) {
-                        this.companyNameEWOptions.push(cang1)
+                  
+                })
+              } else {
+                tare(this.weighingList)
+                  .toPromise()
+                  .then((response) => {
+                    console.log(1111)
+                    // if (this.reader) {
+                    //   this.reader.cancel()
+                    // }
+                    this.$notify.success({
+                      title: '成功',
+                      message: '保存成功',
+                    })
+                    this.idPrint = response
+                    if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
+                        .warehouseName == '哈尔滨依兰库' || this
+                        .warehouseName == '白城内陆港')) {
+                      if (this.weighingList.seller && this.weighingList.buyer) {
+                        let cang = {}
+                        cang.value = this.weighingList.seller
+                        cang.label = this.weighingList.seller
+                        if (this.check(this.weighingList.seller, 1)) {
+                          this.ewCustomerOptions.push(cang)
+                        }
+                        let cang1 = {}
+                        cang1.value = this.weighingList.buyer
+                        cang1.label = this.weighingList.buyer
+                        if (this.check(this.weighingList.buyer, 2)) {
+                          this.companyNameEWOptions.push(cang1)
+                        }
                       }
                     }
-                  }
-
-                  //贸易入库需要再走入库接口
-                  if (this.inWarehouseType == 1) {
-
-                    getsettleaccout({
-                      id: this.weighingList.warehouseInOutId
-                    }).toPromise().then((response) => {
-                      that.inOutDate = response
-                      that.$set(that.inOutDate, 'statusFlag', 3)
-                      that.$set(that.inOutDate, 'grossWeight', warehousing.grossWeight / 1000)
-                      that.$set(that.inOutDate, 'tare', warehousing.tare / 1000)
-                      that.$set(that.inOutDate, 'netWeight', warehousing.netWeight / 1000)
-                      // that.$set(that.inOutDate,'pureWeight',warehousing.pureWeight /1000)
-                      that.$set(that.inOutDate, 'deductionAmount', Number(warehousing.deductionAmount) * 1000)
-                      that.$set(that.inOutDate, 'deductionWeight', warehousing.deductionWeight / 1000)
-                      that.$set(that.inOutDate, 'inOutFlag', 2)
-                      // that.inOutDate = response
-                      // that.$set(that.inOutDate)
-                      // .statusFlag = 3
-                      // that.inOutDate.grossWeight=warehousing.grossWeight /1000
-                      // that.inOutDate.tare=warehousing.tare /1000
-                      // that.inOutDate.netWeight=warehousing.netWeight /1000
-                      // that.inOutDate.pureWeight=warehousing.pureWeight /1000
-                      // that.inOutDate.deductionAmount= Number(warehousing.deductionAmount) * 1000
-                      // that.inOutDate.deductionWeight=warehousing.deductionWeight /1000
-                      // that.inOutDate.inOutFlag = 2
-                      console.log(that.inOutDate)
-
-                      // warehousing.statusFlag = 3
-                      // warehousing.grossWeight /= 1000
-                      // warehousing.tare /= 1000
-                      // warehousing.netWeight /= 1000
-                      // warehousing.pureWeight = 1000
-                      // warehousing.deductionAmount = Number(warehousing.deductionAmount) * 1000
-                      // warehousing.deductionWeight /= 1000
-                      // warehousing.inOutFlag = 2
-                      // console.log(that.weighingList)
-                      // warehousing.inOutTypeKey = that.weighingList.inOutTypeKey
-                      // warehousing.inOutType = that.weighingList.inOutType
-                      // warehousing.deductionAmount = that.weighingList.deductionAmount
-                      // warehousing.id = warehousing.warehouseInOutId
-                      // // delete that.inOutDate.status
-                      // that.inOutDate = Object.assign(that.inOutDate, warehousing)
-                      addstorageputList(that.inOutDate).toPromise().then((response) => {
-
-                      })
-                      this.isShowPrintType = true
-                      this.getList()
-                    })
-                  } else {
                     this.isShowPrintType = true
                     this.getList()
-                  }
-                })
-                .catch((response) => {})
+                  
+                  })
+                  .catch((response) => {})
+              }
+              
             }
           })
           .catch(() => {