提交
This commit is contained in:
@@ -1,21 +1,57 @@
|
||||
<template>
|
||||
<el-form :model="form" ref="formRef" label-width="auto">
|
||||
<el-form-item label="售后申请自动通过">
|
||||
<el-radio-group v-model="form.autoAudiAfterSale">
|
||||
<el-radio :label="0"> 是 </el-radio>
|
||||
<el-radio :label="1"> 否 </el-radio>
|
||||
<el-form-item v-if="getConfig('afterSalesAuditAutoCompleteConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('afterSalesAuditAutoCompleteConfig').remark"
|
||||
:message="getConfig('afterSalesAuditAutoCompleteConfig').remark"
|
||||
/>
|
||||
<span>售后申请自动通过</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.afterSalesAuditAutoCompleteConfig">
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('afterSalesAuditAutoCompleteConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货自动发起采购">
|
||||
<el-radio-group v-model="form.autoSend">
|
||||
<el-radio :label="0"> 是 </el-radio>
|
||||
<el-radio :label="1"> 否 </el-radio>
|
||||
<el-form-item v-if="getConfig('deliveryAutoStartPurchaseConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('deliveryAutoStartPurchaseConfig').remark"
|
||||
:message="getConfig('deliveryAutoStartPurchaseConfig').remark"
|
||||
/>
|
||||
<span>发货自动发起采购</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.deliveryAutoStartPurchaseConfig">
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('deliveryAutoStartPurchaseConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="回款申请自动通过">
|
||||
<el-radio-group v-model="form.autoAuditReturn">
|
||||
<el-radio :label="0"> 是 </el-radio>
|
||||
<el-radio :label="1"> 否 </el-radio>
|
||||
<el-form-item v-if="getConfig('repaymentAuditAutoCompleteConfig')">
|
||||
<template #label>
|
||||
<Tooltip
|
||||
v-if="getConfig('repaymentAuditAutoCompleteConfig').remark"
|
||||
:message="getConfig('repaymentAuditAutoCompleteConfig').remark"
|
||||
/>
|
||||
<span>回款申请自动通过</span>
|
||||
</template>
|
||||
<el-radio-group v-model="form.repaymentAuditAutoCompleteConfig">
|
||||
<el-radio
|
||||
v-for="(item, index) in getConfig('repaymentAuditAutoCompleteConfig').options"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -26,25 +62,42 @@
|
||||
</template>
|
||||
|
||||
<script setup name="GeneralClue">
|
||||
import * as ConfigApi from '@/api/system/set'
|
||||
|
||||
const message = useMessage()
|
||||
|
||||
const form = ref({
|
||||
autoAudiAfterSale: 0,
|
||||
autoSend: 0,
|
||||
autoAuditReturn: 0
|
||||
})
|
||||
const form = ref({})
|
||||
|
||||
const configList = ref([])
|
||||
|
||||
function getConfig(val) {
|
||||
return configList.value.find((it) => it.configKey == val)
|
||||
}
|
||||
|
||||
function getData() {
|
||||
form.value = {
|
||||
autoAudiAfterSale: 0,
|
||||
autoSend: 0,
|
||||
autoAuditReturn: 0
|
||||
}
|
||||
ConfigApi.getConfigList({ module: 1 }).then((data) => {
|
||||
configList.value = data
|
||||
// 获取所有配置项
|
||||
data.map((it) => {
|
||||
form.value[it.configKey] = it.configValue
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
message.success('保存成功')
|
||||
const params = configList.value.map((it) => ({
|
||||
configId: it.configId,
|
||||
configKey: it.configKey,
|
||||
configValue: form.value[it.configKey]
|
||||
}))
|
||||
ConfigApi.updateConfig(params).then(() => {
|
||||
message.success('保存成功')
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user