From 7ed2a032d0724e68aec8af940f2ce0023a9f0eb7 Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期三, 15 四月 2026 09:27:51 +0800
Subject: [PATCH] 修改调度单年月日

---
 ui/admin-ui3/src/views/tms/tmsApBill/index.vue |  241 +++++++++++++++++++++++++----------------------
 1 files changed, 127 insertions(+), 114 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsApBill/index.vue b/ui/admin-ui3/src/views/tms/tmsApBill/index.vue
index a6e026c..b00b52a 100644
--- a/ui/admin-ui3/src/views/tms/tmsApBill/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsApBill/index.vue
@@ -1,25 +1,10 @@
 <template>
   <basicContainer>
-    <avue-crud
-        :option="option"
-        :table-loading="pageF.loading"
-        :data="tableData"
-        :page="page"
-        :permission="permissionList"
-        :before-open="beforeOpen"
-        v-model="form" v-model:search="queryParams"
-        ref="crudRef"
-        @row-update="rowUpdate"
-        @row-save="rowSave"
-        @refresh-change="refreshChange"
-        @row-del="rowDel"
-        @search-change="searchChange"
-        @search-reset="searchReset"
-        @selection-change="selectionChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @on-load="onLoad"
-    >
+    <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page"
+      :permission="permissionList" :before-open="beforeOpen" v-model="form" v-model:search="queryParams" ref="crudRef"
+      @row-update="rowUpdate" @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel"
+      @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad">
       <template #menu-left>
         <!--        <el-button-->
         <!--            type="success"-->
@@ -36,81 +21,80 @@
         <!--            v-hasPermi="['tms:tmsApBill:remove']"-->
         <!--        >鍒犻櫎-->
         <!--        </el-button>-->
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['tms:tmsApBill:export']"
-        >瀵煎嚭
+        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['tms:tmsApBill:export']">瀵煎嚭
         </el-button>
       </template>
-      <template #menu="{row}">
+      <template #menu="{ row }">
         <!-- <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" v-if="row.pushStatus == '3' || row.pushStatus == '4'"
+        <el-link size="small" type="primary" v-if="row.pushStatus == 3 || row.pushStatus == 4|| row.pushStatus == 0"
           @click="handleManualPush(row)" class="link-btn" underline="never" icon="el-icon-upload">鎵嬪姩鎺ㄩ��
         </el-link>
-        <el-link size="small" type="primary"  v-if="row.status == 0"
-                 @click="handleEdit(row)" class="link-btn" :underline="false"
-                 icon="el-icon-edit">璐﹀崟纭
+           <el-link size="small" type="primary" v-if="[0, 2].includes(row.status)" @click="handleClose(row)"
+            class="link-btn" v-hasPermi="['tms:tmsApBill:closeOrder']" underline="never" icon="el-icon-close">
+            浣滃簾
+          </el-link>
+        <el-link size="small" type="primary" v-if="row.status == 0" @click="handleEdit(row)" class="link-btn"
+          :underline="false" icon="el-icon-edit">璐﹀崟纭
         </el-link>
-        <el-link size="small" type="primary"
-                 @click="handleView(row)" class="link-btn" :underline="false"
-                 icon="el-icon-view">鏌ョ湅
+        <el-link size="small" type="primary" @click="handleView(row)" class="link-btn" :underline="false"
+          icon="el-icon-view">鏌ョ湅
         </el-link>
-        <el-link size="small" type="primary"
-                 @click="handleLog(row)" class="link-btn" :underline="false"
-                 icon="el-icon-tickets">鏃ュ織
+        <!-- <el-link size="small" type="primary" @click="handleLog(row)" class="link-btn" :underline="false"
+          icon="el-icon-tickets">鏃ュ織
+        </el-link> -->
+
+        <el-link size="small" type="primary" @click="handleFlow(row)" class="link-btn" underline="never"
+          icon="el-icon-document">
+          瀹℃牳鏃ュ織
         </el-link>
       </template>
     </avue-crud>
 
     <el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%">
 
-      <avue-form v-if="opt == 'js'"  v-model="boxForm" ref="boxFormRef"
-                 :option="boxFormOption">
+      <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>
+          <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>
+      <el-descriptions :column="3" title="璐﹀崟鍩烘湰淇℃伅" border>
+        <el-descriptions-item label="璐﹀崟绯荤粺缂栧彿">{{ form.systemNo }}</el-descriptions-item>
         <el-descriptions-item label="璐﹀崟鍚嶇О">
           <div v-if="opt === 'edit'">
             <el-input v-model="form.billName" placeholder="璇疯緭鍏ヨ处鍗曞悕绉�" />
           </div>
-          <div v-else>{{form.billName}}</div>
+          <div v-else>{{ form.billName }}</div>
         </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="瀹㈡埛鍚嶇О">{{ 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 :max="form.settleAmount" v-model="form.deductionAmount" placeholder="璇疯緭鍏ュ噺鍏嶉噾棰�" @change="deductionAmountChange" />
+            <el-input-number :max="form.settleAmount" v-model="form.deductionAmount" placeholder="璇疯緭鍏ュ噺鍏嶉噾棰�"
+              @change="deductionAmountChange" />
           </div>
-          <div v-else>{{form.deductionAmount}}</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'">{{ 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>
+          <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>
       <h3>鍏宠仈鏄庣粏</h3>
-      <avue-crud
-          :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">鍙栨秷鍏宠仈
+      <avue-crud :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>
 
@@ -127,10 +111,7 @@
     </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 :option="logTableOption" ref="itemsTableRef2" :data="logTable">
 
       </avue-crud>
 
@@ -144,6 +125,7 @@
 
 
   </basicContainer>
+      <flowLogA ref="flowLogIshow" :isShow="true"  title="瀹℃牳鏃ュ織" :flowParams="flowParams"></flowLogA>
 </template>
 
 <script setup name="tmsApBill" lang="ts">
@@ -154,17 +136,17 @@
   exportTmsApBill,
   getTmsApBill,
   listTmsApBill,
-  updateTmsApBill,manualPushTmsApBill
+  updateTmsApBill, manualPushTmsApBill,getPayableAuditLog,tmsApBillCancelPush
 } from "@/api/tms/tmsApBill";
 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 {cancelArBill, getTmsArBill} from "@/api/tms/tmsArBill";
-import {ElMessage, ElMessageBox} from "element-plus";
+import { computed, reactive, ref, toRefs } from "vue";
+import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface";
+import { usePagePlus } from "@/hooks/usePagePlus";
+import { hasPermission } from "@/utils/permissionUtils";
+import { cancelArBill, getTmsArBill } from "@/api/tms/tmsArBill";
+import { ElMessage, ElMessageBox } from "element-plus";
 
-const {proxy} = useCurrentInstance();
+const { proxy } = useCurrentInstance();
 const crudRef = ref();
 
 const permissionList = computed(() => {
@@ -186,10 +168,10 @@
   },
   selectionList: [],
   opt: '',
-  boxForm:<any> {},
+  boxForm: <any>{},
   open2: false
 })
-const {queryParams, form, page, selectionList,opt,boxForm,open2} = toRefs(data);
+const { queryParams, form, page, selectionList, opt, boxForm, open2 } = toRefs(data);
 const option = ref({
   pageKey: 'TmsApBill',
   rowKey: 'id',
@@ -209,67 +191,67 @@
     // },
     systemNo: {
       label: '绯荤粺缂栧彿',
-      hide: false,minWidth:150,
+      hide: false, minWidth: 150,
       search: true,
     },
     billName: {
       label: '璐﹀崟鍚嶇О',
       hide: false,
-      search: true,minWidth:220,
+      search: true, minWidth: 220,
       showOverflowTooltip: true
     },
     serviceProviderName: {
       label: '渚涘簲鍟嗗悕绉�',
       hide: false,
-      search: true,minWidth:220,
+      search: true, minWidth: 220,
       showOverflowTooltip: true
 
     },
     dispatchCount: {
       label: '璋冨害鍗曟暟閲�',
       hide: false,
-      search: false,minWidth:120,
+      search: false, minWidth: 120,
     },
     settleAmount: {
-      label: '搴旂粨绠楅噾棰�',minWidth:120,
+      label: '搴旂粨绠楅噾棰�', minWidth: 120,
       hide: false,
       search: false,
     },
     deductionAmount: {
-      label: '鍑忓厤閲戦',minWidth:120,
+      label: '鍑忓厤閲戦', minWidth: 120,
       hide: false,
       search: false,
     },
     actualSettlementAmount: {
       label: '瀹為檯缁撶畻閲戦',
       hide: false,
-      search: false,minWidth:120,
+      search: false, minWidth: 120,
     },
     settledAmount: {
       label: '宸茬粨绠楅噾棰�',
       hide: false,
-      search: false,minWidth:120,
+      search: false, minWidth: 120,
     },
     pushTime: {
-      label: '鎺ㄩ�佹椂闂�', display: false,  searchRange: true, type: 'date',
+      label: '鎺ㄩ�佹椂闂�', display: false, searchRange: true, type: 'date',
       format: 'YYYY-MM-DD', hide: false, searchSpan: 6, minWidth: 150,
       valueFormat: 'YYYY-MM-DD',
     },
     invoiceStatus: {
-      label: '寮�绁ㄧ姸鎬�',minWidth:120,fixed:'right',
+      label: '寮�绁ㄧ姸鎬�', minWidth: 120, fixed: 'right',
       type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/invoice_status',
 
       hide: false,
       search: true,
     },
     status: {
-      label: '鐘舵��',minWidth:120,fixed:'right',
+      label: '鐘舵��', minWidth: 120, fixed: 'right',
       type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/ar_bill_status',
 
       hide: false,
       search: true,
     },
-  pushStatus: {
+    pushStatus: {
       label: '鎺ㄩ�佺姸鎬�',
       minWidth: 120,
       type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_push_status',
@@ -318,31 +300,31 @@
   }
 })
 
-const YSGenerateTableOption= ref({
+const YSGenerateTableOption = ref({
   menu: true,
   add: false,
-  header:false,
+  header: false,
   selection: false,
-  rowKey:'id',
-  editBtn:false,
-  viewBtn:false,
+  rowKey: 'id',
+  editBtn: false,
+  viewBtn: false,
   delBtn: false,
-  column:{
+  column: {
 
-    projectName:{
+    projectName: {
       label: '椤圭洰鍚嶇О',
     },
-    dispatchNo:{
+    dispatchNo: {
       label: '璋冨害鍗曞彿',
     },
-    orderTime:{
+    orderTime: {
       label: '涓嬪崟鏃堕棿',
     },
 
-    estimateAmount:{
+    estimateAmount: {
       label: '棰勪及搴旀敹閲戦',
     },
-    currency:{
+    currency: {
       label: '甯佸埗',
     }
   }
@@ -381,31 +363,31 @@
   }
 })
 const boxFormRef = ref();
-const logTableOption= ref({
+const logTableOption = ref({
   menu: false,
   add: false,
-  header:false,
+  header: false,
   selection: false,
-  rowKey:'id',
+  rowKey: 'id',
 
-  column:{
+  column: {
 
-    settleAmount:{
+    settleAmount: {
       label: '缁撶畻閲戦',
     },
-    createBy:{
+    createBy: {
       label: '澶勭悊浜哄憳',
     },
-    attachment:{
+    attachment: {
       label: '闄勪欢涓嬭浇',
       dataType: 'string',
       type: 'img'
     },
 
-    remark:{
+    remark: {
       label: '澶囨敞',
     },
-    createTime:{
+    createTime: {
       label: '鎻愪氦鏃堕棿',
     },
   }
@@ -418,8 +400,8 @@
 
 const handleView = (row: any) => {
   form.value.items = [];
-  getTmsApBill(row.id).then((res:any) => {
-    form.value = res.data ||{};
+  getTmsApBill(row.id).then((res: any) => {
+    form.value = res.data || {};
     pageF.open = true;
     pageF.title = '搴斾粯璐﹀崟纭';
     opt.value = 'edit'
@@ -430,8 +412,8 @@
 }
 const handleEdit = (row: any) => {
   form.value.items = [];
-  getTmsApBill(row.id).then((res:any) => {
-    form.value = res.data ||{};
+  getTmsApBill(row.id).then((res: any) => {
+    form.value = res.data || {};
     pageF.open = true;
     pageF.title = '搴斾粯璐﹀崟纭';
     opt.value = 'edit'
@@ -445,10 +427,10 @@
 const editSubmit = () => {
 
 }
-const deductionAmountChange = (e:any) => {
-  form.value.actualSettlementAmount =(Number(form.value.settleAmount) || 0) -( Number(form.value.deductionAmount) || 0);
+const deductionAmountChange = (e: any) => {
+  form.value.actualSettlementAmount = (Number(form.value.settleAmount) || 0) - (Number(form.value.deductionAmount) || 0);
 }
-const handleCancel = (row:any) => {
+const handleCancel = (row: any) => {
   ElMessageBox.confirm("鏄惁瀵硅皟搴﹀崟鍙�" + row.dispatchNo + "鐨勫簲浠樿垂鐢ㄥ彇娑堝叧鑱旓紵", '绯荤粺鎻愮ず', {
     confirmButtonText: '纭畾',
     cancelButtonText: '鍙栨秷',
@@ -470,7 +452,7 @@
     type: 'info'
   }).then(() => {
     // 璋冪敤鎺ㄩ�佹帴鍙�
-    return manualPushTmsApBill(row.id); 
+    return manualPushTmsApBill(row.id);
   }).then((res) => {
     proxy.$message.success(res.msg);
     onLoad(page.value); // 鍒锋柊鍒楄〃
@@ -478,4 +460,35 @@
     // 鍙栨秷鎿嶄綔
   });
 }
+
+const flowLogIshow = ref()
+const flowParams = ref([])
+
+const handleFlow = (row: any) => {
+  let data = {
+    headId: row.id,
+  }
+  getPayableAuditLog(data).then((res) => {
+    flowParams.value = res.rows
+    flowLogIshow.value.openModel()
+
+  })
+}
+
+const handleClose = (row: any) => {
+  ElMessageBox.confirm("鏄惁瀵瑰簲浠樿处鍗�" + row.systemNo + "杩涜浣滃簾锛�", '绯荤粺鎻愮ず', {
+    confirmButtonText: '纭畾',
+    cancelButtonText: '鍙栨秷',
+    type: 'warning'
+  }).then(() => {
+    return tmsApBillCancelPush(row.id);
+  }).then(() => {
+    onLoad(page.value);
+    ElMessage({
+      message: "鎿嶄綔鎴愬姛锛�",
+      type: 'success'
+    })
+  });
+}
+
 </script>

--
Gitblit v1.8.0