|
|
@@ -16,26 +16,38 @@
|
|
|
:loading="loading"
|
|
|
>
|
|
|
<template slot="1" slot-scope="props">
|
|
|
+ <p>协议编号:{{ props.scope.row.covenantNum }}</p>
|
|
|
+ <p>业务员:{{ props.scope.row.saleName || '--' }}</p>
|
|
|
+ <p>业务号:{{ props.scope.row.saleNum || '--' }}</p>
|
|
|
<p>
|
|
|
- 协议编号:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}
|
|
|
+ 申请时间:{{ $methodsTools.onlyForma(props.scope.row.startTime) }}
|
|
|
</p>
|
|
|
- <p>业务员:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}</p>
|
|
|
- <p>业务号:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}</p>
|
|
|
- <p>申请时间:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}</p>
|
|
|
<p>
|
|
|
- 协议时效:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}
|
|
|
+ 协议时效:{{
|
|
|
+ $methodsTools.onlyForma(props.scope.row.startTime, false) +
|
|
|
+ " - " +
|
|
|
+ $methodsTools.onlyForma(props.scope.row.endTime, false)
|
|
|
+ }}
|
|
|
</p>
|
|
|
<p>
|
|
|
- 协议状态:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}
|
|
|
+ 终止状态:{{ getStatus(props.scope.row.stopStatus) }}
|
|
|
</p></template
|
|
|
- ><template slot="2" slot-scope="props">
|
|
|
- <p>甲方:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}</p>
|
|
|
- <p>地址:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}</p>
|
|
|
- <p>联系人:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}</p>
|
|
|
- <p>
|
|
|
- 电话:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}
|
|
|
- </p></template
|
|
|
- ><template slot="3" slot-scope="props"> xxx</template
|
|
|
+ >
|
|
|
+ <template slot="2" slot-scope="props">
|
|
|
+ <p>甲方:{{ props.scope.row.jiaCompanyName }}</p>
|
|
|
+ <p>地址:{{ props.scope.row.jiaCompanyAddress }}</p>
|
|
|
+ <p>联系人:{{ props.scope.row.jiaCompanyContract }}</p>
|
|
|
+ <p>电话:{{ props.scope.row.jiaCompanyPhone }}</p></template
|
|
|
+ >
|
|
|
+ <template slot="3" slot-scope="props">
|
|
|
+ <li
|
|
|
+ v-for="(item, index) in relectArray(
|
|
|
+ props.scope.row.bsCovenantBusinessVos
|
|
|
+ )"
|
|
|
+ :key="index"
|
|
|
+ >
|
|
|
+ {{ item }}
|
|
|
+ </li></template
|
|
|
><template slot="4" slot-scope="props">
|
|
|
<p>周期:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}</p>
|
|
|
<p>
|
|
|
@@ -54,10 +66,17 @@
|
|
|
<p>已开票:xxx</p>
|
|
|
<p>待开票:xxx</p></template
|
|
|
><template slot="btn" slot-scope="props"
|
|
|
- ><el-button type="text">协议详情</el-button>
|
|
|
- <el-button type="text"
|
|
|
- >协议审核</el-button
|
|
|
+ ><el-button type="text" @click="XY(3, 3, props.scope.row)"
|
|
|
+ >协议详情</el-button
|
|
|
+ >
|
|
|
+ <el-button type="text">关联订单</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :disabled="!props.scope.row.covenantImg"
|
|
|
+ @click="sealAgre(props.scope.row.covenantImg)"
|
|
|
+ >盖章协议</el-button
|
|
|
>
|
|
|
+ <el-button type="text" :disabled="props.scope.row.stopStatus !== 1" @click="cancelXY(props.scope.row)">取消终止</el-button>
|
|
|
</template>
|
|
|
</table-list>
|
|
|
<pagination
|
|
|
@@ -67,16 +86,26 @@
|
|
|
@handleSizeChange="handleSizeChange"
|
|
|
@handleCurrentChange="handleCurrentChange"
|
|
|
/>
|
|
|
+ <agreeDialog ref="agreeDialog" @search="search(2)"></agreeDialog>
|
|
|
+ <el-image
|
|
|
+ style="display: none"
|
|
|
+ :src="imgList[0]"
|
|
|
+ :preview-src-list="imgList"
|
|
|
+ ref="el_image"
|
|
|
+ >
|
|
|
+ </el-image>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script>
|
|
|
+import { formatPrice } from "@/directive/filter";
|
|
|
+import agreeDialog from "../components/agreeDialog";
|
|
|
import searchBoxNew from "@/components/searchBoxNew";
|
|
|
import tableList from "@/components/tableList";
|
|
|
import pagination from "@/components/pagination";
|
|
|
export default {
|
|
|
name: "",
|
|
|
- components: { searchBoxNew, tableList, pagination },
|
|
|
+ components: { agreeDialog, searchBoxNew, tableList, pagination },
|
|
|
data() {
|
|
|
return {
|
|
|
disabledBtn: false,
|
|
|
@@ -98,20 +127,20 @@ export default {
|
|
|
//搜索
|
|
|
formList: [
|
|
|
{
|
|
|
- prop: "cwStatus",
|
|
|
+ prop: "stopStatus",
|
|
|
placeholder: "终止状态",
|
|
|
scope: "select",
|
|
|
noClear: false,
|
|
|
options: [
|
|
|
{ label: "审核中", value: 1 },
|
|
|
- { label: "不通过", value: 2 },
|
|
|
- { label: "已终止", value: 3 },
|
|
|
- { label: "已取消", value: 4 },
|
|
|
+ { label: "不通过", value: 3 },
|
|
|
+ { label: "已终止", value: 4 },
|
|
|
+ { label: "已取消", value: 5 },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
lable: "",
|
|
|
- prop: "sellerName",
|
|
|
+ prop: "searchKey",
|
|
|
placeholder: "输入协议编号/甲方姓名/业务员/业务号",
|
|
|
},
|
|
|
],
|
|
|
@@ -178,12 +207,90 @@ export default {
|
|
|
],
|
|
|
tableData: [], //表单数据
|
|
|
total: 0, //一共多少条
|
|
|
+ imgList: [
|
|
|
+ "https://file-dev.xyyxt.net/oss/images/file/20230710/1688974188358.png",
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ getStatus(i) {
|
|
|
+ let str = "";
|
|
|
+ switch (i) {
|
|
|
+ case 1:
|
|
|
+ str = "待审核";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ str = "审核通过";
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ str = "审核不通过";
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ str = "已终止";
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ str = "已取消";
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ },
|
|
|
+ //取消终止
|
|
|
+ cancelXY(row) {
|
|
|
+ this.$confirm("确定取消终止吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$api
|
|
|
+ .bsCovenantCancelStopStatus({
|
|
|
+ covenantId: row.covenantId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ sealAgre(imgStr) {
|
|
|
+ if (!imgStr) return;
|
|
|
+ let ary = imgStr.split(",");
|
|
|
+ this.imgList = ary.map((i) => this.$methodsTools.splitImgHost(i)) || [];
|
|
|
+ this.$refs.el_image.$el.children[0].click();
|
|
|
+ },
|
|
|
+ XY(index, type, item = {}) {
|
|
|
+ let data = JSON.parse(JSON.stringify(item));
|
|
|
+ this.$refs.agreeDialog.openBoxs(index, type, data);
|
|
|
+ },
|
|
|
+ relectArray(array) {
|
|
|
+ if (array && array.length > 0) {
|
|
|
+ let ary = [];
|
|
|
+ array.forEach((i) => {
|
|
|
+ let a = i.bsCovenantGoodsVos.map((k) => {
|
|
|
+ return `${i.educationTypeName}/${i.businessName + i.projectName}/${
|
|
|
+ k.goodsName
|
|
|
+ }/¥${formatPrice(k.covenantPrice)}/${
|
|
|
+ k.limitStatus == 1 ? "不限" : k.limitNum
|
|
|
+ }`;
|
|
|
+ });
|
|
|
+ ary.push(...a);
|
|
|
+ });
|
|
|
+ if (ary.length > 5) {
|
|
|
+ ary = ary.splice(0, 5);
|
|
|
+ ary.push("等5项");
|
|
|
+ }
|
|
|
+ return ary || [];
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ },
|
|
|
search(v) {
|
|
|
this.loading = true;
|
|
|
if (v === 2) {
|