Bläddra i källkod

feat: 库存台账优化列表维度显示逻辑并新增入库时间筛选功能

yusheng 9 månader sedan
förälder
incheckning
1c702d5a43

+ 22 - 9
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -212,10 +212,7 @@
         >
       </span>
     </el-dialog>
-    <printQRCode
-      ref="printQRCodeRef"
-
-    ></printQRCode>
+    <printQRCode ref="printQRCodeRef"></printQRCode>
     <importDialog
       :defModule="moudleName"
       ref="importDialogRef"
@@ -256,7 +253,14 @@
 
   export default {
     mixins: [tabMixins],
-    components: { ItemSearch, print, allot, importDialog, exportButton,printQRCode },
+    components: {
+      ItemSearch,
+      print,
+      allot,
+      importDialog,
+      exportButton,
+      printQRCode
+    },
     props: {
       // 机构id
       organizationId: [Number, String],
@@ -490,7 +494,7 @@
               }
             : '',
 
-          this.selectedDime == 3||this.selectedDime == 2
+          this.selectedDime == 3 || this.selectedDime == 2
             ? {
                 prop: 'warehouseName',
                 label: '仓库名称',
@@ -573,7 +577,8 @@
             width: 120,
             showOverflowTooltip: true
           },
-          this.selectedDime != 1
+
+          this.selectedDime == 1
             ? {
                 prop: 'provenance',
                 label: '产地',
@@ -586,8 +591,17 @@
                 label: '单价',
                 showOverflowTooltip: true
               }
+            : '',
+          this.selectedDime == 2
+            ? {
+                prop: 'createTime',
+                width: 120,
+                label: '入库时间',
+                showOverflowTooltip: true
+              }
             : ''
         ];
+
         if (this.selectedDime == 1) {
           return arr.filter((item) => item != '').concat(this.newColumns);
         } else {
@@ -599,8 +613,7 @@
       }
     },
     methods: {
-
-     openQRCode(row, type) {
+      openQRCode(row, type) {
         this.$refs.printQRCodeRef.open(row, type);
       },
 

+ 22 - 4
src/views/warehouseManagement/stockLedger/components/item-search.vue

@@ -55,7 +55,7 @@
             ></auth-selection>
           </el-form-item>
         </el-col> -->
-        <el-col  :span="6">
+        <el-col :span="6">
           <el-form-item label="列表维度:" prop="dimension">
             <template>
               <el-select
@@ -65,7 +65,12 @@
                 v-model="dimension"
                 placeholder="请选择"
               >
-                <el-option label="物品维度" value="1" v-if="type === 'products'"> </el-option>
+                <el-option
+                  label="物品维度"
+                  value="1"
+                  v-if="type === 'products'"
+                >
+                </el-option>
                 <el-option label="批次维度" value="2"> </el-option>
                 <el-option label="包装维度" value="3"> </el-option>
                 <!-- <el-option
@@ -87,6 +92,18 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="6" v-if="dimension == 2">
+          <el-form-item label="入库时间:" prop="startTime">
+            <el-date-picker
+              size="small"
+              v-model="params.startTime"
+              type="date"
+              value-format="yyyy-MM-dd"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
         <!-- <el-col :span="6">
           <el-form-item label="物品编码:" prop="categoryCode">
             <el-input
@@ -160,7 +177,7 @@
             ></el-input>
           </el-form-item>
         </el-col> -->
-        <el-col :span="type === 'products' ? 24 : 12">
+        <el-col :span="18">
           <div class="ele-form-actions">
             <el-button
               type="primary"
@@ -206,7 +223,8 @@
         factoryId: '',
         keyWord: '',
         deptIds: '',
-        warehouseId: ''
+        warehouseId: '',
+        startTime: ''
       };
       return {
         // 表单数据