富文本

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) => {
x.fileUrl = '/api' + x.fileUrl
instance?.cmd.do('insertHTML', '<img src="' + x.fileUrl + '"></img>');
});
} catch (error) {

View File

@ -119,8 +119,6 @@
() => props.disabled,
(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,
(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>
<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">
<Card title="" :bordered="false" >
<a-row>
@ -140,6 +140,7 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
const isViewForm = currentRoute.value.path.includes('viewForm')
const spinning = ref(false);
const curIdx = ref(null)
@ -318,5 +319,7 @@
margin-bottom: 12px;
border-bottom: 1px solid #eee;
}
.pdcss {
padding: 6px 12px !important;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<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">
<Card title="合同要素" :bordered="false" >
<a-row>
@ -280,6 +280,7 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
const isViewForm = currentRoute.value.path.includes('viewForm')
const spinning = ref(false);
const curIdx = ref(null)
@ -330,17 +331,6 @@
{ title: t('备注'), dataIndex: 'note', sorter: true, width: 200},
{ 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 dataFile = ref([]);
const dataListAppro = ref([])
@ -379,6 +369,11 @@
getOption()
if (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 {
formState.empName = userInfo.name
formState.empId = userInfo.id
@ -626,5 +621,8 @@
margin-bottom: 12px;
border-bottom: 1px solid #eee;
}
.pdcss {
padding: 6px 12px !important;
}
</style>

View File

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

View File

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

View File

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

View File

@ -265,22 +265,6 @@
labelCol: { span: 8 },
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([
{ title: t('序号'), dataIndex: 'index', key: 'index', sorter: true, customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('交割点'), dataIndex: 'pointDelyName', sorter: true, width:150},
@ -339,10 +323,6 @@
() => props.disabled,
(val) => {
isDisable.value = val
if (val) {
let idx = columns.value.findIndex(v =>v.dataIndex == 'operation')
idx>-1 && columns.value.splice(idx, 1)
}
},
{
immediate: true
@ -566,7 +546,7 @@
await formRef.value.validateFields();
let arr = contractQty.value.getQtyList()
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) {
message.warn('请完善合同约定必选项')
return