|
@@ -123,6 +123,15 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column align="center" label="预留仓库" prop="correspondId" min-width="160" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select v-model="scope.row.correspondId" placeholder="选择预留仓库" size="small" clearable @change="changeWarehouse(scope.$index)">
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column align="center" label="备注" prop="reservedRemark" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="状态" prop="status" min-width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
@@ -259,7 +268,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDetail, getGoodsList, addData, editData, checkDealerList, checkMaterialList } from "@/api/supply/reserve";
|
|
|
+import { getDetail, getGoodsList, addData, editData, checkDealerList, checkMaterialList, getWarehouseList } from "@/api/supply/reserve";
|
|
|
import { getDictList } from '@/api/common'
|
|
|
|
|
|
let that
|
|
@@ -323,6 +332,7 @@ export default {
|
|
|
|
|
|
dealerList: [],
|
|
|
materialList: [],
|
|
|
+ warehouseList: [],
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -330,7 +340,8 @@ export default {
|
|
|
that = this;
|
|
|
},
|
|
|
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ await this.getWarehouseList();
|
|
|
if(this.listItem) {
|
|
|
this.getDetail();
|
|
|
}else {
|
|
@@ -362,6 +373,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 获取仓库列表
|
|
|
+ async getWarehouseList() {
|
|
|
+ const res = await getWarehouseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: -1,
|
|
|
+ });
|
|
|
+ this.warehouseList = res.data.records;
|
|
|
+ },
|
|
|
+
|
|
|
// 返回列表
|
|
|
goBack() {
|
|
|
this.$emit('backListFormDetail');
|
|
@@ -571,6 +591,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ // 修改仓库
|
|
|
+ changeWarehouse(index) {
|
|
|
+ if(this.goodsList[index].correspondId) {
|
|
|
+ let obj = this.warehouseList.find(o => o.id == this.goodsList[index].correspondId);
|
|
|
+ this.goodsList[index].correspondName = obj.name;
|
|
|
+ }else {
|
|
|
+ this.goodsList[index].correspondName = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 提交
|
|
|
clickSubmitForm() {
|
|
|
this.$refs.mainForm.validate((valid) => {
|