Bladeren bron

审核基本完成

谢杰标 2 jaren geleden
bovenliggende
commit
30ada86814

+ 9 - 1
src/api/financed/index.js

@@ -335,10 +335,18 @@ export function editBatchReminder(data) {
   });
 }
 // 批量修改月份分成审核记录
-export function updateBatchDivideByMonthEditBo(data) {
+export function divideByMonthEditBo(data) {
   return request({
     url: "/check/order/log/updateBatchDivideByMonthEditBo",
     method: "post",
     data,
   });
 }
+// 批量修改订单分成审核记录
+export function divideByEditBo(data) {
+  return request({
+    url: "/check/order/log/updateBatchDivideByEditBo",
+    method: "post",
+    data,
+  });
+}

+ 16 - 16
src/views/financed/accountsPayable/businessCommission/index.vue

@@ -60,7 +60,7 @@
             props.scope.row.payStatus === 0 || props.scope.row.payStatus === 4
           "
           :disabled="getRoles(props.scope.row.roleId)"
-          @click="openDialog([props.scope.row], 1)"
+          @click="openDialog(props.scope.row, 1)"
         >
           支付
         </el-button>
@@ -105,10 +105,10 @@
       :info="activeOrderInfo"
       :dialogVisible.sync="orderDialogVisible"
     />
-    <dislog-set
+    <dislog-divide-pay
       :dialogVisible.sync="examineDialogVisible"
       @search="search"
-      :info="activeOrderInfoArray"
+      :info="activeOrderInfo"
     />
     <!-- 打印 -->
     <dislog-print
@@ -125,7 +125,7 @@
 </template>
 
 <script>
-import dislogSet from "../../components/audit/dislogSet.vue";
+import dislogDividePay from "../components/dislogDividePay.vue";
 import dislogOrderList from "../components/dislogOrderList";
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
@@ -141,7 +141,7 @@ export default {
   name: "Seller",
   components: {
     dislogOrderList,
-    dislogSet,
+    dislogDividePay,
     pictureList,
     dislogPrint,
     dislogBatchAudit,
@@ -248,6 +248,11 @@ export default {
           scope: "solt",
           soltName: "payStatus",
         },
+        {
+          label: "审核意见",
+          prop: "checkReason",
+          hidden: true,
+        },
       ],
       tableData: [], //表单数据
       formList: [
@@ -297,7 +302,6 @@ export default {
       printDialogVisible: false,
       auditDialogVisible: false,
       activeOrderInfo: {},
-      activeOrderInfoArray: [],
       activeList: [],
     };
   },
@@ -316,12 +320,8 @@ export default {
       }
     },
     openDialog(data, type = 0) {
-      if (type === 1) {
-        this.activeOrderInfoArray = data;
-      } else {
-        data.checkFrom = 3;
-        this.activeOrderInfo = data;
-      }
+      data.checkFrom = 3;
+      this.activeOrderInfo = data;
       this[
         ["order", "examine", "print", "audit"][type] + "DialogVisible"
       ] = true;
@@ -336,14 +336,14 @@ export default {
       });
     },
     batchAudit(checkResult = 1) {
-      const divideLogIds = this.$refs.tableList.allCheckData.map((e) => e.id);
-      if (divideLogIds.length === 0) {
+      const divideLogId = this.$refs.tableList.allCheckData.map((e) => e.id);
+      if (divideLogId.length === 0) {
         this.$message.error("请先勾选待审核数据");
         return;
       }
       this.openDialog(
         {
-          divideLogIds,
+          divideLogId,
           checkResult,
         },
         3
@@ -409,7 +409,7 @@ export default {
       return this.$store.state.user.rolesId;
     },
     isTj() {
-      return this.$store.state.user.roles.includes("统计");
+      return !this.$store.state.user.roles.includes("统计");
     },
   },
 };

+ 56 - 20
src/views/financed/accountsPayable/commissionSettlement/index.vue

@@ -19,7 +19,11 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button @click="batchExport" type="primary"> 导出excel </el-button>
+        <el-button @click="batchAudit(1)" type="primary"> 批量审核 </el-button>
+        <el-button v-if="isTj" @click="batchAudit(-1)" type="warning"
+          >批量审核不通过</el-button
+        >
+        <!-- <el-button @click="batchExport" type="primary"> 导出excel </el-button> -->
       </template>
       <template slot="checkStatus" slot-scope="props">
         <div>
@@ -43,7 +47,10 @@
         {{ props.scope.row.pretax * 100 }}%
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="openDialog(props.scope.row)">
+        <el-button
+          type="text"
+          @click="openDialog({ ...props.scope.row, type: 1 })"
+        >
           详情
         </el-button>
         <el-button
@@ -53,7 +60,7 @@
             props.scope.row.checkStatus === 5
           "
           :disabled="getRoles(props.scope.row.roleId)"
-          @click="openDialog([props.scope.row], 1)"
+          @click="openDialog({ ...props.scope.row, type: 2 })"
         >
           支付
         </el-button>
@@ -64,7 +71,7 @@
             props.scope.row.checkStatus !== 0 ||
             getRoles(props.scope.row.roleId)
           "
-          @click="batchAudit(props.scope.row)"
+          @click="openDialog({ ...props.scope.row, type: 3 })"
         >
           审核
         </el-button>
@@ -94,23 +101,31 @@
       :currentPage.sync="formData.pageNum"
       @search="search(3)"
     />
-    <dislog-set
-      :dialogVisible.sync="examineDialogVisible"
-      @search="search"
-      :info="activeOrderInfoArray"
-    />
     <!-- 打印 -->
     <dislog-print
       :activeData="activeOrderInfo"
       :dialogVisible.sync="printDialogVisible"
     />
+    <!-- 批量审核 -->
+    <dislog-batch-audit
+      :info="activeOrderInfo"
+      @search="search"
+      :dialogVisible.sync="auditDialogVisible"
+    />
+    <!-- 佣金审核或支付 -->
+    <dislog-Cms-Audit
+      :info="activeOrderInfo"
+      @search="search"
+      :dialogVisible.sync="cmsAuditDialogVisible"
+    />
   </div>
 </template>
 
 <script>
-import dislogSet from "../../components/audit/dislogSet.vue";
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
+import dislogBatchAudit from "../components/dislogBatchAudit";
+import dislogCmsAudit from "../components/dislogCmsAudit";
 import { exportFn } from "@/utils/index.js";
 import {
   commissionList,
@@ -121,9 +136,10 @@ import {
 export default {
   name: "Arap",
   components: {
-    dislogSet,
     pictureList,
     dislogPrint,
+    dislogBatchAudit,
+    dislogCmsAudit,
   },
   data() {
     return {
@@ -150,7 +166,7 @@ export default {
         index: 0,
         ch: "条",
         num: true,
-        choice: false,
+        choice: true,
         addHide: true,
         dontNum: true,
         openCheckMore: false,
@@ -244,6 +260,11 @@ export default {
           scope: "solt",
           soltName: "checkStatus",
         },
+        {
+          label: "审核意见",
+          prop: "checkReason",
+          hidden: true,
+        },
       ],
       tableData: [], //表单数据
       formList: [
@@ -281,8 +302,9 @@ export default {
         },
       ],
       total: 0, //一共多少条
-      examineDialogVisible: false,
       printDialogVisible: false,
+      auditDialogVisible: false,
+      cmsAuditDialogVisible: false,
       type: 1,
       activeOrderInfo: {},
       activeOrderInfoArray: [],
@@ -309,13 +331,9 @@ export default {
       }
     },
     openDialog(data, type = 1) {
-      if (type === 1) {
-        data.forEach((e) => (e.checkFrom = 4));
-        this.activeOrderInfoArray = data;
-      } else {
-        this.activeOrderInfo = data;
-      }
-      this[["print", "examine"][type] + "DialogVisible"] = true;
+      data.checkFrom = 4;
+      this.activeOrderInfo = data;
+      this[["print", "cmsAudit", "audit"][type] + "DialogVisible"] = true;
     },
     batchExport() {
       commissionExport(this.formData).then((res) => {
@@ -369,11 +387,29 @@ export default {
         this.showTabList[2].value = res.data.BrokerageTotalMoney;
       });
     },
+    batchAudit(checkResult = 1) {
+      const orderSn = this.$refs.tableList.allCheckData.map((e) => e.orderSn);
+      if (orderSn.length === 0) {
+        this.$message.error("请先勾选待审核数据");
+        return;
+      }
+      this.openDialog(
+        {
+          orderSn,
+          checkResult,
+          isCommission: true,
+        },
+        2
+      );
+    },
   },
   computed: {
     rolesId() {
       return this.$store.state.user.rolesId;
     },
+    isTj() {
+      return !this.$store.state.user.roles.includes("统计");
+    },
   },
 };
 </script>

+ 0 - 78
src/views/financed/accountsPayable/components/arapRemarks.vue

@@ -1,78 +0,0 @@
-<template>
-  <div>
-    <BaseDialog
-      width="600px"
-      :isShow.sync="isShow"
-      title="修改备注"
-      @submit="submitForm"
-    >
-      <el-input
-        :rows="6"
-        type="textarea"
-        placeholder="请输入备注"
-        v-model="value"
-      ></el-input>
-    </BaseDialog>
-  </div>
-</template>
-
-<script>
-import { updateRemark, updateMonthRemark } from "@/api/financed/index";
-export default {
-  name: "remarks",
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false,
-    },
-    info: {
-      type: Object,
-      default: () => {
-        return {};
-      },
-    },
-  },
-  data() {
-    return {
-      value: "",
-    };
-  },
-
-  mounted() {},
-
-  methods: {
-    init() {
-      this.value = this.info.remark;
-    },
-    submitForm() {
-      let { orderSn, id } = this.info;
-      let fn = orderSn ? updateRemark : updateMonthRemark;
-      fn({
-        orderSn: orderSn,
-        remark: this.value,
-        id: id,
-      }).then((res) => {
-        this.$message.success("修改备注成功");
-        this.isShow = false;
-        this.info.remark = this.value;
-        // this.$emit("search");
-      });
-    },
-  },
-  computed: {
-    isShow: {
-      get() {
-        if (this.dialogVisible) {
-          this.init();
-        }
-        return this.dialogVisible;
-      },
-      set(val) {
-        this.$emit("update:dialogVisible", false);
-      },
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped></style>

+ 10 - 5
src/views/financed/accountsPayable/components/dislogBatchAudit.vue

@@ -20,7 +20,7 @@
 </template>
 
 <script>
-import { updateBatchDivideByMonthEditBo } from "@/api/financed/index";
+import { divideByMonthEditBo, divideByEditBo } from "@/api/financed/index";
 export default {
   name: "remarks",
   props: {
@@ -52,10 +52,11 @@ export default {
       this.checkReason = undefined;
     },
     backForm() {
-      let { divideLogIds, checkFrom, checkResult } = this.info;
-      let form = divideLogIds.map((e) => {
+      let { checkFrom, checkResult } = this.info;
+      const key = this.isCommission ? "orderSn" : "divideLogId";
+      let form = this.info[key].map((e) => {
         return {
-          divideLogId: e,
+          [key]: e,
           checkResult,
           checkReason: this.checkReason,
           checkFrom,
@@ -73,7 +74,8 @@ export default {
       });
     },
     batchAudit() {
-      updateBatchDivideByMonthEditBo(this.backForm()).then(() => {
+      const fn = this.isCommission ? divideByEditBo : divideByMonthEditBo;
+      fn(this.backForm()).then(() => {
         this.$message.success(
           `批量审核${this.checkResult == -1 ? "不" : ""}通过成功!`
         );
@@ -94,6 +96,9 @@ export default {
     checkResult() {
       return this.info.checkResult;
     },
+    isCommission() {
+      return !!this.info.isCommission;
+    },
   },
   watch: {
     isShow(val) {

+ 196 - 0
src/views/financed/accountsPayable/components/dislogCmsAudit.vue

@@ -0,0 +1,196 @@
+<template>
+  <div>
+    <BaseDialog
+      :disabledBtn="disabledBtn"
+      width="800px"
+      :isShow.sync="isShow"
+      :title="'佣金' + ['详情', '审核', '支付'][type]"
+      @open="init"
+      :isShowFooter="false"
+    >
+      <p>
+        申请时间:
+        <em>
+          {{ $methodsTools.onlyForma(info.createTime) || "--" }}
+        </em>
+      </p>
+      <div class="df">
+        <p>
+          机构名称:<em>{{ info.tenantName }}</em>
+        </p>
+        <p>
+          业务员:<em>{{ info.createUsername }}</em>
+        </p>
+        <p>
+          业务号:<em>{{ info.createNo }}</em>
+        </p>
+        <p>
+          下单企业:<em>{{ info.purchaseOrg }}</em>
+        </p>
+      </div>
+      <div class="centent">
+        <p>订单号:{{ info.orderSn }}</p>
+        <p>申请备注:{{ info.remark || "无" }}</p>
+        <p>
+          订单金额:<span>{{ info.orderPrice | formatPrice }}</span>
+        </p>
+        <p>
+          税前佣金:<span>{{ info.pretaxBrokerage | formatPrice }}</span>
+        </p>
+        <p>
+          佣金税占比:<span>{{ info.pretax * 100 }}%</span>
+        </p>
+        <p>
+          本次需支付佣金:<span style="font-weight: bold">{{
+            info.brokerage | formatPrice
+          }}</span>
+        </p>
+        <el-divider></el-divider>
+        <p>
+          支付方式:{{
+            [
+              "",
+              "微信支付",
+              "支付宝支付",
+              "金币支付",
+              "现金支付",
+              "网银支付",
+              "协议支付",
+              "对公转账",
+            ][info.payType]
+          }}
+        </p>
+      </div>
+      <div class="dialog-footer">
+        <el-button @click="batchAudit(1)" type="primary"> 审核通过 </el-button>
+        <el-button v-if="isTj" @click="batchAudit(-1)" type="warning"
+          >审核不通过</el-button
+        >
+      </div>
+    </BaseDialog>
+    <!-- 订单列表 -->
+    <dislogOrderList :info="info" :dialogVisible.sync="orderDialogVisible" />
+    <!-- 审核 -->
+    <dislog-batch-audit
+      :info="orderInfo"
+      @search="$emit('search'), (isShow = false)"
+      :dialogVisible.sync="auditDialogVisible"
+    />
+  </div>
+</template>
+
+<script>
+import dislogOrderList from "./dislogOrderList";
+import dislogBatchAudit from "./dislogBatchAudit";
+export default {
+  name: "DislogDividePay",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    info: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      disabledBtn: false,
+      orderDialogVisible: false,
+      auditDialogVisible: false,
+      form: {
+        payMoney: 0,
+      },
+      formPay: {
+        toBankAcount: "",
+        toBankName: "",
+        toBankTypeName: "",
+      },
+      bankList: [],
+      orderInfo: {},
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    fastInput(item) {
+      this.formPay = {
+        toBankAcount: item.proceedsAccount,
+        toBankName: item.openingName,
+        toBankTypeName: item.openingBank,
+      };
+    },
+    init() {
+      this.resetForm();
+    },
+    resetForm() {},
+    batchAudit(checkResult = 1) {
+      this.orderInfo = {
+        orderSn: [this.info.orderSn],
+        checkResult,
+        checkFrom: 4,
+        isCommission: true,
+      };
+      console.log(this.orderInfo);
+      this.auditDialogVisible = true;
+    },
+  },
+  computed: {
+    isShow: {
+      get() {
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+    isTj() {
+      return !this.$store.state.user.roles.includes("统计");
+    },
+    type() {
+      return this.info.type;
+    },
+  },
+  components: {
+    dislogOrderList,
+    dislogBatchAudit,
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+p {
+  margin: 0;
+  padding: 0;
+  line-height: 30px;
+  span {
+    color: rgb(235, 59, 59);
+  }
+}
+.df {
+  p {
+    margin-right: 30px;
+  }
+}
+.centent {
+  margin: 10px 0 30px;
+  padding: 12px 15px;
+  box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.2);
+  border-radius: 6px;
+}
+
+em {
+  font-weight: bold;
+  color: #000;
+  font-style: unset;
+}
+.dialog-footer {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+</style>

+ 179 - 0
src/views/financed/accountsPayable/components/dislogDividePay.vue

@@ -0,0 +1,179 @@
+<template>
+  <div>
+    <BaseDialog
+      :disabledBtn="disabledBtn"
+      width="400px"
+      :isShow.sync="isShow"
+      title="分成支付"
+      @open="init"
+      @submit="submitForm"
+      confirmName="支付"
+    >
+      <template>
+        <template>
+          <em>订单信息:</em>
+          <p>
+            机构名称:<em>{{ info.tenantName }}</em>
+          </p>
+          <p>
+            账期类型:<em>{{
+              ["月份", "季度", "半年", "年度"][info.billType - 1]
+            }}</em>
+          </p>
+          <p>
+            时间:<em>{{ info.monthTime }}</em>
+          </p>
+          <p>
+            应付分成:<span class="color_red">{{
+              info.payMoney | formatPrice
+            }}</span>
+          </p>
+        </template>
+        <el-button type="primary" plain @click="orderDialogVisible = true"
+          >分成详细</el-button
+        >
+        <el-divider></el-divider>
+        <em>收款信息:</em>
+        <el-input
+          style="margin-top: 10px"
+          disabled
+          v-model="formPay.toBankAcount"
+        ></el-input>
+        <el-input
+          style="margin-top: 10px"
+          disabled
+          v-model="formPay.toBankName"
+        ></el-input>
+        <el-input
+          style="margin-top: 10px"
+          disabled
+          v-model="formPay.toBankTypeName"
+        ></el-input>
+      </template>
+    </BaseDialog>
+    <!-- 订单列表 -->
+    <dislogOrderList :info="info" :dialogVisible.sync="orderDialogVisible" />
+  </div>
+</template>
+
+<script>
+import dislogOrderList from "./dislogOrderList";
+export default {
+  name: "DislogDividePay",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    info: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      disabledBtn: false,
+      orderDialogVisible: false,
+      form: {
+        payMoney: 0,
+      },
+      formPay: {
+        toBankAcount: "",
+        toBankName: "",
+        toBankTypeName: "",
+      },
+      bankList: [],
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    fastInput(item) {
+      this.formPay = {
+        toBankAcount: item.proceedsAccount,
+        toBankName: item.openingName,
+        toBankTypeName: item.openingBank,
+      };
+    },
+    init() {
+      this.resetForm();
+      this.$api.systemtenantbankId(this.info.tenantId).then((e) => {
+        this.bankList = e.data || [];
+        if (this.bankList.length > 0) {
+          this.fastInput(this.bankList[0]);
+        }
+      });
+    },
+    resetForm() {
+      this.form = {
+        payMoney: 0,
+      };
+    },
+    submitForm() {
+      this.$confirm("确定支付吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.disabledBtn = true;
+          let c = {
+            divideModel: this.info.checkFrom - 1,
+            type: 1,
+            divideLogId: this.info.id,
+            tenantId: this.info.tenantId,
+            ...this.formPay,
+          };
+          this.$api
+            .orderbankpay(c)
+            .then((res) => {
+              this.isShow = false;
+              this.$emit("search", 3);
+              this.$message({
+                type: "success",
+                message: "支付成功!",
+              });
+            })
+            .finally(() => {
+              this.disabledBtn = false;
+            });
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+  },
+  computed: {
+    isShow: {
+      get() {
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+  components: {
+    dislogOrderList,
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.color_red {
+  font-weight: bold;
+  color: rgb(235, 59, 59);
+}
+em {
+  font-weight: bold;
+  color: #000;
+  font-style: unset;
+}
+</style>

+ 30 - 13
src/views/financed/accountsPayable/components/dislogOrderList.vue

@@ -7,9 +7,25 @@
     @open="init"
   >
     <div class="des df">
-      <p>机构名称:{{ info.tenantName }}</p>
-      <p>账期类型:{{ ["月份", "季度", "半年", "年度"][info.billType] }}</p>
-      <p>时间:{{ info.monthTime }}</p>
+      <p>
+        机构名称:<span>{{ info.tenantName }}</span>
+      </p>
+      <template v-if="info.checkFrom == 3">
+        <p>
+          业务员:<span>{{ info.createUsername }}</span>
+        </p>
+        <p>
+          业务号:<span>{{ info.createNo }}</span>
+        </p>
+      </template>
+      <p v-else>
+        账期类型:<span>{{
+          ["月份", "季度", "半年", "年度"][info.billType - 1]
+        }}</span>
+      </p>
+      <p>
+        时间:<span>{{ info.monthTime }}</span>
+      </p>
     </div>
     <search-box-new
       ref="searchBox"
@@ -66,7 +82,7 @@
         <el-button type="text" @click="handelDetail(props.scope.row)">
           详情
         </el-button>
-        <el-button
+        <!-- <el-button
           v-if="isEdit"
           type="text"
           :disabled="
@@ -76,7 +92,7 @@
           @click="handelDetail(props.scope.row, 3)"
         >
           审核
-        </el-button>
+        </el-button> -->
       </template>
     </table-list>
     <pagination1
@@ -88,7 +104,7 @@
     <!-- 订单详情 -->
     <dislog-order-details
       :appendToBody="true"
-      :ShowStatus="3"
+      :ShowStatus="1"
       :orderSn="activeOrderInfo.orderSn"
       :orderFrom="activeOrderInfo.orderFrom"
       :dialogVisible.sync="orderDialogVisible"
@@ -97,7 +113,7 @@
     <dislog-batch-audit
       :appendToBody="true"
       :info="activeOrderInfo"
-      @search="search"
+      @search="$emit('search'), (isShow = false)"
       :dialogVisible.sync="auditDialogVisible"
     />
   </BaseDialog>
@@ -237,7 +253,6 @@ export default {
       total: 0,
       orderDialogVisible: false,
       auditDialogVisible: false,
-      ShowStatus: 1,
       activeOrderInfo: {},
       statisticsInfo: {},
     };
@@ -308,15 +323,14 @@ export default {
         return true;
       }
     },
-    handelDetail(data, ShowStatus = 1) {
+    handelDetail(data) {
       this.activeOrderInfo = data;
-      this.ShowStatus = ShowStatus;
       this.orderDialogVisible = true;
     },
     batchAudit(checkResult) {
       let { checkFrom, id } = this.info;
       this.activeOrderInfo = {
-        divideLogIds: [id],
+        divideLogId: [id],
         checkResult,
         checkFrom,
       };
@@ -336,7 +350,7 @@ export default {
       return this.info.isEdit;
     },
     title() {
-      return this.isEdit ? "订单审核" : "订单列表";
+      return this.isEdit ? "分成审核" : "分成详细";
     },
     showStatisticsList() {
       if (true) {
@@ -348,7 +362,7 @@ export default {
       return this.$store.state.user.rolesId;
     },
     isTj() {
-      return this.$store.state.user.roles.includes("统计");
+      return !this.$store.state.user.roles.includes("统计");
     },
     formList() {
       return [
@@ -412,6 +426,9 @@ export default {
   margin-top: -20px;
   p {
     margin: 10px 40px 10px 0;
+    span {
+      font-weight: bold;
+    }
   }
 }
 .search_box_page {

+ 17 - 16
src/views/financed/accountsPayable/institutionDivide/index.vue

@@ -62,7 +62,7 @@
             props.scope.row.payStatus === 0 || props.scope.row.payStatus === 4
           "
           :disabled="getRoles(props.scope.row.roleId)"
-          @click="openDialog([props.scope.row], 1)"
+          @click="openDialog(props.scope.row, 1)"
         >
           支付
         </el-button>
@@ -108,10 +108,11 @@
       @search="search"
       :dialogVisible.sync="orderDialogVisible"
     />
-    <dislog-set
+    <!-- 支付 -->
+    <dislog-divide-pay
       :dialogVisible.sync="examineDialogVisible"
       @search="search"
-      :info="activeOrderInfoArray"
+      :info="activeOrderInfo"
     />
     <!-- 打印 -->
     <dislog-print
@@ -128,7 +129,7 @@
 </template>
 
 <script>
-import dislogSet from "../../components/audit/dislogSet.vue";
+import dislogDividePay from "../components/dislogDividePay.vue";
 import dislogOrderList from "../components/dislogOrderList";
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
@@ -140,7 +141,7 @@ export default {
   name: "Arap",
   components: {
     pictureList,
-    dislogSet,
+    dislogDividePay,
     dislogOrderList,
     dislogPrint,
     dislogBatchAudit,
@@ -250,6 +251,11 @@ export default {
           scope: "solt",
           soltName: "payStatus",
         },
+        {
+          label: "审核意见",
+          prop: "checkReason",
+          hidden: true,
+        },
       ],
       tableData: [],
       total: 0,
@@ -277,13 +283,8 @@ export default {
       }
     },
     openDialog(data, type = 0) {
-      if (type === 1) {
-        data.forEach((e) => (e.checkFrom = 2));
-        this.activeOrderInfoArray = data;
-      } else {
-        data.checkFrom = 2;
-        this.activeOrderInfo = data;
-      }
+      data.checkFrom = 2;
+      this.activeOrderInfo = data;
       this[
         ["order", "examine", "print", "audit"][type] + "DialogVisible"
       ] = true;
@@ -375,14 +376,14 @@ export default {
       });
     },
     batchAudit(checkResult = 1) {
-      const divideLogIds = this.$refs.tableList.allCheckData.map((e) => e.id);
-      if (divideLogIds.length === 0) {
+      const divideLogId = this.$refs.tableList.allCheckData.map((e) => e.id);
+      if (divideLogId.length === 0) {
         this.$message.error("请先勾选待审核数据");
         return;
       }
       this.openDialog(
         {
-          divideLogIds,
+          divideLogId,
           checkResult,
         },
         3
@@ -486,7 +487,7 @@ export default {
       return this.$store.state.user.rolesId;
     },
     isTj() {
-      return this.$store.state.user.roles.includes("统计");
+      return !this.$store.state.user.roles.includes("统计");
     },
   },
   watch: {

+ 1 - 1
src/views/financed/arap/index.vue

@@ -194,7 +194,7 @@
 </template>
 
 <script>
-import dislogSet from "../components/audit/dislogSet.vue";
+// import dislogSet from "../components/audit/dislogSet.vue";
 import searchBoxNew from "@/components/searchBoxNew";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";

+ 0 - 102
src/views/financed/components/audit/auditProgress.vue

@@ -1,102 +0,0 @@
-<template>
-  <div>
-    <BaseDialog
-      width="700px"
-      :isShow.sync="isShow"
-      title="退款审核"
-      @close="close"
-      @submit="submitForm"
-      :appendToBody="true"
-      :confirmStatus="false"
-    >
-      <el-timeline>
-        <el-timeline-item
-          v-for="(item, index) in checkLogVos"
-          :timestamp="$methodsTools.onlyForma(item.checkTime)"
-          placement="top"
-          :color="
-            item.checkSign === 1
-              ? '#409EFF'
-              : item.checkStatus === 1
-              ? '#67C23A'
-              : item.checkStatus === -1
-              ? '#F56C6C'
-              : '#e4e4e4'
-          "
-        >
-          <el-card>
-            <h4>负责人:{{ item.roleName }}</h4>
-            <p>
-              审核状态:{{
-                item.checkStatus === 0
-                  ? "待审核"
-                  : item.checkStatus === 1
-                  ? "已通过"
-                  : item.checkStatus === -1
-                  ? "未通过"
-                  : ""
-              }}
-            </p>
-            <p>审核意见:{{ item.checkReason }}</p>
-          </el-card>
-        </el-timeline-item>
-      </el-timeline>
-    </BaseDialog>
-  </div>
-</template>
-
-<script>
-export default {
-  // name: "DislogSet",
-  props: {
-    auditProgress: {
-      type: Boolean,
-      default: false,
-    },
-    checkLogVos: {
-      type: Array,
-      default: () => {
-        return [];
-      },
-    },
-  },
-  data() {
-    return {
-      active: 2,
-    };
-  },
-
-  mounted() {},
-
-  methods: {
-    init() {
-      console.log(this.checkLogVos, "checkLogVos");
-    },
-    close() {},
-    submitForm() {
-      this.isShow = false;
-    },
-  },
-  computed: {
-    isShow: {
-      get() {
-        if (this.auditProgress) {
-          this.init();
-        }
-        return this.auditProgress;
-      },
-      set(val) {
-        this.$emit("update:auditProgress", false);
-      },
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.el-timeline {
-  padding: 0px 6px;
-  max-height: 600px;
-  overflow: auto;
-}
-</style>

+ 0 - 342
src/views/financed/components/audit/dislogSet.vue

@@ -1,342 +0,0 @@
-<template>
-  <div>
-    <BaseDialog
-      :disabledBtn="disabledBtn"
-      width="600px"
-      :isShow.sync="isShow"
-      :title="titleComputers(info)"
-      @close="close"
-      @submit="submitForm"
-      :confirmName="info.length > 0 && info[0].orderSn ? '确定' : '确定支付'"
-    >
-      <template v-if="info.length > 0 && info[0].orderSn">
-        <div style="overflow-y: auto; max-height: 600px">
-          <div v-for="(item, index) in info" style="margin-bottom: 10px">
-            <p style="margin-top: 0">
-              下单时间:{{ $methodsTools.onlyForma(item.orderTime) }}
-            </p>
-            <p style="margin-top: 0">订单单号:{{ item.orderSn }}</p>
-            <p>
-              <span class="color_1890ff">{{ item.applyName }}</span>
-            </p>
-            <div class="bgc_pink">
-              <p>
-                待付账款:<span class="color_red"
-                  >¥{{ item.divideCompanyMoney }}</span
-                >
-              </p>
-            </div>
-          </div>
-        </div>
-        <el-form
-          :model="formData"
-          :rules="rules"
-          ref="formData"
-          label-width="100px"
-        >
-          <el-form-item prop="checkResult" label="审核结果:">
-            <el-radio-group v-model="formData.checkResult">
-              <el-radio label="1">同意</el-radio>
-              <el-radio label="-1">拒绝</el-radio>
-            </el-radio-group>
-          </el-form-item>
-          <el-form-item prop="checkReason" label="审核意见:">
-            <el-input
-              type="textarea"
-              placeholder="请输入审核意见"
-              v-model="formData.checkReason"
-            ></el-input> </el-form-item
-        ></el-form>
-        <template slot="slotBtn" v-if="info.length === 1">
-          <el-button @click="auditProgress = true">审核进度</el-button>
-        </template>
-        <audit-progress
-          :auditProgress.sync="auditProgress"
-          :checkLogVos="form.checkLogVos"
-        ></audit-progress>
-      </template>
-      <template v-else>
-        <em>收款信息:</em>
-        <el-form
-          :model="formPay"
-          :rules="rulesPay"
-          ref="rulesPay"
-          label-width="100px"
-          class="demo-ruleForm"
-        >
-          <el-form-item label="商户银行:">
-            <div>
-              <el-button
-                v-for="(item, index) in bankList"
-                :key="index"
-                @click="fastInput(item)"
-                >{{ item.openingName }}</el-button
-              >
-              <p style="margin: 0">
-                注:点击上方按钮可快速填入对应商户银行信息
-              </p>
-            </div></el-form-item
-          >
-          <el-form-item label="银行账号:" prop="toBankAcount">
-            <el-input clearable v-model="formPay.toBankAcount"></el-input>
-          </el-form-item>
-          <el-form-item label="账号名称:" prop="toBankName">
-            <el-input clearable v-model="formPay.toBankName"></el-input>
-          </el-form-item>
-          <el-form-item label="银行名称:" prop="toBankTypeName">
-            <el-input clearable v-model="formPay.toBankTypeName"></el-input>
-          </el-form-item>
-          <el-form-item label="备注:" prop="remark">
-            <el-input
-              type="textarea"
-              :rows="4"
-              v-model="formPay.remark"
-            ></el-input>
-          </el-form-item>
-        </el-form>
-        <el-divider></el-divider>
-        <template>
-          <em>订单信息:</em>
-          <p>
-            机构名称:<em>{{ form.tenantName }}</em>
-          </p>
-          <p>
-            待付时间:<em>{{ form.year + "-" + form.month }}</em>
-          </p>
-          <p>
-            待付金额:<span
-              class="color_red"
-              style="font-size: 28px; font-weight: 400"
-              >¥ {{ form.payMoney.toFixed(2) }}</span
-            >
-          </p>
-        </template>
-      </template>
-    </BaseDialog>
-  </div>
-</template>
-
-<script>
-import auditProgress from "./auditProgress.vue";
-export default {
-  name: "DislogSet",
-  components: {
-    auditProgress,
-  },
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false,
-    },
-    info: {
-      type: Array,
-      default: () => {
-        return [];
-      },
-    },
-  },
-  data() {
-    return {
-      disabledBtn: false,
-      auditProgress: false,
-      formData: {
-        checkResult: "",
-        checkReason: "",
-      },
-      form: {
-        payMoney: 0,
-        checkLogVos: [],
-      },
-      rules: {
-        checkResult: [
-          { required: true, message: "请选择审核结果", trigger: "change" },
-        ],
-        checkReason: [
-          { required: false, message: "请输入审核意见", trigger: "blur" },
-        ],
-      },
-      formPay: {
-        toBankAcount: "",
-        toBankName: "",
-        toBankTypeName: "",
-        remark: "",
-      },
-      rulesPay: {
-        remark: [{ required: false, message: "请输入备注", trigger: "blur" }],
-        toBankAcount: [
-          { required: true, message: "请输入银行账号", trigger: "blur" },
-        ],
-        toBankName: [
-          { required: true, message: "请输入账号名称", trigger: "blur" },
-        ],
-        toBankTypeName: [
-          { required: true, message: "请输入银行名称", trigger: "blur" },
-        ],
-      },
-      bankList: [],
-    };
-  },
-
-  mounted() {},
-
-  methods: {
-    titleComputers(info) {
-      var a = "";
-      switch (info[0]?.checkFrom) {
-        case 2:
-          a = "机构分成";
-          break;
-        case 3:
-          a = "业务员提成";
-          break;
-        case 4:
-          a = "佣金结算";
-          break;
-        default:
-          break;
-      }
-      if (info[0]?.orderSn) {
-        a += "审核";
-      } else {
-        a += "支付";
-      }
-      return a;
-    },
-    fastInput(item) {
-      this.formPay = {
-        toBankAcount: item.proceedsAccount,
-        toBankName: item.openingName,
-        toBankTypeName: item.openingBank,
-      };
-    },
-    init() {
-      this.resetForm();
-      if (!this.info[0].orderSn) {
-        this.$api.dividelogdata(this.info[0].id).then((res) => {
-          this.form = res.data;
-          this.$api.systemtenantbankId(res.data.tenantId).then((e) => {
-            this.bankList = e.data || [];
-          });
-        });
-      } else if (this.info.length === 1 && this.info[0].orderSn) {
-        this.$api
-          .systemtoporderdividedetail({
-            orderSn: this.info[0].orderSn,
-            checkFrom: this.info[0].checkFrom,
-          })
-          .then((res) => {
-            this.form = res.data;
-          });
-      }
-    },
-    close() {
-      this.$refs[this.info[0].orderSn ? "formData" : "rulesPay"].resetFields();
-    },
-    resetForm() {
-      this.form = {
-        checkLogVos: [],
-        payMoney: 0,
-      };
-      this.formData = {
-        checkResult: "",
-        checkReason: "",
-      };
-    },
-    submitForm() {
-      if (!this.info[0].orderSn) {
-        this.$refs["rulesPay"].validate((valid) => {
-          if (valid) {
-            this.$confirm("确定支付账款吗?", "提示", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning",
-            })
-              .then(() => {
-                let c = {
-                  divideModel: this.info[0].checkFrom - 1,
-                  divideLogId: this.form.id,
-                  tenantId: this.form.tenantId,
-                  ...this.formPay,
-                };
-                this.$api.orderbankpay(c).then((res) => {
-                  this.isShow = false;
-                  this.$emit("search", 3);
-                  this.$message({
-                    type: "success",
-                    message: "支付成功!",
-                  });
-                });
-              })
-              .catch(() => {
-                this.$message({
-                  type: "info",
-                  message: "已取消删除",
-                });
-              });
-          } else {
-            return false;
-          }
-        });
-      } else {
-        this.$refs["formData"].validate((valid) => {
-          if (valid) {
-            this.disabledBtn = true;
-            var array = this.info.map((i) => {
-              return {
-                checkFrom: i.checkFrom,
-                orderSn: i.orderSn,
-                ...this.formData,
-              };
-            });
-            this.$api
-              .updateBatchDivideByEditBo(array)
-              .then((res) => {
-                this.isShow = false;
-                this.$emit("search", 4);
-              })
-              .finally(() => {
-                this.disabledBtn = false;
-              });
-          } else {
-            return false;
-          }
-        });
-      }
-    },
-  },
-  computed: {
-    isShow: {
-      get() {
-        if (this.dialogVisible) {
-          this.init();
-        }
-        return this.dialogVisible;
-      },
-      set(val) {
-        this.$emit("update:dialogVisible", false);
-      },
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.bgc_pink {
-  padding: 10px;
-  background-color: rgb(252, 234, 236);
-  color: #000;
-}
-.color_red {
-  font-weight: bold;
-  color: rgb(235, 59, 59);
-}
-.color_1890ff {
-  color: #1890ff;
-  font-weight: bold;
-}
-em {
-  font-weight: bold;
-  color: #000;
-  font-style: unset;
-}
-</style>