Sfoglia il codice sorgente

commit 现货合同

xkwg 4 anni fa
parent
commit
0e94467610

+ 10 - 3
src/views/information/spot-contract/components/cancel/index.vue

@@ -29,14 +29,14 @@
                   </a-col>
                   <a-col :span="12">
                       <a-form-item label="合同类型">
-                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                          <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
                       </a-form-item>
                   </a-col>
               </a-row>
               <a-row :gutter="24">
                   <a-col :span="12">
                       <a-form-item label="业务类型">
-                          <span class="white">{{ formatValue(selectedRow.biztype) }}</span>
+                          <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
                       </a-form-item>
                   </a-col>
                   <a-col :span="12">
@@ -181,7 +181,12 @@ import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 import {formatTime, formatValue} from "@/common/methods";
-import {getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 import {message, Modal} from "ant-design-vue";
 import {deleteOrderContract} from "@/views/information/spot-contract/components/setup";
 
@@ -231,6 +236,8 @@ export default defineComponent({
             getPriceTypeName,
             getContractStatusName,
             formatTime,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

+ 3 - 0
src/views/information/spot-contract/components/check/index.vue

@@ -218,6 +218,7 @@
 <script lang="ts">
 import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import {getBizTypeName, getContractTypeName} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-detail',
@@ -239,6 +240,8 @@ export default defineComponent({
             submit,
             loading,
             maskClosableFlag,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

+ 10 - 3
src/views/information/spot-contract/components/delete/index.vue

@@ -29,14 +29,14 @@
                   </a-col>
                   <a-col :span="12">
                       <a-form-item label="合同类型">
-                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                          <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
                       </a-form-item>
                   </a-col>
               </a-row>
               <a-row :gutter="24">
                   <a-col :span="12">
                       <a-form-item label="业务类型">
-                          <span class="white">{{ formatValue(selectedRow.biztype) }}</span>
+                          <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
                       </a-form-item>
                   </a-col>
                   <a-col :span="12">
@@ -181,7 +181,12 @@ import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 import {formatTime, formatValue} from "@/common/methods";
-import {getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 import {message, Modal} from "ant-design-vue";
 import {deleteOrderContract} from "@/views/information/spot-contract/components/setup";
 
@@ -231,6 +236,8 @@ export default defineComponent({
             getPriceTypeName,
             getContractStatusName,
             formatTime,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

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

@@ -26,14 +26,14 @@
             </a-col>
             <a-col :span="12">
               <a-form-item label="合同类型">
-                <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
               </a-form-item>
             </a-col>
           </a-row>
           <a-row :gutter="24">
             <a-col :span="12">
               <a-form-item label="业务类型">
-                <span class="white">{{ formatValue(selectedRow.biztype) }}</span>
+                <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
               </a-form-item>
             </a-col>
             <a-col :span="12">
@@ -179,7 +179,12 @@ import { closeModal } from '@/common/setup/modal/index';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
 import { getStatusName } from '@/views/information/custom/setup';
-import { getContractStatusName, getPriceTypeName } from '@/views/information/spot-contract/setup';
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from '@/views/information/spot-contract/setup';
 import { formatValue, formatTime } from '@/common/methods/format';
 
 export default defineComponent({
@@ -200,7 +205,7 @@ export default defineComponent({
             setTimeout(() => {
                 loading.value = false;
                 cancel();
-            }, 2000);
+            }, 200);
         }
         return {
             visible,
@@ -212,6 +217,8 @@ export default defineComponent({
             getPriceTypeName,
             formatTime,
             maskClosableFlag,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

+ 10 - 3
src/views/information/spot-contract/components/finish/index.vue

@@ -29,14 +29,14 @@
                   </a-col>
                   <a-col :span="12">
                       <a-form-item label="合同类型">
-                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                          <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
                       </a-form-item>
                   </a-col>
               </a-row>
               <a-row :gutter="24">
                   <a-col :span="12">
                       <a-form-item label="业务类型">
-                          <span class="white">{{ formatValue(selectedRow.biztype) }}</span>
+                          <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
                       </a-form-item>
                   </a-col>
                   <a-col :span="12">
@@ -180,7 +180,12 @@
 import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import {formatTime, formatValue} from "@/common/methods";
-import {getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
 import {deleteOrderContract} from "@/views/information/spot-contract/components/setup";
 import {message, Modal} from "ant-design-vue";
@@ -231,6 +236,8 @@ export default defineComponent({
             getPriceTypeName,
             getContractStatusName,
             formatTime,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

+ 3 - 0
src/views/information/spot-contract/components/resubmit/index.vue

@@ -17,6 +17,7 @@
 <script lang="ts">
 import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import {getBizTypeName, getContractTypeName} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'resubmit-spot-contract',
@@ -36,6 +37,8 @@ export default defineComponent({
             cancel,
             submit,
             loading,
+            getContractTypeName,
+            getBizTypeName,
         };
     },
 });

+ 11 - 1
src/views/information/spot-contract/list/checkpending/index.vue

@@ -33,6 +33,10 @@
                     <a>{{ getContractStatusName(text) }}</a>
                 </template>
 
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
+
             </a-table>
         </contextMenu>
         <!-- 现货合同: 详情 -->
@@ -56,7 +60,12 @@ import {
 } from '@/common/export/table';
 import {AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable} from '../../components';
 import {queryTableList, getFilterTableCB, Ermcp3ContractRsp} from '../index';
-import {getBizTypeName, getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-peddding',
@@ -107,6 +116,7 @@ export default defineComponent({
             getBizTypeName,
             getPriceTypeName,
             getContractStatusName,
+            getContractTypeName,
         };
     },
 });

+ 11 - 1
src/views/information/spot-contract/list/finished/index.vue

@@ -31,6 +31,10 @@
           <template #contracctstatus="{ text }">
               <a>{{ getContractStatusName(text) }}</a>
           </template>
+
+          <template #contracttype="{ text }">
+              <a>{{ getContractTypeName(text) }}</a>
+          </template>
       </a-table>
     </contextMenu>
     <!-- 新增现货合同 -->
@@ -45,7 +49,12 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 import { AddSpotContract, SpotContractDeatil, filterCustomTable } from '../../components';
 
 import { queryTableList, getFilterTableCB, Ermcp3ContractRsp } from '../index';
-import {getBizTypeName, getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-done',
@@ -91,6 +100,7 @@ export default defineComponent({
             getBizTypeName,
             getPriceTypeName,
             getContractStatusName,
+            getContractTypeName,
         };
     },
 });

+ 11 - 1
src/views/information/spot-contract/list/performance/index.vue

@@ -31,6 +31,10 @@
           <template #contracctstatus="{ text }">
               <a>{{ getContractStatusName(text) }}</a>
           </template>
+
+          <template #contracttype="{ text }">
+              <a>{{ getContractTypeName(text) }}</a>
+          </template>
       </a-table>
     </contextMenu>
     <!-- 现货合同: 详情 -->
@@ -45,7 +49,12 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 import { AddSpotContract, SpotContractDeatil, filterCustomTable, Finish } from '../../components';
 
 import { queryTableList, getFilterTableCB, Ermcp3ContractRsp } from '../index';
-import {getBizTypeName, getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-performance',
@@ -92,6 +101,7 @@ export default defineComponent({
             getBizTypeName,
             getPriceTypeName,
             getContractStatusName,
+            getContractTypeName,
         };
     },
 });

+ 11 - 1
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -31,6 +31,10 @@
                 <template #contracctstatus="{ text }">
                     <a>{{ getContractStatusName(text) }}</a>
                 </template>
+
+                <template #contracttype="{ text }">
+                    <a>{{ getContractTypeName(text) }}</a>
+                </template>
             </a-table>
         </contextMenu>
         <!-- 新增现货合同 -->
@@ -69,7 +73,12 @@ import {
 } from '../../components';
 
 import {queryTableList, getFilterTableCB, Ermcp3ContractRsp} from '../index';
-import {getBizTypeName, getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
+import {
+    getBizTypeName,
+    getContractStatusName,
+    getContractTypeName,
+    getPriceTypeName
+} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
@@ -121,6 +130,7 @@ export default defineComponent({
             getBizTypeName,
             getPriceTypeName,
             getContractStatusName,
+            getContractTypeName,
         };
     },
 });

+ 16 - 0
src/views/information/spot-contract/setup.ts

@@ -64,4 +64,20 @@ export function getBizTypeName(state: number): string {
             break
     }
     return result
+}
+
+/**
+ * 获取合同类型名称 现货合同类型 - 1:采购 -1:销售
+ */
+export function getContractTypeName(type: number): string{
+    let result = "--";
+    switch (type){
+        case 1:
+            result = "采购"
+            break;
+        case -1:
+            result = "销售"
+            break;
+    }
+    return result
 }