|
|
@@ -10,22 +10,43 @@
|
|
|
<div class="name">工单信息 </div>
|
|
|
</div>
|
|
|
<workOrderBom :item="item" v-if="item"></workOrderBom>
|
|
|
- {{clientEnvironmentId}}
|
|
|
-
|
|
|
|
|
|
-
|
|
|
- <div v-if="clientEnvironmentId == 3 ">
|
|
|
- {{ item.toWarehouseList }}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <!-- <packingTgBom :list='it.extInfo.pickOutInList' :isWarehousing='true'></packingTgBom> -->
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ clientEnvironmentId == 3 &&
|
|
|
+ item.toWarehouseList &&
|
|
|
+ item.toWarehouseList.length > 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div style="margin-top: 6px">
|
|
|
+ <el-select
|
|
|
+ v-model="item.warehouseId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="请选择仓库"
|
|
|
+ size="mini"
|
|
|
+ class="content_num"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in warehouseList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div v-for="(it, idx) in item.toWarehouseList" :KEY="idx">
|
|
|
+ <packingTgBom
|
|
|
+ :list="it.extInfo.pickOutInList"
|
|
|
+ :isWarehousing="true"
|
|
|
+ ></packingTgBom>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ <div v-else>
|
|
|
+ <el-empty :image-size="30" description="暂无数据"></el-empty>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -33,13 +54,12 @@
|
|
|
|
|
|
<script>
|
|
|
import workOrderBom from '../feeding/components/workOrderBom.vue';
|
|
|
- import packingTgBom from '../jobBooking/components/packingTgBom.vue'
|
|
|
+ import packingTgBom from '../jobBooking/components/packingTgBom.vue';
|
|
|
|
|
|
import { getWarehouseList } from '@/api/produce/index.js';
|
|
|
import { listByIdsReport } from '@/api/produce/job';
|
|
|
import { listPcToWarehouseTG } from '@/api/produce/workOrder';
|
|
|
|
|
|
-
|
|
|
export default {
|
|
|
components: {
|
|
|
workOrderBom,
|
|
|
@@ -73,7 +93,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
watch: {
|
|
|
workListIds: {
|
|
|
handler(val) {
|
|
|
@@ -84,7 +103,6 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
-
|
|
|
created() {
|
|
|
this.getWarehouseListFn();
|
|
|
},
|
|
|
@@ -122,28 +140,27 @@
|
|
|
},
|
|
|
|
|
|
getTgWarehouse() {
|
|
|
- const param = {
|
|
|
- workOrderIds: this.idsList,
|
|
|
- taskId: this.taskObj.id
|
|
|
- };
|
|
|
- listPcToWarehouseTG(param).then((res) => {
|
|
|
- // 创建一个映射,以便快速查找
|
|
|
- const workOrderMap = new Map(res.map(it => [it.workOrderId, it]));
|
|
|
-
|
|
|
-
|
|
|
- // 更新List中的每个项目
|
|
|
- this.List.forEach(item => {
|
|
|
- if (workOrderMap.has(item.workOrderId)) {
|
|
|
- // 直接从映射中获取数据,避免嵌套循环
|
|
|
- this.$set(item, 'toWarehouseList', [workOrderMap.get(item.workOrderId)]);
|
|
|
- } else {
|
|
|
- this.$set(item, 'toWarehouseList', []);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- });
|
|
|
-},
|
|
|
+ const param = {
|
|
|
+ workOrderIds: this.idsList,
|
|
|
+ taskId: this.taskObj.id
|
|
|
+ };
|
|
|
+ listPcToWarehouseTG(param).then((res) => {
|
|
|
+ // 创建一个映射,以便快速查找
|
|
|
+ const workOrderMap = new Map(res.map((it) => [it.workOrderId, it]));
|
|
|
+
|
|
|
+ // 更新List中的每个项目
|
|
|
+ this.List.forEach((item) => {
|
|
|
+ if (workOrderMap.has(item.workOrderId)) {
|
|
|
+ // 直接从映射中获取数据,避免嵌套循环
|
|
|
+ this.$set(item, 'toWarehouseList', [
|
|
|
+ JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
|
|
|
+ ]);
|
|
|
+ } else {
|
|
|
+ this.$set(item, 'toWarehouseList', []);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
getWarehouseListFn() {
|
|
|
getWarehouseList().then((res) => {
|
|
|
@@ -202,4 +219,8 @@
|
|
|
padding: 8px;
|
|
|
border-radius: 2px;
|
|
|
}
|
|
|
+
|
|
|
+ .content_num {
|
|
|
+ --input-background-color: #f0f8f2;
|
|
|
+ }
|
|
|
</style>
|