Kaynağa Gözat

客戶信息

MS-QJVSRANLTYEO\Administrator 4 yıl önce
ebeveyn
işleme
a0db921487

+ 37 - 12
Yijia-SaaS/yijia-ui/src/views/customer/manage/index.vue

@@ -133,7 +133,6 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
     <!-- 添加或修改客户管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -242,7 +241,8 @@
         :total="totalOrder"
         :page.sync="queryOrder.pageNum"
         :limit.sync="queryOrder.pageSize"
-        @pagination="lookinfo"
+        @size-change='handleSizeChange'
+        @current-change='handleCurrentChange'
       />
     </el-dialog>
   </div>
@@ -307,6 +307,7 @@ export default {
       },
       // 表单参数
       form: {},
+      row: {},
       // 表单校验
       rules: {
       }
@@ -415,16 +416,40 @@ export default {
       });
     },
     lookinfo(row){
-      const id = row.id || this.ids
-      this.queryOrder.oilName=row.oilName;
-      this.queryOrder.stationId=row.stationId;
-      getOrderInfo(this.queryOrder).then(response => {
-        this.orderList = response.rows;
-        this.openOrderInfo = true;
-        this.totalOrderInfo = response.total;
-        this.titleOrderInfo = "查看客户订单信息";
-        this.loading = false;
-      });
+      console.log("this.queryOrder.oilName:",row);
+      if(row !=null){
+        const id = row.id || this.ids
+        this.queryOrder.oilName=row.oilName;
+        this.queryOrder.stationId=row.stationId;
+        this.row =row;
+        getOrderInfo(this.queryOrder).then(response => {
+          this.orderList = response.rows;
+          this.openOrderInfo = true;
+          this.totalOrder = response.total;
+          this.titleOrderInfo = "查看客户订单信息";
+          this.loading = false;
+        });
+      }else{
+        this.queryOrder.oilName=this.row.oilName;
+        this.queryOrder.stationId=this.row.stationId;
+        console.log("this.queryOrder.oilName:",this.queryOrder.oilName);
+        console.log("this.queryOrder.stationId:",this.queryOrder.stationId);
+        getOrderInfo(this.queryOrder).then(response => {
+          this.orderList = response.rows;
+          this.openOrderInfo = true;
+          this.totalOrder = response.total;
+          this.titleOrderInfo = "查看客户订单信息";
+          this.loading = false;
+        });
+      }
+    },
+    handleSizeChange(val){
+      this.queryOrder.pagesize = val;
+      this.lookinfo();
+    },
+    handleCurrentChange(val){
+      this.queryOrder.pagenum = val;
+      this.lookinfo();
     },
     /** 提交按钮 */
     submitForm() {