15 Commits fbda5d7e5a ... efda9365de

Author SHA1 Message Date
  tzx efda9365de fix: 修复华泰问题 2 days ago
  tzx fb172eaed5 Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev 2 days ago
  mlchen df60cd504a Merge branch 'dev' into test 6 days ago
  mlchen 2f7eb8c270 Merge branch 'dev' into test 1 week ago
  liujt 6997450380 Merge branch 'dev' into test 2 weeks ago
  liujt 41ce537430 Merge branch 'dev' into test 3 weeks ago
  liujt e0029bd8d1 Merge branch 'dev' into test 3 weeks ago
  liujt 7fdf624a52 Merge branch 'dev' into test 3 weeks ago
  liujt 57439dfe6a Merge branch 'dev' into test 4 weeks ago
  liujt 99a7615cf9 Merge branch 'dev' into test 4 weeks ago
  liujt cb8d5d6d5d Merge branch 'dev' into test 1 month ago
  liujt 2064b1f59a Merge branch 'dev' into test 1 month ago
  liujt d82bde2fbf Merge branch 'dev' into test 1 month ago
  liujt 8ab2ef9c28 Merge branch 'dev' into test 1 month ago
  liujt 8dc64272ed feat: 未入库不能发货 1 month ago

+ 5 - 3
src/BIZComponents/inventoryTable.vue

@@ -1871,10 +1871,12 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ].map(applyWidth);
+        ];
 
-        // 合并所有列
-        return [...baseColumns, ...otherColumns].filter((item) => !item.isNone);
+        // 合并所有列,统一应用列宽缓存(无缓存时保持默认宽度)
+        return [...baseColumns, ...otherColumns]
+          .filter((item) => !item.isNone)
+          .map(applyWidth);
       }
     },
     created() {

+ 5 - 3
src/BIZComponents/inventoryTableDetails.vue

@@ -978,14 +978,16 @@
             slot: 'remark',
             align: 'center'
           }
-        ].map(applyWidth);
+        ];
 
-        // 合并所有列
+        // 合并所有列,统一应用列宽缓存(无缓存时保持默认宽度)
         return [
           ...baseColumns,
           ...additionalColumns,
           ...remainingColumns
-        ].filter((item) => !item.isNone);
+        ]
+          .filter((item) => !item.isNone)
+          .map(applyWidth);
       }
     },
     created() {

+ 31 - 9
src/BIZComponents/product-list.vue

@@ -84,28 +84,44 @@
               >
             </el-col>
           </el-row>
-          <!-- <el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="批次号:">
-                <el-input type="text" placeholder="搜索批次号" v-model="searchForm.batchNo"></el-input>
+                <el-input
+                  type="text"
+                  placeholder="搜索批次号"
+                  v-model="searchForm.batchNo"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="刻码">
-                <el-input type="text" placeholder="搜索物品刻码" v-model="searchForm.engrave"></el-input>
+              <el-form-item label="型号:">
+                <el-input
+                  type="text"
+                  placeholder="搜索型号"
+                  v-model="searchForm.categoryModel"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="发货码">
-                <el-input type="text" placeholder="搜索发货码" v-model="searchForm.barcodes"></el-input>
+              <el-form-item label="规格:">
+                <el-input
+                  type="text"
+                  placeholder="搜索规格"
+                  v-model="searchForm.specification"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="牌号">
-                <el-input type="text" placeholder="搜索牌号" v-model="searchForm.brandNum"></el-input>
+              <el-form-item label="颜色:">
+                <el-input
+                  type="text"
+                  placeholder="搜索颜色"
+                  v-model="searchForm.colorKey"
+                ></el-input>
               </el-form-item>
             </el-col>
-          </el-row> -->
+          </el-row>
         </el-row>
       </el-form>
       <ele-split-layout
@@ -287,6 +303,9 @@
           brandNum: '',
           engrave: '',
           barcodes: '',
+          categoryModel: '',
+          specification: '',
+          colorKey: '',
           categoryLevelId: '',
           warehouseId: '',
           pageNum: 1,
@@ -745,6 +764,9 @@
           brandNum: '',
           engrave: '',
           barcodes: '',
+          categoryModel: '',
+          specification: '',
+          colorKey: '',
           categoryLevelId: this.categoryLevelId,
           pageNum: 1,
           warehouseId: '',

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

@@ -7,6 +7,7 @@
         :columns="columns"
         :datasource="form.datasource"
         class="time-form"
+        :selection.sync="selection"
         @columns-change="handleColumnChange"
         @header-dragend="handleHeaderDragend"
         :cache-key="cacheKeyUrl"
@@ -18,26 +19,38 @@
         <!-- 表头工具栏 -->
         <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-button>
-            <el-button
-              size="small"
-              type="primary"
-              icon="el-icon-plus"
-              class="ele-btn-icon"
-              @click="handParent()"
-              v-if="isShowAdd && needProduce == 4"
-            >
-              新增
-            </el-button>
+            <div>
+              <el-button
+                v-if="isShowAdd && needProduce != 4"
+                size="small"
+                type="primary"
+                icon="el-icon-plus"
+                class="ele-btn-icon"
+                @click="handlAdd"
+              >
+                新增
+              </el-button>
+              <el-button
+                size="small"
+                type="primary"
+                icon="el-icon-plus"
+                class="ele-btn-icon"
+                @click="handParent()"
+                v-if="isShowAdd && needProduce == 4"
+              >
+                新增
+              </el-button>
+              <el-button
+                size="small"
+                type="danger"
+                icon="el-icon-delete"
+                class="ele-btn-icon"
+                :disabled="!selection.length"
+                @click="batchRemove"
+              >
+                批量删除
+              </el-button>
+            </div>
           </div>
         </template>
         <template v-slot:technicalDrawings="{ row, $index }">
@@ -632,6 +645,13 @@
       columns() {
         let columnsVersion = this.columnsVersion;
         return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
           {
             width: 60,
             type: 'index',
@@ -1790,6 +1810,30 @@
         this.form.datasource.splice(i, 1);
         this.setSort();
       },
+      // 批量删除选中的物品
+      batchRemove() {
+        if (!this.selection.length) {
+          return this.$message.warning('请先勾选要删除的数据');
+        }
+        this.$confirm(
+          `确定要删除选中的 ${this.selection.length} 条物品吗?`,
+          '提示',
+          { type: 'warning' }
+        )
+          .then(() => {
+            const rows = this.selection;
+            this.form.datasource = this.form.datasource.filter(
+              (row) => !rows.includes(row)
+            );
+            this.selection = [];
+            if (this.$refs.table && this.$refs.table.clearSelection) {
+              this.$refs.table.clearSelection();
+            }
+            this.setSort();
+            this.$message.success('删除成功');
+          })
+          .catch(() => {});
+      },
 
       // 重新排序
       setSort() {

+ 78 - 17
src/views/saleManage/saleOrder/invoice/components/product-listNew.vue

@@ -38,7 +38,49 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="6" style="display: flex; justify-content: flex-end">
+          <el-col :span="6">
+            <el-form-item label="批次号">
+              <el-input
+                clearable
+                size="small"
+                v-model.trim="where.batchNo"
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="型号">
+              <el-input
+                clearable
+                size="small"
+                v-model.trim="where.modelType"
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="10">
+          <el-col :span="6">
+            <el-form-item label="规格">
+              <el-input
+                clearable
+                size="small"
+                v-model.trim="where.specification"
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="颜色">
+              <el-input
+                clearable
+                size="small"
+                v-model.trim="where.colorKey"
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" style="display: flex; justify-content: flex-end">
             <el-form-item>
               <el-button
                 size="mini"
@@ -91,7 +133,11 @@
         datasource: [],
         where: {
           productCode: '',
-          productName: ''
+          productName: '',
+          batchNo: '',
+          modelType: '',
+          specification: '',
+          colorKey: ''
         },
         columns: [
           {
@@ -266,32 +312,47 @@
       open(datasource) {
         this.oldDatasource = datasource;
         this.datasource = datasource || [];
+        // 每次打开清空上次查询条件
+        this.where = {
+          productCode: '',
+          productName: '',
+          batchNo: '',
+          modelType: '',
+          specification: '',
+          colorKey: ''
+        };
         this.visible = true;
       },
       search(type) {
         if (type == 'reset') {
           this.where = {
+            productCode: '',
             productName: '',
-            productCode: ''
+            batchNo: '',
+            modelType: '',
+            specification: '',
+            colorKey: ''
           };
         }
-        if (this.where.productName == '' && this.where.productCode == '') {
+        // 所有条件都为空时显示全部
+        const allEmpty = Object.keys(this.where).every((key) => !this.where[key]);
+        if (allEmpty) {
           this.datasource = this.oldDatasource;
-          return
+          return;
         }
+        // 多条件同时满足(AND),字段值包含关键字即匹配,空条件忽略
         this.datasource = this.oldDatasource.filter((item) => {
-          if (
-            this.where.productName &&
-            item.productName.includes(this.where.productName)
-          ) {
-            return item;
-          }
-          if (
-            this.where.productCode &&
-            item.productCode.includes(this.where.productCode)
-          ) {
-            return item;
-          }
+          const match = (value, keyword) =>
+            !keyword ||
+            (value != null && String(value).includes(keyword));
+          return (
+            match(item.productName, this.where.productName) &&
+            match(item.productCode, this.where.productCode) &&
+            match(item.batchNo, this.where.batchNo) &&
+            match(item.modelType, this.where.modelType) &&
+            match(item.specification, this.where.specification) &&
+            match(item.colorKey, this.where.colorKey)
+          );
         });
       },
       selected() {