Explorar o código

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

li.shaoyi %!s(int64=4) %!d(string=hai) anos
pai
achega
987e2cb8ae
Modificáronse 23 ficheiros con 746 adicións e 735 borrados
  1. 1 1
      public/config/app.config.json
  2. 15 2
      src/common/constants/enumsName.ts
  3. 12 12
      src/common/setup/trade/index.ts
  4. 12 2
      src/services/bus/goods.ts
  5. 0 10
      src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue
  6. 109 111
      src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue
  7. 146 135
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue
  8. 136 130
      src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue
  9. 56 48
      src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/index.vue
  10. 4 0
      src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/interface.ts
  11. 15 0
      src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/setup.ts
  12. 2 2
      src/views/order/commodity_contract/components/commodity_contract_bargain/index.vue
  13. 40 45
      src/views/order/commodity_contract/components/commodity_contract_commission/index.vue
  14. 43 53
      src/views/order/commodity_contract/components/commodity_contract_make_deal/index.vue
  15. 3 39
      src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_deal_closed/index.vue
  16. 1 0
      src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_settlement/index.vue
  17. 1 1
      src/views/order/commodity_contract/components/commodity_contract_summary/index.vue
  18. 46 52
      src/views/order/financing_manager/components/financing_manager_apply_order/index.vue
  19. 41 47
      src/views/order/financing_manager/components/financing_manager_contract/index.vue
  20. 4 3
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue
  21. 26 20
      src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/setup.ts
  22. 25 20
      src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts
  23. 8 2
      src/views/setting/friends/index.vue

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://103.40.249.123:28280/cfg?key=mtp_20"
+    "apiUrl": "http://192.168.31.135:8080/cfg?key=test_135"
 }

+ 15 - 2
src/common/constants/enumsName.ts

@@ -557,6 +557,19 @@ export function getBuyOrSellName(buyorsell: number): string {
     return result
 }
 
+export function getBuyOrSellTypeName(buyorsell: number): string {
+    let result = '--'
+    switch (buyorsell) {
+        case 0:
+            result = '买入'
+            break
+        case 1:
+            result = '卖出'
+            break
+    }
+    return result
+}
+
 /**
  * 变更流水类型
  * 1:套保比率变更 2:套利比率变更
@@ -999,10 +1012,10 @@ export function getInterestrateModeName(mode: number, value: number) {
     let result = "--"
     switch (mode) {  // 1:年利率
         case 1:
-            result = (value * 100).toFixed(2).toString()
+            result = (value * 100).toFixed(2).toString() + '%'
             break
         case 2: //  2:日利率
-            result = (value * 10000).toFixed(2).toString()
+            result = (value * 10000).toFixed(2).toString() + '‱'
             break
         case 3: // 日固定值
             result = value.toFixed(2).toString()

+ 12 - 12
src/common/setup/trade/index.ts

@@ -1,4 +1,4 @@
-import { getQuoteDayInfoByCodeFindPrice } from "@/services/bus/goods";
+import { getGoodsAgreeunitByGoodsCode, getQuoteDayInfoByCodeFindPrice } from "@/services/bus/goods";
 import { getRules } from "@/services/bus/rules";
 import { WrMarketTradeConfig } from "@/services/go/wrtrade/interface";
 import { CommomTradeForm, ListingTradeNumAndPrice } from './interface';
@@ -35,7 +35,7 @@ export function useTradeRule() {
 
 
 // 买 挂牌/摘牌 固定价 最大数量 = 可用资金/(买方履约保证金比例*挂牌价格)
-export function useBuyFixedPricMaxNum<T extends CommomTradeForm>(formState: T, canUseMoney: Function) {
+export function useBuyFixedPricMaxNum<T extends CommomTradeForm>(formState: T, canUseMoney: Function, agreeunit: number) {
     let result = 0
     // 可用资金
     const money = canUseMoney() > 0 ? canUseMoney() : 0
@@ -46,13 +46,13 @@ export function useBuyFixedPricMaxNum<T extends CommomTradeForm>(formState: T, c
 
     // 处理 0 特殊情况
     if (marginValue) {
-        result = Math.floor(money / marginValue)
+        result = Math.floor(money / (marginValue * agreeunit))
     }
     return result
 }
 
 // 卖 挂牌/摘牌  固定价 最大数量 = 可用资金/(卖方履约保证金比例*挂牌价格)
-export function useSellFixedPriceMaxNum<T extends CommomTradeForm>(formState: T, canUseMoney: Function) {
+export function useSellFixedPriceMaxNum<T extends CommomTradeForm>(formState: T, canUseMoney: Function, agreeunit: number) {
     let result = 0
     // 可用资金
     const money = canUseMoney() > 0 ? canUseMoney() : 0
@@ -60,7 +60,7 @@ export function useSellFixedPriceMaxNum<T extends CommomTradeForm>(formState: T,
     // 最大数量 = 可用资金/(履约保证金*挂牌价格)
     const marginValue = isRationInSellMarginType() ? (sellmarginvalue * formState.FixedPrice) : (sellmarginvalue + formState.FixedPrice)
     if (marginValue) { // 处理 0 特殊情况
-        result = Math.floor(money / marginValue)
+        result = Math.floor(money / (marginValue * agreeunit))
     }
     return result
 }
@@ -79,21 +79,21 @@ export function useFloatPrice<T extends CommomTradeForm>(formState: T, goodscode
 }
 
 //  浮动价 挂牌/摘牌 金额
-export function useFloatPriceMoney<T extends CommomTradeForm>(formState: T, goodscode: string) {
+export function useFloatPriceMoney<T extends CommomTradeForm>(formState: T, goodscode: string, agreeunit: number) {
     let result = 0
     const goodsPrice = getQuoteDayInfoByCodeFindPrice(goodscode)
     if (goodsPrice && goodsPrice !== '--') {   // 有实时行情价格
         // 估算总价=挂牌基差+期货合约价;
         const predictTotal = formState.PriceMove + (goodsPrice as number);
         // 估算总额=估算总价*摘牌数量;
-        result = predictTotal * formState.OrderQty
+        result = predictTotal * formState.OrderQty * agreeunit
     }
     return result
 }
 
 // 获取 挂牌 的 最大可挂数量,金额,保证金
 export function useListingTradeNumAndPrice<T extends CommomTradeForm>({ formState, goodscode, isFloat, canUseMoney }: ListingTradeNumAndPrice<T>) {
-
+    const agreeunit = getGoodsAgreeunitByGoodsCode(goodscode)
     function getMaxNum(value: number, isBuy: boolean) {
         // 可用资金
         const money = canUseMoney() > 0 ? canUseMoney() : 0
@@ -102,10 +102,10 @@ export function useListingTradeNumAndPrice<T extends CommomTradeForm>({ formStat
         if (isFloat()) {
             const price = useFloatPrice<T>(formState, goodscode)
             if (price !== '--') {
-                result = money / (Number(price) * value)
+                result = money / (Number(price) * value * agreeunit)
             }
         } else {
-            result = isBuy ? useBuyFixedPricMaxNum(formState, canUseMoney) : useSellFixedPriceMaxNum(formState, canUseMoney)
+            result = isBuy ? useBuyFixedPricMaxNum(formState, canUseMoney, agreeunit) : useSellFixedPriceMaxNum(formState, canUseMoney, agreeunit)
         }
         return +result.toFixed(0)
     }
@@ -126,10 +126,10 @@ export function useListingTradeNumAndPrice<T extends CommomTradeForm>({ formStat
     function getMoney() {
         let result = 0
         if (isFloat()) {
-            result = useFloatPriceMoney(formState, goodscode)
+            result = useFloatPriceMoney(formState, goodscode, agreeunit)
         } else {
             // 摘牌金额=挂牌价格*摘牌数量
-            result = formState.OrderQty * formState.FixedPrice
+            result = formState.OrderQty * formState.FixedPrice * agreeunit
         }
         return Number(result.toFixed(2))
     }

+ 12 - 2
src/services/bus/goods.ts

@@ -104,10 +104,20 @@ export function getGoodsById(goodsid: number) {
     return getGoodsList().find(el => el.goodsid === goodsid)
 }
 
+// 通过 goodscode 查找 商品
+export function getGoodsByGoodsCode(goodscode: string) {
+    return getGoodsList().find(el => el.goodscode === goodscode)
+}
+
 // 通过goodsid 获取商品合约单位
-export function getGoodsAgreeunitByGoodsId(goodsid: number): number | null {
+export function getGoodsAgreeunitByGoodsId(goodsid: number): number {
     const result = getGoodsById(goodsid)
-    return result ? result.agreeunit : null
+    return result ? result.agreeunit : 1
+}
+// 通过goodsid 获取商品合约单位
+export function getGoodsAgreeunitByGoodsCode(goodscode: string): number {
+    const result = getGoodsByGoodsCode(goodscode)
+    return result ? result.agreeunit : 1
 }
 
 // 通过 goodsid 查找 trademode

+ 0 - 10
src/views/market/spot_trade/spot_trade_order_transaction/components/buy-sell-market/index.vue

@@ -42,16 +42,6 @@
                 <div class="last">{{selectedRow.askvolume}}</div>
               </div>
             </div>
-            <div class="greenBar green">
-              <div class="numBlock ml15">
-                <div class="first">卖价</div>
-                <div class="last">{{selectedRow.sellprice}}</div>
-              </div>
-              <div class="numBlock">
-                <div class="first">卖量</div>
-                <div class="last">{{selectedRow.sellqty}}</div>
-              </div>
-            </div>
           </div>
           <div class="inlineBar start">
             <div class="redBar red1">

+ 109 - 111
src/views/market/spot_trade/spot_trade_order_transaction/components/delisting/index.vue

@@ -1,118 +1,116 @@
 <template>
-    <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
-    <Drawer
-        :title="'摘牌'"
-        :placement="'right'"
-        :visible="visible"
-        width="486px"
-        height="479px"
-        @cancel="cancel"
-        class="top"
-    >
-        <div class="delisting">
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户" name="accountid">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    style="width: 260px"
-                                    v-model:value="formState.accountid"
-                                    placeholder="请选择"
-                                >
-                                    <a-select-option
-                                        v-for="item in accountList"
-                                        :value="item.accountid"
-                                        :key="item.accountid"
-                                    >{{item.accountid}}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <span class="white ml8">{{selectedRow.username}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌价格">
-                                <span class="white ml8">{{selectedRow.orderprice.toFixed(2)}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量">
-                                <span class="white ml8">{{selectedRow.orderqty}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="摘牌数量" class="relative" name="num">
-                                <a-input-number
-                                    class="dialogInput yellowInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    :max="99999"
-                                    v-model:value="formState.num"
-                                />
-                                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
-                                <div
+  <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
+  <Drawer :title="'摘牌'"
+          :placement="'right'"
+          :visible="visible"
+          width="486px"
+          height="479px"
+          @cancel="cancel"
+          class="top">
+    <div class="delisting">
+      <a-form class="inlineForm dialogForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户"
+                           name="accountid">
+                <a-select class="inlineFormSelect"
+                          style="width: 260px"
+                          v-model:value="formState.accountid"
+                          placeholder="请选择">
+                  <a-select-option v-for="item in accountList"
+                                   :value="item.accountid"
+                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="挂牌方">
+                <span class="white ml8">{{selectedRow.username}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="挂牌价格">
+                <span class="white ml8">{{selectedRow.orderprice.toFixed(2)}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="挂牌数量">
+                <span class="white ml8">{{selectedRow.orderqty}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="摘牌数量"
+                           class="relative"
+                           name="num">
+                <a-input-number class="dialogInput yellowInput"
+                                style="width: 260px"
+                                :min="0"
+                                :max="99999"
+                                v-model:value="formState.num" />
+                <span class="input-enumdicname-absolute">{{selectedRow.enumdicname}}</span>
+                <!-- <div
                                     class="labelTip"
-                                >({{selectedRow.minivalue}}{{selectedRow.enumdicname}}起)</div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24" class="mt-20">
-                            <a-form-item>
-                                <a-slider
-                                    ::min="0"
-                                    v-model:value="formState.num"
-                                    :max="selectedRow.orderqty"
-                                    class="formSlider"
-                                    style="width: 260px"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>99999{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="12">&nbsp;</a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24" class="mt-20">
-                            <a-form-item label="摘牌金额">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
+                                >({{selectedRow.minivalue}}{{selectedRow.enumdicname}}起)</div> -->
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24"
+                   class="mt-20">
+              <a-form-item>
+                <a-slider ::min="0"
+                          v-model:value="formState.num"
+                          :max="selectedRow.orderqty"
+                          class="formSlider"
+                          style="width: 260px" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>99999{{selectedRow.enumdicname}}</span>
                 </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button
-                                class="listedBtn"
-                                :loading="loading"
-                                :disabled="loading"
-                                @click="submit"
-                            >{{isBuy() ? '卖出' : '买入'}}</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">&nbsp;</a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24"
+                   class="mt-20">
+              <a-form-item label="摘牌金额">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{getCanUseMoney(getSelectedAccount())}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
+        <a-row :gutter="24">
+          <a-col :span="24"
+                 class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn"
+                        :loading="loading"
+                        :disabled="loading"
+                        @click="submit">{{isBuy() ? '卖出' : '买入'}}</a-button>
+              <a-button class="ml10 cancelBtn"
+                        @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">

+ 146 - 135
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/delisting/index.vue

@@ -1,141 +1,152 @@
 <template>
-    <!-- 挂牌求购 -->
-    <Drawer
-        :title="isBuy() ? '摘牌买入' : '摘牌卖出' "
-        :placement="'right'"
-        :visible="visible"
-        @cancel="cancel"
-        class="top"
-    >
-        <div class="post_buying">
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户" name="accountid">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    style="width: 260px"
-                                    v-model:value="formState.accountid"
-                                    placeholder="请选择"
-                                >
-                                    <a-select-option
-                                        v-for="item in accountList"
-                                        :value="item.accountid"
-                                        :key="item.accountid"
-                                    >{{item.accountid}}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌方">
-                                <span class="white">{{selectedRow.username}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isFloat()">
-                            <a-form-item label="价格类型">
-                                <span class="white">固定价</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="挂牌估算价">
-                                <span class="white">3444</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="卖出价格" name="priceType">
-                                <a-radio-group
-                                    class="commonRadioGroup"
-                                    v-model:value="formState.priceType"
-                                >
-                                    <a-radio :value="1">市价</a-radio>
-                                    <a-radio :value="2">限价</a-radio>
-                                </a-radio-group>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat() && isLimit()">
-                            <a-form-item label="摘牌价格" name="price" class="inputIconBox">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    v-model:value="formState.price"
-                                />
-                                <MinusOutlined @click="decreasePrice" />
-                                <PlusOutlined @click="increasePrice" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量">
-                                <span class="white">{{selectedRow.orderqty}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!useUserType()">
-                            <a-form-item label="摘牌数量">
-                                <span class="white">{{formState.num}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="useUserType()">
-                            <a-form-item label="摘牌数量" name="num" class="inputIconBox">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    :max="99"
-                                    v-model:value="formState.num"
-                                />
-                                <MinusOutlined @click="decreasePrice" />
-                                <PlusOutlined @click="increasePrice" />
-                                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="useUserType()" class="mt-10">
-                            <a-form-item>
-                                <a-slider
-                                    :min="0"
-                                    v-model:value="formState.num"
-                                    :max="selectedRow.orderqty"
-                                    class="formSlider"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20" v-if="!isFloat()">
-                            <a-form-item :label="'摘牌金额'">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20" v-if="isFloat()">
-                            <a-form-item :label="'估算金额'">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getMargin()">
-                            <a-form-item :label="'履约保证金'">
-                                <span class="white ml8">{{getMargin()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{canUseMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
+  <!-- 挂牌求购 -->
+  <Drawer :title="!isBuy() ? '摘牌买入' : '摘牌卖出' "
+          :placement="'right'"
+          :visible="visible"
+          @cancel="cancel"
+          class="top">
+    <div class="post_buying">
+      <a-form class="inlineForm dialogForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户"
+                           name="accountid">
+                <a-select class="inlineFormSelect"
+                          style="width: 260px"
+                          v-model:value="formState.accountid"
+                          placeholder="请选择">
+                  <a-select-option v-for="item in accountList"
+                                   :value="item.accountid"
+                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="挂牌方">
+                <span class="white">{{selectedRow.username}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="!isFloat()">
+              <a-form-item label="价格类型">
+                <span class="white">固定价</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFloat()">
+              <a-form-item label="挂牌估算价">
+                <span class="white">3444</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFloat()">
+              <a-form-item label="卖出价格"
+                           name="priceType">
+                <a-radio-group class="commonRadioGroup"
+                               v-model:value="formState.priceType">
+                  <a-radio :value="1">市价</a-radio>
+                  <a-radio :value="2">限价</a-radio>
+                </a-radio-group>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFloat() && isLimit()">
+              <a-form-item label="摘牌价格"
+                           name="price"
+                           class="inputIconBox">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                v-model:value="formState.price" />
+                <MinusOutlined @click="decreasePrice" />
+                <PlusOutlined @click="increasePrice" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="挂牌数量">
+                <span class="white">{{selectedRow.orderqty}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="!useUserType()">
+              <a-form-item label="摘牌数量">
+                <span class="white">{{formState.num}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="useUserType()">
+              <a-form-item label="摘牌数量"
+                           name="num"
+                           class="inputIconBox">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                :max="99"
+                                v-model:value="formState.num" />
+                <MinusOutlined @click="decreasePrice" />
+                <PlusOutlined @click="increasePrice" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="useUserType()"
+                   class="mt-10">
+              <a-form-item>
+                <a-slider :min="0"
+                          v-model:value="formState.num"
+                          :max="selectedRow.orderqty"
+                          class="formSlider" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>{{selectedRow.orderqty}}{{selectedRow.enumdicname}}</span>
                 </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" @click="submit">{{isBuy() ? '买入' : '卖出'}}</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="relative mt20"
+                   v-if="!isFloat()">
+              <a-form-item :label="'摘牌金额'">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="relative mt20"
+                   v-if="isFloat()">
+              <a-form-item :label="'估算金额'">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="getMargin()">
+              <a-form-item :label="'履约保证金'">
+                <span class="white ml8">{{getMargin()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{canUseMoney()}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
+        <a-row :gutter="24">
+          <a-col :span="24"
+                 class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn"
+                        @click="submit">{{!isBuy() ? '买入' : '卖出'}}</a-button>
+              <a-button class="ml10 cancelBtn"
+                        @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">

+ 136 - 130
src/views/market/spot_trade/spot_trade_order_transaction/spot_trade_order_transaction_swap/components/post_buying/index.vue

@@ -1,135 +1,141 @@
 <template>
-    <!-- 挂牌求购 -->
-    <Drawer
-        :title="isBuy() ? '挂牌求购' : '挂牌卖出' "
-        :placement="'right'"
-        :visible="visible"
-        @cancel="cancel"
-        class="top"
-    >
-        <div class="title_right">
-            <span class="tline"></span>
-            <svg class="icon svg-icon" aria-hidden="true">
-                <use xlink:href="#icon-B" />
-            </svg>
-            <span @click="changeDirection">{{isBuy() ? '卖出' : '求购'}}</span>
-        </div>
-        <div class="post_buying">
-            <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
-                <div class="formBar">
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户" name="accountid">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    style="width: 260px"
-                                    v-model:value="formState.accountid"
-                                    placeholder="请选择"
-                                >
-                                    <a-select-option
-                                        v-for="item in accountList"
-                                        :value="item.accountid"
-                                        :key="item.accountid"
-                                    >{{item.accountid}}</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="价格类型" name>
-                                <a-radio-group
-                                    class="commonRadioGroup"
-                                    v-model:value="formState.priceType"
-                                >
-                                    <a-radio :value="2">固定价</a-radio>
-                                    <!-- 掉期交易商有固定价和浮动价选择 -->
-                                    <!-- 普通交易商只有固定价 -->
-                                    <a-radio :value="3" v-if="!useUserType()">浮动价</a-radio>
-                                </a-radio-group>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="!isFloat()">
-                            <a-form-item label="挂牌价格" name="FixedPrice" class="inputIconBox">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    v-model:value="formState.FixedPrice"
-                                />
-                                <MinusOutlined @click="decreasePrice" />
-                                <PlusOutlined @click="increasePrice" />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-else>
-                            <a-form-item label="基差" name="PriceMove">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    v-model:value="formState.PriceMove"
-                                />
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="isFloat()">
-                            <a-form-item label="估算价" name="PriceMove">
-                                <span class="white">{{getFloatPrice()}}</span>
-                            </a-form-item>
-                        </a-col>
+  <!-- 挂牌求购 -->
+  <Drawer :title="isBuy() ? '挂牌求购' : '挂牌卖出' "
+          :placement="'right'"
+          :visible="visible"
+          @cancel="cancel"
+          class="top">
+    <div class="title_right">
+      <span class="tline"></span>
+      <svg class="icon svg-icon"
+           aria-hidden="true">
+        <use xlink:href="#icon-B" />
+      </svg>
+      <span @click="changeDirection">{{isBuy() ? '卖出' : '求购'}}</span>
+    </div>
+    <div class="post_buying">
+      <a-form class="inlineForm dialogForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <div class="formBar">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户"
+                           name="accountid">
+                <a-select class="inlineFormSelect"
+                          style="width: 260px"
+                          v-model:value="formState.accountid"
+                          placeholder="请选择">
+                  <a-select-option v-for="item in accountList"
+                                   :value="item.accountid"
+                                   :key="item.accountid">{{item.accountid}}</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="价格类型"
+                           name>
+                <a-radio-group class="commonRadioGroup"
+                               v-model:value="formState.priceType">
+                  <a-radio :value="2">固定价</a-radio>
+                  <!-- 掉期交易商有固定价和浮动价选择 -->
+                  <!-- 普通交易商只有固定价 -->
+                  <a-radio :value="3"
+                           v-if="!useUserType()">浮动价</a-radio>
+                </a-radio-group>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="!isFloat()">
+              <a-form-item label="挂牌价格"
+                           name="FixedPrice"
+                           class="inputIconBox">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                v-model:value="formState.FixedPrice" />
+                <MinusOutlined @click="decreasePrice" />
+                <PlusOutlined @click="increasePrice" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-else>
+              <a-form-item label="基差"
+                           name="PriceMove">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                v-model:value="formState.PriceMove" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="isFloat()">
+              <a-form-item label="估算价"
+                           name="PriceMove">
+                <span class="white">{{getFloatPrice()}}</span>
+              </a-form-item>
+            </a-col>
 
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量" name="OrderQty" class="inputIconBox">
-                                <a-input-number
-                                    class="commonInput"
-                                    style="width: 260px"
-                                    :min="0"
-                                    :max="getMaxNum()"
-                                    v-model:value="formState.OrderQty"
-                                />
-                                <MinusOutlined @click="increaseNum" />
-                                <PlusOutlined @click="decreaseNum" />
-                                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="mt-10">
-                            <a-form-item>
-                                <a-slider
-                                    :min="0"
-                                    v-model:value="formState.OrderQty"
-                                    :max="getMaxNum()"
-                                    class="formSlider"
-                                />
-                                <div class="unit">
-                                    <span>{{getMaxNum() ? selectedRow.minivalue : 0}}</span>
-                                    <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="relative mt20">
-                            <a-form-item :label="'挂牌金额'">
-                                <span class="white ml8">{{getMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" v-if="getMargin()">
-                            <a-form-item :label="'履约保证金'">
-                                <span class="white ml8">{{getMargin()}}</span>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="可用资金">
-                                <span class="white ml8">{{canUseMoney()}}</span>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
+            <a-col :span="24">
+              <a-form-item label="挂牌数量"
+                           name="OrderQty"
+                           class="inputIconBox">
+                <a-input-number class="commonInput"
+                                style="width: 260px"
+                                :min="0"
+                                :max="getMaxNum()"
+                                v-model:value="formState.OrderQty" />
+                <MinusOutlined @click="increaseNum" />
+                <PlusOutlined @click="decreaseNum" />
+                <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="mt-10">
+              <a-form-item>
+                <a-slider :min="0"
+                          v-model:value="formState.OrderQty"
+                          :max="getMaxNum()"
+                          class="formSlider" />
+                <div class="unit">
+                  <span>{{getMaxNum() ? selectedRow.minivalue : 0}}</span>
+                  <span>{{getMaxNum()}}{{selectedRow.enumdicname}}</span>
                 </div>
-                <a-row :gutter="24">
-                    <a-col :span="24" class="fixedBtns">
-                        <a-form-item class="btnCenter">
-                            <a-button class="listedBtn" @click="submit">{{isBuy() ? '买入' : '卖出'}}</a-button>
-                            <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="relative mt20">
+              <a-form-item :label="'挂牌金额'">
+                <span class="white ml8">{{getMoney()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   v-if="getMargin()">
+              <a-form-item :label="'履约保证金'">
+                <span class="white ml8">{{getMargin()}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="可用资金">
+                <span class="white ml8">{{canUseMoney()}}</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
         </div>
-    </Drawer>
+        <a-row :gutter="24">
+          <a-col :span="24"
+                 class="fixedBtns">
+            <a-form-item class="btnCenter">
+              <a-button class="listedBtn"
+                        @click="submit">{{isBuy() ? '买入' : '卖出'}}</a-button>
+              <a-button class="ml10 cancelBtn"
+                        @click="cancel">取消</a-button>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">
@@ -191,9 +197,9 @@ export default defineComponent({
         };
         const { getFloatPrice, getListingBuyMaxNum, getListingSellMaxNum, getListingBuyMargin, getListingSellMargin, getMoney } = useListingTradeNumAndPrice<FormParam>(param);
         // 保证金
-        const getMargin = isBuy() ? getListingBuyMargin : getListingSellMargin;
+        const getMargin = isBuy() ? getListingBuyMargin : getListingBuyMargin;
         // 最大数量
-        const getMaxNum = isBuy() ? getListingBuyMaxNum : getListingSellMaxNum;
+        const getMaxNum = isBuy() ? getListingBuyMaxNum : getListingBuyMaxNum;
 
         function submit() {
             validateAction<FormParam>(formRef, formState).then((res) => {

+ 56 - 48
src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/index.vue

@@ -1,47 +1,56 @@
 <template>
-    <!-- 商品合约 议价单 撤单 -->
-    <a-modal
-        class="commonModal reasonModal"
-        title="原因"
-        v-model:visible="visible"
-        centered
-        :maskClosable="false"
-    >
-        <template #footer>
-            <a-button key="submit" class="cancelBtn">取消</a-button>
-            <a-button key="submit" type="primary" :loading="loading">提交</a-button>
-        </template>
-        <a-form class="inlineForm" ref="formRef">
-            <a-row :gutter="24">
-                <a-col :span="24">
-                    <a-form-item label="原因" class="relative" name="Remark">
-                        <a-textarea
-                            class="dialogInput"
-                            style="width: 100%"
-                            placeholder="请输入原因"
-                            readonly
-                            :autosize="{ minRows: 8, maxRows: 24 }"
-                        />
-                    </a-form-item>
-                </a-col>
-            </a-row>
-        </a-form>
-    </a-modal>
+  <!-- 商品合约 议价单 撤单 -->
+  <a-modal class="commonModal reasonModal"
+           title="原因"
+           v-model:visible="visible"
+           centered
+           @click="cancel"
+           :maskClosable="false">
+    <template #footer>
+      <a-button key="submit"
+                @click="cancel"
+                class="cancelBtn">取消</a-button>
+      <a-button key="submit"
+                type="primary"
+                @click="submit">提交</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="24">
+          <a-form-item label="原因"
+                       class="relative"
+                       name="AuditRemark">
+            <a-textarea class="dialogInput"
+                        style="width: 100%"
+                        placeholder="请输入原因"
+                        v-model:value="formState.AuditRemark"
+                        readonly
+                        :autosize="{ minRows: 8, maxRows: 24 }" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
 import Drawer from '@/common/components/drawer/index.vue';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { validateAction } from '@/common/setup/form/validateAction';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { geLoginID_number } from '@/services/bus/login';
 import { QueryTjmdTransferApplyRsp } from '@/services/go/Tjmd/interface';
 import { tradeHoldTransferApplyAuditReq } from '@/services/proto/warehousetrade';
 import { TradeHoldTransferApplyAuditReqType } from '@/services/proto/warehousetrade/interface';
-import { Modal } from 'ant-design-vue';
 import { defineComponent, PropType, ref } from 'vue';
+import { FormState } from './interface';
+import { handleForm } from './setup';
 
 export default defineComponent({
-    name: 'commodity_contract_bargain_cancel_order',
+    name: 'commodity_contract_bargain_refuse_order',
     components: { Drawer },
     emits: ['cancel', 'update'],
     props: {
@@ -53,31 +62,30 @@ export default defineComponent({
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
-
+        const { rules, formState, formRef } = handleForm();
         function submit() {
-            const param: TradeHoldTransferApplyAuditReqType = {
-                ApplyID: props.selectedRow.applyid,
-                ApplyStatus: 1, // 1:撤销2:拒绝3:通过
-                AuditSrc: 2,
-                AuditorID: geLoginID_number()!.toString(),
-                AuditRemark: '',
-            };
-            requestResultLoadingAndInfo(tradeHoldTransferApplyAuditReq, param, loading, ['撤单成功', '撤单失败:']).then(() => {
-                // Bus.$emit('spotTrade', true);
-                cancel(true);
+            validateAction<FormState>(formRef, formState).then((res) => {
+                const param: TradeHoldTransferApplyAuditReqType = {
+                    ApplyID: props.selectedRow.applyid,
+                    ApplyStatus: 2, // 1:撤销2:拒绝3:通过
+                    AuditSrc: 2,
+                    AuditorID: geLoginID_number()!.toString(),
+                    AuditRemark: res.AuditRemark,
+                };
+                requestResultLoadingAndInfo(tradeHoldTransferApplyAuditReq, param, loading, ['撤单成功', '撤单失败:']).then(() => {
+                    // Bus.$emit('spotTrade', true);
+                    cancel(true);
+                });
             });
         }
 
-        Modal.confirm({
-            title: '撤单',
-            content: '是否确认撤单!',
-            onOk: submit,
-            onCancel: cancel,
-        });
-
         return {
             visible,
             cancel,
+            submit,
+            rules,
+            formState,
+            formRef,
         };
     },
 });

+ 4 - 0
src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/interface.ts

@@ -0,0 +1,4 @@
+
+export interface FormState {
+    AuditRemark: string,
+}

+ 15 - 0
src/views/order/commodity_contract/components/commodity_contract_bargain/components/commodity_contract_bargain_refuse_order/setup.ts

@@ -0,0 +1,15 @@
+import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from "./interface";
+
+export function handleForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        AuditRemark: '',
+    })
+    const rules = {
+        AuditRemark: [
+            { require, message: '请输入拒绝原因', trigger: 'blur', },
+        ],
+    }
+    return { rules, formState, formRef }
+}

+ 2 - 2
src/views/order/commodity_contract/components/commodity_contract_bargain/index.vue

@@ -23,7 +23,7 @@
       <template #applytime="{ text }">
         <span>{{ formatTime(text) }}</span>
       </template>
-      <template #transferamount="{ record }">
+      <template #transferamount="{ record , text}">
         <div>
           <!-- 审核拒绝 -->
           <a-tooltip placement="bottom"
@@ -87,7 +87,7 @@ export default defineComponent({
         BtnList,
         commodity_contract_bargain_submit_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_submit_order/index.vue')),
         commodity_contract_bargain_cancel_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_cancel_order/index.vue')),
-        // commodity_contract_summary_deal_closed: defineAsyncComponent(() => import('./components/commodity_contract_summary_deal_closed/index.vue')),
+        commodity_contract_bargain_refuse_order: defineAsyncComponent(() => import('./components/commodity_contract_bargain_refuse_order/index.vue')),
     },
     setup() {
         // 类型 1-我的申请 2-对方申请

+ 40 - 45
src/views/order/commodity_contract/components/commodity_contract_commission/index.vue

@@ -1,48 +1,43 @@
 <template>
-    <!-- 商品订单 - 委托 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <!-- 类型 -->
-            <template #buildtype="{ record }">
-                <a>{{ getBuildTypeName(record.buildtype) }}</a>
-            </template>
-            <!-- 状态 -->
-            <template #orderstatus="{ record }">
-                <a>{{ getOrderStatusName(record.orderstatus) }}</a>
-            </template>
+  <!-- 商品订单 - 委托 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable expandLeftTable"
+             :scroll="{ x: '100%', y: '190px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :expandIcon="expandIcon"
+             :expandIconAsCell="false"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
+      </template>
+      <!-- 类型 -->
+      <template #buildtype="{ record }">
+        <a>{{ getBuyOrSellTypeName(record.buyorsell) }}</a>
+      </template>
+      <!-- 状态 -->
+      <template #orderstatus="{ record }">
+        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      </template>
 
-            <template #createtime="{ record }">
-                <a>{{ formatTime(record.createtime) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
@@ -56,7 +51,7 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { queryAmountLog } from '@/services/go/TaAccount';
 import { QueryAmountLogReq } from '@/services/go/TaAccount/interface';
 import { getSelectedAccountId } from '@/services/bus/account';
-import { getBuildTypeName, getOperateTypeEnumItemName, getOperateTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { getBuyOrSellTypeName, getOperateTypeEnumItemName, getOperateTypeName, getOrderStatusName } from '@/common/constants/enumsName';
 import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
@@ -87,7 +82,7 @@ export default defineComponent({
             tableList,
             formatTime,
             expandIcon,
-            getBuildTypeName,
+            getBuyOrSellTypeName,
             getOrderStatusName,
         };
     },

+ 43 - 53
src/views/order/commodity_contract/components/commodity_contract_make_deal/index.vue

@@ -1,64 +1,53 @@
 <template>
-    <!-- 商品订单 - 成交 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="btnList"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <!-- 类型 -->
-            <template #buildtype="{ record }">
-                <a>{{ getBuildTypeName(record.buildtype) }}</a>
-            </template>
-            <!-- 状态 -->
-            <template #orderstatus="{ record }">
-                <a>{{ getOrderStatusName(record.orderstatus) }}</a>
-            </template>
-            <template #createtime="{ record }">
-                <a>{{ formatTime(record.createtime) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 商品订单 - 成交 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable expandLeftTable"
+             :scroll="{ x: '100%', y: '190px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :expandIcon="expandIcon"
+             :expandIconAsCell="false"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
+      </template>
+      <!-- 类型 -->
+      <template #buyorsell="{ text }">
+        <span>{{ getBuyOrSellTypeName(text) }}</span>
+      </template>
+      <!-- 状态 -->
+      <template #orderstatus="{ record }">
+        <a>{{ getOrderStatusName(record.orderstatus) }}</a>
+      </template>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-import { queryTableList, BtnList, defineAsyncComponent, defineComponent } from '@/common/export/commonTable';
-import { QueryPerformancePlan, queryWrTradeDetail } from '@/services/go/wrtrade';
-import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrade/interface';
+import { getBuildTypeName, getBuyOrSellTypeName, getOrderStatusName } from '@/common/constants/enumsName';
+import { BtnList, defineComponent, queryTableList } from '@/common/export/commonTable';
+import { formatTime } from '@/common/methods';
 import { getRecordItemTab } from '@/common/setup/order/orderData';
+import { expandIcon } from '@/common/setup/table/clolumn';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
-import { queryAmountLog } from '@/services/go/TaAccount';
-import { QueryAmountLogReq } from '@/services/go/TaAccount/interface';
-import { getSelectedAccountId } from '@/services/bus/account';
-import { getBuildTypeName, getOperateTypeEnumItemName, getOperateTypeName, getOrderStatusName } from '@/common/constants/enumsName';
-import { formatTime } from '@/common/methods';
-import Bus from '@/utils/eventBus/index';
-import { expandIcon } from '@/common/setup/table/clolumn';
 import { queryTradeDetail } from '@/services/go/ermcp/order';
 import { QueryTradeDetailRsp } from '@/services/go/ermcp/order/interface';
 
@@ -88,6 +77,7 @@ export default defineComponent({
             expandIcon,
             getBuildTypeName,
             getOrderStatusName,
+            getBuyOrSellTypeName,
         };
     },
 });

+ 3 - 39
src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_deal_closed/index.vue

@@ -20,44 +20,6 @@
               <div class="middle">数量/价格/金额</div>
               <div class="right">到期日/盈亏</div>
             </div>
-            <!-- <a-checkbox-group class="commonCheckboxGroup"
-                              v-model:value="checked"
-                              @change="checkGroupChange">
-              <div class="lineBar"
-                   v-for="(item, index) in tableList"
-                   :key="index + '11'">
-                <div class="line1">
-                  <div class>
-                    <a-checkbox @change="checkboxChange(item)"
-                                :value="item.tradeid"></a-checkbox>
-                  </div>
-                  <div class="name">{{item.username}}</div>
-                </div>
-                <div class="line2">
-                  <div class="left">
-                    <div>{{item.wrtypename}}</div>
-                    <div>{{item.warehousename}}</div>
-                  </div>
-                  <div class="middle">
-                    <div>{{item.pricemove}}</div>
-                    <div>{{toFixed0(item.avalidqty)}}{{item.enumdicname}}</div>
-                  </div>
-                  <div class="right">
-                    <template class="inputNumberBlock"
-                              :class="isChecked(item.ladingbillid) ? '' : 'disabled'">
-                      <a-input-number class="dialogInput dialogInput34"
-                                      v-model:value="item.num"
-                                      style="width: 130px !important; height: 34px;"
-                                      :disabled="!isChecked(item.ladingbillid)"
-                                      :max="toFixed0(item.avalidqty)"
-                                      :min="0"></a-input-number>
-                      <MinusOutlined @click="decrease(item)" />
-                      <PlusOutlined @click="increase(item)" />
-                    </template>
-                  </div>
-                </div>
-              </div>
-                        </a-checkbox-group>-->
             <a-checkbox-group class="commonCheckboxGroup"
                               v-model:value="checked"
                               @change="checkGroupChange">
@@ -70,7 +32,7 @@
                                 :value="item.tradeid"></a-checkbox>
                   </div>
                   <div class="name">{{item.tradeid}}</div>
-                  <div class="date">{{item.tradetime}}</div>
+                  <div class="date">{{formatTime(item.tradetime, 'd')}}</div>
                 </div>
                 <div class="line2">
                   <div class="left">{{item.buyorsell === BuyOrSell.buy ? '买入' : '卖出'}}</div>
@@ -143,6 +105,7 @@ import Long from 'long';
 import { defineComponent, PropType } from 'vue';
 import { BargainList, FormState } from './interface';
 import { handleForm, useCheckd, usePrice } from './setup';
+import { formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: ModalEnum.commodity_contract_summary_settlement,
@@ -221,6 +184,7 @@ export default defineComponent({
             checkGroupChange,
             checkboxChange,
             BuyOrSell,
+            formatTime,
         };
     },
 });

+ 1 - 0
src/views/order/commodity_contract/components/commodity_contract_summary/components/commodity_contract_summary_settlement/index.vue

@@ -11,6 +11,7 @@
         <div class="formBar">
           <div class="formtop">
             <div class="firstTitle">
+              <span>合约 {{selectedRow.goodscode}}&nbsp;&nbsp;</span>
               <span>合约数量 {{selectedRow.enableqty}}&nbsp;&nbsp;</span>
               <span>可交收数量 {{getCanSettlementNum()}} {{selectedRow.goodunit}}</span>
             </div>

+ 1 - 1
src/views/order/commodity_contract/components/commodity_contract_summary/index.vue

@@ -96,7 +96,7 @@ export default defineComponent({
             let result = '';
             if (item) {
                 const { last, presettle } = item;
-                if (last) {
+                if (last && ((last as unknown) as string) !== '--') {
                     result = last.toFixed(decimalplace); // 最新
                 } else if (presettle) {
                     result = presettle.toFixed(decimalplace); // 昨结

+ 46 - 52
src/views/order/financing_manager/components/financing_manager_apply_order/index.vue

@@ -1,58 +1,52 @@
 <template>
-    <!-- 申请单 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="handleBtnList(btnList, record)"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <!-- 类型 -->
-            <template #financetype="{ record }">
-                <a>{{ getFinanceTypeName(record.financetype) }}</a>
-            </template>
+  <!-- 申请单 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable expandLeftTable"
+             :scroll="{ x: '100%', y: '190px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :expandIcon="expandIcon"
+             :expandIconAsCell="false"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(btnList, record)"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
+      </template>
+      <!-- 类型 -->
+      <template #financetype="{ record }">
+        <a>{{ getFinanceTypeName(record.financetype) }}</a>
+      </template>
 
-            <!-- 状态 -->
-            <template #applystatus="{ text }">
-                <a>{{ getApplyStatusFinanceName(text) }}</a>
-            </template>
+      <!-- 状态 -->
+      <template #applystatus="{ text }">
+        <a>{{ getApplyStatusFinanceName(text) }}</a>
+      </template>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
+      </template>
 
-            <template #createtime="{ record }">
-                <a>{{ formatTime(record.createtime) }}</a>
-            </template>
-
-            <!-- 结算方式 1:按日结息 3:按月结息-->
-            <template #interestsettlemode="{ record }">
-                <a>{{ getInterestSettleModeName(record.interestsettlemode) }}</a>
-            </template>
-            <!-- 费用 -->
-            <template #interestsettlevalue="{ record }">
-                <a>{{ getInterestrateModeName(record.interestratemode, record.interestrate) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <!-- 结算方式 1:按日结息 3:按月结息-->
+      <template #interestsettlemode="{ record }">
+        <a>{{ getInterestSettleModeName(record.interestsettlemode) }}</a>
+      </template>
+      <!-- 费用 -->
+      <template #interestsettlevalue="{ record }">
+        <a>{{ getInterestrateModeName(record.interestratemode, record.interestrate) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 41 - 47
src/views/order/financing_manager/components/financing_manager_contract/index.vue

@@ -1,51 +1,45 @@
 <template>
-    <!-- 合同 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '190px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            :expandIcon="expandIcon"
-            :expandIconAsCell="false"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template v-if="btnList.length" #expandedRowRender="{ record }">
-                <BtnList
-                    :btnList="handleBtnList(btnList, record)"
-                    :record="record"
-                    class="btn-list-sticky"
-                    @click="openComponent"
-                />
-            </template>
-            <!-- 类型 -->
-            <template #financetype="{ record }">
-                <a>{{ getFinanceTypeName(record.financetype) }}</a>
-            </template>
-
-            <!-- 状态 -->
-            <template #scfcontractstatus="{ text }">
-                <a>{{ getContractName(text) }}</a>
-            </template>
-            <template #createtime="{ record }">
-                <a>{{ formatTime(record.createtime) }}</a>
-            </template>
-            <template #scfcontracttype="{ record }">
-                <a>{{ getScfContractTypeName(record.scfcontracttype) }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 合同 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable expandLeftTable"
+             :scroll="{ x: '100%', y: '190px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             :expandIcon="expandIcon"
+             :expandIconAsCell="false"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="handleBtnList(btnList, record)"
+                 :record="record"
+                 class="btn-list-sticky"
+                 @click="openComponent" />
+      </template>
+      <!-- 类型 -->
+      <template #financetype="{ record }">
+        <a>{{ getFinanceTypeName(record.financetype) }}</a>
+      </template>
+      <!-- 状态 -->
+      <template #scfcontractstatus="{ text }">
+        <a>{{ getContractName(text) }}</a>
+      </template>
+      <template #createtime="{ record }">
+        <a>{{ formatTime(record.createtime) }}</a>
+      </template>
+      <template #scfcontracttype="{ record }">
+        <a>{{ getScfContractTypeName(record.scfcontracttype) }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 4 - 3
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/index.vue

@@ -90,7 +90,7 @@
                                 v-model:value="formState.DelistMinQty"
                                 style="width: 140px !important" />
                 <span class="input-enumdicname">{{selectedRow.enumdicname}}</span>
-                <div class="tip">最小单位:1{{selectedRow.enumdicname}}</div>
+                <div class="tip">最小单位:{{selectedRow.minivalue}}{{selectedRow.enumdicname}}</div>
               </a-form-item>
             </a-col>
           </a-row>
@@ -358,8 +358,8 @@ export default defineComponent({
                 // 无仓单挂牌
                 validateAction<ListingForm>(formRef, formState).then((res) => {
                     const wrGoodsInfo: WRGoodsInfo = {
-                        GoodsID: res.goodsid as number, // uint32 配置商品ID
-                        GoodsCode: findGoodsCode(res.goodsid as number) as string, // string 配置商品代码
+                        GoodsID: props.selectedRow.deliverygoodsid as number, // uint32 配置商品ID
+                        GoodsCode: props.selectedRow.deliverygoodscode, // string 配置商品代码
                         PriceFactor: 1, // double 商品价格系数
                         PriceMove: 0, // double 商品升贴水值
                         WeightRatio: 1, // double 商品重量系数
@@ -420,6 +420,7 @@ export default defineComponent({
                             }
                         }
                         const obj = {
+                            IsSpecified: 1,
                             MatchAccIDs: res.friends,
                             WRPriceType: 1,
                             TimevalidType: 3, // 时间有效类型 1:当日有效 2:本周有效 3:指定时间有效 4:一直有效

+ 26 - 20
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_order_summary/components/listed/setup.ts

@@ -7,26 +7,30 @@ import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
 import { WrPosition } from "@/services/go/wrtrade/interface";
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
 import moment from 'moment';
-import { reactive, ref, UnwrapRef } from "vue";
+import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";
 
-const formState: UnwrapRef<ListingForm> = reactive({
-    WRPriceType: 1,
-    FixedPrice: 0,
-    OrderQty: 0,
-    DelistMinQty: 0,
-    PriceMove: 1,
-    goodsgroupid: undefined,
-    goodsid: undefined,
-    accountid: undefined,
-    delistingQty: 0,
-    margin: 0,
-    DeliveryMonth: moment(),
-    vidaliteTime: moment(),
-    friends: [],
-    permanceTempName: '',
-    permaceTempId: 0,
-})
+function initFormData(): ListingForm {
+    return {
+        WRPriceType: 1,
+        FixedPrice: 0,
+        OrderQty: 0,
+        DelistMinQty: 0,
+        PriceMove: 1,
+        goodsgroupid: undefined,
+        goodsid: undefined,
+        accountid: undefined,
+        delistingQty: 0,
+        margin: 0,
+        DeliveryMonth: moment(),
+        vidaliteTime: moment(),
+        friends: [],
+        permanceTempName: '',
+        permaceTempId: 0,
+    }
+}
+
+const formState: UnwrapRef<ListingForm> = reactive(initFormData())
 export function handleForm(data: WrPosition) {
     const { rules, formRef } = useForm();
 
@@ -58,7 +62,9 @@ export function handleForm(data: WrPosition) {
 
     }
     Object.assign(rules, rule)
-
+    onBeforeUnmount(() => {
+        Object.assign(formState, initFormData())
+    })
     return { rules, formState, formRef }
 }
 
@@ -120,4 +126,4 @@ export function handleNumAndPrice() {
 
     }
     return { getWrMoney, getWrMargin, isFloat, isFixed, isBlocs }
-}
+}

+ 25 - 20
src/views/order/spot_warran/components/spot_warrant_spot_details/components/listing/setup.ts

@@ -7,27 +7,30 @@ import { Goods } from "@/services/go/ermcp/goodsInfo/interface";
 import { WrHoldLB } from "@/services/go/wrtrade/interface";
 import { RuleObject } from 'ant-design-vue/lib/form/interface';
 import moment from 'moment';
-import { reactive, ref, UnwrapRef } from "vue";
+import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
 import { ListingForm } from "./interface";
 
+function initFormData(): ListingForm {
+    return {
+        WRPriceType: 1,
+        FixedPrice: 0,
+        OrderQty: 0,
+        DelistMinQty: 0,
+        PriceMove: 1,
+        goodsgroupid: undefined,
+        goodsid: undefined,
+        accountid: undefined,
+        delistingQty: 0,
+        margin: 0,
+        DeliveryMonth: moment(),
+        vidaliteTime: moment(),
+        friends: [],
+        permanceTempName: '',
+        permaceTempId: 0,
+    }
+}
 
-const formState: UnwrapRef<ListingForm> = reactive({
-    WRPriceType: 1,
-    FixedPrice: 0,
-    OrderQty: 0,
-    DelistMinQty: 0,
-    PriceMove: 1,
-    goodsgroupid: undefined,
-    goodsid: undefined,
-    accountid: undefined,
-    delistingQty: 0,
-    margin: 0,
-    DeliveryMonth: moment(),
-    vidaliteTime: moment(),
-    friends: [],
-    permanceTempName: '',
-    permaceTempId: 0,
-})
+const formState: UnwrapRef<ListingForm> = reactive(initFormData())
 
 export function handleForm(data: WrHoldLB) {
     const { rules, formRef } = useForm();
@@ -53,13 +56,15 @@ export function handleForm(data: WrHoldLB) {
 
     const rule = {
         FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', min: 1, }],
-        DelistMinQty: [{ required: true, message: '请输入起摘数量', trigger: 'blur', type: 'number', min: 0, }],
+        DelistMinQty: [{ required: true, message: '请输入起摘数量', trigger: 'blur', type: 'number', min: 1, }],
         OrderQty: [{ required: true, validator: v_num, trigger: 'blur', type: 'number' }],
         PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur', type: 'number', }],
         goodsid: [{ required: true, validator: v_group, }],
     }
     Object.assign(rules, rule)
-
+    onBeforeUnmount(() => {
+        Object.assign(formState, initFormData())
+    })
     return { rules, formState, formRef }
 }
 

+ 8 - 2
src/views/setting/friends/index.vue

@@ -99,10 +99,12 @@ export default defineComponent({
             loading.value = true;
             queryQueryWrFriend(value)
                 .then((res) => {
-                    if (!value) {
+                    if (value) {
+                        searchFriend.value = [...searchFriend.value, ...res];
+                    } else {
                         myFriends.value = res; // 我的朋友
+                        searchFriend.value = res;
                     }
-                    searchFriend.value = res;
                 })
                 .catch((err: string) => message.error(err))
                 .finally(() => {
@@ -114,6 +116,10 @@ export default defineComponent({
                 const findResult = myFriends.value.filter((e) => String(e.frienduserid).includes(value));
                 if (findResult.length) {
                     searchFriend.value = findResult;
+                    // fix:#1191 搜索好友时,输入的数字包含在已有好友中时,会无法精确匹配到未添加的用户
+                    if (!findResult.find((e) => e.frienduserid.toString() === value)) {
+                        queryMyFriend(value);
+                    }
                 } else {
                     queryMyFriend(value);
                 }