mo 2 лет назад
Родитель
Сommit
5cf701905f
2 измененных файлов с 32 добавлено и 11 удалено
  1. 3 3
      src/views/home/index.vue
  2. 29 8
      src/views/pms/product/index.vue

+ 3 - 3
src/views/home/index.vue

@@ -102,7 +102,7 @@
             </div>
           </el-col>
           <el-col :span="8">
-            <div class="un-handle-item" @click="gotoShop">
+            <div class="un-handle-item" @click="gotoShop(1)">
               <span class="font-medium">缺货登记</span>
               <span style="float: right" class="color-danger"
                 >({{ staticeDate.outStockProduct }})</span
@@ -449,8 +449,8 @@ export default {
     gotoOrder(status){
       this.$router.push({name:'order',params:{status}})
     },
-    gotoShop(){
-        this.$router.push({name:'product'})
+    gotoShop(status){
+        this.$router.push({name:'product',params:{stock:status}})
     },
     gotoBack(status){
        this.$router.push({name:'returnApply',params:{status}})

+ 29 - 8
src/views/pms/product/index.vue

@@ -80,16 +80,22 @@
               </el-option>
             </el-select>
           </el-form-item>
-          <!-- <el-form-item label="审核状态:">
-            <el-select v-model="listQuery.verifyStatus" placeholder="全部" clearable>
+          <el-form-item label="是否缺货">
+            <el-select
+              v-model="listQuery.stock"
+              placeholder="是否缺货"
+              clearable
+              style="width:203px"
+            >
               <el-option
-                v-for="item in verifyStatusOptions"
+                v-for="item in stockOptions"
                 :key="item.value"
                 :label="item.label"
-                :value="item.value">
+                :value="item.value"
+              >
               </el-option>
             </el-select>
-          </el-form-item> -->
+          </el-form-item>
         </el-form>
       </div>
     </el-card>
@@ -424,10 +430,22 @@ export default {
           label: "未审核",
         },
       ],
+      stockOptions: [
+        {
+          value: 1,
+          label: "是",
+        },
+        {
+          value: 0,
+          label: "否",
+        },
+      ],
     };
   },
   created() {
-
+    if (this.$route.params.stock + "") {
+      this.listQuery.stock = this.$route.params.stock;
+    }
     this.getList();
     this.getBrandList();
     this.getProductCateList();
@@ -728,6 +746,9 @@ export default {
   },
 };
 </script>
-<style></style>
-
+<style lang="scss" scoped>
+/deep/.el-select--small {
+  width: 203px !important;
+}
+</style>