@@ -18,7 +18,7 @@ export const interfaceManage = [ | |||
{ | |||
path: "/views/interfaceManage/channelConfig", | |||
name: "channelConfig", | |||
meta: { title: "来源方配置", isAuth: true }, //用户自定内容 | |||
meta: { title: "渠道方配置", isAuth: true }, //用户自定内容 | |||
components: { | |||
key: () => import("@/views/interfaceManage/channelConfig/index.vue"), | |||
}, |
@@ -21,7 +21,7 @@ | |||
clearable | |||
v-model="searchForm.sourceIdentId" | |||
style="width: 200px" | |||
placeholder="请输入来源方ID" | |||
placeholder="请输入appId" | |||
/> | |||
<el-input | |||
maxlength="60" | |||
@@ -39,6 +39,21 @@ | |||
style="width: 200px" | |||
placeholder="请输入机构编码" | |||
/> | |||
<!-- <el-select | |||
clearable | |||
v-model="searchForm.institutionalCode" | |||
style="width: 280px" | |||
placeholder="请选择渠道" | |||
v-if="typeOption !== 'view'" | |||
filterable | |||
> | |||
<el-option | |||
v-for="item in appidOptions" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
/> | |||
</el-select> --> | |||
<el-select | |||
clearable | |||
v-model="searchForm.status" | |||
@@ -115,16 +130,31 @@ | |||
/> | |||
<span v-else>{{ addForm.sourceIdentId }}</span> | |||
</el-form-item> | |||
<el-form-item label="渠道名称:" prop="sourceIdentName"> | |||
<el-input | |||
<el-form-item label="渠道名称:" prop="institutionalCode"> | |||
<el-select | |||
clearable | |||
v-model="addForm.institutionalCode" | |||
style="width: 100%" | |||
placeholder="请选择渠道" | |||
v-if="typeOption !== 'view'" | |||
@change="institutionalCodeChange" | |||
filterable | |||
> | |||
<el-option | |||
v-for="item in appidOptions" | |||
:key="item.value" | |||
:label="item.label" | |||
:value="item.value" | |||
/> | |||
</el-select> | |||
<!-- <el-input | |||
maxlength="60" | |||
v-trim | |||
clearable | |||
v-model="addForm.sourceIdentName" | |||
placeholder="请输入渠道名称" | |||
v-if="typeOption !== 'view'" | |||
/> | |||
/> --> | |||
<span v-else>{{ addForm.sourceIdentName }}</span> | |||
</el-form-item> | |||
<el-form-item label="机构编码:" prop="institutionalCode"> | |||
@@ -134,6 +164,7 @@ | |||
clearable | |||
v-model="addForm.institutionalCode" | |||
placeholder="请输入机构编码" | |||
:disabled="true" | |||
v-if="typeOption !== 'view'" | |||
/> | |||
<span v-else>{{ addForm.institutionalCode }}</span> | |||
@@ -350,6 +381,7 @@ const copys = async (data) => { | |||
copyInput.remove() // 移除元素 | |||
} | |||
} | |||
const searchForm = ref({ | |||
sourceIdentId: '', //来源方ID | |||
sourceIdentName: '', //来源方名称 | |||
@@ -598,6 +630,31 @@ function getList() { | |||
} | |||
}) | |||
} | |||
const appidOptions = ref<any>([]) | |||
const getAppidOptions = () => { | |||
BaseService.post('/userw/agency/listByNameLike', { name: '黔通' }).then( | |||
(res: any) => { | |||
if (res && res.code === 0) { | |||
let bizContent = res.data | |||
console.log('====interfaceConfig', bizContent) | |||
appidOptions.value = bizContent.map((item) => { | |||
return { | |||
value: item.key, | |||
label: item.value, | |||
} | |||
}) | |||
} else { | |||
ElMessage.error(res.message) | |||
} | |||
formLoding.value = false | |||
} | |||
) | |||
} | |||
function institutionalCodeChange(val) { | |||
addForm.value.sourceIdentName = appidOptions.value.find( | |||
(item) => item.value === val | |||
)?.label | |||
} | |||
function getRow(id: string) { | |||
BaseService.post('/ifmw/ident/querybyid', { id: id }).then((res: any) => { | |||
if (res && res.code === 0) { | |||
@@ -615,14 +672,19 @@ function getRow(id: string) { | |||
} | |||
onMounted(() => { | |||
getList() | |||
getAppidOptions() | |||
}) | |||
function resetKey(row, type) { | |||
let text = type === 'SM3' ? '签名密钥' : '加密密钥' | |||
ElMessageBox.confirm(`确定要重置 ${row.sourceIdentName} 的 ${text}吗?`, '提示', { | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning', | |||
}).then(() => { | |||
ElMessageBox.confirm( | |||
`确定要重置 ${row.sourceIdentName} 的 ${text}吗?`, | |||
'提示', | |||
{ | |||
confirmButtonText: '确定', | |||
cancelButtonText: '取消', | |||
type: 'warning', | |||
} | |||
).then(() => { | |||
// 确定 | |||
BaseService.post('/ifmw/secret/reset', { | |||
sourceIdentId: row.sourceIdentId, |
@@ -97,6 +97,7 @@ | |||
</crud-template> | |||
</div> | |||
</template> | |||
<!-- 推广发行产品 --> | |||
<script setup lang="ts"> | |||
import { | |||
ref, | |||
@@ -158,21 +159,6 @@ function handleChangeReason(b) { | |||
} | |||
}) | |||
} | |||
const agencyqueryallListOptions = ref([]) | |||
function handleget(idx: any, row: any) { | |||
const data = toRaw(row) | |||
BaseService.post('/managew/api/product/promoteDistribute/del', { | |||
promoteId: data.promoteId, | |||
}).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success('删除成功') | |||
getList() | |||
cancel() | |||
} else { | |||
ElMessage.error(res.message || res.errorMsg) | |||
} | |||
}) | |||
} | |||
function completeAudit() { | |||
getList() | |||
@@ -211,7 +197,7 @@ function handleChangeInfo(form) { | |||
assignment(form, '') | |||
} | |||
const afterSaleFeesList = ref([]) | |||
const afterSaleRef = ref(null) | |||
const afterSaleRef = ref<any>(null) | |||
// 编辑按钮 | |||
function handleEdit(idx: any, row: any) { | |||
typeOption.value = 'edit' | |||
@@ -239,18 +225,7 @@ function handleEdit(idx: any, row: any) { | |||
handleEditKou(row) | |||
handleAfterFee(row) | |||
} | |||
function handleNumToStr(arr: any) { | |||
let newArr: any = [] | |||
if (typeof arr === 'number') { | |||
return arr.toString() | |||
} | |||
if (Array.isArray(arr)) { | |||
arr.forEach((item) => { | |||
newArr.push(handleNumToStr(item) || '') | |||
}) | |||
} | |||
return newArr | |||
} | |||
function handleAfterFee(data) { | |||
data.afterSaleFees.forEach((item) => { | |||
item.fee = item.fee / 100 | |||
@@ -339,34 +314,40 @@ function submit(data: any) { | |||
let text = isFeeListType.value === 1 ? '办理费' : '使用费' | |||
feeListRef.value.ruleFormRef.validate((valid: any, fields: any) => { | |||
if (!valid) return ElMessage.error(`${text} 存在必填项为空!`) | |||
afterSaleRef.value.ruleFormRef.validate((valid: any, fields: any) => { | |||
afterSaleRef.value?.ruleFormRef.validate((valid: any, fields: any) => { | |||
if (!valid) return ElMessage.error(`售后费存在必填项为空!`) | |||
msgConfirm( | |||
`当前扣款配置会影响产品办理费和通行费的收取,请慎重决定`, | |||
typeTy.warning | |||
).then(() => { | |||
let api = '/managew/api/product/promoteDistribute/add' | |||
let api = '/managew/api/product/promoteDistribute/add' | |||
let datas = JSON.parse(JSON.stringify(toRaw(data))) | |||
if (typeOption.value === 'edit') { | |||
api = '/managew/api/product/promoteDistribute/update' | |||
} | |||
datas.channelList = datas.agencyId | |||
if (isFeeListType.value == 1) { | |||
datas.processingFeeList = feeListData.value | |||
} else { | |||
datas.useFeeList = feeListData.value | |||
} | |||
afterSaleFeesList.value | |||
datas.afterSaleFees = JSON.parse(JSON.stringify(afterSaleFeesList.value)) | |||
datas.afterSaleFees.forEach((item) => { | |||
item.fee = item.fee * 100 | |||
}) | |||
console.log(data, datas, '修改新增请求') | |||
datas.issueScope = issueScopeData.value | |||
BaseService.post(api, datas).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success('操作成功') | |||
getList() | |||
cancel() | |||
let datas = JSON.parse(JSON.stringify(toRaw(data))) | |||
if (typeOption.value === 'edit') { | |||
api = '/managew/api/product/promoteDistribute/update' | |||
} | |||
datas.channelList = datas.agencyId | |||
if (isFeeListType.value == 1) { | |||
datas.processingFeeList = feeListData.value | |||
} else { | |||
datas.useFeeList = feeListData.value | |||
} | |||
afterSaleFeesList.value | |||
datas.afterSaleFees = JSON.parse( | |||
JSON.stringify(afterSaleFeesList.value) | |||
) | |||
datas.afterSaleFees.forEach((item) => { | |||
item.fee = item.fee * 100 | |||
}) | |||
console.log(data, datas, '修改新增请求') | |||
datas.issueScope = issueScopeData.value | |||
BaseService.post(api, datas).then((res: any) => { | |||
if (res && res.statusCode === 0) { | |||
ElMessage.success('操作成功') | |||
getList() | |||
cancel() | |||
} | |||
}) | |||
}) | |||
}) | |||
}) | |||
@@ -914,7 +895,7 @@ let field = ref({ | |||
{ | |||
prop: 'isFeeListTitle', | |||
hide: true, | |||
label: isFeeListTitle, | |||
label: '办理费/使用费', | |||
form: { | |||
width: '90%', | |||
type: 'title', |
@@ -781,7 +781,7 @@ const IS_Tymy = [ | |||
{ value: true, label: '是' }, | |||
{ value: false, label: '否' }, | |||
] | |||
// 费用类型 | |||
// 收费方式 | |||
const expenseTypeOptions = [ | |||
{ value: 1, label: '办理费' }, | |||
{ value: 2, label: '使用费' }, | |||
@@ -2241,7 +2241,7 @@ let field = ref<any>({ | |||
}, | |||
{ | |||
prop: 'expenseType', | |||
label: '费用类型', | |||
label: '收费方式', | |||
hide: true, | |||
listData: expenseTypeOptions, | |||
form: { |