|
@@ -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
|
|
|
>
|
|
|
+
|
|
|
+ <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
|
|
|
+ >
|
|
|
<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);
|