|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div id="ActivityList">
|
|
|
<el-radio-group
|
|
|
- v-model="radio1"
|
|
|
+ v-model="type"
|
|
|
@change="changeSearch"
|
|
|
style="margin-bottom: 10px"
|
|
|
>
|
|
@@ -17,7 +17,7 @@
|
|
|
@init="init"
|
|
|
/>
|
|
|
<table-list
|
|
|
- :key="radio1"
|
|
|
+ :key="type"
|
|
|
rowKey="id"
|
|
|
ref="tableList"
|
|
|
@openDialog="openDialog"
|
|
@@ -29,13 +29,27 @@
|
|
|
<template slot="customize">
|
|
|
<el-button @click="batchExport" type="primary"> 导出excel </el-button>
|
|
|
</template>
|
|
|
- <template slot="pcost" slot-scope="props">
|
|
|
- <div>税收:40%</div>
|
|
|
- <div>税收:40%</div>
|
|
|
+ <template slot="predictPayTime" slot-scope="props">
|
|
|
+ <span v-if="props.scope.row.creditStatus == 1">已结清</span>
|
|
|
+ <span style="color: red" v-else>
|
|
|
+ {{ $methodsTools.onlyForma(props.scope.row.predictPayTime) || "--" }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
- <template slot="fcost" slot-scope="props">
|
|
|
- <div>税收:40</div>
|
|
|
- <div>税收:40</div>
|
|
|
+ <template slot="noteType" slot-scope="props">
|
|
|
+ <div v-if="!props.scope.row.noteId || props.scope.row.noteType == 1">
|
|
|
+ --
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div :class="'tip' + props.scope.row.noteType">
|
|
|
+ <span v-for="(text, idx) in backText(props.scope.row)" :key="idx">
|
|
|
+ <span v-if="props.scope.row.noteType == 3">周</span>
|
|
|
+ {{ text }}
|
|
|
+ <span v-if="props.scope.row.noteType == 4">日</span>
|
|
|
+ <i></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div>{{ props.scope.row.dayTime }}</div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template slot="status" slot-scope="props">
|
|
|
<el-checkbox
|
|
@@ -44,7 +58,11 @@
|
|
|
></el-checkbox>
|
|
|
</template>
|
|
|
<template slot="btn" slot-scope="props">
|
|
|
- <el-button type="text" :disabled="false" @click="handelClick">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :disabled="props.scope.row.creditStatus == 1"
|
|
|
+ @click="handelClick(props.scope.row)"
|
|
|
+ >
|
|
|
催款提醒
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -55,7 +73,11 @@
|
|
|
:currentPage.sync="formData.pageNum"
|
|
|
@search="search"
|
|
|
/>
|
|
|
- <dislog-tip :dialogVisible.sync="dialogVisible"></dislog-tip>
|
|
|
+ <dislog-tip
|
|
|
+ :dialogVisible.sync="dialogVisible"
|
|
|
+ :orderInfo="activeOrderInfo"
|
|
|
+ @search="search"
|
|
|
+ ></dislog-tip>
|
|
|
<dislogOrderDetails
|
|
|
:dialogVisible.sync="orderDialogVisible"
|
|
|
></dislogOrderDetails>
|
|
@@ -68,6 +90,8 @@ import tableList from "@/components/tableList";
|
|
|
import pagination from "@/components/pagination";
|
|
|
import dislogTip from "./dislogTip.vue";
|
|
|
import dislogOrderDetails from "../components/dislogOrderDetails.vue";
|
|
|
+import * as baseUrls from "@/utils/request.js";
|
|
|
+import { orderList, orderExport } from "@/api/financed/index";
|
|
|
export default {
|
|
|
name: "cost",
|
|
|
components: {
|
|
@@ -85,15 +109,11 @@ export default {
|
|
|
index: 0,
|
|
|
ch: "条",
|
|
|
num: true,
|
|
|
- choice: true,
|
|
|
+ choice: false,
|
|
|
addHide: true,
|
|
|
openCheckMore: true,
|
|
|
changeWidth: "160px",
|
|
|
custom: false,
|
|
|
- backFatherBtn: {
|
|
|
- status: false,
|
|
|
- title: "配置下单填选模板",
|
|
|
- },
|
|
|
},
|
|
|
formData: {
|
|
|
pageSize: 10,
|
|
@@ -103,64 +123,67 @@ export default {
|
|
|
tableSet1: [
|
|
|
{
|
|
|
label: "下单时间",
|
|
|
- prop: "startTime",
|
|
|
+ prop: "buyTime",
|
|
|
hidden: true,
|
|
|
scope: "aTimeList",
|
|
|
},
|
|
|
{
|
|
|
label: "订单单号",
|
|
|
- prop: "name",
|
|
|
+ prop: "orderSn",
|
|
|
hidden: true,
|
|
|
scope: "openDialog",
|
|
|
},
|
|
|
{
|
|
|
label: "机构名称",
|
|
|
- prop: "name",
|
|
|
+ prop: "tenantName",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "业务员",
|
|
|
- prop: "name",
|
|
|
+ prop: "createUsername",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "业务号",
|
|
|
- prop: "name",
|
|
|
+ prop: "createNo",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "合同金额(元)",
|
|
|
- prop: "name",
|
|
|
+ prop: "orderPrice",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "已收账款(元)",
|
|
|
- prop: "name",
|
|
|
+ prop: "orderReceived",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "未收账款(元)",
|
|
|
- prop: "name",
|
|
|
+ prop: "orderUncollected",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "预收时间",
|
|
|
- prop: "name",
|
|
|
hidden: true,
|
|
|
+ scope: "solt",
|
|
|
+ soltName: "predictPayTime",
|
|
|
},
|
|
|
{
|
|
|
label: "剩余天数",
|
|
|
- prop: "name",
|
|
|
+ prop: "predictPayTime",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "提醒设置",
|
|
|
- prop: "name",
|
|
|
+ prop: "noteType",
|
|
|
+ scope: "solt",
|
|
|
+ soltName: "noteType",
|
|
|
hidden: true,
|
|
|
},
|
|
|
{
|
|
|
label: "最新提醒",
|
|
|
- prop: "posterTempName",
|
|
|
+ prop: "lastTime",
|
|
|
hidden: true,
|
|
|
},
|
|
|
],
|
|
@@ -258,47 +281,54 @@ export default {
|
|
|
tableData: [], //表单数据
|
|
|
total: 0, //一共多少条
|
|
|
dialogVisible: false,
|
|
|
- orderDialogVisible: true,
|
|
|
- radio1: 1,
|
|
|
+ orderDialogVisible: false,
|
|
|
+ type: 1,
|
|
|
+ activeOrderInfo: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.search();
|
|
|
+ this.search(2);
|
|
|
},
|
|
|
methods: {
|
|
|
openDialog(data) {
|
|
|
console.log(data);
|
|
|
},
|
|
|
batchExport() {
|
|
|
- let len = this.$refs.tableList.allCheckData.length;
|
|
|
- if (!len) {
|
|
|
- return this.$message.warning("请先勾应收应付");
|
|
|
+ orderExport(this.backData()).then((res) => {
|
|
|
+ if (res.msg) {
|
|
|
+ let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let fileName = "导出应收应付数据" + ".xlsx";
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.href = url;
|
|
|
+ link.dowmload = fileName;
|
|
|
+ link.click();
|
|
|
+ link.remove();
|
|
|
+ this.$message.success("导出成功");
|
|
|
+ } else {
|
|
|
+ this.$message.error("导出失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ backText(row) {
|
|
|
+ const type = row.noteType;
|
|
|
+ if (type == 2) {
|
|
|
+ return ["每天"];
|
|
|
}
|
|
|
- const ids = this.$refs.tableList.allCheckData.map((item) => item.id);
|
|
|
+ const key = ["weekTime", "monthTime"][type - 3];
|
|
|
+ let data = row[key].split(",").sort((a, b) => a - b);
|
|
|
+ return data;
|
|
|
},
|
|
|
changeSearch() {
|
|
|
this.init();
|
|
|
},
|
|
|
- handelClick() {
|
|
|
+ handelClick(row) {
|
|
|
+ console.log(row);
|
|
|
+ this.activeOrderInfo = row;
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
|
- search(v) {
|
|
|
- this.loading = true;
|
|
|
- if (v === 2) {
|
|
|
- this.formData = {
|
|
|
- pageSize: 10,
|
|
|
- pageNum: 1,
|
|
|
- };
|
|
|
- }
|
|
|
- var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
- // if (this.formData.classStartTime) {
|
|
|
- // data.classStartTime = parseInt(data.classStartTime / 1000);
|
|
|
- // }
|
|
|
- // if (this.formData.classEndTime) {
|
|
|
- // data.classEndTime = parseInt(data.classEndTime / 1000);
|
|
|
- // }
|
|
|
- this.$api
|
|
|
- .distributiontemplist(data)
|
|
|
+ orderList(data) {
|
|
|
+ orderList(data)
|
|
|
.then((res) => {
|
|
|
this.tableData = res.rows;
|
|
|
this.total = res.total;
|
|
@@ -308,60 +338,85 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ search(v) {
|
|
|
+ this.loading = true;
|
|
|
+ if (v === 2) {
|
|
|
+ this.formData = {
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ [this.orderList, this.orderList, this.orderList][this.type](
|
|
|
+ this.backData()
|
|
|
+ );
|
|
|
+ },
|
|
|
+ backData() {
|
|
|
+ let data = this.formData;
|
|
|
+ let { startTime, endTime } = this.formData;
|
|
|
+ if (startTime || endTime) {
|
|
|
+ data = JSON.parse(JSON.stringify(this.formData));
|
|
|
+ if (startTime) {
|
|
|
+ data.startTime = parseInt(startTime / 1000);
|
|
|
+ }
|
|
|
+ if (endTime) {
|
|
|
+ data.endTime = parseInt(endTime / 1000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
init() {
|
|
|
this.search(2);
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
tableSet() {
|
|
|
- return this["tableSet" + this.radio1];
|
|
|
+ return this["tableSet" + this.type];
|
|
|
},
|
|
|
formList() {
|
|
|
let data = [
|
|
|
{
|
|
|
- prop: "status1",
|
|
|
+ prop: "creditStatus",
|
|
|
placeholder: "账款状态",
|
|
|
scope: "select",
|
|
|
options: [
|
|
|
- { label: "不限", value: 2 },
|
|
|
{ label: "已结清", value: 1 },
|
|
|
{ label: "未结清", value: 0 },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
- prop1: "classStartTime",
|
|
|
- prop2: "classEndTime",
|
|
|
+ prop1: "startTime",
|
|
|
+ prop2: "endTime",
|
|
|
placeholder1: "开始时间",
|
|
|
placeholder2: "结束时间",
|
|
|
scope: "moreDataPicker",
|
|
|
},
|
|
|
];
|
|
|
- if (this.radio1 != 1) {
|
|
|
+ if (this.type != 1) {
|
|
|
data.unshift(
|
|
|
{
|
|
|
prop: "status1",
|
|
|
placeholder: "角色选择",
|
|
|
scope: "select",
|
|
|
options: [
|
|
|
- { label: "不限", value: 2 },
|
|
|
{ label: "已结清", value: 1 },
|
|
|
{ label: "未结清", value: 0 },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
- prop: "status1",
|
|
|
+ prop: "checkStatus",
|
|
|
placeholder: "审核状态",
|
|
|
scope: "select",
|
|
|
options: [
|
|
|
- { label: "不限", value: 2 },
|
|
|
- { label: "已结清", value: 1 },
|
|
|
- { label: "未结清", value: 0 },
|
|
|
+ { label: "待审核", value: 0 },
|
|
|
+ { label: "已通过", value: 1 },
|
|
|
+ { label: "未通过", value: 2 },
|
|
|
+ { label: "已撤销", value: 3 },
|
|
|
],
|
|
|
}
|
|
|
);
|
|
|
} else {
|
|
|
data.push({
|
|
|
- prop: "name",
|
|
|
+ prop: "keyNo",
|
|
|
placeholder: "机构/业务号",
|
|
|
});
|
|
|
}
|
|
@@ -371,4 +426,12 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.tip4,
|
|
|
+.tip3 {
|
|
|
+ white-space: normal;
|
|
|
+ i::before {
|
|
|
+ content: ",";
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|