|
@@ -44,7 +44,7 @@
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
<!-- <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" :configuration="sConfiguration"></warehouse-select>-->
|
|
|
<el-select v-else-if="item.prop === 'storageId'" style="width: 100%" :disabled="item.disabled?true:false || goodsDisable" @change="warehouseChange" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
|
|
|
- <el-option v-for="(item,index) in storageIdDic" :key="index" :label="item.cname" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="(item,index) in storageList" :key="index" :label="item.stockName" :value="item.storageId"></el-option>
|
|
|
</el-select>
|
|
|
<el-input type="textarea" v-else-if="(item.prop === 'deliveryRemarks')" :disabled="item.disabled?true:false || goodsDisable" v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false || goodsDisable" placeholder="请输入" size="small" autocomplete="off"></el-input>
|
|
@@ -176,13 +176,20 @@
|
|
|
<span v-else>{{ row.currency }}</span>
|
|
|
</template>
|
|
|
<template slot="cntrNo" slot-scope="{ row }">
|
|
|
- <el-input
|
|
|
- v-if="row.$cellEdit"
|
|
|
- v-model="row.cntrNo"
|
|
|
- placeholder="请输入"
|
|
|
- size="small"
|
|
|
- @change="selectInventory(row)"
|
|
|
- ></el-input>
|
|
|
+ <el-select v-if="row.$cellEdit"
|
|
|
+ v-model="row.cntrNo"
|
|
|
+ size="small"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="selectCntrNoList(row)"
|
|
|
+ clearable
|
|
|
+ filterable>
|
|
|
+ <el-option v-for="(item,index) in cntrNoList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.cntrNo"
|
|
|
+ :value="item.cntrNo"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
<span v-else>{{ row.cntrNo }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{row,index}" slot="menu">
|
|
@@ -291,6 +298,9 @@ export default {
|
|
|
currencyDic:[],
|
|
|
storageIdDic: [],
|
|
|
contractDic: [],
|
|
|
+ creditList:[],
|
|
|
+ cntrNoList:[],
|
|
|
+ storageList:[],
|
|
|
selectKind: -1,
|
|
|
configuration: {
|
|
|
multipleChoices: false,
|
|
@@ -516,15 +526,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
//查询库存
|
|
|
- console.log(123)
|
|
|
- getListOrgOrderNo(item.billNo).then(res => {
|
|
|
- console.log(res)
|
|
|
- // if (res.data) {
|
|
|
- // this.contractDic = res.data;
|
|
|
- // row.contractNumber = res.data[0].orderNo
|
|
|
- // }
|
|
|
+ getListOrgOrderNo(item.billNo,item.contractNumber,item.priceCategory).then(res => {
|
|
|
+ this.creditList = res.data
|
|
|
})
|
|
|
-
|
|
|
delete item.orderQuantity
|
|
|
delete item.id
|
|
|
})
|
|
@@ -600,6 +604,30 @@ export default {
|
|
|
this.sumOrderNo(row);
|
|
|
this.selectInventory(row)
|
|
|
},
|
|
|
+ //选择箱号 或者 仓库
|
|
|
+ selectCntrNoList(row){
|
|
|
+ if(row.cntrNo && !this.form.storageId){
|
|
|
+ this.storageList = this.cntrNoList.map(item =>{
|
|
|
+ if(item.cntrNo == row.cntrNo){
|
|
|
+ let params = {
|
|
|
+ storageId:item.storageId,
|
|
|
+ stockName:item.stockName
|
|
|
+ }
|
|
|
+ return params
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else if(!row.cntrNo && this.form.storageId){
|
|
|
+ this.cntrNoList = this.storageList.map(item =>{
|
|
|
+ if(item.storageId == row.storageId){
|
|
|
+ return item.cntrNo
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.selectInventory(row)
|
|
|
+ }
|
|
|
+ console.log( this.storageList)
|
|
|
+ console.log( this.cntrNoList)
|
|
|
+ },
|
|
|
//查询库存
|
|
|
selectInventory(row) {
|
|
|
if (row.billNo && row.contractNumber && row.priceCategory && row.cntrNo && this.form.storageId) {
|