Jelajahi Sumber

commit 现货合同

xkwg 4 tahun lalu
induk
melakukan
f3af49bc52

+ 1 - 1
src/services/proto/spotcontract/interface.ts

@@ -3,7 +3,7 @@ export interface GldErmcpSpotContractOperateReq {
     SpotContractID: number // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
     OperateType : number // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
     Remark: string // string 操作备注
-    Info: GldSpotContractInfo // GldSpotContractInfo 现货合同信息
+    Info?: GldSpotContractInfo // GldSpotContractInfo 现货合同信息
 }
 
 /**

+ 196 - 165
src/views/information/spot-contract/components/cancel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 现货合同撤销-->
-  <a-modal class="add-custom custom-detail"
+  <a-modal class="add-custom custom-detail commonModal addSpotVariety"
            title="现货合同撤销"
            v-model:visible="visible"
            centered
@@ -16,183 +16,210 @@
                 :loading="loading"
                 @click="submit">确认撤销</a-button>
     </template>
-    <a-form class="inlineForm">
-      <fieldset class="formFieldSet">
-        <legend>基本信息</legend>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="合同编号">
-              <span class="white">NPCQ-2020121001</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="合同类型">
-              <span class="white">采购合同</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="业务类型">
-              <span class="white">套保</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="采购方">
-                <span class="white">河北石家庄刚强矿石公司</span>
-            </a-form-item>
-          </a-col>
-      </a-row>
-      <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="销售方">
-             <span class="white">菏泽已成钢材有限公司</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="合同附件">
-                <div class="upload">
-                    <div class="look">查看附件</div>
-                </div>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-item label="状态">
-             <span class="yellow">待审核</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-      </fieldset>
-      <fieldset class="formFieldSet">
-        <legend>现货信息</legend>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="现货品种">
-              <span class="white">螺纹钢12</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="品类">
-              <span class="white">10mm</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="品牌">
-              <span class="white">江铜</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="标仓系数">
-                <span class="white">1.1</span>
-            </a-form-item>
-          </a-col>
-      </a-row>
-      <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-item label="商品规格">
-              <span class="white">符合国际GB/T1196-2008AL99.70规定,其中铝含量不低于99.7%</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-      </fieldset>
-      <fieldset class="formFieldSet">
-        <legend>价格信息</legend>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="定价类型">
-              <span class="white">点价</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="数量">
-              <span class="white">菏泽已成钢材有限公司</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="点价合约">
-              <span class="white">CU2011</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="升贴水">
-              <span class="white">100元/吨</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="点价期">
-              <span class="white">2020-12-10~2021-02-10</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="交收期">
-              <span class="white">2020-12-10~2021-02-10</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-      </fieldset>
-      <fieldset class="formFieldSet">
-        <legend>其他信息</legend>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="保证金">
-              <span class="white">13700元</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="业务员">
-              <span class="white">李顺利(lishunli)</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-        <a-row :gutter="24">
-          <a-col :span="12">
-            <a-form-item label="跟单员">
-              <span class="white">王平(wangping)</span>
-            </a-form-item>
-          </a-col>
-          <a-col :span="12">
-            <a-form-item label="期货账户">
-                <span class="white">25000000001</span>
-            </a-form-item>
-          </a-col>
-      </a-row>
-      <a-row :gutter="24">
-          <a-col :span="24">
-            <a-form-item label="备注">
-              <span class="white">符合国际GB/T1196-2008AL99.70规定,其中铝含量不低于99.7%</span>
-            </a-form-item>
-          </a-col>
-        </a-row>
-      </fieldset>
-    </a-form>
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <fieldset class="formFieldSet">
+              <legend>基本信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="合同编号">
+                          <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同类型">
+                          <span class="white">{{ formatValue(selectedRow.contractno) }}</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>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="采购方">
+                          <span class="white">{{ formatValue(selectedRow.buyusername) }}</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.sellusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同附件">
+                          <span class="white">{{ formatValue(selectedRow.contracctstatus) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="状态">
+                          <span class="yellow">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>现货信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="现货品种">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="品类">
+                          <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</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.brandname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="标仓系数">
+                          <span class="white">{{ formatValue(selectedRow.convertfactor) }}</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.spotgoodsdesc) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>价格信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="定价类型">
+                          <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="数量">
+                          <span class="white">{{ formatValue(selectedRow.qty) }}</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.goodscode) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="升贴水">
+                          <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="点价期">
+                          <span class="white">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="交收期">
+                          <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>其它信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="保证金">
+                          <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="业务员">
+                          <span class="white">{{ formatValue(selectedRow.saleuserlogincode) }}</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.meruserlogincode) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="期货账户">
+                          <span class="white">{{ formatValue(selectedRow.accountid) }}</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.remark) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+      </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+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 {message, Modal} from "ant-design-vue";
+import {deleteOrderContract} from "@/views/information/spot-contract/components/setup";
 
 export default defineComponent({
     name: 'spot-contract-detail',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3ContractRsp>,
+            default: {},
+        },
+    },
+    setup(props, context) {
         const { visible, cancel } = closeModal('spot_contract_btn_cancel');
-        const loading = ref<boolean>(false);
+        const {loading, orderContractState} = deleteOrderContract()
         const maskClosableFlag = ref<boolean>(false);
         function submit() {
             loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            Modal.confirm({
+                title: '是否确认撤销',
+                okText: '确认撤销',
+                cancelText: '取消',
+                onOk() {
+                    // 删除客户资料
+                    orderContractState(props.selectedRow.spotcontractid)
+                        .then(res => {
+                            message.success(res);
+                            // 通知上层  刷新数据
+                            context.emit('refresh');
+                            cancel();
+                        }).catch(err => {
+                        message.error(err);
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
         return {
             visible,
@@ -200,6 +227,10 @@ export default defineComponent({
             submit,
             loading,
             maskClosableFlag,
+            formatValue,
+            getPriceTypeName,
+            getContractStatusName,
+            formatTime,
         };
     },
 });

+ 24 - 6
src/views/information/spot-contract/components/delete/index.vue

@@ -182,6 +182,8 @@ 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 {message, Modal} from "ant-design-vue";
+import {deleteOrderContract} from "@/views/information/spot-contract/components/setup";
 
 export default defineComponent({
     name: 'delete-spot-contract',
@@ -192,16 +194,32 @@ export default defineComponent({
             default: {},
         },
     },
-    setup() {
+    setup(props, context) {
         const { visible, cancel } = closeModal('spot_contract_btn_delete');
-        const loading = ref<boolean>(false);
+        const {loading, orderContractState} = deleteOrderContract()
         const maskClosableFlag = ref<boolean>(false);
         function submit() {
             loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            Modal.confirm({
+                title: '是否确认删除',
+                okText: '确认删除',
+                cancelText: '取消',
+                onOk() {
+                    // 删除客户资料
+                    orderContractState(props.selectedRow.spotcontractid)
+                        .then(res => {
+                            message.success(res);
+                            // 通知上层  刷新数据
+                            context.emit('refresh');
+                            cancel();
+                        }).catch(err => {
+                        message.error(err);
+                    });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
         return {
             visible,

+ 65 - 37
src/views/information/spot-contract/list/checkpending/index.vue

@@ -1,40 +1,62 @@
 <template>
-  <!-- 现货合同: 待审核-->
-  <div class="spot-contract-peddding"
-       :loading="loading">
-    <filterCustomTable @search="search">
-      <BtnList :btnList="commonBtn" />
-    </filterCustomTable>
-    <contextMenu :contextMenuList="forDataBtn">
-      <a-table :columns="columns"
-               class="topTable hiddenFirstCol"
-               :pagination="false"
-               rowKey="key"
-               :expandedRowKeys="expandedRowKeys"
-               :customRow="Rowclick"
-               :data-source="spotContractList">
-        <!-- 额外的展开行 -->
-        <template #expandedRowRender="{  }">
-          <BtnList :btnList="forDataBtn" />
-        </template>
-        <!-- <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人'}}</a>
-        </template> -->
-      </a-table>
-    </contextMenu>
-    <!-- 现货合同: 详情 -->
-    <SpotContractDeatil :selectedRow="selectedRow" />
-    <!-- 现货合同: 审核 -->
-    <Check />
-    <!-- 现货合同: 撤销 -->
-    <Cancel />
-  </div>
+    <!-- 现货合同: 待审核-->
+    <div class="spot-contract-peddding"
+         :loading="loading">
+        <filterCustomTable @search="search">
+            <BtnList :btnList="commonBtn"/>
+        </filterCustomTable>
+        <contextMenu :contextMenuList="forDataBtn">
+            <a-table :columns="columns"
+                     class="topTable hiddenFirstCol"
+                     :pagination="false"
+                     rowKey="key"
+                     :expandedRowKeys="expandedRowKeys"
+                     :customRow="Rowclick"
+                     :data-source="tableList">
+                <!-- 额外的展开行 -->
+                <template #expandedRowRender="{  }">
+                    <BtnList :btnList="forDataBtn"/>
+                </template>
+                <!-- <template #userinfotype="{ text }">
+                  <a>{{ text === '2' ? '企业' : '个人'}}</a>
+                </template> -->
+
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
+
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
+
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
+
+            </a-table>
+        </contextMenu>
+        <!-- 现货合同: 详情 -->
+        <SpotContractDeatil :selectedRow="selectedRow" @refresh="queryTable"/>
+        <!-- 现货合同: 审核 -->
+        <Check :selectedRow="selectedRow" @refresh="queryTable"/>
+        <!-- 现货合同: 撤销 -->
+        <Cancel :selectedRow="selectedRow" @refresh="queryTable"/>
+    </div>
 </template>
 
 <script lang="ts">
-import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
-import { AddSpotContract, SpotContractDeatil, Check, Cancel, filterCustomTable } from '../../components';
-import { queryTableList, getFilterTableCB, Ermcp3ContractRsp } from '../index';
+import {
+    defineComponent,
+    initData,
+    getTableColumns,
+    getTableEvent,
+    getBtnList,
+    contextMenu,
+    BtnList
+} 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";
 
 export default defineComponent({
     name: 'spot-contract-peddding',
@@ -49,19 +71,21 @@ export default defineComponent({
     },
     setup() {
         // 表头数据
-        const { columns, registerColumn, updateColumn, filteredInfo } = getTableColumns();
+        const {columns, registerColumn, updateColumn, filteredInfo} = getTableColumns();
         // 表格事件
-        const { expandedRowKeys, selectedRow, Rowclick } = getTableEvent<Ermcp3ContractRsp>({});
+        const {expandedRowKeys, selectedRow, Rowclick} = getTableEvent<Ermcp3ContractRsp>({});
         // 表格操作按钮列表
-        const { commonBtn, forDataBtn } = getBtnList('spot_contract_checkpending', true);
+        const {commonBtn, forDataBtn} = getBtnList('spot_contract_checkpending', true);
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList(2);
+        const {loading, tableList, queryTable} = queryTableList(2);
+
         // 查询
         function search(value: any) {
             filteredInfo.value = value;
             // 更新表信息
             updateColumn();
         }
+
         initData(() => {
             // 获取列表数据
             queryTable();
@@ -79,6 +103,10 @@ export default defineComponent({
             loading,
             tableList,
             search,
+            queryTable,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
         };
     },
 });

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

@@ -12,7 +12,7 @@
                :expandedRowKeys="expandedRowKeys"
                :customRow="Rowclick"
                rowKey="key"
-               :data-source="spotContractList">
+               :data-source="tableList">
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{  }">
           <BtnList :btnList="forDataBtn" />
@@ -20,6 +20,17 @@
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
+          <template #biztype="{ text }">
+              <a>{{ getBizTypeName(text) }}</a>
+          </template>
+
+          <template #pricetype="{ text }">
+              <a>{{ getPriceTypeName(text) }}</a>
+          </template>
+
+          <template #contracctstatus="{ text }">
+              <a>{{ getContractStatusName(text) }}</a>
+          </template>
       </a-table>
     </contextMenu>
     <!-- 新增现货合同 -->
@@ -34,6 +45,7 @@ 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";
 
 export default defineComponent({
     name: 'spot-contract-done',
@@ -76,6 +88,9 @@ export default defineComponent({
             loading,
             tableList,
             search,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
         };
     },
 });

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

@@ -12,7 +12,7 @@
                :expandedRowKeys="expandedRowKeys"
                :customRow="Rowclick"
                rowKey="key"
-               :data-source="spotContractList">
+               :data-source="tableList">
         <!-- 额外的展开行 -->
         <template #expandedRowRender="{  }">
           <BtnList :btnList="forDataBtn" />
@@ -20,6 +20,17 @@
         <!-- <template #userinfotype="{ text }">
           <a>{{ text === '2' ? '企业' : '个人'}}</a>
         </template> -->
+          <template #biztype="{ text }">
+              <a>{{ getBizTypeName(text) }}</a>
+          </template>
+
+          <template #pricetype="{ text }">
+              <a>{{ getPriceTypeName(text) }}</a>
+          </template>
+
+          <template #contracctstatus="{ text }">
+              <a>{{ getContractStatusName(text) }}</a>
+          </template>
       </a-table>
     </contextMenu>
     <!-- 现货合同: 详情 -->
@@ -34,6 +45,7 @@ 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";
 
 export default defineComponent({
     name: 'spot-contract-performance',
@@ -77,6 +89,9 @@ export default defineComponent({
             loading,
             tableList,
             search,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
         };
     },
 });

+ 15 - 0
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -20,6 +20,17 @@
                 <!-- <template #userinfotype="{ text }">
                   <a>{{ text === '2' ? '企业' : '个人'}}</a>
                 </template> -->
+                <template #biztype="{ text }">
+                    <a>{{ getBizTypeName(text) }}</a>
+                </template>
+
+                <template #pricetype="{ text }">
+                    <a>{{ getPriceTypeName(text) }}</a>
+                </template>
+
+                <template #contracctstatus="{ text }">
+                    <a>{{ getContractStatusName(text) }}</a>
+                </template>
             </a-table>
         </contextMenu>
         <!-- 新增现货合同 -->
@@ -58,6 +69,7 @@ import {
 } from '../../components';
 
 import {queryTableList, getFilterTableCB, Ermcp3ContractRsp} from '../index';
+import {getBizTypeName, getContractStatusName, getPriceTypeName} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
@@ -106,6 +118,9 @@ export default defineComponent({
             tableList,
             search,
             queryTable,
+            getBizTypeName,
+            getPriceTypeName,
+            getContractStatusName,
         };
     },
 });

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

@@ -47,4 +47,21 @@ export function getPriceTypeName(state: number): string {
             break
     }
     return result
+}
+
+/**
+ * 业务类型返回 业务类型 1-套保 2-套利
+ * @param state
+ */
+export function getBizTypeName(state: number): string {
+    let result = "--";
+    switch (state) {
+        case 1:
+            result = "套保";
+            break
+        case 2:
+            result = "套利";
+            break
+    }
+    return result
 }