富文本

This commit is contained in:
‘huanghaiixia’
2026-01-08 17:53:29 +08:00
parent 99352c773e
commit 1b81dc8f51
9 changed files with 42 additions and 62 deletions

View File

@ -41,6 +41,7 @@
'' ''
); );
res.forEach((x) => { res.forEach((x) => {
x.fileUrl = '/api' + x.fileUrl
instance?.cmd.do('insertHTML', '<img src="' + x.fileUrl + '"></img>'); instance?.cmd.do('insertHTML', '<img src="' + x.fileUrl + '"></img>');
}); });
} catch (error) { } catch (error) {

View File

@ -119,8 +119,6 @@
() => props.disabled, () => props.disabled,
(val) => { (val) => {
if (val) { if (val) {
let idx2 = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx2>-1 && columns.value.splice(idx2, 1)
} }
}, },
{ {

View File

@ -121,8 +121,6 @@
() => props.disabled, () => props.disabled,
(val) => { (val) => {
if (val) { if (val) {
let idx2 = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx2>-1 && columns.value.splice(idx2, 1)
} }
}, },
{ {

View File

@ -1,6 +1,6 @@
<template> <template>
<a-spin :spinning="spinning" tip="加载中..."> <a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle"> <div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'pdcss':''">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout"> <a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="" :bordered="false" > <Card title="" :bordered="false" >
<a-row> <a-row>
@ -140,6 +140,7 @@
const formId = ref(currentRoute.value?.params?.id); const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type); const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id) const pageId = ref(currentRoute.value.query?.id)
const isViewForm = currentRoute.value.path.includes('viewForm')
const spinning = ref(false); const spinning = ref(false);
const curIdx = ref(null) const curIdx = ref(null)
@ -318,5 +319,7 @@
margin-bottom: 12px; margin-bottom: 12px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.pdcss {
padding: 6px 12px !important;
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<a-spin :spinning="spinning" tip="加载中..."> <a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle"> <div class="page-bg-wrap formViewStyle" :class="isViewForm ? 'pdcss':''">
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout"> <a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="合同要素" :bordered="false" > <Card title="合同要素" :bordered="false" >
<a-row> <a-row>
@ -280,6 +280,7 @@
const formId = ref(currentRoute.value?.params?.id); const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type); const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id) const pageId = ref(currentRoute.value.query?.id)
const isViewForm = currentRoute.value.path.includes('viewForm')
const spinning = ref(false); const spinning = ref(false);
const curIdx = ref(null) const curIdx = ref(null)
@ -330,17 +331,6 @@
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200}, { title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'}, { title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]); ]);
const columnsAppro= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('标题'), dataIndex: 'title', sorter: true, width:100},
{ title: t('编号'), dataIndex: 'code', sorter: true},
{ title: t('签报类型'), dataIndex: 'typeName', sorter: true, width: 140},
{ title: t('拟稿人'), dataIndex: 'empName', sorter: true, width: 140},
{ title: t('拟稿人所属部门'), dataIndex: 'bDeptName', sorter: true, width: 140},
{ title: t('拟稿时间'), dataIndex: 'dateAppro', sorter: true, width: 140},
{ title: t('附件'), dataIndex: 'file', sorter: true, width: 140},
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
]);
const dataList = ref([]) const dataList = ref([])
const dataFile = ref([]); const dataFile = ref([]);
const dataListAppro = ref([]) const dataListAppro = ref([])
@ -379,6 +369,11 @@
getOption() getOption()
if (pageId.value) { if (pageId.value) {
getInfo(pageId.value) getInfo(pageId.value)
if (currentRoute.value.query?.disabled) {
isDisable.value = true
let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx>-1 && columns.value.splice(idx, 1)
}
} else { } else {
formState.empName = userInfo.name formState.empName = userInfo.name
formState.empId = userInfo.id formState.empId = userInfo.id
@ -625,6 +620,9 @@
min-height: 44px; min-height: 44px;
margin-bottom: 12px; margin-bottom: 12px;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.pdcss {
padding: 6px 12px !important;
}
</style> </style>

View File

@ -8,7 +8,7 @@ export const formConfig = {
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'kNo', field: 'kName',
label: '合同号/名称', label: '合同号/名称',
component: 'Input', component: 'Input',
}, },
@ -54,6 +54,7 @@ export const columns: BasicColumn[] = [
align: 'left', align: 'left',
sorter: true, sorter: true,
width: 120
}, },
{ {
@ -63,19 +64,20 @@ export const columns: BasicColumn[] = [
align: 'left', align: 'left',
sorter: true, sorter: true,
width: 120
}, },
{ {
dataIndex: 'approCode', dataIndex: 'approName',
title: '状态', title: '状态',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 100,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'cpTableName', dataIndex: 'pointUpName',
title: '上载点', title: '上载点',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
@ -84,16 +86,16 @@ export const columns: BasicColumn[] = [
}, },
{ {
dataIndex: 'onlineSign', dataIndex: 'transName',
title: '是否托运', title: '是否托运',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 100,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'comId', dataIndex: 'comName',
title: '合同主体', title: '合同主体',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',

View File

@ -110,7 +110,7 @@
<h4>上载点</h4> <h4>上载点</h4>
<a-button type="primary" style="margin-bottom: 10px;margin-right: 10px;" @click="addUpLoad" v-if="!isDisable">新增</a-button> <a-button type="primary" style="margin-bottom: 10px;margin-right: 10px;" @click="addUpLoad" v-if="!isDisable">新增</a-button>
<a-button type="primary" @click="deleteUpLoad" v-if="!isDisable">删除</a-button> <a-button type="primary" @click="deleteUpLoad" v-if="!isDisable">删除</a-button>
<div v-for="(item, idx) in dataListPoint"> <div v-for="(item, idx) in dataListPoint" class="tbStyle">
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item name="pointUpName"> <a-form-item name="pointUpName">
@ -303,10 +303,7 @@
() => props.disabled, () => props.disabled,
(val) => { (val) => {
isDisable.value = val isDisable.value = val
if (val) {
let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx>-1 && columns.value.splice(idx, 1)
}
}, },
{ {
immediate: true immediate: true
@ -352,10 +349,8 @@
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
}); });
dataListAppro.value.forEach(v => {
dataListPoint.value.forEach(v => { v.approId = v.id
let a = (v.lngContractPurPngPointSalesList || []).map(i =>i.pointDelyName)
v.pointDelyName = a.join(',')
}) })
} catch (error) { } catch (error) {
@ -530,7 +525,7 @@
await formRef.value.validateFields(); await formRef.value.validateFields();
let arr = contractQty.value.getQtyList() let arr = contractQty.value.getQtyList()
for(let i=0; i<arr.length; i++) { for(let i=0; i<arr.length; i++) {
let isFlag = !arr[i].dateFrom || !arr[i].dateTo || !arr[i].baseInc || arr[i].rateM3Gj == null || arr[i].rateM3Gj == '' || arr[i].qtyGjMonth == null || arr[i].qtyGjMonth == ''|| arr[i].qtyM3Month == null || arr[i].qtyM3Month == '' let isFlag = !arr[i].dateFrom || !arr[i].dateTo || !arr[i].baseInc || arr[i].qtyGjMonth == null || arr[i].qtyGjMonth === ''|| arr[i].qtyM3Month == null || arr[i].qtyM3Month === ''
if (isFlag) { if (isFlag) {
message.warn('请完善合同约定必选项') message.warn('请完善合同约定必选项')
return return
@ -648,5 +643,10 @@
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
// top: 0; // top: 0;
} }
.tbStyle {
border: 1px dashed #d9d9d9;
padding: 10px;
margin-bottom: 10px;
}
</style> </style>

View File

@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
title: '有效期开始', title: '有效期开始',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
@ -61,7 +61,7 @@ export const columns: BasicColumn[] = [
title: '有效期结束', title: '有效期结束',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
@ -70,7 +70,7 @@ export const columns: BasicColumn[] = [
title: '状态', title: '状态',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 100,
sorter: true, sorter: true,
}, },
@ -84,11 +84,11 @@ export const columns: BasicColumn[] = [
}, },
{ {
dataIndex: 'transSignName', dataIndex: 'transName',
title: '是否托运', title: '是否托运',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },

View File

@ -265,22 +265,6 @@
labelCol: { span: 8 }, labelCol: { span: 8 },
wrapperCol: { span: 16 }, wrapperCol: { span: 16 },
} }
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('开始日期'), dataIndex: 'dateFrom', sorter: true, width:150},
{ title: t('结束日期'), dataIndex: 'dateTo', sorter: true, width: 150},
{ title: t('基础量/增量'), dataIndex: 'baseInc', sorter: true, width: 130},
{ title: t('优先级'), dataIndex: 'sort', sorter: true, width: 100},
{ title: t('比值(方/吉焦)'), dataIndex: 'rateM3Gj', sorter: true, width: 150},
{ title: t('月气量(吉焦)'), dataIndex: 'qtyGjMonth', sorter: true, width: 150},
{ title: t('月气量(万方)'), dataIndex: 'qtyM3Month', sorter: true, width: 150},
{ title: t('日气量(吉焦)'), dataIndex: 'qtyGjDay', sorter: true, width: 120},
{ title: t('日气量(万方)'), dataIndex: 'qtyM3Day', sorter: true, width: 120},
{ title: t('照付不议类型'), dataIndex: 'zfbyTypeCode', sorter: true, width: 120},
{ title: t('照付不议比例%/量数值'), dataIndex: 'zfbyValue', sorter: true, width: 120},
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
]);
const columnsUp = ref([ const columnsUp = ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80}, { title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', sorter: true, width:150}, { title: t('交割点'), dataIndex: 'pointDelyName', sorter: true, width:150},
@ -339,10 +323,6 @@
() => props.disabled, () => props.disabled,
(val) => { (val) => {
isDisable.value = val isDisable.value = val
if (val) {
let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx>-1 && columns.value.splice(idx, 1)
}
}, },
{ {
immediate: true immediate: true
@ -566,7 +546,7 @@
await formRef.value.validateFields(); await formRef.value.validateFields();
let arr = contractQty.value.getQtyList() let arr = contractQty.value.getQtyList()
for(let i=0; i<arr.length; i++) { for(let i=0; i<arr.length; i++) {
let isFlag = !arr[i].dateFrom || !arr[i].dateTo || !arr[i].baseInc || arr[i].rateM3Gj == null || arr[i].rateM3Gj == '' || arr[i].qtyGjMonth == null || arr[i].qtyGjMonth == ''|| arr[i].qtyM3Month == null || arr[i].qtyM3Month == '' let isFlag = !arr[i].dateFrom || !arr[i].dateTo || !arr[i].baseInc || arr[i].qtyGjMonth == null || arr[i].qtyGjMonth === ''|| arr[i].qtyM3Month == null || arr[i].qtyM3Month === ''
if (isFlag) { if (isFlag) {
message.warn('请完善合同约定必选项') message.warn('请完善合同约定必选项')
return return