chenhaozhe
2 天以前 a592652f3b2f820a8a783eefe4f8a74d5665aef0
pages/ZLGL/QuYangHuangYang/QC_TakeSampleCheckBill/QC_TakeSampleCheckBill.vue
@@ -191,7 +191,7 @@
               HProcID: 0,
               HQty: '',
               HSampleDamageQty: 0,
               TestType: 'first',
               TestType: '首检',
               HBadNote: '',
               HDeptName: getUserInfo().HDeptName,
               HDeptID: getUserInfo().HDeptID,
@@ -615,11 +615,11 @@
                  if (code == 1) {
                     this.HBarCode = ''
                     let data1 = data.h_v_Sc_ProcessExchangeBillList
                     this.hform = Object.assign(this.hform, {
                     Object.assign(this.hform, {
                        "HMaterID": data1[0].HMaterID, //产品ID
                        "HMaterCode": data1[0].产品代码, //产品代码
                        "HMaterName": data1[0].产品, //产品名称
                        "HMaterSpec": data1[0].规格型号, //产品规格
                        "HMaterSpec": data1[0].规格型号.replace(/["]/g, "'"), //产品规格
                        "HUnitID": data1[0].HUnitID, //计量单位id
                        "HUnitName": data1[0].单位, //计量单位
                        "HMainSourceBillNo": data1[0].单据号, //源单单号
@@ -633,8 +633,9 @@
                        "HICMOBillNo": data1[0].任务单号, //生产订单
                        "HDeptID": data1[0].HWorkShopID, //车间ID
                        "HDeptName": data1[0].生产车间, //车间
                                "HSampleDamageQty": data1[0]["HSampleDamageQty"] || 0
                     })
                     if (data1 && data1.length === 1) {
                        // 获取工序ID
                        let procId = data1[0].HProcID
@@ -664,19 +665,22 @@
            })
         },
         submit() {
                console.log('this.hform: ',this.hform);
            if (this.hform.HProcID == 0) {
               return uni.showToast({
                  icon: 'none',
                  title: this.$t('QC_TakeSampleCheckBill.noProcess') == 'QC_TakeSampleCheckBill.noProcess' ? '工序没有选择' : this.$t('QC_TakeSampleCheckBill.noProcess')
               })
            }
            if (this.hform.HQty == '') {
            if (this.hform.HQty === '') {
               return uni.showToast({
                  icon: 'none',
                  title: this.$t('QC_TakeSampleCheckBill.sampleQtyEmpty') == 'QC_TakeSampleCheckBill.sampleQtyEmpty' ? '取样数量不能为空' : this.$t('QC_TakeSampleCheckBill.sampleQtyEmpty')
               })
            }
            if (this.hform.HSampleDamageQty == '') {
                console.log('this.hform.HSampleDamageQty: ',this.hform.HSampleDamageQty);
                console.log('this.hform.HSampleDamageQty: ',this.hform.HSampleDamageQty == '');
            if (this.hform.HSampleDamageQty === "") {
               return uni.showToast({
                  icon: 'none',
                  title: this.$t('QC_TakeSampleCheckBill.damageQtyEmpty') == 'QC_TakeSampleCheckBill.damageQtyEmpty' ? '破坏性实验数量不能为空' : this.$t('QC_TakeSampleCheckBill.damageQtyEmpty')