选商完善
This commit is contained in:
parent
4d2380c4f8
commit
b1707302e9
|
@ -2,6 +2,6 @@
|
|||
pnpm vsh code-workspace --auto-commit
|
||||
|
||||
# Format and submit code according to lintstagedrc.js configuration
|
||||
pnpm exec lint-staged
|
||||
# pnpm exec lint-staged
|
||||
|
||||
echo Run pre-commit hook done.
|
||||
|
|
|
@ -40,23 +40,24 @@ export const useDictStore = defineStore(
|
|||
try {
|
||||
const data = await Apis.dictData.get_page({ params: { pageNum: 1, pageSize: 10000 } });
|
||||
const dictDataMap: Record<string, DictDataVO[]> = {};
|
||||
|
||||
// 处理静态字典数据
|
||||
Object.keys(dataModule).forEach(dictType => {
|
||||
const dictEntries = dataModule[dictType];
|
||||
Object.keys(dictEntries).forEach(entryKey => {
|
||||
dictEntries.forEach(dictData => {
|
||||
dictData.type = dictType;
|
||||
|
||||
if (!dictDataMap[dictType]) {
|
||||
dictDataMap[dictType] = [];
|
||||
}
|
||||
const entry = dictEntries[entryKey];
|
||||
dictDataMap[dictType].push({
|
||||
value: entryKey,
|
||||
label: entry.text,
|
||||
colorType: entry.colorType,
|
||||
cssClass: entry.cssClass,
|
||||
...entry
|
||||
value: dictData.value,
|
||||
label: dictData.name,
|
||||
colorType: dictData.colorType,
|
||||
cssClass: dictData.cssClass,
|
||||
...dictData
|
||||
} as DictDataVO);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 处理动态字典数据
|
||||
|
|
|
@ -3,7 +3,7 @@ export enum DICT_TYPE {
|
|||
|
||||
/** 静态枚举-划分标段 */
|
||||
sectionType = 'section_type',
|
||||
|
||||
sectionNum = 'section_num',
|
||||
commonWhether = 'common_whether',
|
||||
|
||||
sysNormalDisable = 'sys_normal_disable',
|
||||
|
|
|
@ -2,22 +2,34 @@
|
|||
export default {
|
||||
|
||||
/** 变更原因 */
|
||||
cancel_reson: {
|
||||
0: { label: "未填写原因", colorType: "" },
|
||||
1: { label: "用户取消", colorType: "" },
|
||||
2: { label: "系统取消", colorType: "" },
|
||||
3: { label: "其他原因", colorType: "" }
|
||||
},
|
||||
cancel_reson: [
|
||||
{ label: "未填写原因", value: "0" },
|
||||
{ label: "用户取消", value: "1" },
|
||||
{ label: "系统取消", value: "2" },
|
||||
{ label: "其他原因", value: "3" }
|
||||
],
|
||||
|
||||
/** 划分标段 */
|
||||
section_type: {
|
||||
1: { label: "是", colorType: "" },
|
||||
0: { label: "否", colorType: "" },
|
||||
},
|
||||
section_type: [
|
||||
{ label: "是", value: "1" },
|
||||
{ label: "否", value: "0" }
|
||||
],
|
||||
|
||||
/** 标段数 */
|
||||
section_num: [
|
||||
{ label: "1", value: "1" },
|
||||
{ label: "2", value: "2" }, ,
|
||||
{ label: "3", value: "3" },
|
||||
{ label: "4", value: "4" },
|
||||
{ label: "5", value: "5" },
|
||||
{ label: "6", value: "6" },
|
||||
{ label: "7", value: "7" },
|
||||
{ label: "8", value: "8" },
|
||||
],
|
||||
|
||||
/** 常用是否 */
|
||||
common_whether: {
|
||||
1: { label: "是", colorType: "" },
|
||||
0: { label: "否", colorType: "" },
|
||||
},
|
||||
common_whether: [
|
||||
{ label: "是", value: "1" },
|
||||
{ label: "否", value: "0" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ const fileUploader = new FileUploader({})
|
|||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = route.params.id;
|
||||
const pageRef = ref();
|
||||
|
||||
let showHelpTip = ref(false);
|
||||
|
||||
|
@ -33,7 +34,6 @@ let isLoading = ref(false)
|
|||
|
||||
let contractTypeData = ref([])
|
||||
|
||||
|
||||
const formBinding = ref({
|
||||
col: { span: 24 },
|
||||
initialForm: {
|
||||
|
@ -80,6 +80,21 @@ const beforeUpload: UploadProps["beforeUpload"] = (file) => {
|
|||
return false;
|
||||
};
|
||||
|
||||
let collapses = ['1', '2']
|
||||
let collapseActiveKey = ref(collapses)
|
||||
function areArraysEqualUnordered(arr1, arr2) {
|
||||
if (arr1.length !== arr2.length) return false;
|
||||
const sortedArr1 = arr1.slice().sort();
|
||||
const sortedArr2 = arr2.slice().sort();
|
||||
return JSON.stringify(sortedArr1) === JSON.stringify(sortedArr2);
|
||||
}
|
||||
const isFold = computed(() => {
|
||||
return !areArraysEqualUnordered(collapses, collapseActiveKey.value)
|
||||
})
|
||||
function handleFold() {
|
||||
collapseActiveKey.value = isFold.value ? collapses : []
|
||||
}
|
||||
|
||||
function handleBack() {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
|
@ -290,24 +305,31 @@ onMounted(async () => {
|
|||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Page id="components-affix-demo-target" ref="containerRef" contentClass="h-full flex flex-col overflow-y-scroll">
|
||||
<Page ref="pageRef" contentClass="h-full flex flex-col">
|
||||
|
||||
<a-affix :target="() => pageRef.bodyRef" :offset-top="0" :style="{ zIndex: 999 }">
|
||||
<div class="bg-white w-full flex flex-row pt-1 pl-1">
|
||||
<a-space class="flex-1">
|
||||
<vben-button variant="primary" @click="handleSave()">保存</vben-button>
|
||||
<vben-button variant="primary" @click="handleSubmit()">提交</vben-button>
|
||||
<vben-button v-if="id" variant="destructive" @click="handleDelete()">
|
||||
删除
|
||||
</vben-button>
|
||||
<vben-button variant="secondary" @click="handleBack()">返回</vben-button>
|
||||
</a-space>
|
||||
|
||||
<vben-button variant="secondary" @click="handleFold()">一键{{ isFold ? '展开' : '收起' }}</vben-button>
|
||||
|
||||
</div>
|
||||
</a-affix>
|
||||
|
||||
<a-spin :spinning="isLoading">
|
||||
<a-space>
|
||||
<vben-button variant="primary" @click="handleSave()">保存</vben-button>
|
||||
<vben-button variant="primary" @click="handleSubmit()">提交</vben-button>
|
||||
<vben-button v-if="id" variant="destructive" @click="handleDelete()">
|
||||
删除
|
||||
</vben-button>
|
||||
<vben-button variant="secondary" @click="handleBack()">返回</vben-button>
|
||||
</a-space>
|
||||
<div class="mx-auto w-[800px] overflow-auto">
|
||||
<a-space direction="vertical">
|
||||
<a-card title="基本信息" size="small" class="w-full">
|
||||
<div class="mx-auto overflow-auto py-2">
|
||||
<a-collapse v-model:activeKey="collapseActiveKey" :bordered="false">
|
||||
<a-collapse-panel key="1" header="基本信息" class="w-full">
|
||||
<fs-form ref="formRef" class="w-full" v-bind="formBinding">
|
||||
<template #form_fileList="scope">
|
||||
<a-upload v-model:fileList="scope.form.fileList" accept=".pdf,.ppt,.pptx" :max-count="3" name="file"
|
||||
|
@ -319,9 +341,9 @@ onMounted(async () => {
|
|||
</a-upload>
|
||||
</template>
|
||||
</fs-form>
|
||||
</a-card>
|
||||
</a-collapse-panel>
|
||||
|
||||
<a-card title="签约依据" size="small" class="w-[800px]">
|
||||
<a-collapse-panel key="2" header="签约依据" class="w-full">
|
||||
<template #extra>
|
||||
<a-button size="small" type="primary" @click="handleOpenSignBasisModal()">
|
||||
<MdiAdd class="text-lg mr-0.5" />
|
||||
|
@ -329,7 +351,7 @@ onMounted(async () => {
|
|||
</a-button>
|
||||
</template>
|
||||
|
||||
<VxeGrid ref="xGridRef" v-bind="gridOptions" class="w-[800px]">
|
||||
<VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
|
||||
<template #toolbar_buttons></template>
|
||||
<template #operate="{ row }">
|
||||
<a-space>
|
||||
|
@ -344,9 +366,9 @@ onMounted(async () => {
|
|||
</template>
|
||||
</VxeGrid>
|
||||
|
||||
</a-card>
|
||||
</a-collapse-panel>
|
||||
|
||||
</a-space>
|
||||
</a-collapse>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ export function getFormSchema(params: any = {}) {
|
|||
contractName: {
|
||||
title: "合同名称",
|
||||
key: "contractName",
|
||||
col: { span: 24 },
|
||||
col: { span: 16 },
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value",
|
||||
|
@ -30,16 +30,34 @@ export function getFormSchema(params: any = {}) {
|
|||
},
|
||||
rules: [{ required: true }],
|
||||
},
|
||||
reportNo: {
|
||||
title: "报审序号",
|
||||
key: "reportNo",
|
||||
col: { span: 8 },
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value",
|
||||
allowClear: false,
|
||||
},
|
||||
conditionalRender: {
|
||||
match({ form }) {
|
||||
return true;
|
||||
},
|
||||
render({ form }) {
|
||||
return <span>{form.reportNo}</span>;
|
||||
}
|
||||
}
|
||||
},
|
||||
ctrType: {
|
||||
title: "合同类别",
|
||||
key: "ctrType",
|
||||
col: { span: 12 },
|
||||
col: { span: 8 },
|
||||
component: {
|
||||
name: "fs-dict-select",
|
||||
vModel: "value",
|
||||
class: 'min-w-[200px]',
|
||||
dict: dict({
|
||||
async getData({ form = {} }) {
|
||||
async getData({ form = {}, getComponentRef }) {
|
||||
return filterContractTypes(contractTypeData, "-1");
|
||||
},
|
||||
}),
|
||||
|
@ -55,19 +73,30 @@ export function getFormSchema(params: any = {}) {
|
|||
ctrTwoType: {
|
||||
title: "二级类别",
|
||||
key: "ctrTwoType",
|
||||
col: { span: 12 },
|
||||
col: { span: 8 },
|
||||
component: {
|
||||
name: "fs-dict-select",
|
||||
vModel: "value",
|
||||
class: 'min-w-[200px]',
|
||||
dict: dict({
|
||||
async getData({ form = {} }) {
|
||||
return filterContractTypes(contractTypeData, form.ctrType);
|
||||
if (form.ctrType) {
|
||||
return filterContractTypes(contractTypeData, form.ctrType)
|
||||
}
|
||||
return contractTypeData;
|
||||
},
|
||||
}),
|
||||
},
|
||||
rules: [{ required: true }],
|
||||
},
|
||||
ctrThreeType: {
|
||||
title: "三级类别",
|
||||
key: "ctrTwoType",
|
||||
col: { span: 8 },
|
||||
render({ form }) {
|
||||
return <span></span>;
|
||||
}
|
||||
},
|
||||
frameProtocol: {
|
||||
title: "框架协议",
|
||||
key: "frameProtocol",
|
||||
|
|
|
@ -7,7 +7,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
projectNum: {
|
||||
title: "项目",
|
||||
key: "projectNum",
|
||||
col: { span: 24 },
|
||||
col: { span: 12 },
|
||||
component: {
|
||||
name: "a-input",
|
||||
vModel: "value",
|
||||
|
@ -32,7 +32,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
projectName: {
|
||||
title: "项目名称",
|
||||
key: "projectName",
|
||||
col: { span: 12 },
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "fs-dict-select",
|
||||
vModel: "value",
|
||||
|
@ -46,7 +46,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
priceStyleId: {
|
||||
title: "商务计价方式",
|
||||
key: "priceStyleId",
|
||||
col: { span: 8 },
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "fs-dict-radio",
|
||||
vModel: "value",
|
||||
|
@ -59,8 +59,7 @@ export function getFormSchema(_params: any = {}) {
|
|||
choiceType: {
|
||||
title: "选商方式",
|
||||
key: "choiceType",
|
||||
col: { span: 12 },
|
||||
labelCol: { style: { width: "200px" } },
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "fs-dict-radio",
|
||||
vModel: "value",
|
||||
|
@ -69,6 +68,55 @@ export function getFormSchema(_params: any = {}) {
|
|||
}),
|
||||
},
|
||||
},
|
||||
choiceReason: {
|
||||
title: "选商方式说明",
|
||||
key: "choiceReason",
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "a-textarea",
|
||||
vModel: "value",
|
||||
},
|
||||
},
|
||||
qualificReq: {
|
||||
title: "资质要求",
|
||||
key: "qualificReq",
|
||||
col: { span: 24 },
|
||||
component: {
|
||||
name: "a-textarea",
|
||||
vModel: "value",
|
||||
},
|
||||
},
|
||||
isBid: {
|
||||
title: "划分标段",
|
||||
key: "isBid",
|
||||
col: { span: 24 },
|
||||
// component: {
|
||||
// name: "fs-dict-radio",
|
||||
// vModel: "value",
|
||||
// dict: dict({
|
||||
// data: getDictOptions(DICT_TYPE.sectionType)
|
||||
// }),
|
||||
// },
|
||||
render({ form }) {
|
||||
//注意此处的v-model写法
|
||||
let options1 = getDictOptions(DICT_TYPE.sectionType,'number')
|
||||
let options2 = getDictOptions(DICT_TYPE.sectionNum,'number')
|
||||
|
||||
return (
|
||||
<div class="flex">
|
||||
<a-form-item class="inline-block !mb-0">
|
||||
<a-radio-group v-model:value={form.isBid} options={options1} />
|
||||
</a-form-item>
|
||||
<div class="w-2"></div>
|
||||
{form.isBid === 1 && (
|
||||
<a-form-item label="标段数" class="inline-block !mb-0">
|
||||
<a-radio-group v-model:value={form.budgetSum2} options={options2} />
|
||||
</a-form-item>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
fundAllocation: {
|
||||
title: "资金流向",
|
||||
key: "fundAllocation",
|
||||
|
@ -142,10 +190,6 @@ export function getFormSchema(_params: any = {}) {
|
|||
},
|
||||
rules: [{ required: true, message: "请选择组织形式" }],
|
||||
},
|
||||
fileList: {
|
||||
title: "相关附件",
|
||||
key: "fileList",
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ const formRefByBaseInfo = ref();
|
|||
|
||||
let isLoading = ref(false)
|
||||
|
||||
let contractTypeData = ref([])
|
||||
let contractTypeData = ref(['1'])
|
||||
|
||||
const formBindingByBaseInfo = ref({
|
||||
col: { span: 24 },
|
||||
|
@ -45,7 +45,8 @@ const formBinding = ref({
|
|||
col: { span: 24 },
|
||||
initialForm: {
|
||||
contractName: '',
|
||||
priceType: 'CNY'
|
||||
priceType: 'CNY',
|
||||
isBid: 0
|
||||
},
|
||||
labelCol: { style: { width: "120px" } },
|
||||
columns: getFormSchema()
|
||||
|
@ -124,6 +125,21 @@ function handleDelete() {
|
|||
});
|
||||
}
|
||||
|
||||
let collapses = ['1', '2', '3', '4']
|
||||
let collapseActiveKey = ref(collapses)
|
||||
function areArraysEqualUnordered(arr1, arr2) {
|
||||
if (arr1.length !== arr2.length) return false;
|
||||
const sortedArr1 = arr1.slice().sort();
|
||||
const sortedArr2 = arr2.slice().sort();
|
||||
return JSON.stringify(sortedArr1) === JSON.stringify(sortedArr2);
|
||||
}
|
||||
const isFold = computed(() => {
|
||||
return !areArraysEqualUnordered(collapses, collapseActiveKey.value)
|
||||
})
|
||||
function handleFold() {
|
||||
collapseActiveKey.value = isFold.value ? collapses : []
|
||||
}
|
||||
|
||||
function loadDataByContractTypeData() {
|
||||
|
||||
}
|
||||
|
@ -286,11 +302,11 @@ onMounted(async () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Page ref="pageRef" contentClass="h-full flex flex-col ">
|
||||
<Page ref="pageRef" contentClass="h-full flex flex-col">
|
||||
|
||||
<a-affix :target="() => pageRef.bodyRef" :offset-top="0">
|
||||
<div class="bg-white w-full pt-1 pl-1">
|
||||
<a-space>
|
||||
<a-affix :target="() => pageRef.bodyRef" :offset-top="0" :style="{ zIndex: 999 }">
|
||||
<div class="bg-white w-full flex flex-row pt-1 pl-1">
|
||||
<a-space class="flex-1">
|
||||
<vben-button variant="primary" @click="handleSave()">保存</vben-button>
|
||||
<vben-button variant="primary" @click="handleSubmit()">提交</vben-button>
|
||||
<vben-button variant="destructive" @click="handleDelete()">
|
||||
|
@ -298,27 +314,16 @@ onMounted(async () => {
|
|||
</vben-button>
|
||||
<vben-button variant="secondary" @click="handleBack()">返回</vben-button>
|
||||
</a-space>
|
||||
<vben-button variant="secondary" @click="handleFold()">一键{{ isFold ? '展开' : '收起' }}</vben-button>
|
||||
</div>
|
||||
</a-affix>
|
||||
|
||||
<a-spin :spinning="isLoading">
|
||||
<div class="mx-auto w-[800px] overflow-auto">
|
||||
<a-space direction="vertical">
|
||||
<div class="mx-auto overflow-auto py-2">
|
||||
<a-collapse v-model:activeKey="collapseActiveKey" :bordered="false">
|
||||
|
||||
<a-card title="基本信息" size="small" class="w-full">
|
||||
<a-collapse-panel key="1" header="基本信息" class="w-full">
|
||||
<fs-form ref="formRefByBaseInfo" class="w-full" v-bind="formBindingByBaseInfo">
|
||||
</fs-form>
|
||||
</a-card>
|
||||
|
||||
<a-card title="签约依据" size="small" class="w-[800px]">
|
||||
<VxeGrid ref="xGridRef" v-bind="gridOptions" class="w-[800px]">
|
||||
<template #toolbar_buttons></template>
|
||||
</VxeGrid>
|
||||
</a-card>
|
||||
|
||||
|
||||
<a-card title="选商资料" size="small" class="w-full">
|
||||
<fs-form ref="formRef" class="w-full" v-bind="formBinding">
|
||||
<template #form_fileList="scope">
|
||||
<a-upload v-model:fileList="scope.form.fileList" accept=".pdf,.ppt,.pptx" :max-count="3" name="file"
|
||||
:before-upload="beforeUpload" @change="handleChange">
|
||||
|
@ -329,20 +334,34 @@ onMounted(async () => {
|
|||
</a-upload>
|
||||
</template>
|
||||
</fs-form>
|
||||
</a-card>
|
||||
</a-collapse-panel>
|
||||
|
||||
<a-card title="招标文件上传" size="small" class="w-full">
|
||||
<a-collapse-panel key="2" header="签约依据" class="w-full">
|
||||
<VxeGrid ref="xGridRef" v-bind="gridOptions" class="">
|
||||
<template #toolbar_buttons></template>
|
||||
</VxeGrid>
|
||||
</a-collapse-panel>
|
||||
|
||||
<a-upload v-model:fileList="fileList" accept=".pdf,.ppt,.pptx" :max-count="3" name="file"
|
||||
:before-upload="beforeUpload" @change="handleChange">
|
||||
<a-button>
|
||||
<MdiUpload />
|
||||
点击上传
|
||||
</a-button>
|
||||
</a-upload>
|
||||
</a-card>
|
||||
<a-collapse-panel key="3" header="选商资料" class="w-full">
|
||||
<fs-form ref="formRef" class="w-full" v-bind="formBinding">
|
||||
</fs-form>
|
||||
</a-collapse-panel>
|
||||
|
||||
</a-space>
|
||||
<a-collapse-panel key="4" header="招标文件上传" class="w-full">
|
||||
<a-form :label-col="{ style: { width: '120px' } }">
|
||||
<a-form-item name="fileList" label="附件上传">
|
||||
<a-upload v-model:fileList="fileList" accept=".pdf,.ppt,.pptx" :max-count="3" name="file"
|
||||
:before-upload="beforeUpload" @change="handleChange">
|
||||
<a-button>
|
||||
<MdiUpload />
|
||||
点击上传
|
||||
</a-button>
|
||||
</a-upload>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-collapse-panel>
|
||||
|
||||
</a-collapse>
|
||||
</div>
|
||||
</a-spin>
|
||||
|
||||
|
|
Loading…
Reference in New Issue