|
@@ -68,25 +68,6 @@
|
|
|
v-hasPermi="['redPacket:more:remove']"
|
|
v-hasPermi="['redPacket:more:remove']"
|
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-tag
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="large"
|
|
|
|
|
- style="font-size: 16px;"
|
|
|
|
|
- >
|
|
|
|
|
- 当前使用的商户号:{{this.redPacketMchId}}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="success"
|
|
|
|
|
- plain
|
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="handleEditRedPacket"
|
|
|
|
|
- v-hasPermi="['redPacket:more:editRedPacket']"
|
|
|
|
|
- >修改当前发送的红包的商户号</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
@@ -110,6 +91,12 @@
|
|
|
<el-table-column label="pub_key.pem证书" align="center" prop="publicKeyPath" />
|
|
<el-table-column label="pub_key.pem证书" align="center" prop="publicKeyPath" />
|
|
|
<el-table-column label="回调地址" align="center" prop="notifyUrl" />
|
|
<el-table-column label="回调地址" align="center" prop="notifyUrl" />
|
|
|
<el-table-column label="回调地址" align="center" prop="notifyUrlScrm" />
|
|
<el-table-column label="回调地址" align="center" prop="notifyUrlScrm" />
|
|
|
|
|
+ <el-table-column label="分配租户" align="center" prop="tenantName" :show-overflow-tooltip="true">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-tag v-if="scope.row.tenantId" type="success" size="small">{{ scope.row.tenantName || scope.row.tenantId }}</el-tag>
|
|
|
|
|
+ <el-tag v-else type="info" size="small">未分配</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -183,31 +170,24 @@
|
|
|
<el-form-item label="回调地址" prop="notifyUrlScrm">
|
|
<el-form-item label="回调地址" prop="notifyUrlScrm">
|
|
|
<el-input v-model="form.notifyUrlScrm" placeholder="请输入回调地址notifyUrlScrm" />
|
|
<el-input v-model="form.notifyUrlScrm" placeholder="请输入回调地址notifyUrlScrm" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <el-dialog :title="redPacketOpen.title" :visible.sync="redPacketOpen.open" width="600px" append-to-body>
|
|
|
|
|
- <el-form ref="redPacketOpen" :model="redPacketOpen" label-width="110px">
|
|
|
|
|
- <el-form-item label="商户号" prop="cateId">
|
|
|
|
|
- <el-select v-model="redPacketOpen.newChangeMchId" placeholder="请选择" clearable size="small">
|
|
|
|
|
|
|
+ <el-form-item label="分配租户" prop="tenantId">
|
|
|
|
|
+ <el-select v-model="form.tenantId" placeholder="请选择要分配的租户(同步到租户库)" clearable style="width: 100%;">
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="dict in moreList"
|
|
|
|
|
- :key="dict.mchId"
|
|
|
|
|
- :label="dict.mchId"
|
|
|
|
|
- :value="dict.mchId"
|
|
|
|
|
|
|
+ v-for="item in tenantList"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ :label="item.tenantName + ' (' + item.tenantCode + ')'"
|
|
|
|
|
+ :value="item.id"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
+ <div class="form-tip">选择租户后,该商户配置将同步到指定租户的数据库中</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitFormChangeMchId">确 定</el-button>
|
|
|
|
|
- <el-button @click="cancelChangeMchId">取 消</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -218,8 +198,7 @@ import {
|
|
|
delMore,
|
|
delMore,
|
|
|
addMore,
|
|
addMore,
|
|
|
updateMore,
|
|
updateMore,
|
|
|
- getRedPacketMchId,
|
|
|
|
|
- updateChangeMchId
|
|
|
|
|
|
|
+ getTenantList
|
|
|
} from '@/api/his/redPacketConfig'
|
|
} from '@/api/his/redPacketConfig'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -240,15 +219,10 @@ export default {
|
|
|
showSearch: true,
|
|
showSearch: true,
|
|
|
// 总条数
|
|
// 总条数
|
|
|
total: 0,
|
|
total: 0,
|
|
|
- redPacketMchId: null,
|
|
|
|
|
- redPacketOpen:{
|
|
|
|
|
- open:false,
|
|
|
|
|
- title:null,
|
|
|
|
|
- oldChangeMchId:null,
|
|
|
|
|
- newChangeMchId:null,
|
|
|
|
|
- },
|
|
|
|
|
// 多商户配置表格数据
|
|
// 多商户配置表格数据
|
|
|
moreList: [],
|
|
moreList: [],
|
|
|
|
|
+ // 租户列表
|
|
|
|
|
+ tenantList: [],
|
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
|
title: "",
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -275,13 +249,11 @@ export default {
|
|
|
form: {},
|
|
form: {},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {},
|
|
rules: {},
|
|
|
- redPacketOpenRule:{
|
|
|
|
|
- newChangeMchId:[{ required: true, trigger: "blur", message: "商户号不能为空" }]
|
|
|
|
|
- },
|
|
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
|
|
+ this.loadTenantList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
/** 查询多商户配置列表 */
|
|
/** 查询多商户配置列表 */
|
|
@@ -293,21 +265,12 @@ export default {
|
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
});
|
|
});
|
|
|
- getRedPacketMchId().then(res=>{
|
|
|
|
|
- this.redPacketMchId=res.data
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.reset();
|
|
this.reset();
|
|
|
},
|
|
},
|
|
|
- cancelChangeMchId() {
|
|
|
|
|
- this.redPacketOpen.open=false;
|
|
|
|
|
- this.redPacketOpen.title=false;
|
|
|
|
|
- this.redPacketOpen.oldChangeMchId=false;
|
|
|
|
|
- this.redPacketOpen.newChangeMchId=false;
|
|
|
|
|
- },
|
|
|
|
|
// 表单重置
|
|
// 表单重置
|
|
|
reset() {
|
|
reset() {
|
|
|
this.form = {
|
|
this.form = {
|
|
@@ -324,10 +287,17 @@ export default {
|
|
|
publicKeyId: null,
|
|
publicKeyId: null,
|
|
|
publicKeyPath: null,
|
|
publicKeyPath: null,
|
|
|
notifyUrl: null,
|
|
notifyUrl: null,
|
|
|
- notifyUrlScrm: null
|
|
|
|
|
|
|
+ notifyUrlScrm: null,
|
|
|
|
|
+ tenantId: null
|
|
|
};
|
|
};
|
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
|
},
|
|
},
|
|
|
|
|
+ // 加载租户列表
|
|
|
|
|
+ loadTenantList() {
|
|
|
|
|
+ getTenantList().then(res => {
|
|
|
|
|
+ this.tenantList = res.data || [];
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
this.queryParams.pageNum = 1;
|
|
@@ -360,11 +330,6 @@ export default {
|
|
|
this.title = "修改多商户配置";
|
|
this.title = "修改多商户配置";
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleEditRedPacket(){
|
|
|
|
|
- this.redPacketOpen.open= true;
|
|
|
|
|
- this.redPacketOpen.title="修改发送红包的商户号";
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
@@ -385,39 +350,29 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
- /** 提交修改发送红包的商户号- */
|
|
|
|
|
- submitFormChangeMchId() {
|
|
|
|
|
- this.$refs["redPacketOpen"].validate(valid => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- this.redPacketOpen.oldChangeMchId=this.redPacketMchId;
|
|
|
|
|
- if (this.redPacketOpen.newChangeMchId==null){
|
|
|
|
|
- return this.$message.error("修改的商户号不能为空")
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- updateChangeMchId(this.redPacketOpen).then(response => {
|
|
|
|
|
- this.msgSuccess("修改成功");
|
|
|
|
|
- this.cancelChangeMchId();
|
|
|
|
|
- this.getList();
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|
|
|
this.$confirm('是否确认删除多商户配置编号为"' + ids + '"的数据项?', "警告", {
|
|
this.$confirm('是否确认删除多商户配置编号为"' + ids + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
- type: "warning"
|
|
|
|
|
- }).then(function() {
|
|
|
|
|
- return delMore(ids);
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning"
|
|
|
|
|
+ }).then(function() {
|
|
|
|
|
+ return delMore(ids);
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
|
|
+ }).catch(() => {});
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.form-tip {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+ margin-top: 5px;
|
|
|
|
|
+ line-height: 1.4;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|