Explorar o código

commit 仓单预售

yu jie %!s(int64=4) %!d(string=hai) anos
pai
achega
b62d1c9907

+ 118 - 1
src/views/market/spot_trade/components/buy-sell-market/components/delisting/index.vue

@@ -1,4 +1,121 @@
 <template>
+    <!-- 仓单贸易&仓单预售 买/卖 摘牌 -->
+    <Drawer
+        :title="'摘牌'"
+        :placement="'top'"
+        :visible="visible"
+        width="486px"
+        height="479px"
+        @cancel="cancel"
+        class="top"
+    >
+        <div class="delisting">
+            <div class="formBar">
+                <a-form
+                    class="inlineForm dialogForm"
+                    ref="formRef"
+                    :model="formState"
+                    :rules="rules"
+                >
+                    <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">{{selectedRow.username}}</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :span="24">
+                            <a-form-item label="挂牌价格">
+                                <span class="yellow">{{selectedRow.fixedprice}}</span>
+                            </a-form-item>
+                            <a-row :gutter="24">
+                                <a-col :span="24"></a-col>
+                            </a-row>
+                            <a-form-item label="挂牌数量">
+                                <span class="white">{{selectedRow.orderqty}}吨</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :span="24">
+                            <a-form-item label="现货仓单" name>
+                                <a-select
+                                    class="inlineFormSelect"
+                                    style="width: 260px"
+                                    placeholder="请选择"
+                                >
+                                    <a-select-option value="8271930000-01(120吨)">8271930000-01(120吨)</a-select-option>
+                                </a-select>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :span="24">
+                            <a-form-item label="摘牌数量" name="num">
+                                <a-input-number
+                                    class="dialogInput"
+                                    style="width: 260px"
+                                    v-model:value="formState.num"
+                                    suffix="吨"
+                                />
+                            </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"
+                                />
+                                <div class="unit">
+                                    <span>1</span>
+                                    <span>{{selectedRow.orderqty}}</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">50400.00</span>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :span="24">
+                            <a-form-item class="tc">
+                                <a-button class="listedBtn" @click="submit">卖出</a-button>
+                                <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
+                            </a-form-item>
+                        </a-col>
+                    </a-row>
+                </a-form>
+            </div>
+        </div>
+    </Drawer>
   <!-- 仓单贸易  一口价    摘牌 -->
   <Drawer :title="'摘牌'"
           :placement="'top'"
@@ -185,7 +302,7 @@ export default defineComponent({
                     WRFactorTypeId: props.parantSelectedRow.wrfactortypeid, // uint64 仓单要素ID(wrholdlb的WRFactorTypeId字段),卖的时候填写
                     TradeDate: moment().format('YYYYMMDD'), // string 交易日
                     DeliveryMonth: '', // string 交收月
-                    HasWr: 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
+                    HasWr: isSale() ? 0 : 1, // uint32 是否有仓单-0:没有仓单 1:有仓单
                 };
 
                 // 摘买方向