新增入库登记
This commit is contained in:
parent
a1ab6200e5
commit
25be510191
|
@ -4,75 +4,90 @@ import request from '@/utils/axios.js'
|
|||
* @description 商品列表
|
||||
*/
|
||||
export function storeListApi(id, data) {
|
||||
return request.get(`server/${id}/product/lst`, { params: data })
|
||||
return request.get(`server/${id}/product/lst`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品详情
|
||||
*/
|
||||
export function getAttrValue(id, data) {
|
||||
return request.get(`store/product/detail/${id}`, { params: data })
|
||||
return request.get(`store/product/detail/${id}`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 免审编辑
|
||||
*/
|
||||
export function userFreeTrialApi(id, data) {
|
||||
return request.post(`user_free_trial/${id}`, data)
|
||||
return request.post(`user_free_trial/${id}`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品状态分类数量
|
||||
*/
|
||||
export function productTitleApi(id, data) {
|
||||
return request.get(`server/${id}/product/title`, { params: data })
|
||||
return request.get(`server/${id}/product/title`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 上下架
|
||||
*/
|
||||
export function productStatusApi(store_id, id, data) {
|
||||
return request.post(`server/${store_id}/product/status/${id}`, data)
|
||||
return request.post(`server/${store_id}/product/status/${id}`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 平台分类
|
||||
*/
|
||||
export function categoryListApi(store_id, data) {
|
||||
return request.get(`server/${store_id}/category/list`, { params: data })
|
||||
return request.get(`server/${store_id}/category/list`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 添加商品
|
||||
*/
|
||||
export function productCreateApi(store_id, data) {
|
||||
return request.post(`server/${store_id}/product/create`, data)
|
||||
return request.post(`server/${store_id}/product/create`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 编辑商品
|
||||
*/
|
||||
export function productUpdateApi(store_id, id, data) {
|
||||
return request.post(`server/${store_id}/product/update/${id}`, data)
|
||||
return request.post(`server/${store_id}/product/update/${id}`, data)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 商品详情
|
||||
*/
|
||||
export function productDetailApi(store_id, id, data) {
|
||||
return request.get(`server/${store_id}/product/detail/${id}`, { params: data })
|
||||
return request.get(`server/${store_id}/product/detail/${id}`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批发商品列表
|
||||
*/
|
||||
export function saleStoreListApi(data) {
|
||||
return request.get(`/store_product/storeProduct/lists`, { params: data })
|
||||
return request.get(`/store_product/storeProduct/lists`, { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 店铺商品分类
|
||||
*/
|
||||
export function merchantCategoryListApi(data) {
|
||||
return request.get(`goods/goodsclass/lists`, { params: data })
|
||||
return request.get(`goods/goodsclass/lists`, { params: data })
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 门店入库操作列表
|
||||
*/
|
||||
export function storeStorageInfoListsApi(data) {
|
||||
return request.get('/system_store_storage/systemstorestorage/lists', { params: data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 门店入库操作入库
|
||||
*/
|
||||
export function storeStorageInfoEditApi(data) {
|
||||
return request.post('/system_store_storage/systemstorestorage/edit', data)
|
||||
}
|
|
@ -72,10 +72,16 @@ const list = ref([
|
|||
},
|
||||
{
|
||||
name: "statistics",
|
||||
title: "盈收统计 ",
|
||||
title: "盈收统计",
|
||||
ico: "TrendCharts",
|
||||
count: 0,
|
||||
},
|
||||
{
|
||||
name: "putStorage",
|
||||
title: "入库登记",
|
||||
ico: "Van",
|
||||
count: 0,
|
||||
},
|
||||
// { name: "purchaseOrder", title: "采购订单", ico: "Van", count: 0 },
|
||||
// { name: "orderCount", title: "订单统计", ico: "DocumentRemove", count: 0 },
|
||||
// { name: "wallet", title: "余额提现", ico: "Wallet", count: 0 },
|
||||
|
|
|
@ -20,21 +20,15 @@ const routes = [
|
|||
{
|
||||
path: '/saleOrder',
|
||||
name: 'saleOrder',
|
||||
meta: { title: '采购订单' },
|
||||
meta: { title: '收银订单' },
|
||||
component: () => import('@/views/saleOrder/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
name: 'order',
|
||||
meta: { title: '待提采购' },
|
||||
meta: { title: '线上采购' },
|
||||
component: () => import('@/views/order/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/purchaseOrder',
|
||||
name: 'purchaseOrder',
|
||||
meta: { title: '采购订单' },
|
||||
component: () => import('@/views/purchaseOrder/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/orderCount',
|
||||
name: 'orderCount',
|
||||
|
@ -59,6 +53,12 @@ const routes = [
|
|||
meta: { title: '盈收统计' },
|
||||
component: () => import('@/views/statistics/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/putStorage',
|
||||
name: 'putStorage',
|
||||
meta: { title: '入库登记' },
|
||||
component: () => import('@/views/putStorage/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
name: 'test',
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
<script setup>
|
||||
import { ref, nextTick } from "vue";
|
||||
import { storeStorageInfoEditApi, storeStorageInfoListsApi } from "@/api/shop.js"
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
const orderList = ref([]);
|
||||
|
||||
const where = ref({
|
||||
page_no: 1,
|
||||
page_size: 20,
|
||||
loadend: false
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const getOrderList = () => {
|
||||
if(where.value.loadend) return ;
|
||||
loading.value = true;
|
||||
storeStorageInfoListsApi({
|
||||
page_no: where.value.page_no,
|
||||
page_size: where.value.page_size
|
||||
}).then((res) => {
|
||||
orderList.value = [...orderList.value, ...res.data.lists];
|
||||
if(res.data.lists.length<where.value.page_size) where.value.loadend = true;
|
||||
where.value.page_no++;
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
getOrderList();
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data) => {
|
||||
storeStorageInfoEditApi({
|
||||
id: data.id
|
||||
}).then(res => {
|
||||
data.status = 1;
|
||||
ElMessage.success("入库成功");
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="my-card put-storage">
|
||||
<div
|
||||
class="order-lists"
|
||||
v-loading="loading"
|
||||
v-infinite-scroll="getOrderList"
|
||||
:infinite-scroll-distance="300"
|
||||
:infinite-scroll-delay="500"
|
||||
:infinite-scroll-immediate="false"
|
||||
style="overflow: auto">
|
||||
<el-table :data="orderList" >
|
||||
<el-table-column label="导入人员" prop="admin_name" />
|
||||
<el-table-column label="门店确认人员" prop="staff_name" />
|
||||
<el-table-column label="商品图" prop="image" >
|
||||
<template #default="{ row }">
|
||||
<el-image class="image" :src="row.image" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" prop="store_name" />
|
||||
<el-table-column label="数量" prop="nums" />
|
||||
<el-table-column label="状态" prop="status" >
|
||||
<template #default="{ row }">
|
||||
<el-tag type="success" v-if="row.status === 1">已入库</el-tag>
|
||||
<el-tag type="warning" v-else-if="row.status === 0">待确认</el-tag>
|
||||
<el-tag type="danger" v-else-if="row.status === -1">库存不足</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="mark" />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.status == 0"
|
||||
type="success" @click="handleEdit(row)">
|
||||
确认入库
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.put-storage {
|
||||
background-color: #fff;
|
||||
border-radius: 1.2rem;
|
||||
box-sizing: border-box;
|
||||
padding: 1rem;
|
||||
height: 100%;
|
||||
|
||||
|
||||
.image{
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
}
|
||||
.order-lists{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.my-card {}
|
||||
|
||||
/* 修改滚动条的样式 */
|
||||
::-webkit-scrollbar {
|
||||
width: 0.315rem;
|
||||
/* 设置滚动条的宽度 */
|
||||
}
|
||||
|
||||
/* 设置滚动条的轨道样式 */
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #f1f1f1;
|
||||
/* 设置轨道的背景色 */
|
||||
/* margin: 1.25rem 0; */
|
||||
}
|
||||
|
||||
/* 设置滚动条的滑块样式 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #ccc;
|
||||
/* 设置滑块的背景色 */
|
||||
border-radius: 0.315rem;
|
||||
/* 设置滑块的圆角 */
|
||||
}
|
||||
|
||||
/* 设置滚动条鼠标悬停时的滑块样式 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #999;
|
||||
/* 设置鼠标悬停时滑块的背景色 */
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue