This commit is contained in:
‘huanghaiixia’
2025-12-19 17:50:27 +08:00
parent 694d3cc2ee
commit 2b2c8df0f7
6 changed files with 104 additions and 145 deletions

View File

@ -17,7 +17,7 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'cpCode',
field: 'cpName',
label: '供应商',
component: 'Input',
},
@ -38,7 +38,7 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [
{
dataIndex: 'cpCode',
dataIndex: 'cpName',
title: '供应商',
componentType: 'input',
align: 'left',
@ -47,7 +47,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'gsId',
dataIndex: 'gsName',
title: '评价体系',
componentType: 'select',
align: 'left',

View File

@ -210,22 +210,17 @@
async function gsIdChange (val) {
if (!val) {
dataList.value = []
formState.score = null
return
}
const res = await getLngGradeSystem(val)
let arr = res.lngGradeSystemItemList || []
console.log(arr.length, 66, gsIdOld.value)
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
})
listUpdate()
return
}
if (arr.length && gsIdOld.value) {
Modal.confirm({
title: t('提示'),
content: t('变更将重新设置评分表,是否继续'),
@ -233,11 +228,7 @@
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
})
listUpdate()
},
onCancel() {
formState.gsId = gsIdOld.value
@ -246,14 +237,24 @@
} 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
})
listUpdate()
}
}
}
const listUpdate = () => {
formState.score = null
dataList.value.forEach(v => {
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
v.aEmpCode = userInfo.name
v.gsiId = v.id
delete v.id
delete v.createUserId
delete v.createDate
delete v.ruleUserId
delete v.tenantId
})
}
const numChagne = (type, record, index) => {
record.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
if (type == 'score') {