|
|
@ -80,7 +80,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item class="trightb_item"> |
|
|
|
<el-select v-model="purchaseForm.storeHouseSid" placeholder="请选择" style="width: 100%;"> |
|
|
|
<el-select v-model="purchaseForm.storeHouseSid" @change="selectstorehouse(purchaseForm)" placeholder="请选择" style="width: 100%;"> |
|
|
|
<el-option |
|
|
|
v-for="(storehouse,i) in storehouseList" |
|
|
|
:key="i" |
|
|
@ -97,7 +97,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item class="trightb_item"> |
|
|
|
<el-date-picker v-model="purchaseForm.purchaseDate" type="date" style="width: 100%;" |
|
|
|
<el-date-picker v-model="purchaseForm.outDate" type="date" style="width: 100%;" |
|
|
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -139,7 +139,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单价(元)" width="140" prop="estimateconfirmedPrice" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.estimateconfirmedPrice" @input="limitInput1($event,scope.$index)" placeholder="" clearable></el-input> |
|
|
|
<el-input v-model="scope.row.estimateConfirmedPrice" @input="limitInput1($event,scope.$index)" placeholder="" clearable></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="出库价值(元)" width="150px" prop="estimateCalculatedValue" align="center"> |
|
|
@ -158,11 +158,11 @@ |
|
|
|
</template>--> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select |
|
|
|
v-model="scope.row.locationNumber" |
|
|
|
v-model="scope.row.locationId" |
|
|
|
placeholder="请选择入库区货位" |
|
|
|
class="item_input" |
|
|
|
clearable |
|
|
|
@change="getOptions" |
|
|
|
@change="setOptions(scope.row)" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="(item,i) in huoweiId" |
|
|
@ -200,17 +200,19 @@ |
|
|
|
return { |
|
|
|
viewTitle: "【新增】出库订单", |
|
|
|
purchaseForm: { |
|
|
|
sid:'', |
|
|
|
purchaseId: '', |
|
|
|
product: '', |
|
|
|
barCode: '', |
|
|
|
applicationDate:'', |
|
|
|
no:'', |
|
|
|
creatorName:'', |
|
|
|
storehouseName:'', |
|
|
|
storeHouseName:'', |
|
|
|
storeHouseSid:"", |
|
|
|
custerName:'', |
|
|
|
custerSid:'', |
|
|
|
list:[] |
|
|
|
list:[], |
|
|
|
outDate:"" |
|
|
|
}, |
|
|
|
huoweiId:[], |
|
|
|
supplierList: [], |
|
|
@ -248,11 +250,26 @@ |
|
|
|
this.getStorehouseList() |
|
|
|
this.getcustListList() |
|
|
|
this.openAddPurchaseDialog() |
|
|
|
this.getOptions(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
selectstorehouse(form){ |
|
|
|
this.storehouseList.forEach((e) => { |
|
|
|
if(e.sid==form.storeHouseSid){ |
|
|
|
form.storeHouseName=e.name |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
setOptions(value){ |
|
|
|
this.huoweiId.forEach((e) => { |
|
|
|
if(e.locationId==value.locationId){ |
|
|
|
value.locationNumber=e.name |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
async getOptions() { |
|
|
|
const { data: datas } = await this.$http.get('/location/listAll', { params: this.queryPamas }) |
|
|
|
this.huoweiId = datas.data.rows; |
|
|
|
this.huoweiId = datas.data; |
|
|
|
}, |
|
|
|
selectPro(row){ |
|
|
|
console.log(row); |
|
|
@ -276,7 +293,7 @@ |
|
|
|
applicationDate:'', |
|
|
|
no:'', |
|
|
|
creatorName:'', |
|
|
|
storehouseName:'', |
|
|
|
storeHouseName:'', |
|
|
|
storeHouseSid:"", |
|
|
|
custerName:'', |
|
|
|
custerSid:'', |
|
|
@ -284,11 +301,11 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
saveOrUpdate(){ |
|
|
|
this.storehouseList.forEach((v, i) => { |
|
|
|
if(v.sid == this.purchaseForm.storeHouseSid){ |
|
|
|
this.purchaseForm.storehouseName = v.name |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.storehouseList.forEach((v, i) => { |
|
|
|
// if(v.sid == this.purchaseForm.storeHouseSid){ |
|
|
|
// this.purchaseForm.storehouseName = v.name |
|
|
|
// } |
|
|
|
// }) |
|
|
|
this.custList.forEach((v, i) => { |
|
|
|
if(v.enterpriseName == this.purchaseForm.custerSid){ |
|
|
|
this.purchaseForm.custerName = v.enterpriseName |
|
|
|