huangbin il y a 4 ans
Parent
commit
4246f24c1c

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

@@ -1,59 +1,63 @@
 <template>
-    <!-- 现货合同详情-->
-    <a-modal
-        class="add-custom custom-detail"
-        title="现货合同详情"
-        v-model:visible="visible"
-        centered
-        :maskClosable="false"
-        @cancel="cancel"
-        width="890px"
-    >
-        <template #footer>
-            <a-button key="submit" type="primary" :loading="loading" @click="cancel">关闭</a-button>
+  <!-- 现货合同详情-->
+  <a-modal class="add-custom custom-detail"
+           title="现货合同详情"
+           v-model:visible="visible"
+           centered
+           :maskClosable="false"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">关闭</a-button>
+    </template>
+    <a-tabs v-model:activeKey="activeKey"
+            @change="tabClick">
+      <a-tab-pane v-for="item in tabList"
+                  :key="item.key"
+                  :tab="item.name"></a-tab-pane>
+    </a-tabs>
+    <InfoDetail :selectedRow="selectedRow"
+                v-if="activeKey == 1" />
+    <div class="tableDatas"
+         v-else>
+      <a-table class="dialogTable"
+               :columns="columns"
+               :data-source="tableList"
+               :pagination="false">
+        <template #status="{ text }">
+          <span class="yellow">{{ text }}</span>
+          <!-- 审核通过'green' 审核拒绝 'orange' 待审核'yellow'   -->
         </template>
-        <a-tabs v-model:activeKey="activeKey" @change="tabClick">
-            <a-tab-pane v-for="item in tabList" :key="item.key" :tab="item.name"></a-tab-pane>
-        </a-tabs>
-        <InfoDetail :selectedRow="selectedRow" v-if="activeKey == 1" />
-        <div class="tableDatas" v-else>
-            <a-table
-                class="dialogTable"
-                :columns="columns"
-                :data-source="tableList"
-                :pagination="false"
-            >
-                <template #status="{ text }">
-                    <span class="yellow">{{ text }}</span>
-                    <!-- 审核通过'green' 审核拒绝 'orange' 待审核'yellow'   -->
-                </template>
 
-                <template #applystatus="{ text }">
-                    <a>{{ getApplyStatusName(text) }}</a>
-                </template>
+        <template #applystatus="{ text }">
+          <a>{{ getApplyStatusName(text) }}</a>
+        </template>
 
-                <!-- 发票金额-->
-                <template #invoicetype="{ text }">
-                    <a>{{ invoiceStatusName(text) }}</a>
-                </template>
+        <!-- 发票金额-->
+        <template #invoicetype="{ text }">
+          <a>{{ invoiceStatusName(text) }}</a>
+        </template>
 
-                <!-- 发票类型-->
-                <template #contracttype="{ text }">
-                    <a>{{ getPlanContractType(text) }}</a>
-                </template>
+        <!-- 发票类型-->
+        <template #contracttype="{ text }">
+          <a>{{ getPlanContractType(text) }}</a>
+        </template>
 
-                <!-- 出入库类型 -->
-                <template #inouttype="{ text }">
-                    <a>{{ InOutTypeName(text) }}</a>
-                </template>
+        <!-- 出入库类型 -->
+        <template #inouttype="{ text }">
+          <a>{{ InOutTypeName(text) }}</a>
+        </template>
 
-                <!-- 款项类型 -->
-                <template #kxtype="{ text }">
-                    <a>{{ kxtypeName(text) }}</a>
-                </template>
-            </a-table>
-        </div>
-    </a-modal>
+        <!-- 款项类型 -->
+        <template #kxtype="{ text }">
+          <a>{{ kxtypeName(text) }}</a>
+        </template>
+      </a-table>
+    </div>
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -71,6 +75,7 @@ import { getTableColumns } from '@/common/setup/table';
 import { invoiceStatusName } from '@/views/manage/finance-review/setup';
 import { getPlanContractType } from '@/views/business/plan/setup';
 import { InOutTypeName } from '@/views/manage/inventory-review/setup';
+import { kxtypeName } from '@/views/manage/finance-review/setup';
 import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
@@ -187,6 +192,7 @@ export default defineComponent({
             invoiceStatusName,
             getPlanContractType,
             InOutTypeName,
+            kxtypeName,
         };
     },
 });

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

@@ -2,15 +2,15 @@
  *  管理 - 财务审核
  */
 
-import {ResultInfo} from "@/common/methods/request";
+import { ResultInfo } from "@/common/methods/request";
 
 /**
  * 通过ContractType判断  如果是采购就是收票  如果是销售就是开票
  * @param type
  */
-export function invoiceStatusName(type: number): string{
+export function invoiceStatusName(type: number): string {
     let result = "--";
-    switch (type){
+    switch (type) {
         case 1:
             result = "收票"
             break;
@@ -27,7 +27,7 @@ export function invoiceStatusName(type: number): string{
  */
 export function operateApplyTypeName(type: number): string {
     let result = "--";
-    switch (type){
+    switch (type) {
         case 1:
             result = "点价"
             break;
@@ -50,7 +50,7 @@ export function operateApplyTypeName(type: number): string {
  */
 export function kxtypeName(type: number): string {
     let result = "--";
-    switch (type){
+    switch (type) {
         case 1:
             result = "收付款"
             break;
@@ -58,7 +58,7 @@ export function kxtypeName(type: number): string {
             result = "退款"
             break;
         case 3:
-            result = "收付款/退款"
+            result = "退款"
             break;
     }
     return result
@@ -71,13 +71,13 @@ export function kxtypeName(type: number): string {
  */
 export function stateName(deductamount: number, contracttype: number) {
     let result = "--";
-    if(deductamount === undefined || deductamount === 0){
-        if(contracttype === 1){  // 采购
+    if (deductamount === undefined || deductamount === 0) {
+        if (contracttype === 1) {  // 采购
             result = "付款"
-        }else{
+        } else {
             result = "收款"
         }
-    }else{
+    } else {
         result = "退款"
     }
     return result;