优化
This commit is contained in:
@ -27,6 +27,16 @@
|
||||
|
||||
const { t } = useI18n();
|
||||
const codeFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{ field: 'title', label: '标题/编号', component: 'Input'},
|
||||
];
|
||||
|
||||
@ -70,6 +80,7 @@
|
||||
formConfig: {
|
||||
labelCol:{span: 9, offSet:10},
|
||||
schemas: codeFormSchema,
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD'],],
|
||||
showResetButton: true,
|
||||
},
|
||||
immediate: false, // 设置为不立即调用
|
||||
@ -136,3 +147,12 @@
|
||||
|
||||
|
||||
</style>
|
||||
<style lang="less" scoped>
|
||||
:deep( .ant-col-8:nth-child(1)) {
|
||||
width: 360px !important;
|
||||
max-width: 360px !important;;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -88,7 +88,9 @@ const curIdx = ref()
|
||||
const rules = {
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
cpBankCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }, {type: 'email', message: '邮箱格式错误\n'} ],
|
||||
sort: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
// contactEmail: [{ required: false, message: "该项为必填项", trigger: 'change' }, {type: 'email', message: '邮箱格式错误\n'} ],
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
@ -100,12 +102,12 @@ const onSearchUser = (val)=> {
|
||||
}
|
||||
const handleSuccess = (val) => {
|
||||
formState.cpTableName = val[0].cpTableName
|
||||
formState.cpCode = val[0].cpTableName == '客户' ? val[0].cuCode : val[0].suCode
|
||||
formState.cpName = val[0].cpTableName == '客户' ? val[0].cuName : val[0].suName
|
||||
formState.cpCode = val[0].cpTableName == 'lng_customer' ? val[0].cuCode : val[0].suCode
|
||||
formState.cpName = val[0].cpTableName == 'lng_customer' ? val[0].cuName : val[0].suName
|
||||
getBankInfo(formState.cpCode, val[0].cpTableName)
|
||||
}
|
||||
const getBankInfo = async (code, type) => {
|
||||
const res = await getBankBList(code, type=='客户'? 'C' : 'S')
|
||||
const res = await getBankBList(code, type=='lng_customer'? 'C' : 'S')
|
||||
optionList.value = res|| []
|
||||
formState.cpBankCode = (optionList.value.find(v => v.defaultSign == 'Y') || {}).bankCode
|
||||
formState.cpBankName = (optionList.value.find(v => v.defaultSign == 'Y') || {}).bankName
|
||||
|
||||
@ -124,7 +124,7 @@
|
||||
};
|
||||
function onSelectChange(rowKeys: string[], e) {
|
||||
selectedKeys.value = rowKeys;
|
||||
selectedValues.value = [{...e[0], cpTableName: activeKey.value=='1' ? '客户': '供应商'}]
|
||||
selectedValues.value = [{...e[0], cpTableName: activeKey.value=='1' ? 'lng_customer': 'lng_supplier'}]
|
||||
}
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? t('客户列表') : t('')));
|
||||
|
||||
|
||||
@ -92,7 +92,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '缓级',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
@ -113,7 +113,14 @@ export const columns: BasicColumn[] = [
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'comName',
|
||||
title: '拟稿人所属公司',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
dataIndex: 'dateAppro',
|
||||
title: '拟稿日期',
|
||||
|
||||
@ -42,6 +42,11 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿日期" name="dateAppro">
|
||||
<a-date-picker v-model:value="formState.dateAppro" :disabled="isDisable" style="width: 100%" placeholder="请选择评价日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿人" name="empName">
|
||||
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择拟稿人" readonly @search="onSearchUser"/>
|
||||
@ -49,7 +54,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿人所属部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择拟稿人部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择拟稿人部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -57,11 +62,6 @@
|
||||
<a-input v-model:value="formState.comName" disabled/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="拟稿日期" name="dateAppro">
|
||||
<a-date-picker v-model:value="formState.dateAppro" :disabled="isDisable" style="width: 100%" placeholder="请选择评价日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="审批状态" name="approCode">
|
||||
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
|
||||
@ -160,7 +160,7 @@
|
||||
securityCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
urgencyCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
comName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateAppro: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
content: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
@ -236,15 +236,18 @@
|
||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const onSearch = (val)=> {
|
||||
openModalDept(true,{isUpdate: false})
|
||||
}
|
||||
@ -254,6 +257,7 @@
|
||||
const handleSuccess = (val) => {
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
|
||||
@ -169,7 +169,7 @@
|
||||
},
|
||||
}
|
||||
],
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD '],],
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD'],],
|
||||
showResetButton: true,
|
||||
},
|
||||
immediate: false,
|
||||
|
||||
@ -90,7 +90,14 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同金额(万元)" name="amount">
|
||||
<a-input-number v-model:value="formState.amount" style="width: 100%" :formatter="value => ` ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')" @blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />
|
||||
<a-input-number v-model:value="formState.amount" style="width: 100%"
|
||||
:formatter="value => {
|
||||
const [int, dec] = `${value}`.split('.');
|
||||
const intStr = int.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
return dec ? ` ${intStr}.${dec}` : ` ${intStr}`;
|
||||
}"
|
||||
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
|
||||
@blur="amountBlur(formState.amount)" :min="0" :disabled="isDisable" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -169,7 +176,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -198,7 +205,14 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</Card>
|
||||
<Card title="相对方信息" :bordered="false" >
|
||||
<Card :bordered="false" >
|
||||
<template #title>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<span style="color: red;">*</span>
|
||||
<span style="margin-left: 8px;">相对方信息</span>
|
||||
<span style="font-size: 12px;font-weight: normal;">(至少填写一条相对方信息)</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<a-button type="primary" style="margin-bottom: 10px" @click="addUser" v-if="!isDisable">新增行</a-button>
|
||||
<a-table style="width: 100%" :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 1000}">
|
||||
@ -310,7 +324,7 @@
|
||||
impSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
tel: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
|
||||
});
|
||||
const layout = {
|
||||
@ -418,15 +432,18 @@
|
||||
// optionSelect.telList = await getAllUser()
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const periodTypeCodeChange = (val) => {
|
||||
if (val === 'Y') {
|
||||
rules.dateTo = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
@ -503,6 +520,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
@ -575,11 +593,8 @@
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
|
||||
if (Number(formState.cpCount)<0 || Number(formState.cpCount)>20) {
|
||||
notification.warning({
|
||||
message: 'Tip',
|
||||
description: '相对方信息个数必须在0-20间'
|
||||
});
|
||||
if (Number(formState.cpCount)<1 || Number(formState.cpCount)>20) {
|
||||
message.warn('相对方信息个数必须在1-20间')
|
||||
return
|
||||
}
|
||||
let obj = {
|
||||
@ -602,7 +617,7 @@
|
||||
// 同意保存不提示
|
||||
if (!type) {
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
message: '提示',
|
||||
description: data?.id ? t('新增成功!') : t('修改成功!')
|
||||
}); //提示消息
|
||||
}
|
||||
@ -615,7 +630,7 @@
|
||||
} catch (errorInfo) {
|
||||
spinning.value = false;
|
||||
errorInfo?.errorFields?.length && notification.warning({
|
||||
message: 'Tip',
|
||||
message: '提示',
|
||||
description: '请完善信息'
|
||||
});
|
||||
return false
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
import {formConfig, searchFormSchema, columns } from './components/config';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
@ -118,6 +118,8 @@
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
// const formName='合同要素';
|
||||
const formName=currentRoute.value.meta?.title;
|
||||
const defaultDate = ref([dayjs().format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
|
||||
const comIdList = ref([])
|
||||
const [registerTable, { reload, }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngContractFactPage,
|
||||
@ -127,10 +129,58 @@
|
||||
rowProps: {
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
schemas: [
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '有效期',
|
||||
component: 'RangePicker',
|
||||
defaultValue: defaultDate.value,
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'kName',
|
||||
label: '合同号/名称',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'comId',
|
||||
label: '合同主体',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
showSearch: true,
|
||||
optionFilterProp: 'label',
|
||||
filterOption: (input: string, option: any) => {
|
||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
||||
},
|
||||
options: comIdList,
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
label: '审批状态',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '1990669393069129729' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
],
|
||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||
showResetButton: true,
|
||||
},
|
||||
immediate: false,
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
|
||||
},
|
||||
@ -326,17 +376,24 @@
|
||||
|
||||
}
|
||||
onMounted(async () => {
|
||||
reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }});
|
||||
let res = await getAllCom() || []
|
||||
customSearchFormSchema.value.forEach(v => {
|
||||
if (v.field == 'comId') {
|
||||
v.componentProps.options = res.map(v=> {
|
||||
return {
|
||||
label: v.name,
|
||||
value: v.id
|
||||
}
|
||||
})
|
||||
comIdList.value = res.map(v=> {
|
||||
return {
|
||||
label: v.name,
|
||||
value: v.id
|
||||
}
|
||||
});
|
||||
})
|
||||
// customSearchFormSchema.value.forEach(v => {
|
||||
// if (v.field == 'comId') {
|
||||
// v.componentProps.options = res.map(v=> {
|
||||
// return {
|
||||
// label: v.name,
|
||||
// value: v.id
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
if (schemaIdComputedRef.value) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
bus.on(CREATE_FLOW, handleRefresh);
|
||||
|
||||
@ -80,7 +80,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '有效期开始',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
@ -89,7 +89,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '有效期结束',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
@ -98,7 +98,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '状态',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -349,7 +349,7 @@
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
curCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
longSpotCode:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
@ -512,15 +512,18 @@
|
||||
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const tipCheck = () => {
|
||||
isExpend.value = !isExpend.value
|
||||
}
|
||||
@ -576,6 +579,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -257,7 +257,7 @@
|
||||
prcTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
});
|
||||
@ -377,16 +377,18 @@
|
||||
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const getApproList = (val) => {
|
||||
dataListAppro.value = val
|
||||
}
|
||||
@ -476,6 +478,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -257,7 +257,7 @@
|
||||
prcTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
});
|
||||
@ -408,16 +408,18 @@
|
||||
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const getApproList = (val) => {
|
||||
dataListAppro.value = val
|
||||
}
|
||||
@ -506,6 +508,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -350,7 +350,7 @@
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
curCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
longSpotCode:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
@ -513,15 +513,18 @@
|
||||
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const tipCheck = () => {
|
||||
isExpend.value = !isExpend.value
|
||||
}
|
||||
@ -577,6 +580,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="业务部门" name="bDeptName">
|
||||
<a-input-search v-model:value="formState.bDeptName" :disabled="isDisable" placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@ -118,8 +118,10 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<h4>气源地列表</h4>
|
||||
<lngStationList :list="dataListStation" ref="lngStationRef" :disabled="isDisable" :isEdit="isDisable ||!formState.allStaSign|| formState.allStaSign=='Y'"></lngStationList>
|
||||
<template v-if="formState.allStaSign=='N'">
|
||||
<h4>气源地列表</h4>
|
||||
<lngStationList :list="dataListStation" ref="lngStationRef" :disabled="isDisable" :isEdit="isDisable ||!formState.allStaSign|| formState.allStaSign=='Y'"></lngStationList>
|
||||
</template>
|
||||
</div>
|
||||
<div>
|
||||
<h4>合同约定</h4>
|
||||
@ -234,7 +236,7 @@
|
||||
prcTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
allStaSign:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
@ -344,16 +346,18 @@
|
||||
|
||||
|
||||
if (!pageId.value) {
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
getCompDeptInfo(userInfo.id)
|
||||
}
|
||||
|
||||
}
|
||||
const getCompDeptInfo = async (id)=> {
|
||||
const res = await getCompDept(id)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
formState.bDeptId = res?.dept?.id
|
||||
|
||||
formState.comName = res?.comp?.name
|
||||
formState.comId = res?.comp?.id
|
||||
}
|
||||
const dateCfmChange = (val) => {
|
||||
if (formState.dateCfmFrom || formState.dateCfmTo) {
|
||||
rules.periodTypeCode = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
@ -431,6 +435,7 @@
|
||||
formState.empName = val[0].name
|
||||
formState.empId = val[0].id
|
||||
formState.tel = val[0].mobile
|
||||
getCompDeptInfo(formState.empId)
|
||||
}
|
||||
const handleSuccessDept = (val, info) => {
|
||||
formState.bDeptName = val[0].name
|
||||
@ -499,7 +504,10 @@
|
||||
v.sort = idx
|
||||
})
|
||||
let arrDic = discountRef.value.getDataList()
|
||||
let arrSta = lngStationRef.value.getDataList()
|
||||
let arrSta = []
|
||||
if (formState.allStaSign=='N') {
|
||||
arrSta = lngStationRef.value.getDataList()
|
||||
}
|
||||
for(let i=0; i<arrDic.length; i++) {
|
||||
if (!arrDic[i].discTypeCode || !arrDic[i].dateFrom || !arrDic[i].dateTo) {
|
||||
message.warn('请完善返优惠列表必选项')
|
||||
|
||||
@ -86,7 +86,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '有效期开始',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
@ -95,7 +95,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '有效期结束',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 120,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
@ -104,22 +104,13 @@ export const columns: BasicColumn[] = [
|
||||
title: '状态',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
width: 80,
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'pointUpName',
|
||||
title: '上载点',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'pointDelyName',
|
||||
title: '下载点',
|
||||
dataIndex: 'pointName',
|
||||
title: '上下载点',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
|
||||
|
||||
@ -293,7 +293,7 @@
|
||||
cpName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
uomCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
empName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
bDeptName: [{ required: false, message: "该项为必填项", trigger: 'change' }],
|
||||
dateTo:[{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||
dateFrom:[{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||
});
|
||||
|
||||
@ -6,19 +6,19 @@
|
||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('datePlan')?'changeStyle':''">
|
||||
{{ formState.datePlan ? dayjs(formState.datePlan).format('YYYY-MM-DD'): null }}
|
||||
</div>
|
||||
<a-date-picker v-else v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable" placeholder="请选择计划日期" @change="datePlanChange" />
|
||||
<a-date-picker v-else v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable||pageType=='edit'" placeholder="请选择计划日期" @change="datePlanChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同" name="kName">
|
||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('kName')?'changeStyle':''">{{ formState.kName }}</div>
|
||||
<a-input-search v-else v-model:value="formState.kName" :disabled="disable" placeholder="请选择合同" readonly @search="onSearch"/>
|
||||
<a-input-search v-else v-model:value="formState.kName" :disabled="disable||pageType=='edit'" placeholder="请选择合同" readonly @search="onSearch"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="下载点" name="pointDelyName">
|
||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('pointDelyName')?'changeStyle':''">{{ formState.pointDelyName }}</div>
|
||||
<a-input-search v-else v-model:value="formState.pointDelyName" :disabled="disable" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
||||
<a-input-search v-else v-model:value="formState.pointDelyName" :disabled="disable||pageType=='edit'" placeholder="请选择下载点" readonly @search="onSearchUpLoad"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
@ -215,8 +215,8 @@
|
||||
formState.value.alterSign = 'I'
|
||||
formState.value.approCode = 'WTJ'
|
||||
const res = await getCompDept(userInfo.id)
|
||||
formState.value.cuCode = res?.dept?.code
|
||||
formState.value.comId = res?.dept?.id
|
||||
formState.value.cuCode = res?.comp?.cuCode
|
||||
formState.value.comId = res?.comp?.id
|
||||
const res1 = await getLngPngDemandRate({}) || []
|
||||
formState.value.rateM3Gj = res1[0]?.rateM3Gj
|
||||
}
|
||||
@ -364,7 +364,6 @@
|
||||
(val) => {
|
||||
if (val) {
|
||||
formState.value = val
|
||||
datePlanChange(formState.value.datePlan)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -139,9 +139,9 @@
|
||||
{ title: t('评价部门'), dataIndex: 'eDeptName', },
|
||||
{ title: t('评分'), dataIndex: 'score', },
|
||||
{ title: t('分数说明'), dataIndex: 'scoreDesc', },
|
||||
{ title: t('评价人'), dataIndex: 'aEmpName', },
|
||||
{ title: t('评价人'), dataIndex: 'aEmpName', width: 80},
|
||||
{ title: t('评价时间'), dataIndex: 'aTime', width: 150},
|
||||
{ title: t('实际评价部门'), dataIndex: 'aDeptName', width: 150},
|
||||
{ title: t('实际评价部门'), dataIndex: 'aDeptName', width: 110},
|
||||
]);
|
||||
const dataList= ref([]);
|
||||
const dataFile = ref([]);
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</slot>
|
||||
关闭
|
||||
</a-button>
|
||||
<a-button v-if="!disabled" :disabled="data.submitLoading" type="primary" @click="saveLaunch">
|
||||
<a-button v-if="!disabled" :disabled="data.submitLoading" type="primary" @click="saveLaunchSubmit">
|
||||
<slot name="icon">
|
||||
<send-outlined />
|
||||
</slot>
|
||||
@ -271,19 +271,24 @@
|
||||
data.submitLoading = false;
|
||||
return;
|
||||
}
|
||||
opinionDlg.value.toggleDialog({
|
||||
action: 'agree',
|
||||
nextNodes,
|
||||
rejectCancel: () => {
|
||||
loading.value = false;
|
||||
data.submitLoading = false;
|
||||
},
|
||||
callback: (args) => {
|
||||
approvalData.approvedContent = args.opinion;
|
||||
approvalData.nextTaskUser = args.nextTaskUser;
|
||||
onFinish({});
|
||||
}
|
||||
});
|
||||
const nextTaskUser = {};
|
||||
let arr = (nextNodes[0]?.userList||[]).map(v =>v.F_UserId)
|
||||
nextTaskUser[nextNodes[0]?.activityId] = arr.join(',')
|
||||
approvalData.nextTaskUser = nextTaskUser
|
||||
onFinish({})
|
||||
// opinionDlg.value.toggleDialog({
|
||||
// action: 'agree',
|
||||
// nextNodes,
|
||||
// rejectCancel: () => {
|
||||
// loading.value = false;
|
||||
// data.submitLoading = false;
|
||||
// },
|
||||
// callback: (args) => {
|
||||
// approvalData.approvedContent = args.opinion;
|
||||
// approvalData.nextTaskUser = args.nextTaskUser;
|
||||
// onFinish({});
|
||||
// }
|
||||
// });
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
data.submitLoading = false;
|
||||
@ -316,6 +321,8 @@
|
||||
loading.value = false;
|
||||
}
|
||||
} catch (error) {
|
||||
data.submitLoading = false;
|
||||
loading.value = false;
|
||||
flowFail();
|
||||
}
|
||||
}
|
||||
@ -365,6 +372,20 @@
|
||||
disableSubmit.value = false
|
||||
}
|
||||
}
|
||||
async function saveLaunchSubmit () {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '请确认是否提交流程,提交后流程不能删除',
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
saveLaunch()
|
||||
},
|
||||
onCancel: () => {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
async function saveLaunchNew() {
|
||||
if (!taskId.value && rDraftsId.value != '0') {
|
||||
try {
|
||||
|
||||
@ -107,6 +107,11 @@
|
||||
try {
|
||||
values[RowKey] = rowId;
|
||||
state.formModel = values;
|
||||
values.xjrNoticeUserList = values.xjrNoticeUserList || []
|
||||
values.xjrNoticeUserList.forEach(i=>{
|
||||
i.userIds = i.userId
|
||||
delete i.userId
|
||||
})
|
||||
let saveVal = await updateXjrNotice(values);
|
||||
await submitFormEvent(formEventConfigs, state.formModel, systemFormRef.value, formProps.schemas); //表单事件:提交表单
|
||||
return saveVal;
|
||||
@ -116,6 +121,11 @@
|
||||
async function add(values) {
|
||||
try {
|
||||
state.formModel = values;
|
||||
values.xjrNoticeUserList = values.xjrNoticeUserList || []
|
||||
values.xjrNoticeUserList.forEach(i=>{
|
||||
i.userIds = i.userId
|
||||
delete i.userId
|
||||
})
|
||||
let saveVal = await addXjrNotice(values);
|
||||
await submitFormEvent(formEventConfigs, state.formModel, systemFormRef.value, formProps.schemas); //表单事件:提交表单
|
||||
return saveVal;
|
||||
|
||||
Reference in New Issue
Block a user