|
|
|
@ -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) { |
|
|
|
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 |
|
|
|
} |
|
|
|
|