huangbin 4 anos atrás
pai
commit
37cf2898d8

+ 1 - 1
src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue

@@ -37,7 +37,7 @@
                  class="fixedBtns">
             <a-form-item class="btnCenter">
               <a-button class="cancelBtn"
-                        @click="cancel">取消</a-button>
+                        @click="cancel">关闭</a-button>
             </a-form-item>
           </a-col>
         </a-row>

+ 37 - 22
src/views/search/search_document_records/search_pre_sale_warehouse_receipt/search_pre_sale_warehouse_receipt_protocol_specified_record/index.vue

@@ -1,39 +1,50 @@
 <template>
-    <!-- 单据记录 商品合约-->
-    <div class="topTableHeight">
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        ></a-table>
-    </div>
+  <!-- 单据记录 商品合约-->
+  <div class="topTableHeight">
+    <a-table :columns="columnsList"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 类型 -->
+      <template #buyorsell="{ text }">
+        <a>{{ handleBuyOrSell(text) }}</a>
+      </template>
+      <!-- 类型 -->
+      <template #ordertime="{ text }">
+        <a>{{ formatTime(text) }}</a>
+      </template>
+    </a-table>
+  </div>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote } from '@/services/go/wrtrade';
+import { QueryOrderQuoteReq, QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
+import { queryOrderQuote, queryWrSpecialMatchOrder } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { useSpecifiedRecordColumns } from '../../setup';
+import { getWrTradeOrderStatusName } from '@/common/constants/enumsName';
+import { getUserId } from '@/services/bus/account';
+import { formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: EnumRouterName.search_pre_sale_warehouse_receipt_protocol_specified_record,
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
+            const param: QueryWrSpecialMatchOrderReq = {
+                userid: getUserId(),
                 haswr: 0,
             };
-            queryTable(queryOrderQuote, param);
+            queryTable(queryWrSpecialMatchOrder, param);
         };
         // 表格通用逻辑
         const param: ComposeTableParam = {
@@ -43,11 +54,15 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
-
+        const { columnsList, handleBuyOrSell } = useSpecifiedRecordColumns();
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            ...handleComposeTable<WrSpecialMatchOrder>(param),
             loading,
             tableList,
+            columnsList,
+            handleBuyOrSell,
+            getWrTradeOrderStatusName,
+            formatTime,
         };
     },
 });

+ 41 - 23
src/views/search/search_document_records/search_spot_warrant/search_spot_warrant_protocol_specified_record/index.vue

@@ -1,39 +1,53 @@
 <template>
-    <!-- 单据记录 商品合约-->
-    <div class="topTableHeight">
-        <a-table
-            :columns="columns"
-            class="srcollYTable"
-            :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
-            :pagination="false"
-            :loading="loading"
-            :expandedRowKeys="expandedRowKeys"
-            :customRow="Rowclick"
-            rowKey="key"
-            :data-source="tableList"
-        ></a-table>
-    </div>
+  <!-- 单据记录 商品合约-->
+  <div class="topTableHeight">
+    <a-table :columns="columnsList"
+             class="srcollYTable"
+             :scroll="{ x: '100%', y: 'calc(100vh - 405px)' }"
+             :pagination="false"
+             :loading="loading"
+             :expandedRowKeys="expandedRowKeys"
+             :customRow="Rowclick"
+             rowKey="key"
+             :data-source="tableList">
+      <!-- 类型 -->
+      <template #buyorsell="{ text }">
+        <a>{{ handleBuyOrSell(text) }}</a>
+      </template>
+      <!-- 类型 -->
+      <template #wrtradeorderstatus="{ text }">
+        <a>{{ getWrTradeOrderStatusName(text) }}</a>
+      </template>
+      <template #ordertime="{ text }">
+        <a>{{ formatTime(text) }}</a>
+      </template>
+    </a-table>
+  </div>
 </template>
 
 <script lang="ts">
 import { EnumRouterName } from '@/common/constants/enumRouterName';
 import { queryTableList, defineComponent, ComposeTableParam } from '@/common/export/commonTable';
-import { QueryOrderQuoteReq, WrOrderQuote } from '@/services/go/wrtrade/interface';
-import { queryOrderQuote } from '@/services/go/wrtrade';
+import { QueryOrderQuoteReq, QueryWrSpecialMatchOrderReq, WrSpecialMatchOrder } from '@/services/go/wrtrade/interface';
+import { queryOrderQuote, queryWrSpecialMatchOrder } from '@/services/go/wrtrade';
 import { handleComposeTable } from '@/views/market/spot_trade/setup';
+import { getUserId } from '@/services/bus/account';
+import { useSpecifiedRecordColumns } from '../../setup';
+import { getWrTradeOrderStatusName } from '@/common/constants/enumsName';
+import { formatTime } from '@/common/methods';
 
 export default defineComponent({
     name: EnumRouterName.search_spot_warrant_protocol_specified_record,
     setup() {
         // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<WrOrderQuote>();
+        const { loading, tableList, queryTable } = queryTableList<WrSpecialMatchOrder>();
         // 获取列表数据
         const queryTableAction = () => {
-            const param: QueryOrderQuoteReq = {
-                wrpricetype: 1,
-                haswr: 0,
+            const param: QueryWrSpecialMatchOrderReq = {
+                userid: getUserId(),
+                haswr: 1,
             };
-            queryTable(queryOrderQuote, param);
+            queryTable(queryWrSpecialMatchOrder, param);
         };
         // 表格通用逻辑
         const param: ComposeTableParam = {
@@ -43,12 +57,16 @@ export default defineComponent({
             tableFilterKey: [],
             isDetail: false,
         };
-
+        const { columnsList, handleBuyOrSell } = useSpecifiedRecordColumns();
         return {
-            ...handleComposeTable<WrOrderQuote>(param),
+            ...handleComposeTable<WrSpecialMatchOrder>(param),
             name: EnumRouterName.warehouse_pre_sale_price,
             loading,
             tableList,
+            columnsList,
+            handleBuyOrSell,
+            getWrTradeOrderStatusName,
+            formatTime,
         };
     },
 });

+ 21 - 0
src/views/search/search_document_records/setup.ts

@@ -0,0 +1,21 @@
+import { BuyOrSell } from "@/common/constants/enumCommon";
+
+export const useSpecifiedRecordColumns = () => {
+    const columnsList = [
+        { title: '发起方', key: 'username', dataIndex: 'username', align: 'center', slots: { customRender: 'username' }, width: 120 },
+        { title: '类型', key: 'buyorsell', dataIndex: 'buyorsell', align: 'center', slots: { customRender: 'buyorsell' }, width: 120 },
+        { title: '指定方', key: 'matchusername', dataIndex: 'matchusername', align: 'center', slots: { customRender: 'matchusername' }, width: 120 },
+        { title: '品种', key: 'deliverygoodsname', dataIndex: 'deliverygoodsname', align: 'center', slots: { customRender: 'deliverygoodsname' }, width: 120 },
+        { title: '商品', key: 'wrtypename', dataIndex: 'wrtypename', align: 'center', slots: { customRender: 'wrtypename' }, width: 220 },
+        { title: '仓库', key: 'warehousename', dataIndex: 'warehousename', align: 'center', slots: { customRender: 'warehousename' }, width: 120 },
+        { title: '价格', key: 'fixedprice', dataIndex: 'fixedprice', align: 'center', slots: { customRender: 'fixedprice' }, width: 120 },
+        { title: '数量', key: 'orderqty', dataIndex: 'orderqty', align: 'center', slots: { customRender: 'orderqty' }, width: 120 },
+        { title: '金额', key: 'amount', dataIndex: 'amount', align: 'center', slots: { customRender: 'amount' }, width: 120 },
+        { title: '发起时间', key: 'ordertime', dataIndex: 'ordertime', align: 'center', slots: { customRender: 'ordertime' }, width: 160 },
+        { title: '状态', key: 'wrtradeorderstatus', dataIndex: 'wrtradeorderstatus', align: 'center', slots: { customRender: 'wrtradeorderstatus' }, width: 120 },
+    ];
+    function handleBuyOrSell(value: BuyOrSell) {
+        return value === BuyOrSell.buy ? '采购' : '销售'
+    }
+    return { columnsList, handleBuyOrSell }
+}