diff --git a/public/index.html b/public/index.html index e6e11cc..61c6d3c 100644 --- a/public/index.html +++ b/public/index.html @@ -118,7 +118,7 @@ top: 0; width: 51%; height: 100%; - background: #197CFE; + background: #6D5EF8; z-index: 1000; -webkit-transform: translateX(0); -ms-transform: translateX(0); diff --git a/src/api/form.js b/src/api/form.js index b11e9f3..617d3f3 100644 --- a/src/api/form.js +++ b/src/api/form.js @@ -11,6 +11,14 @@ import { * */ export const common_api = { + //查码商可分配通道 + findChannelListAll: (query) => { + return request({ + url: '/carddealer/carddealerCard/findChannelListAll', + method: 'get', + params: query, + }) + }, //查询所有商户 getMerchantList: (query) => { return request({ @@ -71,13 +79,12 @@ export const common_api = { /** * 用户模块 */ - export const payAgentUser = { +export const payAgentUser = { // 更新密钥 upGoogleCaptcha: (data) => { return request({ - url: '/system/user/upGoogleCaptcha', + url: '/system/user/upGoogleCaptcha?userId='+data.userId, method: 'PUT', - data: data, headers: { Authorization: "Bearer " + getToken(), }, @@ -468,6 +475,13 @@ export const payDev = { * 收款卡 */ export const payShouCard = { + // 分配通道 + allocationChannel: (data) => { + return request({ + url: '/carddealer/carddealerCard/allocationChannel?' + qs.stringify(data), + method: 'post', + }) + }, // 清除码商卡未付 clearCarddealerCardOutstanding: (data) => { return request({ diff --git a/src/views/carddealer/carddealerCard/index.vue b/src/views/carddealer/carddealerCard/index.vue index 8559f8d..5823ea8 100644 --- a/src/views/carddealer/carddealerCard/index.vue +++ b/src/views/carddealer/carddealerCard/index.vue @@ -61,7 +61,16 @@ - + + + + + + @@ -140,6 +149,8 @@ @@ -203,10 +234,12 @@ export default { total: 0, // 卡商-银行卡表格数据 infoList: [], + findChannelList: [], // 弹出层标题 title: "", // 是否显示弹出层 open: false, + openChannel: false, // 查询参数 queryParams: { pageNum: 1, @@ -293,14 +326,16 @@ export default { this.getList(); }, methods: { - + changeChannel(e) { + this.$forceUpdate() + }, tableRowClassName({ row, rowIndex }) { if (row.dayReceiveMax == row.todayReceived) { return "greenOrder"; } - if(row.singleReceiveMax == row.singleMax){ - return "redOrder"; - } + if (row.singleReceiveMax == row.singleMax) { + return "redOrder"; + } }, timerHandler(queryParams) { listCarddealerCard(this.queryParams).then(response => { @@ -347,6 +382,7 @@ export default { // 取消按钮 cancel() { this.open = false; + this.openChannel = false; this.reset(); }, // 表单重置 @@ -372,6 +408,23 @@ export default { this.single = selection.length !== 1 this.multiple = !selection.length }, + /** 分配通道操作 */ + handleChannel(row) { + this.reset(); + if(row.channelIds.length){ + this.form.ids=row.channelIds + } + this.form.cardId = row.id + common_api.findChannelListAll({ + channelType: 1, + carddealerId: row.carddealerId + }).then(response => { + this.findChannelList = response.data + this.openChannel = true; + this.title = "分配通道"; + }); + + }, /** 新增按钮操作 */ handleAdd() { this.reset(); @@ -391,6 +444,28 @@ export default { }); }, /** 提交按钮 */ + submitFormChannel() { + if (!this.form.ids) { + this.$message.error("请选择通道"); + return; + } + if (!this.form.ids.length) { + this.$message.error("请选择通道"); + return; + } + let ids = this.form.ids.join(',') + payShouCard.allocationChannel({ + ids: ids, + cardId: this.form.cardId + }).then((res) => { + if (res.code === 200) { + this.$message.success("分配成功"); + this.openChannel = false + this.getList() + } + }); + }, + /** 提交按钮 */ submitForm() { this.$refs["form"].validate(valid => { if (valid) { @@ -461,8 +536,9 @@ export default { .greenOrder { background: #E9FEEA !important; } + .redOrder { - background: #FDF2F2 !important; + background: #FDF2F2 !important; }