评价优化
This commit is contained in:
@ -52,7 +52,7 @@
|
|||||||
import { Form, Col, Row, Tabs, TabPane, Divider, message } from 'ant-design-vue';
|
import { Form, Col, Row, Tabs, TabPane, Divider, message } from 'ant-design-vue';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import customerListModal from './customerListModal.vue';
|
import customerListModal from '/@/components/common/customerListModal.vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
const FormItem = Form.Item;
|
const FormItem = Form.Item;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
label: '日期',
|
label: '日期',
|
||||||
component: 'RangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
format: 'YYYY-MM-DD',
|
||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
getPopupContainer: () => document.body,
|
getPopupContainer: () => document.body,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="评价体系" name="gsId">
|
<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">
|
<a-select-option v-for="item in optionSelect.gsIdList" :key="item.id" :value="item.id">
|
||||||
{{ item.gsName }}
|
{{ item.gsName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@ -84,6 +84,7 @@
|
|||||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||||
import customerListModal from '/@/components/common/customerListModal.vue';
|
import customerListModal from '/@/components/common/customerListModal.vue';
|
||||||
import { getUserInfo } from '/@/api/system/login';
|
import { getUserInfo } from '/@/api/system/login';
|
||||||
|
import { Modal } from 'ant-design-vue';
|
||||||
|
|
||||||
const tableName = 'ScoreCustomer';
|
const tableName = 'ScoreCustomer';
|
||||||
const columnName = 'ScoreCustomer'
|
const columnName = 'ScoreCustomer'
|
||||||
@ -127,7 +128,7 @@
|
|||||||
labelCol: { span: 9 },
|
labelCol: { span: 9 },
|
||||||
wrapperCol: { span: 15 },
|
wrapperCol: { span: 15 },
|
||||||
}
|
}
|
||||||
|
const gsIdOld = ref()
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
|
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
|
||||||
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
|
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
|
||||||
@ -202,13 +203,52 @@
|
|||||||
formState.classCode = val[0].classCode
|
formState.classCode = val[0].classCode
|
||||||
formState.cpCodeName = val[0].cuName
|
formState.cpCodeName = val[0].cuName
|
||||||
}
|
}
|
||||||
|
const gsIdFocus = (val) => {
|
||||||
|
gsIdOld.value = val
|
||||||
|
}
|
||||||
async function gsIdChange (val) {
|
async function gsIdChange (val) {
|
||||||
|
if (!val) {
|
||||||
|
dataList.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
const res = await getLngGradeSystem(val)
|
const res = await getLngGradeSystem(val)
|
||||||
dataList.value = res.lngGradeSystemItemList || []
|
let arr = res.lngGradeSystemItemList || []
|
||||||
dataList.value.forEach(v => {
|
if (!gsIdOld.value) {
|
||||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
dataList.value = res.lngGradeSystemItemList || []
|
||||||
v.aEmpCode = userInfo.name
|
dataList.value.forEach(v => {
|
||||||
v.gsiId = v.id
|
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) => {
|
const numChagne = (type, record, index) => {
|
||||||
|
|||||||
@ -121,8 +121,8 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [['dateGrade', ['dateGradeStart', 'dateGradeEnd'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
fieldMapToTime: [['dateGrade', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||||
@ -425,6 +425,9 @@
|
|||||||
:deep(.ant-table-selection-col) {
|
:deep(.ant-table-selection-col) {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
:deep(.w-full .ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 50px !important;
|
||||||
|
}
|
||||||
.show{
|
.show{
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,41 +6,19 @@ export const formConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
{
|
{
|
||||||
field: 'cpCode',
|
|
||||||
label: '供应商',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'gsId',
|
|
||||||
label: '评价体系',
|
|
||||||
component: 'XjrSelect',
|
|
||||||
componentProps: {
|
|
||||||
datasourceType: 'api',
|
|
||||||
apiConfig: {
|
|
||||||
path: 'CodeGeneration/selection',
|
|
||||||
method: 'GET',
|
|
||||||
apiId: '93d735dcb7364a0f8102188ec4d77ac7',
|
|
||||||
},
|
|
||||||
labelField: 'label',
|
|
||||||
valueField: 'value',
|
|
||||||
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'dateGrade',
|
field: 'dateGrade',
|
||||||
label: '评价日期',
|
label: '日期',
|
||||||
component: 'TimeRangePicker',
|
component: 'RangePicker',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
format: 'HH:mm:ss',
|
format: 'YYYY-MM-DD',
|
||||||
style: { width: '100%' },
|
style: { width: '100%' },
|
||||||
getPopupContainer: () => document.body,
|
getPopupContainer: () => document.body,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'score',
|
field: 'cpCode',
|
||||||
label: '分数合计',
|
label: '供应商',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -56,11 +34,6 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
getPopupContainer: () => document.body,
|
getPopupContainer: () => document.body,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'note',
|
|
||||||
label: '备注',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
export const columns: BasicColumn[] = [
|
export const columns: BasicColumn[] = [
|
||||||
@ -83,18 +56,17 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'dateGrade',
|
dataIndex: 'score',
|
||||||
title: '评价日期',
|
title: '评价分数',
|
||||||
componentType: 'time',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'score',
|
dataIndex: 'dateGrade',
|
||||||
title: '分数合计',
|
title: '评价日期',
|
||||||
componentType: 'input',
|
componentType: 'time',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="评价体系" name="gsId">
|
<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">
|
<a-select-option v-for="item in optionSelect.gsIdList" :key="item.id" :value="item.id">
|
||||||
{{ item.gsName }}
|
{{ item.gsName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@ -84,6 +84,7 @@
|
|||||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||||
import supplierListModal from '/@/components/common/supplierListModal.vue';
|
import supplierListModal from '/@/components/common/supplierListModal.vue';
|
||||||
import { getUserInfo } from '/@/api/system/login';
|
import { getUserInfo } from '/@/api/system/login';
|
||||||
|
import { Modal } from 'ant-design-vue';
|
||||||
|
|
||||||
const tableName = 'ScoreSupplier';
|
const tableName = 'ScoreSupplier';
|
||||||
const columnName = 'ScoreSupplier'
|
const columnName = 'ScoreSupplier'
|
||||||
@ -127,7 +128,7 @@
|
|||||||
labelCol: { span: 9 },
|
labelCol: { span: 9 },
|
||||||
wrapperCol: { span: 15 },
|
wrapperCol: { span: 15 },
|
||||||
}
|
}
|
||||||
|
const gsIdOld = ref()
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
|
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
|
||||||
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
|
{ title: t('评价事项'), dataIndex: 'itemName', sorter: true},
|
||||||
@ -202,14 +203,56 @@
|
|||||||
formState.classCode = val[0].classCode
|
formState.classCode = val[0].classCode
|
||||||
formState.cpCodeName = val[0].suName
|
formState.cpCodeName = val[0].suName
|
||||||
}
|
}
|
||||||
|
const gsIdFocus = (val) => {
|
||||||
|
gsIdOld.value = val
|
||||||
|
console.log(444, val)
|
||||||
|
}
|
||||||
async function gsIdChange (val) {
|
async function gsIdChange (val) {
|
||||||
|
if (!val) {
|
||||||
|
dataList.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
const res = await getLngGradeSystem(val)
|
const res = await getLngGradeSystem(val)
|
||||||
dataList.value = res.lngGradeSystemItemList || []
|
let arr = res.lngGradeSystemItemList || []
|
||||||
dataList.value.forEach(v => {
|
console.log(arr.length, 66, gsIdOld.value)
|
||||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
if (!gsIdOld.value) {
|
||||||
v.aEmpCode = userInfo.name
|
dataList.value = res.lngGradeSystemItemList || []
|
||||||
v.gsiId = v.id
|
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) => {
|
const numChagne = (type, record, index) => {
|
||||||
record.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
record.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
|||||||
@ -121,8 +121,8 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [['dateGrade', ['dateGradeStart', 'dateGradeEnd'], 'HH:mm:ss ', true],],
|
fieldMapToTime: [['dateGrade', ['startDate', 'endDate'], 'HH:mm:ss ', true],],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||||
@ -425,6 +425,9 @@
|
|||||||
:deep(.ant-table-selection-col) {
|
:deep(.ant-table-selection-col) {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
:deep(.w-full .ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||||
|
width: 50px !important;
|
||||||
|
}
|
||||||
.show{
|
.show{
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,7 +122,7 @@
|
|||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||||
|
|||||||
Reference in New Issue
Block a user