|
@@ -73,6 +73,16 @@
|
|
|
v-if="!listItem"
|
|
|
>批量设置预留数量</el-button
|
|
|
>
|
|
|
+ <el-select
|
|
|
+ style="margin-left: 10px"
|
|
|
+ v-model="morenck"
|
|
|
+ placeholder="设置默认仓库"
|
|
|
+ size="small"
|
|
|
+ clearable
|
|
|
+ @change="shezhimorenck"
|
|
|
+ >
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
<div class="table" style="margin-top: 20px">
|
|
|
<el-table
|
|
@@ -514,6 +524,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ morenck: '',
|
|
|
mainForm: {
|
|
|
orderNum: '',
|
|
|
orderDate: '',
|
|
@@ -571,7 +582,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async created() {
|
|
|
- // await this.getWarehouseList();
|
|
|
+ await this.getWarehouseList()
|
|
|
// await this.getListStock()
|
|
|
if (this.listItem) {
|
|
|
console.log(this.listItem)
|
|
@@ -583,6 +594,14 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ shezhimorenck(val) {
|
|
|
+ this.goodsList = this.goodsList.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ correspondId: val
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getDate() {
|
|
|
var date = new Date()
|
|
|
var seperator1 = '-'
|
|
@@ -628,7 +647,9 @@ export default {
|
|
|
this.mainForm.createDate = res.data.createTime
|
|
|
this.mainForm.remark = res.data.remark
|
|
|
for (let i = 0; i < res.data.reservedOrderItems.length; i++) {
|
|
|
- res.data.reservedOrderItems[i].warehouseList = await this.getListStock(res.data.reservedOrderItems[i].customerId)
|
|
|
+ res.data.reservedOrderItems[i].warehouseList = await this.getListStock(
|
|
|
+ res.data.reservedOrderItems[i].customerId
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
let data = res.data
|
|
@@ -747,7 +768,15 @@ export default {
|
|
|
item.warehouseList = await this.getListStock(item.customerId)
|
|
|
})
|
|
|
|
|
|
- this.goodsList = this.goodsList.concat(this.dialogSelection)
|
|
|
+ this.goodsList = this.goodsList.concat(
|
|
|
+ this.dialogSelection.map(item => {
|
|
|
+ item.reservedNum = item.refundableQty
|
|
|
+ if (this.morenck) {
|
|
|
+ item.correspondId = this.morenck
|
|
|
+ }
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ )
|
|
|
this.isShowDialog = false
|
|
|
this.dialogGoodsList = []
|
|
|
},
|
|
@@ -893,13 +922,11 @@ export default {
|
|
|
editData(params).then(res => {
|
|
|
this.$successMsg('编辑成功')
|
|
|
this.goBack()
|
|
|
-
|
|
|
})
|
|
|
} else {
|
|
|
addData(params).then(res => {
|
|
|
this.$successMsg('添加成功')
|
|
|
this.goBack()
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
}
|