|
|
@@ -0,0 +1,365 @@
|
|
|
+<template>
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="data"
|
|
|
+ :page.sync="page"
|
|
|
+ :permission="permissionList"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ v-model="form"
|
|
|
+ ref="crud"
|
|
|
+ @row-update="rowUpdate"
|
|
|
+ @row-save="rowSave"
|
|
|
+ @row-del="rowDel"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="searchReset"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @current-change="currentChange"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @on-load="onLoad">
|
|
|
+ <template slot-scope="scope" slot="productInfo">
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ title="全部内容"
|
|
|
+ width="400"
|
|
|
+ trigger="hover"
|
|
|
+ :content="scope.row.productInfo">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :autosize="{ minRows: 1, maxRows: 10}"
|
|
|
+ ref="generateMenuJson"
|
|
|
+ readonly
|
|
|
+ v-model="scope.row.productInfo">
|
|
|
+ </el-input>
|
|
|
+ <p slot="reference" style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap">{{scope.row.productInfo}}</p>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ <template slot="operate" slot-scope="scope">
|
|
|
+ <a v-if="scope.row.applicationStatus===AGREEMENT_SIGNING" target="_blank">{{scope.row.agreementSignUrl}}</a>
|
|
|
+ <p v-if="scope.row.applicationStatus===REVIEW_BACK || scope.row.applicationStatus===COMPLETED">{{scope.row.agreementSignUrl}}</p>
|
|
|
+ <p v-if="scope.row.applicationStatus===AUTHENTICITY_VERIFYING" v-text="progressDescriptionSwitch(scope.row.progressDescription)"></p>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button icon="el-icon-view" :type="scope.type" :size="scope.size" @click="()=>{
|
|
|
+ dialog.state = true;
|
|
|
+ dialog.data = scope.row.productInfo;
|
|
|
+ }">产品费率</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <el-dialog
|
|
|
+ title="修改产品费率"
|
|
|
+ :visible.sync="dialog.state"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :append-to-body="true"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ width="50%">
|
|
|
+ <product-fee v-bind:product-info="dialog.data"></product-fee>
|
|
|
+ </el-dialog>
|
|
|
+ </basic-container>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {getList, getDetail, add, update, remove} from "@/api/ldt_product_fee/productfee";
|
|
|
+ import {mapGetters} from "vuex";
|
|
|
+ import ProductFee from "./comps/product-fee"
|
|
|
+
|
|
|
+ export default {
|
|
|
+ components:{ProductFee},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialog:{
|
|
|
+ state: false,
|
|
|
+ data: {}
|
|
|
+ },
|
|
|
+ form: {},
|
|
|
+ query: {},
|
|
|
+ loading: true,
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ selectionList: [],
|
|
|
+ option: {
|
|
|
+ height:'auto',
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "请求号",
|
|
|
+ prop: "requestNo",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入请求号",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "商户编号",
|
|
|
+ prop: "merchantNo",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入商户编号",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "变更的产品信息",
|
|
|
+ prop: "productInfo",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入变更的产品信息",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "入网申请编号",
|
|
|
+ prop: "applicationNo",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入入网申请编号",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "申请状态",
|
|
|
+ prop: "applicationStatus",
|
|
|
+ dicData:[
|
|
|
+ {
|
|
|
+ label:"申请审核中",
|
|
|
+ value:"REVIEWING"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:"申请已驳回",
|
|
|
+ value:"REVIEW_BACK"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:"真实性验证中",
|
|
|
+ value:"AUTHENTICITY_VERIFYING"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:"协议待签署",
|
|
|
+ value:"AGREEMENT_SIGNING"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:"业务开通中",
|
|
|
+ value:"BUSINESS_OPENING"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:"申请已完成",
|
|
|
+ value:"COMPLETED"
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入申请状态",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "操作说明",
|
|
|
+ prop: "operate",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入操作说明",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "协议签署地址",
|
|
|
+ // prop: "agreementSignUrl",
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入协议签署地址",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "审核意见",
|
|
|
+ // prop: "auditOpinion",
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入审核意见",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "入网进度说明",
|
|
|
+ // prop: "progressDescription",
|
|
|
+ // dicData: [
|
|
|
+ // {
|
|
|
+ // label: "待邮箱验证",
|
|
|
+ // value: "EMAIL_VERIFY"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "待短信验证",
|
|
|
+ // value: "MOBILE_VERIFY"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "待打款验资",
|
|
|
+ // value: "REMIT_AUTH"
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "请输入入网进度说明",
|
|
|
+ // trigger: "blur"
|
|
|
+ // }]
|
|
|
+ // },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ data: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["permission"]),
|
|
|
+ permissionList() {
|
|
|
+ return {
|
|
|
+ addBtn: this.vaildData(this.permission.productfee_add, false),
|
|
|
+ viewBtn: this.vaildData(this.permission.productfee_view, false),
|
|
|
+ delBtn: this.vaildData(this.permission.productfee_delete, false),
|
|
|
+ editBtn: this.vaildData(this.permission.productfee_edit, false)
|
|
|
+ };
|
|
|
+ },
|
|
|
+ ids() {
|
|
|
+ let ids = [];
|
|
|
+ this.selectionList.forEach(ele => {
|
|
|
+ ids.push(ele.id);
|
|
|
+ });
|
|
|
+ return ids.join(",");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ rowSave(row, done, loading) {
|
|
|
+ add(row).then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ }, error => {
|
|
|
+ loading();
|
|
|
+ window.console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ update(row).then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ }, error => {
|
|
|
+ loading();
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ rowDel(row) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return remove(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleDelete() {
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return remove(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ progressDescriptionSwitch(value){
|
|
|
+ switch (value){
|
|
|
+ case "EMAIL_VERIFY":
|
|
|
+ return "待邮箱验证";
|
|
|
+ case "MOBILE_VERIFY":
|
|
|
+ return "待短信验证";
|
|
|
+ case "REMIT_AUTH":
|
|
|
+ return "待打款验资";
|
|
|
+ default:
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeOpen(done, type) {
|
|
|
+ if (["edit", "view"].includes(type)) {
|
|
|
+ getDetail(this.form.id).then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ searchReset() {
|
|
|
+ this.query = {};
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ searchChange(params, done) {
|
|
|
+ this.query = params;
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page, params);
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list;
|
|
|
+ },
|
|
|
+ selectionClear() {
|
|
|
+ this.selectionList = [];
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ },
|
|
|
+ currentChange(currentPage){
|
|
|
+ this.page.currentPage = currentPage;
|
|
|
+ },
|
|
|
+ sizeChange(pageSize){
|
|
|
+ this.page.pageSize = pageSize;
|
|
|
+ },
|
|
|
+ refreshChange() {
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
+ },
|
|
|
+ onLoad(page, params = {}) {
|
|
|
+ this.loading = true;
|
|
|
+ if(this.$route.params.type==="mall"){
|
|
|
+ params.mallId = this.$route.params.id;
|
|
|
+ }else{
|
|
|
+ params.shopId = this.$route.params.id;
|
|
|
+ }
|
|
|
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
|
|
|
+ const data = res.data.data;
|
|
|
+ this.page.total = data.total;
|
|
|
+ this.data = data.records;
|
|
|
+ this.loading = false;
|
|
|
+ this.selectionClear();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+</style>
|