2 Komitmen a1d0848357 ... 9c49855c0c

Pembuat SHA1 Pesan Tanggal
  tzx 9c49855c0c Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom 2 hari lalu
  tzx 002de685ae fix: 修改锁库问题 2 hari lalu

+ 20 - 2
src/BIZComponents/inventoryTable.vue

@@ -9,6 +9,7 @@
       height="300"
       full-height="calc(100vh - 76px)"
       @columns-change="handleColumnChange"
+      @header-dragend="handleHeaderDragend"
       :cache-key="cacheKeyUrl"
       :selection.sync="selection"
     >
@@ -1260,7 +1261,8 @@
         ],
         columnsVersion: 1,
         selection: [],
-        quoteTypeOp
+        quoteTypeOp,
+        widthsVersion: 0
       };
     },
     computed: {
@@ -1268,8 +1270,17 @@
         return this.form.datasource.length;
       },
       columns() {
+        // 强制重新计算(每次进入时读取缓存宽度)
+        this.widthsVersion;
         let columnsVersion = this.columnsVersion;
 
+        const cacheWidths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        const applyWidth = (col) => {
+          if (col.prop && cacheWidths[col.prop]) {
+            return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+          }
+          return col;
+        };
         // 基础列定义
         let baseColumns = [
           {
@@ -1860,7 +1871,7 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ];
+        ].map(applyWidth);
 
         // 合并所有列
         return [...baseColumns, ...otherColumns].filter((item) => !item.isNone);
@@ -2796,6 +2807,13 @@
       },
       save() {
         this.$emit('save');
+      },
+      // 列头拖拽结束 - 保存列宽到本地缓存
+      handleHeaderDragend(newWidth, oldWidth, column) {
+        if (!column.property) return;
+        const widths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        widths[column.property] = newWidth;
+        this.setStorage(this.cacheKeyUrl + 'Widths', widths);
       }
     }
   };

+ 21 - 2
src/BIZComponents/inventoryTableDetails.vue

@@ -11,6 +11,7 @@
       class="time-form"
       :selection.sync="selection"
       @columns-change="handleColumnChange"
+      @header-dragend="handleHeaderDragend"
       @select="handleSelectionChange"
       @select-all="handleSelectionChange"
       :cache-key="cacheKeyUrl"
@@ -261,7 +262,8 @@
         // 新增:存储data中的type值,用于控制新增字段显示
         dataType: null,
         selection: [],
-        quoteTypeOp
+        quoteTypeOp,
+        widthsVersion: 0
       };
     },
     computed: {
@@ -269,6 +271,16 @@
         let columnsVersion = this.columnsVersion;
         console.log(this.quoteType, 'this.quoteType');
 
+        // 强制重新计算(每次进入时读取缓存宽度)
+        this.widthsVersion;
+        const cacheWidths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        const applyWidth = (col) => {
+          if (col.prop && cacheWidths[col.prop]) {
+            return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+          }
+          return col;
+        };
+
         // 基础列(新增字段之前的列)
         const baseColumns = [
           {
@@ -954,7 +966,7 @@
             slot: 'remark',
             align: 'center'
           }
-        ];
+        ].map(applyWidth);
 
         // 合并所有列
         return [
@@ -1120,6 +1132,13 @@
           );
           this.$refs.table && this.$refs.table.reload();
         }
+      },
+      // 列头拖拽结束 - 保存列宽到本地缓存
+      handleHeaderDragend(newWidth, oldWidth, column) {
+        if (!column.property) return;
+        const widths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        widths[column.property] = newWidth;
+        this.setStorage(this.cacheKeyUrl + 'Widths', widths);
       }
     }
   };

+ 29 - 4
src/BIZComponents/selectStockLedger/item-list.vue

@@ -11,6 +11,7 @@
       full-height="calc(100vh - 116px)"
       tool-class="ele-toolbar-form"
       cache-key="systemOrgUserTable"
+      @header-dragend="handleHeaderDragend"
       @select="selectChange"
       @select-all="changeSelectAll"
     >
@@ -177,12 +178,26 @@
         searchForm: {
           dimension: '1'
         },
-        selectedDime: '1'
+        selectedDime: '1',
+        widthsVersion: 0
       };
     },
     computed: {
       // 表格列配置
       columns() {
+        // 强制重新计算(每次进入时读取缓存宽度)
+        this.widthsVersion;
+        const cacheKey = this.$refs?.table?.cacheKey || 'systemOrgUserTable';
+        let cacheWidths = {};
+        try {
+          cacheWidths = JSON.parse(localStorage.getItem(cacheKey + 'Widths') || '{}');
+        } catch (e) {}
+        const applyWidth = (col) => {
+          if (col.prop && cacheWidths[col.prop]) {
+            return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+          }
+          return col;
+        };
         // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
         let arr = [
           this.selectedDime == 3
@@ -406,7 +421,7 @@
             fixed: 'right'
           }
         ];
-        return arr.filter((item) => item != '');
+        return arr.filter((item) => item != '').map(applyWidth);
       },
       clientEnvironmentId() {
         return this.$store.state.user.info.clientEnvironmentId;
@@ -565,8 +580,18 @@
             id: row.categoryId,
             assetId: row.assetId,
             batchNo: row.batchNo
-          }
-        });
+          }});
+        }
+      },
+      // 列头拖拽结束 - 保存列宽到本地缓存
+      handleHeaderDragend(newWidth, oldWidth, column) {
+        if (!column.property) return;
+        const cacheKey = 'systemOrgUserTable';
+        try {
+          const widths = JSON.parse(localStorage.getItem(cacheKey + 'Widths') || '{}');
+          widths[column.property] = newWidth;
+          localStorage.setItem(cacheKey + 'Widths', JSON.stringify(widths));
+        } catch (e) {}
       }
     },
 

+ 29 - 0
src/BIZComponents/selectStockLedger/item-search.vue

@@ -89,6 +89,32 @@
         <!--            ></auth-selection>-->
         <!--          </el-form-item>-->
         <!--        </el-col>-->
+        <el-col :span="6">
+          <el-form-item label="批次号:" prop="batchNo">
+            <el-input
+              clearable
+              v-model="params.batchNo"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="颜色:" prop="color">
+            <el-input
+              clearable
+              v-model="params.color"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+<!--        <el-col :span="6">-->
+<!--          <el-form-item label="组织机构:">-->
+<!--            <auth-selection-->
+<!--              v-model="params.deptIds"-->
+<!--              style="width: 100%"-->
+<!--            ></auth-selection>-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
         <el-col :span="6">
           <el-form-item label="所属工厂:" prop="factoryId">
             <el-select
@@ -177,12 +203,15 @@
         specification: '',
         code: '',
         categoryCode: '',
+        categoryModel: '',
         assetName: '',
         qualityResult: '',
         factoryId: '',
         dimension: '2',
         keyWord: '',
         colorKey: '',
+        factoryId: '',
+        color: ''
       };
       return {
         defaultParams,

+ 25 - 3
src/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue

@@ -51,8 +51,8 @@
             @cell-click="cellClick"
             :selection.sync="selection"
             :cache-key="cacheKeyUrl"
-            :page-size="20"
             @columns-change="handleColumnChange"
+            :page-size="20"
             @header-dragend="handleHeaderDragend"
           >
             <template v-slot:saleCount="{ row }">
@@ -147,13 +147,24 @@
         treeLoading: false,
         // cacheKeyUrl: '',
         columnsVersion: 1,
-        tabMixinsInit: false
+        tabMixinsInit: false,
+        widthsVersion: 0
       };
     },
     watch: {},
     computed: {
       columns() {
         const version = this.columnsVersion;
+        // 强制重新计算(打开弹窗时重新读取缓存宽度)
+        this.widthsVersion;
+        const cacheWidths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        const applyWidth = (col) => {
+          if (col.prop && cacheWidths[col.prop]) {
+            return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+          }
+          return col;
+        };
+
         let data = null;
         if (this.currentIndex != -1) {
           data = {
@@ -356,7 +367,10 @@
             align: 'center'
           }
         ];
-        return this.applyColumnWidth(tempData.filter((item) => !item.hide));
+        // 应用 mixin 列配置与本地列宽缓存后返回
+        return this.applyColumnWidth(tempData.filter((item) => !item.hide)).map(
+          applyWidth
+        );
       }
     },
     methods: {
@@ -366,6 +380,7 @@
       },
       open(item, currentIndex) {
         console.log(item, currentIndex);
+        this.widthsVersion++;
         this.currentIndex = currentIndex;
         this.visible = true;
         this.getTreeData();
@@ -446,6 +461,13 @@
         this.current = row;
         this.radio = row.id;
       },
+      // 列头拖拽结束 - 保存列宽到本地缓存
+      handleHeaderDragend(newWidth, oldWidth, column) {
+        if (!column.property) return;
+        const widths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        widths[column.property] = newWidth;
+        this.setStorage(this.cacheKeyUrl + 'Widths', widths);
+      },
       // 新接口返回 stockCountBase,旧接口使用 measureQuantity 表示当前库存
       getStockCount(row) {
         if (row.stockCountBase !== undefined && row.stockCountBase !== null) {

+ 11 - 0
src/styles/index.scss

@@ -22,6 +22,17 @@ table th .is-required::before{
   .switch {
     padding-bottom: 20px;
   }
+
+/* 表格内数字输入框(数量、单价等字段)隐藏上下箭头 */
+.el-table .el-input__inner[type='number']::-webkit-outer-spin-button,
+.el-table .el-input__inner[type='number']::-webkit-inner-spin-button {
+  -webkit-appearance: none;
+  margin: 0;
+}
+.el-table .el-input__inner[type='number'] {
+  -moz-appearance: textfield;
+  appearance: textfield;
+}
   .el-input-group__append{
     color: #606266;
   }

+ 25 - 4
src/views/saleManage/saleOrder/customerReturnOrder/inventoryTable.vue

@@ -7,6 +7,7 @@
       :toolkit="[]"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
+      @header-dragend="handleHeaderDragend"
       class="time-form"
     >
       <template v-slot:technicalDrawings="{ row, $index }">
@@ -275,8 +276,8 @@ export default {
         datasource: []
       },
       rules: {},
-
-    };
+        widthsVersion: 0,
+      };
   },
   created() {
     getWarehouseList().then((res) => {
@@ -291,6 +292,18 @@ export default {
       return this.$store.state.order.contractId;
     },
     columns() {
+      // 强制重新计算(每次进入时读取缓存宽度)
+      this.widthsVersion;
+      let cacheWidths = {};
+      try {
+        cacheWidths = JSON.parse(localStorage.getItem('systemRoleTable17' + 'Widths') || '{}');
+      } catch (e) {}
+      const applyWidth = (col) => {
+        if (col.prop && cacheWidths[col.prop]) {
+          return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+        }
+        return col;
+      };
       return [
         {
           width: 45,
@@ -528,9 +541,8 @@ export default {
         //   fixed: 'right',
         //   showOverflowTooltip: true
         // }
-      ]
+      ].map(applyWidth);
     }
-
   },
   methods: {
     downloadFile(file) {
@@ -784,6 +796,15 @@ export default {
       this.$refs.form.validate((valid) => {
         callback(valid);
       });
+    },
+    // 列头拖拽结束 - 保存列宽到本地缓存
+    handleHeaderDragend(newWidth, oldWidth, column) {
+      if (!column.property) return;
+      try {
+        const widths = JSON.parse(localStorage.getItem('systemRoleTable17' + 'Widths') || '{}');
+        widths[column.property] = newWidth;
+        localStorage.setItem('systemRoleTable17' + 'Widths', JSON.stringify(widths));
+      } catch (e) {}
     }
   }
 };

+ 128 - 20
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -112,6 +112,27 @@
           <el-form-item
             :prop="'datasource.' + scope.$index + '.blockCount'"
             :rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :datasource="form.datasource"
+      class="time-form"
+      :selection.sync="selection"
+      @columns-change="handleColumnChange"
+      @header-dragend="handleHeaderDragend"
+      :cache-key="cacheKeyUrl"
+    >
+      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+        <div class="headbox">
+          <el-button
+            v-if="isShowAdd && needProduce != 4"
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click="handlAdd"
           >
             <el-input
               v-model="scope.row.blockCount"
@@ -157,6 +178,42 @@
                 trigger: 'blur'
               }
             ]"
+            新增
+          </el-button>
+          <el-button
+            size="small"
+            type="danger"
+            icon="el-icon-delete"
+            class="ele-btn-icon"
+            :disabled="!selection.length"
+            @click="batchRemove"
+          >
+            批量删除
+          </el-button>
+        </div>
+      </template>
+      <template v-slot:technicalDrawings="{ row, $index }">
+        <el-form-item :prop="'datasource.' + $index + '.technicalDrawings'">
+          <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
+        </el-form-item>
+      </template>
+      <template v-slot:remark="{ row, $index }">
+        <el-form-item :prop="'datasource.' + $index + '.remark'">
+          <el-input
+            clearable
+            v-model="row.remark"
+            type="textarea"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </template>
+      <template v-slot:stockLedger="scope">
+        <el-form-item>
+          <el-popover
+            @hide="() => (selection = [])"
+            placement="right"
+            width="60%"
+            trigger="hover"
           >
             <el-select
               v-if="needProduce == 4 && orderNoList.length > 1"
@@ -412,25 +469,31 @@
         </template>
         <!-- 操作列 -->
         <template v-slot:action="scope">
-          <el-popconfirm
-            class="ele-action"
-            title="确定要删除吗?"
-            @confirm="remove(scope.$index)"
-          >
-            <template v-slot:reference>
-              <el-link type="danger" :underline="false" icon="el-icon-delete">
-                删除
-              </el-link>
-            </template>
-          </el-popconfirm>
-          <el-link
-            type="primary"
-            :underline="false"
-            icon="el-icon-edit"
-            @click="selectStockLedgerDialogOpen(scope.row)"
-          >
-            替代料
-          </el-link>
+          <div>
+            <el-popconfirm
+              class="ele-action"
+              title="确定要删除吗?"
+              @confirm="remove(scope.$index)"
+            >
+              <template v-slot:reference>
+                <el-link
+                  type="danger"
+                  :underline="false"
+                  icon="el-icon-delete"
+                >
+                  删除
+                </el-link>
+              </template>
+            </el-popconfirm>
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-edit"
+              @click="selectStockLedgerDialogOpen(scope.row)"
+            >
+              替代料
+            </el-link>
+          </div>
         </template>
       </ele-pro-table>
     </div>
@@ -547,6 +610,7 @@
       };
       return {
         cacheKeyUrl: 'eos-saleManage-invoice-inventoryTable-2026082501',
+        widthsVersion: 0,
         current: {},
         childrenColumns: [
           {
@@ -630,9 +694,25 @@
       },
       columns() {
         let columnsVersion = this.columnsVersion;
+        // 强制重新计算(每次进入时读取缓存宽度)
+        this.widthsVersion;
+        const cacheWidths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        const applyWidth = (col) => {
+          if (col.prop && cacheWidths[col.prop]) {
+            return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+          }
+          return col;
+        };
         return [
           {
             width: 60,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 45,
             type: 'index',
             columnKey: 'index',
             align: 'center',
@@ -1064,7 +1144,7 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ];
+        ].map(applyWidth);
       }
     },
     mounted() {
@@ -1790,6 +1870,27 @@
         this.setSort();
       },
 
+      batchRemove() {
+        if (!this.selection.length) return;
+        this.$confirm('确定要批量删除选中的物品吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          const ids = this.selection.map(item => item.tempId ?? item.id);
+          this.form.datasource = this.form.datasource.filter(
+            item => !ids.includes(item.tempId ?? item.id)
+          );
+          this.selection = [];
+          this.setSort();
+          this.$refs.table.reload();
+          this.$message.success('删除成功');
+        }).catch(() => {});
+      },
+      // 清空表格
+      restTable() {
+        this.form.datasource = [];
+      },
       // 重新排序
       setSort() {
         this.form.datasource.forEach((n, index) => {
@@ -1846,6 +1947,13 @@
 
           callback(valid);
         });
+      },
+      // 列头拖拽结束 - 保存列宽到本地缓存
+      handleHeaderDragend(newWidth, oldWidth, column) {
+        if (!column.property) return;
+        const widths = this.getStorage(this.cacheKeyUrl + 'Widths') || {};
+        widths[column.property] = newWidth;
+        this.setStorage(this.cacheKeyUrl + 'Widths', widths);
       }
     }
   };

+ 7 - 0
src/views/saleManage/saleOrder/invoice/components/inventoryTableDetails.vue

@@ -169,6 +169,13 @@
             label: '生产要求',
             align: 'center'
           },
+          {
+            width: 100,
+            prop: 'color',
+            label: '颜色',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             width: 120,
             prop: 'imgCode',

+ 122 - 2
src/views/saleManage/saleOrder/invoice/components/product-list.vue

@@ -10,12 +10,79 @@
     width="70%"
   >
     <el-card shadow="never">
+      <!-- 搜索条件 -->
+      <el-form
+        :model="searchForm"
+        label-width="80px"
+        class="ele-form-search"
+        @keyup.enter.native="doSearch"
+        @submit.native.prevent
+      >
+        <el-row :gutter="15">
+          <el-col :span="6">
+            <el-form-item label="型号:" prop="modelType">
+              <el-input
+                clearable
+                v-model="searchForm.modelType"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="规格:" prop="specification">
+              <el-input
+                clearable
+                v-model="searchForm.specification"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="批次号:" prop="batchNo">
+              <el-input
+                clearable
+                v-model="searchForm.batchNo"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="颜色:" prop="color">
+              <el-input
+                clearable
+                v-model="searchForm.color"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" style="float: right">
+            <div class="ele-form-actions">
+              <el-button
+                type="primary"
+                icon="el-icon-search"
+                class="ele-btn-icon"
+                @click="doSearch"
+                size="small"
+              >
+                查询
+              </el-button>
+              <el-button
+                @click="resetSearch"
+                icon="el-icon-refresh-left"
+                size="small"
+                type="primary"
+              >重置</el-button>
+            </div>
+          </el-col>
+        </el-row>
+      </el-form>
+
       <ele-pro-table
         ref="table"
         :columns="columns"
         :datasource="datasource"
         row-key="id"
-        height="calc(100vh - 350px)"
+        height="calc(100vh - 420px)"
         class="dict-table"
         @cell-click="cellClick"
       >
@@ -54,6 +121,13 @@ export default {
       currentIndex: null,
       currentData: [], //已经存在的产品
       datasource: [],
+      originalData: [], // 完整的原始数据
+      searchForm: {
+        modelType: '',
+        specification: '',
+        batchNo: '',
+        color: ''
+      },
       columns: [
         {
           action: 'action',
@@ -112,6 +186,18 @@ export default {
           slot: 'specification',
           align: "center"
         },
+        {
+          minWidth: 100,
+          prop: 'batchNo',
+          label: '批次号',
+          align: "center"
+        },
+        {
+          minWidth: 100,
+          prop: 'color',
+          label: '颜色',
+          align: "center"
+        },
         {
           width: 80,
           prop: 'totalCount',
@@ -208,10 +294,41 @@ export default {
       if (data) {
         this.$nextTick(() => {
           let {productList} = data;
+          this.originalData = productList;
           this.datasource = productList;
         });
       }
     },
+    // 搜索过滤
+    doSearch() {
+      const { modelType, specification, batchNo, color } = this.searchForm;
+      this.datasource = this.originalData.filter(item => {
+        let match = true;
+        if (modelType) {
+          match = match && item.modelType && item.modelType.indexOf(modelType) !== -1;
+        }
+        if (specification) {
+          match = match && item.specification && item.specification.indexOf(specification) !== -1;
+        }
+        if (batchNo) {
+          match = match && item.batchNo && item.batchNo.indexOf(batchNo) !== -1;
+        }
+        if (color) {
+          match = match && item.color && item.color.indexOf(color) !== -1;
+        }
+        return match;
+      });
+    },
+    // 重置搜索
+    resetSearch() {
+      this.searchForm = {
+        modelType: '',
+        specification: '',
+        batchNo: '',
+        color: ''
+      };
+      this.datasource = this.originalData;
+    },
 
     /* 刷新表格 */
     reload(where) {
@@ -286,4 +403,7 @@ export default {
 .topsearch {
   margin-bottom: 15px;
 }
-</style>
+::v-deep .ele-form-actions {
+  float: right;
+}
+</style>

+ 26 - 3
src/views/saleManage/saleOrder/invoice/components/stockLedger/components/item-list.vue

@@ -17,6 +17,7 @@
       :toolkit="[]"
       tool-class="ele-toolbar-form"
       cache-key="item-listTable"
+      @header-dragend="handleHeaderDragend"
       :selection.sync="selection"
       @done="onDone"
     >
@@ -139,12 +140,25 @@ export default {
       selectedDime: '3',
       selection: [],
       where: {},
-      index: 0
+      index: 0,
+      widthsVersion: 0
     };
   },
   computed: {
     // 表格列配置
     columns() {
+      // 强制重新计算(每次进入时读取缓存宽度)
+      this.widthsVersion;
+      let cacheWidths = {};
+      try {
+        cacheWidths = JSON.parse(localStorage.getItem('item-listTable' + 'Widths') || '{}');
+      } catch (e) {}
+      const applyWidth = (col) => {
+        if (col.prop && cacheWidths[col.prop]) {
+          return { ...col, width: cacheWidths[col.prop], minWidth: undefined };
+        }
+        return col;
+      };
       // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
       switch (this.selectedDime) {
         // 包装维度
@@ -322,7 +336,7 @@ export default {
               slot: 'action',
               fixed: 'right'
             }
-          ];
+          ].map(applyWidth);
         // 物料维度
         default:
           return [
@@ -473,7 +487,7 @@ export default {
               slot: 'action',
               fixed: 'right'
             }
-          ];
+          ].map(applyWidth);
       }
     }
   },
@@ -588,6 +602,15 @@ export default {
       this.selection.forEach(item => item.dimension = this.selectedDime)
       return this.selection
     },
+    // 列头拖拽结束 - 保存列宽到本地缓存
+    handleHeaderDragend(newWidth, oldWidth, column) {
+      if (!column.property) return;
+      try {
+        const widths = JSON.parse(localStorage.getItem('item-listTable' + 'Widths') || '{}');
+        widths[column.property] = newWidth;
+        localStorage.setItem('item-listTable' + 'Widths', JSON.stringify(widths));
+      } catch (e) {}
+    },
   },
 
   watch: {

+ 20 - 1
src/views/saleManage/saleOrder/invoice/components/stockLedger/components/item-search.vue

@@ -89,6 +89,24 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+          <el-form-item label="批次号:" prop="batchNo">
+            <el-input
+              clearable
+              v-model="params.batchNo"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+          <el-form-item label="颜色:" prop="color">
+            <el-input
+              clearable
+              v-model="params.color"
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
         <el-col
           v-if="dimension == 3 || dimension == 4"
           v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }"
@@ -151,7 +169,8 @@ export default {
       modelType: '',
       pageNum: '',
       specification: '',
-      barcodes: ''
+      barcodes: '',
+      color: ''
     };
     return {
       // 表单数据

+ 21 - 0
src/views/saleManage/saleOrder/returnGoods/components/customerReturnOrderDetail.vue

@@ -117,6 +117,27 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            minWidth: 120,
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'color',
+            label: '颜色',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'engrave',

+ 21 - 0
src/views/saleManage/saleOrder/returnGoods/components/detailDialog.vue

@@ -296,6 +296,27 @@
             showOverflowTooltip: true,
             align: 'center'
           },
+          {
+            minWidth: 120,
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'color',
+            label: '颜色',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'clientCode',

+ 17 - 0
src/views/saleManage/saleOrder/returnGoods/components/inventoryTableReturn.vue

@@ -238,6 +238,16 @@
           ></el-input>
         </el-form-item>
       </template>
+      <template v-slot:color="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.color'"
+        >
+          <el-input v-model="scope.row.color" 
+          :disabled="!!scope.row.productCode"
+          ></el-input>
+        </el-form-item>
+      </template>
       <template v-slot:deliveryDays="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -827,6 +837,13 @@ export default {
           slot: 'specification',
           align: 'center'
         },
+        {
+          width: 100,
+          prop: 'color',
+          label: '颜色',
+          slot: 'color',
+          align: 'center'
+        },
         {
           width: 120,
           prop: 'imgCode',