li.shaoyi преди 3 години
родител
ревизия
7d8bda7418
променени са 27 файла, в които са добавени 616 реда и са изтрити 360 реда
  1. 313 0
      src/business/bargain/index.ts
  2. 1 0
      src/business/common/index.ts
  3. 0 3
      src/business/goods/index.ts
  4. 16 1
      src/business/order/index.ts
  5. 3 68
      src/business/trade/desting.ts
  6. 44 235
      src/business/trade/list.ts
  7. 24 3
      src/constants/order.ts
  8. 3 3
      src/mock/router.ts
  9. 73 0
      src/packages/pc/views/bargain/buy/components/audit/index.vue
  10. 2 2
      src/packages/pc/views/bargain/buy/index.vue
  11. 45 13
      src/packages/pc/views/bargain/sell/components/audit/index.vue
  12. 2 2
      src/packages/pc/views/bargain/sell/index.vue
  13. 1 1
      src/packages/pc/views/mine/profile/index.vue
  14. 2 1
      src/packages/pc/views/order/main/components/contracted/index.vue
  15. 2 1
      src/packages/pc/views/order/main/components/delay/index.vue
  16. 2 1
      src/packages/pc/views/order/main/components/manual/index.vue
  17. 23 4
      src/packages/pc/views/order/main/index.vue
  18. 3 3
      src/packages/pc/views/trade/bargain/components/cancel/index.vue
  19. 2 2
      src/packages/pc/views/trade/bargain/index.vue
  20. 2 2
      src/packages/pc/views/trade/buy/components/delisting/index.vue
  21. 9 4
      src/packages/pc/views/trade/delisting/index.vue
  22. 9 2
      src/packages/pc/views/trade/purchase/index.vue
  23. 9 2
      src/packages/pc/views/trade/sale/index.vue
  24. 3 3
      src/packages/pc/views/warehousing/goods/components/bargain/index.vue
  25. 2 2
      src/packages/pc/views/warehousing/goods/components/details/index.vue
  26. 15 0
      src/stores/modules/storage.ts
  27. 6 2
      src/types/ermcp/trade.d.ts

+ 313 - 0
src/business/bargain/index.ts

@@ -0,0 +1,313 @@
+import { shallowRef, reactive } from 'vue'
+import { v4 } from 'uuid'
+import { ClientType } from '@/constants/client'
+import { Market } from '@/constants/market'
+import { useDataTable } from '@/hooks/datatable'
+import { FilterSelect, FilterButton } from '@/hooks/datatable/interface'
+import { getTableColumns } from '@/business/table'
+import { queryMyBargainApply, queryMyDelistingApply, zsBuyOrderDestingNegPriceOperate, zsSellOrderDestingApplyOperate } from '@/services/api/trade'
+import { sessionData } from '@/stores'
+import { BuyOrSell } from '@/constants/order'
+import Long from 'long'
+
+/**
+ * 我的询价
+ */
+export function useBargain(type: 0 | 1) {
+    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp>()
+    const loading = shallowRef(false)
+    const columns = shallowRef<Ermcp.TableColumn[]>([])
+
+    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
+        {
+            label: '询价',
+            key: 'buyorsell',
+            selectedValue: BuyOrSell.Buy,
+            options: [
+                { label: '我的求购', value: BuyOrSell.Buy },
+                { label: '我的出售', value: BuyOrSell.Sell }
+            ],
+        },
+        {
+            label: '状态',
+            key: 'status',
+            selectedValue: 1,
+            options: [
+                { label: '全部', value: 0 },
+                { label: '待确认', value: 1 }
+            ],
+        },
+    ])
+
+    const buttonList: FilterButton[] = [
+        {
+            lable: '查询',
+            className: 'el-button--primary',
+            onClick: () => {
+                pageIndex.value = 1
+                getBargainOrderList()
+            }
+        },
+    ]
+
+    // 获取我的询价列表
+    const getBargainOrderList = () => {
+        loading.value = true
+        dataList.value = []
+
+        const [buyOrSell, applyStatus] = selectList
+        const param: Ermcp.MyBargainApplyReq | Ermcp.MyDelistingApplyReq = {
+            type,
+            page: pageIndex.value,
+            pagesize: pageSize.value,
+            userid: sessionData.getLoginInfo('UserID'),
+            applystatus: applyStatus.selectedValue || undefined,
+        }
+
+        switch (buyOrSell.selectedValue) {
+            case BuyOrSell.Buy: {
+                columns.value = getTableColumns('listing_bargain_buy')
+                return queryMyBargainApply({
+                    data: param,
+                    success: (res) => {
+                        total.value = res.total
+                        dataList.value = res.data
+                    },
+                    complete: () => {
+                        loading.value = false
+                    }
+                })
+            }
+            case BuyOrSell.Sell: {
+                columns.value = getTableColumns('listing_bargain_sell')
+                return queryMyDelistingApply({
+                    data: param,
+                    success: (res) => {
+                        total.value = res.total
+                        dataList.value = res.data
+                    },
+                    complete: () => {
+                        loading.value = false
+                    }
+                })
+            }
+            default: {
+                return Promise.reject('参数错误')
+            }
+        }
+    }
+
+    return {
+        loading,
+        dataList,
+        total,
+        pageIndex,
+        pageSize,
+        columns,
+        selectList,
+        buttonList,
+        getBargainOrderList,
+    }
+}
+
+/**
+ * 我的询价-求购
+ */
+export function useBuyBargain(type: 0 | 1) {
+    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyBargainApplyRsp>()
+    const loading = shallowRef(false)
+    const columns = shallowRef(getTableColumns('bargain_buy'))
+
+    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
+        {
+            label: '状态',
+            key: 'status',
+            selectedValue: 1,
+            options: [
+                { label: '全部', value: 0 },
+                { label: '待确认', value: 1 }
+            ],
+        },
+    ])
+
+    const buttonList: FilterButton[] = [
+        {
+            lable: '查询',
+            className: 'el-button--primary',
+            onClick: () => {
+                pageIndex.value = 1
+                getBargainOrderList()
+            }
+        },
+    ]
+
+    // 获取我的询价列表
+    const getBargainOrderList = () => {
+        loading.value = true
+        return queryMyBargainApply({
+            data: {
+                type,
+                page: pageIndex.value,
+                pagesize: pageSize.value,
+                userid: sessionData.getLoginInfo('UserID'),
+                applystatus: selectList[0].selectedValue || undefined,
+            },
+            success: (res) => {
+                total.value = res.total
+                dataList.value = res.data
+            },
+            complete: () => {
+                loading.value = false
+            }
+        })
+    }
+
+    return {
+        loading,
+        dataList,
+        total,
+        pageIndex,
+        pageSize,
+        columns,
+        selectList,
+        buttonList,
+        getBargainOrderList,
+    }
+}
+
+/**
+ * 我的询价-出售
+ */
+export function useSellBargain(type: 0 | 1) {
+    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyDelistingApplyRsp>()
+    const loading = shallowRef(false)
+    const columns = shallowRef(getTableColumns('bargain_sell'))
+
+    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
+        {
+            label: '状态',
+            key: 'status',
+            selectedValue: 1,
+            options: [
+                { label: '全部', value: 0 },
+                { label: '待确认', value: 1 }
+            ],
+        },
+    ])
+
+    const buttonList: FilterButton[] = [
+        {
+            lable: '查询',
+            className: 'el-button--primary',
+            onClick: () => {
+                pageIndex.value = 1
+                getBargainOrderList()
+            }
+        },
+    ]
+
+    // 获取我的询价列表
+    const getBargainOrderList = () => {
+        loading.value = true
+        return queryMyDelistingApply({
+            data: {
+                type,
+                page: pageIndex.value,
+                pagesize: pageSize.value,
+                userid: sessionData.getLoginInfo('UserID'),
+                applystatus: selectList[0].selectedValue || undefined,
+            },
+            success: (res) => {
+                total.value = res.total
+                dataList.value = res.data
+            },
+            complete: () => {
+                loading.value = false
+            }
+        })
+    }
+
+    return {
+        loading,
+        dataList,
+        total,
+        pageIndex,
+        pageSize,
+        columns,
+        selectList,
+        buttonList,
+        getBargainOrderList,
+    }
+}
+
+/**
+ * 钻石询价操作
+ * @returns 
+ */
+export function useBargainOperate(selectedRow: Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp) {
+    const { UserID, AccountIDs } = sessionData.getValue('loginInfo')
+    const loading = shallowRef(false)
+
+    const formData = reactive<{ AuditRemark: string }>({
+        AuditRemark: ''
+    })
+
+    const formSubmit = (OperateType: 0 | 1 | 2 | 3) => {
+        loading.value = true
+
+        // 买询价操作
+        if ('wrbargainid' in selectedRow) {
+            return zsBuyOrderDestingNegPriceOperate({
+                data: {
+                    Header: {
+                        AccountID: AccountIDs[0],
+                    },
+                    UserID, // 用户ID,必填
+                    AccountID: AccountIDs[0], // 资金账号,必填
+                    WRBargainID: Long.fromString(selectedRow.wrbargainid), // 议价申请单ID,必填
+                    OperateType, // 操作类型,1:撤销2:拒绝3:同意
+                    AuditRemark: formData.AuditRemark,
+                    MarketID: Market.GZ, // 市场ID,必填
+                    ClientType: ClientType.Web, // 终端类型
+                    OrderSrc: 1, // 委托来源
+                    ClientSerialNo: v4() // 客户端流水号
+                },
+                complete: () => {
+                    loading.value = false
+                }
+            })
+        }
+
+        // 卖询价操作
+        if ('selldelistingapplyid' in selectedRow) {
+            return zsSellOrderDestingApplyOperate({
+                data: {
+                    Header: {
+                        AccountID: AccountIDs[0],
+                    },
+                    UserID, // 用户ID,必填
+                    AccountID: AccountIDs[0], // 资金账号,必填
+                    SellDelistingApplyID: Long.fromString(selectedRow.selldelistingapplyid), // 卖摘牌申请ID,必填
+                    OperateType, // 操作类型,1:撤销2:拒绝3:同意
+                    AuditRemark: formData.AuditRemark,
+                    MarketID: Market.GZ, // 市场ID,必填
+                    ClientType: ClientType.Web, // 终端类型
+                    OrderSrc: 1, // 委托来源
+                    ClientSerialNo: v4(), // 客户端流水号
+                },
+                complete: () => {
+                    loading.value = false
+                }
+            })
+        }
+
+        loading.value = false
+        return Promise.reject('参数错误')
+    }
+
+    return {
+        loading,
+        formData,
+        formSubmit,
+    }
+}

+ 1 - 0
src/business/common/index.ts

@@ -27,6 +27,7 @@ export async function initBaseData(callback?: () => void) {
             commonStore.getLoginData(),
             futuresStore.getGoodsList(),
             sessionData.getUserMenuList(),
+            sessionData.getPerformanceStepList(),
             //sessionData.getTableColumnList(),
         ]
 

+ 0 - 3
src/business/goods/index.ts

@@ -331,9 +331,6 @@ export function useDiamondDelete(selectedRow: Ermcp.MyWRPositionRsp) {
         loading.value = true
         return receiptZSOutApply({
             data: {
-                Header: {
-                    AccountID: AccountIDs[0],
-                },
                 Common: {
                     UserID,
                     AccountID: AccountIDs[0],

+ 16 - 1
src/business/order/index.ts

@@ -1,4 +1,4 @@
-import { shallowRef, reactive } from 'vue'
+import { shallowRef, ref, reactive } from 'vue'
 import { useDataTable } from '@/hooks/datatable'
 import { getTableColumns } from '@/business/table'
 import { getReceiptTypeName } from '@/constants/receipt'
@@ -13,11 +13,20 @@ export function usePerformance(buyorsell?: BuyOrSell) {
     const loading = shallowRef(false)
     const columns = shallowRef(getTableColumns('order'))
 
+    const filterData = ref<{ history: boolean, date: string[] }>({
+        history: false,
+        date: []
+    })
+
     inputList.value = [
         { label: '商品', keys: ['goodsno'] },
     ]
 
     filterMethod.onReset = () => {
+        filterData.value = {
+            history: false,
+            date: []
+        }
         getPerformanceList()
     }
 
@@ -26,8 +35,10 @@ export function usePerformance(buyorsell?: BuyOrSell) {
     }
 
     const getPerformanceList = () => {
+        const { history: ishis, date: [begindate, enddate] } = filterData.value || []
         const param = getQueryParam()
         loading.value = true
+
         return queryMyPerformance({
             data: {
                 userid: sessionData.getLoginInfo('UserID'),
@@ -35,6 +46,9 @@ export function usePerformance(buyorsell?: BuyOrSell) {
                 pagesize: pageSize.value,
                 buyorsell,
                 zsallproperties: param.goodsno,
+                ishis,
+                begindate,
+                enddate,
             },
             success: (res) => {
                 total.value = res.total
@@ -52,6 +66,7 @@ export function usePerformance(buyorsell?: BuyOrSell) {
         total,
         pageIndex,
         pageSize,
+        filterData,
         columns,
         inputList,
         buttonList,

+ 3 - 68
src/business/trade/desting.ts

@@ -4,7 +4,7 @@ import { ClientType } from '@/constants/client'
 import { Market } from '@/constants/market'
 import { useDataTable } from '@/hooks/datatable'
 import { queryDiamondList } from '@/services/api/goods'
-import { zsBuyOrderDesting, zsBuyOrderDestingNegPrice, zsSellOrderDestingApply, zsBuyOrderDestingNegPriceOperate, zsSellOrderDestingApplyOperate } from '@/services/api/trade'
+import { zsBuyOrderDesting, zsBuyOrderDestingNegPrice, zsSellOrderDestingApply } from '@/services/api/trade'
 import { sessionData } from '@/stores'
 import moment from 'moment'
 import Long from 'long'
@@ -51,7 +51,7 @@ export function useBuyOrderDesting(selectedRow: Ermcp.DiamondDetailsRsp) {
  * 钻石买摘牌(买询价)
  * @returns 
  */
-export function useBuyOrderInquiry(selectedRow: Ermcp.DiamondDetailsRsp) {
+export function useBuyOrderBargain(selectedRow: Ermcp.DiamondDetailsRsp) {
     const { UserID, AccountIDs } = sessionData.getValue('loginInfo')
     const loading = shallowRef(false)
 
@@ -95,7 +95,7 @@ export function useBuyOrderInquiry(selectedRow: Ermcp.DiamondDetailsRsp) {
  * 钻石卖摘牌(卖询价)
  * @returns 
  */
-export function useSellOrderInquiry(selectedRow: Ermcp.BuyOrderRsp) {
+export function useSellOrderBargain(selectedRow: Ermcp.BuyOrderRsp) {
     const { UserID, AccountIDs } = sessionData.getValue('loginInfo')
     const { dataList } = useDataTable<Ermcp.MyWRPositionRsp>()
     const loading = shallowRef(false)
@@ -164,69 +164,4 @@ export function useSellOrderInquiry(selectedRow: Ermcp.BuyOrderRsp) {
         formSubmit,
         getDiamondList,
     }
-}
-
-/**
- * 钻石询价操作
- * @returns 
- */
-export function useInquiryOperate(selectedRow: Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp) {
-    const { UserID, AccountIDs } = sessionData.getValue('loginInfo')
-    const loading = shallowRef(false)
-
-    const formSubmit = () => {
-        loading.value = true
-
-        // 买询价操作
-        if ('wrbargainid' in selectedRow) {
-            return zsBuyOrderDestingNegPriceOperate({
-                data: {
-                    Header: {
-                        AccountID: AccountIDs[0],
-                    },
-                    UserID, // 用户ID,必填
-                    AccountID: AccountIDs[0], // 资金账号,必填
-                    WRBargainID: Long.fromString(selectedRow.wrbargainid), // 议价申请单ID,必填
-                    OperateType: 1, // 操作类型,1:撤销2:拒绝
-                    MarketID: Market.GZ, // 市场ID,必填
-                    ClientType: ClientType.Web, // 终端类型
-                    OrderSrc: 1, // 委托来源
-                    ClientSerialNo: v4() // 客户端流水号
-                },
-                complete: () => {
-                    loading.value = false
-                }
-            })
-        }
-
-        // 卖询价操作
-        if ('selldelistingapplyid' in selectedRow) {
-            return zsSellOrderDestingApplyOperate({
-                data: {
-                    Header: {
-                        AccountID: AccountIDs[0],
-                    },
-                    UserID, // 用户ID,必填
-                    AccountID: AccountIDs[0], // 资金账号,必填
-                    SellDelistingApplyID: Long.fromString(selectedRow.selldelistingapplyid), // 卖摘牌申请ID,必填
-                    OperateType: 1, // 操作类型,1:撤销2:拒绝
-                    MarketID: Market.GZ, // 市场ID,必填
-                    ClientType: ClientType.Web, // 终端类型
-                    OrderSrc: 1, // 委托来源
-                    ClientSerialNo: v4(), // 客户端流水号
-                },
-                complete: () => {
-                    loading.value = false
-                }
-            })
-        }
-
-        loading.value = false
-        return Promise.reject('参数错误')
-    }
-
-    return {
-        loading,
-        formSubmit,
-    }
 }

+ 44 - 235
src/business/trade/list.ts

@@ -1,8 +1,7 @@
-import { shallowRef, reactive } from 'vue'
+import { shallowRef, ref } from 'vue'
 import { useDataTable } from '@/hooks/datatable'
-import { FilterSelect, FilterButton } from '@/hooks/datatable/interface'
 import { getTableColumns } from '@/business/table'
-import { queryBuyOrder, querySellOrder, queryMyBuyOrder, queryMySellOrder, queryMyDeListing, queryMyBargainApply, queryMyDelistingApply } from '@/services/api/trade'
+import { queryBuyOrder, querySellOrder, queryMyBuyOrder, queryMySellOrder, queryMyDeListing } from '@/services/api/trade'
 import { sessionData } from '@/stores'
 import { getBuyOrSellList, BuyOrSell } from '@/constants/order'
 import { Category } from '@/constants/diamond'
@@ -156,6 +155,11 @@ export function useSaleOrder() {
     const loading = shallowRef(false)
     const columns = shallowRef(getTableColumns('listing_saleorder'))
 
+    const filterData = ref<{ history: boolean, date: string[] }>({
+        history: false,
+        date: []
+    })
+
     selectList.value = [
         {
             label: '商品分类',
@@ -170,6 +174,10 @@ export function useSaleOrder() {
     ]
 
     filterMethod.onReset = () => {
+        filterData.value = {
+            history: false,
+            date: []
+        }
         getSaleOrderList()
     }
 
@@ -179,8 +187,10 @@ export function useSaleOrder() {
 
     // 获取我的出售列表
     const getSaleOrderList = () => {
+        const { history: ishis, date: [begindate, enddate] } = filterData.value || []
         const param = getQueryParam()
         loading.value = true
+
         return queryMySellOrder({
             data: {
                 page: pageIndex.value,
@@ -189,6 +199,9 @@ export function useSaleOrder() {
                 zscategorys: param.zscategory ? param.zscategory.toString() : categoryList.map((e) => e.value).join(','),
                 wrtradeorderid: param.wrtradeorderid,
                 zsallproperties: param.goodsno,
+                ishis,
+                begindate,
+                enddate,
             },
             success: (res) => {
                 total.value = res.total
@@ -207,6 +220,7 @@ export function useSaleOrder() {
         pageIndex,
         pageSize,
         columns,
+        filterData,
         inputList,
         selectList,
         buttonList,
@@ -222,6 +236,11 @@ export function usePurchaseOrder() {
     const loading = shallowRef(false)
     const columns = shallowRef(getTableColumns('listing_purchaseorder'))
 
+    const filterData = ref<{ history: boolean, date: string[] }>({
+        history: false,
+        date: []
+    })
+
     selectList.value = [
         {
             label: '商品分类',
@@ -236,6 +255,10 @@ export function usePurchaseOrder() {
     ]
 
     filterMethod.onReset = () => {
+        filterData.value = {
+            history: false,
+            date: []
+        }
         getPurchaseOrderList()
     }
 
@@ -245,8 +268,10 @@ export function usePurchaseOrder() {
 
     // 获取我的求购列表
     const getPurchaseOrderList = () => {
+        const { history: ishis, date: [begindate, enddate] } = filterData.value || []
         const param = getQueryParam()
         loading.value = true
+
         return queryMyBuyOrder({
             data: {
                 page: pageIndex.value,
@@ -255,6 +280,9 @@ export function usePurchaseOrder() {
                 zscategorys: param.zscategory ? param.zscategory.toString() : categoryList.map((e) => e.value).join(','),
                 wrtradeorderid: param.wrtradeorderid,
                 zsallproperties: param.zstabledisplay,
+                ishis,
+                begindate,
+                enddate,
             },
             success: (res) => {
                 total.value = res.total
@@ -273,6 +301,7 @@ export function usePurchaseOrder() {
         pageIndex,
         pageSize,
         columns,
+        filterData,
         inputList,
         selectList,
         buttonList,
@@ -287,6 +316,8 @@ export function useDelistingOrder() {
     const { dataList, total, pageIndex, pageSize, inputList, selectList, buttonList, filterMethod, getQueryParam } = useDataTable<Ermcp.MyDeListingRsp>()
     const loading = shallowRef(false)
     const columns = shallowRef(getTableColumns('listing_delisting'))
+    const filterDate = shallowRef<string[]>([])
+    const buyOrSell = shallowRef(BuyOrSell.Buy) // 根据查询的方向固定显示
 
     selectList.value = [
         {
@@ -299,7 +330,7 @@ export function useDelistingOrder() {
         {
             label: '方向',
             key: 'buyorsell',
-            selectedValue: BuyOrSell.Buy,
+            selectedValue: buyOrSell.value,
             noClear: true,
             options: getBuyOrSellList(),
         },
@@ -311,6 +342,7 @@ export function useDelistingOrder() {
     ]
 
     filterMethod.onReset = () => {
+        filterDate.value = []
         getDelistingOrderList()
     }
 
@@ -320,8 +352,10 @@ export function useDelistingOrder() {
 
     // 获取我的摘牌列表
     const getDelistingOrderList = () => {
+        const [begindate, enddate] = filterDate.value || []
         const param = getQueryParam()
         loading.value = true
+
         return queryMyDeListing({
             data: {
                 page: pageIndex.value,
@@ -330,10 +364,13 @@ export function useDelistingOrder() {
                 buyorsell: param.buyorsell,
                 matchusername: param.matchusername,
                 zscategorys: param.zscategory ? param.zscategory.toString() : categoryList.map((e) => e.value).join(','),
-                zsallproperties: param.goodsno
+                zsallproperties: param.goodsno,
+                begindate,
+                enddate,
             },
             success: (res) => {
                 total.value = res.total
+                buyOrSell.value = Number(selectList.value[1].selectedValue ?? -1)
                 dataList.value = res.data
             },
             complete: () => {
@@ -348,240 +385,12 @@ export function useDelistingOrder() {
         total,
         pageIndex,
         pageSize,
+        buyOrSell,
         columns,
+        filterDate,
         inputList,
         selectList,
         buttonList,
         getDelistingOrderList,
     }
-}
-
-/**
- * 我的询价
- */
-export function useBargainOrder(type: 0 | 1) {
-    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp>()
-    const loading = shallowRef(false)
-    const columns = shallowRef<Ermcp.TableColumn[]>([])
-
-    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
-        {
-            label: '询价',
-            key: 'buyorsell',
-            selectedValue: BuyOrSell.Buy,
-            options: [
-                { label: '我的求购', value: BuyOrSell.Buy },
-                { label: '我的出售', value: BuyOrSell.Sell }
-            ],
-        },
-        {
-            label: '状态',
-            key: 'status',
-            selectedValue: 1,
-            options: [
-                { label: '全部', value: 0 },
-                { label: '待确认', value: 1 }
-            ],
-        },
-    ])
-
-    const buttonList: FilterButton[] = [
-        {
-            lable: '查询',
-            className: 'el-button--primary',
-            onClick: () => {
-                pageIndex.value = 1
-                getBargainOrderList()
-            }
-        },
-    ]
-
-    // 获取我的询价列表
-    const getBargainOrderList = () => {
-        loading.value = true
-        dataList.value = []
-
-        const [buyOrSell, applyStatus] = selectList
-        const param: Ermcp.MyBargainApplyReq | Ermcp.MyDelistingApplyReq = {
-            type,
-            page: pageIndex.value,
-            pagesize: pageSize.value,
-            userid: sessionData.getLoginInfo('UserID'),
-            applystatus: applyStatus.selectedValue,
-        }
-
-        switch (buyOrSell.selectedValue) {
-            case BuyOrSell.Buy: {
-                columns.value = getTableColumns('listing_bargain_buy')
-                return queryMyBargainApply({
-                    data: param,
-                    success: (res) => {
-                        total.value = res.total
-                        dataList.value = res.data
-                    },
-                    complete: () => {
-                        loading.value = false
-                    }
-                })
-            }
-            case BuyOrSell.Sell: {
-                columns.value = getTableColumns('listing_bargain_sell')
-                return queryMyDelistingApply({
-                    data: param,
-                    success: (res) => {
-                        total.value = res.total
-                        dataList.value = res.data
-                    },
-                    complete: () => {
-                        loading.value = false
-                    }
-                })
-            }
-            default: {
-                return Promise.reject('参数错误')
-            }
-        }
-    }
-
-    return {
-        loading,
-        dataList,
-        total,
-        pageIndex,
-        pageSize,
-        columns,
-        selectList,
-        buttonList,
-        getBargainOrderList,
-    }
-}
-
-/**
- * 我的询价-求购
- */
-export function useBargainBuyOrder(type: 0 | 1) {
-    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyBargainApplyRsp>()
-    const loading = shallowRef(false)
-    const columns = shallowRef(getTableColumns('bargain_buy'))
-
-    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
-        {
-            label: '状态',
-            key: 'status',
-            selectedValue: 1,
-            options: [
-                { label: '全部', value: 0 },
-                { label: '待确认', value: 1 }
-            ],
-        },
-    ])
-
-    const buttonList: FilterButton[] = [
-        {
-            lable: '查询',
-            className: 'el-button--primary',
-            onClick: () => {
-                pageIndex.value = 1
-                getBargainOrderList()
-            }
-        },
-    ]
-
-    // 获取我的询价列表
-    const getBargainOrderList = () => {
-        loading.value = true
-        return queryMyBargainApply({
-            data: {
-                type,
-                page: pageIndex.value,
-                pagesize: pageSize.value,
-                userid: sessionData.getLoginInfo('UserID'),
-                applystatus: selectList[0].selectedValue,
-            },
-            success: (res) => {
-                total.value = res.total
-                dataList.value = res.data
-            },
-            complete: () => {
-                loading.value = false
-            }
-        })
-    }
-
-    return {
-        loading,
-        dataList,
-        total,
-        pageIndex,
-        pageSize,
-        columns,
-        selectList,
-        buttonList,
-        getBargainOrderList,
-    }
-}
-
-/**
- * 我的询价-出售
- */
-export function useBargainSellOrder(type: 0 | 1) {
-    const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.MyDelistingApplyRsp>()
-    const loading = shallowRef(false)
-    const columns = shallowRef(getTableColumns('bargain_sell'))
-
-    const selectList = reactive<FilterSelect<{ buyorsell: number, status: number }>[]>([
-        {
-            label: '状态',
-            key: 'status',
-            selectedValue: 1,
-            options: [
-                { label: '全部', value: 0 },
-                { label: '待确认', value: 1 }
-            ],
-        },
-    ])
-
-    const buttonList: FilterButton[] = [
-        {
-            lable: '查询',
-            className: 'el-button--primary',
-            onClick: () => {
-                pageIndex.value = 1
-                getBargainOrderList()
-            }
-        },
-    ]
-
-    // 获取我的询价列表
-    const getBargainOrderList = () => {
-        loading.value = true
-        return queryMyDelistingApply({
-            data: {
-                type,
-                page: pageIndex.value,
-                pagesize: pageSize.value,
-                userid: sessionData.getLoginInfo('UserID'),
-                applystatus: selectList[0].selectedValue,
-            },
-            success: (res) => {
-                total.value = res.total
-                dataList.value = res.data
-            },
-            complete: () => {
-                loading.value = false
-            }
-        })
-    }
-
-    return {
-        loading,
-        dataList,
-        total,
-        pageIndex,
-        pageSize,
-        columns,
-        selectList,
-        buttonList,
-        getBargainOrderList,
-    }
 }

+ 24 - 3
src/constants/order.ts

@@ -1,4 +1,5 @@
 import { getEnumTypes, getEnumTypeName, getEnumTypeList } from './index'
+import { sessionData } from '@/stores'
 
 const enumKeys = ['wrApplyStatus'] as const
 const enumMap = getEnumTypes(...enumKeys)
@@ -17,8 +18,8 @@ export enum BuyOrSell {
  */
 export function getBuyOrSellList() {
     return [
-        { label: '买', value: BuyOrSell.Buy },
-        { label: '', value: BuyOrSell.Sell },
+        { label: '买', value: BuyOrSell.Buy },
+        { label: '出售', value: BuyOrSell.Sell },
     ]
 }
 
@@ -54,7 +55,7 @@ export function getApplyStatusName(value: number) {
 }
 
 /**
- * 履约步骤类型
+ * 履约步骤
  */
 export enum StepType {
     Payment = 1, // 买方支付
@@ -65,4 +66,24 @@ export enum StepType {
     SendInvoice = 6, // 卖方发票
     ConfirmInvoice = 7, // 买方确认票
     WRMove = 8, // 仓单转移
+}
+
+/**
+ * 获取履约步骤列表
+ * @returns 
+ */
+export function getStepTypeList() {
+    const stepTypes = sessionData.getValue('performanceStepTypes')
+    return stepTypes.map((e) => ({
+        label: e.steptypename,
+        value: e.steptypeid,
+    }))
+}
+
+/**
+ * 获取履约步骤名称
+ * @returns 
+ */
+export function getStepTypeName(value: number) {
+    return getEnumTypeName(getStepTypeList(), value)
 }

+ 3 - 3
src/mock/router.ts

@@ -447,7 +447,7 @@ const appmenu = {
                                 code: 'warehousing_goods_delete',
                                 component: 'views/warehousing/goods/components/delete/index.vue',
                                 buttonName: 'delete',
-                                buttonType: 'primary',
+                                buttonType: 'danger',
                             },
                         ]
                     },
@@ -592,7 +592,7 @@ const appmenu = {
                                 code: 'mine_address_delete',
                                 component: 'views/mine/address/components/delete/index.vue',
                                 buttonName: 'delete',
-                                buttonType: 'primary',
+                                buttonType: 'danger',
                             },
                             {
                                 authType: 3,
@@ -636,7 +636,7 @@ const appmenu = {
                                 code: 'mine_invoice_delete',
                                 component: 'views/mine/invoice/components/delete/index.vue',
                                 buttonName: 'delete',
-                                buttonType: 'primary',
+                                buttonType: 'danger',
                             }
                         ]
                     },

+ 73 - 0
src/packages/pc/views/bargain/buy/components/audit/index.vue

@@ -0,0 +1,73 @@
+<!-- 询价消息-卖方询价-同意/拒绝 -->
+<template>
+    <app-drawer :title="code === 'bargain_sell_agree' ? '同意' : '拒绝'" :width="480" v-model:show="show" :loading="loading"
+        :refresh="refresh">
+        <el-form ref="formRef" label-width="60px" :model="formData" :rules="formRules">
+            <el-form-item>
+                <span>是否{{ code === 'bargain_sell_agree' ? '同意' : '拒绝' }}此询价?</span>
+            </el-form-item>
+            <el-form-item label="备注" prop="AuditRemark">
+                <el-input type="textarea" :rows="3" v-model="formData.AuditRemark" />
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <el-button @click="onCancel(false)" plain>取消</el-button>
+            <el-button type="primary" @click="onSubmit">确认</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import type { FormInstance, FormRules } from 'element-plus'
+import { useBargainOperate } from '@/business/bargain'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const props = defineProps({
+    code: String,
+    selectedRow: {
+        type: Object as PropType<Ermcp.MyBargainApplyRsp>,
+        default: () => ({})
+    },
+})
+
+const operateType = (() => {
+    switch (props.code) {
+        case 'bargain_buy_agree': {
+            return 3
+        }
+        case 'bargain_buy_refuse': {
+            return 2
+        }
+    }
+    return 0
+})()
+
+const { loading, formData, formSubmit } = useBargainOperate(props.selectedRow)
+const show = ref(true)
+const refresh = ref(false)
+const formRef = ref<FormInstance>()
+
+const formRules: FormRules = {
+    AuditRemark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            formSubmit(operateType).then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
+    })
+}
+</script>

+ 2 - 2
src/packages/pc/views/bargain/buy/index.vue

@@ -25,14 +25,14 @@
 
 <script lang="ts" setup>
 import { ElMessage } from 'element-plus'
-import { useBargainBuyOrder } from '@/business/trade/list'
+import { useBuyBargain } from '@/business/bargain'
 import { getApplyStatusName, ApplyStatus } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useBargainBuyOrder(1)
+const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useBuyBargain(1)
 
 // “待确认”有操作 ”同意“、”拒绝“
 const handleTableButtons = (row: Ermcp.MyBargainApplyRsp) => {

+ 45 - 13
src/packages/pc/views/bargain/sell/components/audit/index.vue

@@ -1,6 +1,15 @@
+<!-- 询价消息-卖方询价-同意/拒绝 -->
 <template>
-    <app-drawer title="提示" v-model:show="show" :loading="loading" :refresh="refresh">
-        <div style="font-size:16px;text-align:center">是否收藏该商品?</div>
+    <app-drawer :title="code === 'bargain_sell_agree' ? '同意' : '拒绝'" :width="480" v-model:show="show" :loading="loading"
+        :refresh="refresh">
+        <el-form ref="formRef" label-width="60px" :model="formData" :rules="formRules">
+            <el-form-item>
+                <span>是否{{ code === 'bargain_sell_agree' ? '同意' : '拒绝' }}此询价?</span>
+            </el-form-item>
+            <el-form-item label="备注" prop="AuditRemark">
+                <el-input type="textarea" :rows="3" v-model="formData.AuditRemark" />
+            </el-form-item>
+        </el-form>
         <template #footer>
             <el-button @click="onCancel(false)" plain>取消</el-button>
             <el-button type="primary" @click="onSubmit">确认</el-button>
@@ -9,21 +18,40 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType } from 'vue'
+import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
-import { useDiamondFavorite } from '@/business/goods'
+import type { FormInstance, FormRules } from 'element-plus'
+import { useBargainOperate } from '@/business/bargain'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({
+    code: String,
     selectedRow: {
-        type: Object as PropType<Ermcp.MyWRPositionRsp | Ermcp.SellOrderRsp>,
+        type: Object as PropType<Ermcp.MyDelistingApplyRsp>,
         default: () => ({})
     },
 })
 
-const { loading, formSubmit } = useDiamondFavorite(props.selectedRow)
-const show = shallowRef(true)
-const refresh = shallowRef(false)
+const operateType = (() => {
+    switch (props.code) {
+        case 'bargain_sell_agree': {
+            return 3
+        }
+        case 'bargain_sell_refuse': {
+            return 2
+        }
+    }
+    return 0
+})()
+
+const { loading, formData, formSubmit } = useBargainOperate(props.selectedRow)
+const show = ref(true)
+const refresh = ref(false)
+const formRef = ref<FormInstance>()
+
+const formRules: FormRules = {
+    AuditRemark: [{ required: true, message: '请输入备注', trigger: 'blur' }],
+}
 
 const onCancel = (isRefresh = false) => {
     show.value = false
@@ -31,11 +59,15 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    formSubmit(1).then(() => {
-        ElMessage.success('提交成功')
-        onCancel(true)
-    }).catch((err) => {
-        ElMessage.error('提交失败:' + err)
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            formSubmit(operateType).then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
     })
 }
 </script>

+ 2 - 2
src/packages/pc/views/bargain/sell/index.vue

@@ -25,14 +25,14 @@
 
 <script lang="ts" setup>
 import { ElMessage } from 'element-plus'
-import { useBargainSellOrder } from '@/business/trade/list'
+import { useSellBargain } from '@/business/bargain'
 import { getApplyStatusName, ApplyStatus } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useBargainSellOrder(1)
+const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useSellBargain(1)
 
 // “待确认”有操作 ”同意“、”拒绝“
 const handleTableButtons = (row: Ermcp.MyBargainApplyRsp) => {

+ 1 - 1
src/packages/pc/views/mine/profile/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view>
         <el-descriptions title="会员信息" :column="2" style="padding:20px">
-            <el-descriptions-item label="登录代码">{{ loginInfo.logincode }}</el-descriptions-item>
+            <el-descriptions-item label="登录代码">{{ handleNoneValue(loginInfo.logincode) }}</el-descriptions-item>
             <el-descriptions-item label="企业名称">{{ handleNoneValue(userInfo.customername) }}</el-descriptions-item>
             <el-descriptions-item label="登录账号">{{ loginInfo.loginid }}</el-descriptions-item>
             <el-descriptions-item label="手机号">{{ handleNoneValue(userInfo.mobile2) }}</el-descriptions-item>

+ 2 - 1
src/packages/pc/views/order/main/components/contracted/index.vue

@@ -6,7 +6,7 @@
                 <span>{{ selectedRow.relatedorderid }}</span>
             </el-form-item>
             <el-form-item label="当前步骤">
-                <span>{{ selectedRow.steptypeid }}</span>
+                <span>{{ getStepTypeName(selectedRow.steptypeid) }}</span>
             </el-form-item>
             <el-form-item label="备注" prop="ApplyRemark">
                 <el-input type="textarea" :rows="3" v-model="formData.ApplyRemark" />
@@ -26,6 +26,7 @@
 import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
+import { getStepTypeName } from '@/constants/order'
 import { usePerformanceContracted } from '@/business/order'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppUpload from '@/components/base/upload/index.vue'

+ 2 - 1
src/packages/pc/views/order/main/components/delay/index.vue

@@ -6,7 +6,7 @@
                 <span>{{ selectedRow.relatedorderid }}</span>
             </el-form-item>
             <el-form-item label="当前步骤">
-                <span>{{ selectedRow.steptypeid }}</span>
+                <span>{{ getStepTypeName(selectedRow.steptypeid) }}</span>
             </el-form-item>
             <el-form-item label="申请延期天数" prop="delaydays">
                 <el-input type="number" placeholder="请输入" v-model.number="formData.delaydays" />
@@ -26,6 +26,7 @@
 import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
+import { getStepTypeName } from '@/constants/order'
 import { usePerformanceDelay } from '@/business/order'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 

+ 2 - 1
src/packages/pc/views/order/main/components/manual/index.vue

@@ -3,7 +3,7 @@
     <app-drawer title="手动执行" :width="480" v-model:show="show" :loading="loading" :refresh="refresh">
         <el-form ref="formRef" label-width="60px" :model="formData" :rules="formRules">
             <el-form-item>
-                <span>是否执行当前步骤【卖方支付】?</span>
+                <span>是否执行当前步骤【{{ getStepTypeName(selectedRow.steptypeid) }}】?</span>
             </el-form-item>
             <el-form-item label="备注" prop="StepRemark">
                 <el-input type="textarea" :rows="3" v-model="formData.StepRemark" />
@@ -20,6 +20,7 @@
 import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
+import { getStepTypeName } from '@/constants/order'
 import { usePerformanceManual } from '@/business/order'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 

+ 23 - 4
src/packages/pc/views/order/main/index.vue

@@ -2,7 +2,14 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter v-bind="{ inputList, buttonList }" :loading="loading" />
+            <app-filter v-bind="{ inputList, buttonList }" :loading="loading">
+                <template #after>
+                    <el-checkbox label="历史" v-model="filterData.history" />
+                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                        value-format="YYYYMMDD" v-model="filterData.date" v-if="filterData.history"
+                        style="margin-left:12px" />
+                </template>
+            </app-filter>
         </template>
         <app-table :data="dataList" v-model:columns="columns" :loading="loading">
             <!-- 已付金额 -->
@@ -13,9 +20,14 @@
             <template #freezeamountremain="{ row }">
                 {{ row.buyorsell === BuyOrSell.Buy ? row.buyerfreezeamountremain : row.sellerfreezeamountremain }}
             </template>
+            <!-- 履约步骤 -->
+            <template #steptypeid="{ value }">
+                {{ getStepTypeName(value) }}
+            </template>
             <!-- 操作 -->
             <template #operate="{ row }">
-                <app-auth-operation :options="{ selectedRow: row }" @closed="getPerformanceList" />
+                <app-auth-operation :menus="handleTableButtons(row)" :options="{ selectedRow: row }"
+                    @closed="getPerformanceList" />
             </template>
             <template #footer>
                 <app-pagination :total="total" v-model:page-size="pageSize" v-model:page-index="pageIndex"
@@ -28,7 +40,7 @@
 <script lang="ts" setup>
 import { ElMessage } from 'element-plus'
 import { useRoute } from 'vue-router'
-import { BuyOrSell } from '@/constants/order'
+import { BuyOrSell, StepType, getStepTypeName } from '@/constants/order'
 import { usePerformance } from '@/business/order'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppTable from '@pc/components/base/table/index.vue'
@@ -48,7 +60,7 @@ const buyorsell = (() => {
     }
 })()
 
-const { loading, dataList, columns, total, pageIndex, pageSize, inputList, buttonList, getPerformanceList } = usePerformance(buyorsell)
+const { loading, dataList, columns, total, pageIndex, pageSize, filterData, inputList, buttonList, getPerformanceList } = usePerformance(buyorsell)
 
 columns.value.forEach((e) => {
     if (e.prop === 'paidamount') {
@@ -60,5 +72,12 @@ columns.value.forEach((e) => {
     }
 })
 
+const handleTableButtons = (item: Ermcp.MyPerformancRsp) => {
+    if ([StepType.Payment, StepType.Pickup, StepType.ConfirmGoods, StepType.ConfirmInvoice].includes(item.steptypeid)) {
+        return ['details', 'manual', 'delay', 'contracted', 'edit']
+    }
+    return ['details', 'contracted', 'edit']
+}
+
 getPerformanceList().catch((err) => ElMessage.error(err))
 </script>

+ 3 - 3
src/packages/pc/views/trade/bargain/components/cancel/index.vue

@@ -12,7 +12,7 @@
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
-import { useInquiryOperate } from '@/business/trade/desting'
+import { useBargainOperate } from '@/business/bargain'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({
@@ -22,7 +22,7 @@ const props = defineProps({
     }
 })
 
-const { loading, formSubmit } = useInquiryOperate(props.selectedRow)
+const { loading, formSubmit } = useBargainOperate(props.selectedRow)
 const show = shallowRef(true)
 const refresh = shallowRef(false)
 
@@ -32,7 +32,7 @@ const onCancel = (isRefresh = false) => {
 }
 
 const onSubmit = () => {
-    formSubmit().then(() => {
+    formSubmit(1).then(() => {
         ElMessage.success('提交成功')
         onCancel(true)
     }).catch((err) => {

+ 2 - 2
src/packages/pc/views/trade/bargain/index.vue

@@ -25,14 +25,14 @@
 
 <script lang="ts" setup>
 import { ElMessage } from 'element-plus'
-import { useBargainOrder } from '@/business/trade/list'
+import { useBargain } from '@/business/bargain'
 import { getApplyStatusName, ApplyStatus } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useBargainOrder(0)
+const { loading, dataList, total, pageIndex, pageSize, columns, selectList, buttonList, getBargainOrderList } = useBargain(0)
 
 // “待确认”状态 有撤销按钮
 const handleTableButtons = (row: Ermcp.MyBargainApplyRsp | Ermcp.MyDelistingApplyRsp) => {

+ 2 - 2
src/packages/pc/views/trade/buy/components/delisting/index.vue

@@ -24,7 +24,7 @@ import { ref, PropType } from 'vue'
 import Long from 'long'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
-import { useSellOrderInquiry } from '@/business/trade/desting'
+import { useSellOrderBargain } from '@/business/trade/desting'
 import AppTable from '@pc/components/base/table/index.vue'
 
 const props = defineProps({
@@ -34,7 +34,7 @@ const props = defineProps({
     }
 })
 
-const { loading, dataList, columns, formData, formSubmit, getDiamondList } = useSellOrderInquiry(props.selectedRow)
+const { loading, dataList, columns, formData, formSubmit, getDiamondList } = useSellOrderBargain(props.selectedRow)
 const formRef = ref<FormInstance>()
 
 const formRules: FormRules = {

+ 9 - 4
src/packages/pc/views/trade/delisting/index.vue

@@ -2,13 +2,18 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading" />
+            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading">
+                <template #after>
+                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                        value-format="YYYYMMDD" v-model="filterDate" />
+                </template>
+            </app-filter>
         </template>
         <!-- 表格数据 -->
         <app-table :data="dataList" v-model:columns="columns" :loading="loading">
             <!-- 类型 -->
-            <template #buyorsell="{ value }">
-                {{ getBuyOrSellName(value) }}
+            <template #buyorsell>
+                {{ getBuyOrSellName(buyOrSell) }}
             </template>
             <!-- 操作 -->
             <template #operate="{ row }">
@@ -32,7 +37,7 @@ import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, inputList, buttonList, getDelistingOrderList } = useDelistingOrder()
+const { loading, dataList, total, pageIndex, pageSize, buyOrSell, columns, filterDate, selectList, inputList, buttonList, getDelistingOrderList } = useDelistingOrder()
 
 getDelistingOrderList().catch((err) => ElMessage.error(err))
 </script>

+ 9 - 2
src/packages/pc/views/trade/purchase/index.vue

@@ -2,7 +2,14 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading" />
+            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading">
+                <template #after>
+                    <el-checkbox label="历史" v-model="filterData.history" />
+                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                        value-format="YYYYMMDD" v-model="filterData.date" v-if="filterData.history"
+                        style="margin-left:12px" />
+                </template>
+            </app-filter>
         </template>
         <!-- 表格数据 -->
         <app-table :data="dataList" v-model:columns="columns" :loading="loading">
@@ -30,7 +37,7 @@ import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, inputList, buttonList, getPurchaseOrderList } = usePurchaseOrder()
+const { loading, dataList, total, pageIndex, pageSize, filterData, columns, selectList, inputList, buttonList, getPurchaseOrderList } = usePurchaseOrder()
 
 // 3:委托成功 7:部成 -  状态有撤销
 const handleTableButtons = (row: Ermcp.MyBuyOrderRsp) => {

+ 9 - 2
src/packages/pc/views/trade/sale/index.vue

@@ -2,7 +2,14 @@
 <template>
     <app-view>
         <template #header>
-            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading" />
+            <app-filter v-bind="{ selectList, inputList, buttonList }" :loading="loading">
+                <template #after>
+                    <el-checkbox label="历史" v-model="filterData.history" />
+                    <el-date-picker type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                        value-format="YYYYMMDD" v-model="filterData.date" v-if="filterData.history"
+                        style="margin-left:12px" />
+                </template>
+            </app-filter>
         </template>
         <!-- 表格数据 -->
         <app-table :data="dataList" v-model:columns="columns" :loading="loading">
@@ -30,7 +37,7 @@ import AppPagination from '@pc/components/base/pagination/index.vue'
 import AppAuthOperation from '@pc/components/modules/auth-operation/index.vue'
 import AppFilter from '@pc/components/base/table-filter/index.vue'
 
-const { loading, dataList, total, pageIndex, pageSize, columns, selectList, inputList, buttonList, getSaleOrderList } = useSaleOrder()
+const { loading, dataList, total, pageIndex, pageSize, filterData, columns, selectList, inputList, buttonList, getSaleOrderList } = useSaleOrder()
 
 // 3:委托成功 7:部成 -  状态有撤销
 const handleTableButtons = (row: Ermcp.MySellOrderRsp) => {

+ 3 - 3
src/packages/pc/views/warehousing/goods/components/inquiry/index.vue → src/packages/pc/views/warehousing/goods/components/bargain/index.vue

@@ -23,17 +23,17 @@
 import { ref, PropType } from 'vue'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
-import { useBuyOrderInquiry } from '@/business/trade/desting'
+import { useBuyOrderBargain } from '@/business/trade/desting'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({
     selectedRow: {
-        type: Object as PropType<Ermcp.MyWRPositionRsp>,
+        type: Object as PropType<Ermcp.DiamondDetailsRsp>,
         default: () => ({})
     }
 })
 
-const { loading, formData, formSubmit } = useBuyOrderInquiry(props.selectedRow)
+const { loading, formData, formSubmit } = useBuyOrderBargain(props.selectedRow)
 const formRef = ref<FormInstance>()
 const show = ref(true)
 

+ 2 - 2
src/packages/pc/views/warehousing/goods/components/details/index.vue

@@ -8,7 +8,7 @@
                     <template v-if="showButton && details.wrtradeorderid">
                         <el-button type="primary" @click="openComponent('favorite')">收藏</el-button>
                         <el-button type="primary" @click="openComponent('buy')">立即购买</el-button>
-                        <el-button type="primary" @click="openComponent('inquiry')">询价申请</el-button>
+                        <el-button type="primary" @click="openComponent('bargain')">询价申请</el-button>
                     </template>
                 </div>
             </template>
@@ -123,7 +123,7 @@ import { useDiamondDetails } from '@/business/goods'
 const componentMap = new Map<string, unknown>([
     ['favorite', defineAsyncComponent(() => import('../favorite/index.vue'))], // 收藏
     ['buy', defineAsyncComponent(() => import('../buy/index.vue'))], // 立即购买
-    ['inquiry', defineAsyncComponent(() => import('../inquiry/index.vue'))] // 询价申请
+    ['bargain', defineAsyncComponent(() => import('../bargain/index.vue'))] // 询价申请
 ])
 
 const props = defineProps({

+ 15 - 0
src/stores/modules/storage.ts

@@ -1,5 +1,6 @@
 import { queryAllEnums, queryNewFuncmenu, queryTableDefine, queryErrorInfos } from '@/services/api/common'
 import { queryAccountMenu } from '@/services/api/account'
+import { queryWrPerformanceStepType } from '@/services/api/performance'
 import { AppTheme } from '@/constants/theme'
 import { Language } from '@/constants/language'
 import WebStorage from '@/utils/storage'
@@ -117,6 +118,20 @@ export const sessionData = new (class extends WebStorage<Store.GlobalStorage>{
     }
 
     /**
+     * 获取履约步骤列表
+     */
+    getPerformanceStepList = () => {
+        if (this.getValue('performanceStepTypes').length) {
+            return Promise.resolve()
+        }
+        return queryWrPerformanceStepType({
+            success: (res) => {
+                this.setValue('performanceStepTypes', res.data)
+            }
+        })
+    }
+
+    /**
      * 获取系统错误信息
      * @returns 
      */

+ 6 - 2
src/types/ermcp/trade.d.ts

@@ -194,7 +194,9 @@ declare namespace Ermcp {
         zsallproperties?: string; // 商品(查询字段-模糊查询)
         zscategorys?: string; // 钻石分类, 格式:1,2,3
         wrtradeorderid?: string; // 委托单号
-        ishis?: string; // 是否历史查询
+        ishis?: boolean; // 是否历史查询
+        begindate?: string; // 开始交易日(yyyymmdd)
+        enddate?: string; // 结束交易日(yyyymmdd)
     }
 
     /** 查询我的出售响应 */
@@ -299,7 +301,9 @@ declare namespace Ermcp {
         zsallproperties?: string; // 商品(查询字段-模糊查询)
         zscategorys?: string; // 钻石分类, 格式:1,2,3
         wrtradeorderid?: string; // 委托单号
-        ishis?: string; // 是否历史查询
+        ishis?: boolean; // 是否历史查询
+        begindate?: string; // 开始交易日(yyyymmdd)
+        enddate?: string; // 结束交易日(yyyymmdd)
     }
 
     /** 查询我的求购响应 */