Browse Source

modify some dialog bugs

haojianlong 5 years ago
parent
commit
8ad72eed62

+ 7 - 3
src/components/dialogs/list/supplyDialog.vue

@@ -51,6 +51,7 @@
 import myPagination from "@/components/ledger/lib/myPagination";
 import { getListForSupplier } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
+import { mapGetters, mapActions } from "vuex";
 
 export default {
   components: {
@@ -70,6 +71,9 @@ export default {
       default: 0
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -126,11 +130,11 @@ export default {
       if (!!this.id) {
         let param = {
           data: {
-            projectId: this.$route.query.projId,
+            projectId: this.projectId,
             venderId: this.id
           },
-          ProjId: this.$route.query.projId,
-          secret: this.$route.query.secret,
+          ProjId: this.projectId,
+          secret: this.secret,
         }
         getListForSupplier(param, res => {
           _this.$refs.ruleForm.resetFields()

+ 6 - 6
src/views/ledger/facility/parts/index.vue

@@ -343,9 +343,9 @@ export default {
       //供应合同编号
       if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
         let falg = null;
-        if (!!this.tableData[row.row].infos) {
-          if (!!this.tableData[row.row].infos) {
-            falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0];
+        if (!!this.tableData[row.row].DPSupplierID) {
+          if (!!this.tableData[row.row].DPSupplierID) {
+            falg = this.tableData[row.row].DPSupplierID.split("-")[0];
           }
         }
         if (!!falg) {
@@ -359,9 +359,9 @@ export default {
       if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
         //选择保单
         let falg = null;
-        if (!!this.tableData[row.row].infos) {
-          if (!!this.tableData[row.row].infos) {
-            falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0];
+        if (!!this.tableData[row.row].DPInsurerID) {
+          if (!!this.tableData[row.row].DPInsurerID) {
+            falg = this.tableData[row.row].DPInsurerID.split("-")[0];
           }
         }
         if (!!falg) {

+ 6 - 6
src/views/ledger/facility/partsmanage/index.vue

@@ -627,9 +627,9 @@ export default {
       //供应合同编号
       if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
         let falg = null;
-        if (!!this.tableData[row.row].infos) {
-          if (!!this.tableData[row.row].infos) {
-            falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0];
+        if (!!this.tableData[row.row].DPSupplierID) {
+          if (!!this.tableData[row.row].DPSupplierID) {
+            falg = this.tableData[row.row].DPSupplierID.split("-")[0];
           }
         }
         if (!!falg) {
@@ -643,9 +643,9 @@ export default {
       if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
         //选择保单
         let falg = null;
-        if (!!this.tableData[row.row].infos) {
-          if (!!this.tableData[row.row].infos) {
-            falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0];
+        if (!!this.tableData[row.row].DPInsurerID) {
+          if (!!this.tableData[row.row].DPInsurerID) {
+            falg = this.tableData[row.row].DPInsurerID.split("-")[0];
           }
         }
         if (!!falg) {