Bläddra i källkod

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 år sedan
förälder
incheckning
7527af15bf

+ 1 - 1
src/components/crop-select/configuration/mainList.json

@@ -33,7 +33,7 @@
         "overHidden": true
       },{
             "label": "所属公司",
-            "prop": "belongtocompany",
+            "prop": "belongCompany",
             "index": 5,
             "width":100,
         "overHidden": true

+ 11 - 6
src/components/crop-select/main.vue

@@ -10,8 +10,8 @@
         filterable
         clearable
         style="width:100%"
-        :multiple="multiple? multiple : false"
-        :collapse-tags="collapseTags?collapseTags: false"
+        :multiple="multiple ? multiple : false"
+        :collapse-tags="collapseTags ? collapseTags : false"
         @change="corpChange"
       >
         <el-option
@@ -37,6 +37,7 @@
       append-to-body
       @closed="closed"
       class="el-dialogDeep"
+      :close-on-click-modal="false"
       v-dialog-drag
     >
       <span>
@@ -128,7 +129,7 @@ export default {
       corpVisible: false,
       selectionList: [],
       title: null,
-      treeStyle:'height:'+(window.innerHeight - 315)+'px'
+      treeStyle: "height:" + (window.innerHeight - 315) + "px"
     };
   },
   props: {
@@ -137,7 +138,7 @@ export default {
     cropIndex: Number,
     corpType: String,
     multiple: Boolean,
-    collapseTags: Boolean,
+    collapseTags: Boolean
   },
   model: {
     prop: "value",
@@ -145,9 +146,11 @@ export default {
   },
   async created() {
     this.tableOption = await this.getColumnData(this.getColumnName(51), option);
+    let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
     this.title = getCustomerName(this.corpType);
     allCropList({
-      corpType: getCustomerCode(this.corpType)
+      corpType: getCustomerCode(this.corpType),
+      adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null
     }).then(res => {
       this.corpList = res.data.data;
     });
@@ -199,11 +202,13 @@ export default {
       this.onLoad(this.page, this.search);
     },
     onLoad(page, params = { parentId: 0 }) {
+      let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,
         corpsTypeId: this.treeDeptId,
-        corpType: getCustomerCode(this.corpType)
+        corpType: getCustomerCode(this.corpType),
+        adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null
       });
       this.loading = true;
       customerList(queryParams)

+ 1 - 1
src/components/finance/config/corpOption.json

@@ -33,7 +33,7 @@
         "overHidden": true
       },{
             "label": "所属公司",
-            "prop": "belongtocompany",
+            "prop": "belongCompany",
             "index": 5,
             "width":100,
         "overHidden": true

+ 19 - 10
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -1018,8 +1018,17 @@ export default {
     getAllBoxs().then(res => {
       this.allBoxs = res.data.data;
     });
-    getGoods(1, 500).then(res => {
-      this.goodsoptions = res.data.data.records;
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
     });
   },
   filters: {
@@ -2030,8 +2039,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+          this.$refs.crud.doLayout();
+        });
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
@@ -2045,8 +2054,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+          this.$refs.crud.doLayout();
+        });
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {
@@ -2061,8 +2070,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.goodsCrud.doLayout()
-        })
+          this.$refs.goodsCrud.doLayout();
+        });
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
@@ -2076,8 +2085,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.goodsCrud.doLayout()
-        })
+          this.$refs.goodsCrud.doLayout();
+        });
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {

+ 11 - 2
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -530,8 +530,17 @@ export default {
     this.getWorkDicts("currency").then(res => {
       this.currencyList = res.data.data;
     });
-    getGoods(1, 500).then(res => {
-      this.goodsoptions = res.data.data.records;
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
     });
     this.pickerOptions = {
       disabledDate: time => {

+ 19 - 10
src/views/exportTrade/salesContract/detailsPage.vue

@@ -1180,8 +1180,17 @@ export default {
         });
       }
     });
-    getGoods(1, 500).then(res => {
-      this.goodsoptions = res.data.data.records;
+    getGoods(1, 10).then(res => {
+      if (res.data.data.total > 0) {
+        this.goodsoptions = res.data.data.records;
+        if (Math.ceil(res.data.data.total / 10) > 1) {
+          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+            getGoods(i, 10).then(e => {
+              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+            });
+          }
+        }
+      }
     });
     getAllBoxs().then(res => {
       this.allBoxs = res.data.data;
@@ -2238,8 +2247,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+          this.$refs.crud.doLayout();
+        });
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
@@ -2253,8 +2262,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.crud.doLayout()
-        })
+          this.$refs.crud.doLayout();
+        });
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
@@ -2291,8 +2300,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.goodsCrud.doLayout()
-        })
+          this.$refs.goodsCrud.doLayout();
+        });
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
@@ -2306,8 +2315,8 @@ export default {
       );
       if (inSave) {
         this.$nextTick(() => {
-          this.$refs.goodsCrud.doLayout()
-        })
+          this.$refs.goodsCrud.doLayout();
+        });
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {

+ 7 - 1
src/views/maintenance/priceLibrary/index.vue

@@ -147,6 +147,7 @@
             type="text"
             icon="el-icon-edit"
             size="small"
+            v-if="permission.priceLibrary_edit"
             @click.stop="editOpen(row, index)"
             >{{ row.$cellEdit ? "保存" : "修改" }}
           </el-button>
@@ -154,6 +155,7 @@
             type="text"
             icon="el-icon-delete"
             size="small"
+            v-if="permission.priceLibrary_delete"
             @click.stop="rowDel(row, index)"
             >删除
           </el-button>
@@ -189,6 +191,7 @@ import { micrometerFormat } from "@/util/validate";
 import { orderStateFormat } from "@/enums/order-stauts";
 import { taxRateFormat } from "@/enums/tax-rate";
 import { purchaseCal } from "@/util/calculate";
+  import {mapGetters} from "vuex";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -264,7 +267,7 @@ export default {
     this.getWorkDicts("price_library_currency").then(res => {
       this.currencyList = res.data.data;
     });
-     this.option.height = window.innerHeight - 210;
+    this.option.height = window.innerHeight - 210;
   },
   filters: {
     orderStateFormat(val) {
@@ -453,6 +456,9 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
+  },
+  computed: {
+    ...mapGetters(["permission"])
   }
 };
 </script>