加工 管输

This commit is contained in:
‘huanghaiixia’
2026-02-26 17:49:50 +08:00
parent f7d9075c75
commit b56418cd38
9 changed files with 304 additions and 141 deletions

View File

@ -8,13 +8,23 @@ enum Api {
List = '/contract/contractProc/list',
Info = '/contract/contractProc/info',
LngContract = '/contract/contractProc',
querySysParameter = '/magic-api/system/querySysParameter',
DataLog = '/contract/contractProc/datalog',
}
export async function getParameter(params, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractPageModel>(
{
url: Api.querySysParameter,
params,
},
{
errorMessageMode: mode,
},
);
}
/**
* @description: 查询LngContract分页列表
*/

View File

@ -53,11 +53,6 @@
<a-input-search v-model:value="formState.bDeptName" disabled placeholder="请选择业务部门" readonly @search="onSearch"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="电话" name="tel">
<a-input v-model:value="formState.tel" :disabled="isDisable" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="币种" name="curCode">
<a-select v-model:value="formState.curCode" :disabled="isDisable" placeholder="请选择币种" style="width: 100%" allow-clear>
@ -153,9 +148,6 @@
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd(idx)" v-if="!isDisable">新增行</a-button>
<a-table style="width: 100%" :columns="columnsPrice" :data-source="item.lngPriceProcDtlList" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.dataIndex == 'sortDesc'">
<span><span class="redStyle">*</span>约定</span>
</template>
<template v-if="column.dataIndex == 'qtyGj'">
<span><span class="redStyle">*</span>阶梯内气量(吉焦)</span>
</template>
@ -165,6 +157,9 @@
<template v-if="column.dataIndex == 'priceLngGj'">
<span><span class="redStyle">*</span>液态加工费率(/吉焦)</span>
</template>
<template v-if="column.dataIndex == 'rateTonGj'">
<span><span class="redStyle">*</span>/吉焦</span>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'sortDesc'">
@ -225,7 +220,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/ContractProc';
import { addLngContract,updateLngContract, getLngContract,getParameter } from '/@/api/contract/ContractProc';
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
import dayjs from 'dayjs';
import { h } from 'vue';
@ -242,6 +237,7 @@
import supplierListModal from '/@/components/common/supplierListModal.vue';
import { getAllCurrency } from '/@/api/contract/ContractFact';
import { useUserStore } from '/@/store/modules/user';
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
@ -299,6 +295,7 @@
labelCol: { span: 8 },
wrapperCol: { span: 16 },
}
const rateCode = ref()
const curIdx = ref(null)
const dataFile = ref([]);
const dataListAppro = ref([])
@ -315,7 +312,8 @@
}
])
const columnsPrice= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
// { title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 80},
{ title: t('阶梯'), dataIndex: 'sort',width: 80},
{ title: t('约定'), dataIndex: 'sortDesc'},
{ title: t('吨/吉焦'), dataIndex: 'rateTonGj', width: 150},
{ title: t('阶梯内气量(吉焦)'), dataIndex: 'qtyGj', width: 200},
@ -348,7 +346,7 @@
immediate: true
}
);
onMounted(() => {
onMounted(async () => {
getOption()
if (pageId.value) {
getInfo(pageId.value)
@ -357,6 +355,8 @@
formState.empId = userInfo.id
formState.tel = userInfo.mobile
}
let a = await getParameter({code: 'RATE_TON_GJ'})||[]
rateCode.value = a[0]?.valueNum1
});
const dateToCodeChange = (idx, val) => {
@ -378,7 +378,7 @@
const disabledCurrentYear = (current) => {
let date = new Date().getFullYear()
if (dataListPrice.value[curIdx.value].dateFromNew) {
date = new Date(dataListPrice.value[curIdx.value].dateFromNew,).getFullYear()
date = new Date(dataListPrice.value[curIdx.value].dateFromNew).getFullYear()
}
return current && new Date(current).getFullYear() !== date;
};
@ -407,6 +407,16 @@
v.dateFromNew = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateToF = v.dateToF ? dayjs(v.dateToF) : null
v.dateToY = v.dateToY ? dayjs(v.dateToY) : null
v.lngPriceProcDtlList = v.lngPriceProcDtlList || []
if (isDisable.value) {
v.lngPriceProcDtlList =DataFormat.format(v.lngPriceProcDtlList, [
FormatOption.createQty('qtyGj'),
FormatOption.createQty('rateTonGj'),
FormatOption.createAmt('priceLngGj'),
FormatOption.createAmt('pricePngGj'),
]);
}
})
dataListAppro.value.forEach(v => {
// v.approId = v.id
@ -495,10 +505,11 @@
})
}
const deleteProc= (index) => {
if (dataListPrice.value.length ==1)return
dataListPrice.value.splice(index, 1)
}
const handleAdd = (idx)=> {
dataListPrice.value[idx].lngPriceProcDtlList.push({sortDesc: '',rateTonGj:'',qtyGj:'',pricePngGj:'',priceLngGj:'',sort:dataListPrice.value[idx].lngPriceProcDtlList.length+1})
dataListPrice.value[idx].lngPriceProcDtlList.push({sortDesc: '',rateTonGj:rateCode.value,qtyGj:'',pricePngGj:'',priceLngGj:'',sort:dataListPrice.value[idx].lngPriceProcDtlList.length+1})
}
const handleDelete= (idx,index) => {
dataListPrice.value[idx].lngPriceProcDtlList.splice(index, 1)
@ -580,9 +591,9 @@
dataListPrice.value[k].staCode = formState.lngContractProcList[0].staCode
let arr = dataListPrice.value[k].lngPriceProcDtlList || []
for(let i=0; i<arr.length; i++) {
let isFlag = arr[i].qtyGj == null || arr[i].qtyGj === ''|| arr[i].pricePngGj == null || arr[i].pricePngGj === '' || arr[i].priceLngGj == null || arr[i].priceLngGj === ''
let isFlag = arr[i].rateTonGj == null || arr[i].rateTonGj === ''|| arr[i].pricePngGj == null || arr[i].pricePngGj === '' || arr[i].priceLngGj == null || arr[i].priceLngGj === ''
let isFlagNew = false
if (arr[i].sort <arr.length && (arr[i].sortDesc == '' || arr[i].sortDesc == null)) {
if (arr[i].sort <arr.length && (arr[i].qtyGj == '' || arr[i].qtyGj == null)) {
isFlagNew = true
}
if (isFlag || isFlagNew) {

View File

@ -76,11 +76,6 @@
<a-input v-model:value="formState.comName" disabled />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="电话" name="tel">
<a-input v-model:value="formState.tel" :disabled="isDisable" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
@ -89,64 +84,114 @@
</a-row>
</Card>
<Card title="业务信息" :bordered="false" >
<div style="width: 100%">
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd('point')" v-if="!isDisable">新增行</a-button>
<a-table style="width: 100%" :columns="columnsPoint" :data-source="dataListPoint" :pagination="false" :scroll="{x: 1000}">
<template #headerCell="{ column }">
<template v-if="column.dataIndex == 'pointUpName'">
<span><span class="redStyle">*</span>上载点</span>
</template>
<template v-if="column.dataIndex == 'pointDelyName'">
<span><span class="redStyle">*</span>下载点</span>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'pointUpName'">
<a-input-search v-model:value="record.pointUpName" :disabled="isDisable" placeholder="请选择上载点" readonly @search="onSearchDownLoad('up', index)"/>
</template>
<template v-if="column.dataIndex === 'pointDelyName'">
<a-input-search v-model:value="record.pointDelyName" :disabled="isDisable" placeholder="请选择下载点" readonly @search="onSearchDownLoad('dely', index)"/>
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" :disabled="isDisable" />
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" @click="handleDelete('point', index)">删除</a>
</template>
</template>
</a-table>
</div>
</Card>
<Card title="管输价格" :bordered="false" >
<div style="width: 100%">
<a-button type="primary" style="margin-bottom: 10px" @click="handleAdd('price')" v-if="!isDisable">新增行</a-button>
<a-table style="width: 100%" :columns="columnsPrice" :data-source="dataListPrice" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.dataIndex == 'sortDesc'">
<span><span class="redStyle">*</span>约定</span>
</template>
<template v-if="column.dataIndex == 'priceTransM3'">
<span><span class="redStyle">*</span>管输单价(/)</span>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'sortDesc'">
<a-input v-model:value="record.sortDesc" :disabled="isDisable" />
</template>
<template v-if="column.dataIndex === 'qtyM3'">
<a-input-number v-model:value="record.qtyM3" :disabled="isDisable" :min="0" :precision="3" style="width: 100%"/>
</template>
<template v-if="column.dataIndex === 'priceTransM3'">
<a-input-number v-model:value="record.priceTransM3" :disabled="isDisable" :min="0" :precision="4" style="width: 100%"/>
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" :disabled="isDisable" />
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" @click="handleDelete('price', index)">删除</a>
</template>
</template>
</a-table>
<div v-for="(item, idx) in dataListPrice" class="tbStyle">
<div class="tb-box">
<h4>上下载点</h4>
<a-button type="primary" style="margin: 0 10px" @click="handleAdd" v-if="!isDisable">新增</a-button>
<a-button type="primary" @click="handleDelete(idx)" v-if="!isDisable">删除</a-button>
</div>
<a-row>
<a-col :span="8">
<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 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>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="item.note" :disabled="isDisable" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
</a-row>
<div v-for="(k, idxk) in item.lngPriceTransPngList" class="tbStyle">
<div class="tb-box">
<h4>管输价格</h4>
<a-button type="primary" style="margin: 0 10px" @click="addPrice(idx)" v-if="!isDisable">新增</a-button>
<a-button type="primary" @click="deletePrice(idx, idxk)" v-if="!isDisable">删除</a-button>
</div>
<a-row>
<a-col :span="8">
<a-form-item name="dateFromNew">
<template #label>
<span><span style="color:red">*</span>有效期开始</span>
</template>
<a-date-picker v-model:value="k.dateFromNew" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" @openChange="dateToYCheck(idx,idxk)" @change="dateFromNewChange" style="width: 100%" :disabled="isDisable" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item name="dateToCode">
<template #label>
<span><span style="color:red">*</span>结束日类型</span>
</template>
<a-select v-model:value="k.dateToCode" @change="dateToCodeChange(idx,idxk, k.dateToCode)" :disabled="isDisable" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.dateToCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8" v-if="k.dateToCode=='F'">
<a-form-item name="dateToF">
<template #label>
<span><span style="color:red">*</span>固定结束日</span>
</template>
<a-date-picker v-model:value="k.dateToF" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" style="width: 100%" :disabled="isDisable" />
</a-form-item>
</a-col>
<a-col :span="8" v-if="k.dateToCode=='Y'">
<a-form-item name="dateToY">
<template #label>
<span><span style="color:red">*</span>每年结束日</span>
</template>
<a-date-picker v-model:value="k.dateToY" format="MM-DD" :value-format="'MM-DD'" style="width: 100%" :disabled="isDisable" @openChange="dateToYCheck(idx,idxk)" :disabledDate="disabledCurrentYear"/>
</a-form-item>
</a-col>
<div style="width: 100%">
<a-button type="primary" style="margin-bottom: 10px" @click="addTable(idx, idxk)" v-if="!isDisable">新增行</a-button>
<a-table style="width: 100%" :columns="columnsPrice" :data-source="k.lngPriceTransPngDtlList" :pagination="false">
<template #headerCell="{ column }">
<template v-if="column.dataIndex == 'sortDesc'">
<span><span class="redStyle">*</span>约定</span>
</template>
<template v-if="column.dataIndex == 'priceTransM3'">
<span><span class="redStyle">*</span>管输单价(/)</span>
</template>
<template v-if="column.dataIndex == 'qtyM3'">
<span><span class="redStyle">*</span>阶梯内气量()</span>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'sortDesc'">
<a-input v-model:value="record.sortDesc" :disabled="isDisable" />
</template>
<template v-if="column.dataIndex === 'qtyM3'">
<a-input-number v-model:value="record.qtyM3" :disabled="isDisable" :min="0" :precision="3" @change="numCount(record)" style="width: 100%"/>
</template>
<template v-if="column.dataIndex === 'priceTransM3'">
<a-input-number v-model:value="record.priceTransM3" :disabled="isDisable" :min="0" :precision="4" @change="numCount(record)" style="width: 100%"/>
</template>
<template v-if="column.dataIndex === 'note'">
<a-input v-model:value="record.note" :disabled="isDisable" />
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" @click="deleteTable(idx,idxk,index)">删除</a>
</template>
</template>
</a-table>
</div>
</a-row>
</div>
</div>
</Card>
<Card title="附件信息" :bordered="false" >
@ -196,6 +241,8 @@
import supplierListModal from '/@/components/common/supplierListModal.vue';
import { getAllCurrency } from '/@/api/contract/ContractFact';
import { useUserStore } from '/@/store/modules/user';
import { getParameter } from '/@/api/contract/ContractProc';
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
@ -225,6 +272,8 @@
const pageId = ref(currentRoute.value.query?.id)
const spinning = ref(false);
const curIdx = ref(null)
const curIdxk = ref(null)
const rateCode = ref()
const { notification } = useMessage();
const { t } = useI18n();
const formState = reactive({
@ -259,18 +308,22 @@
approCodeList: [],
kPeriodList: [],
curCodeList: [],
dateToCodeList: []
});
const columnsPoint= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('上载点'), dataIndex: 'pointUpName', },
{ title: t('下载点'), dataIndex: 'pointDelyName',},
{ title: t('备注'), dataIndex: 'note'},
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
]);
const dataListPoint = ref([])
const dataListPrice = ref([])
const dataListPrice = ref([
{
lngPriceTransPngList: [
{
dateToCode: '',
dateFrom: null,
lngPriceTransPngDtlList: []
}
]
}
])
const columnsPrice= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
// { title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 100},
{ title: t('阶梯'), dataIndex: 'sort',width:80},
{ title: t('约定'), dataIndex: 'sortDesc'},
{ title: t('阶梯内气量(方)'), dataIndex: 'qtyM3', width: 150},
{ title: t('管输单价(元/方)'), dataIndex: 'priceTransM3', width: 150},
@ -293,8 +346,6 @@
(val) => {
isDisable.value = val
if (val) {
let idx = columnsPoint.value.findIndex(v=>v.dataIndex == 'operation')
idx>-1&&columnsPoint.value.splice(idx, 1)
let idx1 = columnsPrice.value.findIndex(v=>v.dataIndex == 'operation')
idx1>-1&&columnsPrice.value.splice(idx1, 1)
}
@ -304,7 +355,7 @@
immediate: true
}
);
onMounted(() => {
onMounted(async() => {
getOption()
if (pageId.value) {
getInfo(pageId.value)
@ -313,8 +364,33 @@
formState.empId = userInfo.id
formState.tel = userInfo.mobile
}
let a = await getParameter({code: 'RATE_TON_GJ'})||[]
rateCode.value = a[0]?.valueNum1
});
const dateToCodeChange = (idx, idxk, val) => {
if (val == 'F') {
dataListPrice.value[idx].lngPriceTransPngList[idxk].dateToY = null
} else {
dataListPrice.value[idx].lngPriceTransPngList[idxk].dateToF = null
}
}
const dateFromNewChange = (val) => {
if (val) {
dataListPrice.value[curIdx.value].lngPriceTransPngList[curIdxk.value].dateFrom = dayjs(val).format('YYYY-MM-DD')
dataListPrice.value[curIdx.value].lngPriceTransPngList[curIdxk.value].dateToY = null
}
}
const dateToYCheck = (idx, idxK) => {
curIdx.value = idx
curIdxk.value = idxK
}
const disabledCurrentYear = (current) => {
let date = new Date().getFullYear()
if (dataListPrice.value[curIdx.value].lngPriceTransPngList[curIdxk.value].dateFromNew) {
date = new Date(dataListPrice.value[curIdx.value].lngPriceTransPngList[curIdxk.value].dateFromNew).getFullYear()
}
return current && new Date(current).getFullYear() !== date;
};
const kPeriodChange = (val) => {
if (val !== 'Y') {
formState.dateFrom = dayjs('2000-01-01')
@ -333,12 +409,24 @@
Object.assign(dataFile.value, formState.lngFileUploadList || [])
Object.assign(dataListContractFact.value, formState.lngContractFactList || [])
Object.assign(dataListAppro.value, formState.lngApproVoList || [])
Object.assign(dataListPoint.value, formState.lngContractTransPngList || [])
Object.assign(dataListPrice.value, formState.lngPriceTransPngDtlList || [])
Object.assign(dataListPrice.value, formState.lngContractTransPngList || [])
formState.dateSign = formState.dateSign ? dayjs(formState.dateSign) : null
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
dataListPrice.value.forEach(v =>{
v.lngPriceTransPngList.forEach(k => {
k.dateFromNew = k.dateFrom ? dayjs(k.dateFrom) : null
k.dateToF = k.dateToF ? dayjs(k.dateToF) : null
k.dateToY = k.dateToY ? dayjs(k.dateToY) : null
k.lngPriceTransPngDtlList = k.lngPriceTransPngDtlList || []
if (isDisable.value) {
k.lngPriceTransPngDtlList =DataFormat.format(k.lngPriceTransPngDtlList, [
FormatOption.createQty('qtyM3'),
FormatOption.createQty('priceTransM3'),
]);
}
})
})
dataListAppro.value.forEach(v => {
// v.approId = v.id
})
@ -350,6 +438,7 @@
async function getOption() {
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
optionSelect.dateToCodeList = await getDictionary('LNG_D_TO')
optionSelect.curCodeList = await getAllCurrency()
if (!pageId.value) {
@ -417,20 +506,41 @@
openModalDownLoad(true,{isUpdate: false, type: val})
});
}
const handleAdd = (type)=> {
if (type =='point') {
dataListPoint.value.push({pointUpCode: '',pointDelyCode: ''})
} else {
dataListPrice.value.push({sortDesc:'',qtyM3:'',priceTransM3:''})
}
const addTable= (idx,idxk) => {
dataListPrice.value[idx].lngPriceTransPngList[idxk].lngPriceTransPngDtlList.push({
sortDesc:null,priceTransM3:null,
sort:dataListPrice.value[idx].lngPriceTransPngList[idxk].lngPriceTransPngDtlList.length+1
})
}
const handleDelete= (type,index) => {
if (type == 'point') {
dataListPoint.value.splice(index, 1)
} else {
dataListPrice.value.splice(index, 1)
}
const deleteTable= (idx,idxk,index) => {
dataListPrice.value[idx].lngPriceTransPngList[idxk].lngPriceTransPngDtlList.splice(index, 1)
}
const numCount = (record)=> {
record.qtyGj = Number(record.qtyM3)*Number(rateCode.value)
record.priceTransGj = Number(record.priceTransM3)*Number(rateCode.value)
record.qtyGj = record.qtyGj ? record.qtyGj.toFixed(3): ''
record.priceTransGj = record.priceTransGj ? record.priceTransGj.toFixed(4): ''
}
const addPrice = (idx) => {
dataListPrice.value[idx].lngPriceTransPngList.push({
lngPriceTransPngDtlList:[]
})
}
const deletePrice= (idx, index) => {
if (dataListPrice.value[idx].lngPriceTransPngList.length ==1)return
dataListPrice.value[idx].lngPriceTransPngList.splice(index, 1)
}
const handleAdd = ()=> {
dataListPrice.value.push({
lngPriceTransPngList: [
{lngPriceTransPngDtlList: []}
]
})
}
const handleDelete= (index) => {
if (dataListPrice.value.length ==1)return
dataListPrice.value.splice(index, 1)
}
const handleSuccess = (val) => {
@ -465,11 +575,11 @@
}
const handleSuccessDownLoad = (val, type) => {
if (type == 'up') {
dataListPoint.value[curIdx.value].pointUpCode = val[0].code
dataListPoint.value[curIdx.value].pointUpName = val[0].fullName
dataListPrice.value[curIdx.value].pointUpCode = val[0].code
dataListPrice.value[curIdx.value].pointUpName = val[0].fullName
} else {
dataListPoint.value[curIdx.value].pointDelyName = val[0].fullName
dataListPoint.value[curIdx.value].pointDelyCode = val[0].code
dataListPrice.value[curIdx.value].pointDelyName = val[0].fullName
dataListPrice.value[curIdx.value].pointDelyCode = val[0].code
}
}
@ -492,28 +602,50 @@
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
for(let i=0; i<dataListPoint.value.length; i++) {
let isFlag = !dataListPoint.value[i].pointUpCode || !dataListPoint.value[i].pointDelyCode
if (isFlag) {
message.warn('请完善业务信息必选项')
return
}
}
for(let i=0; i<dataListPrice.value.length; i++) {
let isFlag = dataListPrice.value[i].sortDesc == null || dataListPrice.value[i].sortDesc === ''|| dataListPrice.value[i].priceTransM3 == null || dataListPrice.value[i].priceTransM3 === ''
let isFlag = !dataListPrice.value[i].pointUpCode || !dataListPrice.value[i].pointDelyCode
if (isFlag) {
message.warn('请完善管输价格必选项')
message.warn('请完善业务信息上下载点必选项')
return
}
for(let k=0; k<dataListPrice.value[i].lngPriceTransPngList.length; k++) {
let a = dataListPrice.value[i].lngPriceTransPngList[k]
let flag = !a.dateFrom || !a.dateToCode || (a.dateToCode=='F'&&!a.dateToF) || (a.dateToCode=='Y'&&!a.dateToY)
if (flag) {
message.warn('请完善管输价格必选项8')
return
}
dataListPrice.value[i].lngPriceTransPngList[k].dateFrom = dataListPrice.value[i].lngPriceTransPngList[k].dateFrom ? dayjs(dataListPrice.value[i].lngPriceTransPngList[k].dateFrom).format('YYYY-MM-DD HH:mm:ss'):null
dataListPrice.value[i].lngPriceTransPngList[k].dateFromNew = dataListPrice.value[i].lngPriceTransPngList[k].dateFromNew ? dayjs(dataListPrice.value[i].lngPriceTransPngList[k].dateFromNew).format('YYYY-MM-DD HH:mm:ss') : null
dataListPrice.value[i].lngPriceTransPngList[k].dateToF = dataListPrice.value[i].lngPriceTransPngList[k].dateToF ? dayjs(dataListPrice.value[i].lngPriceTransPngList[k].dateToF).format('YYYY-MM-DD HH:mm:ss') : null
dataListPrice.value[i].lngPriceTransPngList[k].dateToY = dataListPrice.value[i].lngPriceTransPngList[k].dateToY ? dayjs(dataListPrice.value[i].lngPriceTransPngList[k].dateToY).format('MM-DD') : null
dataListPrice.value[i].lngPriceTransPngList[k].comId = formState.comId
dataListPrice.value[i].lngPriceTransPngList[k].suCode = formState.cpCode
dataListPrice.value[i].lngPriceTransPngList[k].pointDelyCode = dataListPrice.value[i].pointDelyCode
dataListPrice.value[i].lngPriceTransPngList[k].pointUpCode = dataListPrice.value[i].pointUpCode
let arr = dataListPrice.value[i].lngPriceTransPngList[k].lngPriceTransPngDtlList || []
for(let i=0; i<arr.length; i++) {
let isFlag = arr[i].sortDesc == null || arr[i].sortDesc === ''|| arr[i].priceTransM3 == null || arr[i].priceTransM3 === ''
let isFlagNew = false
if (arr[i].sort <arr.length && (arr[i].qtyM3 == '' || arr[i].qtyM3 == null)) {
isFlagNew = true
}
if (isFlag || isFlagNew) {
message.warn('请完善管输价格必选项')
return
}
}
}
}
let obj = {
...formState,
lngContractTransPngList: dataListPoint.value,
lngContractTransPngList: dataListPrice.value,
lngFileUploadList: dataFile.value,
lngContractFactRelList: dataListContractFact.value,
lngContractApproRelList: dataListAppro.value,
lngPriceTransPngDtlList: dataListPrice.value,
approCode: pageType.value=='update' ? 'WTJ' : formState.approCode
}
@ -572,5 +704,14 @@
.redStyle {
color: red;
}
.tbStyle {
border: 1px dashed #d9d9d9;
padding: 10px;
margin-bottom: 10px;
}
.tb-box {
display: flex;
align-items: center;
margin-bottom: 10px;
}
</style>

View File

@ -364,6 +364,7 @@
(val) => {
if (val) {
formState.value = val
datePlanChange(formState.value.datePlan)
}
},
{

View File

@ -224,7 +224,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('certificate')">新增证书</a-button>
<a-table :columns="columnsCertificate" :data-source="dataCertificate" >
<a-table :columns="columnsCertificate" :data-source="dataCertificate" :pagination="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'dateFrom'">
{{ record.dateFrom ? dayjs(record.dateFrom).format('YYYY-MM-DD') : ''}}
@ -254,7 +254,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('bank')">新增银行账户</a-button>
<a-table :columns="columnsBank" :data-source="dataBank" >
<a-table :columns="columnsBank" :data-source="dataBank" :pagination="false" >
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'defaultSign'">
{{ (optionSelect.signList.find(v=>v.code == record.defaultSign) || {}).name }}
@ -275,7 +275,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('contact')">新增联系人</a-button>
<a-table :columns="columnsContact" :data-source="dataContact" >
<a-table :columns="columnsContact" :data-source="dataContact" :pagination="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'operation'">
<a style="margin-right: 10px" @click="btnCheck('contact', 'edit', record, index)">编辑</a>

View File

@ -167,7 +167,7 @@ export const formProps: FormProps = {
label: '客户组编码',
type: 'input',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 24 },
defaultValue: '',
componentProps: {
width: '100%',
@ -201,7 +201,7 @@ export const formProps: FormProps = {
label: '类型',
type: 'select',
component: 'XjrSelect',
colProps: { span: 12 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',
@ -247,7 +247,7 @@ export const formProps: FormProps = {
type: 'slot',
slotName: 'dateFrom',
component: 'DatePicker',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
span: '',
@ -277,7 +277,7 @@ export const formProps: FormProps = {
type: 'slot',
slotName: 'dateTo',
component: 'DatePicker',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
span: '',

View File

@ -155,7 +155,7 @@ export const formProps: FormProps = {
label: '评价体系名称',
type: 'input',
component: 'Input',
colProps: { span: 12 },
colProps: { span: 8 },
defaultValue: '',
componentProps: {
width: '100%',
@ -189,7 +189,7 @@ export const formProps: FormProps = {
label: '评价对象',
type: 'select',
component: 'XjrSelect',
colProps: { span: 12 },
colProps: { span: 8 },
componentProps: {
width: '100%',
span: '',

View File

@ -45,7 +45,7 @@
</a-row>
</Card>
<Card title="填写评分表信息" :bordered="false" >
<a-table :columns="columns" :data-source="dataList" >
<a-table :columns="columns" :data-source="dataList" :pagination="false" :scroll="{x: 500}">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'score'">
<a-input-number v-model:value="record.score" :disabled="isDisable" @change="numChagne('score', record, index)"/>
@ -140,8 +140,8 @@
{ title: t('评分'), dataIndex: 'score', },
{ title: t('分数说明'), dataIndex: 'scoreDesc', },
{ title: t('评价人'), dataIndex: 'aEmpName', },
{ title: t('评价时间'), dataIndex: 'aTime', },
{ title: t('实际评价部门'), dataIndex: 'aDeptName', },
{ title: t('评价时间'), dataIndex: 'aTime', width: 150},
{ title: t('实际评价部门'), dataIndex: 'aDeptName', width: 150},
]);
const dataList= ref([]);
const dataFile = ref([]);

View File

@ -142,7 +142,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('certificate')">新增证书</a-button>
<a-table :columns="columnsCertificate" :data-source="dataCertificate" >
<a-table :columns="columnsCertificate" :data-source="dataCertificate" :pagination="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'dateFrom'">
{{ record.dateFrom ? dayjs(record.dateFrom).format('YYYY-MM-DD') : ''}}
@ -172,7 +172,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('bank')">新增银行账户</a-button>
<a-table :columns="columnsBank" :data-source="dataBank" >
<a-table :columns="columnsBank" :data-source="dataBank" :pagination="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'defaultSign'">
{{ (optionSelect.signList.find(v=>v.code == record.defaultSign) || {}).name }}
@ -193,7 +193,7 @@
</div>
</template>
<a-button v-if="!isDisable" type="primary" style="margin-bottom: 10px;" @click="handleAdd('contact')">新增联系人</a-button>
<a-table :columns="columnsContact" :data-source="dataContact" >
<a-table :columns="columnsContact" :data-source="dataContact" :pagination="false">
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'operation'">
<a style="margin-right: 10px" @click="btnCheck('contact', 'edit', record, index)">编辑</a>