salary
parent
d22a380612
commit
4c692c48e3
@ -0,0 +1,40 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 创建
|
||||
export const createField = (data) => { |
||||
return request.post({ url: '/admin-api/crm/param/create', data: { ...data, module: 3 } }) |
||||
} |
||||
|
||||
// 更新
|
||||
export const updateField = (data) => { |
||||
return request.put({ url: '/admin-api/crm/param/update', data }) |
||||
} |
||||
|
||||
// 删除
|
||||
export const deleteField = (id) => { |
||||
return request.delete({ url: `/admin-api/crm/param/delete?id=${id}` }) |
||||
} |
||||
|
||||
// 获得
|
||||
export const getField = (id) => { |
||||
return request.get({ url: `/admin-api/crm/param/get?id=${id}` }) |
||||
} |
||||
|
||||
// 获得精简信息列表
|
||||
export const getSimpleFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/simple-list', params: { module: 3 } }) |
||||
} |
||||
|
||||
// 获取自定义字段
|
||||
export const getDiyFieldList = () => { |
||||
return request.get({ url: '/admin-api/crm/param/get-diy-param', params: { module: 3 } }) |
||||
} |
||||
|
||||
// 状态修改
|
||||
export const updateFieldStatus = (signParamId, status) => { |
||||
const data = { |
||||
signParamId, |
||||
status |
||||
} |
||||
return request.put({ url: '/admin-api/crm/param/status/update', data: data }) |
||||
} |
@ -0,0 +1,11 @@ |
||||
import request from '@/config/axios' |
||||
|
||||
// 通过key,查询内容
|
||||
export const getConfigByConfigKey = (params) => { |
||||
return request.get({ url: '/admin-api/crm/config/getConfigByConfigKey', params }) |
||||
} |
||||
|
||||
// 保存配置项
|
||||
export const updateConfig = (data) => { |
||||
return request.put({ url: '/admin-api/crm/config/update', data }) |
||||
} |
@ -1,34 +1,50 @@ |
||||
<template> |
||||
<el-form :model="form" ref="formRef" label-width="auto"> |
||||
<el-form-item label="采购申请自动通过"> |
||||
<el-radio-group v-model="form.autoAuditPurchase"> |
||||
<el-radio :label="true"> 是 </el-radio> |
||||
<el-radio :label="false"> 否 </el-radio> |
||||
<el-radio-group v-model="form.purchaseAuditAutoCompleteConfig"> |
||||
<el-radio label="true"> 是 </el-radio> |
||||
<el-radio label="false"> 否 </el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
<el-form-item> |
||||
<el-button type="primary" @click="onSubmit">保存</el-button> |
||||
<el-button @click="getData">刷新</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
</template> |
||||
|
||||
<script setup name="BasicSettingMall"> |
||||
import * as ConfigApi from '@/api/system/set' |
||||
|
||||
const message = useMessage() |
||||
|
||||
const form = ref({ |
||||
autoAuditPurchase: 0 |
||||
purchaseAuditAutoCompleteConfig: 'true' |
||||
}) |
||||
|
||||
const info = ref({}) |
||||
|
||||
function getData() { |
||||
form.value = { |
||||
autoAuditPurchase: 1 |
||||
} |
||||
ConfigApi.getConfigByConfigKey({ configKey: 'purchaseAuditAutoCompleteConfig' }).then((data) => { |
||||
info.value = data |
||||
form.value = { |
||||
purchaseAuditAutoCompleteConfig: data.configValue |
||||
} |
||||
}) |
||||
} |
||||
|
||||
function onSubmit() { |
||||
message.success('保存成功') |
||||
const data = { |
||||
...info, |
||||
purchaseAuditAutoCompleteConfig: form.value.purchaseAuditAutoCompleteConfig |
||||
} |
||||
ConfigApi.updateConfig(data).then(() => { |
||||
message.success('保存成功') |
||||
}) |
||||
} |
||||
|
||||
onMounted(() => { |
||||
getData() |
||||
}) |
||||
</script> |
||||
|
||||
<style lang="scss" scoped></style> |
||||
|
Loading…
Reference in new issue