Browse Source

feat: 添加发票管理来源类型,更新相关字段和格式化逻辑

xieyong 15 hours ago
parent
commit
ed5503b451
2 changed files with 33 additions and 1 deletions
  1. 11 0
      src/enum/dict.js
  2. 22 1
      src/views/financialManage/invoiceManage/index.vue

+ 11 - 0
src/enum/dict.js

@@ -757,3 +757,14 @@ export const dimensionType = [
   { code: 2, label: '批次维度' },
   { code: 3, label: '包装维度' }
 ];
+
+// 发票管理 来源类型(与后端 FinInvoiceSourceTypeEnum 对齐)
+// 1对账单 2合同 3订单 4应付 5应收 99其他无订单无合同
+export const finInvoiceSourceTypeOp = [
+  { value: 1, label: '对账单' },
+  { value: 2, label: '合同' },
+  { value: 3, label: '订单' },
+  { value: 4, label: '应付' },
+  { value: 5, label: '应收' },
+  { value: 99, label: '其他无订单无合同' }
+];

+ 22 - 1
src/views/financialManage/invoiceManage/index.vue

@@ -147,7 +147,7 @@
     invoiceApplyRemoveAPI,
     invoiceApplySubmit
   } from '@/api/financialManage/invoiceManage';
-  import { reviewStatus } from '@/enum/dict';
+  import { reviewStatus, finInvoiceSourceTypeOp } from '@/enum/dict';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import addOrEditDialogNew from '@/views/financialManage/invoiceManage/components/addOrEditDialogNew.vue'
@@ -219,6 +219,27 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            minWidth: 120,
+            prop: 'sourceCode',
+            label: '来源单据号',
+            slot: 'sourceCode',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'sourceType',
+            label: '来源类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return (
+                finInvoiceSourceTypeOp.find((item) => item.value == cellValue)
+                  ?.label || ''
+              );
+            }
+          },
           {
             minWidth: 140,
             prop: 'applyDeptName',