huangbin hace 4 años
padre
commit
09db6f0fee

+ 9 - 5
src/common/components/thirdMenu/index.vue

@@ -1,9 +1,13 @@
 <template>
-    <div class="thirdMenu">
-        <a-tabs v-model:activeKey="current" @change="menuClick">
-            <a-tab-pane :key="String(index)" v-for="(item, index) in list" :tab="item[value]"></a-tab-pane>
-        </a-tabs>
-    </div>
+  <div class="thirdMenu">
+    <a-tabs v-model:activeKey="current"
+            @change="menuClick">
+      <a-tab-pane :key="String(index)"
+                  v-for="(item, index) in list"
+                  :tab="item[value]"></a-tab-pane>
+    </a-tabs>
+    <slot></slot>
+  </div>
 </template>
 
 <script lang="ts">

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

@@ -15,7 +15,7 @@
       <!-- 额外的展开行 -->
       <template v-if="btnList.length"
                 #expandedRowRender="{ record }">
-        <BtnList :btnList="handleBtnList(record, btnList)"
+        <BtnList :btnList="btnList"
                  :record="record"
                  class="btn-list-sticky"
                  @click="openComponent" />
@@ -62,7 +62,6 @@ export default defineComponent({
     setup() {
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<QueryTradePositionRsp>();
-        const { subscribeAction } = handleSubcriteQuote();
         // 交割商品
         handleDeliveryRelation();
         // 获取列表数据

+ 7 - 7
src/views/order/commodity_contract/components/commodity_contract_bargain/setup.ts

@@ -1,9 +1,9 @@
 export const columns = [
-    { title: '订单合约', dataIndex: 'goodsname', key: 'goodsname', align: 'center' },
-    { title: '方向', dataIndex: 'buyorsell', key: 'buyorsell', align: 'center', slots: { customRender: 'buyorsell' } },
-    { title: '协议价', dataIndex: 'transferprice', key: 'transferprice', align: 'center' },
-    { title: '数量', dataIndex: 'qty', key: 'qty', align: 'center', slots: { customRender: 'qty' } },
-    { title: '金额', dataIndex: 'transferamount', key: 'transferamount', align: 'center', slots: { customRender: 'transferamount' } },
-    { title: '状态', dataIndex: 'applystatus', key: 'applystatus', align: 'center', slots: { customRender: 'applystatus' } },
-    { title: '时间', dataIndex: 'applytime', key: 'applytime', align: 'center', slots: { customRender: 'applytime' } },
+    { title: '订单合约', dataIndex: 'goodsname', key: 'goodsname', align: 'center', width: 120 },
+    { title: '方向', dataIndex: 'buyorsell', key: 'buyorsell', align: 'center', width: 120, slots: { customRender: 'buyorsell' } },
+    { title: '协议价', dataIndex: 'transferprice', key: 'transferprice', width: 120, align: 'center' },
+    { title: '数量', dataIndex: 'qty', key: 'qty', align: 'center', width: 120, slots: { customRender: 'qty' } },
+    { title: '金额', dataIndex: 'transferamount', key: 'transferamount', width: 120, align: 'center', slots: { customRender: 'transferamount' } },
+    { title: '状态', dataIndex: 'applystatus', key: 'applystatus', width: 120, align: 'center', slots: { customRender: 'applystatus' } },
+    { title: '时间', dataIndex: 'applytime', key: 'applytime', width: 120, align: 'center', slots: { customRender: 'applytime' } },
 ];

+ 12 - 1
src/views/order/commodity_contract/index.vue

@@ -6,7 +6,13 @@
     </component>
     <thirdMenu :list="tabList"
                @selectMenu="changeTab"
-               :value="'title'"></thirdMenu>
+               :value="'title'">
+      <div class="goods-apply"
+           v-if="componentId === 'commodity_contract_bargain'">
+        <span>我的申请</span>
+        <span>对方申请</span>
+      </div>
+    </thirdMenu>
   </section>
 </template>
 
@@ -33,4 +39,9 @@ export default defineComponent({
 </script>
 
 <style lang="less">
+.goods-apply {
+    position: absolute;
+    bottom: 2px;
+    right: 20px;
+}
 </style>;