| | |
| | | <template> |
| | | <div class="mod-role"> |
| | | <avue-crud |
| | | ref="crud" |
| | | :page.sync="page" |
| | | :data="dataList" |
| | | :option="tableOption" |
| | | @search-change="searchChange" |
| | | @selection-change="selectionChange" |
| | | @on-load="getDataList" |
| | | :cell-class-name="addClasscolor" |
| | | @refresh-change="refreshChange" |
| | | > |
| | | <avue-crud ref="crud" :page.sync="page" :data="dataList" :option="tableOption" @search-change="searchChange" |
| | | @selection-change="selectionChange" @on-load="getDataList" :cell-class-name="addClasscolor" |
| | | @refresh-change="refreshChange"> |
| | | <template slot="menuLeft"> |
| | | <!-- Tag页 --> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <!-- Tag页 --> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="全部" name=0></el-tab-pane> |
| | | <el-tab-pane label="未审" name=1></el-tab-pane> |
| | | <el-tab-pane label="通过" name=2></el-tab-pane> |
| | |
| | | <span>{{ scope.row.repayment[1] }}</span> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="dailyRate"> |
| | | <span>{{ scope.row.dailyRate * scope.row.quota }}</span> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="lendingInstitution"> |
| | | <span>{{ scope.row.lendingInstitution[1] }}</span> |
| | | </template> |
| | | |
| | | <template slot-scope="scope" slot="menu"> |
| | | |
| | | <el-select v-if="scope.row.state[0]==1 && isAuth('mining:loan-order:operate')" |
| | | v-model="scope.row.select" |
| | | class="celectSpeac" |
| | | clearable |
| | | placeholder="操作" |
| | | @change=" |
| | | <el-select v-if="scope.row.state[0] == 1" v-model="scope.row.select" class="celectSpeac" clearable |
| | | placeholder="操作" @change=" |
| | | changeSelet( |
| | | scope.row.userId, |
| | | scope.row.select, |
| | | scope.row.userCode, |
| | | scope.row |
| | | ) |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | "> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | <el-select v-if="scope.row.state[0]==2 && isAuth('mining:loan-order:operate')" |
| | | v-model="scope.row.select" |
| | | class="celectSpeac" |
| | | clearable |
| | | placeholder="操作" |
| | | @change=" |
| | | <el-select v-if="scope.row.state[0] == 2" v-model="scope.row.select" class="celectSpeac" clearable |
| | | placeholder="操作" @change=" |
| | | changeSelet( |
| | | scope.row.userId, |
| | | scope.row.select, |
| | | scope.row.userCode, |
| | | scope.row |
| | | ) |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in options2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | "> |
| | | <el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | <el-button v-if="scope.row.state[0] == 6" type="primary" size="small" style="margin-bottom: 10px;" |
| | | @click.stop="repaymentApprove(scope.row)">还款通过</el-button> |
| | | |
| | | <el-button v-if="scope.row.state[0] == 6" type="danger" size="small" style="margin-left: 0px;" |
| | | @click.stop="repaymentReject(scope.row)">还款拒绝</el-button> |
| | | |
| | | <!-- <el-button |
| | | type="primary" |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getDataList" |
| | | ></add-or-update> |
| | | <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
| | | |
| | | <!-- 确认弹窗-start --> |
| | | <el-dialog |
| | | title="驳回原因" |
| | | :visible.sync="dialogFormVisible" |
| | | :append-to-body="true" |
| | | > |
| | | <el-form |
| | | :model="dataForm2" |
| | | ref="dataForm2" |
| | | @keyup.enter.native="dataFormSubmit()" |
| | | label-width="80px" |
| | | > |
| | | <el-form-item |
| | | label="驳回原因" |
| | | :label-width="formLabelWidth" |
| | | prop="reason" |
| | | > |
| | | <el-input |
| | | v-model="dataForm2.reason" |
| | | placeholder="请输入驳回原因" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-dialog title="驳回原因" :visible.sync="dialogFormVisible" :append-to-body="true"> |
| | | <el-form :model="dataForm2" ref="dataForm2" @keyup.enter.native="dataFormSubmit()" label-width="80px"> |
| | | <el-form-item label="驳回原因" :label-width="formLabelWidth" prop="reason"> |
| | | <el-input v-model="dataForm2.reason" placeholder="请输入驳回原因" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | <script> |
| | | import { tableOption } from "@/crud/mining/loan-order"; |
| | | import AddOrUpdate from "./loan-add-or-update"; |
| | | import { isAuth } from '@/utils' |
| | | export default { |
| | | data() { |
| | | return { |
| | | searchParams:{}, |
| | | searchParams: {}, |
| | | dataForm: {}, |
| | | dataList: [], |
| | | datetimePick:'', |
| | | datetimePick: '', |
| | | activeName: 0, |
| | | dataListLoading: false, |
| | | dataListSelections: [], |
| | |
| | | dialogFormVisible: false, |
| | | dataForm2: {}, |
| | | formLabelWidth: "120px", |
| | | row:{}, |
| | | row: {}, |
| | | }; |
| | | }, |
| | | components: { |
| | | AddOrUpdate, |
| | | }, |
| | | methods: { |
| | | isAuth, |
| | | addClasscolor({ column, row }) { |
| | | //表单样式 |
| | | if ( |
| | |
| | | ) { |
| | | return "red"; |
| | | } else if ( |
| | | (column.property === "rolename" && row.rolename == "GUEST") || |
| | | (column.property === "rolename" && row.rolename == "GUEST") || |
| | | (column.property === "state" && row.state == "submitted") |
| | | ) { |
| | | return "yellow"; |
| | |
| | | current: this.page.currentPage, |
| | | size: this.page.pageSize, |
| | | ...this.searchParams, |
| | | status:this.activeName |
| | | status: this.activeName |
| | | }), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | |
| | | var ids = id |
| | | ? [id] |
| | | : this.dataListSelections.map((item) => { |
| | | return item.roleId; |
| | | }); |
| | | return item.roleId; |
| | | }); |
| | | this.$confirm(`确定进行[${id ? "删除" : "批量删除"}]操作?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }); |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }, |
| | | changeSelet(uid, val, userCode, row) { |
| | | this.row = row; |
| | | console.log("row = " + JSON.stringify(row)); |
| | | if (val) { |
| | | |
| | | // let m = this.options[val - 1].label; //弹窗标题 |
| | | console.log("changeSelet = " + val); |
| | | switch(val) |
| | | { |
| | | case "1": //修改 |
| | | { |
| | | this.addOrUpdateHandle(row); |
| | | } |
| | | break; |
| | | case "2": //通过 |
| | | { |
| | | console.log("AAA-changeSelet = " + val); |
| | | // |
| | | this.$confirm('', '是否确认通过?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | //https://hajhiug.com/384732342/normal/loanadmin!change.action |
| | | //reason=&orderId=202cc6a1d6173c1ebd4abdfb00b5462e&statusStr=2 |
| | | console.log("/normal/loanadmin!change.action"); |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: "", |
| | | orderId: row.uuid, |
| | | statusStr: 2 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | if (data.code == 0) { |
| | | this.dataForm = data.data; |
| | | } |
| | | switch (val) { |
| | | case "1": //修改 |
| | | { |
| | | this.addOrUpdateHandle(row); |
| | | } |
| | | break; |
| | | case "2": //通过 |
| | | { |
| | | console.log("AAA-changeSelet = " + val); |
| | | // |
| | | this.$confirm('', '是否确认通过?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | //https://hajhiug.com/384732342/normal/loanadmin!change.action |
| | | //reason=&orderId=202cc6a1d6173c1ebd4abdfb00b5462e&statusStr=2 |
| | | console.log("/normal/loanadmin!change.action"); |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: "", |
| | | orderId: row.uuid, |
| | | statusStr: 2 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | if (data.code == 0) { |
| | | this.dataForm = data.data; |
| | | } |
| | | }); |
| | | |
| | | }).catch((e) => { |
| | | console.log("/normal/loanadmin!change.action fail " + JSON.stringify(e)); |
| | | }); |
| | | |
| | | }).catch((e) => { |
| | | console.log("/normal/loanadmin!change.action fail " + JSON.stringify(e)); |
| | | }); |
| | | // |
| | | } |
| | | break; |
| | | case "3": //驳回 |
| | | { |
| | | this.dialogFormVisible = true; |
| | | } |
| | | break; |
| | | case "4": //还款 |
| | | { |
| | | // |
| | | this.$confirm('', '是否确认还款?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | //https://hajhiug.com/384732342/normal/loanadmin!change.action |
| | | //reason=&orderId=202cc6a1d6173c1ebd4abdfb00b5462e&statusStr=2 |
| | | console.log("/normal/loanadmin!change.action"); |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: "", |
| | | orderId: row.uuid, |
| | | statusStr: 5 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | if (data.code == 0) { |
| | | this.dataForm = data.data; |
| | | } |
| | | // |
| | | } |
| | | break; |
| | | case "3": //驳回 |
| | | { |
| | | this.dialogFormVisible = true; |
| | | } |
| | | break; |
| | | case "4": //还款 |
| | | { |
| | | // |
| | | this.$confirm('', '是否确认还款?', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | console.log("/normal/loanadmin!change.action"); |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: "", |
| | | orderId: row.uuid, |
| | | statusStr: 5 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | if (data.code == 0) { |
| | | this.dataForm = data.data; |
| | | } |
| | | }); |
| | | |
| | | }).catch((e) => { |
| | | console.log("/normal/loanadmin!change.action fail " + JSON.stringify(e)); |
| | | }); |
| | | |
| | | }).catch((e) => { |
| | | console.log("/normal/loanadmin!change.action fail " + JSON.stringify(e)); |
| | | }); |
| | | // |
| | | } |
| | | break; |
| | | // |
| | | } |
| | | break; |
| | | } |
| | | row.select = ""; |
| | | } |
| | | }, |
| | | dataFormSubmit(){ |
| | | dataFormSubmit() { |
| | | //驳回原因 |
| | | // |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: this.dataForm2.reason, |
| | | orderId: this.row.uuid, |
| | | statusStr: 3 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | this.dialogFormVisible = false; |
| | | // if (data.code == 0) { |
| | | // this.dataForm = data.data; |
| | | // } |
| | | }); |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: this.dataForm2.reason, |
| | | orderId: this.row.uuid, |
| | | statusStr: 3 |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | this.dialogFormVisible = false; |
| | | // if (data.code == 0) { |
| | | // this.dataForm = data.data; |
| | | // } |
| | | }); |
| | | // |
| | | }, |
| | | // 刷新回调用 |
| | | refreshChange () { |
| | | refreshChange() { |
| | | console.log("refreshChange") |
| | | this.page = this.$refs.crud.$refs.tablePage.defaultPage |
| | | this.getDataList(this.page) |
| | | this.dataListSelections = [] |
| | | this.$refs.crud.selectClear() |
| | | }, |
| | | // 还款操作(通过/拒绝) |
| | | handleRepayment(row, statusStr, message) { |
| | | this.$confirm('', message, { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | console.log("/normal/loanadmin!change.action - " + message); |
| | | this.$http({ |
| | | url: this.$http.adornUrl("/normal/loanadmin!change.action"), |
| | | method: "get", |
| | | params: this.$http.adornParams(Object.assign({ |
| | | reason: "", |
| | | orderId: row.uuid, |
| | | statusStr: statusStr |
| | | })), |
| | | }).then(({ data }) => { |
| | | console.log("data => " + JSON.stringify(data)); |
| | | this.getDataList(); |
| | | if (data.code == 0) { |
| | | this.dataForm = data.data; |
| | | } |
| | | }); |
| | | }).catch((e) => { |
| | | console.log("/normal/loanadmin!change.action fail " + JSON.stringify(e)); |
| | | }); |
| | | }, |
| | | // 还款通过 |
| | | repaymentApprove(row) { |
| | | this.handleRepayment(row, 5, '是否确认还款通过?'); |
| | | }, |
| | | // 还款拒绝 |
| | | repaymentReject(row) { |
| | | this.handleRepayment(row, 7, '是否确认还款拒绝?'); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .mod-role { |
| | | } |
| | | .allBox { |
| | | overflow: hidden; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | margin: 30px 0; |
| | | } |
| | | .leDiv{ |
| | | |
| | | .leDiv { |
| | | float: left; |
| | | margin-left: 20px; |
| | | line-height: 40px; |
| | | } |
| | | .speacRead{ |
| | | |
| | | .speacRead { |
| | | font-weight: 500; |
| | | } |
| | | |
| | | ::v-deep .celectSpeac .el-input__inner { |
| | | background: #1c4efa !important; |
| | | } |
| | | |
| | | ::v-deep .celectSpeac .el-input__inner::placeholder { |
| | | color: #fff; |
| | | } |