lilei 3 lat temu
rodzic
commit
a89aa011cc

+ 7 - 3
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -77,10 +77,10 @@
                   </a-input-group>
                   </a-input-group>
                 </a-form-model-item>
                 </a-form-model-item>
               </a-col>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="">
                 <a-form-item label="">
                   <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
                   <a-checkbox v-model="queryParam.zeroQtyFlag" id="inventoryQueryList-zeroQtyFlag">只查看有库存</a-checkbox>
-                  <a-checkbox v-model="queryParam.productEnabledFlag" id="inventoryQueryList-productEnabledFlag">显示禁用产品</a-checkbox>
+                  <a-checkbox v-model="queryParam.productEnabledFlag" :checked="queryParam.productEnabledFlag" id="inventoryQueryList-productEnabledFlag">显示禁用产品</a-checkbox>
                 </a-form-item>
                 </a-form-item>
               </a-col>
               </a-col>
             </template>
             </template>
@@ -328,7 +328,6 @@ export default {
       this.queryParam.brandName = undefined
       this.queryParam.brandName = undefined
       this.queryParam.productTypeName = undefined
       this.queryParam.productTypeName = undefined
       this.queryParam.zeroQtyFlag = false
       this.queryParam.zeroQtyFlag = false
-      this.queryParam.productEnabledFlag = false
       this.productTypeSn = []
       this.productTypeSn = []
       this.queryParam.minUnsalableDays = undefined, // 滞销天数最小值
       this.queryParam.minUnsalableDays = undefined, // 滞销天数最小值
       this.queryParam.maxUnsalableDays = undefined, // 滞销天数最大值
       this.queryParam.maxUnsalableDays = undefined, // 滞销天数最大值
@@ -436,6 +435,8 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
         _this.setTableH()
       })
       })
+      // 是否默认打印原厂编码
+      this.queryParam.productEnabledFlag = localStorage.getItem('productEnabledFlag-' + this.$store.state.user.info.orgId) == 'true'
     },
     },
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -449,6 +450,9 @@ export default {
         _this.setTableH()
         _this.setTableH()
       })
       })
     },
     },
+    'queryParam.productEnabledFlag' (newValue, oldValue) {
+      localStorage.setItem('productEnabledFlag-' + this.$store.state.user.info.orgId, newValue)
+    },
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
       this.setTableH()
       this.setTableH()
     }
     }