Browse Source

2025-12-22

拣货出库任务通知,主信息新增和编辑时根据所选单据类型来显示是选客户还是供应商
master
fengyuan_yang 3 weeks ago
parent
commit
7a22b771f5
  1. 47
      src/views/modules/qc/outboundNotification.vue

47
src/views/modules/qc/outboundNotification.vue

@ -140,7 +140,7 @@
</el-select>
</el-form-item>
<el-form-item label="单据类型" prop="orderType">
<el-select v-model="modalData.orderType" :disabled="modalDisableFlag" style="width: 100px">
<el-select v-model="modalData.orderType" :disabled="modalDisableFlag" @change="onOrderTypeChange" style="width: 100px">
<el-option label="采购退货" value="采购退货"></el-option>
<el-option label="其他出库" value="其他出库"></el-option>
</el-select>
@ -155,7 +155,14 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
<el-form-item>
<!-- 采购退货时显示供应商 -->
<el-form-item v-if="modalData.orderType === '采购退货'">
<span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
<el-input v-model="modalData.customerId" @change="customerBlur(506)" style="width: 100px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 380px"></el-input>
</el-form-item>
<!-- 其他出库时显示直接客户 -->
<el-form-item v-else-if="modalData.orderType === '其他出库'">
<span style="cursor: pointer" slot="label" @click="getBaseList(507)"><a href="#">直接客户</a></span>
<el-input v-model="modalData.customerId" @change="customerBlur(507)" style="width: 100px"></el-input>
<el-input v-model="modalData.customerName" disabled style="width: 380px"></el-input>
@ -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) {
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
}

Loading…
Cancel
Save