Jelajahi Sumber

财务系统开发合并

Tang 2 tahun lalu
induk
melakukan
faba6a5211

+ 1 - 0
package.json

@@ -66,6 +66,7 @@
     "vue-cropper": "0.5.5",
     "vue-draggable-resizable": "^2.3.0",
     "vue-meta": "^2.4.0",
+    "vue-print-nb": "^1.7.5",
     "vue-router": "3.4.9",
     "vuedraggable": "2.24.3",
     "vuex": "3.6.0"

+ 1 - 0
src/components/BaseDialog.vue

@@ -32,6 +32,7 @@
         @click="confirmBtn"
         >{{ confirmName }}</el-button
       >
+      <slot name="slotBtnRight"></slot>
     </div>
   </el-dialog>
 </template>

+ 4 - 1
src/main.js

@@ -28,6 +28,7 @@ import {
   selectDictLabel,
   selectDictLabels,
   handleTree,
+  derivePermission
 } from "@/utils/ruoyi";
 // 通用弹窗
 import BaseDialog from "@/components/BaseDialog";
@@ -47,8 +48,9 @@ import VueMeta from "vue-meta";
 import DictData from "@/components/DictData";
 import methodsTools from "@/utils/methodsTool";
 import bus from "@/utils/eventBus";
+import Print from 'vue-print-nb'
 // 全局方法挂载
-
+Vue.use(Print);
 Vue.prototype.$store = store;
 Vue.prototype.getDicts = getDicts;
 Vue.prototype.getConfigKey = getConfigKey;
@@ -61,6 +63,7 @@ Vue.prototype.handleTree = handleTree;
 Vue.prototype.$api = api;
 Vue.prototype.$upload = upload;
 Vue.prototype.$methodsTools = methodsTools;
+Vue.prototype.derivePermission = derivePermission
 Vue.prototype.$bus = bus;
 Vue.prototype.gsap = gsap;
 

+ 16 - 1
src/newApi/settle.js

@@ -113,7 +113,6 @@ export default {
         return request({
             url: '/settle/time/detail/'+data,
             method: 'get',
-            params: data
         })
     },
     //按时间保存结算订单
@@ -140,4 +139,20 @@ export default {
             data
         })
     },
+    //成本分类查询职能机构列表
+    topinstitutionlistByCat(data) {
+        return request({
+            url: '/top/institution/listByCat',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询供应商成本模板所有业务层次列表
+    topcostinsttpbusinessList(data) {
+        return request({
+            url: '/top/cost/inst/tp/businessList',
+            method: 'get',
+            params: data
+        })
+    },
 }

+ 2 - 2
src/utils/request.js

@@ -7,9 +7,9 @@ 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 = process.env.VUE_APP_BASE_API
 // export const baseURL = 'https://ptapi.gdzzkj.net/'
-export const baseURL = "http://192.168.1.7: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公共部分

+ 15 - 14
src/utils/ruoyi.js

@@ -2,7 +2,8 @@
  * 通用js方法封装处理
  * Copyright (c) 2019 ruoyi
  */
-
+// 导出权限角色
+export const derivePermission = ['admin']
 // 日期格式化
 export function parseTime(time, pattern) {
 	if (arguments.length === 0 || !time) {
@@ -16,7 +17,7 @@ export function parseTime(time, pattern) {
 		if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
 			time = parseInt(time)
 		} else if (typeof time === 'string') {
-			time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),'');
+			time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
 		}
 		if ((typeof time === 'number') && (time.toString().length === 10)) {
 			time = time * 1000
@@ -117,18 +118,18 @@ export function praseStrEmpty(str) {
 
 // 数据合并
 export function mergeRecursive(source, target) {
-    for (var p in target) {
-        try {
-            if (target[p].constructor == Object) {
-                source[p] = mergeRecursive(source[p], target[p]);
-            } else {
-                source[p] = target[p];
-            }
-        } catch(e) {
-            source[p] = target[p];
-        }
-    }
-    return source;
+	for (var p in target) {
+		try {
+			if (target[p].constructor == Object) {
+				source[p] = mergeRecursive(source[p], target[p]);
+			} else {
+				source[p] = target[p];
+			}
+		} catch (e) {
+			source[p] = target[p];
+		}
+	}
+	return source;
 };
 
 /**

+ 175 - 16
src/views/financed/accountsPayable/supplierSettlement/index.vue

@@ -15,15 +15,43 @@
       :list="showTabList"
     ></picture-list>
     <table-list
-      rowKey="orderId"
+      rowKey="settleId"
       ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
       :loading="loading"
     >
-      <template slot="customize">
-        <el-button size="small">导出excel</el-button>
+      <template slot="customize"
+        ><el-popover title="结算方式" width="200" trigger="click">
+          <div>
+            <el-button
+              size="small"
+              type="primary"
+              @click="controlsType(1, { settleType: 1 })"
+              >数据结算</el-button
+            >
+            <el-button
+              size="small"
+              type="primary"
+              @click="controlsType(1, { settleType: 2 })"
+              >时间结算</el-button
+            >
+          </div>
+          <el-button
+            slot="reference"
+            size="small"
+            type="primary"
+            style="margin-right: 10px"
+            >添加记录</el-button
+          >
+        </el-popover>
+        <el-button size="small" type="warning" @click="batchDel"
+          >批量删除</el-button
+        >
+        <el-button size="small" v-hasRole="derivePermission"
+          >导出excel</el-button
+        >
       </template>
       <template slot="orderPrice" slot-scope="props">
         <div v-if="props.scope.row['settleMoney']">
@@ -42,45 +70,57 @@
         >
       </template>
       <template slot="btn" slot-scope="props">
-        <el-button type="text">详情</el-button>
+        <el-button type="text" @click="controlsType(0, props.scope.row)"
+          >详情</el-button
+        >
         <el-button
           type="text"
           :disabled="
-            props.scope.row.checkStatus == 7 || $store.state.user == 'admin'
+            props.scope.row.checkStatus !== 7 &&
+            props.scope.row.checkStatus !== 4 &&
+            $store.state.user.name !== 'admin'
           "
+          @click="controlsType(3, props.scope.row)"
           >{{ props.scope.row.checkStatus == 4 ? "支付" : "审核" }}</el-button
         >
         <el-button
           type="text"
           :disabled="
-            (props.scope.row.checkStatus == 1 ||
-              props.scope.row.checkStatus == 3) &&
-            ($store.state.user.userId == props.scope.row.createUserId ||
-              $store.state.user == 'admin')
+            !(
+              (props.scope.row.checkStatus == 1 ||
+                props.scope.row.checkStatus == 3) &&
+              ($store.state.user.userId == props.scope.row.createUserId ||
+                $store.state.user.name == 'admin')
+            )
           "
+          @click="controlsType(2, props.scope.row)"
           >修改</el-button
         >
         <el-button
           type="text"
           class="warning_text_btn"
           :disabled="
-            (props.scope.row.checkStatus == 1 ||
-              props.scope.row.checkStatus == 3) &&
-            ($store.state.user.userId == props.scope.row.createUserId ||
-              $store.state.user == 'admin')
+            !(
+              (props.scope.row.checkStatus == 1 ||
+                props.scope.row.checkStatus == 3) &&
+              ($store.state.user.userId == props.scope.row.createUserId ||
+                $store.state.user.name == 'admin')
+            )
           "
+          @click="del([props.scope.row.settleId])"
           >删除</el-button
         >
+        <!-- :disabled="props.scope.row.checkStatus !== 6" -->
         <el-button
           type="text"
           class="warning_text_btn"
-          :disabled="props.scope.row.checkStatus !== 7"
+          @click="doPrint(1, props.scope.row)"
           >单据打印</el-button
         >
         <el-button
           type="text"
           class="warning_text_btn"
-          :disabled="props.scope.row.checkStatus !== 7"
+          @click="doPrint(2, props.scope.row)"
           >明细打印</el-button
         >
       </template>
@@ -91,10 +131,42 @@
       :currentPage.sync="formData.pageNum"
       @search="search"
     />
+
+    <BaseDialogQuantity
+      :dialogVisible.sync="BaseDialogQuantity"
+      :activeData="activeData"
+      @openSupplier="openSupplier"
+    />
+    <BaseDialogQuantityTable
+      :dialogVisible.sync="BaseDialogQuantityTable"
+      :activeData="activeData"
+      @search="search"
+      @lastStep="lastStep"
+    />
+    <BaseDialogTime
+      :activeData="activeData"
+      :dialogVisible.sync="BaseDialogTime"
+      @search="search"
+    />
+    <BaseDialogDetailsTime
+      :dialogVisible.sync="BaseDialogDetailsTime"
+      :activeData="activeData"
+    />
+    <payMent :dialogVisible.sync="BaseDialogPayMent" :activeData="activeData" />
+    <printData
+      :dialogVisible.sync="BaseDialogPrintData"
+      :activeData="activeData"
+    />
   </div>
 </template>
 
 <script>
+import BaseDialogQuantity from "./quantitySettleMent/index.vue";
+import BaseDialogQuantityTable from "./quantitySettleMent/quantityTable.vue";
+import BaseDialogTime from "./timeSettleMent/index.vue";
+import BaseDialogDetailsTime from "./timeSettleMent/detailsIndex.vue";
+import printData from "./printData.vue";
+import payMent from "./payMent.vue";
 import pictureList from "@/components/Comon/pictureList.vue";
 import searchBoxNew from "@/components/searchBoxNew";
 import tableList from "@/components/tableList";
@@ -106,9 +178,16 @@ export default {
     searchBoxNew,
     tableList,
     pagination,
+    BaseDialogQuantity,
+    BaseDialogTime,
+    BaseDialogDetailsTime,
+    BaseDialogQuantityTable,
+    payMent,
+    printData,
   },
   data() {
     return {
+      activeData: {},
       statisticsData: {},
       showTabList: [
         {
@@ -234,7 +313,7 @@ export default {
         },
         {
           label: "培训项目",
-          prop2: "businessName",
+          prop: "businessName",
           hidden: true,
         },
         {
@@ -269,6 +348,12 @@ export default {
       ],
       tableData: [], //表单数据
       total: 0, //一共多少条
+      BaseDialogQuantity: false,
+      BaseDialogTime: false,
+      BaseDialogDetailsTime: false,
+      BaseDialogQuantityTable: false,
+      BaseDialogPayMent: false,
+      BaseDialogPrintData: false,
     };
   },
   created() {
@@ -309,6 +394,46 @@ export default {
     },
   },
   methods: {
+    doPrint(type, data) {
+      this.activeData = Object.assign({ type: type }, data) || {};
+      this.BaseDialogPrintData = true;
+    },
+    /**
+     * 详情0 新增1 修改2 审核/支付3
+     */
+    controlsType(type, data) {
+      this.activeData = Object.assign({ type: type }, data) || {};
+      //数量结算
+      if (data.settleType == 1) {
+        if (type == 1) {
+          this.BaseDialogQuantity = true;
+        } else if (type == 3 && data.checkStatus == 4) {
+          this.BaseDialogPayMent = true;
+        } else {
+          this.BaseDialogQuantityTable = true;
+        }
+      }
+      //时间结算
+      if (data.settleType == 2) {
+        if (type == 0) {
+          this.BaseDialogDetailsTime = true;
+        } else if (type == 3 && data.checkStatus == 4) {
+          this.BaseDialogPayMent = true;
+        } else {
+          this.BaseDialogTime = true;
+        }
+      }
+    },
+    //数量结算进行下一步
+    openSupplier(data) {
+      this.activeData = Object.assign({ type: 1 }, data) || {};
+      this.BaseDialogQuantityTable = true;
+    },
+    //数量结算返回上一步
+    lastStep(data) {
+      this.activeData = Object.assign({}, data) || {};
+      this.BaseDialogQuantity = true;
+    },
     getStatistics(datas) {
       var data = JSON.parse(JSON.stringify(datas));
       delete data.pageNum;
@@ -349,6 +474,40 @@ export default {
     init() {
       this.search(2);
     },
+    batchDel() {
+      if (this.$refs.tableList.allCheckData.length > 0) {
+        const A = this.$refs.tableList.allCheckData
+          .filter((i) => {
+            return (
+              (i.checkStatus == 1 || i.checkStatus == 3) &&
+              (this.$store.state.user.userId == i.createUserId ||
+                this.$store.state.user.name == "admin")
+            );
+          })
+          .map((i) => i.settleId);
+        if (A.length > 0) {
+          this.del(A);
+        } else {
+          this.$message.warning("当前所勾选的数据不可删除");
+        }
+      } else {
+        this.$message.warning("请勾选需要删除的数据");
+      }
+    },
+    del(ids) {
+      this.$confirm("确定删除此内容?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api.settlebatchdelete({ settleIds: ids }).then((res) => {
+            this.$message.success("删除成功");
+            this.search(3);
+          });
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>

+ 145 - 0
src/views/financed/accountsPayable/supplierSettlement/payMent.vue

@@ -0,0 +1,145 @@
+<template>
+  <div>
+    <BaseDialog
+      width="500px"
+      :isShow.sync="isShow"
+      title="成本支付"
+      @submit="submitForm"
+      @close="close"
+      confirmName="确定支付"
+    >
+      <div class="box" v-for="(item, index) in formList" :key="index">
+        <div class="title">{{ item.label ? item.label + ":" : "" }}</div>
+        <template v-if="item.scope === 'select'">
+          <template v-for="(items, indexs) in item.options">
+            <div v-if="formData[item.value] == items.value" class="text">
+              {{ items.label }}
+            </div>
+          </template>
+        </template>
+        <div
+          class="text"
+          v-else-if="item.scope === 'money'"
+          style="color: red; font-size: 16px"
+        >
+          ¥{{ formData[item.value] }}
+        </div>
+        <div v-else class="text">{{ formData[item.value] }}</div>
+      </div>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formList: [
+        {
+          label: "添加时间",
+          value: "title",
+        },
+        {
+          label: "结算方式",
+          value: "settleType",
+          scope: "select",
+          options: [
+            {
+              label: "数量结算",
+              value: 1,
+            },
+            {
+              label: "时间结算",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "成本分类",
+          value: "costCatName",
+        },
+        {
+          label: "教育类型",
+          value: "educationName",
+        },
+        {
+          label: "培训项目",
+          value: "businessName",
+        },
+        {
+          label: "结算金额",
+          value: "settleMoney",
+          scope: "money",
+        },
+        {
+          label: "供应商",
+          value: "instName",
+        },
+        {
+          label: "收款信息",
+          value: "bankName",
+        },
+        {
+          label: "",
+          value: "bank",
+        },
+        {
+          label: "",
+          value: "bankAccount",
+        },
+      ],
+      formData: {},
+    };
+  },
+  methods: {
+    init() {
+      this.formData = Object.assign({}, this.activeData);
+    },
+    close() {},
+    submitForm() {},
+  },
+  computed: {
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.box {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  font-size: 14px;
+  .title {
+    width: 100px;
+    text-align: end;
+  }
+  .text {
+    flex: 1;
+    font-weight: bold;
+  }
+}
+</style>

+ 230 - 0
src/views/financed/accountsPayable/supplierSettlement/printData.vue

@@ -0,0 +1,230 @@
+<template>
+  <div>
+    <BaseDialog
+      width="1100px"
+      :isShow.sync="isShow"
+      :title="activeData.type == 1 ? '单据打印' : '明细打印'"
+      @submit="submitForm"
+      @close="close"
+      :confirmStatus="false"
+    >
+      <div id="print">
+        <h3 style="text-align: center">
+          {{ activeData.type == 1 ? "费用支出单据" : "费用支出明细" }}
+        </h3>
+        <template v-if="activeData.type == 1">
+          <table border cellspacing="0" cellpadding="5" width="100%">
+            <tr>
+              <td>款项用途:供应商结算</td>
+              <td>付款日期:2022-12-12 12:12:12</td>
+              <td>付款金额:¥8000.00</td>
+            </tr>
+            <tr>
+              <td>
+                <p>用途详细:</p>
+                <p>供应商:{{ formData.instName }}</p>
+                <p>标题:{{ formData.title }}</p>
+                <p>备注:{{ formData.remark }}</p>
+                <p>成本分类:{{ formData.costCatName }}</p>
+                <p>教育类型:{{ formData.educationName }}</p>
+                <p>培训项目:{{ formData.businessName }}</p>
+              </td>
+              <td>
+                <p>收款信息:</p>
+                <p>收款方式:账号支付</p>
+                <p>收款账户:{{ formData.bankName }}</p>
+                <p>收款银行:{{ formData.bank }}</p>
+                <p>收款账号:{{ formData.bankAccount }}</p>
+              </td>
+              <td>
+                <p>款项明细:</p>
+                <p>
+                  结算方式:{{
+                    formData.settleType == 1 ? "数量结算" : "时间结算"
+                  }}
+                </p>
+                <p v-if="formData.settleType !== 1">
+                  签约时间:{{
+                    $methodsTools.onlyForma(formData.signStartTime, false) +
+                    " 至 " +
+                    $methodsTools.onlyForma(formData.signEndTime, false)
+                  }}
+                </p>
+                <p v-if="formData.settleType == 1">
+                  结算数量:{{ formData.settleNum }}
+                </p>
+                <p>结算金额:¥{{ formData.settleMoney }}</p>
+              </td>
+            </tr>
+            <tr>
+              <td colspan="3">
+                <p>审核进度:</p>
+                <el-steps
+                  :space="200"
+                  :active="formData.checkRoles.length"
+                  finish-status="success"
+                  align-center
+                >
+                  <el-step
+                    v-for="(item, index) in formData.checkRoles"
+                    :title="item"
+                    :key="index"
+                  ></el-step>
+                </el-steps>
+              </td>
+            </tr>
+          </table>
+        </template>
+        <template v-if="activeData.type == 2">
+          <table
+            border
+            width="100%"
+            cellspacing="0"
+            cellpadding="5"
+            class="table2"
+          >
+            <thead>
+              <tr>
+                <td width="50">序号</td>
+                <td
+                  v-for="(item, index) in tableSet"
+                  :key="index"
+                  :width="item.width"
+                >
+                  {{ item.label }}
+                </td>
+              </tr>
+            </thead>
+            <tbody>
+              <tr v-for="(item, index) in tableData" :key="index">
+                <td>{{ index + 1 }}</td>
+                <td v-for="(items, indexs) in tableSet" :key="indexs">
+                  <span v-if="items.scope === 'time'">{{
+                    $methodsTools.onlyForma(item[items.prop])
+                  }}</span>
+                  <span v-else>
+                    {{ items.leftCh }}{{ item[items.prop]
+                    }}{{ items.prop1 ? item[items.prop1] : "" }}
+                  </span>
+                </td>
+              </tr>
+              <tr>
+                <td colspan="9">合计</td>
+                <td>¥{{ computedMoney(tableData) }}</td>
+              </tr>
+            </tbody>
+          </table>
+        </template>
+      </div>
+
+      <template slot="slotBtnRight">
+        <el-button v-print="'#print'" type="primary">打印</el-button>
+      </template>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formData: {
+        checkRoles: [],
+      },
+      tableSet: [
+        { label: "订单号", prop: "orderSn" },
+        { label: "业务员", prop: "createUsername", width: "80" },
+        { label: "业务号", prop: "createNo", width: "80" },
+        { label: "下单客户", prop: "clientName" },
+        { label: "业务类型", prop: "educationName", prop1: "businessName" },
+        { label: "姓名", prop: "userName", width: "60" },
+        { label: "身份证号", prop: "userCard" },
+        { label: "交资料日期", prop: "submitDataTime", scope: "time" },
+        { label: "结算金额", prop: "settleMoney", leftCh: "¥" },
+      ],
+      tableData: [],
+    };
+  },
+  methods: {
+    init() {
+      this.$api[
+        this.activeData.type == 1
+          ? "settlereceiptsdata"
+          : "settlereceiptsdetaildata"
+      ](this.activeData.settleId).then((res) => {
+        if (this.activeData.type == 1) {
+          this.formData = res.data;
+        }
+        if (this.activeData.type == 2) {
+          this.tableData = res.data;
+        }
+      });
+    },
+    close() {},
+    submitForm() {},
+  },
+  computed: {
+    computedMoney: function () {
+      return function (array) {
+        let num = 0;
+        array.forEach((i) => (num += i.settleMoney));
+        return parseFloat(num);
+      };
+    },
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+#print {
+  h3 {
+    text-align: center;
+  }
+  table {
+    table-layout: fixed;
+  }
+  td {
+    vertical-align: unset;
+    p:first-child {
+      font-weight: bold;
+    }
+  }
+  /deep/ .el-step__head.is-success {
+    color: #000;
+    border-color: #000;
+  }
+  /deep/ .el-step__title.is-success {
+    color: #000;
+  }
+}
+.table2 {
+  td {
+    text-align: center;
+    word-break: break-all;
+  }
+}
+</style>

+ 225 - 0
src/views/financed/accountsPayable/supplierSettlement/quantitySettleMent/changeSupplier.vue

@@ -0,0 +1,225 @@
+<template>
+  <div>
+    <BaseDialog
+      width="600px"
+      :isShow.sync="isShow"
+      :title="activeData.orderSn ? '修改' : '添加'"
+      @submit="submitForm"
+      @close="close"
+      :appendToBody="true"
+    >
+      <el-form
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="140px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="订单号:" prop="orderSn">
+          <el-input
+            clearable
+            v-model.trim="formData.orderSn"
+            placeholder="请输入订单号"
+            @change="getOrderDetails"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="业务号:" prop="createNo">
+          <el-input
+            disabled
+            v-model="formData.createNo"
+            placeholder="请输入业务号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="业务员:" prop="createUsername">
+          <el-input
+            disabled
+            v-model="formData.createUsername"
+            placeholder="请输入业务员"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="下单客户:" prop="clientName">
+          <el-input
+            disabled
+            v-model="formData.clientName"
+            placeholder="请输入下单客户"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="姓名:" prop="userName">
+          <el-select v-model="formData.userName" placeholder="请选择姓名">
+            <el-option
+              @click.native="changeIdCard(item)"
+              v-for="(item, index) in formData.orderStudyList"
+              :key="index"
+              :label="item.userName"
+              :value="item.userName"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="身份证号:" prop="userCard">
+          <el-input
+            disabled
+            v-model="formData.userCard"
+            placeholder="请输入身份证号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="交资料日期:" prop="submitDataTime">
+          <el-date-picker
+            v-model="formData.submitDataTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            value-format="timestamp"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+    //父级参数集合
+    nowFatherActiveData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formData: {
+        orderSn: "",
+        createNo: "",
+        createUsername: "",
+        clientName: "",
+        userName: "",
+        userCard: "",
+        submitDataTime: "",
+        orderStudyList: [],
+      },
+      rules: {
+        orderSn: [{ required: true, message: "请输入订单号", trigger: "blur" }],
+        userName: [
+          { required: true, message: "请选择姓名", trigger: "change" },
+        ],
+        userCard: [
+          { required: true, message: "请输入身份证号", trigger: "blur" },
+        ],
+        submitDataTime: [
+          { required: true, message: "请选择交资料日期", trigger: "change" },
+        ],
+      },
+    };
+  },
+  methods: {
+    init() {
+      this.$nextTick(async () => {
+        if (this.activeData.orderSn) {
+          this.formData = Object.assign({}, this.activeData);
+          this.formData.submitDataTime = this.formData.submitDataTime * 1000;
+          let data = {
+            orderSn: this.formData.orderSn,
+            educationTypeId: this.nowFatherActiveData.educationTypeId,
+            projectId: this.nowFatherActiveData.projectId,
+            businessId: this.nowFatherActiveData.businessId,
+          };
+          this.$api.settleorderinfo(data).then((res) => {
+            this.$set(this.formData, "orderStudyList", res.data.orderStudyList);
+            this.$set(this.formData, "orderFrom", res.data.orderFrom);
+          });
+        }
+      });
+    },
+    getOrderDetails(value) {
+      this.$refs["formData"].resetFields();
+      this.formData.orderStudyList = [];
+      if (value) {
+        let data = {
+          orderSn: value,
+          educationTypeId: this.nowFatherActiveData.educationTypeId,
+          projectId: this.nowFatherActiveData.projectId,
+          businessId: this.nowFatherActiveData.businessId,
+        };
+        this.$api.settleorderinfo(data).then((res) => {
+          this.formData = res.data;
+          this.$refs["formData"].clearValidate();
+        });
+      }
+    },
+    changeIdCard(item) {
+      this.$set(this.formData, "userCard", item.userCard);
+      this.formData.orderGoodsId = item.orderGoodsId;
+      this.$refs["formData"].validateField("userCard");
+    },
+    close() {
+      this.$refs["formData"].resetFields();
+    },
+    submitForm() {
+      this.$refs["formData"].validate(async (valid) => {
+        if (valid) {
+          let data = {
+            orderFrom: this.formData.orderFrom,
+            orderGoodsId: this.formData.orderGoodsId,
+            orderSn: this.formData.orderSn,
+            costCatId: this.nowFatherActiveData.costCatId,
+            instId: this.nowFatherActiveData.instId,
+            educationTypeId: this.nowFatherActiveData.educationTypeId,
+            projectId: this.nowFatherActiveData.projectId,
+            businessId: this.nowFatherActiveData.businessId,
+          };
+          const res = await this.$api.settlemoney(data);
+          if (res.code == 200) {
+            let obj = Object.assign(
+              { index: this.activeData.index },
+              this.formData
+            );
+            obj.settleMoney = res.data;
+            obj.submitDataTime = parseInt(obj.submitDataTime / 1000);
+            delete obj.orderStudyList;
+            this.$emit("backData", obj);
+            this.isShow = 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>
+.el-input {
+  width: 280px;
+}
+.el-select {
+  width: 280px;
+}
+</style>

+ 312 - 0
src/views/financed/accountsPayable/supplierSettlement/quantitySettleMent/index.vue

@@ -0,0 +1,312 @@
+<template>
+  <div>
+    <BaseDialog
+      width="600px"
+      :isShow.sync="isShow"
+      title="添加"
+      @submit="submitForm"
+      @close="close"
+      confirmName="下一步"
+    >
+      <el-form
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="100px"
+        class="demo-ruleForm"
+        ><el-form-item label="标题:" prop="title">
+          <el-input
+            clearable
+            v-model="formData.title"
+            placeholder="请输入标题"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="成本分类:" prop="costCatId">
+          <el-select v-model="formData.costCatId" placeholder="请选择成本分类">
+            <el-option
+              v-for="(item, index) in topinstcategoryList"
+              :key="index"
+              :label="item.categoryName"
+              :value="item.costCatId"
+              @click.native="formData.costCatName = item.categoryName"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="供应商:" prop="instId">
+          <el-select v-model="formData.instId" placeholder="请选择供应商">
+            <el-option
+              v-for="(item, index) in topinstitutionList"
+              :key="index"
+              :label="item.instName"
+              :value="item.instId"
+              @click.native="formData.instName = item.instName"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="教育类型:" prop="educationTypeId">
+          <el-select
+            v-model="formData.educationTypeId"
+            placeholder="请选择教育类型"
+          >
+            <el-option
+              v-for="(item, index) in eduList"
+              :key="index"
+              :label="item.educationName"
+              :value="item.id"
+              @click.native="formData.educationName = item.educationName"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="培训项目:" prop="businessId">
+          <el-select v-model="formData.businessId" placeholder="请选择培训项目">
+            <el-option
+              v-for="(item, index) in businessList(formData.educationTypeId)"
+              :key="index"
+              :label="item.businessName + item.projectName"
+              :value="item.businessId"
+              @click.native="changeFormDataBusiness(item)"
+            >
+            </el-option>
+          </el-select> </el-form-item
+        ><el-form-item label="备注:" prop="remark">
+          <el-input
+            type="textarea"
+            clearable
+            v-model="formData.remark"
+            placeholder="请输入备注"
+          ></el-input> </el-form-item
+        ><el-form-item label="收款信息:" prop="bankName">
+          <el-input
+            disabled
+            clearable
+            v-model="formData.bankName"
+            placeholder="开户名"
+          ></el-input> </el-form-item
+        ><el-form-item label="" prop="bank">
+          <el-input
+            disabled
+            clearable
+            v-model="formData.bank"
+            placeholder="开户行"
+          ></el-input> </el-form-item
+        ><el-form-item label="" prop="bankAccount">
+          <el-input
+            disabled
+            clearable
+            v-model="formData.bankAccount"
+            placeholder="收款账号"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formData: {
+        title: "",
+        costCatId: "",
+        instId: "",
+        educationTypeId: "",
+        businessId: "",
+        remark: "",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        costCatId: [
+          { required: true, message: "请选择成本分类", trigger: "change" },
+        ],
+        instId: [
+          { required: true, message: "请选择供应商", trigger: "change" },
+        ],
+        educationTypeId: [
+          { required: true, message: "请选择教育类型", trigger: "change" },
+        ],
+        businessId: [
+          { required: true, message: "请选择培训项目", trigger: "change" },
+        ],
+        remark: [{ required: false, message: "请输入备注", trigger: "blur" }],
+      },
+      topinstitutionList: [], //供应商
+      eduList: [], //教育类型
+      disabledChange: false,
+    };
+  },
+  watch: {
+    "formData.costCatId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.instId) {
+          this.$set(this.formData, "instId", null);
+          this.$set(this.formData, "bank", null);
+          this.$set(this.formData, "bankAccount", null);
+          this.$set(this.formData, "bankName", null);
+        }
+        if (newVal) {
+          this.$api
+            .topinstitutionlistByCat({
+              costCatId: newVal,
+            })
+            .then((res) => {
+              this.topinstitutionList = res.rows;
+            });
+        } else {
+          this.topinstitutionList = [];
+        }
+      },
+    },
+    "formData.instId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.educationTypeId) {
+          this.$set(this.formData, "educationTypeId", null);
+        }
+        if (newVal) {
+          this.$api
+            .topcostinsttpbusinessList({
+              costCatId: this.formData.costCatId,
+              instId: this.formData.instId,
+            })
+            .then((res) => {
+              this.eduList = res.data;
+            });
+          const INDEX = this.topinstitutionList.findIndex(
+            (i) => i.instId == newVal
+          );
+          if (INDEX !== -1) {
+            this.$set(
+              this.formData,
+              "bank",
+              this.topinstitutionList[INDEX].bank
+            );
+            this.$set(
+              this.formData,
+              "bankAccount",
+              this.topinstitutionList[INDEX].bankAccount
+            );
+            this.$set(
+              this.formData,
+              "bankName",
+              this.topinstitutionList[INDEX].bankName
+            );
+          }
+        } else {
+          this.eduList = [];
+        }
+      },
+    },
+    "formData.educationTypeId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.businessId) {
+          this.$set(this.formData, "businessId", null);
+        }
+      },
+    },
+  },
+  methods: {
+    init() {
+      if (this.activeData.title) {
+        this.disabledChange = true;
+        this.formData = Object.assign({}, this.activeData);
+        setTimeout(() => {
+          this.disabledChange = false;
+        }, 300);
+      } else {
+        this.formData = {
+          title: "",
+          costCatId: "",
+          instId: "",
+          educationTypeId: "",
+          businessId: "",
+          remark: "",
+        };
+      }
+      this.$nextTick(() => {
+        this.$refs["formData"].clearValidate();
+      });
+    },
+    close() {
+      this.$refs["formData"].resetFields();
+    },
+    submitForm(type) {
+      var self = this;
+      this.$refs["formData"].validate((valid) => {
+        if (valid) {
+          let data = Object.assign({}, self.formData);
+          data.settleType = 1;
+          self.$emit("openSupplier", data);
+          self.isShow = false;
+        } else {
+          return false;
+        }
+      });
+    },
+    changeFormDataBusiness(item) {
+      this.formData.projectId = item.projectId;
+      this.formData.businessName = item.businessName + item.projectName;
+    },
+  },
+  computed: {
+    ...mapGetters(["topinstcategoryList"]),
+    businessList: function () {
+      return function (id) {
+        const INDEX = this.eduList.findIndex((i) => i.id == id);
+        return INDEX !== -1 ? this.eduList[INDEX].businessList || [] : [];
+      };
+    },
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dis_play {
+  display: flex;
+  .gz {
+    flex: 1;
+  }
+  .el-divider {
+    height: auto;
+    margin: 30px;
+  }
+  .el-date-editor--datetimerange.el-input,
+  .el-date-editor--datetimerange.el-input__inner {
+    width: 368px;
+  }
+}
+.el-input {
+  width: 220px;
+  margin-right: 10px;
+}
+.el-select {
+  width: 220px;
+  margin-right: 10px;
+}
+</style>

+ 462 - 0
src/views/financed/accountsPayable/supplierSettlement/quantitySettleMent/quantityTable.vue

@@ -0,0 +1,462 @@
+<template>
+  <div>
+    <BaseDialog
+      width="1100px"
+      :isShow.sync="isShow"
+      :title="getTypeName(activeData.type)"
+      @submit="submitForm(0)"
+      @close="close"
+      :confirmStatus="activeData.type !== 0"
+      :confirmName="activeData.type == 3 ? '通过' : '保存草稿'"
+    >
+      <div class="topBox">
+        <span
+          >标题:<strong>{{ formData.title }}</strong></span
+        >
+        <span
+          >备注:<strong>{{ formData.remark }}</strong></span
+        >
+        <span
+          >成本分类:<strong>{{ formData.costCatName }}</strong></span
+        >
+        <span
+          >教育类型:<strong>{{ formData.educationName }}</strong></span
+        >
+        <span
+          >培训项目:<strong>{{ formData.businessName }}</strong></span
+        >
+      </div>
+
+      <table-list
+        rowKey="id"
+        ref="tableList"
+        :tableSets="tableSet"
+        :tableData="formData.settleOrderVos"
+        :navText="navText"
+        :loading="loading"
+      >
+        <template slot="customize">
+          <input v-show="false" id="file" type="file" @change="exportFunc" />
+          <el-button
+            size="small"
+            type="primary"
+            v-if="activeData.type == 1"
+            @click="lastStep"
+            >上一步</el-button
+          >
+          <el-button
+            size="small"
+            type="primary"
+            @click="modifyData(-1)"
+            v-if="activeData.type == 1 || activeData.type == 2"
+            >添加</el-button
+          >
+          <el-button
+            size="small"
+            type="primary"
+            @click="exportFuncClick"
+            v-if="activeData.type == 1 || activeData.type == 2"
+            >批量导入</el-button
+          >
+          <el-button
+            size="small"
+            v-if="activeData.type == 1 || activeData.type == 2"
+            >导入模板</el-button
+          >
+          <el-button
+            size="small"
+            v-if="activeData.type == 0"
+            v-hasRole="derivePermission"
+            >导出excel</el-button
+          >
+        </template>
+        <template slot="btn" slot-scope="props">
+          <el-button
+            type="text"
+            @click="modifyData(props.scope.$index, props.scope.row)"
+            v-if="activeData.type == 1 || activeData.type == 2"
+            >修改</el-button
+          >
+          <el-button
+            type="text"
+            @click="formData.settleOrderVos.splice(props.scope.$index, 1)"
+            v-if="activeData.type == 1 || activeData.type == 2"
+            >删除</el-button
+          >
+        </template>
+      </table-list>
+      <div class="footerBox">
+        <p>
+          供应商:<strong>{{ formData.instName }}</strong>
+        </p>
+        <p>
+          结算数量:<strong>{{
+            formData.settleOrderVos ? formData.settleOrderVos.length : 0
+          }}</strong>
+        </p>
+        <p>
+          结算金额:<strong style="color: red; font-size: 16px"
+            >¥{{ getOrderAllMoney(formData.settleOrderVos) }}</strong
+          >
+        </p>
+        <p>
+          收款信息:<strong>{{
+            formData.bankName + "/" + formData.bank + "/" + formData.bankAccount
+          }}</strong>
+        </p>
+        <p>
+          审核状态:<strong>{{ getCheckStatus(formData.checkStatus) }}</strong>
+        </p>
+        <p>
+          审核意见:<strong>{{ formData.checkReason }}</strong>
+        </p>
+      </div>
+      <changeSupplier
+        :dialogVisible.sync="changeSupplier"
+        :activeData="changeSupplierActiveData"
+        :nowFatherActiveData="nowFatherActiveData"
+        @backData="backData"
+      />
+      <template slot="slotBtn" v-if="activeData.type !== 0">
+        <el-button @click="submitForm(1)">{{
+          activeData.type == 3 ? "不通过" : "提交审核"
+        }}</el-button>
+      </template>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import tableList from "@/components/tableList";
+import changeSupplier from "./changeSupplier.vue";
+export default {
+  components: {
+    tableList,
+    changeSupplier,
+  },
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formData: {
+        settleOrderVos: [],
+      },
+      loading: false, //当前表单加载是否加载动画
+      navText: {
+        title: "供应商结算",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: false,
+        addHide: true,
+        openCheckMore: false,
+        changeWidth: "120px",
+        custom: false,
+        tableHide: true,
+        backFatherBtn: {
+          status: false,
+          title: "配置下单填选模板",
+        },
+      },
+      // 表单
+      tableSet: [
+        {
+          label: "订单号",
+          prop: "orderSn",
+          hidden: true,
+        },
+        {
+          label: "业务号",
+          prop: "createNo",
+          hidden: true,
+        },
+        {
+          label: "业务员",
+          prop: "createUsername",
+          hidden: true,
+        },
+        {
+          label: "下单客户",
+          prop: "clientName",
+          hidden: true,
+        },
+        {
+          label: "姓名",
+          prop: "userName",
+          hidden: true,
+        },
+        {
+          label: "身份证",
+          prop: "userCard",
+          hidden: true,
+        },
+        {
+          label: "交资料日期",
+          prop: "submitDataTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+        {
+          label: "结算金额",
+          prop: "settleMoney",
+          hidden: true,
+          scope: "leftCh",
+          ch: "¥",
+        },
+      ],
+      tableData: [], //表单数据
+      total: 0, //一共多少条
+      changeSupplier: false,
+      changeSupplierActiveData: {},
+      nowFatherActiveData: {},
+    };
+  },
+  methods: {
+    init() {
+      if (this.activeData.type == 1 || this.activeData.type == 2) {
+        this.navText.tableHide = false;
+      } else {
+        this.navText.tableHide = true;
+      }
+      if (this.activeData.type == 1) {
+        this.formData = Object.assign({}, this.activeData);
+        this.formData.settleOrderVos = [];
+        this.navText.index = 0;
+        this.nowFatherActiveData = {
+          costCatId: this.formData.costCatId,
+          instId: this.formData.instId,
+          educationTypeId: this.formData.educationTypeId,
+          projectId: this.formData.projectId,
+          businessId: this.formData.businessId,
+        };
+      } else {
+        this.$api.settlenumdetaildata(this.activeData.settleId).then((res) => {
+          this.formData = res.data;
+          res.data.settleOrderVos = res.data.settleOrderVos || [];
+          this.navText.index = res.data.settleOrderVos?.length || 0;
+          this.nowFatherActiveData = {
+            costCatId: this.formData.costCatId,
+            instId: this.formData.instId,
+            educationTypeId: this.formData.educationTypeId,
+            projectId: this.formData.projectId,
+            businessId: this.formData.businessId,
+          };
+        });
+      }
+    },
+    //index索引 -1添加 其他为替换splice
+    modifyData(index, data) {
+      this.changeSupplierActiveData =
+        Object.assign({ index: index }, data) || {};
+      this.changeSupplier = true;
+    },
+    //返回数据
+    backData(data) {
+      console.log(data, "data");
+      if (data.index == -1) {
+        this.formData.settleOrderVos.unshift(data);
+      } else {
+        this.formData.settleOrderVos.splice(data.index, 1, data);
+      }
+      this.navText.index = this.formData.settleOrderVos?.length || 0;
+    },
+    //上一步
+    lastStep() {
+      this.$emit("lastStep", this.activeData);
+      this.isShow = false;
+    },
+    close() {},
+    submitForm(type) {
+      var self = this;
+      if (this.activeData.type == 3) {
+        if (type == 1) {
+          self
+            .$prompt("确定审核不通过吗", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              inputPlaceholder: "请输入不通过原因",
+            })
+            .then(({ value }) => {
+              let data = {
+                settleId: self.formData.settleId,
+                checkResult: type + 1,
+                checkReason: value,
+              };
+              self.$api.settlecheck(data).then((res) => {
+                self.$message.success("操作成功");
+                this.isShow = false;
+                this.$emit("search");
+              });
+            })
+            .catch(() => {});
+        } else {
+          let data = {
+            settleId: self.formData.settleId,
+            checkResult: type + 1,
+          };
+          self.$api.settlecheck(data).then((res) => {
+            self.$message.success("操作成功");
+            this.isShow = false;
+            this.$emit("search");
+          });
+        }
+      } else {
+        let data = Object.assign({}, this.formData);
+        data.settleType = 1;
+        data.status = type;
+        data.settleMoney = this.getOrderAllMoney(this.formData.settleOrderVos);
+        this.$api[
+          this.activeData.settleId ? "settlenumupdate" : "settlenumsave"
+        ](data).then((res) => {
+          this.$message.success("操作成功");
+          this.isShow = false;
+          this.$emit("search");
+        });
+      }
+    },
+    exportFuncClick() {
+      document.getElementById("file").click();
+    },
+    //批量导入
+    exportFunc(e) {
+      let formData = new FormData();
+      formData.append("file", e.target.files[0]);
+      formData.append(
+        "param",
+        JSON.stringify({
+          instId: this.formData.instId,
+          costCatId: this.formData.costCatId,
+          educationTypeId: this.formData.educationTypeId,
+          projectId: this.formData.projectId,
+          businessId: this.formData.businessId,
+        })
+      );
+      this.$api
+        .settleorderimport(formData)
+        .then((res) => {
+          this.formData.settleOrderVos.unshift(...res.data);
+          this.navText.index = this.formData.settleOrderVos?.length || 0;
+          this.$forceUpdate();
+        })
+        .finally(() => {
+          e.target.value = "";
+        });
+    },
+    //导出/下载方法
+    dowmFunc(res, k) {
+      return;
+      return new Promise((resolve, reject) => {
+        let url =
+          baseUrls.baseURL + "common/download?fileName=" + res.data[k].msg;
+        let link = document.createElement("a");
+        let fileName = "导入模板" + ".xlsx";
+        document.body.appendChild(link);
+        link.href = url;
+        link.dowmload = fileName;
+        link.click();
+        link.remove();
+        setTimeout(() => {
+          resolve();
+        }, 200);
+      });
+    },
+  },
+  computed: {
+    getCheckStatus: function () {
+      return function (i) {
+        var a = "";
+        switch (i) {
+          case 1:
+            a = "待提交";
+            break;
+          case 7:
+            a = "待审核";
+            break;
+          case 2:
+            a = "审核中";
+            break;
+          case 3:
+            a = "未通过";
+            break;
+          case 4:
+            a = "待支付";
+            break;
+          case 5:
+            a = "支付失败";
+            break;
+          case 6:
+            a = "已结算";
+            break;
+          default:
+            break;
+        }
+        return a;
+      };
+    },
+    getOrderAllMoney: function () {
+      return function (array) {
+        var money = 0;
+        array?.forEach((i) => {
+          money += parseFloat(i.settleMoney);
+        });
+        return money.toFixed(2);
+      };
+    },
+    getTypeName: function () {
+      return function (i) {
+        var a = "";
+        switch (i) {
+          case 0:
+            a = "详情";
+            break;
+          case 1:
+            a = "新增";
+            break;
+          case 2:
+            a = "修改";
+            break;
+          case 3:
+            a = "审核";
+            break;
+          default:
+            break;
+        }
+        return a;
+      };
+    },
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.topBox {
+  display: flex;
+  align-items: center;
+  margin-bottom: 14px;
+  & > span {
+    margin-right: 40px;
+  }
+}
+</style>

+ 199 - 0
src/views/financed/accountsPayable/supplierSettlement/timeSettleMent/detailsIndex.vue

@@ -0,0 +1,199 @@
+<template>
+  <div>
+    <BaseDialog
+      width="500px"
+      :isShow.sync="isShow"
+      title="详情"
+      @submit="submitForm"
+      @close="close"
+      :confirmStatus="false"
+    >
+      <div class="box" v-for="(item, index) in formList" :key="index">
+        <div class="title">{{ item.label ? item.label + ":" : "" }}</div>
+        <template v-if="item.scope === 'select'">
+          <template v-for="(items, indexs) in item.options">
+            <div v-if="formData[item.value] == items.value" class="text">
+              {{ items.label }}
+            </div>
+          </template>
+        </template>
+        <template v-else-if="item.scope === 'time'">
+          <div class="text">
+            <span>{{ $methodsTools.onlyForma(formData[item.value1]) }}</span
+            >至<span>{{ $methodsTools.onlyForma(formData[item.value2]) }}</span>
+          </div>
+        </template>
+        <div
+          class="text"
+          v-else-if="item.scope === 'money'"
+          style="color: red; font-size: 16px"
+        >
+          ¥{{ formData[item.value] }}
+        </div>
+        <div v-else class="text">{{ formData[item.value] }}</div>
+      </div>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formList: [
+        {
+          label: "标题",
+          value: "title",
+        },
+        {
+          label: "备注",
+          value: "remark",
+        },
+        {
+          label: "成本分类",
+          value: "costCatName",
+        },
+        {
+          label: "教育类型",
+          value: "educationName",
+        },
+        {
+          label: "培训项目",
+          value: "businessName",
+        },
+        {
+          label: "签约时间",
+          value1: "signStartTime",
+          value2: "signEndTime",
+          scope: "time",
+        },
+        {
+          label: "成本分摊",
+          value: "settleOrderType",
+          scope: "select",
+          options: [
+            {
+              label: "不限",
+              value: 3,
+            },
+            {
+              label: "代运营订单",
+              value: 1,
+            },
+            {
+              label: "独立订单",
+              value: 2,
+            },
+          ],
+        },
+        {
+          label: "结算金额",
+          value: "settleMoney",
+          scope: "money",
+        },
+        {
+          label: "供应商",
+          value: "instName",
+        },
+        {
+          label: "收款信息",
+          value: "bankName",
+        },
+        {
+          label: "",
+          value: "bank",
+        },
+        {
+          label: "",
+          value: "bankAccount",
+        },
+        {
+          label: "审核状态",
+          value: "checkStatus",
+          scope: "select",
+          options: [
+            { label: "待提交", value: 1 },
+            { label: "待审核", value: 7 },
+            { label: "审核中", value: 2 },
+            { label: "未通过", value: 3 },
+            { label: "待支付", value: 4 },
+            { label: "支付失败", value: 5 },
+            { label: "已结算", value: 6 },
+          ],
+        },
+        {
+          label: "审核意见",
+          value: "checkReason",
+        },
+      ],
+      formData: {},
+      settleOrderList: [
+        {
+          label: "不限",
+          value: 3,
+        },
+        {
+          label: "代运营订单",
+          value: 1,
+        },
+        {
+          label: "独立订单",
+          value: 2,
+        },
+      ], //结算订单类型
+    };
+  },
+  methods: {
+    init() {
+      this.$api.settletimedetaildata(this.activeData.settleId).then((res) => {
+        this.formData = res.data;
+      });
+    },
+    close() {},
+    submitForm() {},
+  },
+  computed: {
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.box {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  font-size: 14px;
+  .title {
+    width: 100px;
+    text-align: end;
+  }
+  .text {
+    flex: 1;
+    font-weight: bold;
+  }
+}
+</style>

+ 501 - 0
src/views/financed/accountsPayable/supplierSettlement/timeSettleMent/index.vue

@@ -0,0 +1,501 @@
+<template>
+  <div>
+    <BaseDialog
+      width="1000px"
+      :isShow.sync="isShow"
+      :title="getTypeName(activeData.type)"
+      @submit="submitForm(0)"
+      @close="close"
+      :confirmName="activeData.type == 3 ? '通过' : '保存草稿'"
+    >
+      <el-form
+        :disabled="activeData.type == 3"
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <div class="dis_play">
+          <div>
+            <el-form-item label="标题:" prop="title">
+              <el-input
+                clearable
+                v-model="formData.title"
+                placeholder="请输入标题"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="成本分类:" prop="costCatId">
+              <el-select
+                v-model="formData.costCatId"
+                placeholder="请选择成本分类"
+              >
+                <el-option
+                  v-for="(item, index) in topinstcategoryList"
+                  :key="index"
+                  :label="item.categoryName"
+                  :value="item.costCatId"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="供应商:" prop="instId">
+              <el-select v-model="formData.instId" placeholder="请选择供应商">
+                <el-option
+                  v-for="(item, index) in topinstitutionList"
+                  :key="index"
+                  :label="item.instName"
+                  :value="item.instId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="教育类型:" prop="educationTypeId">
+              <el-select
+                v-model="formData.educationTypeId"
+                placeholder="请选择教育类型"
+              >
+                <el-option
+                  v-for="(item, index) in eduList"
+                  :key="index"
+                  :label="item.educationName"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="培训项目:" prop="businessId">
+              <el-select
+                v-model="formData.businessId"
+                placeholder="请选择培训项目"
+              >
+                <el-option
+                  v-for="(item, index) in businessList(
+                    formData.educationTypeId
+                  )"
+                  :key="index"
+                  :label="item.businessName + item.projectName"
+                  :value="item.businessId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="签约时间:" prop="time">
+              <el-date-picker
+                v-model="formData.time"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始时间"
+                end-placeholder="结束时间"
+                value-format="timestamp"
+              >
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="成本分摊:" prop="settleOrderType">
+              <el-select
+                v-model="formData.settleOrderType"
+                placeholder="请选择成本分摊"
+              >
+                <el-option
+                  v-for="(item, index) in settleOrderList"
+                  :key="index"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </div>
+          <el-divider direction="vertical"></el-divider>
+          <div>
+            <el-form-item label="结算金额:" prop="settleMoney">
+              <el-input
+                clearable
+                v-model="formData.settleMoney"
+                placeholder="请输入结算金额"
+              ></el-input> </el-form-item
+            ><el-form-item label="备注:" prop="remark">
+              <el-input
+                type="textarea"
+                clearable
+                v-model="formData.remark"
+                placeholder="请输入备注"
+              ></el-input> </el-form-item
+            ><el-form-item label="收款信息:" prop="bankName">
+              <el-input
+                disabled
+                clearable
+                v-model="formData.bankName"
+                placeholder="开户名"
+              ></el-input> </el-form-item
+            ><el-form-item label="" prop="bank">
+              <el-input
+                disabled
+                clearable
+                v-model="formData.bank"
+                placeholder="开户行"
+              ></el-input> </el-form-item
+            ><el-form-item label="" prop="bankAccount">
+              <el-input
+                disabled
+                clearable
+                v-model="formData.bankAccount"
+                placeholder="收款账号"
+              ></el-input> </el-form-item
+            ><el-form-item label="审核状态:">
+              {{ getCheckStatus(formData.checkStatus) }}</el-form-item
+            ><el-form-item label="审核意见:">
+              {{
+                formData.checkReason ? formData.checkReason : "——"
+              }}</el-form-item
+            >
+          </div>
+        </div>
+      </el-form>
+      <template slot="slotBtn">
+        <el-button @click="submitForm(1)">{{
+          activeData.type == 3 ? "不通过" : "提交审核"
+        }}</el-button>
+      </template>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    activeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    var checkMinValue = (rule, value, callback) => {
+      var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
+      if (!reg.test(value)) {
+        return callback(new Error("请输入不超过两位小数点的价格数值"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      formData: {
+        title: "",
+        costCatId: "",
+        instId: "",
+        educationTypeId: "",
+        businessId: "",
+        time: [],
+        settleOrderType: "",
+        settleMoney: "",
+        remark: "",
+        checkStatus: "",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        costCatId: [
+          { required: true, message: "请选择成本分类", trigger: "change" },
+        ],
+        instId: [
+          { required: true, message: "请选择供应商", trigger: "change" },
+        ],
+        educationTypeId: [
+          { required: true, message: "请选择教育类型", trigger: "change" },
+        ],
+        businessId: [
+          { required: true, message: "请选择培训项目", trigger: "change" },
+        ],
+        time: [
+          { required: true, message: "请选择签约时间", trigger: "change" },
+        ],
+        settleOrderType: [
+          { required: true, message: "请选择成本分摊", trigger: "change" },
+        ],
+        settleMoney: [
+          { required: true, validator: checkMinValue, trigger: "blur" },
+        ],
+        remark: [{ required: false, message: "请输入备注", trigger: "blur" }],
+      },
+      topinstitutionList: [], //供应商
+      eduList: [], //教育类型
+      settleOrderList: [
+        {
+          label: "不限",
+          value: 3,
+        },
+        {
+          label: "代运营订单",
+          value: 1,
+        },
+        {
+          label: "独立订单",
+          value: 2,
+        },
+      ], //结算订单类型
+      disabledChange: false,
+    };
+  },
+  watch: {
+    "formData.costCatId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.instId) {
+          this.$set(this.formData, "instId", null);
+          this.$set(this.formData, "bank", null);
+          this.$set(this.formData, "bankAccount", null);
+          this.$set(this.formData, "bankName", null);
+        }
+        if (newVal) {
+          this.$api
+            .topinstitutionlistByCat({
+              costCatId: newVal,
+            })
+            .then((res) => {
+              this.topinstitutionList = res.rows;
+            });
+        } else {
+          this.topinstitutionList = [];
+        }
+      },
+    },
+    "formData.instId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.educationTypeId) {
+          this.$set(this.formData, "educationTypeId", null);
+        }
+        if (newVal) {
+          this.$api
+            .topcostinsttpbusinessList({
+              costCatId: this.formData.costCatId,
+              instId: this.formData.instId,
+            })
+            .then((res) => {
+              this.eduList = res.data;
+            });
+          const INDEX = this.topinstitutionList.findIndex(
+            (i) => i.instId == newVal
+          );
+          if (INDEX !== -1) {
+            this.$set(
+              this.formData,
+              "bank",
+              this.topinstitutionList[INDEX].bank
+            );
+            this.$set(
+              this.formData,
+              "bankAccount",
+              this.topinstitutionList[INDEX].bankAccount
+            );
+            this.$set(
+              this.formData,
+              "bankName",
+              this.topinstitutionList[INDEX].bankName
+            );
+          }
+        } else {
+          this.eduList = [];
+        }
+      },
+    },
+    "formData.educationTypeId": {
+      handler(newVal, oldVal) {
+        if (!this.disabledChange && this.formData.businessId) {
+          this.$set(this.formData, "businessId", null);
+        }
+      },
+    },
+  },
+  methods: {
+    init() {
+      if (this.activeData.settleId) {
+        this.disabledChange = true;
+        this.$api.settletimedetaildata(this.activeData.settleId).then((res) => {
+          res.data.time = [
+            parseInt(res.data.signStartTime * 1000),
+            parseInt(res.data.signEndTime * 1000),
+          ];
+          this.formData = res.data;
+          setTimeout(() => {
+            this.disabledChange = false;
+          }, 300);
+        });
+      } else {
+        this.formData = {
+          title: "",
+          costCatId: "",
+          instId: "",
+          educationTypeId: "",
+          businessId: "",
+          time: [],
+          settleOrderType: "",
+          settleMoney: "",
+          remark: "",
+          checkStatus: "",
+        };
+      }
+    },
+    close() {
+      this.$refs["formData"].resetFields();
+    },
+    submitForm(type) {
+      var self = this;
+      this.$refs["formData"].validate((valid) => {
+        if (valid) {
+          if (this.activeData.type == 3) {
+            if (type == 1) {
+              self
+                .$prompt("确定审核不通过吗", "提示", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  inputPlaceholder: "请输入不通过原因",
+                })
+                .then(({ value }) => {
+                  let data = {
+                    settleId: self.formData.settleId,
+                    checkResult: type + 1,
+                    checkReason: value,
+                  };
+                  self.$api.settlecheck(data).then((res) => {
+                    self.$message.success("操作成功");
+                    this.isShow = false;
+                    this.$emit("search");
+                  });
+                })
+                .catch(() => {});
+            } else {
+              let data = {
+                settleId: self.formData.settleId,
+                checkResult: type + 1,
+              };
+              self.$api.settlecheck(data).then((res) => {
+                self.$message.success("操作成功");
+                this.isShow = false;
+                this.$emit("search");
+              });
+            }
+          } else {
+            let data = Object.assign({}, this.formData);
+            data.signStartTime = parseInt(data.time[0] / 1000);
+            data.signEndTime = parseInt(data.time[1] / 1000);
+            data.settleType = 2;
+            data.status = type;
+            this.$api[
+              this.activeData.settleId ? "settletimeupdate" : "settletimesave"
+            ](data).then((res) => {
+              this.$message.success("操作成功");
+              this.isShow = false;
+              this.$emit("search");
+            });
+          }
+        } else {
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapGetters(["topinstcategoryList"]),
+    businessList: function () {
+      return function (id) {
+        const INDEX = this.eduList.findIndex((i) => i.id == id);
+        return INDEX !== -1 ? this.eduList[INDEX].businessList || [] : [];
+      };
+    },
+    getTypeName: function () {
+      return function (i) {
+        var a = "";
+        switch (i) {
+          case 0:
+            a = "详情";
+            break;
+          case 1:
+            a = "新增";
+            break;
+          case 2:
+            a = "修改";
+            break;
+          case 3:
+            a = "审核";
+            break;
+          default:
+            break;
+        }
+        return a;
+      };
+    },
+    getCheckStatus: function () {
+      return function (i) {
+        var a = "——";
+        switch (i) {
+          case 1:
+            a = "待提交";
+            break;
+          case 7:
+            a = "待审核";
+            break;
+          case 2:
+            a = "审核中";
+            break;
+          case 3:
+            a = "未通过";
+            break;
+          case 4:
+            a = "待支付";
+            break;
+          case 5:
+            a = "支付失败";
+            break;
+          case 6:
+            a = "已结算";
+            break;
+          default:
+            break;
+        }
+        return a;
+      };
+    },
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dis_play {
+  display: flex;
+  .gz {
+    flex: 1;
+  }
+  .el-divider {
+    height: auto;
+    margin: 30px;
+  }
+  .el-date-editor--datetimerange.el-input,
+  .el-date-editor--datetimerange.el-input__inner {
+    width: 368px;
+  }
+}
+.el-input {
+  width: 220px;
+  margin-right: 10px;
+}
+.el-select {
+  width: 220px;
+  margin-right: 10px;
+}
+</style>

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

@@ -41,7 +41,7 @@
         <el-button v-if="type == 0" @click="openDialog({}, 4)" type="success">
           坏账设置
         </el-button>
-        <el-button @click="batchExport" type="primary"> 导出excel </el-button>
+        <el-button @click="batchExport" type="primary" v-hasRole="derivePermission"> 导出excel </el-button>
       </template>
       <template slot="predictPayTime" slot-scope="props">
         <span v-if="props.scope.row.creditStatus == 1">已结清</span>

+ 43 - 43
src/views/financed/components/dislogOrderDetails.vue

@@ -11,25 +11,21 @@
         订单号:<span>{{ detailInfo.orderSn }}</span> 退款状态:<span>{{
           refundStatus(detailInfo.refundStatus)
         }}</span>
-        <i v-if="orderFrom === 3" style="font-style: normal"
-          >订单状态:<span>{{ checkStatus(detailInfo.checkStatus) }}</span></i
+        <i v-if="detailInfo.orderFrom === 3" style="font-style: normal"
+          >审核状态:<span>{{ checkStatus(detailInfo.checkStatus) }}</span></i
         >
         <i
-          v-if="ShowStatus && detailInfo.checkStatus === 0"
+          v-if="
+            ShowStatus &&
+            detailInfo.checkStatus === 0 &&
+            detailInfo.orderFrom !== 3
+          "
           style="float: right"
         >
-          <el-button
-            type="success"
-            size="small"
-            @click="success"
-            :disabled="orderFrom !== 3"
+          <el-button type="success" size="small" @click="success"
             >订单审核通过</el-button
           >
-          <el-button
-            type="danger"
-            size="small"
-            @click="error"
-            :disabled="orderFrom !== 3"
+          <el-button type="danger" size="small" @click="error"
             >订单审核不通过</el-button
           >
         </i>
@@ -51,13 +47,17 @@
               >
               <div v-if="desc.type === 'image'">
                 <el-image
-                v-if="detailInfo[desc.key] && detailInfo[desc.key].length > 0"
-                style="width: 40px; height: 20px;margin-right:10px;"
-                :src="detailInfo[desc.key][0]"
-                :preview-src-list="detailInfo[desc.key]"
-              >
-              </el-image>
-              <span>{{ detailInfo[desc.key] && detailInfo[desc.key].length > 0 ? '共'+detailInfo[desc.key].length+'张':'暂无转账凭证' }}</span>
+                  v-if="detailInfo[desc.key] && detailInfo[desc.key].length > 0"
+                  style="width: 40px; height: 20px; margin-right: 10px"
+                  :src="detailInfo[desc.key][0]"
+                  :preview-src-list="detailInfo[desc.key]"
+                >
+                </el-image>
+                <span>{{
+                  detailInfo[desc.key] && detailInfo[desc.key].length > 0
+                    ? "共" + detailInfo[desc.key].length + "张"
+                    : "暂无转账凭证"
+                }}</span>
               </div>
               <div v-if="desc.type === 'pretax'">
                 <span style="margin-right: 20px"
@@ -110,9 +110,9 @@
         </el-descriptions>
       </div>
       <student-details
-        v-if="isShow"
+        v-if="isShow && detailInfo.orderFrom"
         :orderSn="orderSn"
-        :orderFrom="orderFrom"
+        :orderFrom="detailInfo.orderFrom"
         :ShowStatus="ShowStatus"
         :checkStatus="detailInfo.checkStatus"
         @parentsSearch="parentsSearch"
@@ -133,12 +133,9 @@ export default {
     orderSn: {
       type: String,
     },
-    orderFrom: {
-      type: Number,
-    },
     ShowStatus: {
-      type: Boolean,
-      default: false,
+      type: Number, //1、订单详情 2、订单审核 3、机构审核
+      default: 0,
     },
   },
   data() {
@@ -147,23 +144,24 @@ export default {
         { label: "机构名称", key: "tenantName" },
         { label: "业务员", key: "createUsername" },
         { label: "业务号", key: "createNo" },
-        { label: "业务归属", key: "schemeName" },
+        { label: "下单客户", key: "purchaseOrg" },
         { label: "订单来源", key: "orderOrg" },
-        { label: "申请时间", key: "buyTime", type: "time" },
-        { label: "盈亏(元)", key: "orderProfit", type: "money" },
-        { label: "成本(元)", key: "orderCost", type: "money" },
-        { label: "合同金额(元)", key: "orderPrice", type: "money" },
-        { label: "已收账款(元)", key: "orderReceived", type: "money" },
+        { label: "业务归属", key: "schemeName" },
+        { label: "订单日期", key: "buyTime", type: "time" },
+        { label: "订单金额", key: "orderPrice", type: "money" },
+        { label: "已收账款", key: "orderReceived", type: "money" },
+        { label: "未收账款", key: "orderUncollected", type: "money" },
         { label: "申请退款", key: "orderRefund", type: "money" },
-        { label: "已退账款(元)", key: "orderRefunded", type: "money" },
-        { label: "未收账款(元)", key: "orderUncollected", type: "money" },
-        { label: "实际账款(元)", key: "orderPractical", type: "money" },
-        {
-          label: "实际订单金额(元)",
-          type: "reduce",
-        },
-        { label: "下单企业", key: "purchaseOrg" },
+        { label: "已退账款", key: "orderRefunded", type: "money" },
+        { label: "修改补款", key: "", type: "money" },
+        { label: "实际账款", key: "orderPractical", type: "money" },
+        { label: "成本", key: "orderCost", type: "money" },
+        { label: "盈亏", key: "orderProfit", type: "money" },
         { label: "转账凭证", key: "attachmentList", type: "image" },
+        { label: "附件", type: "dowm" },
+        { label: "佣金", key: "pretax", type: "pretax" },
+        { label: "佣金支付方式", key: "", type: "" },
+        { label: "佣金状态", key: "", type: "" },
         {
           label: "发票状态",
           key: "invoiceStatus",
@@ -179,12 +177,14 @@ export default {
             },
           ],
         },
-        { label: "附件", type: "dowm" },
-        { label: "佣金", key: "pretax", type: "pretax" },
+        { label: "发票申请时间", key: "", type: "time" },
+        { label: "发票金额", key: "", type: "money" },
+        { label: "完单状态", key: "", type: "money" },
         { label: "下单备注", key: "remark" },
         { label: "审核意见", key: "financeRemark" },
       ],
       detailInfo: {
+        orderFrom: null,
         attachmentList: [],
       },
     };

+ 73 - 114
src/views/financed/components/studentDetails.vue

@@ -2,85 +2,31 @@
   <div class="studentDetails">
     <el-tabs v-model="tabType" @tab-click="handleClick">
       <el-tab-pane label="学员详情" name="1">
-        <div style="margin-bottom: 10px">
-          <!-- 搜索框 -->
-          <el-select
-            v-if="false"
-            style="width: 230px; margin-right: 10px"
-            size="small"
-            v-model="formData.studyStatus"
-            clearable
-            placeholder="请选择学习状态"
-          >
-            <el-option
-              v-for="item in studyStatusList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
+        <search-box-new
+          ref="searchBox"
+          :formData="formData"
+          :formList="formList"
+          @search="search"
+          @init="search('init')"
+          ><template slot="customize">
+            <el-button
+              v-if="ShowStatus === 3"
+              type="success"
+              size="small"
+              @click="orderCheck(1, '')"
+              >批量审核</el-button
             >
-            </el-option>
-          </el-select>
-          <el-select
-            v-if="false"
-            style="width: 230px; margin-right: 10px"
-            size="small"
-            v-model="formData.refundStatus"
-            clearable
-            placeholder="请选择退款状态"
-          >
-            <el-option
-              v-for="item in refundStatusList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
+            <span style="color: rgb(110, 101, 198); margin-left: 14px"
+              >共:{{
+                tableData1.length > 0 ? tableData1[0].userCount : 0
+              }}人;{{ total }}条</span
             >
-            </el-option>
-          </el-select>
-          <el-input
-            style="width: 230px; margin-right: 10px"
-            size="small"
-            v-model.trim="formData.userName"
-            placeholder="姓名"
-          ></el-input>
-          <el-input
-            style="width: 230px; margin-right: 10px"
-            size="small"
-            v-model.trim="formData.userCard"
-            placeholder="身份证号"
-          ></el-input>
-          <el-button size="small" type="primary" @click="search"
-            >查询</el-button
-          >
-          <el-button size="small" @click="search('init')">重置</el-button>
-          <el-button size="small" type="success" @click="exportData"
-            >导出</el-button
-          >
-
-          <el-button
-            v-if="ShowStatus && isShow"
-            type="success"
-            size="small"
-            @click="orderCheck(1, '')"
-            >学员审核通过</el-button
-          >
-          <el-button
-            v-if="ShowStatus && isShow"
-            type="danger"
-            size="small"
-            @click="orderCheck(2, '不')"
-            >学员审核不通过</el-button
-          >
-          <span style="float: right; color: rgb(110, 101, 198)"
-            >共:{{ tableData1.length > 0 ? tableData1[0].userCount : 0 }}人;{{
-              total
-            }}条</span
-          >
-          <div style="clear: both"></div>
-        </div>
+          </template></search-box-new
+        >
         <table-list
           ref="tableList"
           rowKey="orderGoodsId"
-          :tableSets="tableSet1"
+          :tableSets="computedTableSet(tableSet1, ShowStatus)"
           :tableData="tableData1"
           :navText="dialogNavText1"
         >
@@ -111,11 +57,17 @@
 </template>
 
 <script>
+import searchBoxNew from "@/components/searchBoxNew";
 import { exportFn } from "@/utils/index.js";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
   name: "SaasMasterPlatformStudentDetails",
+  components: {
+    tableList,
+    pagination,
+    searchBoxNew,
+  },
   props: {
     orderSn: {
       type: String,
@@ -124,8 +76,8 @@ export default {
       type: Number,
     },
     ShowStatus: {
-      type: Boolean,
-      default: false,
+      type: Number,
+      default: 0,
     },
     checkStatus: {
       type: Number,
@@ -134,42 +86,42 @@ export default {
   },
   data() {
     return {
-      studyStatusList: [
+      //搜索
+      formList: [
         {
-          label: "未开始",
-          value: 0,
+          prop: "educationTypeId",
+          placeholder: "教育类型",
+          scope: "educationType",
+          schemeName: true,
         },
         {
-          label: "学习中",
-          value: 1,
+          prop: "businessId",
+          placeholder: "业务层次",
+          scope: "businessLevel",
+          edu: "educationTypeId",
         },
         {
-          label: "已结束",
-          value: 2,
-        },
-      ],
-      refundStatusList: [
-        {
-          label: "待审核",
-          value: 0,
-        },
-        {
-          label: "正常",
-          value: 1,
-        },
-        {
-          label: "未退款",
-          value: 2,
+          prop: "checkStatus",
+          placeholder: "订单状态",
+          scope: "select",
+          options: [
+            { label: "待审核", value: 0 },
+            { label: "已通过", value: 1 },
+          ],
         },
         {
-          label: "已完成",
-          value: 3,
+          prop: "userName",
+          placeholder: "姓名",
         },
         {
-          label: "未通过",
-          value: 4,
+          prop: "userCard",
+          placeholder: "身份证号",
         },
       ],
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+      },
       tableSet1: [
         {
           label: "姓名",
@@ -371,20 +323,27 @@ export default {
       tabType: "1",
     };
   },
+  created() {
+    this.search("init");
+  },
   computed: {
-    isShow: {
-      get() {
-        if (this.checkStatus === 1) {
-          return true;
+    computedTableSet: function () {
+      return function (array, num) {
+        if (num === 3) {
+          var ary = [
+            {
+              label: "随意",
+              prop: "tt",
+              hidden: true,
+            },
+          ];
+          return [...array, ...ary];
         } else {
-          return false;
+          return array;
         }
-      },
+      };
     },
   },
-  created() {
-    this.search("init");
-  },
   methods: {
     exportData() {
       this.$api.systemtoporderstudentexport(this.formData).then((res) => {
@@ -396,6 +355,7 @@ export default {
       });
     },
     orderCheck(e, ch) {
+      return;
       if (this.$refs.tableList.allCheckData.length === 0) {
         this.$message.error("请勾选数据");
         return;
@@ -451,10 +411,6 @@ export default {
       this.search("init");
     },
   },
-  components: {
-    tableList,
-    pagination,
-  },
 };
 </script>
 
@@ -465,4 +421,7 @@ export default {
     padding: 0;
   }
 }
+/deep/ .el-input__inner {
+  width: 120px;
+}
 </style>

+ 8 - 7
src/views/financed/orderManageList/independent/index.vue

@@ -54,7 +54,9 @@
           :false-label="0"
           >修改补款</el-checkbox
         >
-        <el-button size="small" @click="exportData">导出excel</el-button>
+        <el-button size="small" @click="exportData" v-hasRole="derivePermission"
+          >导出excel</el-button
+        >
       </template>
       <template slot="orderInfo" slot-scope="props">
         <div>机构名称:{{ props.scope.row["tenantName"] }}</div>
@@ -192,7 +194,6 @@
     <dislogOrderDetails
       :dialogVisible.sync="orderDialogVisible"
       :orderSn="orderSn"
-      :orderFrom="orderFrom"
       :ShowStatus="ShowStatus"
       @search="search"
     ></dislogOrderDetails>
@@ -457,6 +458,7 @@ export default {
         pageSize: 10,
         pageNum: 1,
         checkStatus: 0,
+        operationType: 2,
       },
       // 表单
       tableSet: [
@@ -593,8 +595,7 @@ export default {
       statisticsData: {},
       remarksOptions: [],
       orderSn: null,
-      orderFrom: null,
-      ShowStatus: false,
+      ShowStatus: 0,
       dialogVisiblecost: false,
       tpId: "",
       type: null,
@@ -750,13 +751,12 @@ export default {
     },
     openDialog(data, e) {
       if (e === 1) {
-        this.ShowStatus = true;
+        this.ShowStatus = 2;
       } else {
-        this.ShowStatus = false;
+        this.ShowStatus = 1;
       }
       this.orderInfo = data;
       this.orderSn = data.orderSn;
-      this.orderFrom = data.orderFrom;
       this.orderDialogVisible = true;
     },
     seePZ(ary) {
@@ -842,6 +842,7 @@ export default {
           pageSize: 10,
           pageNum: 1,
           checkStatus: 0,
+          operationType: 2,
         };
         this.$nextTick(() => {
           this.$refs.tableList.clearMoreActive();

+ 4 - 7
src/views/financed/orderManageList/index.vue

@@ -20,7 +20,7 @@
       <el-button type="primary" size="small" @click="editRemarks(1)"
         >修改备注</el-button
       >
-      <el-button size="small" @click="exportData">导出excel</el-button>
+      <el-button size="small" @click="exportData" v-hasRole="derivePermission">导出excel</el-button>
     </div>
     <div class="dis_flex_order_li">
       <div class="list" v-for="(item, index) in ShowTabList" :key="index">
@@ -241,7 +241,6 @@
     <dislogOrderDetails
       :dialogVisible.sync="orderDialogVisible"
       :orderSn="orderSn"
-      :orderFrom="orderFrom"
       :ShowStatus="ShowStatus"
       @search="search"
     ></dislogOrderDetails>
@@ -629,8 +628,7 @@ export default {
       statisticsData: {},
       remarksOptions: [],
       orderSn: null,
-      orderFrom: null,
-      ShowStatus: false,
+      ShowStatus: 0,
       dialogVisiblecost: false,
       tpId: "",
       type: null,
@@ -786,13 +784,12 @@ export default {
     },
     openDialog(data, e) {
       if (e === 1) {
-        this.ShowStatus = true;
+        this.ShowStatus = 2;
       } else {
-        this.ShowStatus = false;
+        this.ShowStatus = 1;
       }
       this.orderInfo = data;
       this.orderSn = data.orderSn;
-      this.orderFrom = data.orderFrom;
       this.orderDialogVisible = true;
     },
     seePZ(ary) {

+ 8 - 7
src/views/financed/orderManageList/operate/index.vue

@@ -70,7 +70,9 @@
           @click="editRemarks(1)"
           >修改备注</el-button
         >
-        <el-button size="small" @click="exportData">导出excel</el-button>
+        <el-button size="small" @click="exportData" v-hasRole="derivePermission"
+          >导出excel</el-button
+        >
       </template>
       <template slot="orderInfo" slot-scope="props">
         <div>机构名称:{{ props.scope.row["tenantName"] }}</div>
@@ -270,7 +272,6 @@
     <dislogOrderDetails
       :dialogVisible.sync="orderDialogVisible"
       :orderSn="orderSn"
-      :orderFrom="orderFrom"
       :ShowStatus="ShowStatus"
       @search="search"
     ></dislogOrderDetails>
@@ -535,6 +536,7 @@ export default {
         pageSize: 10,
         pageNum: 1,
         checkStatus: 0,
+        operationType: 1,
       },
       // 表单
       tableSet: [
@@ -671,8 +673,7 @@ export default {
       statisticsData: {},
       remarksOptions: [],
       orderSn: null,
-      orderFrom: null,
-      ShowStatus: false,
+      ShowStatus: 0,
       dialogVisiblecost: false,
       tpId: "",
       type: null,
@@ -828,13 +829,12 @@ export default {
     },
     openDialog(data, e) {
       if (e === 1) {
-        this.ShowStatus = true;
+        this.ShowStatus = 2;
       } else {
-        this.ShowStatus = false;
+        this.ShowStatus = 1;
       }
       this.orderInfo = data;
       this.orderSn = data.orderSn;
-      this.orderFrom = data.orderFrom;
       this.orderDialogVisible = true;
     },
     seePZ(ary) {
@@ -920,6 +920,7 @@ export default {
           pageSize: 10,
           pageNum: 1,
           checkStatus: 0,
+          operationType: 1,
         };
         this.$nextTick(() => {
           this.$refs.tableList.clearMoreActive();

+ 6 - 3
src/views/financed/subscription/index.vue

@@ -22,11 +22,14 @@
       @addClick="addFunc"
     >
       <template slot="customize">
-        <el-button type="primary" >批量导入</el-button>
-        <el-button type="primary" @click="exportData"
+        <el-button type="primary">批量导入</el-button>
+        <el-button
+          type="primary"
+          @click="exportData"
+          v-hasRole="derivePermission"
           >批量导出</el-button
         >
-        <el-button >导入模板</el-button>
+        <el-button>导入模板</el-button>
       </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text">删除</el-button>

+ 1 - 1
src/views/systemManagement/functional/dislog.vue

@@ -108,7 +108,7 @@ export default {
           this.$api[
             this.activeData.instId ? "edittopinstitution" : "addtopinstitution"
           ](this.formData).then((res) => {
-            this.$message.success("成功");
+            this.$message.success("操作成功");
             this.$store.commit("INSTITUTION");
             this.isShow = false;
             this.$emit("search");