Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

yu jie před 4 roky
rodič
revize
9da7742240

+ 1 - 1
src/common/components/drawer/index.vue

@@ -82,7 +82,7 @@ export default defineComponent({
     }
 }
 .top {
-    .position(fixed, 80px, 0, auto, auto);
+    .position(fixed, 101px, 0, auto, auto);
     width: 486px;
     height: 479px;
     background: transparent;

+ 12 - 0
src/common/config/constrolBottom.ts

@@ -0,0 +1,12 @@
+import { Ref, ref } from "vue";
+
+// 控制显示单据底部显示全部还是部分
+const isShowBottom = ref<boolean>(true);
+
+export function handleShowBottom(): void {
+    isShowBottom.value = !isShowBottom.value
+}
+
+export function getShowBottomValue(): Ref<boolean> {
+    return isShowBottom
+}

+ 1 - 1
src/common/setup/table/button.ts

@@ -15,7 +15,7 @@ import { BtnClassName, BtnList, ButtonListKey } from './interface';
 export function getClassName(val: string): BtnClassName {
     let result: BtnClassName = 'btnDeafault'
     const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked', 'refuse']
-    const operBtn = ['add', 'modify', 'reset', 'credit', 'payment', 'confirm_withdrawal', 'complete_stocking', 'upload_logistics',
+    const operBtn = ['add', 'modify', 'reset', 'credit', 'payment', 'confirm_withdrawal', 'complete_stocking', 'upload_logistics', 'buy', 'listed', 'delisting',
         'receipt', 'confirm_pickup']
     const map = new Map<BtnClassName, string[]>([
         ['btnDanger', btnDanger],

+ 1 - 0
src/common/setup/table/clolumn.ts

@@ -42,6 +42,7 @@ export function getTableColumns() {
             // 序号
             if (columntitle === '序号') {
                 item.customRender = (obj: any) => `${obj.index + 1}`
+                // item.width = 30
             }
             // 设置表格宽度,默认120
             if (columnwidth && columnwidth !== '0') {

+ 5 - 14
src/layout/components/bottom.vue

@@ -6,7 +6,7 @@
                  :value="'title'"
                  @selectMenu="selectMenu">
         <div class="conditionIcon icon iconfont icon-shouqi"
-             @click="openOrCloseBottom"></div>
+             @click="handleShowBottom"></div>
       </firstMenu>
       <div v-show="isShowBottom">
         <component :is="componentId"
@@ -25,15 +25,7 @@ import quoteTable from '@/common/components/quoteTable/index.vue';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 import { handleOrderData } from '@/common/setup/order/orderData';
 import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
-
-// 控制底部打开与关闭
-function handleBottom() {
-    const isShowBottom = ref<boolean>(true);
-    function openOrCloseBottom() {
-        isShowBottom.value = !isShowBottom.value;
-    }
-    return { isShowBottom, openOrCloseBottom };
-}
+import { handleShowBottom, getShowBottomValue } from '@/common/config/constrolBottom';
 
 export default defineComponent({
     name: 'layout-top',
@@ -48,8 +40,6 @@ export default defineComponent({
         [enumOrderComponents.pre_sale_warehouse_receipt]: defineAsyncComponent(() => import('@/views/order/pre_sale_warehouse_receipt/index.vue')),
     },
     setup() {
-        // 控制底部展开逻辑
-        const { isShowBottom, openOrCloseBottom } = handleBottom();
         const { orderList, componentId } = handleOrderData();
         // 切换组件
         function selectMenu(value: OperationTabMenu) {
@@ -59,8 +49,9 @@ export default defineComponent({
             selectMenu,
             componentId,
             orderList,
-            isShowBottom,
-            openOrCloseBottom,
+            isShowBottom: getShowBottomValue(),
+            getShowBottomValue,
+            handleShowBottom,
         };
     },
 });

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

@@ -1,6 +1,5 @@
 <template>
   <!-- 卖大厅 -->
-
   <a-table :columns="columns"
            class="sellHallTable"
            :scroll="{ x: '100%', y: 'calc(100vh - 510px)' }"

+ 29 - 30
src/views/order/funding_information/components/funding_information_funding_log/index.vue

@@ -1,32 +1,31 @@
 <template>
-    <!-- 资金流水 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </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"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </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">
@@ -40,8 +39,8 @@ 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 {getOperateTypeEnumItemName, getOperateTypeName} from "@/common/constants/enumsName";
-import {formatTime} from "@/common/methods";
+import { getOperateTypeEnumItemName, getOperateTypeName } from '@/common/constants/enumsName';
+import { formatTime } from '@/common/methods';
 export default defineComponent({
     name: enumOrderComponents.funding_information_funding_log,
     components: {

+ 30 - 31
src/views/order/funding_information/components/funding_information_funding_summary/index.vue

@@ -1,35 +1,34 @@
 <template>
-    <!-- 资金汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-            <template #balanc="{record}">
-                <span>{{getCanUseMoney(record)}}</span>
-            </template>
-            <template #freezemargin="{record}">
-                <span>{{getCanUseMoney(record)}}</span>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 资金汇总 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+      <template #balanc="{record}">
+        <span>{{getCanUseMoney(record)}}</span>
+      </template>
+      <template #freezemargin="{record}">
+        <span>{{getCanUseMoney(record)}}</span>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 40 - 41
src/views/order/performance_information/components/performance_information_buy_performance/index.vue

@@ -1,48 +1,47 @@
 <template>
-    <!-- 买履约 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-            <!-- 履约类型 -->
-            <template #performancetype="{ record }">
-                <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
-            </template>
+  <!-- 买履约 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+      <!-- 履约类型 -->
+      <template #performancetype="{ record }">
+        <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
+      </template>
 
-            <!-- 付款方式 -->
-            <template #paymenttype="{ record }">
-                <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
-            </template>
+      <!-- 付款方式 -->
+      <template #paymenttype="{ record }">
+        <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
+      </template>
 
-            <!-- 履约状态 -->
-            <template #performancestatus="{ record }">
-                <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
-            </template>
+      <!-- 履约状态 -->
+      <template #performancestatus="{ record }">
+        <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
+      </template>
 
-            <!-- 当前步骤 -->
-            <template #curstepname="{ record }">
-                <a>{{ record.curstepname }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <!-- 当前步骤 -->
+      <template #curstepname="{ record }">
+        <a>{{ record.curstepname }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 40 - 41
src/views/order/performance_information/components/performance_information_sell_performance/index.vue

@@ -1,48 +1,47 @@
 <template>
-    <!-- 卖履约 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-            <!-- 履约类型 -->
-            <template #performancetype="{ record }">
-                <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
-            </template>
+  <!-- 卖履约 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+      <!-- 履约类型 -->
+      <template #performancetype="{ record }">
+        <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
+      </template>
 
-            <!-- 付款方式 -->
-            <template #paymenttype="{ record }">
-                <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
-            </template>
+      <!-- 付款方式 -->
+      <template #paymenttype="{ record }">
+        <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
+      </template>
 
-            <!-- 履约状态 -->
-            <template #performancestatus="{ record }">
-                <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
-            </template>
+      <!-- 履约状态 -->
+      <template #performancestatus="{ record }">
+        <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
+      </template>
 
-            <!-- 当前步骤 -->
-            <template #curstepname="{ record }">
-                <a>{{ record.curstepname }}</a>
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+      <!-- 当前步骤 -->
+      <template #curstepname="{ record }">
+        <a>{{ record.curstepname }}</a>
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 24 - 25
src/views/order/spot_warran/components/spot_warrant_inventory_summary/index.vue

@@ -1,29 +1,28 @@
 <template>
-    <!-- 库存汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </template>
-        </a-table>
-        <component
-            :is="componentId"
-            v-if="componentId"
-            :selectedRow="selectedRow"
-            @cancel="closeComponent"
-        ></component>
-    </section>
+  <!-- 库存汇总 -->
+  <section>
+    <a-table :columns="columns"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">

+ 24 - 25
src/views/order/spot_warran/components/spot_warrant_spot_summary/index.vue

@@ -1,29 +1,28 @@
 <template>
-    <!-- 现货汇总 -->
-    <section>
-        <a-table
-            :columns="columns"
-            class="srcollYTable expandLeftTable"
-            :scroll="{ x: '100%', y: '227px' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        >
-            <!-- 额外的展开行 -->
-            <template #expandedRowRender="{ record }">
-                <BtnList :btnList="btnList" :record="record" @click="openComponent" />
-            </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: '227px' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 额外的展开行 -->
+      <template v-if="btnList.length"
+                #expandedRowRender="{ record }">
+        <BtnList :btnList="btnList"
+                 :record="record"
+                 @click="openComponent" />
+      </template>
+    </a-table>
+    <component :is="componentId"
+               v-if="componentId"
+               :selectedRow="selectedRow"
+               @cancel="closeComponent"></component>
+  </section>
 </template>
 
 <script lang="ts">