huangbin 4 роки тому
батько
коміт
147679dd74

+ 5 - 5
src/views/information/spot-contract/components/detail/index.vue

@@ -52,16 +52,16 @@
         </template>
 
         <!-- 款项类型 -->
-        <template #kxtype="{ text }">
-          <a>{{ kxtypeName(text) }}</a>
+        <template #kxtype="{record }">
+          <a>{{ kxtypeName(record.contracttype) }}</a>
         </template>
 
         <!-- 金额-->
-        <template #payamount= "{ text, record }">
-            <a>{{ record.kxtype === 2 ? record.deductamount : text }}</a>
+        <template #payamount="{ text, record }">
+          <a>{{ record.kxtype === 2 ? record.deductamount : text }}</a>
         </template>
 
-          <!-- 款项记录 款项类型为退款  则金额使用deductamount-->
+        <!-- 款项记录 款项类型为退款  则金额使用deductamount-->
       </a-table>
     </div>
   </a-modal>

+ 7 - 5
src/views/manage/finance-review/components/fundsAudit/index.vue

@@ -32,7 +32,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="合同编号">
-              <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
+              <span
+                    class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -59,12 +60,14 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="款项类型">
-              <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
+              <span
+                    class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="登记金额">
-              <span class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
+              <span
+                    class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -97,7 +100,7 @@ import { Modal } from 'ant-design-vue';
 import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
 import Long from 'long';
 import { financeControl } from '@/views/manage/finance-review/components/setup';
-import { kxtypeName, stateName } from '@/views/manage/finance-review/setup';
+import { stateName } from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
 import { isShowContractCheck } from '@/views/manage/inventory-review/setup';
 
@@ -172,7 +175,6 @@ export default defineComponent({
             loading,
             formatValue,
             getStatusName,
-            kxtypeName,
             getPriceTypeName,
             getContractTypeName,
             maskClosableFlag,

+ 7 - 5
src/views/manage/finance-review/components/fundsCancel/index.vue

@@ -26,7 +26,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="合同编号">
-              <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
+              <span
+                    class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -53,12 +54,14 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="款项类型">
-              <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
+              <span
+                    class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="登记金额">
-              <span class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
+              <span
+                    class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -91,7 +94,7 @@ import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
 import Long from 'long';
 import { financeControl } from '@/views/manage/finance-review/components/setup';
 import { QryBussinessKxRsp } from '@/services/go/ermcp/finance-review/interface';
-import { kxtypeName, stateName } from '@/views/manage/finance-review/setup';
+import { stateName } from '@/views/manage/finance-review/setup';
 import { getPriceTypeName } from '@/common/constants/enumsName';
 import { getContractTypeName } from '@/common/constants/enumsName';
 
@@ -143,7 +146,6 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
-            kxtypeName,
             getPriceTypeName,
             getContractTypeName,
             back,

+ 7 - 5
src/views/manage/finance-review/components/fundsDetail/index.vue

@@ -19,7 +19,8 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="合同编号">
-              <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
+              <span
+                    class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -46,12 +47,14 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="款项类型">
-              <span class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
+              <span
+                    class="white">{{ stateName(selectedRow.deductamount, selectedRow.contracttype) }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="登记金额">
-              <span class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
+              <span
+                    class="white">{{(selectedRow.deductamount === undefined || selectedRow.deductamount === 0) ? formatValue(selectedRow.payamount): formatValue(selectedRow.deductamount)}}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -79,7 +82,7 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { getStatusName } from '@/common/constants/enumsName';
 import { formatValue, formatTime } from '@/common/methods';
 import { QryBussinessKxRsp } from '@/services/go/ermcp/finance-review/interface';
-import { kxtypeName, stateName } from '@/views/manage/finance-review/setup';
+import { stateName } from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
 
 export default defineComponent({
@@ -108,7 +111,6 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
-            kxtypeName,
             getPriceTypeName,
             getContractTypeName,
             stateName,

+ 1 - 2
src/views/manage/finance-review/list/funds/index.vue

@@ -66,7 +66,7 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 import { Filter, FundsAudit, FundsCancel, FundsDetail } from '../../components';
 
 import { queryTableList, QryBussinessKxRsp } from './setup';
-import { invoiceStatusName, kxtypeName, operateApplyTypeName, stateName } from '@/views/manage/finance-review/setup';
+import { invoiceStatusName, operateApplyTypeName, stateName } from '@/views/manage/finance-review/setup';
 import { getContractTypeName, getApplyStatusName } from '@/common/constants/enumsName';
 import { Column, ColumnType } from '@/common/setup/table';
 
@@ -139,7 +139,6 @@ export default defineComponent({
             getApplyStatusName,
             operateApplyTypeName,
             getContractTypeName,
-            kxtypeName,
             stateName,
             getTableData,
         };

+ 1 - 2
src/views/manage/finance-review/list/invoice/index.vue

@@ -57,7 +57,7 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 import { InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter } from '../../components';
 
 import { queryTableList, QryBussinessFpRsp } from './setup';
-import { invoiceStatusName, kxtypeName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
+import { invoiceStatusName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
 import { Column, ColumnType } from '@/common/setup/table';
 import { getContractTypeName, getApplyStatusName } from '@/common/constants/enumsName';
 
@@ -128,7 +128,6 @@ export default defineComponent({
             invoiceStatusName,
             getApplyStatusName,
             operateApplyTypeName,
-            kxtypeName,
             getTableData,
         };
     },

+ 6 - 10
src/views/manage/finance-review/setup.ts

@@ -49,18 +49,14 @@ export function operateApplyTypeName(type: number): string {
  * @param  kxtype: number;//款项类型 1-收付款(PayAmount字段有值) 2-退款(DeductAmount字段有值) 3-收付款/退款(2个字段都有)
  */
 export function kxtypeName(type: number): string {
+    //     contracttype: number;//现货合同类型 - 1:采购 -1:销售
     let result = "--";
-    switch (type) {
-        case 1:
-            result = "收付款"
-            break;
-        case 2:
-            result = "退款"
-            break;
-        case 3:
-            result = "退款"
-            break;
+    if (type === 1) {
+        result = "付款"
+    } else {
+        result = "退款"
     }
+
     return result
 }