caojunjie 2 lat temu
rodzic
commit
047e01affc

+ 15 - 24
src/views/EquipmentArchives/index.vue

@@ -51,6 +51,10 @@ import {
     orderRemove,
     corpequipmentarchivesList, corpequipmentarchivesRemove
 } from "@/api/basicData/EquipmentArchives";
+import {
+    allCropList,
+} from "@/api/basicData/customerInformation";
+import {getCustomerCode} from "@/enums/management-type";
 export default {
   name: "index",
   data() {
@@ -144,23 +148,9 @@ export default {
     detailsPage
   },
   async created() {
-      this.getWorkDicts("payment_status").then(res => {
-          const arr = res.data.data.map(item => {
-              item.dictKey = Number(item.dictKey)
-              return item
-          })
-          this.findObject(this.option.column, "actualPaymentStatus").dicData = arr
-      });
-      this.getWorkDicts("order_status_pjjl").then(res => {
-          const arr = res.data.data.map(item => {
-              item.dictKey = Number(item.dictKey)
-              return item
-          })
-          this.findObject(this.option.column, "status").dicData = arr
-      });
     this.option = option
     this.option.height = window.innerHeight - 210;
-    this.getAllWorkDicts()
+      this.allCropListfun()
   },
   activated() {
     this.$refs.crud.refreshTable();
@@ -174,15 +164,16 @@ export default {
     }
   },
   methods: {
-    getAllWorkDicts() {
-      gainUser().then(res => {
-        this.findObject(this.option.column, "createUser").dicData = res.data.data;
-      })
-      getCorpType({ corpType: 'GYS' }).then(res => {
-        this.findObject(this.option.column, "corpType").dicData= res.data.data
-      });
-      this.$refs.crud.init();
-    },
+      // 客户查询
+      allCropListfun(){
+          let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
+          allCropList({
+              corpType: "KH",
+              adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null,
+          }).then(res=>{
+              this.findObject(this.option.column, "corpName").dicData = res.data.data
+          })
+      },
     searchCriteriaSwitch(type) {
       if (type) {
         this.option.height = this.option.height - 138;

+ 6 - 0
src/views/EquipmentArchives/js/optionList.js

@@ -43,6 +43,12 @@ export const option = {
       width:165,
       overHidden: true,
       search: true,
+      type: 'select',
+      dicData:[],
+      props: {
+        label: 'cname',
+        value: 'cname'
+      },
       index: 1
     },
     {

+ 0 - 8
src/views/product/index.vue

@@ -192,11 +192,6 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      // getCorpsAll().then(res => {
-      //   this.findObject(this.option.column, "cname").dicData = res.data.data;
-      //   this.findObject(this.option.column, "ids").dicData = res.data.data;
-      // })
-      // "/api/blade-system/dict-biz/dictionary?code=label",
       this.getWorkDicts("label").then(res => {
         this.findObject(this.option.column, "label").dicData = res.data.data;
       });
@@ -206,9 +201,6 @@ export default {
       this.getWorkDicts("goods_status").then(res => {
         this.findObject(this.option.column, "status").dicData = res.data.data;
       });
-      // getAllgoods().then(res => {
-      //   this.findObject(this.option.column, "cname").dicData = res.data.data
-      // });
       getGoodstype().then(res => {
         this.treeData = res.data.data;
         this.findObject(this.option2.column, "parentId").dicData = res.data.data;

+ 1 - 0
src/views/product/js/optionList.js

@@ -27,6 +27,7 @@ export const option = {
       //   label: "cname",
       //   value: "cname"
       // },
+      dicData:[],
       search: true,
       overHidden: true,
       index: 1