En route hai 1 ano
pai
achega
a360706bb8

+ 4 - 1
README.md

@@ -22,4 +22,7 @@ npm run build:stage
 
 # 构建生产环境
 npm run build:prod
-```
+```
+
+node版本14.15.3
+npm版本6.14.9

+ 3 - 3
src/newApi/agreement.js

@@ -1,9 +1,9 @@
 import request from '@/utils/request' //引入axios请求及拦截器
 export default {
-    //新增、修改乙方协议信息
-    systemTenantInfoInsertOrUpdate(data) {
+    //新增乙方协议信息
+    bsCovenantInsertYiInfo(data) {
         return request({
-            url: '/system/tenantInfo/insertOrUpdate',
+            url: '/bs/covenant/insertYiInfo',
             method: 'post',
             data
         })

+ 2 - 2
src/utils/request.js

@@ -8,8 +8,8 @@ import { paramMate } from "@/utils/common";
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-export const baseURL = process.env.VUE_APP_BASE_API
-// export const baseURL = 'http://192.168.1.34:5030/'
+// export const baseURL = process.env.VUE_APP_BASE_API
+export const baseURL = 'http://192.168.1.24:5030/'
 // export const baseURL = 'https://cloud.xyyxt.net/'
 
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API

+ 63 - 10
src/views/agreement/agreementReview/index.vue

@@ -22,16 +22,32 @@
       :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.startTime) }}
+        </p>
+        <p>
+          协议时效:{{
+            $methodsTools.onlyForma(props.scope.row.startTime, false) +
+            " - " +
+            $methodsTools.onlyForma(props.scope.row.endTime, false)
+          }}
+        </p>
+        <p>审核状态:{{ getStatus(props.scope.row.status) }}</p></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="2" slot-scope="props">
+      ><template slot="3" slot-scope="props">
         <p>乙方:{{ props.scope.row.yiCompanyName }}</p>
         <p>地址:{{ props.scope.row.yiCompanyAddress }}</p>
         <p>联系人:{{ props.scope.row.yiCompanyContract }}</p>
         <p>电话:{{ props.scope.row.yiCompanyPhone }}</p></template
-      ><template slot="3" slot-scope="props">
+      ><template slot="4" slot-scope="props">
         <li
           v-for="(item, index) in relectArray(
             props.scope.row.bsCovenantBusinessVos
@@ -40,7 +56,7 @@
         >
           {{ item }}
         </li></template
-      ><template slot="4" slot-scope="props">
+      ><template slot="5" slot-scope="props">
         <p>周期(月):{{ props.scope.row.settlementCycle }}</p>
         <p>金额:¥{{ props.scope.row.limitAmount | formatPrice }}</p></template
       ><template slot="btn" slot-scope="props"
@@ -114,19 +130,19 @@ export default {
       //搜索
       formList: [
         {
-          prop: "cwStatus",
+          prop: "status",
           placeholder: "审核状态",
           scope: "select",
           noClear: false,
           options: [
             { label: "待审核", value: 1 },
             { label: "已通过", value: 2 },
-            { label: "不通过", value: 3 },
+            { label: "不通过", value: 4 },
           ],
         },
         {
           lable: "",
-          prop: "sellerName",
+          prop: "searchKey",
           placeholder: "输入协议编号/甲方姓名/业务员/业务号",
         },
       ],
@@ -137,33 +153,40 @@ export default {
       // 表单
       tableSet: [
         {
-          label: "甲方信息",
+          label: "协议记录",
           hidden: true,
           scope: "slot",
           slotName: "1",
           dontCenter: true,
         },
         {
-          label: "方信息",
+          label: "方信息",
           hidden: true,
           scope: "slot",
           slotName: "2",
           dontCenter: true,
         },
         {
-          label: "协议项目(教育类型/业务层次/商品名称/单价/上限数量)",
+          label: "乙方信息",
           hidden: true,
           scope: "slot",
           slotName: "3",
           dontCenter: true,
         },
         {
-          label: "结算信息",
+          label: "协议项目(教育类型/业务层次/商品名称/单价/上限数量)",
           hidden: true,
           scope: "slot",
           slotName: "4",
           dontCenter: true,
         },
+        {
+          label: "结算信息",
+          hidden: true,
+          scope: "slot",
+          slotName: "5",
+          dontCenter: true,
+        },
         {
           label: "审核意见",
           prop: "cwSn",
@@ -178,6 +201,36 @@ export default {
     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;
+        case 6:
+          str = "已过期";
+          break;
+        case 7:
+          str = "已终止";
+          break;
+
+        default:
+          break;
+      }
+      return str;
+    },
     relectArray(array) {
       if (array && array.length > 0) {
         let ary = [];

+ 33 - 17
src/views/agreement/collectionInformation/index.vue

@@ -7,17 +7,17 @@
       label-width="100px"
       class="demo-ruleForm"
     >
-      <el-form-item label="收款账户名" prop="name">
-        <el-input v-model="ruleForm.name"></el-input>
+      <el-form-item label="收款账户名" prop="openingName">
+        <el-input v-model="ruleForm.openingName"></el-input>
       </el-form-item>
-      <el-form-item label="收款账号" prop="name1">
-        <el-input v-model="ruleForm.name1"></el-input>
+      <el-form-item label="收款账号" prop="proceedsAccount">
+        <el-input v-model="ruleForm.proceedsAccount"></el-input>
       </el-form-item>
-      <el-form-item label="开户银行" prop="name2">
-        <el-input v-model="ruleForm.name2"></el-input>
+      <el-form-item label="开户银行" prop="openingBank">
+        <el-input v-model="ruleForm.openingBank"></el-input>
       </el-form-item>
-      <el-form-item label="状态" prop="name3">
-        <el-radio-group v-model="ruleForm.name3">
+      <el-form-item label="状态" prop="status">
+        <el-radio-group v-model="ruleForm.status">
           <el-radio :label="1">开启</el-radio>
           <el-radio :label="2">关闭</el-radio>
         </el-radio-group></el-form-item
@@ -35,26 +35,42 @@ export default {
   data() {
     return {
       ruleForm: {
-        name: "",
-        name1: "",
-        name2: "",
-        name3: "",
+        openingName: "",
+        proceedsAccount: "",
+        openingBank: "",
+        status: "",
       },
       rules: {
-        name: [
+        openingName: [
           { required: true, message: "请输入收款账户名", trigger: "blur" },
         ],
-        name1: [{ required: true, message: "请输入收款账号", trigger: "blur" }],
-        name2: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
-        name3: [{ required: true, message: "请选择状态", trigger: "change" }],
+        proceedsAccount: [
+          { required: true, message: "请输入收款账号", trigger: "blur" },
+        ],
+        openingBank: [
+          { required: true, message: "请输入开户银行", trigger: "blur" },
+        ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
       },
     };
   },
+  mounted() {
+    this.getData();
+  },
   methods: {
+    getData() {
+      this.$api.systemTenantGetAccount().then((res) => {
+        this.ruleForm = res.data || {};
+      });
+    },
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          alert("submit!");
+          this.$api
+            .systemTenantInsertOrUpdate(this.ruleForm)
+            .then((res) => {
+              this.getData();
+            });
         } else {
           console.log("error submit!!");
           return false;

+ 36 - 20
src/views/agreement/components/agreeDialog.vue

@@ -4,7 +4,15 @@
       width="970px"
       :isShow.sync="isShow"
       :title="
-        type === 1 ? '新增' : type === 2 ? '修改' : type === 3 ? '详情' : '审核'
+        type === 1
+          ? '新增'
+          : type === 2
+          ? '修改'
+          : type === 3
+          ? '详情'
+          : type === 4
+          ? '协议审核'
+          : '终止审核'
       "
       @close="close"
       @submit="submit"
@@ -552,7 +560,7 @@
         </template>
         <div class="footer_b" v-if="type !== 3">
           <el-button v-if="returnLastStatus" @click="last">上一步</el-button>
-          <template v-if="type === 4 && activeIndex === 3">
+          <template v-if="(type === 4 || type === 5) && activeIndex === 3">
             <el-button type="primary" @click="checkFunc(1)">审核通过</el-button>
             <el-button type="warning" @click="checkFunc(2)"
               >审核不通过</el-button
@@ -732,7 +740,10 @@ export default {
           return false;
         }
       } else if (this.activeIndex === 3) {
-        if (this.ruleForm.formApp !== 2 && this.type === 4) {
+        if (
+          this.ruleForm.formApp !== 2 &&
+          (this.type === 4 || this.type === 5)
+        ) {
           return false;
         } else {
           return true;
@@ -746,7 +757,7 @@ export default {
     /**
      *
      * @param {Number} activeIndex 当前展示模块 1甲方选择 2协议数据 3协议合同
-     * @param {Number} type 1新增 2修改 3详情 4审核
+     * @param {Number} type 1新增 2修改 3详情 4协议审核 5终止审核
      * @param {Object} object 总数据
      */
     openBoxs(activeIndex, type, object) {
@@ -1045,16 +1056,18 @@ export default {
               data.endTime = parseInt(data.endTime / 1000);
               await this.$api.bsCovenantUpdateCommit(data);
             }
-            this.$api
-              .bsCovenantUpdateCheckStatus({
-                covenantId: this.ruleForm.covenantId,
-                status: 2,
-              })
-              .then((res) => {
-                this.$message.success("操作成功");
-                this.isShow = false;
-                this.$emit("search");
-              });
+            this.$api[
+              this.type === 4
+                ? "bsCovenantUpdateCheckStatus"
+                : "bsCovenantUpdateStopCheck"
+            ]({
+              covenantId: this.ruleForm.covenantId,
+              status: 2,
+            }).then((res) => {
+              this.$message.success("操作成功");
+              this.isShow = false;
+              this.$emit("search");
+            });
           })
           .catch(() => {});
       }
@@ -1074,12 +1087,15 @@ export default {
                 data.endTime = parseInt(data.endTime / 1000);
                 await this.$api.bsCovenantUpdateCommit(data);
               }
-              this.$api
-                .bsCovenantUpdateCheckStatus({
-                  checkInfo: instance.inputValue,
-                  covenantId: this.ruleForm.covenantId,
-                  status: 4,
-                })
+              this.$api[
+                this.type === 4
+                  ? "bsCovenantUpdateCheckStatus"
+                  : "bsCovenantUpdateStopCheck"
+              ]({
+                checkInfo: instance.inputValue,
+                covenantId: this.ruleForm.covenantId,
+                status: 4,
+              })
                 .then((res) => {
                   done();
                 })

+ 30 - 14
src/views/agreement/party/index.vue

@@ -7,16 +7,16 @@
       label-width="100px"
       class="demo-ruleForm"
     >
-      <el-form-item label="乙方名称" prop="name">
-        <el-input v-model="ruleForm.name"></el-input>
+      <el-form-item label="乙方名称" prop="yiCompanyName">
+        <el-input v-model="ruleForm.yiCompanyName"></el-input>
       </el-form-item>
-      <el-form-item label="乙方地址" prop="name1">
-        <el-input v-model="ruleForm.name1"></el-input>
+      <el-form-item label="乙方地址" prop="yiCompanyAddress">
+        <el-input v-model="ruleForm.yiCompanyAddress"></el-input>
       </el-form-item>
-      <el-form-item label="状态" prop="name2">
-        <el-radio-group v-model="ruleForm.name2">
+      <el-form-item label="状态" prop="status">
+        <el-radio-group v-model="ruleForm.status">
           <el-radio :label="1">开启</el-radio>
-          <el-radio :label="2">关闭</el-radio>
+          <el-radio :label="0">关闭</el-radio>
         </el-radio-group></el-form-item
       ><el-form-item>
         <el-button type="primary" @click="submitForm('ruleForm')"
@@ -32,22 +32,38 @@ export default {
   data() {
     return {
       ruleForm: {
-        name: "",
-        name1: "",
-        name2: "",
+        yiCompanyName: "",
+        yiCompanyAddress: "",
+        status: "",
       },
       rules: {
-        name: [{ required: true, message: "请输入乙方名称", trigger: "blur" }],
-        name1: [{ required: true, message: "请输入乙方地址", trigger: "blur" }],
-        name2: [{ required: true, message: "请选择状态", trigger: "change" }],
+        yiCompanyName: [
+          { required: true, message: "请输入乙方名称", trigger: "blur" },
+        ],
+        yiCompanyAddress: [
+          { required: true, message: "请输入乙方地址", trigger: "blur" },
+        ],
+        status: [{ required: true, message: "请选择状态", trigger: "change" }],
       },
     };
   },
+  mounted() {
+    this.getData();
+  },
   methods: {
+    getData() {
+      this.$api.bsCovenantGetYiInfo().then((res) => {
+        this.ruleForm = res.data || {};
+      });
+    },
     submitForm(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          alert("submit!");
+          this.$api
+            .bsCovenantInsertYiInfo(this.ruleForm)
+            .then((res) => {
+              this.getData();
+            });
         } else {
           console.log("error submit!!");
           return false;

+ 120 - 19
src/views/agreement/protocolManagement/index.vue

@@ -16,12 +16,12 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button type="warning" @click="XY(1,1)">新增</el-button>
+        <el-button type="warning" @click="XY(1, 1)">新增</el-button>
       </template>
       <template slot="1" slot-scope="props">
         <p>协议编号:{{ props.scope.row.covenantNum }}</p>
-        <p>业务员:</p>
-        <p>业务号:</p>
+        <p>业务员:{{ props.scope.row.saleName || '--' }}</p>
+        <p>业务号:{{ props.scope.row.saleNum || '--' }}</p>
         <p>
           申请时间:{{ $methodsTools.onlyForma(props.scope.row.startTime) }}
         </p>
@@ -32,9 +32,7 @@
             $methodsTools.onlyForma(props.scope.row.endTime, false)
           }}
         </p>
-        <p>
-          协议状态:{{ props.scope.row.status == 1 ? "有效" : "无效" }}
-        </p></template
+        <p>协议状态:{{ getStatus(props.scope.row.status) }}</p></template
       >
       <template slot="2" slot-scope="props">
         <p>甲方:{{ props.scope.row.jiaCompanyName }}</p>
@@ -66,17 +64,35 @@
         <p>待开票:{{ props.scope.row.createTime }}</p></template
       >
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="XY(3,3,props.scope.row)"
+        <el-button type="text" @click="XY(3, 3, props.scope.row)"
           >协议详情</el-button
         >
         <el-button type="text">关联订单</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">复制新增</el-button>
-        <el-button type="text">终止申请</el-button>
-        <el-button type="text">取消协议</el-button>
         <el-button
           type="text"
-          @click="XY(2,2,props.scope.row)"
+          :disabled="
+            !(props.scope.row.status === 5 && props.scope.row.stopStatus === 0)
+          "
+          @click="Terminate(props.scope.row)"
+          >终止申请</el-button
+        >
+        <el-button
+          type="text"
+          :disabled="props.scope.row.status !== 1"
+          @click="cancelXY(props.scope.row)"
+          >取消协议</el-button
+        >
+        <el-button
+          type="text"
+          :disabled="props.scope.row.status !== 4"
+          @click="XY(2, 2, props.scope.row)"
           >修改重提</el-button
         >
       </template>
@@ -89,6 +105,13 @@
       @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>
   
@@ -127,21 +150,22 @@ export default {
       //搜索
       formList: [
         {
-          prop: "cwStatus",
+          prop: "status",
           placeholder: "协议状态",
           scope: "select",
           noClear: false,
           options: [
             { label: "审核中", value: 1 },
-            { label: "已取消", value: 2 },
-            { label: "不通过", value: 3 },
-            { label: "已生效", value: 4 },
-            { label: "已过期", value: 5 },
-            { label: "已终止", value: 6 },
+            { label: "已通过", value: 2 },
+            { label: "已取消", value: 3 },
+            { label: "不通过", value: 4 },
+            { label: "已生效", value: 5 },
+            { label: "已过期", value: 6 },
+            { label: "已终止", value: 7 },
           ],
         },
         {
-          prop: "cwStatus",
+          prop: "cycleWarning",
           placeholder: "结算预警",
           scope: "select",
           noClear: false,
@@ -153,7 +177,7 @@ export default {
         },
         {
           lable: "",
-          prop: "sellerName",
+          prop: "searchKey",
           placeholder: "输入协议编号/甲方姓名/业务员/业务号",
         },
       ],
@@ -220,12 +244,89 @@ 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;
+        case 6:
+          str = "已过期";
+          break;
+        case 7:
+          str = "已终止";
+          break;
+
+        default:
+          break;
+      }
+      return str;
+    },
+    //申请终止
+    Terminate(row) {
+      this.$confirm("确定申请终止吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .bsCovenantUpdateStopStatus({
+              covenantId: row.covenantId,
+            })
+            .then((res) => {
+              this.$message.success("操作成功");
+              this.search();
+            });
+        })
+        .catch(() => {});
+    },
+    //取消协议
+    cancelXY(row) {
+      this.$confirm("当前协议正在审核中,确定取消吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .bsCovenantCancelStatus({
+              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();
+    },
     relectArray(array) {
       if (array && array.length > 0) {
         let ary = [];

+ 9 - 7
src/views/agreement/protocolUpload/dialogImg.vue

@@ -118,13 +118,15 @@ export default {
     submit() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
-          let form = new FormData();
-          form.append("covenantId", this.formData.covenantId);
-          form.append("path", this.ruleForm.path.join());
-          this.$api.bsCovenantUploadImg(form).then((res) => {
-            this.isShow = false;
-            this.$emit("search");
-          });
+          this.$api
+            .bsCovenantUploadImg({
+              covenantId: this.formData.covenantId,
+              paths: this.ruleForm.path.join(),
+            })
+            .then((res) => {
+              this.isShow = false;
+              this.$emit("search");
+            });
         } else {
           console.log("error submit!!");
           return false;

+ 73 - 13
src/views/agreement/protocolUpload/index.vue

@@ -22,16 +22,42 @@
       :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.startTime) }}
+        </p>
+        <p>
+          协议时效:{{
+            $methodsTools.onlyForma(props.scope.row.startTime, false) +
+            " - " +
+            $methodsTools.onlyForma(props.scope.row.endTime, false)
+          }}
+        </p>
+        <p>
+          上传状态:{{
+            props.scope.row.uploadStatus === 0
+              ? "待上传"
+              : props.scope.row.uploadStatus === 1
+              ? "待生效"
+              : props.scope.row.uploadStatus === 2
+              ? "已确认"
+              : ""
+          }}
+        </p></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="2" slot-scope="props">
+      ><template slot="3" slot-scope="props">
         <p>乙方:{{ props.scope.row.yiCompanyName }}</p>
         <p>地址:{{ props.scope.row.yiCompanyAddress }}</p>
         <p>联系人:{{ props.scope.row.yiCompanyContract }}</p>
         <p>电话:{{ props.scope.row.yiCompanyPhone }}</p></template
-      ><template slot="3" slot-scope="props">
+      ><template slot="4" slot-scope="props">
         <li
           v-for="(item, index) in relectArray(
             props.scope.row.bsCovenantBusinessVos
@@ -40,16 +66,26 @@
         >
           {{ item }}
         </li></template
-      ><template slot="4" slot-scope="props">
+      ><template slot="5" slot-scope="props">
         <p>周期(月):{{ props.scope.row.settlementCycle }}</p>
         <p>金额:¥{{ props.scope.row.limitAmount | formatPrice }}</p></template
       ><template slot="btn" slot-scope="props"
         ><el-button type="text" @click="XY(3, 3, props.scope.row)"
           >协议详情</el-button
-        ><el-button type="text" @click="uploadImg(props.scope.row)"
+        ><el-button
+          type="text"
+          @click="uploadImg(props.scope.row)"
+          :disabled="props.scope.row.covenantImg"
           >协议上传</el-button
-        ><el-button type="text">盖章协议</el-button
-        ><el-button type="text" @click="comeIntoForce(props.scope.row)"
+        ><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.uploadStatus !== 1"
+          @click="comeIntoForce(props.scope.row)"
           >确认生效</el-button
         >
       </template>
@@ -63,6 +99,13 @@
     />
     <agree-dialog ref="agreeDialog" @search="search(2)"></agree-dialog>
     <dialog-img ref="dialogImg" @search="search"></dialog-img>
+    <el-image
+      style="display: none"
+      :src="imgList[0]"
+      :preview-src-list="imgList"
+      ref="el_image"
+    >
+    </el-image>
   </div>
 </template>
     
@@ -124,19 +167,19 @@ export default {
       //搜索
       formList: [
         {
-          prop: "cwStatus",
+          prop: "uploadStatus",
           placeholder: "上传状态",
           scope: "select",
           noClear: false,
           options: [
             { label: "待上传", value: 1 },
             { label: "待生效", value: 2 },
-            { label: "已生效", value: 3 },
+            { label: "已确认", value: 3 },
           ],
         },
         {
           lable: "",
-          prop: "sellerName",
+          prop: "searchKey",
           placeholder: "输入协议编号/甲方姓名/业务员/业务号",
         },
       ],
@@ -147,33 +190,40 @@ export default {
       // 表单
       tableSet: [
         {
-          label: "甲方信息",
+          label: "协议记录",
           hidden: true,
           scope: "slot",
           slotName: "1",
           dontCenter: true,
         },
         {
-          label: "方信息",
+          label: "方信息",
           hidden: true,
           scope: "slot",
           slotName: "2",
           dontCenter: true,
         },
         {
-          label: "协议项目(教育类型/业务层次/商品名称/单价/上限数量)",
+          label: "乙方信息",
           hidden: true,
           scope: "slot",
           slotName: "3",
           dontCenter: true,
         },
         {
-          label: "结算信息",
+          label: "协议项目(教育类型/业务层次/商品名称/单价/上限数量)",
           hidden: true,
           scope: "slot",
           slotName: "4",
           dontCenter: true,
         },
+        {
+          label: "结算信息",
+          hidden: true,
+          scope: "slot",
+          slotName: "5",
+          dontCenter: true,
+        },
         {
           label: "审核意见",
           prop: "cwSn",
@@ -182,12 +232,21 @@ export default {
       ],
       tableData: [], //表单数据
       total: 0, //一共多少条
+      imgList: [
+        "https://file-dev.xyyxt.net/oss/images/file/20230710/1688974188358.png",
+      ],
     };
   },
   created() {
     this.search();
   },
   methods: {
+    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();
+    },
     uploadImg(row) {
       this.$refs.dialogImg.openBoxs(row);
     },
@@ -213,6 +272,7 @@ export default {
             .bsCovenantConfirmAssert({ covenantId: row.covenantId })
             .then((res) => {
               this.$message.success("操作成功");
+              this.search()
             });
         })
         .catch(() => {});

+ 131 - 24
src/views/agreement/terminationManagement/index.vue

@@ -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) {

+ 94 - 27
src/views/agreement/terminationOfAudit/index.vue

@@ -22,42 +22,56 @@
       :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) }}
-        </p></template
+        <p>审核状态:{{ 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
+        <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">
-        <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="4" slot-scope="props"> xxx</template
+        <p>乙方:{{ props.scope.row.yiCompanyName }}</p>
+        <p>地址:{{ props.scope.row.yiCompanyAddress }}</p>
+        <p>联系人:{{ props.scope.row.yiCompanyContract }}</p>
+        <p>电话:{{ props.scope.row.yiCompanyPhone }}</p></template
+      >
+      <template slot="4" slot-scope="props">
+        <li
+          v-for="(item, index) in relectArray(
+            props.scope.row.bsCovenantBusinessVos
+          )"
+          :key="index"
+        >
+          {{ item }}
+        </li></template
       ><template slot="5" slot-scope="props">
         <p>周期:{{ $methodsTools.onlyForma(props.scope.row.createTime) }}</p>
         <p>
           金额:{{ $methodsTools.onlyForma(props.scope.row.payTime) }}
         </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"
+          @click="XY(3, 5, props.scope.row)"
+          :disabled="props.scope.row.stopStatus !== 1"
+          >终止审核</el-button
+        >
       </template>
     </table-list>
     <pagination
@@ -67,17 +81,20 @@
       @handleSizeChange="handleSizeChange"
       @handleCurrentChange="handleCurrentChange"
     />
+    <agreeDialog ref="agreeDialog" @search="search(2)"></agreeDialog>
   </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";
 import pictureList from "@/components/Comon/pictureList.vue";
 export default {
   name: "",
-  components: { searchBoxNew, tableList, pagination,pictureList },
+  components: { agreeDialog, searchBoxNew, tableList, pagination, pictureList },
   data() {
     return {
       disabledBtn: false,
@@ -110,7 +127,7 @@ export default {
       //搜索
       formList: [
         {
-          prop: "cwStatus",
+          prop: "stopStatus",
           placeholder: "审核状态",
           scope: "select",
           noClear: false,
@@ -122,7 +139,7 @@ export default {
         },
         {
           lable: "",
-          prop: "sellerName",
+          prop: "searchKey",
           placeholder: "输入协议编号/甲方姓名/业务员/业务号",
         },
       ],
@@ -181,6 +198,56 @@ export default {
     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;
+    },
+    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 [];
+      }
+    },
     pictureFunc(item) {
       // if (item.prop == "unRefundNum") {
       //   this.formData = {
@@ -202,7 +269,7 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       this.$api
-        .inquiredistributionchecklist(data)
+        .bsCovenantGetStopCheckList(data)
         .then((res) => {
           this.tableData = res.rows;
           this.total = res.total;