谢杰标 2 vuotta sitten
vanhempi
commit
4d64866e68

+ 24 - 0
src/api/financed/index.js

@@ -318,3 +318,27 @@ export function commissionPrint(data) {
     data,
   });
 }
+// 查询佣金结算列表统计
+export function commissionOrderCount(query) {
+  return request({
+    url: "/divide/log/commissionOrderCount",
+    method: "get",
+    params: query,
+  });
+}
+// 批量修改订单收款提醒
+export function editBatchReminder(data) {
+  return request({
+    url: "/receive/order/note/editBatch",
+    method: "post",
+    data,
+  });
+}
+// 批量修改月份分成审核记录
+export function updateBatchDivideByMonthEditBo(data) {
+  return request({
+    url: "/check/order/log/updateBatchDivideByMonthEditBo",
+    method: "post",
+    data,
+  });
+}

+ 2 - 8
src/components/tableList.vue

@@ -3,14 +3,8 @@
     <div class="headerNavTool" v-if="navText.headShow !== false">
       <div class="leftIndexText">
         {{ navText.title }} <strong>{{ navText.index }}</strong> {{ navText.ch
-        }}<span
-          style="
-            color: red;
-            font-weight: bold;
-            font-size: 16px;
-            margin-left: 10px;
-          "
-          ><i class="el-icon-warning-outline" style="font-weight: bold"></i>
+        }}<span style="color: #999; font-size: 14px; margin-left: 10px"
+          ><i class="el-icon-warning-outline"></i>
           鼠标点击数据表数据,再按键盘左右键可以左右滑动数据表数据。</span
         >
       </div>

+ 40 - 5
src/views/financed/accountsPayable/businessCommission/index.vue

@@ -19,8 +19,11 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button @click="batchAudit" type="success"> 批量审核 </el-button>
-        <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="payStatus" slot-scope="props">
         <div>
@@ -67,7 +70,7 @@
           :disabled="
             props.scope.row.payStatus !== 2 || getRoles(props.scope.row.roleId)
           "
-          @click="batchAudit(props.scope.row)"
+          @click="openDialog({ ...props.scope.row, isEdit: 1 })"
         >
           审核
         </el-button>
@@ -112,6 +115,12 @@
       :activeData="activeOrderInfo"
       :dialogVisible.sync="printDialogVisible"
     />
+    <!-- 审核 -->
+    <dislog-batch-audit
+      :info="activeOrderInfo"
+      @search="search"
+      :dialogVisible.sync="auditDialogVisible"
+    />
   </div>
 </template>
 
@@ -120,6 +129,7 @@ import dislogSet from "../../components/audit/dislogSet.vue";
 import dislogOrderList from "../components/dislogOrderList";
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
+import dislogBatchAudit from "../components/dislogBatchAudit";
 import { exportFn } from "@/utils/index.js";
 import {
   sellerExport,
@@ -134,6 +144,7 @@ export default {
     dislogSet,
     pictureList,
     dislogPrint,
+    dislogBatchAudit,
   },
   data() {
     return {
@@ -167,6 +178,10 @@ export default {
         changeWidth: "280px",
         custom: false,
         tableColor: true,
+        selectableStatus: true,
+        selectableFunc: (row, rowIndex) => {
+          return row.payStatus == 2 && !this.getRoles(row.roleId);
+        },
       },
       formData: {
         pageSize: 10,
@@ -280,6 +295,7 @@ export default {
       orderDialogVisible: false,
       examineDialogVisible: false,
       printDialogVisible: false,
+      auditDialogVisible: false,
       activeOrderInfo: {},
       activeOrderInfoArray: [],
       activeList: [],
@@ -303,9 +319,12 @@ export default {
       if (type === 1) {
         this.activeOrderInfoArray = data;
       } else {
+        data.checkFrom = 3;
         this.activeOrderInfo = data;
       }
-      this[["order", "examine", "print"][type] + "DialogVisible"] = true;
+      this[
+        ["order", "examine", "print", "audit"][type] + "DialogVisible"
+      ] = true;
     },
     batchExport() {
       sellerExport(this.formData).then((res) => {
@@ -316,7 +335,20 @@ export default {
         }
       });
     },
-    batchAudit() {},
+    batchAudit(checkResult = 1) {
+      const divideLogIds = this.$refs.tableList.allCheckData.map((e) => e.id);
+      if (divideLogIds.length === 0) {
+        this.$message.error("请先勾选待审核数据");
+        return;
+      }
+      this.openDialog(
+        {
+          divideLogIds,
+          checkResult,
+        },
+        3
+      );
+    },
     getDataList() {
       sellerPercentageList(this.formData)
         .then((res) => {
@@ -376,6 +408,9 @@ export default {
     rolesId() {
       return this.$store.state.user.rolesId;
     },
+    isTj() {
+      return this.$store.state.user.roles.includes("统计");
+    },
   },
 };
 </script>

+ 5 - 16
src/views/financed/accountsPayable/commissionSettlement/index.vue

@@ -113,13 +113,9 @@ import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
 import { exportFn } from "@/utils/index.js";
 import {
-  orderList,
-  companyList,
-  countOrderNum,
   commissionList,
-  sellerPercentageList,
   commissionExport,
-  monthOrderList
+  commissionOrderCount,
 } from "@/api/financed/index";
 
 export default {
@@ -367,17 +363,10 @@ export default {
       this.search(2);
     },
     getCountOrderNum() {
-      monthOrderList(this.formData).then((res) => {
-        console.log("🚀 ~ file: index.vue:371 ~ monthOrderList ~ res:", res)
-        let {
-          unPayMoneyTotal,
-          unDeductMoneyTotal,
-          deductMoneyTotal,
-          payMoneyTotal,
-        } = res.data;
-        this.showTabList[0].value = payMoneyTotal + unPayMoneyTotal;
-        this.showTabList[1].value = payMoneyTotal + unDeductMoneyTotal;
-        this.showTabList[2].value = deductMoneyTotal + unDeductMoneyTotal;
+      commissionOrderCount(this.formData).then((res) => {
+        this.showTabList[0].value = res.data.orderTotalPrice;
+        this.showTabList[1].value = res.data.pretaxTotalBrokerage;
+        this.showTabList[2].value = res.data.BrokerageTotalMoney;
       });
     },
   },

+ 108 - 0
src/views/financed/accountsPayable/components/dislogBatchAudit.vue

@@ -0,0 +1,108 @@
+<template>
+  <div>
+    <BaseDialog
+      :appendToBody="appendToBody"
+      v-if="checkResult == -1"
+      width="600px"
+      :isShow.sync="isShow"
+      title="确定审核不通过吗?"
+      @opne="init"
+      @submit="batchAudit"
+    >
+      <el-input
+        :rows="6"
+        type="textarea"
+        placeholder="请输入不通过原因"
+        v-model="checkReason"
+      ></el-input>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { updateBatchDivideByMonthEditBo } from "@/api/financed/index";
+export default {
+  name: "remarks",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    info: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    appendToBody: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      checkReason: undefined,
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+    init() {
+      this.checkReason = undefined;
+    },
+    backForm() {
+      let { divideLogIds, checkFrom, checkResult } = this.info;
+      let form = divideLogIds.map((e) => {
+        return {
+          divideLogId: e,
+          checkResult,
+          checkReason: this.checkReason,
+          checkFrom,
+        };
+      });
+      return form;
+    },
+    batchAuditPass() {
+      this.$confirm("确定审核通过吗?", "提示", {
+        confirmButtonText: "确定通过",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        this.batchAudit();
+      });
+    },
+    batchAudit() {
+      updateBatchDivideByMonthEditBo(this.backForm()).then(() => {
+        this.$message.success(
+          `批量审核${this.checkResult == -1 ? "不" : ""}通过成功!`
+        );
+        this.isShow = false;
+        this.$emit("search");
+      });
+    },
+  },
+  computed: {
+    isShow: {
+      get() {
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+    checkResult() {
+      return this.info.checkResult;
+    },
+  },
+  watch: {
+    isShow(val) {
+      if (val && this.checkResult == 1) {
+        this.batchAuditPass();
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 33 - 29
src/views/financed/accountsPayable/components/dislogOrderList.vue

@@ -34,12 +34,17 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button v-if="isEdit" @click="batchAudit" type="primary">
-          批量审核
-        </el-button>
-        <el-button v-else @click="batchExport" type="info" plain>
+        <template v-if="isEdit">
+          <el-button @click="batchAudit(1)" type="primary">
+            审核通过
+          </el-button>
+          <el-button v-if="isTj" @click="batchAudit(-1)" type="warning"
+            >审核不通过</el-button
+          >
+        </template>
+        <!-- <el-button v-else @click="batchExport" type="info" plain>
           导出excel
-        </el-button>
+        </el-button> -->
       </template>
       <template slot="predictPayTime" slot-scope="props">
         <span v-if="props.scope.row.creditStatus == 1">已结清</span>
@@ -88,12 +93,20 @@
       :orderFrom="activeOrderInfo.orderFrom"
       :dialogVisible.sync="orderDialogVisible"
     />
+    <!-- 审核 -->
+    <dislog-batch-audit
+      :appendToBody="true"
+      :info="activeOrderInfo"
+      @search="search"
+      :dialogVisible.sync="auditDialogVisible"
+    />
   </BaseDialog>
 </template>
 
 <script>
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogOrderDetails from "../../components/dislogOrderDetails.vue";
+import dislogBatchAudit from "./dislogBatchAudit";
 import {
   tenantExport,
   monthOrderList,
@@ -147,11 +160,10 @@ export default {
         index: 0,
         ch: "条",
         num: true,
-        choice: true,
+        choice: false,
         addHide: true,
         dontNum: true,
         openCheckMore: false,
-        // changeWidth: "220px",
         custom: false,
         tableColor: true,
       },
@@ -224,6 +236,7 @@ export default {
       tableData: [],
       total: 0,
       orderDialogVisible: false,
+      auditDialogVisible: false,
       ShowStatus: 1,
       activeOrderInfo: {},
       statisticsInfo: {},
@@ -239,8 +252,6 @@ export default {
       return days;
     },
     init() {
-      console.log(this.info);
-      this.navText.choice = !!this.isEdit;
       this.search(2);
     },
     batchExport() {
@@ -302,24 +313,14 @@ export default {
       this.ShowStatus = ShowStatus;
       this.orderDialogVisible = true;
     },
-    batchAudit() {
-      let selectList = this.$refs.tableList.allCheckData.filter(
-        (e) => e.checkStatus === 0 && !this.getRoles(e.roleId)
-      );
-      if (selectList.length === 0) {
-        this.$message.error("请先勾选待审核数据");
-        return;
-      }
-      this.$confirm("审核通过不可撤销,确定审核通过吗?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.$message({
-          type: "success",
-          message: "批量审核成功!",
-        });
-      });
+    batchAudit(checkResult) {
+      let { checkFrom, id } = this.info;
+      this.activeOrderInfo = {
+        divideLogIds: [id],
+        checkResult,
+        checkFrom,
+      };
+      this.auditDialogVisible = true;
     },
   },
   computed: {
@@ -332,14 +333,13 @@ export default {
       },
     },
     isEdit() {
-      return false;
       return this.info.isEdit;
     },
     title() {
       return this.isEdit ? "订单审核" : "订单列表";
     },
     showStatisticsList() {
-      if (!this.isEdit) {
+      if (true) {
         this.statisticsList.splice(2, 1);
       }
       return this.statisticsList;
@@ -347,6 +347,9 @@ export default {
     rolesId() {
       return this.$store.state.user.rolesId;
     },
+    isTj() {
+      return this.$store.state.user.roles.includes("统计");
+    },
     formList() {
       return [
         {
@@ -399,6 +402,7 @@ export default {
   components: {
     pictureList,
     dislogOrderDetails,
+    dislogBatchAudit,
   },
 };
 </script>

+ 26 - 10
src/views/financed/accountsPayable/components/dislogTip.vue

@@ -3,7 +3,7 @@
     <BaseDialog
       width="900px"
       :isShow.sync="isShow"
-      :title="type == 2 ? '批量' : '' + '催款提醒'"
+      :title="(orderSnList ? '批量' : '') + '催款提醒'"
       @close="close"
       @submit="submitForm"
       @open="init"
@@ -17,18 +17,17 @@
         label-width="100px"
       >
         <div>
-          <el-form-item label="最新提醒:" v-if="type == 1">
+          <el-form-item label="最新提醒:" v-if="!orderSnList">
             {{ $methodsTools.onlyForma(orderInfo.lastTime) || "--" }}
           </el-form-item>
         </div>
         <div>
-          <el-form-item prop="overPayDay" label="预付超期:">
-            <el-select v-model="form.overPayDay" placeholder="请选择预付超期">
+          <el-form-item prop="exceedType" label="预付超期:">
+            <el-select v-model="form.exceedType" placeholder="请选择预付超期">
               <el-option label="7天" :value="1"></el-option>
               <el-option label="30天" :value="2"></el-option>
               <el-option label="半年" :value="3"></el-option>
               <el-option label="1年" :value="4"></el-option>
-              <el-option label="1年以上" :value="5"></el-option>
             </el-select>
           </el-form-item>
         </div>
@@ -93,7 +92,11 @@
 </template>
 
 <script>
-import { orderNote, orderNoteEdit } from "@/api/financed/index";
+import {
+  orderNote,
+  orderNoteEdit,
+  editBatchReminder,
+} from "@/api/financed/index";
 export default {
   name: "DislogTip",
   props: {
@@ -151,6 +154,7 @@ export default {
         weekTime,
         monthTime,
         noteType,
+        exceedType,
       } = this.orderInfo;
       this.form = {
         noteType: noteType || 1,
@@ -158,8 +162,9 @@ export default {
         dayTime: dayTime,
         weekTime: weekTime ? weekTime.split(",") : [],
         monthTime: monthTime ? monthTime.split(",") : [],
-        orderSn: orderSn,
-        tenantId: tenantId,
+        orderSn,
+        tenantId,
+        exceedType,
       };
     },
     submitForm() {
@@ -179,6 +184,17 @@ export default {
             form.status = -1;
             form.noteType = undefined;
           }
+          if (this.orderSnList) {
+            form = this.orderSnList.map((e) => {
+              return { ...form, ...e };
+            });
+            editBatchReminder(form).then((res) => {
+              this.$message.success("批量催款提醒设置成功");
+              this.isShow = false;
+              this.$emit("search");
+            });
+            return;
+          }
           if (form.id) {
             orderNoteEdit(form).then((res) => {
               this.$message.success("催款提醒修改成功");
@@ -207,8 +223,8 @@ export default {
         this.$emit("update:dialogVisible", false);
       },
     },
-    type() {
-      return this.orderInfo.ctype;
+    orderSnList() {
+      return this.orderInfo.orderSnList;
     },
   },
 };

+ 34 - 20
src/views/financed/accountsPayable/institutionDivide/index.vue

@@ -19,10 +19,13 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button @click="batchAudit" type="primary"> 批量审核 </el-button>
-        <el-button @click="batchExport" type="info" plain>
+        <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="info" plain>
           导出excel
-        </el-button>
+        </el-button> -->
       </template>
       <template slot="payStatus" slot-scope="props">
         <div>
@@ -69,7 +72,7 @@
           :disabled="
             props.scope.row.payStatus !== 2 || getRoles(props.scope.row.roleId)
           "
-          @click="batchAudit(props.scope.row)"
+          @click="openDialog({ ...props.scope.row, isEdit: 1 })"
         >
           审核
         </el-button>
@@ -102,6 +105,7 @@
     <!-- 订单列表 -->
     <dislogOrderList
       :info="activeOrderInfo"
+      @search="search"
       :dialogVisible.sync="orderDialogVisible"
     />
     <dislog-set
@@ -114,6 +118,12 @@
       :activeData="activeOrderInfo"
       :dialogVisible.sync="printDialogVisible"
     />
+    <!-- 审核 -->
+    <dislog-batch-audit
+      :info="activeOrderInfo"
+      @search="search"
+      :dialogVisible.sync="auditDialogVisible"
+    />
   </div>
 </template>
 
@@ -122,6 +132,7 @@ import dislogSet from "../../components/audit/dislogSet.vue";
 import dislogOrderList from "../components/dislogOrderList";
 import pictureList from "@/components/Comon/pictureList.vue";
 import dislogPrint from "../components/dislogPrint.vue";
+import dislogBatchAudit from "../components/dislogBatchAudit";
 import { exportFn } from "@/utils/index.js";
 import { companyList, tenantExport, countOrderNum } from "@/api/financed/index";
 
@@ -132,6 +143,7 @@ export default {
     dislogSet,
     dislogOrderList,
     dislogPrint,
+    dislogBatchAudit,
   },
   data() {
     return {
@@ -244,6 +256,7 @@ export default {
       orderDialogVisible: false,
       printDialogVisible: false,
       examineDialogVisible: false,
+      auditDialogVisible: false,
       activeOrderInfo: { type: 1 },
       activeOrderInfoArray: [],
       activeList: [],
@@ -268,9 +281,12 @@ export default {
         data.forEach((e) => (e.checkFrom = 2));
         this.activeOrderInfoArray = data;
       } else {
+        data.checkFrom = 2;
         this.activeOrderInfo = data;
       }
-      this[["order", "examine", "print"][type] + "DialogVisible"] = true;
+      this[
+        ["order", "examine", "print", "audit"][type] + "DialogVisible"
+      ] = true;
     },
     batchExport() {
       tenantExport(this.formData).then((res) => {
@@ -358,24 +374,19 @@ export default {
         this.statisticsList[2].value = deductMoneyTotal + unDeductMoneyTotal;
       });
     },
-    batchAudit(e) {
-      let ids = e.id
-        ? [e.id]
-        : this.$refs.tableList.allCheckData.map((e) => e.id);
-      if (ids.length === 0) {
+    batchAudit(checkResult = 1) {
+      const divideLogIds = this.$refs.tableList.allCheckData.map((e) => e.id);
+      if (divideLogIds.length === 0) {
         this.$message.error("请先勾选待审核数据");
         return;
       }
-      this.$confirm("审核通过不可撤销,确定审核通过吗?", "提示", {
-        confirmButtonText: "确定通过",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        this.$message({
-          type: "success",
-          message: "批量审核成功!",
-        });
-      });
+      this.openDialog(
+        {
+          divideLogIds,
+          checkResult,
+        },
+        3
+      );
     },
   },
   computed: {
@@ -474,6 +485,9 @@ export default {
     rolesId() {
       return this.$store.state.user.rolesId;
     },
+    isTj() {
+      return this.$store.state.user.roles.includes("统计");
+    },
   },
   watch: {
     "formData.billType": {

+ 12 - 4
src/views/financed/accountsPayable/operationsReceivable/index.vue

@@ -18,9 +18,7 @@
       :loading="loading"
     >
       <template slot="customize">
-        <el-button type="primary" @click="openDialog({ ctype: 2 }, 1)"
-          >自动催款</el-button
-        >
+        <el-button type="primary" @click="batchCollection">批量催款</el-button>
         <el-button @click="openDialog({}, 2)" type="primary">
           坏账设置
         </el-button>
@@ -108,7 +106,7 @@ export default {
         index: 0,
         ch: "条",
         num: true,
-        choice: false,
+        choice: true,
         addHide: true,
         dontNum: false,
         openCheckMore: false,
@@ -297,6 +295,16 @@ export default {
       this.activeOrderInfo = data;
       this[["order", "tip", "badBill"][type] + "DialogVisible"] = true;
     },
+    batchCollection() {
+      let orderSnList = this.$refs.tableList.allCheckData.map((item) => {
+        return { orderSn: item.orderSn, tenantId: item.tenantId };
+      });
+      if (orderSnList.length === 0) {
+        this.$message.error("请先勾选批量催款数据");
+        return;
+      }
+      this.openDialog({ orderSnList }, 1);
+    },
   },
   components: {
     pictureList,