From 3c72582db57819225fcb7b552f3b5dac48ce585c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Thu, 8 Jan 2026 11:39:56 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/contractQtyList.vue | 211 ++++++++++++++++++
.../common/correlationApproList.vue | 28 ++-
.../common/correlationContractFactList.vue | 30 ++-
.../ContractFact/components/createForm.vue | 4 +-
.../ContractPurPng/components/createForm.vue | 192 +++-------------
.../ContractSales/components/createForm.vue | 154 +------------
6 files changed, 287 insertions(+), 332 deletions(-)
create mode 100644 src/components/common/contractQtyList.vue
diff --git a/src/components/common/contractQtyList.vue b/src/components/common/contractQtyList.vue
new file mode 100644
index 0000000..eb749f4
--- /dev/null
+++ b/src/components/common/contractQtyList.vue
@@ -0,0 +1,211 @@
+
+
+
新增行
+
+
+
+ *开始日期
+
+
+ *结束日期
+
+
+ *基础量/增量
+
+
+ *优先级
+
+
+ *月气量(吉焦)
+
+
+ *月气量(万方)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
diff --git a/src/components/common/correlationApproList.vue b/src/components/common/correlationApproList.vue
index 9cd17af..8d47b25 100644
--- a/src/components/common/correlationApproList.vue
+++ b/src/components/common/correlationApproList.vue
@@ -1,21 +1,19 @@
-
- 关联签报
-
-
-
-
-
-
- 查看
- 删除
-
+ 关联签报
+
+
+
+
-
-
+
+ 查看
+ 删除
+
+
+
diff --git a/src/components/common/correlationContractFactList.vue b/src/components/common/correlationContractFactList.vue
index aa571c6..4aeb5f9 100644
--- a/src/components/common/correlationContractFactList.vue
+++ b/src/components/common/correlationContractFactList.vue
@@ -1,21 +1,19 @@
-
- 关联合同
-
-
-
-
-
-
- 查看
- 删除
-
+ 关联合同
+
+
+
+
-
-
+
+ 查看
+ 删除
+
+
+
@@ -58,7 +56,7 @@
const fileName = info.response ? info.response.data.fileOrg : info.fileOrg;
downloadByUrl({ url, fileName: fileName});
};
- const onAppro = (val)=> {
+ const onContractFactList = (val)=> {
openModal(true,{isUpdate: false})
}
const handleSuccess = (val) =>{
diff --git a/src/views/contract/ContractFact/components/createForm.vue b/src/views/contract/ContractFact/components/createForm.vue
index c50172b..94de3e6 100644
--- a/src/views/contract/ContractFact/components/createForm.vue
+++ b/src/views/contract/ContractFact/components/createForm.vue
@@ -214,7 +214,9 @@
-
+
+
+
diff --git a/src/views/contract/ContractPurPng/components/createForm.vue b/src/views/contract/ContractPurPng/components/createForm.vue
index c3963e2..bdfae3c 100644
--- a/src/views/contract/ContractPurPng/components/createForm.vue
+++ b/src/views/contract/ContractPurPng/components/createForm.vue
@@ -125,7 +125,7 @@
*是否托运
-
+
{{ item.name }}
@@ -152,81 +152,18 @@
-
-
-
新增行
-
-
-
- *开始日期
-
-
- *结束日期
-
-
- *基础量/增量
-
-
- *优先级
-
-
- *月气量(吉焦)
-
-
- *月气量(万方)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
+
+
-
-
+
+
+
+
+
+
@@ -264,6 +201,8 @@
import contractFactListModal from '/@/components/common/contractFactListModal.vue';
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
import supplierListModal from '/@/components/common/supplierListModal.vue';
+ import contractQtyList from '/@/components/common/contractQtyList.vue';
+
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
@@ -292,11 +231,13 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
-
+
+ const contractQty=ref()
const spinning = ref(false);
const curIdx = ref(null)
const { notification } = useMessage();
const { t } = useI18n();
+ const hasDel = ref(false)
const formState = reactive({
approCode: 'WTJ',
typeCode: 'PP',
@@ -325,22 +266,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 selectType = ref()
const isShow = ref(false)
const dataListContractAgree = ref([])
@@ -428,6 +353,11 @@
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
});
+ dataListPoint.value.forEach(v => {
+ let a = (v.lngContractPurPngPointSalesList || []).map(i =>i.pointDelyName)
+ v.pointDelyName = a.join(',')
+ })
+
} catch (error) {
spinning.value = false
}
@@ -488,67 +418,7 @@
}
return endValue.valueOf() <= startValue.valueOf();
}
- const dateFromTb = (startValue, index, record) => {
- if (!startValue) return
- const endValue = dataListContractAgree.value[index]?.dateTo;
- if (!startValue || !endValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value[index].dateFrom = ''
- return
- }
- dayCount(record)
- }
- const dateToTb = (endValue, index, record) => {
- if (!endValue) return
- const startValue = dataListContractAgree.value[index]?.dateFrom;
- if (!endValue || !startValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value.splice(index, 1, { ...dataListContractAgree.value[index], dateTo: '' });
- return
- }
- dayCount(record)
- }
- const numChange = (key, record) => {
- if (key == 'qtyGjMonth') {
- numCount2(record)
- dayCount(record)
- }
- if (key == 'qtyM3Month') {
- numCount1(record)
- dayCount(record)
- }
- if (key == 'rateM3Gj') {
- numCount1(record)
- numCount2(record)
- dayCount(record)
- }
- }
- const numCount1 = (record) => {
- // 月气量(吉焦) =月气量(方)qty_m3_month*rate_m3_gj (比值(方/吉焦)
- record.qtyGjMonth = (Number(record.qtyM3Month) || 0) * (Number(record.rateM3Gj) || 0)
- record.qtyGjMonth = record.qtyGjMonth ? record.qtyGjMonth.toFixed(4) : '0'
- }
- const numCount2 = (record) => {
- // 月气量(方) = 月气量(吉焦) qty_gj_month/rate_m3_gj/10000 显示时字段值/10000;保存时页面值*10000
- record.qtyM3Month = Number(record.rateM3Gj) ? (Number(record.qtyGjMonth) || 0) /Number(record.rateM3Gj) : 0
- record.qtyM3Month = record.qtyM3Month ? record.qtyM3Month.toFixed(4) : '0'
- }
- const dayCount = (record) => {
- // 日气量(吉焦) = 月气量(吉焦)qty_gj_month/开始日期到结束日期的天数;计算结果保留整数
- const days = dayjs(record.dateTo).diff(dayjs(record.dateFrom), 'day');
- record.qtyGjDay = days ? (Number(record.qtyGjMonth) || 0) /days : 0
- record.qtyGjDay = parseInt(record.qtyGjDay)
- // 日气量(方) = 月气量(万方)/开始日期到结束日期的天数;计算结果保留4位小数;显示时字段值/10000;保存时页面值*10000
- record.qtyM3Day = days ? (Number(record.qtyM3Month) || 0) /days : 0
- record.qtyM3Day = record.qtyM3Day ? record.qtyM3Day.toFixed(4) : '0'
- }
const onSearch = (val)=> {
openModalDept(true,{isUpdate: false})
}
@@ -569,11 +439,7 @@
openModalDownLoad(true,{isUpdate: false, type: val})
});
}
- const addContractAgree = () => {
- dataListContractAgree.value.push({
- dateFrom: null, dateTo: null, rateM3Gj: null, qtyGjMonth: null, qtyM3Month: null, qtyGjDay: null, qtyM3Day: null
- })
- }
+
const addUpLoad = ()=> {
dataListPoint.value.push({
"pointUpCode": "",
@@ -583,6 +449,9 @@
})
}
const deleteUpLoad = () => {
+ if (dataListPoint.value[dataListPoint.value.length -1].id) {
+ hasDel.value = true
+ }
if (dataListPoint.value.length == 1) return
dataListPoint.value.pop()
}
@@ -635,11 +504,12 @@
let nameList = val.map(v=>v.fullName)
dataListPoint.value[curIdx.value].pointDelyName = nameList.join(',')
dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList = val || []
+ dataListPoint.value[curIdx.value].lngContractPurPngPointSalesList.forEach(v => {
+ v.pointDelyCode = v.code
+ })
}
}
- const btnCheck = (record, index) => {
- dataListContractAgree.value.splice(index, 1)
- }
+
function unique(arr, u_key) {
const map = new Map()
arr.forEach((item, index) => {
@@ -658,7 +528,7 @@
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
- let arr = JSON.parse(JSON.stringify(dataListContractAgree.value))
+ let arr = contractQty.value.getQtyList()
for(let i=0; i {
+ v.hasDel = hasDel.value
+ v.pointUpCode = dataListPoint.value[i].pointUpCode
+ v.transSign = dataListPoint.value[i].transSign
+ })
}
let arr1 = []
dataListAppro.value.forEach(v=>{
diff --git a/src/views/contract/ContractSales/components/createForm.vue b/src/views/contract/ContractSales/components/createForm.vue
index fff6941..be096d0 100644
--- a/src/views/contract/ContractSales/components/createForm.vue
+++ b/src/views/contract/ContractSales/components/createForm.vue
@@ -135,7 +135,7 @@
*是否托运
-
+
{{ item.name }}
@@ -155,80 +155,17 @@
-
-
新增行
-
-
-
- *开始日期
-
-
- *结束日期
-
-
- *基础量/增量
-
-
- *优先级
-
-
- *月气量(吉焦)
-
-
- *月气量(万方)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
-
-
- 删除
-
-
-
-
+
-
-
+
+
+
+
+
+
@@ -264,6 +201,7 @@
import contractFactListModal from '/@/components/common/contractFactListModal.vue';
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
import customerListModal from '/@/components/common/customerListModal.vue';
+ import contractQtyList from '/@/components/common/contractQtyList.vue';
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
@@ -292,7 +230,8 @@
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
-
+
+ const contractQty = ref()
const spinning = ref(false);
const curIdx = ref(null)
const { notification } = useMessage();
@@ -524,67 +463,6 @@
return false
}
return endValue.valueOf() <= startValue.valueOf();
- }
- const dateFromTb = (startValue, index, record) => {
- if (!startValue) return
- const endValue = dataListContractAgree.value[index]?.dateTo;
- if (!startValue || !endValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value[index].dateFrom = ''
- return
- }
- dayCount(record)
- }
-
- const dateToTb = (endValue, index, record) => {
- if (!endValue) return
- const startValue = dataListContractAgree.value[index]?.dateFrom;
- if (!endValue || !startValue) {
- return false
- }
- if (startValue.valueOf() > endValue.valueOf()) {
- message.warning('结束日期须大于等于开始日期')
- dataListContractAgree.value.splice(index, 1, { ...dataListContractAgree.value[index], dateTo: '' });
- return
- }
- dayCount(record)
- }
- const numChange = (key, record) => {
- if (key == 'qtyGjMonth') {
- numCount2(record)
- dayCount(record)
- }
- if (key == 'qtyM3Month') {
- numCount1(record)
- dayCount(record)
- }
- if (key == 'rateM3Gj') {
- numCount1(record)
- numCount2(record)
- dayCount(record)
- }
- }
- const numCount1 = (record) => {
- // 月气量(吉焦) =月气量(方)qty_m3_month*rate_m3_gj (比值(方/吉焦)
- record.qtyGjMonth = (Number(record.qtyM3Month) || 0) * (Number(record.rateM3Gj) || 0)
- record.qtyGjMonth = record.qtyGjMonth ? record.qtyGjMonth.toFixed(4) : '0'
- }
- const numCount2 = (record) => {
- // 月气量(方) = 月气量(吉焦) qty_gj_month/rate_m3_gj/10000 显示时字段值/10000;保存时页面值*10000
- record.qtyM3Month = Number(record.rateM3Gj) ? (Number(record.qtyGjMonth) || 0) /Number(record.rateM3Gj) : 0
- record.qtyM3Month = record.qtyM3Month ? record.qtyM3Month.toFixed(4) : '0'
- }
- const dayCount = (record) => {
- // 日气量(吉焦) = 月气量(吉焦)qty_gj_month/开始日期到结束日期的天数;计算结果保留整数
- const days = dayjs(record.dateTo).diff(dayjs(record.dateFrom), 'day');
- record.qtyGjDay = days ? (Number(record.qtyGjMonth) || 0) /days : 0
- record.qtyGjDay = parseInt(record.qtyGjDay)
- // 日气量(方) = 月气量(万方)/开始日期到结束日期的天数;计算结果保留4位小数;显示时字段值/10000;保存时页面值*10000
- record.qtyM3Day = days ? (Number(record.qtyM3Month) || 0) /days : 0
- record.qtyM3Day = record.qtyM3Day ? record.qtyM3Day.toFixed(4) : '0'
}
const onSearch = (val)=> {
openModalDept(true,{isUpdate: false})
@@ -602,11 +480,6 @@
curIdx.value = index
openModalDownLoad(true,{isUpdate: false, type: val})
}
- const addContractAgree = () => {
- dataListContractAgree.value.push({
- dateFrom: null, dateTo: null, rateM3Gj: null, qtyGjMonth: null, qtyM3Month: null, qtyGjDay: null, qtyM3Day: null
- })
- }
const addUpLoad = ()=> {
dataListPoint.value.push({
"pointTransCode": "",
@@ -673,9 +546,6 @@
dataListPoint.value[curIdx.value].purList = await getPurList(dataListPoint.value[curIdx.value].pointDelyCode)
}
}
- const btnCheck = (record, index) => {
- dataListContractAgree.value.splice(index, 1)
- }
function unique(arr, u_key) {
const map = new Map()
arr.forEach((item, index) => {
@@ -694,7 +564,7 @@
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
- let arr = JSON.parse(JSON.stringify(dataListContractAgree.value))
+ let arr = contractQty.value.getQtyList()
for(let i=0; i