This commit is contained in:
weipengfei 2024-06-27 16:07:23 +08:00
parent d208b65031
commit 1a9ecc5e27
12 changed files with 124 additions and 47 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,10 +10,10 @@
<span v-else class="text-danger">{{ row.number }}</span>
</template>
</el-table-column>
<el-table-column label="门店名称" prop="store_name" show-overflow-tooltip />
<el-table-column label="用户" prop="nickname" min-width="80" show-overflow-tooltip />
<!-- <el-table-column label="门店名称" prop="store_name" show-overflow-tooltip /> -->
<!-- <el-table-column label="用户" prop="nickname" min-width="80" show-overflow-tooltip /> -->
<el-table-column label="收益/扣除" prop="financial_type_name" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip />
<!-- <el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip /> -->
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
</el-table>
@ -43,18 +43,18 @@ const mode = ref('add')
//
const formData = ref({
id: ''
order_id: ''
})
//
const setFormData = async (data: Record<any, any>) => {
formData.value = { ...data };
queryParams.pid = data.id;
queryParams.order_id = data.order_id;
getLists();
}
const getDetail = async (row: Record<string, any>) => {
formData.value.id = row.id;
formData.value.order_id = row.order_id;
// const data = await apiStoreOrderDetail({
// id: row.id
// })
@ -62,7 +62,7 @@ const getDetail = async (row: Record<string, any>) => {
}
const queryParams = reactive({
pid: ''
order_id: ''
})
//
const { pager, getLists, resetParams, resetPage } = usePaging({

View File

@ -54,13 +54,13 @@
<el-table-column label="收益/扣除" prop="financial_type_name" show-overflow-tooltip />
<el-table-column label="支付方式" prop="pay_type_name" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<!-- <el-table-column label="操作" fixed="right" width="100">
<el-table-column label="操作" fixed="right" width="100">
<template #default="{ row }">
<el-button link type="primary" @click="handleDetail(row)">
资金走向
</el-button>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
</div>
@ -95,7 +95,9 @@ const queryParams = reactive({
store_name: '',
store_id: '',
user_id: '',
create_time: ''
create_time: '',
financial_type: 1,
financial_pm: 1
})
//

View File

@ -59,8 +59,8 @@
</el-table-column>
<el-table-column label="操作" min-width="140" fixed="right" align="center" show-overflow-tooltip >
<template #default="{ row }">
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
<el-button type="danger" link @click="handleDelete(row.id)">删除</el-button>
<el-button type="primary" v-prems="['store_branch_product.store_branch_product/deit']" link @click="handleEdit(row)">编辑</el-button>
<el-button type="danger" v-perms="['store_branch_product.store_branch_product/delete']" link @click="handleDelete(row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -21,13 +21,13 @@
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['store.storecategory/add']" type="primary" @click="handleAdd">
<el-button v-perms="['store_category.store_category/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['store.storecategory/delete']" :disabled="!selectData.length"
<el-button v-perms="['store_category.store_category/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
@ -46,11 +46,11 @@
<el-table-column label="排序" prop="sort" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['store.storecategory/edit']" type="primary" link
<el-button v-perms="['store_category.store_category/edit']" type="primary" link
@click.stop="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['store.storecategory/delete']" type="danger" link
<el-button v-perms="['store_category.store_category/delete']" type="danger" link
@click.stop="handleDelete(row.id)">
删除
</el-button>

View File

@ -21,8 +21,8 @@
<el-descriptions-item label="供货价">{{ formData.purchase }}</el-descriptions-item>
<el-descriptions-item label="上浮比例" :span="2">{{ formData.rose }}</el-descriptions-item>
<el-descriptions-item label="厂家备注" :span="2">
<!-- <div style="white-space: pre;">{{ formData.manufacturer_information }}</div> -->
<div style="white-space: pre;">{{ cMark(formData.manufacturer_information) }}</div>
<div style="white-space: pre;">{{ formData.manufacturer_information }}</div>
<!-- <div style="white-space: pre;">{{ cMark(formData.manufacturer_information) }}</div> -->
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>

View File

@ -24,13 +24,13 @@
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-button v-perms="['goods.unit/add']" type="primary" @click="handleAdd">
<el-button v-perms="['store_product_unit.store_product_unit/add']" type="primary" @click="handleAdd">
<template #icon>
<icon name="el-icon-Plus" />
</template>
新增
</el-button>
<el-button v-perms="['goods.unit/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
<el-button v-perms="['store_product_unit.store_product_unit/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -48,13 +48,13 @@
<el-table-column label="备注信息" prop="data" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button v-perms="['goods.unit/edit']" type="primary" link @click="handleEdit(row)">
<el-button v-perms="['store_product_unit.store_product_unit/edit']" type="primary" link @click="handleEdit(row)">
编辑
</el-button>
<el-button v-perms="['goods.unit/delete']" type="danger" link @click="handleDelete(row.id)">
<el-button v-perms="['store_product_unit.store_product_unit/delete']" type="danger" link @click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['goods.unit/edit']" link @click="handleDetail(row.id)">
<el-button v-perms="['store_product_unit.store_product_unit/edit']" link @click="handleDetail(row.id)">
详情
</el-button>
</template>

View File

@ -28,13 +28,6 @@ import { apiStoreOrderCartInfo } from '@/api/store_order'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
const props = defineProps({
oid: {
type: [String,Number],
required: true
}
})
const emit = defineEmits(['change'])
@ -59,13 +52,16 @@ const { dictData } = useDictData('')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiStoreOrderCartInfo,
params: {
...queryParams,
oid: props.oid
}
params: queryParams
})
const getList = (e: any)=>{
queryParams.oid = e.oid
getLists();
}
defineExpose({
getList,
getLists
})

View File

@ -37,7 +37,7 @@
<orderInfo :datas="formData" :dictData="dictData"></orderInfo>
</el-tab-pane>
<el-tab-pane label="商品信息" name="second">
<storeTable :oid="formData.id" ref="storeRef"></storeTable>
<storeTable ref="storeRef"></storeTable>
</el-tab-pane>
<!-- <el-tab-pane label="订单记录" name="third">
<orderTable ref="orderRef"></orderTable>
@ -86,7 +86,6 @@ const formData = ref({
//
const setFormData = async (data: Record<any, any>) => {
formData.value = { ...data };
}
const getDetail = async (row: Record<string, any>) => {
@ -108,7 +107,7 @@ const open = () => {
const activeName = ref('first')
const handleClick = (tab: any) => {
if (tab.paneName == 'second') storeRef.value?.getLists();
if (tab.paneName == 'second') storeRef.value?.getList({oid: formData.value.id});
else if (tab.paneName == 'third') orderRef.value?.getLists();
else if (tab.paneName == 'fourth') deliverRef.value?.getLists();
}

View File

@ -5,6 +5,10 @@
<el-form-item label="订单号" prop="order_id">
<el-input class="w-[280px]" v-model="queryParams.order_id" @keydown.enter="resetPage" clearable placeholder="请输入订单号" />
</el-form-item>
<el-form-item label="日期" prop="order_id">
<el-date-picker v-model="startEndTime" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" unlink-panels :shortcuts="shortcuts" @change="changeStartEndTime" />
</el-form-item>
<el-form-item label="支付方式" prop="pay_type">
<!-- <el-input class="w-[280px]" v-model="queryParams.pay_type" clearable placeholder="请输入支付方式" /> -->
<el-select class="w-[280px]" v-model="queryParams.pay_type" placeholder="请选择支付方式" @change="resetPage">
@ -19,9 +23,13 @@
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<div>
</div>
<el-radio-group v-model="orderStatus" @change="changeOrderStatus">
<el-radio-button label="0">全部</el-radio-button>
<el-radio-button label="1">待支付</el-radio-button>
<el-radio-button label="2">待核销</el-radio-button>
<el-radio-button label="3">已完成</el-radio-button>
<el-radio-button label="4">已退款</el-radio-button>
</el-radio-group>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
@ -43,7 +51,7 @@
<template #default="{row}">
<el-tag v-if="row.status_name=='待收货'" type="success">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='已收货' || row.status_name=='已完成'" type="info">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='待发货'" type="warning">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='待发货' || row.status_name=='待核销'" type="warning">{{ row.status_name }}</el-tag>
<el-tag v-else type="danger">{{ row.status_name }}</el-tag>
</template>
</el-table-column>
@ -83,6 +91,7 @@ import { useDictData } from '@/hooks/useDictOptions'
import { apiStoreOrderLists, apiStoreOrderDelete } from '@/api/store_order'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import moment from 'moment'
import EditPopup from './edit.vue'
import DetailsPopup from './details.vue'
@ -91,13 +100,83 @@ const detailsRef = shallowRef<InstanceType<typeof DetailsPopup>>()
//
const showEdit = ref(false)
const showDetails = ref(false)
const shortcuts = [
{
text: '近一周',
value: () => {
const end = new Date()
const start = new Date()
start.setDate(start.getDate() - 7)
return [start, end]
},
},
{
text: '近一月',
value: () => {
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 1)
return [start, end]
},
},
{
text: '近三月',
value: () => {
const end = new Date()
const start = new Date()
start.setMonth(start.getMonth() - 3)
return [start, end]
},
},
]
const startEndTime = ref([]);
//
const queryParams = reactive({
order_id: '',
pay_type: ''
pay_type: '',
start_time: '',
end_time: '',
paid: null,
status: null,
is_writeoff: null
})
const orderStatus = ref('0')
const changeOrderStatus = (e: any)=>{
if(e==0) {
queryParams.paid = null;
queryParams.status = null;
queryParams.is_writeoff = null;
}else if(e==1) {
queryParams.paid = 0;
queryParams.status = null;
queryParams.is_writeoff = null;
}else if(e==2) {
queryParams.paid = 1;
queryParams.status = 1;
queryParams.is_writeoff = 0;
}else if(e==3) {
queryParams.paid = 1;
queryParams.status = 2;
queryParams.is_writeoff = null;
}else if(e==4) {
queryParams.paid = null;
queryParams.status = 4;
queryParams.is_writeoff = null;
}
getLists();
}
const changeStartEndTime = ()=>{
if(startEndTime.value[0] && startEndTime.value[1]){
queryParams.start_time = moment(startEndTime.value[0]).format('YYYY-MM-DD') + ' 00:00:00';
queryParams.end_time = moment(startEndTime.value[1]).format('YYYY-MM-DD') + ' 23:59:59';
}else {
queryParams.start_time = '';
queryParams.end_time = '';
}
getLists();
}
//
const selectData = ref<any[]>([])
@ -147,5 +226,6 @@ const handleDelete = async (id: number | any[]) => {
getLists()
}
getLists()
</script>

View File

@ -42,8 +42,8 @@
<el-table-column label="订单状态" prop="status_name">
<template #default="{row}">
<el-tag v-if="row.status_name=='待收货'" type="success">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='已收货'" type="info">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='待发货'" type="warning">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='已收货' || row.status_name=='已完成'" type="info">{{ row.status_name }}</el-tag>
<el-tag v-else-if="row.status_name=='待发货' || row.status_name=='待核销'" type="warning">{{ row.status_name }}</el-tag>
<el-tag v-else type="danger">{{ row.status_name }}</el-tag>
</template>
</el-table-column>