From dda4c08d41693d2495a13e7db230c3e9747540de Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期二, 02 九月 2025 10:33:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
---
ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue | 125 +++++++++++++++++++++++++++++++----------
1 files changed, 95 insertions(+), 30 deletions(-)
diff --git a/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue b/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
index 50225bc..e76662d 100644
--- a/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/estimatedReceivableBill/index.vue
@@ -148,6 +148,9 @@
} from "@/api/cwgl/estimatedReceivableBill";
import useCurrentInstance from "@/utils/useCurrentInstance";
import { computed, reactive, ref, toRefs } from "vue";
+import {
+ getSelectCustomNam,
+} from "@/api/cwgl/pendingSettlementBusiness";
import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
import { usePagePlus } from "@/hooks/usePagePlus";
import { hasPermission } from "@/utils/permissionUtils";
@@ -215,6 +218,7 @@
// },
billSystemNo: {
label: '璐﹀崟绯荤粺缂栧彿',
+ showOverflowTooltip: true,
search: true,
rules: [
{
@@ -225,6 +229,8 @@
},
billName: {
label: '璐﹀崟鍚嶇О',
+ minWidth: 200,
+ showOverflowTooltip: true,
rules: [
{
required: true,
@@ -232,15 +238,16 @@
}
],
},
+
customerName: {
label: '瀹㈡埛鍚嶇О',
- rules: [
- {
- required: true,
- message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur"
- }
- ],
search: true,
+ minWidth: 220,
+ search: true,
+ showOverflowTooltip: true,
+ type: 'select', // 璁剧疆涓轰笅鎷夋绫诲瀷
+ dicData: [], // 浣跨敤 selectCustomName 浣滀负鏁版嵁婧�
+ disabled: false // 鏍规嵁闇�瑕佽缃槸鍚︾鐢�
},
dispatchCount: {
@@ -310,7 +317,7 @@
// labelWidth: 120,
column: {
projectName: {
- label: '椤圭洰鍚嶇О1',
+ label: '椤圭洰鍚嶇О',
},
dispatchNo: {
label: '璋冨害鍗曞彿',
@@ -350,7 +357,9 @@
},
handleSelectionChangeFunc: (selection: any) => {
selectionList.value = selection;
- }
+ },
+
+
})
const dialog = reactive({
visible: false,
@@ -382,6 +391,7 @@
const handleAmend = (row) => {
newFormData.value.billId = row.id;
+ importForm.value.billId = row.id;
dispIshow.value = true;
newOption.value.menu = true;
listPendingSettlementBusiness({ billId: row.id }).then((res) => {
@@ -421,35 +431,68 @@
}
const newFormRef = ref();
const submitForm = () => {
- newFormRef.value!.validate(valid => {
- if (valid) {
- let data = {
- billId: newForm.value.id,
- fileName: newForm.value.attachment
- }
- addEstimatedReceivableLog(data).then((res1) => {
- if (res1.code === 200) {
- estimatedReceivableBillSettlement(newForm.value).then((res) => {
- if (res.code === 200) {
- proxy.$message.success('鎿嶄綔鎴愬姛');
- dialog.visible = false;
- newForm.value = {};
+ if (newTableData.value.length == 0) {
+ proxy.$message.error('鏃犲叧鑱旀槑缁嗭紝鏃犳硶缁撶畻');
+ return; // 娣诲姞 return 涓柇鎵ц
+ } else {
+ newFormRef.value!.validate(valid => {
+ if (valid) {
+ // 娣诲姞鏍¢獙閫昏緫锛氭湰娆$粨绠楅噾棰濅笉鑳藉ぇ浜庡簲缁撶畻閲戦
+ const settlementAmount = parseFloat(newForm.value.settlementAmount);
+ const totalAmount = parseFloat(importForm.value.totalAmount);
- }
- })
+ // 妫�鏌ヨ緭鍏ユ槸鍚︿负鏈夋晥鏁板瓧
+ if (isNaN(settlementAmount) || isNaN(totalAmount)) {
+ proxy.$message.error('閲戦鏍煎紡涓嶆纭�');
+ return;
}
- })
- }
- });
+ if (settlementAmount > totalAmount) {
+ proxy.$message.error('鏈缁撶畻閲戦涓嶈兘澶т簬搴旂粨绠楅噾棰�');
+ return; // 鍏抽敭锛氬湪杩欓噷娣诲姞 return 涓柇鍚庣画鎵ц
+ }
+ let data = {
+ billId: newForm.value.id,
+ fileName: newForm.value.attachment
+ }
+ if (newForm.value.attachment == null || newForm.value.attachment === '' || newForm.value.attachment === undefined) {
+ estimatedReceivableBillSettlement(newForm.value).then((res) => {
+ if (res.code === 200) {
+ onLoad(page.value);
+ proxy.$message.success('鎿嶄綔鎴愬姛');
+ dialog.visible = false;
+ newForm.value = {};
+ }
+ })
+ }else{
+ addEstimatedReceivableLog(data).then((res1) => {
+ if (res1.code === 200) {
+ estimatedReceivableBillSettlement(newForm.value).then((res) => {
+ if (res.code === 200) {
+ onLoad(page.value);
+ proxy.$message.success('鎿嶄綔鎴愬姛');
+ dialog.visible = false;
+ newForm.value = {};
+ }
+ })
+ }
+ })
+ }
+
+ } else {
+ // 琛ㄥ崟楠岃瘉澶辫触
+ return false;
+ }
+ });
+ }
}
-
const submitFormTow = () => {
proxy.$modal.confirm(`鏄惁纭淇敼璐﹀崟鍚嶇О?`).then(function () {
- return updateEstimatedReceivableBillNmae(newForm.value);
+ return updateEstimatedReceivableBillNmae(importForm.value);
}).then((res) => {
+ onLoad(page.value);
proxy.$modal.msgSuccess(res.msg);
})
@@ -523,7 +566,7 @@
const flowParams = ref([])
const handleFlow = (row: string) => {
let data = {
- estimatedId: row.id,
+ billId: row.id,
}
listEstimatedReceivableBillLog(data).then((res) => {
flowParams.value = res.rows
@@ -531,6 +574,21 @@
})
}
+
+const selectCustomName = ref([]);
+const getSelectCustomName = () => {
+ getSelectCustomNam().then((res) => {
+ if (res.code === 200) {
+ // selectCustomName.value = res.data;
+ selectCustomName.value = res.data.map(item => ({
+ dictLabel: item,
+ dictValue: item
+ }));
+ option.value.column.customerName.dicData = selectCustomName.value || [];
+ }
+ })
+}
+getSelectCustomName()
</script>
<style scoped>
::v-deep .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell {
@@ -538,4 +596,11 @@
padding: 8px 11px;
width: 200px;
}
-</style>
\ No newline at end of file
+:deep(.avue-crud__table) {
+ overflow-y: auto;
+}
+
+:deep(.el-scrollbar__bar.is-horizontal) {
+ pointer-events: auto;
+}
+</style>
--
Gitblit v1.8.0