评价优化
This commit is contained in:
@ -52,7 +52,7 @@
|
||||
import { Form, Col, Row, Tabs, TabPane, Divider, message } from 'ant-design-vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import customerListModal from './customerListModal.vue';
|
||||
import customerListModal from '/@/components/common/customerListModal.vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
|
||||
@ -11,7 +11,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||
label: '日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="评价体系" name="gsId">
|
||||
<a-select v-model:value="formState.gsId" :disabled="isDisable" placeholder="请选择评价体系" @change="gsIdChange" style="width: 100%" allow-clear>
|
||||
<a-select v-model:value="formState.gsId" :disabled="isDisable" placeholder="请选择评价体系" @mouseenter="gsIdFocus(formState.gsId)" @change="gsIdChange" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.gsIdList" :key="item.id" :value="item.id">
|
||||
{{ item.gsName }}
|
||||
</a-select-option>
|
||||
@ -84,6 +84,7 @@
|
||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||
import customerListModal from '/@/components/common/customerListModal.vue';
|
||||
import { getUserInfo } from '/@/api/system/login';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
|
||||
const tableName = 'ScoreCustomer';
|
||||
const columnName = 'ScoreCustomer'
|
||||
@ -127,7 +128,7 @@
|
||||
labelCol: { span: 9 },
|
||||
wrapperCol: { span: 15 },
|
||||
}
|
||||
|
||||
const gsIdOld = ref()
|
||||
const columns = ref([
|
||||
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
|
||||
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
|
||||
@ -202,13 +203,52 @@
|
||||
formState.classCode = val[0].classCode
|
||||
formState.cpCodeName = val[0].cuName
|
||||
}
|
||||
const gsIdFocus = (val) => {
|
||||
gsIdOld.value = val
|
||||
}
|
||||
async function gsIdChange (val) {
|
||||
if (!val) {
|
||||
dataList.value = []
|
||||
return
|
||||
}
|
||||
const res = await getLngGradeSystem(val)
|
||||
dataList.value = res.lngGradeSystemItemList || []
|
||||
dataList.value.forEach(v => {
|
||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
v.aEmpCode = userInfo.name
|
||||
v.gsiId = v.id
|
||||
let arr = res.lngGradeSystemItemList || []
|
||||
if (!gsIdOld.value) {
|
||||
dataList.value = res.lngGradeSystemItemList || []
|
||||
dataList.value.forEach(v => {
|
||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
v.aEmpCode = userInfo.name
|
||||
v.gsiId = v.id
|
||||
})
|
||||
return
|
||||
}
|
||||
if (arr.length && gsIdOld.value) {
|
||||
Modal.confirm({
|
||||
title: t('提示'),
|
||||
content: t('变更将重新设置评分表,是否继续'),
|
||||
okText: t('确定'),
|
||||
cancelText: t('取消'),
|
||||
onOk() {
|
||||
dataList.value = res.lngGradeSystemItemList || []
|
||||
dataList.value.forEach(v => {
|
||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
v.aEmpCode = userInfo.name
|
||||
v.gsiId = v.id
|
||||
})
|
||||
},
|
||||
onCancel() {
|
||||
formState.gsId = gsIdOld.value
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!arr.length) {
|
||||
dataList.value = res.lngGradeSystemItemList || []
|
||||
dataList.value.forEach(v => {
|
||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
v.aEmpCode = userInfo.name
|
||||
v.gsiId = v.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const numChagne = (type, record, index) => {
|
||||
|
||||
@ -121,8 +121,8 @@
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [['dateGrade', ['dateGradeStart', 'dateGradeEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
||||
showResetButton: false,
|
||||
fieldMapToTime: [['dateGrade', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
||||
showResetButton: true,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||
@ -425,6 +425,9 @@
|
||||
:deep(.ant-table-selection-col) {
|
||||
width: 50px;
|
||||
}
|
||||
:deep(.w-full .ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 50px !important;
|
||||
}
|
||||
.show{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user