huangbin 4 年之前
父节点
当前提交
e3ffda70c9

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

@@ -259,7 +259,7 @@ export interface DeliveryOrderReq {
     ClientType: number // uint32 终端类型
     AccountID: number // uint64 交易账号
     XGoodsID: number // uint32 主商品ID(交割合约)
-    PGoodsID: number // uint32 辅助商品ID(辅助合约)
+    PGoodsID?: number // uint32 辅助商品ID(辅助合约)
     P2GoodsID?: number // uint32 辅助商品ID(辅助合约2)
     DeliveryGoodsID: number // uint32 交割商品ID
     XQty: number // uint64 交割合约数量

+ 7 - 16
src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_settlement/index.vue

@@ -78,7 +78,8 @@
                 <div>{{getDeliveryGoodsPrice()}}</div>
               </div>
             </div>
-            <div class="line3">预估贷款:{{getEstimatedPayment()}}</div>
+            <div v-if="isBaseSpread()"
+                 class="line3">预估贷款:{{getEstimatedPayment()}}</div>
           </div>
 
           <a-form-item class="btnCenter mt10">
@@ -96,30 +97,18 @@
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrDeliveryAvalidHoldLBReq, WrDeliveryAvalidHoldLB, WrPerformancePlan, WrPosition } from '@/services/go/wrtrade/interface';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { _closeModal } from '@/common/setup/modal/modal';
-// import { handleForm } from './setup';
-import { validateAction } from '@/common/setup/form';
-import { DBType, FormState } from './interface';
 
 import UploadImg from '@/common/components/uploadImg/index.vue';
-import { getUploadImg } from '@/common/setup/upload';
-import { PerformanceContractedApplyReq, PerformanceDelayApplyReq } from '@/services/proto/performance/interface';
-import { getSelectedAccount, getSelectedAccountId, getUserId } from '@/services/bus/account';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { performanceContractedApply, performanceDelayApply } from '@/services/proto/performance';
+import { getSelectedAccountId } from '@/services/bus/account';
+
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import Long from 'long';
-import { queryTableList } from '@/common/setup/table';
-import { queryResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { useQueryData } from '@/common/setup/request';
-import { queryWrDeliveryAvalidHoldLB } from '@/services/go/wrtrade';
 import { QueryTradePositionRsp } from '@/services/go/ermcp/order/interface';
 import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
 import { handleCheck, getTableList, handleCalculation } from './setup';
 import { DeliveryOrder } from '@/services/proto/warehousetrade';
-import { handleDeliveryRelation } from '@/common/setup/deliveryRelation';
 import { v4 } from 'uuid';
 import moment from 'moment';
 import { DeliveryOrderReq } from '@/services/proto/warehousetrade/interface';
@@ -172,7 +161,6 @@ export default defineComponent({
                     // marketid,
                     AccountID: getSelectedAccountId(),
                     XGoodsID: goodsid,
-                    PGoodsID: deliveryGoods.value.pgoodsid,
                     DeliveryGoodsID: deliveryGoods.value.deliverygoodsid,
                     XQty: Long.fromNumber(XQty()),
                     PQty: Long.fromNumber(PQty()),
@@ -188,6 +176,9 @@ export default defineComponent({
                         SubNum: selected.value.subnum,
                     },
                 };
+                if (isBaseSpread()) {
+                    param.PGoodsID = deliveryGoods.value.pgoodsid;
+                }
                 console.log('param', param);
                 DeliveryOrder(param)
                     .then((res) => {

+ 1 - 1
src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_settlement/setup.ts

@@ -61,7 +61,7 @@ export function handleCheck() {
         if (deliveryGoods.value) {
             // 1和3是订单交易 挂牌转让
             // 2和4是基差点价
-            const arr = [2, 3]
+            const arr = [2, 4]
             return arr.includes(deliveryGoods.value.deliverytype)
         } else {
             return false