caojunjie 2 سال پیش
والد
کامیت
eeb0bc2d49
2فایلهای تغییر یافته به همراه25 افزوده شده و 34 حذف شده
  1. 24 26
      src/views/Inventory/index.vue
  2. 1 8
      src/views/Inventory/js/optionList.js

+ 24 - 26
src/views/Inventory/index.vue

@@ -84,19 +84,19 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      this.getWorkDicts("label").then(res => {
-        this.findObject(this.option.column, "label").dicData = res.data.data;
-      });
-      this.getWorkDicts("unit").then(res => {
-        this.findObject(this.option.column, "unit").dicData = res.data.data;
-      });
-      this.getWorkDicts("goods_status").then(res => {
-        this.findObject(this.option.column, "status").dicData = res.data.data;
-      });
-      getAllgoods().then(res => {
-        this.findObject(this.option.column, "goods").dicData = res.data.data
-      });
-      this.$refs.crud.init();
+        this.getWorkDicts("label").then(res => {
+            this.findObject(this.option.column, "label").dicData = res.data.data;
+        });
+        this.getWorkDicts("unit").then(res => {
+            this.findObject(this.option.column, "unit").dicData = res.data.data;
+        });
+        this.getWorkDicts("goods_status").then(res => {
+            this.findObject(this.option.column, "status").dicData = res.data.data;
+        });
+        // getAllgoods().then(res => {
+        //   this.findObject(this.option.column, "goods").dicData = res.data.data
+        // });
+        this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
       if (type) {
@@ -150,19 +150,17 @@ export default {
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
     },
     onLoad(page, params = {}) {
-      let data = this.deepClone(Object.assign(params, this.search));
-      this.loading = true;
-      getList(
-        page.currentPage,
-        page.pageSize,
-        data
-      )
-        .then(res => {
-          this.dataList = res.data.data.records ? res.data.data.records : [];
-          this.page.total = res.data.data.total;
-        })
-        .finally(() => {
-          this.loading = false;
+        let data = this.deepClone(Object.assign(params, this.search));
+        this.loading = true;
+        getList(
+            page.currentPage,
+            page.pageSize,
+            data
+        ).then(res => {
+            this.dataList = res.data.data.records ? res.data.data.records : [];
+            this.page.total = res.data.data.total;
+        }).finally(() => {
+            this.loading = false;
         });
     },
     currentChange(val) {

+ 1 - 8
src/views/Inventory/js/optionList.js

@@ -20,13 +20,6 @@ export const option = {
     {
       label: "产品名称",
       prop: "goods",
-      type: "select",
-      dicData: [],
-      filterable:true,
-      props: {
-        label: "cname",
-        value: "cname"
-      },
       search: true,
       display:false,
       overHidden: true,
@@ -299,4 +292,4 @@ export const feeOption = {
       overHidden: true
     }
   ]
-}
+}