|
|
@@ -15,7 +15,7 @@
|
|
|
class="time-form"
|
|
|
:class="{ 'time-form-busy': tableBusy }"
|
|
|
:selection.sync="selection"
|
|
|
- @columns-change="handleColumnChange"
|
|
|
+ @columns-change="handleInventoryColumnsChange"
|
|
|
@header-dragend="handleHeaderDragend"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
height="350"
|
|
|
@@ -148,6 +148,14 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
+ <template v-slot:reelSpecification="{ row }">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model="row.reelSpecification"
|
|
|
+ maxlength="100"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
<!-- 生产编号 可编辑 -->
|
|
|
<template v-slot:productionCodes="{ row }">
|
|
|
<el-form-item>
|
|
|
@@ -823,23 +831,20 @@
|
|
|
width: 45,
|
|
|
type: 'selection',
|
|
|
columnKey: 'selection',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
width: 60,
|
|
|
type: 'index',
|
|
|
columnKey: 'index',
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
minWidth: 200,
|
|
|
prop: 'orderNo',
|
|
|
label: '订单编码',
|
|
|
align: 'center',
|
|
|
- slot: 'orderNo',
|
|
|
- fixed: 'left'
|
|
|
+ slot: 'orderNo'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -868,8 +873,6 @@
|
|
|
prop: 'pricingWay',
|
|
|
label: '计价方式',
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
-
|
|
|
formatter: (row, column) => {
|
|
|
return pricingWayList.find((item) => item.id == row.pricingWay)
|
|
|
?.name;
|
|
|
@@ -889,6 +892,13 @@
|
|
|
align: 'center',
|
|
|
formatter: (row) => row.systemBatchNo || '-'
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'reelSpecification',
|
|
|
+ label: '盘具',
|
|
|
+ slot: 'reelSpecification',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
width: 160,
|
|
|
prop: 'productBrand',
|
|
|
@@ -1248,7 +1258,7 @@
|
|
|
slot: 'remark',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- // 动态扩展字段默认排在最后(操作列固定在右侧,需留在最后)
|
|
|
+ // 动态扩展字段默认排在最后(操作列仍需排在末尾)
|
|
|
...this.dynamicsColumns,
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
@@ -1257,7 +1267,6 @@
|
|
|
align: 'center',
|
|
|
resizable: false,
|
|
|
slot: 'action',
|
|
|
- fixed: 'right',
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
]);
|
|
|
@@ -1295,6 +1304,10 @@
|
|
|
this.syncColumnsSettingCache(this.dynamicsColumns);
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleInventoryColumnsChange() {
|
|
|
+ this.handleColumnChange();
|
|
|
+ this.syncColumnsSettingCache(this.dynamicsColumns);
|
|
|
+ },
|
|
|
// 覆写 mixin 的 getTabColumns:服务端列配置写入缓存后,动态列可能
|
|
|
// 尚未到达、且服务端旧清单里操作列可能卡在中间——这里统一再归位一次
|
|
|
//(dynamicsColumns 到达时 watch 也会兜一次,两者谁后到都以这次为准)
|
|
|
@@ -1328,7 +1341,7 @@
|
|
|
added = true;
|
|
|
}
|
|
|
});
|
|
|
- // 操作列固定在最右侧,列设置面板里也应排在最后:
|
|
|
+ // 操作列排在最后,列设置面板里也应排在最后:
|
|
|
// 缓存顺序继承自服务端旧列清单,操作列可能卡在中间,这里统一归位
|
|
|
const actionIdx = cached.findIndex(
|
|
|
(c) => (c.columnKey || c.prop) === 'action' || c.label === '操作'
|
|
|
@@ -1339,8 +1352,21 @@
|
|
|
cached.push(action);
|
|
|
moved = true;
|
|
|
}
|
|
|
- if (added || moved) {
|
|
|
+ // 旧列设置里的 fixed 优先于列定义;清掉主表固定列,避免盖住横向滚动条。
|
|
|
+ let unfixed = false;
|
|
|
+ cached.forEach((col) => {
|
|
|
+ const key = col.columnKey || col.prop || col.id;
|
|
|
+ if (
|
|
|
+ ['selection', 'index', 'orderNo', 'pricingWay', 'action'].includes(key) &&
|
|
|
+ col.fixed
|
|
|
+ ) {
|
|
|
+ col.fixed = false;
|
|
|
+ unfixed = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (added || moved || unfixed) {
|
|
|
this.setStorage(storageKey, cached);
|
|
|
+ if (unfixed) this.columnsVersion++;
|
|
|
// 同步服务端列配置(复用 mixin 的防抖保存),避免下次进入时
|
|
|
// 服务端旧配置先到又把缓存覆盖回去
|
|
|
if (this.debouncedSaveColumns) {
|
|
|
@@ -1494,6 +1520,7 @@
|
|
|
this.$set(row, 'batchStockId', '');
|
|
|
this.$set(row, 'batchNo', '');
|
|
|
this.$set(row, 'systemBatchNo', '');
|
|
|
+ this.$set(row, 'reelSpecification', '');
|
|
|
}
|
|
|
const batchStockId = row.batchStockId;
|
|
|
// 换仓后原仓库的批次失效,先清空再拉新仓库的批次
|
|
|
@@ -1535,6 +1562,7 @@
|
|
|
this.$set(this.form.datasource[index], 'batchStockId', '');
|
|
|
this.$set(this.form.datasource[index], 'batchNo', '');
|
|
|
this.$set(this.form.datasource[index], 'systemBatchNo', '');
|
|
|
+ this.$set(this.form.datasource[index], 'reelSpecification', '');
|
|
|
// 仓库列表改成懒加载后,这里不再预取仓库列表
|
|
|
// this.$set(this.form.datasource[index], 'warehouseNum', '');
|
|
|
|
|
|
@@ -1557,6 +1585,11 @@
|
|
|
return;
|
|
|
}
|
|
|
this.$set(this.form.datasource[index], 'batchNo', data.batchNo);
|
|
|
+ this.$set(
|
|
|
+ this.form.datasource[index],
|
|
|
+ 'reelSpecification',
|
|
|
+ data.reelSpecification || ''
|
|
|
+ );
|
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
|
'systemBatchNo',
|
|
|
@@ -2113,6 +2146,9 @@
|
|
|
if (matched.length == 1) {
|
|
|
row.batchStockId = matched[0].id;
|
|
|
row.systemBatchNo = matched[0].systemBatchNo || '';
|
|
|
+ if (row.reelSpecification == null) {
|
|
|
+ row.reelSpecification = matched[0].reelSpecification || '';
|
|
|
+ }
|
|
|
this.$set(row, 'batchNoList', (list || []).slice());
|
|
|
stockRows.push(row);
|
|
|
} else {
|