供应商评价

This commit is contained in:
‘huanghaiixia’
2025-12-19 14:37:49 +08:00
parent 5496c041ee
commit 754f44f55d
8 changed files with 539 additions and 49 deletions

View File

@ -5,8 +5,8 @@
<a-card title="评价基础信息" :bordered="false" >
<a-row>
<a-col :span="8">
<a-form-item label="客户名称" name="cpCode">
<a-input-search v-model:value="formState.cpCode" placeholder="请选择客户" readonly @search="onSearch"/>
<a-form-item label="客户名称" name="cpCodeName">
<a-input-search v-model:value="formState.cpCodeName" placeholder="请选择客户" readonly @search="onSearch"/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -61,7 +61,7 @@
</a-card>
</a-form>
</div>
<customerListModal @register="register" @success="handleSuccess"/>
<customerListModal @register="register" selectType="radio" @success="handleSuccess"/>
</a-spin>
</template>
@ -84,7 +84,6 @@
import UploadList from '/@/components/Form/src/components/UploadList.vue';
import customerListModal from '/@/components/common/customerListModal.vue';
import { getUserInfo } from '/@/api/system/login';
import { Rect } from '@grapecity/activereports/reportviewer';
const tableName = 'ScoreCustomer';
const columnName = 'ScoreCustomer'
@ -121,7 +120,7 @@ import { Rect } from '@grapecity/activereports/reportviewer';
const userInfo = reactive({})
const [register, { openModal:openModal}] = useModal();
const rules: Record<string, Rule[]> = {
cpCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
cpCodeName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
gsId: [{ required: true, message: "该项为必填项", trigger: 'change' }],
};
const layout = {
@ -201,6 +200,7 @@ import { Rect } from '@grapecity/activereports/reportviewer';
const handleSuccess = (val) => {
formState.cpCode = val[0].cuCode
formState.classCode = val[0].classCode
formState.cpCodeName = val[0].cuName
}
async function gsIdChange (val) {
const res = await getLngGradeSystem(val)
@ -208,6 +208,7 @@ import { Rect } from '@grapecity/activereports/reportviewer';
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) => {

View File

@ -111,7 +111,7 @@
const visibleFlowRecordModal = ref(false);
const [registerModal, { openModal }] = useModal();
const formName='客户评价';
const [registerTable, { reload, }] = useTable({
const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
title: '' || (formName + '列表'),
api: getLngScorePage,
rowKey: 'id',
@ -128,6 +128,7 @@
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
},
afterFetch: (res) => {
clearSelectedRowKeys()
tableRef.value.setToolBarWidth();
},
@ -152,14 +153,15 @@
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
return;
}
const { processId, taskIds, schemaId } = record.workflowData || {};
const { processId, taskIds, schemaId, status } = record.workflowData || {};
if (taskIds && taskIds.length) {
router.push({
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: {
taskId: taskIds[0],
formName: formName,
formId:currentRoute.value.meta.formId
formId:currentRoute.value.meta.formId,
id: record.id
}
});
} else if (schemaId && !taskIds && processId) {
@ -169,18 +171,33 @@
readonly: 1,
taskId: '',
formName: formName,
formId:currentRoute.value.meta.formId
formId:currentRoute.value.meta.formId,
id: record.id,
status
}
});
} else {
router.push({
path: '/form/ScoreCustomer/' + record.id + '/viewForm',
query: {
formPath: 'sales/ScoreCustomer',
formName: formName,
formId:currentRoute.value.meta.formId
}
});
if (schemaIdComputedRef.value) {
router.push({
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
query: {
formPath: 'sales/ScoreCustomer',
formName: formName,
formId:currentRoute.value.meta.formId,
type:'edit',
id: record.id,
disabled: 1,
}
});
}
// router.push({
// path: '/form/ScoreCustomer/' + record.id + '/viewForm',
// query: {
// formPath: 'sales/ScoreCustomer',
// formName: formName,
// formId:currentRoute.value.meta.formId
// }
// });
}
}
@ -211,15 +228,27 @@
}
function handleEdit(record: Recordable) {
router.push({
path: '/form/ScoreCustomer/' + record.id + '/updateForm',
query: {
if (schemaIdComputedRef.value) {
router.push({
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
query: {
formPath: 'sales/ScoreCustomer',
formName: formName,
formId:currentRoute.value.meta.formId
}
});
formId:currentRoute.value.meta.formId,
type:'edit',
id: record.id
}
});
} else {
router.push({
path: '/form/ScoreCustomer/' + record.id + '/updateForm',
query: {
formPath: 'sales/ScoreCustomer',
formName: formName,
formId:currentRoute.value.meta.formId
}
});
}
}
function handleDelete(record: Recordable) {
deleteList([record.id]);