1
dytyqx
2026-03-13 02e68c46b37d36184166c63305f91841a57116f3
pages/shengchantuiliao/MateOutBackBill.vue
@@ -443,7 +443,7 @@
        },
        async onLoad(e) {
         uni.setNavigationBarTitle({
             title: this.$t("MateOutBackBill_PDA.title")
             title: this.$t("MateOutBackBill_PDA.title") == 'MateOutBackBill_PDA.title' ? '生产退料单' : this.$t("MateOutBackBill_PDA.title")
         })
            console.log(e, this.userInfo)
            this.OperationType = e.OperationType
@@ -460,6 +460,7 @@
            this.getHSupList()
            this.getHEmpList()
            this.getHDeptList()
         await this.GetSourceBillType()
            // this.GetSourceBillType()
            this.getRelationStore()
@@ -733,43 +734,56 @@
                // this.getHYDList()
            },
            // 通过单据类型获取源单类型
            async GetSourceBillType() {
                CommonUtils.doRequest2({
                let res = await CommonUtils.doRequest2Async({
                    url: '/Web/GetHSourceBillTypeByBillType',
                    data: {
                        HBillType: this.hform.HBillType,
                        Num: 2
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count == 1) {
                            console.log('data: ', data);
                            this.arrayHMainSourceBillType = []
                            this.arrayHMainSourceBillValue = []
                            Array.from(data).forEach(e => {
                                this.arrayHMainSourceBillType.push(e['HSourceBillTypeName'])
                                this.arrayHMainSourceBillValue.push(e['HSourceBillType'])
                            })
                    }
                })
                let {
                    data,
                    count,
                    Message
                } = res.data
                if (count == 1) {
                    console.log('data: ', data);
                    this.arrayHMainSourceBillType = []
                    this.arrayHMainSourceBillValue = []
                    Array.from(data).forEach(e => {
                  if (this.$t("MateOutBackBill_PDA.select option").lenth > 0){
                     for(var j = 0; j < this.$t("MateOutBackBill_PDA.select option").length; j++){
                        let HSourceBillType_FY = this.$t("MateOutBackBill_PDA.select option[" + j + "]").split("@");
                        if(e['HSourceBillType'] == HSourceBillType_FY[0]){
                           this.arrayHMainSourceBillType.push(HSourceBillType_FY[1])
                        }
                     }
                  }
                  else{
                     this.arrayHMainSourceBillType.push(e['HSourceBillTypeName'])
                  }
                        this.arrayHMainSourceBillValue.push(e['HSourceBillType'])
                    })
                            this.arrayHMainSourceBillType.push('手工录入')
                            this.arrayHMainSourceBillValue.push('-1')
                            this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
                            this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    this.arrayHMainSourceBillType.push('手工录入')
                    this.arrayHMainSourceBillValue.push('-1')
                    //如果手工录入不用选择源单
                    if (this.arrayHMainSourceBillType[0] == '手工录入') {
                        this.tabs = 1
                    }
                })
                    this.HMainSourceBillType = this.arrayHMainSourceBillType[0]
                    this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[0]
                } else {
                    uni.showToast({
                        icon: 'none',
                        title: Message
                    })
                }
            },
            //源单资料
            getHYDList() {