|
|
@@ -123,6 +123,14 @@
|
|
|
|
|
|
<el-table-column label="余额" align="center" prop="money"/>
|
|
|
<el-table-column label="红包余额" align="center" prop="redPackageMoney"/>
|
|
|
+ <el-table-column label="红包商户" align="center" min-width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag v-if="scope.row.redPacketConfigId" :type="merchantTagType(scope.row.redPacketConfigId)">
|
|
|
+ {{ formatMerchantLabel(scope.row.redPacketConfigId) }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else type="info">全局当前商户</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="企业类型" align="center" prop="companyType">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="companyTypeOptions" :value="scope.row.companyType"/>
|
|
|
@@ -251,6 +259,13 @@
|
|
|
@click="handleRevenue(scope.row)"
|
|
|
v-hasPermi="['company:company:revenue']"
|
|
|
>分账配置</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="changeMerchant(scope.row)"
|
|
|
+ v-hasPermi="['his:company:edit']"
|
|
|
+ >红包商户配置</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -853,6 +868,28 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="merchantDialog.title" :visible.sync="merchantDialog.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="merchantForm" :model="merchantForm" label-width="110px">
|
|
|
+ <el-form-item label="公司">
|
|
|
+ <el-input v-model="merchantForm.companyName" disabled/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="红包商户">
|
|
|
+ <el-select v-model="merchantForm.redPacketConfigId" placeholder="不选则走全局当前商户" clearable filterable style="width: 100%">
|
|
|
+ <el-option
|
|
|
+ v-for="item in merchantOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="formatMerchantOption(item)"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitMerchantForm">确 定</el-button>
|
|
|
+ <el-button @click="merchantDialog.open=false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -874,7 +911,9 @@ import {
|
|
|
setDiv, exitMiniProgram,
|
|
|
getGatewayCompanyList,
|
|
|
listCourseMaAppOptions,
|
|
|
- changeWatchPasswordEnabled
|
|
|
+ changeWatchPasswordEnabled,
|
|
|
+ changeRedPacketMerchant,
|
|
|
+ listRedPacketMerchantOptions
|
|
|
} from '@/api/his/company'
|
|
|
import { getFollowDoctorList } from '@/api/his/doctor'
|
|
|
import { docList } from '@/api/his/doctor'
|
|
|
@@ -1099,6 +1138,16 @@ export default {
|
|
|
// 原始sipExtNumIds值(用于比较新旧值)
|
|
|
originalSipExtNumIds: null,
|
|
|
submitFormLoading:false,
|
|
|
+ merchantDialog: {
|
|
|
+ open: false,
|
|
|
+ title: '红包商户配置'
|
|
|
+ },
|
|
|
+ merchantForm: {
|
|
|
+ companyId: null,
|
|
|
+ companyName: null,
|
|
|
+ redPacketConfigId: null
|
|
|
+ },
|
|
|
+ merchantOptions: [],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -1129,8 +1178,50 @@ export default {
|
|
|
docList().then(response => {
|
|
|
this.doctor = response.rows
|
|
|
})
|
|
|
+ this.loadMerchantOptions()
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeMerchant(row) {
|
|
|
+ this.loadMerchantOptions()
|
|
|
+ this.merchantForm.companyId = row.companyId
|
|
|
+ this.merchantForm.companyName = row.companyName
|
|
|
+ this.merchantForm.redPacketConfigId = row.redPacketConfigId || null
|
|
|
+ this.merchantDialog.open = true
|
|
|
+ },
|
|
|
+ submitMerchantForm() {
|
|
|
+ changeRedPacketMerchant({
|
|
|
+ companyId: this.merchantForm.companyId,
|
|
|
+ redPacketConfigId: this.merchantForm.redPacketConfigId || null
|
|
|
+ }).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess(response.msg || '设置成功')
|
|
|
+ this.merchantDialog.open = false
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loadMerchantOptions() {
|
|
|
+ listRedPacketMerchantOptions().then(response => {
|
|
|
+ this.merchantOptions = response.data || []
|
|
|
+ }).catch(() => {
|
|
|
+ this.merchantOptions = []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ formatMerchantOption(item) {
|
|
|
+ if (!item) {
|
|
|
+ return ''
|
|
|
+ }
|
|
|
+ const type = item.isNew === 1 ? '新商户' : '老商户'
|
|
|
+ return type + ' ' + (item.mchId || '')
|
|
|
+ },
|
|
|
+ formatMerchantLabel(configId) {
|
|
|
+ const item = this.merchantOptions.find(o => o.id == configId)
|
|
|
+ return item ? this.formatMerchantOption(item) : ('配置ID ' + configId)
|
|
|
+ },
|
|
|
+ merchantTagType(configId) {
|
|
|
+ const item = this.merchantOptions.find(o => o.id == configId)
|
|
|
+ return item && item.isNew === 1 ? 'success' : 'info'
|
|
|
+ },
|
|
|
// 添加分账账户
|
|
|
addAcctInfo() {
|
|
|
console.log("-----------------",this.revenueForm)
|