From 15375a133f255a93a9734d9c66fb0b90dfd12341 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期一, 14 七月 2025 13:14:56 +0800 Subject: [PATCH] 1.回款登记优化 --- src/views/salesManagement/receiptPayment/index.vue | 84 +++++++++++++++++++++++++---------------- 1 files changed, 51 insertions(+), 33 deletions(-) diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue index 0ed5d22..a46b667 100644 --- a/src/views/salesManagement/receiptPayment/index.vue +++ b/src/views/salesManagement/receiptPayment/index.vue @@ -4,22 +4,6 @@ <el-form :inline="true" :model="searchForm" style="width: 100%"> <el-row justify="space-between"> <el-col :span="24"> - <el-form-item label="鍥炴鐧昏"> - <el-input - v-model="searchForm.searchText" - placeholder="杈撳叆瀹㈡埛鍚嶇О/鍚堝悓鍙锋悳绱�" - clearable - prefix-icon="Search" - @change="handleQuery" - /> - </el-form-item> - <el-form-item> - <el-checkbox - v-model="searchForm.status" - label="涓嶆樉绀哄緟鍥炴涓�0" - @change="handleQuery" - /> - </el-form-item> <el-form-item label="瀹㈡埛鍚嶇О"> <el-input v-model="searchForm.customerName" @@ -48,6 +32,13 @@ /> </el-form-item> <el-form-item> + <el-checkbox + v-model="searchForm.status" + label="涓嶆樉绀哄緟鍥炴涓�0" + @change="handleQuery" + /> + </el-form-item> + <el-form-item> <el-button type="primary" @click="handleQuery"> 鎼滅储 </el-button> </el-form-item> </el-col> @@ -58,7 +49,7 @@ <div class="actions"> <div></div> <div> - <el-button type="primary" icon="Plus" @click="openForm('add')"> + <el-button type="primary" @click="openForm('add')"> 鏂板鍥炴 </el-button> <el-button icon="Download" @click="handleOut"> 瀵煎嚭 </el-button> @@ -74,7 +65,8 @@ :summary-method="summarizeMainTable" :expand-row-keys="expandedRowKeys" @expand-change="expandChange" - height="calc(100vh - 18.5em)" + + height="calc(100vh - 21.5em)" > <el-table-column align="center" type="selection" width="55" /> <el-table-column type="expand"> @@ -94,10 +86,13 @@ <el-table-column label="鍥炴鏃ユ湡" prop="receiptPaymentDate" /> <el-table-column label="鍥炴閲戦" prop="receiptPaymentAmount"> <template #default="scope"> - <el-input - v-model="scope.row.receiptPaymentAmount" - :disabled="!scope.row.editType" - ></el-input> + <el-input-number :step="0.01" :min="0" style="width: 100%" + v-model="scope.row.receiptPaymentAmount" + :disabled="!scope.row.editType" + :precision="2" + placeholder="璇疯緭鍏�" + clearable + /> </template> </el-table-column> <el-table-column label="鍥炴鏂瑰紡" prop="receiptPaymentType"> @@ -127,6 +122,7 @@ size="small" @click="changeEditType(scope.row)" v-if="!scope.row.editType" + :disabled="scope.row.registrant !== userStore.nickName" >缂栬緫</el-button > <el-button @@ -135,6 +131,7 @@ size="small" @click="saveReceiptPayment(scope.row)" v-if="scope.row.editType" + :disabled="scope.row.registrant !== userStore.nickName" >淇濆瓨</el-button > <el-button @@ -142,6 +139,7 @@ type="primary" size="small" @click="delReceiptRecord(scope.row)" + :disabled="scope.row.registrant !== userStore.nickName" >鍒犻櫎</el-button > </template> @@ -154,49 +152,59 @@ label="閿�鍞悎鍚屽彿" prop="salesContractNo" show-overflow-tooltip + width="240" /> <el-table-column label="瀹㈡埛鍚堝悓鍙�" prop="customerContractNo" show-overflow-tooltip + width="240" + /> <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" show-overflow-tooltip + width="240" /> <el-table-column label="椤圭洰鍚嶇О" prop="projectName" show-overflow-tooltip + width="340" /> <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip + width="100" /> <el-table-column label="鍙戠エ鍙�" prop="invoiceNo" show-overflow-tooltip + width="200" /> <el-table-column label="鍙戠エ閲戦(鍏�)" prop="invoiceTotal" show-overflow-tooltip :formatter="formattedNumber" + width="200" /> - <el-table-column label="绋庣巼" prop="taxRate" show-overflow-tooltip /> + <el-table-column label="绋庣巼(%)" prop="taxRate" show-overflow-tooltip /> <el-table-column label="鍥炴閲戦(鍏�)" prop="receiptPaymentAmountTotal" show-overflow-tooltip :formatter="formattedNumber" + width="200" /> <el-table-column label="寰呭洖娆鹃噾棰�(鍏�)" prop="noReceiptAmount" show-overflow-tooltip + width="200" > <template #default="{ row, column }"> <el-text type="danger"> @@ -283,12 +291,10 @@ </el-col> <el-col :span="12"> <el-form-item label="鏈鍥炴閲戦锛�" prop="receiptPaymentAmount"> - <el-input - type="number" - min="0" + <el-input-number :step="0.01" :min="0" style="width: 100%" + :precision="2" v-model="form.receiptPaymentAmount" placeholder="璇疯緭鍏�" - :step="0.01" clearable /> </el-form-item> @@ -432,13 +438,20 @@ getList(); }; const getList = () => { - expandedRowKeys.value = []; tableLoading.value = true; bindInvoiceNoRegPage({ ...searchForm, ...page }) .then((res) => { tableLoading.value = false; tableData.value = res.data.records; total.value = res.data.total; + if (expandedRowKeys.value.length > 0) { + const arr = [] + const index = tableData.value.findIndex(item => item.id === expandedRowKeys.value[0]); + if (index > -1) { + arr.push(tableData.value[index]); + expandChange(tableData.value[index], arr) + } + } }) .catch(() => { tableLoading.value = false; @@ -500,10 +513,8 @@ proxy.$modal.msgError("璇烽�夋嫨涓�鏉℃暟鎹�"); return; } - // - console.log("(selectedRows.value", selectedRows.value); - if (selectedRows.value[0].noReceiptAmount === 0) { - proxy.$modal.msgError("寰呭洖娆鹃噾棰濅负0鍏�"); + if (selectedRows.value[0].noReceiptAmount == 0) { + proxy.$modal.warning("鏃犻渶鍐嶅洖娆�"); return; } invoiceInfo({ id: selectedRows.value[0].id }).then((res) => { @@ -571,6 +582,8 @@ }; receiptPaymentSaveOrUpdate(updateData).then((res) => { row.editType = !row.editType; + getList(); + proxy.$modal.msgSuccess("鎻愪氦鎴愬姛"); }); }; @@ -582,7 +595,12 @@ type: "warning", }) .then(() => { - proxy.download("/receiptPayment/export", {}, "鍥炴鐧昏妗f.xlsx"); + const ids = selectedRows.value.map((item) => item.id); + proxy.download( + `/receiptPayment/export`, + { ids: `${ids}` }, + "鍥炴鐧昏妗f.xlsx" + ); }) .catch(() => { proxy.$modal.msg("宸插彇娑�"); -- Gitblit v1.9.3