|
@@ -1,288 +1,5 @@
|
|
|
-import { reactive, shallowRef } from 'vue'
|
|
|
|
|
-import { useDataTable } from '@/hooks/datatable'
|
|
|
|
|
-import {
|
|
|
|
|
- queryWrOrderDetail,
|
|
|
|
|
- queryWrTradeDetail,
|
|
|
|
|
- queryTHJPurchaseTradeDetail,
|
|
|
|
|
- queryHoldLB, queryWrOutInApply,
|
|
|
|
|
- queryTHJPromotionIncome,
|
|
|
|
|
- queryTHJPromotionIncomeDetail,
|
|
|
|
|
- queryTHJPurchaseTransferOrder,
|
|
|
|
|
- queryTHJPurchaseTransferOrderDetail
|
|
|
|
|
-} from '@/services/api/order'
|
|
|
|
|
-import { loginStore } from '@/stores'
|
|
|
|
|
-
|
|
|
|
|
-const { userId, firstAccountId } = loginStore.$mapGetters()
|
|
|
|
|
-
|
|
|
|
|
-// 查询仓单持有记录
|
|
|
|
|
-export function useQueryHoldLB() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.HoldLBRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getHoldLB = async (warehouseid?: number, deliverygoodsid?: number, wrstandardid?: number, wrfactortypeid?: string, dgitemname?: string) => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryHoldLB({
|
|
|
|
|
- accountid: firstAccountId.value,
|
|
|
|
|
- warehouseid,
|
|
|
|
|
- deliverygoodsid,
|
|
|
|
|
- wrstandardid,
|
|
|
|
|
- wrfactortypeid,
|
|
|
|
|
- dgitemname,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getHoldLB,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询提货申请
|
|
|
|
|
-export function useQueryWrOutInApply() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.WrOutInApplyRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getWrOutInApply = async (begindate?: string, enddate?: string) => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryWrOutInApply({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- begindate: begindate,
|
|
|
|
|
- enddate: enddate,
|
|
|
|
|
- page: 1,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getWrOutInApply,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询仓单委托单
|
|
|
|
|
-export function useQueryWrOrderDetail() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.WrOrderDetailRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const formData = reactive<Partial<Model.WrOrderDetailReq>>({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- haswr: 1,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- const getWrOrderDetail = async () => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryWrOrderDetail(formData).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getWrOrderDetail,
|
|
|
|
|
- formData
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询仓单成交明细
|
|
|
|
|
-export function useQueryWrTradeDetail() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.WrTradeDetailRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const formData = reactive<Partial<Model.WrTradeDetailReq>>({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- haswr: 1,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- const getWrTradeDetail = async () => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryWrTradeDetail(formData).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getWrTradeDetail,
|
|
|
|
|
- formData
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询我的订单-采购订单
|
|
|
|
|
-export function useTHJPurchaseTradeDetail() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJPurchaseTradeDetailRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getTHJPurchaseTradeDetail = async (type?: number) => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryTHJPurchaseTradeDetail({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- type: type,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getTHJPurchaseTradeDetail,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询我的推广-推广收益
|
|
|
|
|
-export function useQueryTHJPromotionIncome() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJPromotionIncomeRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getTHJPromotionIncome = async (status?: number) => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryTHJPromotionIncome({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- profitstatus: status,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data.map((e) => ({
|
|
|
|
|
- ...e,
|
|
|
|
|
- profitstatus: status ?? e.profitstatus
|
|
|
|
|
- }))
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getTHJPromotionIncome,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询我的推广-推广收益-明细
|
|
|
|
|
-export function useQueryTHJPromotionIncomeDetail(month: string) {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJPromotionIncomeDetailRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getTHJPromotionIncomeDetail = async () => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryTHJPromotionIncomeDetail({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- mouth: month,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getTHJPromotionIncomeDetail,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-// 查询我的订单-转让/受让订单
|
|
|
|
|
-export function useQueryTHJPurchaseTransferOrder() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJPurchaseTransferOrderRsp>()
|
|
|
|
|
- const loading = shallowRef(false)
|
|
|
|
|
-
|
|
|
|
|
- const getTHJPurchaseTransferOrder = async (ordertype: number) => {
|
|
|
|
|
- loading.value = true
|
|
|
|
|
- await queryTHJPurchaseTransferOrder({
|
|
|
|
|
- userid: userId.value,
|
|
|
|
|
- page: pageIndex.value,
|
|
|
|
|
- pagesize: pageSize.value,
|
|
|
|
|
- ordertype: ordertype
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- total.value = res.total
|
|
|
|
|
- dataList.value = res.data
|
|
|
|
|
- }).finally(() => {
|
|
|
|
|
- loading.value = false
|
|
|
|
|
- })
|
|
|
|
|
- return dataList.value
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return {
|
|
|
|
|
- loading,
|
|
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- pageCount,
|
|
|
|
|
- getTHJPurchaseTransferOrder,
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
|
|
+import { shallowRef } from 'vue'
|
|
|
|
|
+import { queryTHJPurchaseTransferOrderDetail } from '@/services/api/order'
|
|
|
|
|
|
|
|
// 查询我的订单-转让/受让订单详情
|
|
// 查询我的订单-转让/受让订单详情
|
|
|
export function useQueryTTHJPurchaseTransferOrderDetail(transferid: string) {
|
|
export function useQueryTTHJPurchaseTransferOrderDetail(transferid: string) {
|