Browse Source

新增收货地址参照、修改人员证照参照,收货地址联动收货联系人,关闭弹窗清空校验

002390 2 years ago
parent
commit
8ec25f02a7

+ 21 - 0
src/components/popover-select/components/ADDRESS_PARAM.js

@@ -0,0 +1,21 @@
+// 收货地址
+export default [
+  {
+    key: "id",
+    title: "ID",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "code",
+    title: "编码",
+    type: "Input",
+    search: true,
+  },
+  {
+    key: "name",
+    title: "名称",
+    type: "Input",
+    search: true,
+  },
+];

+ 10 - 10
src/components/popover-select/components/PSNLICENSE_PARAM.js

@@ -1,20 +1,20 @@
-// 处理方式
+// 人员证照参照
 export default [
-  // {
-  //   key: "id",
-  //   title: "ID",
-  //   type: "Input",
-  //   search: true,
-  // },
   {
-    key: "code",
-    title: "编码",
+    key: "id",
+    title: "ID",
     type: "Input",
     search: true,
   },
+  // {
+  //   key: "code",
+  //   title: "编码",
+  //   type: "Input",
+  //   search: true,
+  // },
   {
     key: "name",
-    title: "处理方式",
+    title: "名称",
     type: "Input",
     search: true,
   },

+ 0 - 1
src/components/popover-select/index.vue

@@ -81,7 +81,6 @@ export default {
   },
   components: {},
   data() {
-    console.log(this.$props.queryParams,'queryParams----------');
     return {
       width: "50%",
       page: { pageNum: 1, pageSize: 25, total: 0 },

+ 28 - 4
src/views/purchase/purchase-order/add/column.js

@@ -199,7 +199,21 @@ export const Columns = [
   { key: "supplierOrderNo", title: "供应商订单号", inputType: "Input",isShow:true, },
   { key: "rebateMoney", title: "订单使用返利金额", inputType: "Input",isShow:true, },
   { key: "deductionMoney", title: "订单抵扣余款金额", inputType: "Input",isShow:true, },
-  { key: "address", title: "收货地址", inputType: "Input",isShow:true, },
+  { 
+    key: "addressName",
+    title: "收货地址",
+    inputType: "PopoverSelect",
+    valueKey: "id",
+    referName: "ADDRESS_PARAM",
+    isShow:true,
+    dataMapping: {
+      address: 'id',
+      addressName: 'name',
+      contacts:'contactsName',
+    },
+    queryParams: () => ({}),
+    width: 180
+  },
   { key: "contacts", title: "收货联系人", inputType: "Input",isShow:true, },
   {
     key: "customerDeptName",
@@ -264,13 +278,18 @@ export const Columns = [
     title: "供应商业务员",
     inputType: "PopoverSelect",
     valueKey: "id",
-    referName: "SUPPLIERCONTACTS_PARAM",
+    // referName: "SUPPLIERCONTACTS_PARAM",
+    referName: "PSNLICENSE_PARAM",
     dataMapping: {
       supplierPersonal: 'id',
       supplierPersonalName: 'name'
     },
      isShow:true,
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      // 组织、供应商id
+      pkOrg: params.puOrg,
+      supplier:params.supplier
+    }),
     require: true,
   },
   { key: "isDeliver", title: "是否发货", inputType: "Checkbox",  isShow:true,},
@@ -509,7 +528,12 @@ export const TabColumns = [
         width: 200,
       },
       { key: "place", title: "收货地点", inputType: "Input", width: 180 },
-      { key: "address", title: "收货地址", inputType: "Input", width: 180 },
+      { 
+        key: "address",
+        title: "收货地址",
+        inputType: "Input",
+        width: 180
+      },
       { key: "productBatch", title: "产品批号", inputType: "Input", width: 180 },
       { key: "manufactureDate", title: "生产日期", inputType: "Input", width: 180 },
       { 

+ 9 - 5
src/views/purchase/purchase-order/add/index.vue

@@ -93,7 +93,7 @@ export default {
   },
   methods: {
     beforeOpen() {
-      this.$refs['orderAddForm'].clearValidate();
+      // this.$refs['orderAddForm'].clearValidate();
       const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
@@ -105,6 +105,10 @@ export default {
     },
     setVisible(prop) {
       this.visible = prop;
+
+      if(!this.visible){
+        this.$refs['orderAddForm'].clearValidate();
+      }
     },
     // 复制赋值
     async setCopyParams(id) {
@@ -211,10 +215,10 @@ export default {
       // this.$refs['orderAddForm'].validate(async (valid) => {
       //   if (valid) {
       try {
-        const { code, msg } = await orderApi.create(this.params);
-        if (code === 200) {
-          this.handleCancel();
-        }
+        // const { code, msg } = await orderApi.create(this.params);
+        // if (code === 200) {
+        //   this.handleCancel();
+        // }
       } catch (err) {
         //
       } finally {