huangbin 4 年 前
コミット
f80876dde7

+ 14 - 7
src/views/market/spot_trade/components/detail/index.vue

@@ -1,9 +1,12 @@
 <template>
-    <!-- 详情 -->
-    <Drawer :title="'详情'" :placement="'top'" :visible="visible">
-        <!-- 挂牌 -->
-        详情
-    </Drawer>
+  <!-- 详情 -->
+  <Drawer :title="'详情'"
+          :placement="'top'"
+          :visible="visible"
+          @cancel="cancel">
+    <!-- 挂牌 -->
+    详情
+  </Drawer>
 </template>
 
 <script lang="ts">
@@ -17,25 +20,29 @@ import { hdWROrder } from '@/services/proto/warehousetrade';
 import { v4 as uuidv4 } from 'uuid';
 import moment from 'moment';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
+import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_delisting,
     components: { Drawer },
+    emits: ['cancel'],
     props: {
         selectedRow: {
             type: Object as PropType<WrPosition>,
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const data = props.selectedRow;
         const loading = ref<boolean>(false);
+        const { visible, cancel } = _closeModal(context);
         // console.log(param);
         // requestResultLoadingAndInfo(hdWROrder, param, loading, ['挂牌成功', '挂牌失败:']).then(() => {
         //     // cancel(true);
         // });
         return {
-            visible: true,
+            visible,
+            cancel,
         };
     },
 });

+ 86 - 77
src/views/market/spot_trade/components/post_buying/index.vue

@@ -1,80 +1,89 @@
 <template>
-    <!-- 发布求购 -->
-    <Drawer :title="'发布求购'" :placement="'top'" :visible="visible" width="486px" height="420px">
-        <div class="post_buying">
-            <div class="formBar">
-                <a-form class="inlineForm dialogForm" :form="form">
-                    <a-row :gutter="24">
-                        <a-col :span="24">
-                            <a-form-item label="交易账户">
-                                <a-select
-                                    class="inlineFormSelect"
-                                    default-value="1"
-                                    style="width: 260px"
-                                >
-                                    <a-select-option value="1">2647247233 周星星</a-select-option>
-                                </a-select>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="基   差">
-                                <a-input class="commonInput stepper" style="width: 260px" />
-                                <div class="minusBtn">
-                                    <MinusOutlined />
-                                </div>
-                                <div class="plusBtn">
-                                    <PlusOutlined />
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="挂牌数量">
-                                <a-input
-                                    class="commonInput stepper"
-                                    suffix="吨"
-                                    style="width: 260px"
-                                />
-                                <div class="minusBtn">
-                                    <MinusOutlined />
-                                </div>
-                                <div class="plusBtn">
-                                    <PlusOutlined />
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24" class="mt-10">
-                            <a-form-item>
-                                <a-progress
-                                    class="formProgress"
-                                    :percent="30"
-                                    style="width: 260px;"
-                                />
-                                <div class="unit">
-                                    <span>0</span>
-                                    <span>80吨</span>
-                                </div>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :span="24">
-                            <a-form-item label="起摘数量" class="relative">
-                                <a-input class="commonInput" suffix="吨" style="width: 260px" />
-                                <div class="tip">最小单位:1吨</div>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                    <a-row :gutter="24" type="flex" justify="center">
-                        <a-col :span="24" class="mt20">
-                            <a-form-item class="tc">
-                                <a-button class="listedBtn">买入</a-button>
-                                <a-button class="listedBtn ml10">融资买入</a-button>
-                                <a-button class="ml10 cancelBtn">取消</a-button>
-                            </a-form-item>
-                        </a-col>
-                    </a-row>
-                </a-form>
-            </div>
-        </div>
-    </Drawer>
+  <!-- 发布求购 -->
+  <Drawer :title="'发布求购'"
+          :placement="'top'"
+          :visible="visible"
+          @cancel="cancel"
+          width="486px"
+          height="420px">
+    <div class="post_buying">
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                :form="form">
+          <a-row :gutter="24">
+            <a-col :span="24">
+              <a-form-item label="交易账户">
+                <a-select class="inlineFormSelect"
+                          default-value="1"
+                          style="width: 260px">
+                  <a-select-option value="1">2647247233 周星星</a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="基   差">
+                <a-input class="commonInput stepper"
+                         style="width: 260px" />
+                <div class="minusBtn">
+                  <MinusOutlined />
+                </div>
+                <div class="plusBtn">
+                  <PlusOutlined />
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="挂牌数量">
+                <a-input class="commonInput stepper"
+                         suffix="吨"
+                         style="width: 260px" />
+                <div class="minusBtn">
+                  <MinusOutlined />
+                </div>
+                <div class="plusBtn">
+                  <PlusOutlined />
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24"
+                   class="mt-10">
+              <a-form-item>
+                <a-progress class="formProgress"
+                            :percent="30"
+                            style="width: 260px;" />
+                <div class="unit">
+                  <span>0</span>
+                  <span>80吨</span>
+                </div>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="起摘数量"
+                           class="relative">
+                <a-input class="commonInput"
+                         suffix="吨"
+                         style="width: 260px" />
+                <div class="tip">最小单位:1吨</div>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24"
+                   class="mt20">
+              <a-form-item class="tc">
+                <a-button class="listedBtn">买入</a-button>
+                <a-button class="listedBtn ml10">融资买入</a-button>
+                <a-button class="ml10 cancelBtn"
+                          @click="cancel">取消</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">
@@ -100,7 +109,7 @@ export default defineComponent({
         const { visible, cancel } = _closeModal(context);
         return {
             cancel,
-            visible: true,
+            visible,
         };
     },
 });

+ 2 - 1
src/views/order/spot_warran/components/spot_warrant_spot_details/components/pick_up/index.vue

@@ -73,7 +73,8 @@
             <a-col :span="24">
               <a-form-item class="tc">
                 <a-button class="listedBtn">提货</a-button>
-                <a-button class="ml10 cancelBtn">取消</a-button>
+                <a-button class="ml10 cancelBtn"
+                          @click="cancel">取消</a-button>
               </a-form-item>
             </a-col>
           </a-row>