Jelajahi Sumber

需求变更

Tang 2 tahun lalu
induk
melakukan
a23745497f

+ 8 - 0
src/fxApi/orderManageList.js

@@ -110,6 +110,14 @@ export default {
             data
         })
     },
+    //批量修改订单分成审核记录
+    updateBatchDivideByEditBo(data) {
+        return request({
+            url: '/check/order/log/updateBatchDivideByEditBo',
+            method: 'post',
+            data
+        })
+    },
     //导出订单列表
     systemtoporderexport(data) {
         return request({

+ 6 - 0
src/store/modules/user.js

@@ -9,6 +9,7 @@ const user = {
     name: '',
     avatar: '',
     roles: [],
+    rolesId:[],
     permissions: [],
     userId: ''
   },
@@ -26,6 +27,9 @@ const user = {
     SET_ROLES: (state, roles) => {
       state.roles = roles
     },
+    SET_ROLESID: (state, rolesId) => {
+      state.rolesId = rolesId
+    },
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
     },
@@ -64,6 +68,7 @@ const user = {
           const avatar = user.avatar == "" ? require("@/assets/images/profile.jpg") : methods.getUrl() + user.avatar;
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', res.roles)
+            commit('SET_ROLESID', res.rolesId)
             commit('SET_PERMISSIONS', res.permissions)
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
@@ -84,6 +89,7 @@ const user = {
         logout(state.token).then(() => {
           commit('SET_TOKEN', '')
           commit('SET_ROLES', [])
+          commit('SET_ROLESID', [])
           commit('SET_PERMISSIONS', [])
           removeToken()
           resolve()

+ 1 - 1
src/utils/request.js

@@ -9,7 +9,7 @@ axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
 // 创建axios实例
 export const baseURL = process.env.VUE_APP_BASE_API
 // export const baseURL = 'https://ptapi.gdzzkj.net/'
-// export const baseURL = "http://192.168.1.24:7077/";
+// export const baseURL = "http://192.168.1.7:7077/";
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API;
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 44 - 8
src/views/financed/arap/index.vue

@@ -34,6 +34,9 @@
       @load="load"
     >
       <template slot="customize">
+        <el-button v-if="type !== 0" @click="exportSH" type="success">
+          批量审核
+        </el-button>
         <el-button v-if="type == 0" @click="openDialog({}, 4)" type="success">
           坏账设置
         </el-button>
@@ -104,7 +107,7 @@
                 props.scope.row.payStatus === 4
               )
             "
-            @click="openDialog(props.scope.row, 1)"
+            @click="openDialog([props.scope.row], 1)"
           >
             {{
               type == 1
@@ -119,8 +122,11 @@
           <el-button
             v-else
             type="text"
-            :disabled="props.scope.row.checkStatus !== 0"
-            @click="openDialog(props.scope.row, 1)"
+            :disabled="
+              props.scope.row.checkStatus !== 0 ||
+              !$store.state.user.rolesId.includes(props.scope.row.roleId)
+            "
+            @click="openDialog([props.scope.row], 1)"
           >
             {{
               type == 1
@@ -167,7 +173,7 @@
     <dislog-set
       :dialogVisible.sync="examineDialogVisible"
       @search="search"
-      :info="activeOrderInfo"
+      :info="activeOrderInfoArray"
       @update="update"
     ></dislog-set>
     <!-- 坏账设置 -->
@@ -287,10 +293,10 @@ export default {
         index: 0,
         ch: "条",
         num: true,
-        choice: false,
+        choice: true,
         addHide: true,
         dontNum: false,
-        openCheckMore: true,
+        openCheckMore: false,
         changeWidth: "240px",
         custom: false,
         tableColor: true,
@@ -300,6 +306,18 @@ export default {
           }
           return "";
         },
+        selectableStatus: true,
+        selectableFunc: (row, rowIndex) => {
+          if (
+            row.roleId &&
+            this.$store.state.user.rolesId.includes(row.roleId) &&
+            row.checkStatus === 0
+          ) {
+            return true;
+          } else {
+            return false;
+          }
+        },
       },
       formData: {
         pageSize: 10,
@@ -666,6 +684,7 @@ export default {
       badBillDialogVisible: false,
       type: 0,
       activeOrderInfo: {},
+      activeOrderInfoArray: [],
       roleList: [],
       countInfo: {},
       spanData: {},
@@ -721,9 +740,23 @@ export default {
       }
       return a;
     },
+    exportSH() {
+      if (this.$refs.tableList.allCheckData.length === 0) {
+        this.$message.error("请勾选数据");
+        return;
+      }
+      this.openDialog(this.$refs.tableList.allCheckData, 1);
+    },
     openDialog(data, type) {
-      this.activeOrderInfo = data;
-      this.activeOrderInfo.checkFrom = this.type + 1;
+      if (type === 1) {
+        this.activeOrderInfoArray = data;
+        for (let i = 0; i < this.activeOrderInfoArray.length; i++) {
+          this.activeOrderInfoArray[i].checkFrom = this.type + 1;
+        }
+      } else {
+        this.activeOrderInfo = data;
+        this.activeOrderInfo.checkFrom = this.type + 1;
+      }
       this[
         ["tip", "examine", "remark", "order", "badBill"][type] + "DialogVisible"
       ] = true;
@@ -856,6 +889,9 @@ export default {
           month: [],
         };
       }
+      this.$nextTick(() => {
+        this.$refs.tableList.clearMoreActive();
+      });
       this.maps.forEach((value, id) => {
         this.update(id);
       });

+ 50 - 41
src/views/financed/components/audit/dislogSet.vue

@@ -4,25 +4,27 @@
       :disabledBtn="disabledBtn"
       width="600px"
       :isShow.sync="isShow"
-      :title="titleComputers(info.checkFrom, info.orderSn)"
+      :title="titleComputers(info)"
       @close="close"
       @submit="submitForm"
-      :confirmName="info.orderSn ? '确定' : '确定支付'"
+      :confirmName="info.length > 0 && info[0].orderSn ? '确定' : '确定支付'"
     >
-      <template v-if="info.orderSn">
-        <p style="margin-top: 0">
-          下单时间:{{ $methodsTools.onlyForma(form.buyTime) }}
-        </p>
-        <p style="margin-top: 0">订单单号:{{ form.orderSn }}</p>
-        <p>
-          <span class="color_1890ff">{{ form.applyName }}</span>
-        </p>
-        <div class="bgc_pink">
+      <template v-if="info.length > 0 && info[0].orderSn">
+        <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_red"
-              >¥{{ form.divideCompanyMoney }}</span
-            >
+            <span class="color_1890ff">{{ item.applyName }}</span>
           </p>
+          <div class="bgc_pink">
+            <p>
+              待付账款:<span class="color_red"
+                >¥{{ item.divideCompanyMoney }}</span
+              >
+            </p>
+          </div>
         </div>
         <el-form
           :model="formData"
@@ -43,7 +45,7 @@
               v-model="formData.checkReason"
             ></el-input> </el-form-item
         ></el-form>
-        <template slot="slotBtn">
+        <template slot="slotBtn" v-if="info.length === 1">
           <el-button @click="auditProgress = true">审核进度</el-button>
         </template>
         <audit-progress
@@ -125,9 +127,9 @@ export default {
       default: false,
     },
     info: {
-      type: Object,
+      type: Array,
       default: () => {
-        return {};
+        return [];
       },
     },
   },
@@ -148,7 +150,7 @@ export default {
           { required: true, message: "请选择审核结果", trigger: "change" },
         ],
         checkReason: [
-          { required: true, message: "请输入审核意见", trigger: "blur" },
+          { required: false, message: "请输入审核意见", trigger: "blur" },
         ],
       },
       formPay: {
@@ -176,9 +178,9 @@ export default {
   mounted() {},
 
   methods: {
-    titleComputers(checkFrom, orderSn) {
+    titleComputers(info) {
       var a = "";
-      switch (checkFrom) {
+      switch (info[0]?.checkFrom) {
         case 2:
           a = "机构分成";
           break;
@@ -191,7 +193,7 @@ export default {
         default:
           break;
       }
-      if (orderSn) {
+      if (info[0]?.orderSn) {
         a += "审核";
       } else {
         a += "支付";
@@ -207,21 +209,26 @@ export default {
     },
     init() {
       this.resetForm();
-      this.$api[
-        this.info.orderSn ? "systemtoporderdividedetail" : "dividelogdata"
-      ](
-        this.info.orderSn
-          ? { orderSn: this.info.orderSn, checkFrom: this.info.checkFrom }
-          : this.info.id
-      ).then((res) => {
-        this.form = res.data;
-        this.$api.systemtenantbankId(res.data.tenantId).then((e) => {
-          this.bankList = e.data || [];
+      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.orderSn ? "formData" : "rulesPay"].resetFields();
+      this.$refs[this.info[0].orderSn ? "formData" : "rulesPay"].resetFields();
     },
     resetForm() {
       this.form = {
@@ -234,7 +241,7 @@ export default {
       };
     },
     submitForm() {
-      if (!this.info.orderSn) {
+      if (!this.info[0].orderSn) {
         this.$refs["rulesPay"].validate((valid) => {
           if (valid) {
             this.$confirm("确定支付账款吗?", "提示", {
@@ -244,7 +251,7 @@ export default {
             })
               .then(() => {
                 let c = {
-                  divideModel: this.info.checkFrom - 1,
+                  divideModel: this.info[0].checkFrom - 1,
                   divideLogId: this.form.id,
                   tenantId: this.form.tenantId,
                   ...this.formPay,
@@ -272,15 +279,17 @@ export default {
         this.$refs["formData"].validate((valid) => {
           if (valid) {
             this.disabledBtn = true;
-            this.$api
-              .checkorderlogeditDivide({
-                checkFrom: this.info.checkFrom,
-                orderSn: this.form.orderSn,
+            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("update", this.info.divideLogId);
                 this.$emit("search");
               })
               .finally(() => {

+ 1 - 1
src/views/financed/components/refund/dislogSet.vue

@@ -157,7 +157,7 @@ export default {
           { required: true, message: "请选择审核结果", trigger: "change" },
         ],
         checkReason: [
-          { required: true, message: "请输入审核意见", trigger: "blur" },
+          { required: false, message: "请输入审核意见", trigger: "blur" },
         ],
       },
       formPay: {

+ 46 - 13
src/views/financed/orderManageList/index.vue

@@ -11,11 +11,7 @@
       <el-button type="primary" size="small" @click="editCost"
         >成本设置</el-button
       >
-      <el-button
-        v-if="false"
-        type="primary"
-        size="small"
-        @click="completeOrder(false)"
+      <el-button type="primary" size="small" @click="completeOrder(false)"
         >完单确认</el-button
       >
       <el-button type="primary" size="small" @click="editRemarks(1)"
@@ -144,17 +140,25 @@
         </div>
       </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)"
+          :disabled="disabledStatus(props.scope.row.commercialTenant)"
           >查看详情</el-button
         >
-        <el-button type="text" @click="handelClickCost(props.scope.row)"
+        <el-button
+          type="text"
+          @click="handelClickCost(props.scope.row)"
+          :disabled="disabledStatus(props.scope.row.commercialTenant)"
           >成本设置</el-button
         >
         <el-button
           type="text"
           @click="openDialog(props.scope.row, 1)"
           :disabled="
-            props.scope.row.orderFrom !== 3 || props.scope.row.checkStatus === 3
+            props.scope.row.orderFrom !== 3 ||
+            props.scope.row.checkStatus === 3 ||
+            disabledStatus(props.scope.row.commercialTenant)
           "
           >订单审核</el-button
         >
@@ -162,20 +166,30 @@
           type="text"
           @click="handelClick(props.scope.row)"
           :disabled="
-            props.scope.row.refundStatus !== 0 &&
-            props.scope.row.refundStatus !== 2
+            (props.scope.row.refundStatus !== 0 &&
+              props.scope.row.refundStatus !== 2) ||
+            disabledStatus(props.scope.row.commercialTenant)
           "
           >退款审核</el-button
         >
-        <el-button type="text" @click="editRemarks(props.scope.row)"
+        <el-button
+          type="text"
+          @click="editRemarks(props.scope.row)"
+          :disabled="disabledStatus(props.scope.row.commercialTenant)"
           >修改备注</el-button
         >
-        <el-button type="text" @click="seePZ(props.scope.row.attachmentList)"
+        <el-button
+          type="text"
+          @click="seePZ(props.scope.row.attachmentList)"
+          :disabled="disabledStatus(props.scope.row.commercialTenant)"
           >转账凭证</el-button
         >
         <el-button
-          v-if="false"
           type="text"
+          :disabled="
+            props.scope.row.finishSign === 0 ||
+            disabledStatus(props.scope.row.commercialTenant)
+          "
           @click="completeOrder(props.scope.row.orderSn)"
           >完单确认</el-button
         >
@@ -331,6 +345,14 @@ export default {
           status: false,
           title: "配置下单填选模板",
         },
+        selectableStatus: true,
+        selectableFunc: (row, rowIndex) => {
+          if (row.commercialTenant === 1) {
+            return false;
+          } else {
+            return true;
+          }
+        },
       },
       //搜索
       formList: [
@@ -581,6 +603,13 @@ export default {
     this.getStatistics();
   },
   methods: {
+    disabledStatus(c) {
+      if (c === 1) {
+        return true;
+      } else {
+        return false;
+      }
+    },
     formatPrice(price, status) {
       return price?.toLocaleString(
         "zh-CN",
@@ -668,6 +697,10 @@ export default {
         this.$message.error("请勾选数据");
         return;
       }
+      if (this.$refs.tableList.allCheckData.some((i) => i.finishSign === 0)) {
+        this.$message.error("批量数据存在不允许操作数据,请联系管理员修复");
+        return;
+      }
       this.$confirm("确定已完单吗?", "提示", {
         confirmButtonText: "确定完单",
         cancelButtonText: "取消完单",