(Update API paths, adjust configurations, and optimize user and order management functions)
This commit is contained in:
parent
5763c34260
commit
3ae0e73592
|
@ -6,10 +6,16 @@ export function apiGoodsListLists(params: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 库存管理
|
// 库存管理
|
||||||
export function apiGoodsListDetail(params: any) {
|
export function apiStoreProductAttrValue(params: any) {
|
||||||
return request.get({ url: '/consult_target.consult_decision/add12', params })
|
return request.get({ url: '/store_product_attr_value/storeProductAttrValue/lists', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加减库存
|
||||||
|
export function apiStoreProductStock(params: any) {
|
||||||
|
return request.post({ url: '/store_product/storeProduct/stock', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 库存管理
|
// 库存管理
|
||||||
export function apiGoodsTypeLists(params: any) {
|
export function apiGoodsTypeLists(params: any) {
|
||||||
return request.get({ url: '/consult_target.consult_decision/add54', params })
|
return request.get({ url: '/consult_target.consult_decision/add54', params })
|
||||||
|
@ -20,3 +26,5 @@ export function apiGoodsTypeLists(params: any) {
|
||||||
export function apiStatus(params: any) {
|
export function apiStatus(params: any) {
|
||||||
return request.post({ url: '/store_product/storeProduct/status', params })
|
return request.post({ url: '/store_product/storeProduct/status', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
|
@ -0,0 +1,24 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
export function apiStoreOrderLists(params: any) {
|
||||||
|
return request.get({ url: '/store_order/storeOrder/lists', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apiStoreOrderTitle() {
|
||||||
|
return request.get({ url: '/store_order/storeOrder/title' })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apiStoreOrderDetail(params: any) {
|
||||||
|
return request.get({ url: '/store_order/storeOrder/detail', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function apiStoreRefundOrderLists(params: any) {
|
||||||
|
return request.get({ url: '/store_order/storeRefundOrder/lists', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
export function apiStoreRefundOrderDetail(params: any) {
|
||||||
|
return request.get({ url: '/store_order/storeRefundOrder/detail', params })
|
||||||
|
}
|
||||||
|
|
|
@ -10,35 +10,35 @@
|
||||||
<el-image class="w-[50px] h-[50px]" :src="url" :fit="fit" />
|
<el-image class="w-[50px] h-[50px]" :src="url" :fit="fit" />
|
||||||
<div class="flex flex-col ml-3 justify-between">
|
<div class="flex flex-col ml-3 justify-between">
|
||||||
<div style="font-size:16px">
|
<div style="font-size:16px">
|
||||||
【核销订单】
|
【收银订单】
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
订单编号: 5754545
|
订单编号: {{ detailData.order_id }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="flex justify-between w-[70%] mt-[20px]">
|
<ul class="flex justify-between w-[70%] mt-[20px]">
|
||||||
<li>
|
<li>
|
||||||
<div>订单状态</div>
|
<div>订单状态</div>
|
||||||
<div>未核销</div>
|
<div>{{ detailData.status_name }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div>实际支付</div>
|
<div>实际支付</div>
|
||||||
<div>未核销</div>
|
<div>{{ detailData.pay_price }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div>支付方式</div>
|
<div>支付方式</div>
|
||||||
<div>未核销</div>
|
<div>{{ detailData.pay_type }}</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div>支付时间</div>
|
<div>支付时间</div>
|
||||||
<div>未核销</div>
|
<div>{{ detailData.pay_time }}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- content -->
|
<!-- content -->
|
||||||
<el-tabs v-model="activeName" class="mt-[20px]">
|
<el-tabs v-model="activeName" class="mt-[20px]">
|
||||||
<el-tab-pane label="订单信息" name="first">
|
<el-tab-pane label="订单信息" name="first" v-if="Object.keys(detailData).length">
|
||||||
<el-descriptions :column="3" border title="用户信息" class="mb-[30px]"
|
<el-descriptions :column="3" border title="用户信息" class="mb-[30px]"
|
||||||
v-for="(item, index) in orderInfoCongig" :key="index">
|
v-for="(item, index) in orderInfoCongig" :key="index">
|
||||||
<el-descriptions-item :label="el.name" label-class-name="my-label" v-for="el in item.child">
|
<el-descriptions-item :label="el.name" label-class-name="my-label" v-for="el in item.child">
|
||||||
|
@ -48,28 +48,28 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="商品信息" name="second">
|
<el-tab-pane label="商品信息" name="second">
|
||||||
<el-table border :data="formData.detail">
|
<el-table border :data="detailData.product">
|
||||||
<el-table-column label="商品信息" prop="build_area_text" show-overflow-tooltip>
|
<el-table-column label="商品信息" prop="build_area_text" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="flex items-center w-[300px] ">
|
<div class="flex items-center w-[300px] items-center">
|
||||||
<el-image class="w-[50px] h-[50px] mr-2" :src="url" />
|
<el-image class="w-[50px] h-[50px] mr-2" :src="row.cart_info.image" />
|
||||||
受到广泛接
|
<span> {{ row.cart_info.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="价格" prop="project_level_text" show-overflow-tooltip />
|
<el-table-column label="价格" prop="cart_info.price" show-overflow-tooltip />
|
||||||
<el-table-column label="数量" prop="total_investment" show-overflow-tooltip width="120" />
|
<el-table-column label="数量" prop="cart_info.cart_num" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="小计" prop="engineering_status_text" show-overflow-tooltip />
|
<el-table-column label="小计" prop="cart_info.total" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="订单记录" name="third">
|
<!-- <el-tab-pane label="订单记录" name="third">
|
||||||
<el-table border :data="formData.detail2">
|
<el-table border :data="formData.detail2">
|
||||||
<el-table-column label="订单id" prop="project_level_text" show-overflow-tooltip />
|
<el-table-column label="订单id" prop="project_level_text" show-overflow-tooltip />
|
||||||
<el-table-column label="操作记录" prop="total_investment" show-overflow-tooltip width="120" />
|
<el-table-column label="操作记录" prop="total_investment" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="操作时间" prop="engineering_status_text" show-overflow-tooltip />
|
<el-table-column label="操作时间" prop="engineering_status_text" show-overflow-tooltip />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -81,17 +81,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, defineEmits, defineProps } from "vue"
|
import { ref, reactive, defineEmits, defineProps, onMounted } from "vue"
|
||||||
|
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
const url =
|
const url =
|
||||||
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// showDetail: {
|
detailData: {
|
||||||
// type: Boolean,
|
type: Object,
|
||||||
// },
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let form = props.detailData
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
detail: [
|
detail: [
|
||||||
{}
|
{}
|
||||||
|
@ -99,17 +101,20 @@ const formData = reactive({
|
||||||
detail2: [],
|
detail2: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
const orderInfoCongig = reactive([
|
|
||||||
|
|
||||||
|
const orderInfoCongig = ref(
|
||||||
|
[
|
||||||
{
|
{
|
||||||
title: '用户信息',
|
title: '用户信息',
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
name: "用户昵称",
|
name: "用户昵称",
|
||||||
value: '军哥'
|
value: props.detailData?.nickname
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "绑定电话",
|
name: "绑定电话",
|
||||||
value: '19130550023'
|
value: props.detailData?.mobile
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,15 +125,15 @@ const orderInfoCongig = reactive([
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
name: "收货人",
|
name: "收货人",
|
||||||
value: '好天气'
|
value: props.detailData?.real_name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "收获电话",
|
name: "收获电话",
|
||||||
value: '19130550023'
|
value: props.detailData?.user_phone
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "收获地址",
|
name: "收获地址",
|
||||||
value: '19130550023'
|
value: props.detailData?.user_address
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -138,47 +143,32 @@ const orderInfoCongig = reactive([
|
||||||
child: [
|
child: [
|
||||||
{
|
{
|
||||||
name: "创建时间",
|
name: "创建时间",
|
||||||
value: '好天气'
|
value: props.detailData?.create_time
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "商品总数",
|
name: "商品总数",
|
||||||
value: '19130550023'
|
value: props.detailData?.total_num
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "商品总价",
|
name: "商品总价",
|
||||||
value: '19130550023'
|
value: props.detailData?.total_price
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "优惠券金额",
|
name: "店员名称",
|
||||||
value: '好天气'
|
value: props.detailData?.staff_name
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "积分抵扣",
|
|
||||||
value: '19130550023'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "支付邮费",
|
|
||||||
value: '19130550023'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "会员商品优惠",
|
name: "会员商品优惠",
|
||||||
value: '好天气'
|
value: " props.detailData?.total_num"
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "门店名称",
|
|
||||||
value: '19130550023'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "核销码",
|
|
||||||
value: '19130550023'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "支付时间",
|
name: "支付时间",
|
||||||
value: '19130550023'
|
value: props.detailData?.pay_time
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "支付方式",
|
name: "支付方式",
|
||||||
value: '19130550023'
|
value: props.detailData?.pay_type
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -205,6 +195,4 @@ defineExpose({
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -1,21 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
|
||||||
<el-table border :data="formData.detail">
|
<el-table :data="pager.lists">
|
||||||
<el-table-column label="图片" prop="build_area_text" show-overflow-tooltip>
|
<el-table-column label="图片" prop="build_area_text" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-image style="width: 50px; height: 50px" :src="url" /> -->
|
<el-image style="width: 50px; height: 50px" :src="row.image" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品规格" prop="project_level_text" show-overflow-tooltip />
|
<el-table-column label="商品条形码" prop="bar_code" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="商品条形码" prop="total_investment" show-overflow-tooltip width="120" />
|
<el-table-column label="当前库存" prop="stock" show-overflow-tooltip />
|
||||||
<el-table-column label="商品编码" prop="engineering_status_text" show-overflow-tooltip />
|
<el-table-column label="入库数量" prop="engineering_status_text" show-overflow-tooltip width="400">
|
||||||
<el-table-column label="当前库存" prop="engineering_status_text" show-overflow-tooltip />
|
|
||||||
<el-table-column label="入/出库数量" prop="engineering_status_text" show-overflow-tooltip />
|
|
||||||
<!-- <el-table-column label="状态" prop="engineering_status_text" show-overflow-tooltip>
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<div style=" padding:0 10px;display: flex;align-items: center;">
|
||||||
|
<el-radio-group v-model="row.type">
|
||||||
|
<el-radio :label="1">增加</el-radio>
|
||||||
|
<el-radio :label="0">减少</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-input v-model="row.number" clearable placeholder="入库数量" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column> -->
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,6 +28,8 @@
|
||||||
|
|
||||||
<script lang="ts" setup name="manageProjectEdit">
|
<script lang="ts" setup name="manageProjectEdit">
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { apiStoreProductAttrValue, apiStoreProductStock } from '@/api/goodsList'
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
const emit = defineEmits(['success', 'close'])
|
||||||
|
@ -35,31 +42,32 @@ const popupTitle = computed(() => {
|
||||||
return '库存管理'
|
return '库存管理'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
let queryParams = {
|
||||||
const formData = reactive({
|
product_id: "",
|
||||||
id: '',
|
store_id: "",
|
||||||
detail: []
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiStoreProductAttrValue,
|
||||||
|
params: queryParams
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const getTableLists = (query: any) => {
|
||||||
|
queryParams.product_id = query.product_id
|
||||||
|
queryParams.store_id = query.store_id
|
||||||
|
console.log(queryParams)
|
||||||
// 获取详情
|
getLists()
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
for (const key in formData) {
|
|
||||||
if (data[key] != null && data[key] != undefined) {
|
|
||||||
//@ts-ignore
|
|
||||||
formData[key] = data[key]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
let { unique, type, number } = pager.lists[0]
|
||||||
|
await apiStoreProductStock({ unique, type, number })
|
||||||
|
return
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +75,9 @@ const handleSubmit = async () => {
|
||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
@ -77,7 +88,7 @@ const handleClose = () => {
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
setFormData,
|
getTableLists
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -3,31 +3,19 @@
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<!-- <el-col :span="6">
|
||||||
<el-form-item label="商品状态">
|
|
||||||
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品状态">
|
|
||||||
<el-option label="上架中" :value="1" />
|
|
||||||
<el-option label="下架中" :value="2" />
|
|
||||||
<el-option label="已售罄" :value="3" />
|
|
||||||
<el-option label="库存预警" :value="4" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="商品分类" prop="project_code">
|
<el-form-item label="商品分类" prop="project_code">
|
||||||
<!-- <el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品分类">
|
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品分类">
|
||||||
<el-option v-for="(item, index) in typeLists" :key="index" :label="item.name"
|
<el-option v-for="(item, index) in typeLists" :key="index" :label="item.name"
|
||||||
:value="parseInt(item.value)" />
|
:value="parseInt(item.value)" />
|
||||||
</el-select> -->
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="商品搜索">
|
<el-form-item label="商品搜索">
|
||||||
<el-input v-model="queryParams.store_name" clearable placeholder="请输入商品名称" />
|
<el-input v-model="queryParams.store_name" clearable placeholder="请输入商品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
@ -38,6 +26,14 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
|
||||||
|
<el-tab-pane label="全部" name="all"></el-tab-pane>
|
||||||
|
<el-tab-pane label="上架中" name="1"></el-tab-pane>
|
||||||
|
<el-tab-pane label="下架中" name="2"></el-tab-pane>
|
||||||
|
<el-tab-pane label="已售罄" name="3"></el-tab-pane>
|
||||||
|
<el-tab-pane label="库存预警" name="4"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table :data="pager.lists">
|
<el-table :data="pager.lists">
|
||||||
<el-table-column label="商品id" prop="id" show-overflow-tooltip />
|
<el-table-column label="商品id" prop="id" show-overflow-tooltip />
|
||||||
|
@ -47,7 +43,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品名称" prop="store_name" show-overflow-tooltip />
|
<el-table-column label="商品名称" prop="store_name" show-overflow-tooltip />
|
||||||
<el-table-column label="商品售价" prop="price" show-overflow-tooltip width="120" />
|
<el-table-column label="商品售价" prop="price" show-overflow-tooltip />
|
||||||
|
<el-table-column label="商品批发价" prop="wholesale_price" show-overflow-tooltip />
|
||||||
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
||||||
<el-table-column label="库存" prop="stock" show-overflow-tooltip />
|
<el-table-column label="库存" prop="stock" show-overflow-tooltip />
|
||||||
<el-table-column label="状态" prop="engineering_status_text" show-overflow-tooltip>
|
<el-table-column label="状态" prop="engineering_status_text" show-overflow-tooltip>
|
||||||
|
@ -76,14 +73,25 @@
|
||||||
|
|
||||||
<script lang="ts" setup name="manageProjectLists">
|
<script lang="ts" setup name="manageProjectLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { apiGoodsListLists, apiGoodsListDetail, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
import { apiGoodsListLists, apiStoreProductAttrValue, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
||||||
import EditPopup from './detail.vue'
|
import EditPopup from './detail.vue'
|
||||||
import { ref, reactive } from "vue"
|
import { ref, reactive } from "vue"
|
||||||
|
import useUserStore from "@/stores/modules/user";
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showDetail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
const activeName = ref('all')
|
||||||
|
|
||||||
|
const handleClick = (e) => {
|
||||||
|
if (activeName.value == 'all') {
|
||||||
|
queryParams.status = ''
|
||||||
|
} else {
|
||||||
|
queryParams.status = activeName.value
|
||||||
|
|
||||||
|
}
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
|
@ -107,13 +115,14 @@ const changeStatus = (data: any) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let store_id = useUserStore().userInfo.store_id
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any) => {
|
||||||
// let res = await apiGoodsListDetail({ id: data.id })
|
|
||||||
showDetail.value = true
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open('edit')
|
||||||
editRef.value?.setFormData(data)
|
editRef.value?.getTableLists({ product_id: data.product_id, store_id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,59 +4,79 @@
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="商品状态">
|
<el-form-item label="时间筛选">
|
||||||
<el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品状态">
|
<el-date-picker v-model="date" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||||
<el-option label="销售中" :value="0" />
|
end-placeholder="结束时间" value-format="YYYY-MM-DD" :clearable="false" />
|
||||||
<el-option label="仓库中" :value="0" />
|
</el-form-item>
|
||||||
<el-option label="已售罄" :value="0" />
|
</el-col>
|
||||||
<el-option label="库存预警" :value="0" />
|
<el-col :span="6">
|
||||||
|
<el-form-item label="店员">
|
||||||
|
<el-select class="flex-1" v-model="queryParams.staff_id" placeholder="请选择店员">
|
||||||
|
<el-option :label="item.staff_name" :value="item.id" v-for="(item, index) in staffList" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="商品分类" prop="project_code">
|
<el-form-item label="订单编号">
|
||||||
<!-- <el-select class="flex-1" v-model="queryParams.status" clearable placeholder="请选择商品分类">
|
<el-input v-model="queryParams.order_id" clearable placeholder="请输入订单编号" />
|
||||||
<el-option v-for="(item, index) in typeLists" :key="index" :label="item.name"
|
|
||||||
:value="parseInt(item.value)" />
|
|
||||||
</el-select> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="商品搜索" prop="nature">
|
<el-form-item label="支付方式">
|
||||||
<el-input v-model="queryParams.status" clearable placeholder="请输入商品名称" />
|
<el-select class="flex-1" v-model="queryParams.pay_type" placeholder="请选择支付方式">
|
||||||
|
<el-option :label="item" :value="index" v-for="(item, index) in payTypeList" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="handleResetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="handleResetParams">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
|
||||||
|
<el-tab-pane label="全部" name="all"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="`待发货(${order_status.wait_send})`" name="0"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="`待收货(${order_status.wait_receive})`" name="1"></el-tab-pane>
|
||||||
|
<el-tab-pane :label="`已完成(${order_status.finish})`" name="2"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table border :data="pager.lists">
|
<el-table :data="pager.lists">
|
||||||
<el-table-column label="订单号" prop="progress" show-overflow-tooltip />
|
<el-table-column label="订单号" prop="order_id" show-overflow-tooltip />
|
||||||
<el-table-column label="用户信息" prop="build_area_text" show-overflow-tooltip>
|
<el-table-column label="用户信息" prop="build_area_text" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-image style="width: 50px; height: 50px" :src="url" /> -->
|
<div class="flex items-center">
|
||||||
|
<el-image style="width: 50px; height: 50px" :src="row.avatar" class="mr-2" />
|
||||||
|
{{ row.nickname }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品信息" prop="project_level_text" show-overflow-tooltip />
|
<el-table-column label="商品信息" prop="project_level_text" show-overflow-tooltip>
|
||||||
<el-table-column label="实际支付" prop="total_investment" show-overflow-tooltip />
|
<template #default="{ row }">
|
||||||
<el-table-column label="支付方式" prop="engineering_status_text" show-overflow-tooltip />
|
<div v-for="(item, index) in row.product" :key="index" class="flex items-center">
|
||||||
<el-table-column label="收银店员" prop="engineering_status_text" show-overflow-tooltip />
|
<el-image style="width: 50px; height: 50px" :src="item.cart_info.image" class="mr-2" />
|
||||||
<el-table-column label="下单时间" prop="engineering_status_text" show-overflow-tooltip />
|
<div>
|
||||||
<el-table-column label="订单状态" prop="engineering_status_text" show-overflow-tooltip />
|
<p>{{ item.cart_info.name }}</p>
|
||||||
|
<p>¥{{ item.cart_info.price }} x {{ item.cart_info.cart_num }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实际支付" prop="pay_price" show-overflow-tooltip />
|
||||||
|
<el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="收银店员" prop="staff" show-overflow-tooltip />
|
||||||
|
<el-table-column label="下单时间" prop="pay_time" show-overflow-tooltip />
|
||||||
|
<el-table-column label="订单状态" prop="status_name" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="170" fixed="right" align="center">
|
<el-table-column label="操作" width="170" fixed="right" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="handleWriteOff(row.id)">
|
<!-- <el-button type="primary" link @click="handleWriteOff(row.id)">
|
||||||
立即核销
|
立即核销
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button type="primary" link @click="handleDetail(row.id)">
|
<el-button type="primary" link @click="handleDetail(row.id)">
|
||||||
订单详情
|
订单详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -68,8 +88,9 @@
|
||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<orderDetail ref="detailRef"></orderDetail>
|
<div v-if="showDetail">
|
||||||
<!-- <edit-popup v-if="showDetail" ref="editRef" @close="showDetail = false" /> -->
|
<orderDetail ref="detailRef" :detailData="detailData" @close="showDetail = false"></orderDetail>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -78,14 +99,34 @@
|
||||||
import orderDetail from './../../components/orderDetail/index.vue'
|
import orderDetail from './../../components/orderDetail/index.vue'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { apiGoodsListLists, apiGoodsListDetail, apiStatus, apiGoodsTypeLists } from '@/api/goodsList'
|
import { apiStoreOrderLists, apiStoreOrderDetail, apiStoreOrderTitle } from '@/api/store_order'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
status: ""
|
order_id: "",
|
||||||
|
pay_type: "",
|
||||||
|
start_time: "",
|
||||||
|
end_time: '',
|
||||||
|
status: "",
|
||||||
|
staff_id: ""
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const activeName = ref('all')
|
||||||
|
const handleClick = (e) => {
|
||||||
|
if (activeName.value == 'all') {
|
||||||
|
queryParams.status = ''
|
||||||
|
} else {
|
||||||
|
queryParams.status = activeName.value
|
||||||
|
|
||||||
|
}
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
const date = ref([])
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 核销
|
// 核销
|
||||||
const handleWriteOff = async (id: number) => {
|
const handleWriteOff = async (id: number) => {
|
||||||
await feedback.confirm('确定要核销订单吗?')
|
await feedback.confirm('确定要核销订单吗?')
|
||||||
|
@ -94,28 +135,54 @@ const handleWriteOff = async (id: number) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
fetchFun: apiGoodsListLists,
|
fetchFun: apiStoreOrderLists,
|
||||||
params: queryParams
|
params: queryParams
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const handleResetPage = () => {
|
||||||
|
if (date.value.length) {
|
||||||
const detailRef = ref(null)
|
queryParams.start_time = date.value[0]
|
||||||
// 编辑
|
queryParams.end_time = date.value[1]
|
||||||
const handleDetail = async (data: any) => {
|
}
|
||||||
detailRef.value.open()
|
resetPage()
|
||||||
// let res = await apiGoodsListDetail({ id: data.id })
|
|
||||||
// showDetail.value = true
|
|
||||||
// await nextTick()
|
|
||||||
// editRef.value?.open('edit')
|
|
||||||
// editRef.value?.setFormData(res)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const handleResetParams = () => {
|
||||||
|
date.value = []
|
||||||
|
resetParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
const detailRef = ref(null)
|
||||||
|
const detailData = ref({})
|
||||||
|
// 编辑
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiStoreOrderDetail({ id })
|
||||||
|
console.log(res)
|
||||||
|
detailData.value = res
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const payTypeList = ref([])
|
||||||
|
const staffList = ref([])
|
||||||
|
const order_status = ref({
|
||||||
|
finish: '',
|
||||||
|
wait_receive: '',
|
||||||
|
wait_send: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
const getTitle = async () => {
|
||||||
|
let res = await await apiStoreOrderTitle()
|
||||||
|
payTypeList.value = res.pay_type
|
||||||
|
staffList.value = res.staff
|
||||||
|
order_status.value = res.order_status
|
||||||
|
}
|
||||||
|
|
||||||
|
getTitle()
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1,170 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="时间筛选">
|
||||||
|
<el-date-picker v-model="date" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间" value-format="YYYY-MM-DD" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="店员">
|
||||||
|
<el-select class="flex-1" v-model="queryParams.staff_id" placeholder="请选择店员">
|
||||||
|
<el-option :label="item.staff_name" :value="item.id" v-for="(item, index) in staffList" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="用户搜索">
|
||||||
|
<el-input v-model="queryParams.order_id" clearable placeholder="请输入订单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleResetPage">查询</el-button>
|
||||||
|
<el-button @click="handleResetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists">
|
||||||
|
<el-table-column label="订单号" prop="order_id" show-overflow-tooltip />
|
||||||
|
<el-table-column label="用户信息" prop="build_area_text" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<el-image style="width: 50px; height: 50px" :src="row.avatar" class="mr-2" />
|
||||||
|
{{ row.nickname }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="支付金额" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="充值类型" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="支付时间" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="关联店员" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link @click="handleRe(row)">
|
||||||
|
备注
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-dialog title="添加备注" v-model="showDialog" width="550px">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="remarks" type="textarea" placeholder="请输入备注内容"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleRemarks">确定</el-button>
|
||||||
|
<el-button @click="showDialog = false">取消</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="manageProjectLists">
|
||||||
|
import orderDetail from './../../components/orderDetail/index.vue'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { apiStoreOrderLists, apiStoreOrderDetail, apiStoreOrderTitle } from '@/api/store_order'
|
||||||
|
import feedback from '@/utils/feedback'
|
||||||
|
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
order_id: "",
|
||||||
|
pay_type: "",
|
||||||
|
start_time: "",
|
||||||
|
end_time: '',
|
||||||
|
status: "",
|
||||||
|
staff_id: ""
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
const date = ref([])
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
// 核销
|
||||||
|
const handleWriteOff = async (id: number) => {
|
||||||
|
await feedback.confirm('确定要核销订单吗?')
|
||||||
|
// await adminDelete({ id })
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiStoreOrderLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleResetPage = () => {
|
||||||
|
if (date.value.length) {
|
||||||
|
queryParams.start_time = date.value[0]
|
||||||
|
queryParams.end_time = date.value[1]
|
||||||
|
}
|
||||||
|
resetPage()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const handleResetParams = () => {
|
||||||
|
date.value = []
|
||||||
|
resetParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
const detailRef = ref(null)
|
||||||
|
const detailData = ref({})
|
||||||
|
// 编辑
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiStoreOrderDetail({ id })
|
||||||
|
console.log(res)
|
||||||
|
detailData.value = res
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const payTypeList = ref([])
|
||||||
|
const staffList = ref([])
|
||||||
|
const order_status = ref({
|
||||||
|
finish: '',
|
||||||
|
wait_receive: '',
|
||||||
|
wait_send: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
const getTitle = async () => {
|
||||||
|
let res = await await apiStoreOrderTitle()
|
||||||
|
payTypeList.value = res.pay_type
|
||||||
|
staffList.value = res.staff
|
||||||
|
order_status.value = res.order_status
|
||||||
|
}
|
||||||
|
|
||||||
|
// getTitle()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const showDialog = ref(false)
|
||||||
|
const remarks = ref('')
|
||||||
|
const rows = ref({})
|
||||||
|
|
||||||
|
const handleRe = (row) => {
|
||||||
|
showDialog.value = true
|
||||||
|
rows.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRemarks = async (row: any) => {
|
||||||
|
await apiStorFinanceFlowRemarks({ row })
|
||||||
|
showDialog.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
|
@ -0,0 +1,147 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="订单状态">
|
||||||
|
<el-select class="flex-1" v-model="queryParams.refund_type" placeholder="请选择订单状态">
|
||||||
|
<!-- 1仅退款,2退款退货,3拒绝退款,4商品待退货,5退货待收货,6已退款 -->
|
||||||
|
<el-option label="仅退款" value="1" />
|
||||||
|
<el-option label="仅退款" value="2" />
|
||||||
|
<el-option label="拒绝退款" value="3" />
|
||||||
|
<el-option label="商品待退货" value="4" />
|
||||||
|
<el-option label="退货待收货" value="5" />
|
||||||
|
<el-option label="已退款" value="6" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="退款时间">
|
||||||
|
<el-date-picker v-model="date" type="daterange" range-separator="-" start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间" value-format="YYYY-MM-DD" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="订单搜索">
|
||||||
|
<el-input v-model="queryParams.order_id" clearable placeholder="请输入订单编号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="handleResetPage">查询</el-button>
|
||||||
|
<el-button @click="handleResetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists">
|
||||||
|
<el-table-column label="订单号" prop="order_id" show-overflow-tooltip />
|
||||||
|
<el-table-column label="用户信息" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<el-image style="width: 50px; height: 50px" :src="row.avatar" class="mr-2" />
|
||||||
|
{{ row.nickname }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品信息" prop="project_level_text" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div v-for="(item, index) in row.product" :key="index" class="flex items-center">
|
||||||
|
<el-image style="width: 50px; height: 50px" :src="item.cart_info.image" class="mr-2" />
|
||||||
|
<div>
|
||||||
|
<p>{{ item.cart_info.name }}</p>
|
||||||
|
<p>¥{{ item.cart_info.price }} x {{ item.cart_info.cart_num }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实际支付" prop="pay_price" show-overflow-tooltip />
|
||||||
|
<el-table-column label="发起退款时间" prop="refund_reason_time" show-overflow-tooltip />
|
||||||
|
<el-table-column label="退款状态" prop="refund_status_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="退款信息" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="退货信息" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="售后备注" prop="" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link @click="handleDetail(row.id)">
|
||||||
|
订单详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<div v-if="showDetail">
|
||||||
|
<orderDetail ref="detailRef" :detailData="detailData" @close="showDetail = false"></orderDetail>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="manageProjectLists">
|
||||||
|
import orderDetail from './../../components/orderDetail/index.vue'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { apiStoreRefundOrderLists, apiStoreRefundOrderDetail } from '@/api/store_order'
|
||||||
|
import feedback from '@/utils/feedback'
|
||||||
|
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
order_id: "",
|
||||||
|
pay_type: "",
|
||||||
|
start_time: "",
|
||||||
|
end_time: '',
|
||||||
|
refund_type: "",
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const date = ref([])
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiStoreRefundOrderLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleResetPage = () => {
|
||||||
|
if (date.value.length) {
|
||||||
|
queryParams.start_time = date.value[0]
|
||||||
|
queryParams.end_time = date.value[1]
|
||||||
|
}
|
||||||
|
resetPage()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const handleResetParams = () => {
|
||||||
|
date.value = []
|
||||||
|
resetParams()
|
||||||
|
}
|
||||||
|
|
||||||
|
const detailRef = ref(null)
|
||||||
|
const detailData = ref({})
|
||||||
|
// 编辑
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiStoreRefundOrderDetail({ id })
|
||||||
|
console.log(res)
|
||||||
|
detailData.value = res
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
|
@ -2,7 +2,6 @@
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="w-[600px]">
|
<div class="w-[600px]">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||||
|
|
||||||
<el-tabs v-model="activeName" class="demo-tabs">
|
<el-tabs v-model="activeName" class="demo-tabs">
|
||||||
<el-tab-pane label="基础设置" name="first">
|
<el-tab-pane label="基础设置" name="first">
|
||||||
<el-form-item label="门店名称" prop="title">
|
<el-form-item label="门店名称" prop="title">
|
||||||
|
@ -15,8 +14,8 @@
|
||||||
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0"></el-switch>
|
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="营业时间" prop="title">
|
<el-form-item label="营业时间" prop="title">
|
||||||
<el-time-picker v-model="formData.times" is-range range-separator="-"
|
<el-time-picker v-model="formData.times" is-range range-separator="-" start-placeholder="开始时间"
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" value-format="HH:mm:ss" />
|
end-placeholder="结束时间" value-format="HH:mm:ss" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="门店地址" prop="title">
|
<el-form-item label="门店地址" prop="title">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
@ -62,8 +61,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-tab-pane label="配送设置" name="second">
|
<el-tab-pane label="配送设置" name="second">
|
||||||
<el-form-item label="同城配送" prop="title">
|
<el-form-item label="同城配送" prop="title">
|
||||||
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0"></el-switch>
|
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0"></el-switch>
|
||||||
|
@ -93,11 +90,7 @@ import { timeFormat } from '@/utils/util'
|
||||||
import { apicityLists, apiAreaLists, apiStreetLists, apigetProvinceLists } from "@/api/address"
|
import { apicityLists, apiAreaLists, apiStreetLists, apigetProvinceLists } from "@/api/address"
|
||||||
import myMap from "./myMap/index.vue"
|
import myMap from "./myMap/index.vue"
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { jsonp } from "vue-jsonp"
|
|
||||||
|
|
||||||
jsonp('https://apis.map.qq.com/ws/location/v1/ip?ip=111.206.145.41&key=V4LBZ-UKCHA-EUNK7-CUH4F-HOXVO-YTF56&output=jsonp').then(res => {
|
|
||||||
console.log(res)
|
|
||||||
})
|
|
||||||
//
|
//
|
||||||
const formRef = shallowRef<FormInstance>()
|
const formRef = shallowRef<FormInstance>()
|
||||||
const activeName = ref('first')
|
const activeName = ref('first')
|
||||||
|
|
|
@ -12,8 +12,11 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineComponent, onMounted, reactive, ref, toRefs, inject } from 'vue';
|
import { defineComponent, onMounted, reactive, ref, toRefs, inject } from 'vue';
|
||||||
import axios from 'axios';
|
import { jsonp } from "vue-jsonp"
|
||||||
|
|
||||||
|
// jsonp('https://apis.map.qq.com/ws/location/v1/ip?ip=111.206.145.41&key=SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7&output=jsonp').then(res => {
|
||||||
|
// console.log(res)
|
||||||
|
// })
|
||||||
const $api: any = inject("$api");
|
const $api: any = inject("$api");
|
||||||
const dataMap = reactive({
|
const dataMap = reactive({
|
||||||
map: '',
|
map: '',
|
||||||
|
|
Loading…
Reference in New Issue