管道气销售

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

@ -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=>{