Handy_Cao 2 年之前
父節點
當前提交
20e9f3b5af
共有 1 個文件被更改,包括 3 次插入17 次删除
  1. 3 17
      src/packages/pc/views/footer/goods/order/index.vue

+ 3 - 17
src/packages/pc/views/footer/goods/order/index.vue

@@ -42,12 +42,9 @@ import { useLocalPagination } from '@/hooks/pagination'
 import { getBuildTypeName, getBuyOrSellName, getOrderStatusName } from '@/constants/order'
 import { queryTradeOrderDetail } from '@/services/api/order'
 import AppTable from '@pc/components/base/table/index.vue'
-import { formatDate, handleRequestBigNumber } from '@/filters'
+import { formatDate } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import eventBus from '@/services/bus'
-import { ElMessage } from 'element-plus'
-import { useCancelOrder } from '@/business/trade'
-const { cancelSubmit, formData } = useCancelOrder()
 
 const componentMap = new Map<string, unknown>([
     ['cancel', defineAsyncComponent(() => import('./cancel/index.vue'))], // 撤单
@@ -84,19 +81,8 @@ const tableColumns = ref<Model.TableColumn[]>([
 
 /// 双击单据撤销
 const onCancelSumit = (row: Model.TradeOrderDetailRsp) => {
-    const { orderid, marketid, goodsid } = row
-    ///  参数信息
-    formData.Header = { MarketID: marketid, GoodsID: goodsid }
-    formData.OldOrderId = handleRequestBigNumber(orderid)
-    /// 提交
-    cancelSubmit().then(() => {
-        /// 刷新数据
-        run()
-        // 撤单成功
-        ElMessage.success('撤单成功')
-    }).catch((err) => {
-        ElMessage.error('提交失败:' + err)
-    })
+    selectedRows.value = [row]
+    openComponent('cancel')
 }
 
 // 勾选表格行