瀏覽代碼

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

huangbin 4 年之前
父節點
當前提交
d38a691ce0

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

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

+ 111 - 0
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_deal/components/pre_sale_warehouse_receipt_deal_detail/index.vue

@@ -0,0 +1,111 @@
+<template>
+    <Drawer :title="'详情'" :placement="'right'" class="delistingBottom" :visible="visible" @cancel="cancel">
+        <div class="detail">
+            <div class="detail__body">
+                <a-row v-for="(item, index) in columns" :key="index">
+                    <a-col :span="6">{{ item.columntitle }}</a-col>
+                    <a-col :span="18">{{ handleDetailValue(item.columnfield) }}</a-col>
+                </a-row>
+            </div>
+            <div class="detail__footer">
+                <a-button class="cancelBtn" @click="cancel">取消</a-button>
+            </div>
+        </div>
+    </Drawer>
+</template>
+
+<script lang="ts">
+import Drawer from '@/common/components/drawer/index.vue';
+import { BtnList, ModalEnum } from '@/common/export/commonTable';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { QueryWrTradeBargainApplyQsp, WrOrderDetail } from '@/services/go/wrtrade/interface';
+import { defineComponent, PropType, ref } from 'vue';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { Column } from '@/services/go/commonService/interface';
+import { getTableHead } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
+
+export default defineComponent({
+    name: ModalEnum.spot_warrant_bargain_detail,
+    components: { Drawer, BtnList },
+    emits: ['cancel', 'update'],
+    props: {
+        tableName: Object as PropType<keyof TableKey>,
+        selectedRow: {
+            type: Object as PropType<QueryWrTradeBargainApplyQsp & WrOrderDetail>,
+            default: {},
+        },
+        isMy: {
+            type: Boolean,
+            default: true,
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        const columns = ref<Column[]>([]);
+
+        if (props.tableName) {
+            columns.value = getTableHead(props.tableName);
+        }
+
+        // 处理详情数据
+        const handleDetailValue = (field: keyof typeof props.selectedRow) => {
+            const data = props.selectedRow;
+            // 挂牌类型
+            if (field === 'wrtradetype') {
+                return getWrOrderTypeName(data.buyorsell, data.wrtradetype);
+            }
+            // 成交金额
+            if (field === 'amount') {
+                return data.tradeqty * data.tradeprice;
+            }
+            return data[field];
+        };
+
+        return {
+            visible,
+            columns,
+            cancel,
+            getWrOrderTypeName,
+            handleDetailValue,
+        };
+    },
+});
+</script>
+
+<style lang="less" scoped>
+.detail {
+    [theme='light'] & {
+        --label-color: #7a8a94;
+        --text-color: #333;
+    }
+
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+
+    &__body {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0 25px;
+
+        .ant-row {
+            margin-top: 10px;
+
+            .ant-col {
+                &:first-child {
+                    color: var(--label-color, #7a8a94);
+                }
+                &:last-child {
+                    color: var(--text-color, #fff);
+                }
+            }
+        }
+    }
+
+    &__footer {
+        text-align: center;
+        padding: 20px 0;
+    }
+}
+</style>;

+ 23 - 35
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_deal/index.vue

@@ -1,38 +1,22 @@
 <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 #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 class="btn-list-sticky"
-                 :record="record"
-                 @click="openComponent" />
-      </template>
-      <!-- 成交金额 -->
-      <template #amount="{ record }">
-        <a>{{ record.tradeqty * record.tradeprice }}</a>
-      </template>
-      <!-- 挂牌类型 -->
-      <template #wrtradetype="{ record }">
-        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</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 #expandedRowRender="{ record }">
+                <BtnList :btnList="btnList" class="btn-list-sticky" :record="record" @click="openComponent" />
+            </template>
+            <!-- 成交金额 -->
+            <template #amount="{ record }">
+                <a>{{ record.tradeqty * record.tradeprice }}</a>
+            </template>
+            <!-- 挂牌类型 -->
+            <template #wrtradetype="{ record }">
+                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+            </template>
+        </a-table>
+        <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+    </section>
 </template>
 
 <script lang="ts">
@@ -45,13 +29,16 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { TableKey } from '@/common/methods/table/interface';
 
 export default defineComponent({
     name: enumOrderComponents.pre_sale_warehouse_receipt_deal,
     components: {
         BtnList,
+        pre_sale_warehouse_receipt_deal_detail: defineAsyncComponent(() => import('./components/pre_sale_warehouse_receipt_deal_detail/index.vue')),
     },
     setup() {
+        const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_pre_sale_make_deal';
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
         // 获取列表数据
@@ -63,13 +50,14 @@ export default defineComponent({
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
+            tableName,
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_pre_sale_make_deal',
             recordList: getRecordItemTab(),
         };
         return {
             ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
             loading,
+            tableName,
             tableList,
             expandIcon,
             getWrOrderTypeName,

+ 72 - 66
src/views/order/spot_warran/components/spot_warrant_deal/components/spot_warrant_deal_detail/index.vue

@@ -1,48 +1,38 @@
 <template>
-  <Drawer :title="'详情'"
-          :placement="'right'"
-          class="delistingBottom"
-          :visible="visible"
-          @cancel="cancel">
-    <div>
-      <a-row :gutter="24"
-             type="flex"
-             justify="center">
-        <a-col :span="24"
-               class="fixedBtns">
-          <a-form-item class="btnCenter">
-            <a-button class="cancelBtn"
-                      @click="cancel">取消</a-button>
-          </a-form-item>
-        </a-col>
-      </a-row>
-    </div>
-  </Drawer>
+    <Drawer :title="'详情'" :placement="'right'" class="delistingBottom" :visible="visible" @cancel="cancel">
+        <div class="detail">
+            <div class="detail__body">
+                <a-row v-for="(item, index) in columns" :key="index">
+                    <a-col :span="6">{{ item.columntitle }}</a-col>
+                    <a-col :span="18">{{ handleDetailValue(item.columnfield) }}</a-col>
+                </a-row>
+            </div>
+            <div class="detail__footer">
+                <a-button class="cancelBtn" @click="cancel">取消</a-button>
+            </div>
+        </div>
+    </Drawer>
 </template>
 
 <script lang="ts">
-import { BtnListType } from '@/common/components/btnList/interface';
 import Drawer from '@/common/components/drawer/index.vue';
-import { getBarmaginApplyStatus } from '@/common/constants/enumsName';
-import { BtnList, ModalEnum, queryTableList } from '@/common/export/commonTable';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { BtnList, ModalEnum } from '@/common/export/commonTable';
 import { _closeModal } from '@/common/setup/modal/modal';
-import { getTableEvent } from '@/common/setup/table';
-import { expandIcon } from '@/common/setup/table/clolumn';
-import { queryQueryWrTradeBargainApply } from '@/services/go/wrtrade';
-import { QueryWrTradeBargainApplyQsp, QueryWrTradeBargainApplyReq, WrOrderDetail } from '@/services/go/wrtrade/interface';
-import { wrBargainBack, wrBargainNoAgree } from '@/services/proto/WrBargain';
-import { WrBargainBackReq, WrBargainNoAgreeReq } from '@/services/proto/WrBargain/interface';
-import Long from 'long';
+import { QueryWrTradeBargainApplyQsp, WrOrderDetail } from '@/services/go/wrtrade/interface';
 import { defineComponent, PropType, ref } from 'vue';
+import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { Column } from '@/services/go/commonService/interface';
+import { getTableHead } from '@/common/methods/table';
+import { TableKey } from '@/common/methods/table/interface';
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_bargain_detail,
     components: { Drawer, BtnList },
     emits: ['cancel', 'update'],
     props: {
+        tableName: Object as PropType<keyof TableKey>,
         selectedRow: {
-            type: Object as PropType<QueryWrTradeBargainApplyQsp | WrOrderDetail>,
+            type: Object as PropType<QueryWrTradeBargainApplyQsp & WrOrderDetail>,
             default: {},
         },
         isMy: {
@@ -52,54 +42,70 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
+        const columns = ref<Column[]>([]);
+
+        if (props.tableName) {
+            columns.value = getTableHead(props.tableName);
+        }
+
+        // 处理详情数据
+        const handleDetailValue = (field: keyof typeof props.selectedRow) => {
+            const data = props.selectedRow;
+            // 挂牌类型
+            if (field === 'wrtradetype') {
+                return getWrOrderTypeName(data.buyorsell, data.wrtradetype);
+            }
+            // 成交金额
+            if (field === 'amount') {
+                return data.tradeqty * data.tradeprice;
+            }
+            return data[field];
+        };
 
         return {
             visible,
+            columns,
             cancel,
+            getWrOrderTypeName,
+            handleDetailValue,
         };
     },
 });
 </script>
 
 <style lang="less" scoped>
-.listed {
-    width: 100%;
-    height: 100%;
-    .flex;
-    flex-direction: column;
-    overflow: hidden;
-    .ant-form {
-        height: 100%;
-        .formBar {
-            height: 100%;
-            max-height: 100%;
-        }
+.detail {
+    [theme='light'] & {
+        --label-color: #7a8a94;
+        --text-color: #333;
     }
-    .condition {
-        width: 100%;
-        height: 48px;
-        padding: 10px 16px;
-        border-bottom: 1px solid @m-black6;
-        .inlineflex;
-        .conditionBtn {
-            align-self: center;
-            align-items: center;
-            border: 0;
-            min-width: 80px;
-            height: 28px;
-            line-height: 28px;
-            background: @m-black7;
-            .rounded-corners(3px);
-            font-size: 14px;
-            color: @m-blue0;
-            &:hover {
-                background: @m-black7-hover;
-                color: @m-blue0-hover;
+
+    display: flex;
+    flex-direction: column;
+    height: 100%;
+
+    &__body {
+        flex: 1;
+        overflow-y: auto;
+        padding: 0 25px;
+
+        .ant-row {
+            margin-top: 10px;
+
+            .ant-col {
+                &:first-child {
+                    color: var(--label-color, #7a8a94);
+                }
+                &:last-child {
+                    color: var(--text-color, #fff);
+                }
             }
         }
-        .conditionBtn + .conditionBtn {
-            margin-left: 10px;
-        }
+    }
+
+    &__footer {
+        text-align: center;
+        padding: 20px 0;
     }
 }
 </style>;

+ 22 - 35
src/views/order/spot_warran/components/spot_warrant_deal/index.vue

@@ -1,40 +1,24 @@
 <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 #expandedRowRender="{ record }">
-        <BtnList :btnList="btnList"
-                 :record="record"
-                 class="btn-list-sticky"
-                 @click="openComponent" />
-      </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 #expandedRowRender="{ record }">
+                <BtnList :btnList="btnList" :record="record" class="btn-list-sticky" @click="openComponent" />
+            </template>
 
-      <!-- 成交金额 -->
-      <template #amount="{ record }">
-        <a>{{ record.tradeqty * record.tradeprice }}</a>
-      </template>
+            <!-- 成交金额 -->
+            <template #amount="{ record }">
+                <a>{{ record.tradeqty * record.tradeprice }}</a>
+            </template>
 
-      <!-- 挂牌类型 -->
-      <template #wrtradetype="{ record }">
-        <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
-      </template>
-    </a-table>
-    <component :is="componentId"
-               v-if="componentId"
-               :selectedRow="selectedRow"
-               @cancel="closeComponent"></component>
-  </section>
+            <!-- 挂牌类型 -->
+            <template #wrtradetype="{ record }">
+                <a>{{ getWrOrderTypeName(record.buyorsell, record.wrtradetype) }}</a>
+            </template>
+        </a-table>
+        <component :is="componentId" v-if="componentId" :tableName="tableName" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+    </section>
 </template>
 
 <script lang="ts">
@@ -47,6 +31,7 @@ import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { expandIcon } from '@/common/setup/table/clolumn';
 import { getWrOrderTypeName } from '@/common/constants/enumsName';
+import { TableKey } from '@/common/methods/table/interface';
 
 export default defineComponent({
     name: enumOrderComponents.spot_warrant_deal,
@@ -55,6 +40,7 @@ export default defineComponent({
         spot_warrant_deal_detail: defineAsyncComponent(() => import('./components/spot_warrant_deal_detail/index.vue')),
     },
     setup() {
+        const tableName: keyof TableKey = 'table_pcweb_spot_trade_bottom_spot_warrant_deal';
         // 表格列表数据
         const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
         // 获取列表数据
@@ -66,8 +52,8 @@ export default defineComponent({
         };
         // 表格通用逻辑
         const param: ComposeOrderTableParam = {
+            tableName,
             queryFn: queryTableAction,
-            tableName: 'table_pcweb_spot_trade_bottom_spot_warrant_deal',
             recordList: getRecordItemTab(),
         };
         //仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)
@@ -92,6 +78,7 @@ export default defineComponent({
         return {
             ...handleComposeOrderTable<WrSpecialMatchOrder>(param),
             loading,
+            tableName,
             tableList,
             expandIcon,
             getWrOrderTypeName,