Explorar el Código

现货合同正常完结

huangbin hace 4 años
padre
commit
c8cbc2e3ed

+ 13 - 13
src/services/proto/hedgeplan/interface.ts

@@ -1,6 +1,6 @@
 // 套保计划请求 0 29 164
 export interface ErmcpHedgePlanReq {
-    HedgePlanID: number // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
+    HedgePlanID?: number // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
     HedgePlanNo?: string // string 套保计划名称
     ContractType?: number // int32 计划类型-1:采购-1:销售
     AreaUserID?: number// uint64 机构ID
@@ -14,20 +14,20 @@ export interface ErmcpHedgePlanReq {
     ApplySrc?: number // int32 申请来源 - 1:管理端 2:终端
     ApplyId?: number // uint64 申请人
     Remark?: string // string 计划备注
-    OperateType: number // int32 操作类型-1:保存草稿2:提交申请
+    OperateType?: number // int32 操作类型-1:保存草稿2:提交申请
 
-    WRStandardID: number; // uint64 现货品类ID
-    AccountID: number; // uint64 期货账户ID(默认为0,也可不传)
-    Tradeuserid: number; // uint64 交易用户ID
-    Currencyid: number; // uint64 结算币种ID
-    Biztype: number; // uint64 业务类型 - 1:套保 2:套利 默认为 1
-    auditid: number; // uint64 审核人
-    auditsrc: number; // uint32 审核来源 - 1:管理端 2:终端
-    auditremark: string; // string 审核备注
+    WRStandardID?: number; // uint64 现货品类ID
+    AccountID?: number; // uint64 期货账户ID(默认为0,也可不传)
+    Tradeuserid?: number; // uint64 交易用户ID
+    Currencyid?: number; // uint64 结算币种ID
+    Biztype?: number; // uint64 业务类型 - 1:套保 2:套利 默认为 1
+    auditid?: number; // uint64 审核人
+    auditsrc?: number; // uint32 审核来源 - 1:管理端 2:终端
+    auditremark?: string; // string 审核备注
 }
 
 // 套保计划响应 0 29 165
-export interface  ErmcpHedgePlanRsp {
+export interface ErmcpHedgePlanRsp {
     RetCode: number // int32 返回码
     RetDesc: string // string 描述信息
 }
@@ -45,7 +45,7 @@ export interface HedgePlanOperateReq {
 }
 
 // 套保计划操作响应 0 18 3
-export interface  HedgePlanOperateRsp {
+export interface HedgePlanOperateRsp {
     RetCode: number; // int32 返回码
     RetDesc: string; // string 描述信息
     HedgePlanID: number; // uint64 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
@@ -55,7 +55,7 @@ export interface  HedgePlanOperateRsp {
 }
 
 // 套保计划信息 0 18 1
-export interface  HedgePlanInfo {
+export interface HedgePlanInfo {
     HedgePlanNo: string; // string 套保计划编号
     ContractType: number; // int32 计划类型-1:采购-1:销售
     AreaUserID: number; // uint32 机构ID

+ 89 - 94
src/views/business/plan/components/audit/index.vue

@@ -13,89 +13,89 @@
                 type="primary"
                 :loading="loading"
                 @click="pass">审核通过</a-button>
-        <a-button key="submit"
-                  type="primary"
-                  :loading="loading"
-                  @click="refuse">审核拒绝</a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="refuse">审核拒绝</a-button>
     </template>
-      <fieldset class="formFieldSet">
-          <legend>基本信息</legend>
-          <a-form class="inlineForm"
-                  :form="form"
-                  @submit="handleSearch">
-              <a-row :gutter="24">
-                  <a-col :span="12">
-                      <a-form-item label="计划类型">
-                          <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="计划名称">
-                          <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</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.deliverygoodsname) }}</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.planqty) }}</span>
-                      </a-form-item>
-                  </a-col>
-                  <a-col :span="12">
-                      <a-form-item label="备注">
-                          <span class="white">{{ formatValue(selectedRow.remark) }}</span>
-                      </a-form-item>
-                  </a-col>
-              </a-row>
-          </a-form>
-      </fieldset>
-      <fieldset class="formFieldSet">
-          <legend>其它信息</legend>
-          <a-row :gutter="24">
-              <a-col :span="12">
-                  <a-form-item label="交易用户">
-                      <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
-                  </a-form-item>
-              </a-col>
-              <a-col :span="12">
-                  <a-form-item label="结算币种">
-                      <span class="white">{{ formatValue(selectedRow.currencyname) }}</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>
+    <fieldset class="formFieldSet">
+      <legend>基本信息</legend>
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="计划类型">
+              <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="计划名称">
+              <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</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.deliverygoodsname) }}</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.planqty) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="备注">
+              <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>其它信息</legend>
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="交易用户">
+            <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="结算币种">
+            <span class="white">{{ formatValue(selectedRow.currencyname) }}</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-modal>
 </template>
 
 <script lang="ts">
-import {defineComponent, PropType, ref} from 'vue';
+import { defineComponent, PropType, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import {Modal} from "ant-design-vue";
-import {ErmcpHedgePlanReq} from "@/services/proto/hedgeplan/interface";
-import Long from "long";
-import {changeStatus} from "@/views/business/plan/components/setup";
-import {Ermcp3HedgePlan} from "@/services/go/ermcp/plan/interface";
-import {getPlanContractType} from "@/views/business/plan/setup";
-import {formatValue} from "@/common/methods";
+import { Modal } from 'ant-design-vue';
+import { ErmcpHedgePlanReq } from '@/services/proto/hedgeplan/interface';
+import Long from 'long';
+import { changeStatus } from '@/views/business/plan/components/setup';
+import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
+import { getPlanContractType } from '@/views/business/plan/setup';
+import { formatValue } from '@/common/methods';
 
 export default defineComponent({
     name: 'plan_audit_audit',
@@ -119,16 +119,14 @@ export default defineComponent({
                     const params: ErmcpHedgePlanReq = {
                         HedgePlanID: Long.fromString(props.selectedRow.hedgeplanid),
                         OperateType: 4,
-                        Remark: '通过'
-                    }
+                        Remark: '通过',
+                    };
                     changeStatus(params, 4, loading)
-                        .then(res => {
-                            cancel()
-                            context.emit('refresh')
-                        })
-                        .catch(err => {
-
+                        .then((res) => {
+                            cancel();
+                            context.emit('refresh');
                         })
+                        .catch((err) => {});
                 },
                 onCancel() {
                     console.log('Cancel');
@@ -136,7 +134,7 @@ export default defineComponent({
             });
         }
         // 审核拒绝
-        function refuse(){
+        function refuse() {
             Modal.confirm({
                 title: '是否确认审核拒绝',
                 okText: '审核拒绝',
@@ -145,15 +143,13 @@ export default defineComponent({
                     const params: ErmcpHedgePlanReq = {
                         HedgePlanID: Long.fromString(props.selectedRow.hedgeplanid),
                         OperateType: 5,
-                    }
+                    };
                     changeStatus(params, 5, loading)
-                        .then(res => {
-                            cancel()
-                            context.emit('refresh')
-                        })
-                        .catch(err => {
-
+                        .then((res) => {
+                            cancel();
+                            context.emit('refresh');
                         })
+                        .catch((err) => {});
                 },
                 onCancel() {
                     console.log('Cancel');
@@ -168,7 +164,6 @@ export default defineComponent({
             pass,
             getPlanContractType,
             formatValue,
-
         };
     },
 });

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

@@ -181,12 +181,11 @@ import { formatTime, formatValue } from '@/common/methods';
 import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
 import { orderContractOperateControl } from '@/views/information/spot-contract/components/setup';
-import { message, Modal } from 'ant-design-vue';
+import { Modal } from 'ant-design-vue';
 import { SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
-import Long from 'long';
 
 export default defineComponent({
-    name: 'spot-contract-detail',
+    name: 'spot-contract-finish',
     components: {},
     props: {
         selectedRow: {
@@ -199,6 +198,7 @@ export default defineComponent({
         const maskClosableFlag = ref<boolean>(false);
         const loading = ref<boolean>(false);
         function submit() {
+            context.emit('refresh');
             Modal.confirm({
                 title: '是否确认完结',
                 okText: '确认完结',

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

@@ -38,7 +38,7 @@
       </a-table>
     </contextMenu>
     <!-- 新增现货合同 -->
-    <AddSpotContract />
+    <AddSpotContract @refresh="queryTable" />
     <!-- 现货合同: 详情 -->
     <SpotContractDeatil :selectedRow="selectedRow"
                         @refresh="queryTable" />

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

@@ -99,6 +99,7 @@ export default defineComponent({
             getPriceTypeName,
             getContractStatusName,
             getContractTypeName,
+            queryTable,
         };
     },
 });

+ 56 - 75
src/views/information/spot-contract/list/unsubmitted/index.vue

@@ -1,84 +1,65 @@
 <template>
-    <!-- 现货合同: 未提交-->
-    <div class="spot-contract-not-commit"
-         :loading="loading">
-        <filterCustomTable @search="search">
-            <BtnList :btnList="commonBtn"/>
-        </filterCustomTable>
-        <contextMenu :contextMenuList="forDataBtn">
-            <a-table :columns="columns"
-                     class="topTable hiddenFirstCol"
-                     :pagination="false"
-                     :expandedRowKeys="expandedRowKeys"
-                     :customRow="Rowclick"
-                     rowKey="key"
-                     :data-source="tableList">
-                <!-- 额外的展开行 -->
-                <template #expandedRowRender="{  }">
-                    <BtnList :btnList="forDataBtn"/>
-                </template>
-                <!-- <template #userinfotype="{ text }">
+  <!-- 现货合同: 未提交-->
+  <div class="spot-contract-not-commit"
+       :loading="loading">
+    <filterCustomTable @search="search">
+      <BtnList :btnList="commonBtn" />
+    </filterCustomTable>
+    <contextMenu :contextMenuList="forDataBtn">
+      <a-table :columns="columns"
+               class="topTable hiddenFirstCol"
+               :pagination="false"
+               :expandedRowKeys="expandedRowKeys"
+               :customRow="Rowclick"
+               rowKey="key"
+               :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 #biztype="{ text }">
+          <a>{{ getBizTypeName(text) }}</a>
+        </template>
 
-                <template #pricetype="{ text }">
-                    <a>{{ getPriceTypeName(text) }}</a>
-                </template>
+        <template #pricetype="{ text }">
+          <a>{{ getPriceTypeName(text) }}</a>
+        </template>
 
-                <template #contracctstatus="{ text }">
-                    <a>{{ getContractStatusName(text) }}</a>
-                </template>
+        <template #contracctstatus="{ text }">
+          <a>{{ getContractStatusName(text) }}</a>
+        </template>
 
-                <template #contracttype="{ text }">
-                    <a>{{ getContractTypeName(text) }}</a>
-                </template>
-            </a-table>
-        </contextMenu>
-        <!-- 新增现货合同 -->
-        <AddSpotContract  @refresh="queryTable"/>
-        <!-- 现货合同: 详情 -->
-        <SpotContractDeatil :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 修改 -->
-        <ModifySpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 删除 -->
-        <DeleteSpotContract :selectedRow="selectedRow"
-                            @refresh="queryTable"/>
-        <!-- 现货合同: 重新提交 -->
-        <ResubmitSpotContract/>
-    </div>
+        <template #contracttype="{ text }">
+          <a>{{ getContractTypeName(text) }}</a>
+        </template>
+      </a-table>
+    </contextMenu>
+    <!-- 新增现货合同 -->
+    <AddSpotContract @refresh="queryTable" />
+    <!-- 现货合同: 详情 -->
+    <SpotContractDeatil :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 修改 -->
+    <ModifySpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 删除 -->
+    <DeleteSpotContract :selectedRow="selectedRow"
+                        @refresh="queryTable" />
+    <!-- 现货合同: 重新提交 -->
+    <ResubmitSpotContract :selectedRow="selectedRow"
+                          @refresh="queryTable" />
+  </div>
 </template>
 
 <script lang="ts">
-import {
-    defineComponent,
-    initData,
-    getTableColumns,
-    getTableEvent,
-    getBtnList,
-    contextMenu,
-    BtnList
-} from '@/common/export/table';
-import {
-    AddSpotContract,
-    SpotContractDeatil,
-    filterCustomTable,
-    ModifySpotContract,
-    DeleteSpotContract,
-    ResubmitSpotContract
-} from '../../components';
+import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList, contextMenu, BtnList } from '@/common/export/table';
+import { AddSpotContract, SpotContractDeatil, filterCustomTable, ModifySpotContract, DeleteSpotContract, ResubmitSpotContract } from '../../components';
 
-import {queryTableList, getFilterTableCB, Ermcp3ContractRsp} from '../index';
-import {
-    getBizTypeName,
-    getContractStatusName,
-    getContractTypeName,
-    getPriceTypeName
-} from "@/views/information/spot-contract/setup";
+import { queryTableList, getFilterTableCB, Ermcp3ContractRsp } from '../index';
+import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
@@ -94,13 +75,13 @@ 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_unsubmitted', true);
+        const { commonBtn, forDataBtn } = getBtnList('spot_contract_unsubmitted', true);
         // 表格列表数据
-        const {loading, tableList, queryTable} = queryTableList(1);
+        const { loading, tableList, queryTable } = queryTableList(1);
 
         // 查询
         function search(value: any) {