From 0cfe504df6440d80f05e1ee555ee18be6b7e8321 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期五, 06 六月 2025 09:11:04 +0800
Subject: [PATCH] 打包基础信息修改
---
src/views/salesManagement/salesLedger/index.vue | 70 ++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 7fb3b61..0c3c193 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -40,9 +40,9 @@
<el-table-column label="鍗曚綅" prop="unit" />
<el-table-column label="鏁伴噺" prop="quantity" />
<el-table-column label="绋庣巼(%)" prop="taxRate" />
- <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" />
- <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" />
- <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" />
+ <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber"/>
+ <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber"/>
+ <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber"/>
</el-table>
</template>
</el-table-column>
@@ -52,9 +52,10 @@
<el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip/>
<el-table-column label="涓氬姟鍛�" prop="salesman" show-overflow-tooltip/>
<el-table-column label="椤圭洰鍚嶇О" prop="projectName" show-overflow-tooltip/>
- <el-table-column label="鍚堝悓閲戦(鍏�)" prop="contractAmount" show-overflow-tooltip/>
+ <el-table-column label="鍚堝悓閲戦(鍏�)" prop="contractAmount" show-overflow-tooltip :formatter="formattedNumber"/>
<el-table-column label="褰曞叆浜�" prop="entryPersonName" show-overflow-tooltip/>
<el-table-column label="褰曞叆鏃ユ湡" prop="entryDate" show-overflow-tooltip/>
+ <el-table-column label="褰曞叆鏃ユ湡" prop="executionDate" show-overflow-tooltip/>
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
<el-button link type="primary" size="small" @click="openForm('edit', scope.row);">缂栬緫</el-button>
@@ -125,6 +126,19 @@
/>
</el-form-item>
</el-col>
+ <el-col :span="12">
+ <el-form-item label="绛捐鏃ユ湡锛�" prop="executionDate">
+ <el-date-picker
+ style="width: 100%"
+ v-model="form.executionDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable
+ />
+ </el-form-item>
+ </el-col>
</el-row>
<el-row>
<el-form-item label="浜у搧淇℃伅锛�" prop="entryDate">
@@ -140,9 +154,9 @@
<el-table-column label="鍗曚綅" prop="unit" />
<el-table-column label="鏁伴噺" prop="quantity" />
<el-table-column label="绋庣巼(%)" prop="taxRate" />
- <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" />
- <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" />
- <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" />
+ <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber"/>
+ <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber"/>
+ <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber"/>
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
<el-button link type="primary" size="small" @click="openProductForm('edit', scope.row);">缂栬緫</el-button>
@@ -333,7 +347,8 @@
entryPerson: '',
entryDate: '',
maintenanceTime: '',
- productData: []
+ productData: [],
+ executionDate:''
},
rules: {
salesman: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -342,6 +357,7 @@
projectName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
entryPerson: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
entryDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+ executionDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
}
})
const { searchForm, form, rules } = toRefs(data)
@@ -411,6 +427,9 @@
productOptions.value = convertIdToValue(res)
})
}
+const formattedNumber = (row, column, cellValue) => {
+ return parseFloat(cellValue).toFixed(2);
+};
// 鑾峰彇tree瀛愭暟鎹�
const getModels =(value) => {
productForm.value.productCategory = findNodeById(productOptions.value, value)
@@ -490,26 +509,7 @@
};
// 瀛愯〃鍚堣鏂规硶
const summarizeChildrenTable = (param) => {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '鍚堣';
- return;
- }
- const prop = column.property;
- if (['taxInclusiveUnitPrice', 'taxInclusiveTotalPrice', 'taxExclusiveTotalPrice'].includes(prop)) {
- const values = data.map(item => Number(item[prop]));
- if (!values.every(value => isNaN(value))) {
- sums[index] = values.reduce((acc, val) => (!isNaN(val) ? acc + val : acc), 0);
- } else {
- sums[index] = '';
- }
- } else {
- sums[index] = '';
- }
- });
- return sums;
+ return proxy.summarizeTable(param, ['taxInclusiveUnitPrice', 'taxInclusiveTotalPrice', 'taxExclusiveTotalPrice']);
}
// 鎵撳紑寮规
const openForm = async (type, row) => {
@@ -521,21 +521,23 @@
customerList().then(res => {
customerOption.value = res
})
+ console.log('userStore.id',userStore.id)
form.value.entryPerson = userStore.id
if (type === 'edit') {
currentId.value = row.id;
getSalesLedgerWithProducts({id: row.id, type: 1}).then(res => {
form.value = {...res}
+ form.value.entryPerson = Number(res.entryPerson)
productData.value = form.value.productData
fileList.value = form.value.salesLedgerFiles
})
}
- let userAll = await userStore.getInfo()
- userList.value.forEach(element => {
- if(userAll.user.nickName === element.nickName && userAll.user.userName === element.userName) {
- form.value.entryPerson = userAll.user.userId // 璁剧疆榛樿涓氬姟鍛樹负褰撳墠鐢ㄦ埛
- }
- });
+ // let userAll = await userStore.getInfo()
+ // userList.value.forEach(element => {
+ // if(userAll.user.nickName === element.nickName && userAll.user.userName === element.userName) {
+ // form.value.entryPerson = userAll.user.userId // 璁剧疆榛樿涓氬姟鍛樹负褰撳墠鐢ㄦ埛
+ // }
+ // });
form.value.entryDate = getCurrentDate() // 璁剧疆榛樿褰曞叆鏃ユ湡涓哄綋鍓嶆棩鏈�
dialogFormVisible.value = true
}
--
Gitblit v1.9.3