| | |
| | | }, |
| | | 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 |
| | |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | | this.getHDeptList() |
| | | await this.GetSourceBillType() |
| | | |
| | | // this.GetSourceBillType() |
| | | this.getRelationStore() |
| | |
| | | |
| | | // 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() { |