From ea3197fc04afe64d7c34bcf1aee3226838a1f2c3 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期五, 13 三月 2026 10:44:16 +0800
Subject: [PATCH] 添加日志
---
ui/admin-ui3/src/views/tms/tmsArBill/index.vue | 135 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 127 insertions(+), 8 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsArBill/index.vue b/ui/admin-ui3/src/views/tms/tmsArBill/index.vue
index 7fd4697..ee0d78f 100644
--- a/ui/admin-ui3/src/views/tms/tmsArBill/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsArBill/index.vue
@@ -49,9 +49,14 @@
<el-link size="small" type="primary" v-if="row.status != 2"
@click="handleJs(row)" class="link-btn" :underline="false"
icon="el-icon-tickets">缁撶畻
- </el-link><el-link size="small" type="primary"
+ </el-link>
+ <el-link size="small" type="primary"
@click="handleEdit(row)" class="link-btn" :underline="false"
icon="el-icon-edit">淇敼
+ </el-link>
+ <el-link size="small" type="primary"
+ @click="handleLog(row)" class="link-btn" :underline="false"
+ icon="el-icon-tickets">鏃ュ織
</el-link>
</template>
</avue-crud>
@@ -60,9 +65,12 @@
<el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%">
- <avue-form v-model="boxForm" ref="boxFormRef"
+ <avue-form v-if="opt == 'js'" v-model="boxForm" ref="boxFormRef"
:option="boxFormOption">
+ <template #settleAmount>
+ <avue-input-number :min="0" :max="form.actualSettlementAmount" v-model="boxForm.settleAmount" placeholder="璇疯緭鍏ョ粨绠楅噾棰�"></avue-input-number>
+ </template>
</avue-form>
<el-descriptions :column="3" title="璐﹀崟鍩烘湰淇℃伅" border>
<el-descriptions-item label="璐﹀崟绯荤粺缂栧彿">{{form.systemNo}}</el-descriptions-item>
@@ -74,6 +82,18 @@
</el-descriptions-item>
<el-descriptions-item label="瀹㈡埛鍚嶇О">{{form.customerName}}</el-descriptions-item>
<el-descriptions-item label="搴旂粨绠楅噾棰�">{{form.settleAmount}}</el-descriptions-item>
+ <el-descriptions-item label="鍑忓厤閲戦">
+ <div v-if="opt === 'edit'">
+ <el-input-number :min="0" :max="form.settleAmount" v-model="form.deductionAmount" placeholder="璇疯緭鍏ュ噺鍏嶉噾棰�" @change="deductionAmountChange" />
+ </div>
+ <div v-else>{{form.deductionAmount}}</div>
+ </el-descriptions-item>
+ <el-descriptions-item label="瀹為檯缁撶畻閲戦" v-if="opt == 'edit'">{{form.actualSettlementAmount}}</el-descriptions-item>
+ <el-descriptions-item label="鍑忓厤鍘熷洜" v-if="opt == 'edit'">
+ <div v-if="opt === 'edit'">
+ <el-input v-model="form.reasonReduction" placeholder="璇疯緭鍏ュ噺鍏嶅師鍥�" />
+ </div>
+ <div v-else>{{form.reasonReduction}}</div></el-descriptions-item>
<el-descriptions-item label="宸茬粨绠楅噾棰�" v-if="opt == 'js'">{{form.settledAmount}}</el-descriptions-item>
<el-descriptions-item label="寰呯粨绠楅噾棰�" v-if="opt == 'js'">{{Number(form.settleAmount) - Number(form.settledAmount)}}</el-descriptions-item>
</el-descriptions>
@@ -82,6 +102,12 @@
:option="YSGenerateTableOption" ref="itemsTableRef"
:data="form.items"
>
+ <template #menu="{row}">
+ <el-link size="small" type="primary"
+ @click="handleCancel(row)" class="link-btn" :underline="false"
+ icon="el-icon-close">鍙栨秷鍏宠仈
+ </el-link>
+ </template>
</avue-crud>
@@ -94,7 +120,22 @@
</div>
</template>
</el-dialog>
+ <el-dialog :title="pageF.title" v-model="open2" class="avue-dialog avue-dialog--top" width="80%">
+ <avue-crud
+ :option="logTableOption" ref="itemsTableRef2"
+ :data="logTable"
+ >
+
+ </avue-crud>
+
+
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="open2 = false">鍙� 娑�</el-button>
+ </div>
+ </template>
+ </el-dialog>
</basicContainer>
@@ -108,14 +149,16 @@
exportTmsArBill,
getTmsArBill,
listTmsArBill,
- updateTmsArBill
+ updateTmsArBill,cancelArBill
} from "@/api/tms/tmsArBill";
import useCurrentInstance from "@/utils/useCurrentInstance";
import {computed, reactive, ref, toRefs} from "vue";
import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
import {usePagePlus} from "@/hooks/usePagePlus";
import {hasPermission} from "@/utils/permissionUtils";
-import {addTmsArSettlement} from "@/api/tms/tmsArSettlement";
+import {addTmsArSettlement, listTmsArSettlement} from "@/api/tms/tmsArSettlement";
+import {ElMessage, ElMessageBox} from "element-plus";
+import {confirmFinance} from "@/api/tms/tmsFinance";
const {proxy} = useCurrentInstance();
const crudRef = ref();
@@ -139,9 +182,10 @@
},
selectionList: [],
opt: '',
- boxForm:<any> {}
+ boxForm:<any> {},
+ open2: false
})
-const {queryParams, form, page, selectionList,opt,boxForm} = toRefs(data);
+const {queryParams, form, page, selectionList,opt,boxForm,open2} = toRefs(data);
const option = ref({
pageKey: 'TmsArBill',
rowKey: 'id',
@@ -191,6 +235,20 @@
},
settleAmount: {
label: '搴旂粨绠楅噾棰�',
+ addDisplay: true,minWidth:120,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ },
+ deductionAmount: {
+ label: '鍑忓厤閲戦',
+ addDisplay: true,minWidth:120,
+ editDisplay: true,
+ viewDisplay: true,
+ hide: false,
+ },
+ actualSettlementAmount: {
+ label: '瀹為檯缁撶畻閲戦',
addDisplay: true,minWidth:120,
editDisplay: true,
viewDisplay: true,
@@ -262,12 +320,14 @@
}
})
const YSGenerateTableOption= ref({
- menu: false,
+ menu: true,
add: false,
header:false,
selection: false,
rowKey:'id',
-
+ editBtn:false,
+ viewBtn:false,
+ delBtn: false,
column:{
projectName:{
@@ -368,6 +428,65 @@
}
})
}
+const logTableOption= ref({
+ menu: false,
+ add: false,
+ header:false,
+ selection: false,
+ rowKey:'id',
+ column:{
+
+ settleAmount:{
+ label: '缁撶畻閲戦',
+ },
+ createBy:{
+ label: '澶勭悊浜哄憳',
+ },
+ attachment:{
+ label: '闄勪欢涓嬭浇',
+ dataType: 'string',
+ type: 'img'
+ },
+
+ remark:{
+ label: '澶囨敞',
+ },
+ createTime:{
+ label: '鎻愪氦鏃堕棿',
+ },
+ }
+})
+const logTable = ref<any>()
+
+const handleLog = (row:any)=>{
+ listTmsArSettlement({billId:row.id}).then(res=>{
+ logTable.value = res.rows||[];
+ open2.value = true;
+ pageF.title = '缁撶畻鏃ュ織';
+ })
+}
+
+
+
+const deductionAmountChange = (e:any) => {
+ form.value.actualSettlementAmount =(Number(form.value.settleAmount) || 0) -( Number(form.value.deductionAmount) || 0);
+}
+
+const handleCancel = (row:any) => {
+ ElMessageBox.confirm("鏄惁瀵硅皟搴﹀崟鍙�" + row.dispatchNo + "鐨勫簲鏀惰垂鐢ㄥ彇娑堝叧鑱旓紵", '绯荤粺鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ return cancelArBill(row.id);
+ }).then(() => {
+ onLoad(page.value);
+ ElMessage({
+ message: "鎿嶄綔鎴愬姛锛�",
+ type: 'success'
+ })
+ });
+}
</script>
--
Gitblit v1.8.0