roose 3 سال پیش
والد
کامیت
6c79280f6b

+ 47 - 34
src/components/components-pub/PubAll.vue

@@ -110,6 +110,21 @@ export default {
         return [];
       },
     },
+
+     // 弹出层字段
+    formValue1: {
+      type: Object,
+      default: function () {
+        return {};
+      },
+    },
+    // 弹出层字段
+    formList1: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
     // 搜索的配置
     exportFlag: {
       type: Boolean,
@@ -162,37 +177,37 @@ export default {
       title: "编辑",
       currentPage: 1,
       // 修改用
-      formValue1: {
-        name: "",
-        address: "",
-        date: "",
-      },
-      formList1: [
-        {
-          type: "input",
-          prop: "name",
-          label: "姓名:",
-        },
-        {
-          type: "input",
-          prop: "address",
-          label: "地址:",
-        },
-        {
-          type: "input",
-          prop: "date",
-          label: "时间:",
-        },
-        {
-          type: "richText",
-          prop: "richText",
-          label: "正文:",
-        },
-      ],
-      formInline: {
-        user: "",
-        region: "",
-      },
+      // formValue1: {
+      //   name: "",
+      //   address: "",
+      //   date: "",
+      // },
+      // formList1: [
+      //   {
+      //     type: "input",
+      //     prop: "name",
+      //     label: "姓名:",
+      //   },
+      //   {
+      //     type: "input",
+      //     prop: "address",
+      //     label: "地址:",
+      //   },
+      //   {
+      //     type: "input",
+      //     prop: "date",
+      //     label: "时间:",
+      //   },
+      //   {
+      //     type: "richText",
+      //     prop: "richText",
+      //     label: "正文:",
+      //   },
+      // ],
+      // formInline: {
+      //   user: "",
+      //   region: "",
+      // },
     };
   },
 
@@ -212,10 +227,8 @@ export default {
     search(data) {
       console.log(data, "搜索的数据");
     },
-    edit(data) {
-      console.log(data, "改");
+    edit() {
       this.title = "编辑";
-      this.formValue1 = { ...this.formValue1, ...data };
       this.dialogFormVisible = !this.dialogFormVisible;
     },
     add() {

+ 7 - 7
src/pages/order-manage/order-list/index.vue

@@ -109,6 +109,11 @@ export default {
         date: "",
       },
       formList1: [
+        {
+          type: "input",
+          prop: "date",
+          label: "时间:",
+        },
         {
           type: "input",
           prop: "name",
@@ -119,11 +124,7 @@ export default {
           prop: "address",
           label: "地址:",
         },
-        {
-          type: "input",
-          prop: "date",
-          label: "时间:",
-        },
+
         {
           type: "richText",
           prop: "richText",
@@ -181,8 +182,7 @@ export default {
     },
     edit(data) {
       this.title = "编辑";
-      console.log(data, "改");
-      this.formValue1 = { ...this.formValue1, ...data };
+      this.formValue1 = data
       this.dialogFormVisible = !this.dialogFormVisible;
     },
     add() {

+ 32 - 1
src/pages/order-manage/return-goods/index.vue

@@ -3,6 +3,8 @@
     <pub-all
       :formValue="formValue"
       :formList="formList"
+      :formValue1="formValue1"
+      :formList1="formList1"
       :exportFlag="true"
       :tableConfigArr="tableConfigArr"
       :hasIndex="true"
@@ -79,6 +81,34 @@ export default {
         },
       ],
 
+      formValue1: {
+        name: "",
+        address: "",
+        date: "",
+      },
+      formList1: [
+        {
+          type: "input",
+          prop: "name",
+          label: "姓名:",
+        },
+        {
+          type: "input",
+          prop: "phone",
+          label: "电话:",
+        },
+        {
+          type: "input",
+          prop: "address",
+          label: "地址:",
+        },
+        {
+          type: "richText",
+          prop: "richText",
+          label: "正文:",
+        },
+      ],
+
       tableConfigArr: [
         {
           prop: "name",
@@ -218,7 +248,8 @@ export default {
   },
   methods: {
     edit(data) {
-      this.$refs.puball.edit(data);
+      this.formValue1 = data
+      this.$refs.puball.edit();
     },
     handleClose() {
       this.dialogFormVisible = !this.dialogFormVisible;