diff --git a/src/views/modules/qc/outboundNotification.vue b/src/views/modules/qc/outboundNotification.vue index 7b77aea..0933787 100644 --- a/src/views/modules/qc/outboundNotification.vue +++ b/src/views/modules/qc/outboundNotification.vue @@ -140,7 +140,7 @@ - + @@ -155,7 +155,14 @@ - + + + 供应商 + + + + + 直接客户 @@ -1143,7 +1150,7 @@ bu: this.userBuList[0].buNo, buNo: '', orderNo: '', - orderType: '', + orderType: '采购退货', // 默认为采购退货 orderStatus: '草稿', requiredOutboundDate: '', customerId: '', @@ -1610,17 +1617,29 @@ this.detailModal2 = true }, - // 库位输入校验 + // 客户/供应商输入校验 customerBlur (tagNo) { let tempData = { tagno: tagNo, - conditionSql: " and CustomerID = '" + this.modalData.customerId + "'" + " and site = '" + this.modalData.site + "'" + conditionSql: '' + } + if (tagNo === 506) { + // 供应商校验 + tempData.conditionSql = " and SupplierID = '" + this.modalData.customerId + "'" + " and site = '" + this.modalData.site + "'" + } else if (tagNo === 507) { + // 客户校验 + tempData.conditionSql = " and CustomerID = '" + this.modalData.customerId + "'" + " and site = '" + this.modalData.site + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { - this.modalData.customerId = data.baseListData[0].CustomerID - this.modalData.customerName = data.baseListData[0].CustomerName + if (tagNo === 506) { + this.modalData.customerId = data.baseListData[0].SupplierID + this.modalData.customerName = data.baseListData[0].SupplierName + } else if (tagNo === 507) { + this.modalData.customerId = data.baseListData[0].CustomerID + this.modalData.customerName = data.baseListData[0].CustomerName + } } else { this.modalData.customerName = '' } @@ -1628,6 +1647,12 @@ }) }, + // 单据类型变更时清空客户/供应商信息 + onOrderTypeChange () { + this.modalData.customerId = '' + this.modalData.customerName = '' + }, + chooseWareHouse (row) { this.tempWareHouseRow = row this.getBaseList(20) @@ -1639,7 +1664,13 @@ this.tagType = type this.$nextTick(() => { let strVal = '' + if (val === 506) { + // 供应商列表 + strVal = this.modalData.customerId + this.$refs.baseList.init(val, strVal) + } if (val === 507) { + // 直接客户列表 strVal = this.modalData.customerId this.$refs.baseList.init(val, strVal) } @@ -1652,7 +1683,13 @@ // 列表方法的回调 getBaseData (val) { + if (this.tagNo === 506) { + // 供应商回调 + this.modalData.customerId = val.SupplierID + this.modalData.customerName = val.SupplierName + } if (this.tagNo === 507) { + // 直接客户回调 this.modalData.customerId = val.CustomerID this.modalData.customerName = val.CustomerName }