|
|
@@ -0,0 +1,185 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-main ref="elMain" style="padding: 0px;">
|
|
|
+ <el-row>
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="queryForm"
|
|
|
+ class="demo-form-inline"
|
|
|
+ label-width="130px"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-form-item label="业务员工号">
|
|
|
+ <el-input v-model="queryForm.userId" placeholder="业务员工号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="提现单号">
|
|
|
+ <el-input v-model="queryForm.id" placeholder="提现单号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" size="small" @click="findPage">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ <kt-common-table
|
|
|
+ button2Type="text"
|
|
|
+ button3Type="text"
|
|
|
+ :showBatchDelete="false"
|
|
|
+ :showBatchPrint="true"
|
|
|
+ permsButton3="sys:generalizationPending:examine"
|
|
|
+ permsButton2="sys:generalizationPending:examinepay"
|
|
|
+ :data="pageResult"
|
|
|
+ :columns="columns"
|
|
|
+ @findPage="findPage"
|
|
|
+ button3Name="审核并支付"
|
|
|
+ @handleButton3="handleButton3"
|
|
|
+ button2Name="审核提现"
|
|
|
+ @handleButton2="handleButton2"
|
|
|
+ ></kt-common-table>
|
|
|
+ </el-main>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+ <script>
|
|
|
+import Cookies from "js-cookie";
|
|
|
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
|
|
|
+import KtButton from "@/views/Core/KtButton";
|
|
|
+import CommonUtil from "@/utils/comutil.js";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ KtCommonTable,
|
|
|
+ KtButton
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 右侧列表查询数据Start
|
|
|
+ queryForm: {},
|
|
|
+ pageResult: {},
|
|
|
+ pageRequest: {
|
|
|
+ //查询的默认条件
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ auditingStatus: "2"
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ //数据列
|
|
|
+ { prop: "id", label: "提现单号" },
|
|
|
+ { prop: "userId", label: "业务员工号" },
|
|
|
+ { prop: "userName", label: "业务员姓名" },
|
|
|
+ { prop: "deptId", label: "机构代码" },
|
|
|
+ { prop: "deptName", label: "机构名称" },
|
|
|
+ { prop: "userAmount ", label: "可提现账户余额" },
|
|
|
+ { prop: "amount", label: "提现金额" },
|
|
|
+ { prop: "surplusAmount", label: "账户余额" },
|
|
|
+ { prop: "bankAccount", label: "开户行" },
|
|
|
+ { prop: "bankNumber", label: "账号" },
|
|
|
+ { prop: "createTime", label: "提现时间" }
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ handlePrint(index, row) {
|
|
|
+ this.$api.task.AmountReview(this.pageRequest).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ let blob = new Blob([res], {
|
|
|
+ type: "application/vnd.ms-excel"
|
|
|
+ }); // 2.获取请求返回的response对象中的blob 设置文件类型,这里以excel为例
|
|
|
+ let url = window.URL.createObjectURL(blob); // 3.创建一个临时的url指向blob对象
|
|
|
+ // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
|
|
|
+ let a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "提现待支付清单.xlsx";
|
|
|
+ a.click();
|
|
|
+ // 5.释放这个临时的对象url
|
|
|
+ window.URL.revokeObjectURL(url);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 右侧列表的方法Start
|
|
|
+ findPage(data) {
|
|
|
+ // 获取分页数据
|
|
|
+ let that = this;
|
|
|
+ if (data && data.pageRequest) {
|
|
|
+ this.pageRequest.pageNum = data.pageRequest.pageNum;
|
|
|
+ this.pageRequest.pageSize = data.pageRequest.pageSize;
|
|
|
+ }
|
|
|
+ that.$api.task
|
|
|
+ .payqueryPage({ ...this.pageRequest, ...this.queryForm,amountStatus:'3' })
|
|
|
+ .then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.pageResult = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(data != null ? data.callback : "");
|
|
|
+ },
|
|
|
+ handleButton2({ row, index }) {
|
|
|
+ this.$api.task.AmountReview(row).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: res.msg
|
|
|
+ });
|
|
|
+ this.findPage();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleButton3({ row, index }) {
|
|
|
+ let auditid = Cookies.get("user"); // 放置token到Cookie
|
|
|
+ let auditname = Cookies.get("name"); // 放置token到Cookie
|
|
|
+ this.$confirm("是否确认审核并线下支付?", "提示", {})
|
|
|
+ .then(() => {
|
|
|
+ var data = {
|
|
|
+ applyno: row.applyno,
|
|
|
+ applystatus: "2",
|
|
|
+ auditid: auditid,
|
|
|
+ auditname: auditname,
|
|
|
+ paytime: this.formatTime(new Date().getTime(), "Y-M-D h:m:s")
|
|
|
+ };
|
|
|
+ this.$api.task.insPayApplyAudit(data).then(res => {
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.findPage(null);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "已提交"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消审核"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 格式化日期,如月、日、时、分、秒保证为2位数
|
|
|
+ formatNumber(n) {
|
|
|
+ n = n.toString();
|
|
|
+ return n[1] ? n : "0" + n;
|
|
|
+ },
|
|
|
+ // 参数number为毫秒时间戳,format为需要转换成的日期格式
|
|
|
+ formatTime(number, format) {
|
|
|
+ let time = new Date(number);
|
|
|
+ let newArr = [];
|
|
|
+ let formatArr = ["Y", "M", "D", "h", "m", "s"];
|
|
|
+ newArr.push(time.getFullYear());
|
|
|
+ newArr.push(this.formatNumber(time.getMonth() + 1));
|
|
|
+ newArr.push(this.formatNumber(time.getDate()));
|
|
|
+
|
|
|
+ newArr.push(this.formatNumber(time.getHours()));
|
|
|
+ newArr.push(this.formatNumber(time.getMinutes()));
|
|
|
+ newArr.push(this.formatNumber(time.getSeconds()));
|
|
|
+
|
|
|
+ for (let i in newArr) {
|
|
|
+ format = format.replace(formatArr[i], newArr[i]);
|
|
|
+ }
|
|
|
+ return format;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+ <style scoped>
|
|
|
+</style>
|
|
|
+
|