From 20e5250ea7a7baeb92a63e9bb8150051fe2e011d Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期一, 14 九月 2026 15:32:40 +0800
Subject: [PATCH] feat: 付款申请创建采购付款分栏与财务审核权限、工资表银行账号与卡号识别银行、采购台账移除采购油品

---
 src/views/financialManagement/payable/paymentApply.vue |  116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 115 insertions(+), 1 deletions(-)

diff --git a/src/views/financialManagement/payable/paymentApply.vue b/src/views/financialManagement/payable/paymentApply.vue
index 309d6d3..75d2029 100644
--- a/src/views/financialManagement/payable/paymentApply.vue
+++ b/src/views/financialManagement/payable/paymentApply.vue
@@ -73,7 +73,7 @@
         <template #operation="{ row }">
           <el-button type="primary" link @click="view(row)">鏌ョ湅</el-button>
           <el-button type="primary" link @click="edit(row)" v-if="isPendingStatus(row.status)">缂栬緫</el-button>
-          <el-button type="success" link @click="handleAudit(row)" v-if="isPendingStatus(row.status)">瀹℃牳</el-button>
+          <el-button type="success" link :disabled="!canAudit(row)" @click="handleAudit(row)" v-if="isPendingStatus(row.status)">瀹℃牳</el-button>
           <el-button type="warning" link @click="openPaymentDialog(row)" v-if="isApprovedStatus(row.status)">浠樻</el-button>
           <el-button type="danger" link @click="handleDelete(row)" v-if="isPendingStatus(row.status)">鍒犻櫎</el-button>
         </template>
@@ -213,6 +213,52 @@
         <el-form-item label="澶囨敞" prop="remark">
           <el-input v-model="form.remark" type="textarea" :rows="2" placeholder="璇疯緭鍏ュ娉�" :disabled="isView" />
         </el-form-item>
+        <div class="form-section-title">鍒涘缓閲囪喘浠樻</div>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="娆鹃」鐢ㄩ��" prop="paymentPurpose">
+              <el-select v-model="form.paymentPurpose" placeholder="璇烽�夋嫨娆鹃」鐢ㄩ��" clearable style="width: 100%" :disabled="isView">
+                <el-option label="閲囪喘璐ф" value="閲囪喘璐ф" />
+                <el-option label="杩愯垂" value="杩愯垂" />
+                <el-option label="鎶奸噾" value="鎶奸噾" />
+                <el-option label="鏈嶅姟璐�" value="鏈嶅姟璐�" />
+                <el-option label="鍏朵粬" value="鍏朵粬" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="椤圭洰鍚嶇О" prop="projectName">
+              <el-input v-model="form.projectName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable :disabled="isView" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row :gutter="20">
+          <el-col :span="12">
+            <el-form-item label="缁忓姙浜�" prop="operatorName">
+              <el-input v-model="form.operatorName" placeholder="璇疯緭鍏ョ粡鍔炰汉" clearable :disabled="isView" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="璐㈠姟瀹℃牳" prop="financeAuditorId">
+              <el-select
+                v-model="form.financeAuditorId"
+                placeholder="璇烽�夋嫨瀹℃牳浜哄憳"
+                clearable
+                filterable
+                style="width: 100%"
+                :disabled="isView"
+                @change="handleFinanceAuditorChange"
+              >
+                <el-option
+                  v-for="item in userList"
+                  :key="item.userId"
+                  :label="item.nickName"
+                  :value="item.userId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <template v-if="!isView" #footer>
         <el-button type="primary" :loading="submitLoading" @click="submitForm">纭畾</el-button>
@@ -368,6 +414,8 @@
   deleteAccountPaymentApplication,
 } from "@/api/financialManagement/accountPaymentApplication.js";
 import { addAccountPurchasePayment } from "@/api/financialManagement/accountPurchasePayment.js";
+import { userListNoPageByTenantId } from "@/api/system/user.js";
+import useUserStore from "@/store/modules/user";
 
 defineOptions({
   name: "浠樻鐢宠",
@@ -375,6 +423,7 @@
 
 const { proxy } = getCurrentInstance();
 const { checkout_payment } = proxy.useDict("checkout_payment");
+const userStore = useUserStore();
 
 const filters = reactive({
   invoiceApplicationNo: "",
@@ -395,6 +444,8 @@
   { label: "浠樻閲戦", prop: "amount", dataType: "slot", slot: "amount" },
   { label: "浠樻鏂瑰紡", prop: "paymentMethod", dataType: "slot", slot: "paymentMethod", width: "120" },
   { label: "鐢宠鏃ユ湡", prop: "applyDate", width: "120" },
+  { label: "娆鹃」鐢ㄩ��", prop: "paymentPurpose", width: "120" },
+  { label: "璐㈠姟瀹℃牳", prop: "financeAuditor", width: "120" },
   { label: "鐘舵��", prop: "status", dataType: "slot", slot: "status", width: "100" },
   { label: "鎿嶄綔", prop: "operation", dataType: "slot", slot: "operation", width: "260", fixed: "right" },
 ];
@@ -409,6 +460,7 @@
 const submitLoading = ref(false);
 const currentId = ref(null);
 const supplierList = ref([]);
+const userList = ref([]);
 
 const inboundBatchList = ref([]);
 const inboundBatchOptions = ref([]);
@@ -457,6 +509,11 @@
   inboundBatches: "",
   status: 0,
   createTime: "",
+  paymentPurpose: "",
+  projectName: "",
+  operatorName: "",
+  financeAuditor: "",
+  financeAuditorId: null,
 });
 const formCreateTimeDate = computed({
   get: () => (form.createTime ? String(form.createTime).split(" ")[0] : ""),
@@ -477,6 +534,10 @@
   paymentAmount: [{ required: true, message: "璇疯緭鍏ヤ粯娆鹃噾棰�", trigger: "blur" }],
   paymentMethod: [{ required: true, message: "璇烽�夋嫨浠樻鏂瑰紡", trigger: "change" }],
   applyDate: [{ required: true, message: "璇烽�夋嫨鐢宠鏃ユ湡", trigger: "change" }],
+  paymentPurpose: [{ required: true, message: "璇烽�夋嫨娆鹃」鐢ㄩ��", trigger: "change" }],
+  projectName: [{ required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" }],
+  operatorName: [{ required: true, message: "璇疯緭鍏ョ粡鍔炰汉", trigger: "blur" }],
+  financeAuditorId: [{ required: true, message: "璇烽�夋嫨璐㈠姟瀹℃牳浜哄憳", trigger: "change" }],
 };
 
 const getSummaries = ({ columns, data }) => {
@@ -509,6 +570,15 @@
 };
 
 const isPendingStatus = (status) => normalizeStatus(status) === 0;
+
+// 瀹℃牳鏉冮檺锛氭寚瀹氫簡璐㈠姟瀹℃牳浜烘椂浠呮湰浜哄彲瀹℃牳锛涙湭鎸囧畾鏃朵繚鎸佸師閫昏緫锛堣皝閮借兘瀹★級
+const canAudit = (row) => {
+  const auditorId = row.financeAuditorId;
+  if (auditorId == null || auditorId === "") {
+    return true;
+  }
+  return Number(userStore.id) === Number(auditorId);
+};
 
 const isApprovedStatus = (status) => normalizeStatus(status) === 1;
 
@@ -610,6 +680,11 @@
 
 const fillFormFromRow = (row) => {
   const stockInRecordIds = parseStockInRecordIds(row.stockInRecordIds);
+  // 瀹℃牳浜哄凡涓嶅湪鐢ㄦ埛鍒楄〃鏃讹紝鐢ㄥ凡淇濆瓨鐨勫鍚嶈ˉ杩涗笅鎷夛紝淇濊瘉鏌ョ湅/缂栬緫鏄剧ず鍚嶅瓧鑰岄潪瑁窱D
+  const auditorId = row.financeAuditorId ?? null;
+  if (auditorId != null && !userList.value.some((u) => u.userId === auditorId)) {
+    userList.value.push({ userId: auditorId, nickName: row.financeAuditor ?? `鐢ㄦ埛${auditorId}` });
+  }
   Object.assign(form, {
     invoiceApplicationNo: row.invoiceApplicationNo ?? row.applyCode ?? "",
     supplierId: row.supplierId,
@@ -622,6 +697,11 @@
     inboundBatches: formatInboundBatches(row.inboundBatches),
     status: normalizeStatus(row.status),
     createTime: row.createTime ?? "",
+    paymentPurpose: row.paymentPurpose ?? "",
+    projectName: row.projectName ?? "",
+    operatorName: row.operatorName ?? "",
+    financeAuditor: row.financeAuditor ?? "",
+    financeAuditorId: row.financeAuditorId ?? null,
   });
 };
 
@@ -654,6 +734,11 @@
     status: 0,
     paymentAmount: form.paymentAmount,
     createTime: form.createTime,
+    paymentPurpose: form.paymentPurpose || "",
+    projectName: form.projectName || "",
+    operatorName: form.operatorName || "",
+    financeAuditor: form.financeAuditor || "",
+    financeAuditorId: form.financeAuditorId ?? null,
   };
   if (forUpdate) {
     payload.id = currentId.value;
@@ -666,6 +751,18 @@
     if (res.code === 200) {
       supplierList.value = res.data ?? [];
     }
+  });
+};
+
+// 璐㈠姟瀹℃牳浜哄憳閫夋嫨锛氱粦瀹氱郴缁熺敤鎴凤紝閫変腑鍚庡甫鍑哄鍚�
+const handleFinanceAuditorChange = (userId) => {
+  const user = userList.value.find((item) => item.userId === userId);
+  form.financeAuditor = user?.nickName ?? "";
+};
+
+const getUserList = () => {
+  userListNoPageByTenantId().then((res) => {
+    userList.value = res.data ?? [];
   });
 };
 
@@ -765,6 +862,11 @@
     inboundBatches: "",
     status: 0,
     createTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
+    paymentPurpose: "",
+    projectName: "",
+    operatorName: "",
+    financeAuditor: "",
+    financeAuditorId: null,
   });
   inboundBatchList.value = [];
   inboundBatchOptions.value = [];
@@ -1058,11 +1160,23 @@
 
 onMounted(() => {
   getSupplierList();
+  getUserList();
   getTableData();
 });
 </script>
 
 <style lang="scss" scoped>
+.form-section-title {
+  margin: 18px 0 14px;
+  padding: 8px 14px;
+  font-size: 15px;
+  font-weight: 600;
+  color: #1d6fd8;
+  background: linear-gradient(90deg, rgba(64, 158, 255, 0.14), rgba(64, 158, 255, 0.02));
+  border-left: 4px solid #409eff;
+  border-radius: 3px;
+}
+
 .actions {
   display: flex;
   justify-content: space-between;

--
Gitblit v1.9.3