浏览代码

修改结算菜单

plg 5 月之前
父节点
当前提交
b865996202

+ 31 - 19
src/views/manage/channelInfo/orderSettlement.vue

@@ -38,19 +38,20 @@
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
         >
-          <el-table-column prop="channelId" label="渠道Id" align="center" width="">
+          <el-table-column prop="channelName" label="渠道" align="center" width="">
           </el-table-column>
           <el-table-column prop="title" label="标题" align="center" width="">
           </el-table-column>
+          <el-table-column prop="amount" label="金额" align="center" width="">
+          </el-table-column>
           <el-table-column
-            prop="amount"
-            label="金额"
+            prop="status"
+            label="状态"
             align="center"
             width=""
+            :formatter="formatterOrder"
           >
           </el-table-column>
-          <el-table-column prop="status" label="状态" align="center" width="" :formatter="formatterOrder">
-          </el-table-column>
           <!-- <el-table-column
             prop="rechargeCount"
             label="累计充值次数"
@@ -58,10 +59,16 @@
             width=""
           >
           </el-table-column> -->
-          <el-table-column prop="effectiveDate" label="类型" align="center" width="">
+          <el-table-column
+            prop="type"
+            label="类型"
+            align="center"
+            width=""
+            :formatter="formatterType"
+          >
           </el-table-column>
           <el-table-column
-            prop="expirationDate"
+            prop="effectiveDate"
             label="订单日期起"
             align="center"
             width=""
@@ -75,12 +82,7 @@
           >
           </el-table-column>
 
-          <el-table-column
-            prop="createDate"
-            label="创建时间"
-            align="center"
-            width=""
-          >
+          <el-table-column prop="createDate" label="创建时间" align="center" width="">
           </el-table-column>
 
           <!-- <el-table-column
@@ -327,11 +329,21 @@ export default {
     this.searchTarget();
   },
   methods: {
-    formatterOrder(row){
-      if(row.status=='1'){
-        return '已结算'
-      }else{
-        return '待结算'
+    //格式化类型
+    formatterType(row) {
+      if (row.type == "1") {
+        return "次卡支付";
+      } else if (row.type == "2") {
+        return "时效卡";
+      } else if (row.type == "3") {
+        return "渠道推荐支付";
+      }
+    },
+    formatterOrder(row) {
+      if (row.status == "1") {
+        return "已结算";
+      } else {
+        return "待结算";
       }
     },
     //充值次数
@@ -467,7 +479,7 @@ export default {
       this.$http.post(`/order/find`, data, (res) => {
         // console.log(res,'用户测试记录')
         if (res && res.code == 200) {
-          this.tableData = res.data.content;
+          this.tableData = res.data.data;
           this.total = res.data.totalElements;
         } else {
           // this.$toast.fail(res.msg);

+ 0 - 12
src/views/manage/interfacePrice/productPrice.vue

@@ -2,14 +2,6 @@
   <div class="record-warp">
     <div class="record-main">
       <el-row>
-        <!-- <el-col :span="24">
-              <div class="search-head">
-                <span>公司名称:</span>
-                <el-input v-model="name" clearable placeholder="请输入公司名称"></el-input>&nbsp;&nbsp;&nbsp;&nbsp;
-                <el-button type="primary" icon="el-icon-search" @click="searchTarget">搜索</el-button>
-                <el-button type="primary" icon="el-icon-delete-solid" @click="clearSearch">清空</el-button>
-              </div>
-            </el-col> -->
       </el-row>
       <el-row class="add_user_class">
         <el-col :span="24">
@@ -258,11 +250,7 @@ export default {
           //     message: '已取消删除'
           //   });
         });
-      //获取id的集合
-      //   let ids=[]
-      //   for(let i){
 
-      //   }
     },
     handleSelectionChange(val) {
       this.multipleSelection = val;

+ 75 - 10
src/views/manage/orderManage/orderSettlementManage.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="record-warp">
-    <div>正确认结算流程,正在努力开发</div>
-    <div class="record-main" v-show="false">
-        <el-row>
+    <!-- <div>正确认结算流程,正在努力开发</div> -->
+    <div class="record-main" v-show="true">
+      <el-row>
         <el-col :span="24">
           <div class="search-head">
             <span>渠道:</span>
@@ -14,15 +14,31 @@
                 :key="item.id"
               ></el-option> </el-select
             >&nbsp;&nbsp;&nbsp;&nbsp;
+           
+        <span class="margin_search">渠道结清状态:</span>
+        <el-select class="margin_search" v-model="status" placeholder="请选择结清状态">
+          <el-option
+            :label="item.name"
+            :value="item.id"
+            v-for="item in statusList"
+            :key="item.id"
+          ></el-option> </el-select
+        > &nbsp;&nbsp;&nbsp;&nbsp;
             <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
               >搜索</el-button
             >
-            <el-button type="info" round icon="el-icon-delete-solid" @click="clearSearch"
+            <el-button type="info" style="text-align:right" round icon="el-icon-delete-solid" @click="clearSearch"
               >清空</el-button
             >
-            <!-- <el-button type="info" round icon="el-icon-search" @click="searchTarget"
+            <el-button
+              type="success"
+              class="add_class"
+              icon="el-icon-document-checked"
+              round
+              :disabled="multipleSelection.length==0"
+              @click="squareFun"
               >结清</el-button
-            > -->
+            >
           </div>
         </el-col>
       </el-row>
@@ -31,8 +47,11 @@
           :data="tableData"
           :row-style="{ height: '0px' }"
           :cell-style="{ padding: '5px' }"
+              @selection-change="handleSelectionChange"
         >
-          <el-table-column prop="channelId" label="渠道Id" align="center" width="">
+        <el-table-column type="selection" align="center" width="" show-overflow-tooltip>
+        </el-table-column>
+          <el-table-column prop="channelName" label="渠道" align="center" width="">
           </el-table-column>
           <el-table-column prop="title" label="标题" align="center" width="">
           </el-table-column>
@@ -65,7 +84,6 @@
 
           <el-table-column prop="createDate" label="创建时间" align="center" width="">
           </el-table-column>
-
         </el-table>
       </div>
 
@@ -202,6 +220,7 @@ export default {
   },
   data() {
     return {
+      status:'',
       centerDialogVisible: false,
       editUserFlag: false,
       startTime: "",
@@ -230,6 +249,11 @@ export default {
       detailObj: {},
       channel: "",
       channelList: [{ name: "渠道天成", id: "1" }],
+      multipleSelection:[],
+      statusList: [
+        { name: "已结算", id: "1" },
+        { name: "待结算", id: "0" },
+      ],
     };
   },
   created() {},
@@ -264,6 +288,45 @@ export default {
     this.searchTarget();
   },
   methods: {
+    //结算
+    squareFun() {
+      let that = this;
+      let ids = [];
+      
+      for (let i = 0; i < this.multipleSelection.length; i++) {
+        ids.push(this.multipleSelection[i].id);
+      }
+
+      this.$confirm("此操作将结算, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          that.squarePrice(ids);
+        })
+        .catch(() => {
+          //   this.$message({
+          //     type: 'info',
+          //     message: '已取消删除'
+          //   });
+        });
+
+    },
+    squarePrice(ids) {
+      this.$http.post(`/order/settle`, ids, (res) => {
+        //  this.$toast.success({message:'成功'});
+        if (res && res.code == 200) {
+          this.$message.success("结算成功");
+          this.searchTarget();
+        } else {
+          this.$message.error("结算失败");
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
     formatterOrder(row) {
       if (row.status == "1") {
         return "已结算";
@@ -345,6 +408,7 @@ export default {
     },
     clearSearch() {
       this.channel = "";
+      this.status = "";
       this.searchTarget();
     },
     formatterRole(val) {
@@ -392,19 +456,20 @@ export default {
         data = {
           pageNum: this.pageNum,
           pageSize: this.pageSize,
+          status:this.status,
         };
       } else {
         data = {
           pageNum: this.pageNum,
           pageSize: this.pageSize,
           channelId: this.channel,
+          status:this.status
         };
       }
       this.$http.post(`/order/find`, data, (res) => {
-        debugger;
         // console.log(res,'用户测试记录')
         if (res && res.code == 200) {
-          this.tableData = res.data.content;
+          this.tableData = res.data.data;
           this.total = res.data.totalElements;
         } else {
           // this.$toast.fail(res.msg);

+ 1 - 1
src/views/manage/orderManage/userOrder.vue

@@ -503,7 +503,7 @@ export default {
       this.$http.post(`/order/find`, data, (res) => {
         // console.log(res,'用户测试记录')
         if (res && res.code == 200) {
-          this.tableData = res.data.content;
+          this.tableData = res.data.data;
           this.total = res.data.totalElements;
         } else {
           // this.$toast.fail(res.msg);