Browse Source

1.供应商业务联系人参照查询增加参数据
2.弹窗关闭清空校验

002390 2 năm trước cách đây
mục cha
commit
7bd68d0be4

+ 3 - 1
src/views/purchase/purchase-order/add/column.js

@@ -265,7 +265,9 @@ export const Columns = [
       supplierContactsName: 'name'
     },
      isShow:true,
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      supplierId:params.supplier
+    }),
     width: 200,
   },
   { key: "isUrgency", title: "紧急程度", inputType: "Checkbox",isShow:true, },

+ 4 - 6
src/views/purchase/purchase-order/add/index.vue

@@ -93,7 +93,6 @@ export default {
   },
   methods: {
     beforeOpen() {
-      // this.$refs['orderAddForm'].clearValidate();
       const { deptName, deptId, name, nickName, orgName, orgId } = this.$store.state.user;
       this.params.puOrg = orgId;
       this.params.puOrgName = orgName;
@@ -102,7 +101,6 @@ export default {
       this.params.puDept = deptId;
       this.params.puDeptName = deptName;
       this.params.billDate = new Date().Format('yyyy-MM-dd');
-      // this.params.status = '0';
     },
     setVisible(prop) {
       this.visible = prop;
@@ -216,10 +214,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 {

+ 4 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -60,6 +60,10 @@ export default {
     setVisible(prop) {
       this.visible = prop;
 
+      if(!this.visible){
+        this.$refs['orderEditForm'].clearValidate();
+      }
+
     },
     // 同步子表物料
     handleSynchronousMaterial(key1, key2) {