客户评价
This commit is contained in:
@ -426,7 +426,7 @@
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getList(val)
|
||||
getInfo(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -451,14 +451,14 @@
|
||||
onMounted(() => {
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getList(pageId.value)
|
||||
getInfo(pageId.value)
|
||||
}
|
||||
|
||||
});
|
||||
const uploadListChange = (val) => {
|
||||
dataFile.value = val
|
||||
}
|
||||
async function getList(id) {
|
||||
async function getInfo(id) {
|
||||
spinning.value = true
|
||||
try {
|
||||
let data = await getLngCustomer(id)
|
||||
@ -650,7 +650,7 @@
|
||||
// data?.id && (formState.id = data.id)
|
||||
// data?.cuCode && (Object.assign(formState, {cuCode: data?.cuCode}))
|
||||
if (data?.id) {
|
||||
getList(data?.id)
|
||||
getInfo(data?.id)
|
||||
}
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="加载中...">
|
||||
<div class="page-bg-wrap">
|
||||
<div class="page-bg-wrap formViewStyle">
|
||||
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||
<a-card title="供应商基本信息" :bordered="false" >
|
||||
<div>
|
||||
<h4>评价基础信息</h4>
|
||||
<a-card title="评价基础信息" :bordered="false" >
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="客户名称" name="cpCode">
|
||||
@ -12,8 +10,8 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="客户分类" name="">
|
||||
<a-input v-model:value="formState.suMcode" disabled />
|
||||
<a-form-item label="客户分类" name="classCode">
|
||||
<a-input v-model:value="formState.classCode" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -27,7 +25,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="评价日期" name="dateGrade">
|
||||
<a-date-picker v-model:value="formState.dateGrade" disabled style="width: 100%" placeholder="请选择成立日期" />
|
||||
<a-date-picker v-model:value="formState.dateGrade" disabled style="width: 100%" placeholder="请选择评价日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -45,38 +43,34 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<a-card :bordered="false" >
|
||||
<h4>填写评分表信息</h4>
|
||||
<a-card title="填写评分表信息" :bordered="false" >
|
||||
<a-table :columns="columns" :data-source="dataList" >
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.dataIndex === 'score'">
|
||||
<a-input-number v-model:value="record.score"/>
|
||||
<a-input-number v-model:value="record.score" @change="numChagne('score', record, index)"/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'scoreDesc'">
|
||||
<a-input v-model:value="record.scoreDesc"/>
|
||||
<a-input v-model:value="record.scoreDesc" @change="numChagne('scoreDesc', record, index)"/>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
<a-card :bordered="false" >
|
||||
<h4>附件信息</h4>
|
||||
<a-card title="附件信息" :bordered="false" >
|
||||
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
|
||||
</a-card>
|
||||
</a-form>
|
||||
</div>
|
||||
<customerListModal @register="register" @success="handleSuccess"/>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
import { FromPageType } from '/@/enums/workflowEnum';
|
||||
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { CheckCircleOutlined, StopOutlined, CloseOutlined, UploadOutlined, SaveOutlined, DownloadOutlined,ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons-vue';
|
||||
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
@ -88,14 +82,15 @@
|
||||
import { getAppEnvConfig } from '/@/utils/env';
|
||||
import { message } from 'ant-design-vue';
|
||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||
import customerListModal from '/@/views/sales/CustomerGroup/components/customerListModal.vue';
|
||||
import customerListModal from '/@/components/common/customerListModal.vue';
|
||||
import { getUserInfo } from '/@/api/system/login';
|
||||
import { Rect } from '@grapecity/activereports/reportviewer';
|
||||
|
||||
const tableName = '1';
|
||||
const columnName = '1'
|
||||
const tableName = 'ScoreCustomer';
|
||||
const columnName = 'ScoreCustomer'
|
||||
|
||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||
const formRef = ref();
|
||||
const uploadFile = ref()
|
||||
const props = defineProps({
|
||||
disabled: false,
|
||||
id: ''
|
||||
@ -123,7 +118,8 @@
|
||||
approCode: 'WTJ',
|
||||
dateGrade: dayjs(new Date()),
|
||||
});
|
||||
const [registerCertificate, { openModal:openModalCertificate }] = useModal();
|
||||
const userInfo = reactive({})
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const rules: Record<string, Rule[]> = {
|
||||
cpCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
gsId: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
@ -154,7 +150,7 @@
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getList(val)
|
||||
getInfo(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -173,23 +169,22 @@
|
||||
onMounted(() => {
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getList(pageId.value)
|
||||
getInfo(pageId.value)
|
||||
}
|
||||
|
||||
});
|
||||
const uploadListChange = (val) => {
|
||||
dataFile.value = val
|
||||
}
|
||||
async function getList(id) {
|
||||
async function getInfo(id) {
|
||||
spinning.value = true
|
||||
try {
|
||||
let data = await getLngSupplier(id)
|
||||
spinning.value = false
|
||||
Object.assign(formState, {...data})
|
||||
Object.assign(dataList.value, formState.lngSupplierDocList || [])
|
||||
Object.assign(dataList.value, formState.lngScoreDtlList || [])
|
||||
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
||||
formState.dateEntry = formState.dateEntry ? dayjs(formState.dateEntry) : null
|
||||
formState.dateEstab = formState.dateEstab ? dayjs(formState.dateEstab) : null
|
||||
formState.dateGrade = formState.dateGrade ? dayjs(formState.dateGrade) : null
|
||||
} catch (error) {
|
||||
spinning.value = false
|
||||
}
|
||||
@ -197,12 +192,33 @@
|
||||
async function getOption() {
|
||||
optionSelect.gsIdList = await getLngGradeSystemPageList({'valid': 'Y', 'typeCode': 'CU'})
|
||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||
let res = await getUserInfo()
|
||||
Object.assign(userInfo, {...res})
|
||||
}
|
||||
const onSearch = (val)=> {
|
||||
openModal(true,{isUpdate: false})
|
||||
}
|
||||
const handleSuccess = (val) => {
|
||||
formState.cpCode = val[0].cuCode
|
||||
formState.classCode = val[0].classCode
|
||||
}
|
||||
async function gsIdChange (val) {
|
||||
console.log(val, 8)
|
||||
const res = await getLngGradeSystem(val)
|
||||
dataList.value = res.lngGradeSystemItemList || []
|
||||
console.log(dataList.value, 88, res)
|
||||
dataList.value.forEach(v => {
|
||||
v.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
v.aEmpCode = userInfo.name
|
||||
})
|
||||
}
|
||||
const numChagne = (type, record, index) => {
|
||||
record.aTime = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
if (type == 'score') {
|
||||
let num = 0
|
||||
dataList.value.forEach(v => {
|
||||
num+=Number(v.score || 0)
|
||||
})
|
||||
formState.score = num
|
||||
}
|
||||
}
|
||||
function close() {
|
||||
tabStore.closeTab(currentRoute.value, router);
|
||||
@ -215,7 +231,7 @@
|
||||
await formRef.value.validateFields();
|
||||
let obj = {
|
||||
...formState,
|
||||
lngSupplierBankList: dataList.value,
|
||||
lngScoreDtlList: dataList.value,
|
||||
lngFileUploadList: dataFile.value
|
||||
|
||||
}
|
||||
@ -226,7 +242,7 @@
|
||||
const data = await request(obj);
|
||||
// 新增保存
|
||||
if (data?.id) {
|
||||
getList(data?.id)
|
||||
getInfo(data?.id)
|
||||
}
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
</slot>
|
||||
流程图
|
||||
</a-button>
|
||||
<div v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled">
|
||||
<div v-if="customFormConfig.codeList.includes(curPageCode)&&!disabled && curPageCode=='addCustomer'">
|
||||
<a-button>
|
||||
<slot name="icon"><download-outlined /></slot>下载模板
|
||||
</a-button>
|
||||
|
||||
@ -343,7 +343,7 @@
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getList(val)
|
||||
getInfo(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -368,14 +368,14 @@
|
||||
onMounted(() => {
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getList(pageId.value)
|
||||
getInfo(pageId.value)
|
||||
}
|
||||
|
||||
});
|
||||
const uploadListChange = (val) => {
|
||||
dataFile.value = val
|
||||
}
|
||||
async function getList(id) {
|
||||
async function getInfo(id) {
|
||||
spinning.value = true
|
||||
try {
|
||||
let data = await getLngSupplier(id)
|
||||
@ -553,7 +553,7 @@
|
||||
// data?.id && (formState.id = data.id)
|
||||
// data?.suCode && (Object.assign(formState, {cuCode: data?.suCode}))
|
||||
if (data?.id) {
|
||||
getList(data?.id)
|
||||
getInfo(data?.id)
|
||||
}
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
|
||||
Reference in New Issue
Block a user