管道气销售

This commit is contained in:
‘huanghaiixia’
2026-01-07 17:38:57 +08:00
parent f73ce1a9f1
commit 5184bc2ddc
14 changed files with 281 additions and 129 deletions

View File

@ -88,29 +88,5 @@
background-color: #fff;
}
.formViewStyle {
.ant-input-number-disabled, input.ant-input-disabled,.ant-picker.ant-picker-disabled {
border: none !important;
background-color: transparent !important;
padding-left: 0 !important;
color: rgb(0 0 0 / 85%) !important;
::placeholder {
opacity: 0;
}
}
input.ant-input-disabled:placeholder-shown{
opacity: 0 !important;
}
.ant-picker-input > input[disabled], .ant-radio-disabled + span {
color: rgb(0 0 0 / 85%) !important;
}
.ant-picker.ant-picker-disabled .ant-picker-input .ant-picker-suffix {
display: none !important;
}
.ant-input-search > .ant-input-group > .ant-input-group-addon-disabled:last-child {
display: none !important;
}
}
</style>

View File

@ -7,12 +7,40 @@ enum Api {
List = '/contract/contractSales/list',
Info = '/contract/contractSales/info',
LngContract = '/contract/contractSales',
PointTransList = '/magic-api/contract/queryLngContractSalesPngPointTransList',
PointPurList = '/magic-api/contract/queryLngContractSalesPngPointPurList'
}
/**
* @description: //管输(自主托运)列表
*/
export async function getTransList(ksppId: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractPageModel>(
{
url: Api.PointTransList,
params: { ksppId },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: //上载信息列表
*/
export async function getPurList(ksppId: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractPageModel>(
{
url: Api.PointPurList,
params: { ksppId },
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 查询LngContract分页列表
*/

View File

@ -501,4 +501,11 @@
.ant-input-disabled {
color: rgb(0 0 0 / 85%) !important;
}
.ant-input[disabled] {
border: none !important;
background-color: transparent !important;
}
.page-bg-wrap .ant-form-item-label > label {
color: rgba(0, 0, 0, 0.65) !important;
}
</style>

View File

@ -108,7 +108,7 @@
}
if (btn == 'view') {
router.push({
path: '/approve/Appro/form',
path: '/approve/Appro/viewForm',
query: {
id: record.id || record.approId,
disabled: true

View File

@ -63,6 +63,7 @@
}
const handleSuccess = (val) =>{
val.forEach(v => {
v.kFactId = v.id
v.id = null
})
if (!dataList.value.length) {
@ -109,7 +110,7 @@
}
if (btn == 'view') {
router.push({
path: '/contract/ContractFact/form',
path: '/contract/ContractFact/viewForm',
query: {
id: record.id || record.approId,
disabled: true

View File

@ -42,3 +42,38 @@ svg,
span {
outline: none !important;
}
.formViewStyle {
margin-left: 1px ;
margin-right: 1px ;
padding: 3px;
.ant-input-number-disabled, input.ant-input-disabled,.ant-picker.ant-picker-disabled {
border: none !important;
background-color: transparent !important;
padding-left: 0 !important;
color: rgb(0 0 0 / 85%) !important;
::placeholder {
opacity: 0;
}
}
input.ant-input-disabled:placeholder-shown{
opacity: 0 !important;
}
.ant-picker-input > input[disabled], .ant-radio-disabled + span {
color: rgb(0 0 0 / 85%) !important;
}
.ant-picker.ant-picker-disabled .ant-picker-input .ant-picker-suffix {
display: none !important;
}
.ant-input-search > .ant-input-group > .ant-input-group-addon-disabled:last-child {
display: none !important;
}
.ant-input[disabled] {
border: none !important;
background-color: transparent !important;
}
.ant-form-item-label > label {
color: rgba(0, 0, 0, 0.65) !important;
}
}

View File

@ -90,6 +90,45 @@ html[data-theme='light'] {
.page-bg-wrap {
background-color: #fff;
padding: 12px 12px 0 12px;
margin: 12px 12px 0 12px;
// padding: 12px 12px 0 12px;
margin: 6px 12px 0 12px;
}
.ant-card-head {
padding: 0 12px !important;
}
.ant-card-head {
min-height: 32px !important;
}
.ant-card-body {
padding: 12px !important;
}
.formViewStyle {
.ant-card {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1) !important;
// box-shadow: 0 4px 4px 4px #0000001a !important; /* 扩散半径为4px模糊半径为12px */
// box-shadow: -8px 2px 4px #0000001a;
// box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
margin-bottom: 15px;
border-radius: 5px;
}
.ant-card-head-title::before {
content: '';
display: inline-block;
width: 2px;
height: 1em;
background-color: #5e95ff; /* 竖线的颜色 */
margin-right: 8px; /* 与标题内容的间距 */
vertical-align: middle;
}
.ant-card-head-title {
padding: 10px 0 !important;
display: flex !important;
align-items: center !important;
}
}

View File

@ -44,12 +44,12 @@ export const tabListData: TabItem[] = [
list: [],
unreadNum: 0,
},
{
key: '3',
name: t('日程'),
list: [],
unreadNum: 0,
},
// {
// key: '3',
// name: t('日程'),
// list: [],
// unreadNum: 0,
// },
{
key: '4',
name: t('工作流'),

View File

@ -255,7 +255,7 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
component: LAYOUT,
children: [
{
path: '/approve/Appro/form',
path: '/approve/Appro/viewForm',
name: 'ApproForm',
component: () => import('/@/views/approve/Appro/components/createForm.vue'),
meta: {
@ -263,7 +263,7 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
}
},
{
path: '/contract/ContractFact/form',
path: '/contract/ContractFact/viewForm',
name: 'ContractFactForm',
component: () => import('/@/views/contract/ContractFact/components/createForm.vue'),
meta: {

View File

@ -15,9 +15,9 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同期限" name="kPriod">
<a-select v-model:value="formState.kPriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kPriodList" :key="item.code" :value="item.code">
<a-form-item label="合同期限" name="kPeriod">
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
@ -70,7 +70,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="定价机制" name="prcTypeCode">
<a-select v-model:value="formState.prcTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.prcTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.prcTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -79,7 +79,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="量价周期" name="periodTypeCode">
<a-select v-model:value="formState.periodTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.periodTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.periodTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -88,7 +88,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="主计量单位" name="uomCode">
<a-select v-model:value="formState.uomCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.uomCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.uomCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -113,12 +113,18 @@
<div v-for="(item, idx) in dataListPoint">
<a-row>
<a-col :span="8">
<a-form-item label="上载点" name="pointUpName">
<a-form-item name="pointUpName">
<template #label>
<span><span style="color:red">*</span>上载点</span>
</template>
<a-input-search v-model:value="item.pointUpName" :disabled="isDisable" placeholder="请选择上载点" readonly @search="onSearchDownLoad('up', idx)"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否托运" name="transSign">
<a-form-item name="transSign">
<template #label>
<span><span style="color:red">*</span>是否托运</span>
</template>
<a-select v-model:value="item.transSign" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.transSignList" :key="item.code" :value="item.code">
{{ item.name }}
@ -132,7 +138,10 @@
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="交割点" name="pointDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-form-item name="pointDelyName" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<template #label>
<span><span style="color:red">*</span>交割点</span>
</template>
<div style="position: relative;">
<a-textarea style="width:95%;" v-model:value="item.pointDelyName" :disabled="isDisable" readonly placeholder="请选择交割点" :auto-size="{ minRows: 1, maxRows: 5 }"/>
<a-button :icon="h(SearchOutlined)" class="iconStyle" @click="onSearchDownLoad('dely', idx)" />
@ -169,42 +178,42 @@
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'dateFrom'">
<a-date-picker v-model:value="record.dateFrom" @change="dateFromTb(record.dateFrom, index, record)" style="width: 100%" />
<a-date-picker v-model:value="record.dateFrom" :disabled="isDisable" @change="dateFromTb(record.dateFrom, index, record)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'dateTo'">
<a-date-picker v-model:value="record.dateTo" @change="dateToTb(record.dateTo, index, record)" style="width: 100%" />
<a-date-picker v-model:value="record.dateTo" :disabled="isDisable" @change="dateToTb(record.dateTo, index, record)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'sort'">
<a-input-number v-model:value="record.sort" :min="0" style="width: 100%" />
<a-input-number v-model:value="record.sort" :disabled="isDisable" :min="0" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'baseInc'">
<a-select v-model:value="record.baseInc" style="width: 100%" allow-clear>
<a-select v-model:value="record.baseInc" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.baseIncList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</template>
<template v-if="column.dataIndex === 'rateM3Gj'">
<a-input-number v-model:value="record.rateM3Gj" :min="0" @change="numChange('rateM3Gj', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.rateM3Gj" :disabled="isDisable" :min="0" @change="numChange('rateM3Gj', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'qtyGjMonth'">
<a-input-number v-model:value="record.qtyGjMonth" :min="0" @change="numChange('qtyGjMonth', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.qtyGjMonth" :disabled="isDisable" :min="0" @change="numChange('qtyGjMonth', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'qtyM3Month'">
<a-input-number v-model:value="record.qtyM3Month" :min="0" @change="numChange('qtyM3Month', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.qtyM3Month" :disabled="isDisable" :min="0" @change="numChange('qtyM3Month', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'zfbyTypeCode'">
<a-select v-model:value="record.zfbyTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="record.zfbyTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.zfbyTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</template>
<template v-if="column.dataIndex === 'zfbyValue'">
<a-input-number v-model:value="record.zfbyValue" :min="0" style="width: 100%" />
<a-input-number v-model:value="record.zfbyValue" :disabled="isDisable" :min="0" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" style="width: 100%" />
<a-input v-model:value="record.note" :disabled="isDisable" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" style="margin-right: 10px" @click="btnCheck(record, index)">删除</a>
@ -293,7 +302,8 @@
typeCode: 'PP',
onlineSign: 'N',
cpTableName: 'lng_supplier',
curCode: 'CNY'
curCode: 'CNY',
lngContractPurPngList: [{}]
});
const [register, { openModal:openModal}] = useModal();
const [registerDept, { openModal:openModalDept}] = useModal();
@ -345,7 +355,7 @@
}])
let optionSelect= reactive({
approCodeList: [],
kPriodList: [],
kPeriodList: [],
prcTypeCodeList: [],
uomCodeList: [],
periodTypeCodeList: [],
@ -407,13 +417,15 @@
formState.dateSign = formState.dateSign ? dayjs(formState.dateSign) : null
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
formState.prcTypeCode = (formState?.lngContractPurPngList[0] || {}).uomCode
formState.prcTypeCode = (formState?.lngContractPurPngList[0] || {}).prcTypeCode
formState.periodTypeCode = (formState?.lngContractPurPngList[0] || {}).periodTypeCode
formState.uomCode = (formState?.lngContractPurPngList[0] || {}).uomCode
dataListContractAgree.forEach(v => {
dataListContractAgree.value.forEach(v => {
v.qtyM3Month = Number(v.qtyM3Month)/10000
v.qtyM3Day = Number(v.qtyM3Day)/10000
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
});
} catch (error) {
@ -421,7 +433,7 @@
}
}
async function getOption() {
optionSelect.kPriodList = await getDictionary('LNG_K_PER')
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
optionSelect.prcTypeCodeList = await getDictionary('LNG_PRC')
optionSelect.periodTypeCodeList = await getDictionary('LNG_PRC_P')
optionSelect.uomCodeList = await getDictionary('LNG_UOM')
@ -657,6 +669,12 @@
arr[i].dateTo = dayjs(arr[i].dateTo).format('YYYY-MM-DD HH:mm:ss')
arr[i].qtyM3Month = Number(arr[i].qtyM3Month)*10000
arr[i].qtyM3Day = Number(arr[i].qtyM3Day)*10000
}
for(let i=0; i<dataListPoint.value.length; i++) {
if (!dataListPoint.value[i].pointUpCode || !dataListPoint.value[i].transSign || !dataListPoint.value[i].lngContractPurPngPointSalesList.length) {
message.warn('请完善交割点必选项')
return
}
}
let arr1 = []
dataListAppro.value.forEach(v=>{

View File

@ -75,7 +75,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'onlineSign',
dataIndex: 'pointUpName',
title: '交割点',
componentType: 'input',
align: 'left',
@ -84,7 +84,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'cpTableName',
dataIndex: 'transSignName',
title: '是否托运',
componentType: 'input',
align: 'left',
@ -93,7 +93,7 @@ export const columns: BasicColumn[] = [
},
{
dataIndex: 'comId',
dataIndex: 'comName',
title: '合同主体',
componentType: 'input',
align: 'left',

View File

@ -15,9 +15,9 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同期限" name="kPriod">
<a-select v-model:value="formState.kPriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kPriodList" :key="item.code" :value="item.code">
<a-form-item label="合同期限" name="kPeriod">
<a-select v-model:value="formState.kPeriod" :disabled="isDisable" placeholder="请选择合同期限" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.kPeriodList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
@ -70,7 +70,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="定价机制" name="prcTypeCode">
<a-select v-model:value="formState.prcTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.prcTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.prcTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -79,7 +79,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="量价周期" name="periodTypeCode">
<a-select v-model:value="formState.periodTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.periodTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.periodTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -88,7 +88,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="主计量单位" name="uomCode">
<a-select v-model:value="formState.uomCode" style="width: 100%" allow-clear>
<a-select v-model:value="formState.uomCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.uomCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
@ -115,10 +115,13 @@
<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 label="计量交割点" name="pointDelyName">
<a-form-item name="pointDelyName">
<template #label>
<span><span style="color:red">*</span>计量交割点</span>
</template>
<a-input-search v-model:value="item.pointDelyName" :disabled="isDisable" placeholder="请选择计量交割点" readonly @search="onSearchDownLoad('dely', idx)"/>
</a-form-item>
</a-col>
@ -128,7 +131,10 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否托运" name="transSign">
<a-form-item name="transSign">
<template #label>
<span><span style="color:red">*</span>是否托运</span>
</template>
<a-select v-model:value="item.transSign" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.transSignList" :key="item.code" :value="item.code">
{{ item.name }}
@ -141,10 +147,10 @@
<a-textarea v-model:value="item.note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
<h4>上载信息</h4>
<a-table style="width: 100%" :columns="columnsUp" :data-source="dataListContractAgree" :pagination="false" :scroll="{x: 300}"></a-table>
<h4>管输(是否托运)</h4>
<a-table style="width: 100%" :columns="columnsTrans" :data-source="dataListContractAgree" :pagination="false" :scroll="{x: 300}"></a-table>
<h4 style="margin: 5px 0">上载信息</h4>
<a-table style="width: 100%" :columns="columnsUp" :data-source="item.purList || []" :pagination="false" :scroll="{x: 300}"></a-table>
<h4 style="margin: 5px 0">管输(是否托运)</h4>
<a-table style="width: 100%" :columns="columnsTrans" :data-source="item.transList || []" :pagination="false" :scroll="{x: 300}"></a-table>
</a-row>
</div>
</Card>
@ -174,42 +180,42 @@
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'dateFrom'">
<a-date-picker v-model:value="record.dateFrom" @change="dateFromTb(record.dateFrom, index, record)" style="width: 100%" />
<a-date-picker v-model:value="record.dateFrom" :disabled="isDisable" @change="dateFromTb(record.dateFrom, index, record)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'dateTo'">
<a-date-picker v-model:value="record.dateTo" @change="dateToTb(record.dateTo, index, record)" style="width: 100%" />
<a-date-picker v-model:value="record.dateTo" :disabled="isDisable" @change="dateToTb(record.dateTo, index, record)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'sort'">
<a-input-number v-model:value="record.sort" :min="0" style="width: 100%" />
<a-input-number v-model:value="record.sort" :disabled="isDisable" :min="0" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'baseInc'">
<a-select v-model:value="record.baseInc" style="width: 100%" allow-clear>
<a-select v-model:value="record.baseInc" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.baseIncList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</template>
<template v-if="column.dataIndex === 'rateM3Gj'">
<a-input-number v-model:value="record.rateM3Gj" :min="0" @change="numChange('rateM3Gj', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.rateM3Gj" :disabled="isDisable" :min="0" @change="numChange('rateM3Gj', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'qtyGjMonth'">
<a-input-number v-model:value="record.qtyGjMonth" :min="0" @change="numChange('qtyGjMonth', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.qtyGjMonth" :disabled="isDisable" :min="0" @change="numChange('qtyGjMonth', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'qtyM3Month'">
<a-input-number v-model:value="record.qtyM3Month" :min="0" @change="numChange('qtyM3Month', record, index)" style="width: 100%" />
<a-input-number v-model:value="record.qtyM3Month" :disabled="isDisable" :min="0" @change="numChange('qtyM3Month', record, index)" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'zfbyTypeCode'">
<a-select v-model:value="record.zfbyTypeCode" style="width: 100%" allow-clear>
<a-select v-model:value="record.zfbyTypeCode" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.zfbyTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</template>
<template v-if="column.dataIndex === 'zfbyValue'">
<a-input-number v-model:value="record.zfbyValue" :min="0" style="width: 100%" />
<a-input-number v-model:value="record.zfbyValue" :disabled="isDisable" :min="0" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" style="width: 100%" />
<a-input v-model:value="record.note" :disabled="isDisable" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" style="margin-right: 10px" @click="btnCheck(record, index)">删除</a>
@ -229,7 +235,7 @@
<deptListModal @register="registerDept" @success="handleSuccessDept" />
<contractFactListModal @register="registerContractFact" @success="handleSuccessContractFact" />
<downloadPointModal @register="registerDownLoad" @success="handleSuccessDownLoad" />
<customerListModal @register="registerCustomer" @success="handleSuccessSupplier" selectType="radio" />
<customerListModal @register="registerCustomer" @success="handleSuccessCustomer" selectType="radio" />
</a-spin>
</template>
@ -245,7 +251,7 @@
import type { Rule } from 'ant-design-vue/es/form';
import { getDictionary } from '/@/api/sales/Customer';
import { useModal } from '/@/components/Modal';
import { addLngContract,updateLngContract, getLngContract } from '/@/api/contract/ContractPurPng';
import { addLngContract,updateLngContract, getLngContract, getTransList, getPurList } from '/@/api/contract/ContractSales';
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
import dayjs from 'dayjs';
import { getAppEnvConfig } from '/@/utils/env';
@ -263,8 +269,8 @@
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const tableName = 'ContractPurPng';
const columnName = 'ContractPurPng'
const tableName = 'ContractSales';
const columnName = 'ContractSales'
const formType = ref('2'); // 0 新建 1 修改 2 查看
const formRef = ref();
@ -291,12 +297,14 @@
const curIdx = ref(null)
const { notification } = useMessage();
const { t } = useI18n();
const hasDel = ref(false)
const formState = reactive({
approCode: 'WTJ',
typeCode: 'SP',
onlineSign: 'N',
cpTableName: 'lng_customer',
curCode: 'CNY'
curCode: 'CNY',
lngContractSalesPngList: [{}]
});
const [register, { openModal:openModal}] = useModal();
const [registerDept, { openModal:openModalDept}] = useModal();
@ -362,14 +370,14 @@
const dataListAppro = ref([])
const dataListContractFact = ref([])
const dataListPoint = ref([{
"pointUpCode": "",
"pointTransCode": "",
"transSign": "",
"note": null,
"lngContractPurPngPointSalesList": []
'pointDelyCode':'',
}])
let optionSelect= reactive({
approCodeList: [],
kPriodList: [],
kPeriodList: [],
prcTypeCodeList: [],
uomCodeList: [],
periodTypeCodeList: [],
@ -421,31 +429,47 @@
let data = await getLngContract(id)
spinning.value = false
Object.assign(formState, {...data})
Object.assign(dataListPoint.value, formState.lngContractPurPngPointList || [{}])
Object.assign(dataListContractAgree.value, formState.lngContractPurPngQtyList || [])
Object.assign(dataListPoint.value, formState.lngContractSalesPngPointList || [{}])
Object.assign(dataListContractAgree.value, formState.lngContractSalesPngQtyList || [])
Object.assign(dataFile.value, formState.lngFileUploadList || [])
Object.assign(dataListContractFact.value, formState.lngContractFactRelList || [])
Object.assign(dataListAppro.value, formState.lngContractApproRelList || [])
Object.assign(dataListContractFact.value, formState.lngContractFactList || [])
Object.assign(dataListAppro.value, formState.lngApproVoList || [])
formState.dateCfmFrom = formState.dateCfmFrom ? dayjs(formState.dateCfmFrom) : null
formState.dateCfmTo = formState.dateCfmTo ? dayjs(formState.dateCfmTo) : null
formState.dateSign = formState.dateSign ? dayjs(formState.dateSign) : null
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
formState.prcTypeCode = (formState?.lngContractPurPngList[0] || {}).uomCode
formState.periodTypeCode = (formState?.lngContractPurPngList[0] || {}).periodTypeCode
formState.uomCode = (formState?.lngContractPurPngList[0] || {}).uomCode
formState.prcTypeCode = (formState?.lngContractSalesPngList[0] || {}).prcTypeCode
formState.periodTypeCode = (formState?.lngContractSalesPngList[0] || {}).periodTypeCode
formState.uomCode = (formState?.lngContractSalesPngList[0] || {}).uomCode
dataListContractAgree.forEach(v => {
dataListAppro.value.forEach(v => {
v.approId = v.id
})
dataListContractFact.value.forEach(v => {
v.kFactId = v.id
})
dataListContractAgree.value.forEach(v => {
v.qtyM3Month = Number(v.qtyM3Month)/10000
v.qtyM3Day = Number(v.qtyM3Day)/10000
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
});
getList()
} catch (error) {
console.log(error, 'error')
spinning.value = false
}
}
async function getList () {
for (let i = 0; i < dataListPoint.value.length; i++) {
dataListPoint.value[i].transList = await getTransList(dataListPoint.value[i].pointDelyCode)
dataListPoint.value[i].purList = await getPurList(dataListPoint.value[i].pointDelyCode)
}
}
async function getOption() {
optionSelect.kPriodList = await getDictionary('LNG_K_PER')
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
optionSelect.prcTypeCodeList = await getDictionary('LNG_PRC')
optionSelect.periodTypeCodeList = await getDictionary('LNG_PRC_P')
optionSelect.uomCodeList = await getDictionary('LNG_UOM')
@ -470,6 +494,7 @@
dataListAppro.value = val
}
const getApproContractFactList = (val) => {
console.log(val, 'dataListContractFact')
dataListContractFact.value = val
}
const disabledDateStart = (startValue) => {
@ -584,13 +609,18 @@
}
const addUpLoad = ()=> {
dataListPoint.value.push({
"pointUpCode": "",
"pointTransCode": "",
"transSign": "",
"note": null,
"lngContractPurPngPointSalesList": []
'pointDelyCode':'',
transList: [],
purList: []
})
}
const deleteUpLoad = () => {
if (dataListPoint.value[dataListPoint.value.length -1].id) {
hasDel.value = true
}
if (dataListPoint.value.length == 1) return
dataListPoint.value.pop()
}
@ -607,12 +637,13 @@
formState.comName = info.name
formState.comId = info.id
}
const handleSuccessSupplier = (val) => {
formState.cpCode = val[0].suCode
formState.cpName = val[0].suName
const handleSuccessCustomer = (val) => {
formState.cpCode = val[0].cuCode
formState.cpName = val[0].cuName
}
const handleSuccessContractFact = (val) => {
val.forEach(v => {
v.kFactId = v.id
v.id = null
})
if (!dataListContractFact.value.length) {
@ -631,13 +662,15 @@
})
dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo')
}
const handleSuccessDownLoad = (val, type) => {
const handleSuccessDownLoad = async (val, type) => {
if (type == 'trans') {
dataListPoint.value[curIdx.value].pointTransCode = val[0].code
dataListPoint.value[curIdx.value].pointTransName = val[0].fullName
} else {
dataListPoint.value[curIdx.value].pointDelyCode = val[0].code
dataListPoint.value[curIdx.value].pointDelyName = val[0].fullName
dataListPoint.value[curIdx.value].transList = await getTransList(dataListPoint.value[curIdx.value].pointDelyCode)
dataListPoint.value[curIdx.value].purList = await getPurList(dataListPoint.value[curIdx.value].pointDelyCode)
}
}
const btnCheck = (record, index) => {
@ -673,33 +706,42 @@
arr[i].qtyM3Month = Number(arr[i].qtyM3Month)*10000
arr[i].qtyM3Day = Number(arr[i].qtyM3Day)*10000
}
let arr1 = []
dataListAppro.value.forEach(v=>{
v.approId = ''
arr1.concat(v.lngContractPurPngPointSalesList || [])
dataListAppro.value.forEach((v,idx)=>{
v.tableName = 'Ing_contract'
v.sort = idx
})
let newArr = arr1.map(v=>v.pointDelyCode)
let codeList = dataListPoint.value.map(v =>v.pointUpCode)
dataListContractFact.value.forEach((v,idx)=> {
v.sort = idx
})
for(let i=0; i<dataListPoint.value.length; i++) {
dataListPoint.value[i].hasDel = hasDel.value
if (!dataListPoint.value[i].pointDelyCode || !dataListPoint.value[i].transSign) {
message.warn('请完善交割点必选项')
return
}
}
let newArr = dataListPoint.value.map(v=>v.pointTransCode)
let codeList = dataListPoint.value.map(v =>v.pointDelyCode)
const isRepeat=codeList.some((item,index,arr)=>arr.indexOf(item)!=index);
const isRepeatNew=newArr.some((item,index,arr)=>arr.indexOf(item)!=index);
if(isRepeat){
message.warn('上载点不可重复');
message.warn('交割点不可重复');
return
}
if(isRepeatNew){
message.warn('交点不可重复');
message.warn('交点不可重复');
return
}
let obj = {
...formState,
lngContractPurPngPointList: dataListPoint.value,
lngContractPurPngQtyList: arr,
lngContractSalesPngPointList: dataListPoint.value,
lngContractSalesPngQtyList: arr,
lngFileUploadList: dataFile.value,
lngContractFactRelList: dataListContractFact.value,
lngContractApproRelList: dataListAppro.value,
lngContractPurPngList: [
lngContractSalesPngList: [
{
...formState.lngContractPurPngList[0],
...formState.lngContractSalesPngList[0],
"kId": formState.id,
"prcTypeCode": formState.prcTypeCode,
"periodTypeCode": formState.periodTypeCode,
@ -732,6 +774,7 @@
}
} catch (errorInfo) {
console.log(errorInfo, 'errorInfo')
spinning.value = false;
errorInfo?.errorFields?.length && notification.warning({
message: 'Tip',
@ -769,5 +812,10 @@
color: rgba(0, 0, 0, 0.45);
// top: 0;
}
.tbStyle {
border: 1px dashed #d9d9d9;
padding: 10px;
margin-bottom: 10px;
}
</style>

View File

@ -122,7 +122,7 @@
},
schemas: customSearchFormSchema,
fieldMapToTime: [],
showResetButton: false,
showResetButton: true,
},
beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };

View File

@ -63,9 +63,9 @@
</div>
<a-form class="approval-form" :model="approvalData.stampInfo" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" @finish="onFinish" @finish-failed="onFinishFailed">
<!-- 电子签章 -->
<a-form-item :label="t('电子签章')" name="stampId" :rules="[{ required: true, message: t('请选择电子签章') }]" v-if="data.hasStamp">
<!-- <a-form-item :label="t('电子签章')" name="stampId" :rules="[{ required: true, message: t('请选择电子签章') }]" v-if="data.hasStamp">
<SelectStamp v-if="data.hasStamp" v-model:stampId="approvalData.stampInfo.stampId" />
</a-form-item>
</a-form-item> -->
<a-form-item :label="t('签章密码')" name="password" :rules="[{ required: true, message: t('请输入签章密码') }]" v-if="data.hasStampPassword">
<a-input-password v-model:value="approvalData.stampInfo.password" />
</a-form-item>