Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e6460e1fda
13 files changed
+371
-110
No files matched your search
@@ -1,41 +1,48 @@
|
|||||||
import request from "/@/utils/request"
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
export function fetchList(query?: Object) {
|
export function fetchList(query?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenOnlineSpu/page',
|
url: "/canteen/canteenOnlineSpu/page",
|
||||||
method: 'get',
|
method: "get",
|
||||||
params: query
|
params: query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addObj(obj?: Object) {
|
export function addObj(obj?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenOnlineSpu',
|
url: "/canteen/canteenOnlineSpu",
|
||||||
method: 'post',
|
method: "post",
|
||||||
data: obj
|
data: obj,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getObj(id?: string) {
|
export function getObj(id?: string) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenOnlineSpu/' + id,
|
url: "/canteen/canteenOnlineSpu/" + id,
|
||||||
method: 'get'
|
method: "get",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function delObjs(ids?: Object) {
|
export function delObjs(ids?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenOnlineSpu',
|
url: "/canteen/canteenOnlineSpu",
|
||||||
method: 'delete',
|
method: "delete",
|
||||||
data: ids
|
data: ids,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function putObj(obj?: Object) {
|
export function putObj(obj?: Object) {
|
||||||
return request({
|
return request({
|
||||||
url: '/canteen/canteenOnlineSpu',
|
url: "/canteen/canteenOnlineSpu",
|
||||||
method: 'put',
|
method: "put",
|
||||||
data: obj
|
data: obj,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function saveCanteenSpuBatch(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: "/canteen/canteenOnlineSpu/saveCanteenSpuBatch",
|
||||||
|
method: "post",
|
||||||
|
data: obj,
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -10,12 +10,7 @@
|
|||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="餐段类型" prop="categoryType">
|
<el-form-item label="餐段类型" prop="categoryType">
|
||||||
<el-select v-model="form.categoryType" placeholder="请选择餐段类型" multiple>
|
<el-select v-model="form.categoryType" placeholder="请选择餐段类型" multiple>
|
||||||
<el-option
|
<el-option :value="item.value" :label="item.label" v-for="(item, index) in daily_menu" :key="index"></el-option>
|
||||||
:value="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
v-for="(item, index) in daily_menu"
|
|
||||||
:key="index"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -66,8 +66,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sort" label="排序" show-overflow-tooltip min-width="100" />
|
<el-table-column prop="sort" label="排序" show-overflow-tooltip min-width="100" />
|
||||||
<el-table-column prop="createBy" label="创建者" show-overflow-tooltip min-width="100" />
|
<!-- <el-table-column prop="createBy" label="创建者" show-overflow-tooltip min-width="100" /> -->
|
||||||
<el-table-column prop="updateBy" label="更新者" show-overflow-tooltip min-width="100" />
|
<!-- <el-table-column prop="updateBy" label="更新者" show-overflow-tooltip min-width="100" /> -->
|
||||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@@ -17,11 +17,10 @@
|
|||||||
:data="dataList"
|
:data="dataList"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:row-key="(row:any) => row.id"
|
:row-key="(row:any) => row.id"
|
||||||
:reserve-selection="true"
|
|
||||||
@row-click="rowClick"
|
@row-click="rowClick"
|
||||||
:row-style="{ cursor: 'pointer' }"
|
:row-style="{ cursor: 'pointer' }"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="40" fixed="left" align="center" />
|
<el-table-column type="selection" reserve-selection width="40" fixed="left" align="center" />
|
||||||
<el-table-column type="index" label="#" width="50" fixed="left" align="center" />
|
<el-table-column type="index" label="#" width="50" fixed="left" align="center" />
|
||||||
<el-table-column prop="name" label="食材名称" min-width="150px" align="center" show-overflow-tooltip />
|
<el-table-column prop="name" label="食材名称" min-width="150px" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="unit" label="单位" min-width="100px" align="center" show-overflow-tooltip />
|
<el-table-column prop="unit" label="单位" min-width="100px" align="center" show-overflow-tooltip />
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
<el-input v-model.trim="form.name" placeholder="请输入分类名称" />
|
<el-input v-model.trim="form.name" placeholder="请输入分类名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="14" class="mb20">
|
||||||
|
<el-form-item label="餐段类型" prop="categoryType">
|
||||||
|
<el-select v-model="form.categoryType" placeholder="请选择餐段类型" multiple>
|
||||||
|
<el-option :value="item.value" :label="item.label" v-for="(item, index) in daily_menu" :key="index"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24" class="mb20">
|
<el-col :span="24" class="mb20">
|
||||||
<el-form-item label="分类图" prop="picUrl">
|
<el-form-item label="分类图" prop="picUrl">
|
||||||
<upload-img v-model:imageUrl="form.picUrl" />
|
<upload-img v-model:imageUrl="form.picUrl" />
|
||||||
@@ -44,8 +51,11 @@
|
|||||||
import { useMessage } from "/@/hooks/message"
|
import { useMessage } from "/@/hooks/message"
|
||||||
import { getObj, addObj, putObj } from "/@/api/canteen/canteenOnlineCategory"
|
import { getObj, addObj, putObj } from "/@/api/canteen/canteenOnlineCategory"
|
||||||
import { rule } from "/@/utils/validate"
|
import { rule } from "/@/utils/validate"
|
||||||
|
import { useDict } from "/@/hooks/dict"
|
||||||
const emit = defineEmits(["refresh"])
|
const emit = defineEmits(["refresh"])
|
||||||
|
|
||||||
|
const { daily_menu } = useDict("daily_menu")
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref()
|
||||||
const visible = ref(false)
|
const visible = ref(false)
|
||||||
@@ -61,6 +71,7 @@ const form = reactive({
|
|||||||
sort: 0,
|
sort: 0,
|
||||||
status: "",
|
status: "",
|
||||||
deptId: "",
|
deptId: "",
|
||||||
|
categoryType: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
// 定义校验规则
|
// 定义校验规则
|
||||||
@@ -71,6 +82,7 @@ const dataRules = ref({
|
|||||||
{ required: true, message: "分类排序不能为空", trigger: "blur" },
|
{ required: true, message: "分类排序不能为空", trigger: "blur" },
|
||||||
{ validator: rule.number, trigger: "blur" },
|
{ validator: rule.number, trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
categoryType: [{ required: true, message: "餐段类型不能为空", trigger: "blur" }],
|
||||||
})
|
})
|
||||||
|
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
@@ -95,7 +107,9 @@ const onSubmit = async () => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
form.id ? await putObj(form) : await addObj(form)
|
form.id
|
||||||
|
? await putObj({ ...form, categoryType: form.categoryType.join(",") })
|
||||||
|
: await addObj({ ...form, categoryType: form.categoryType.join(",") })
|
||||||
useMessage().success(form.id ? "修改成功" : "添加成功")
|
useMessage().success(form.id ? "修改成功" : "添加成功")
|
||||||
visible.value = false
|
visible.value = false
|
||||||
emit("refresh")
|
emit("refresh")
|
||||||
@@ -112,7 +126,7 @@ const getcanteenOnlineCategoryData = (id: string) => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
getObj(id)
|
getObj(id)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
Object.assign(form, res.data)
|
Object.assign(form, res.data, { categoryType: res.data.categoryType.split(",") })
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|||||||
@@ -55,12 +55,18 @@
|
|||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="40" />
|
<el-table-column type="index" label="#" width="40" />
|
||||||
<el-table-column prop="name" label="分类名称" show-overflow-tooltip />
|
<el-table-column prop="name" label="分类名称" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="categoryType" label="餐段类型" show-overflow-tooltip width="180">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="daily_menu" :value="scope.row.categoryType?.split(',')"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="picUrl" label="分类图" show-overflow-tooltip>
|
<el-table-column prop="picUrl" label="分类图" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<preview-image :src="row.picUrl" />
|
<preview-image :src="row.picUrl" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="sort" label="分类排序" show-overflow-tooltip />
|
<el-table-column prop="sort" label="分类排序" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||||
<!-- <el-table-column prop="status" label="开启状态" show-overflow-tooltip /> -->
|
<!-- <el-table-column prop="status" label="开启状态" show-overflow-tooltip /> -->
|
||||||
<el-table-column label="操作" width="150">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -91,10 +97,13 @@
|
|||||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||||
import { fetchList, delObjs } from "/@/api/canteen/canteenOnlineCategory"
|
import { fetchList, delObjs } from "/@/api/canteen/canteenOnlineCategory"
|
||||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||||
|
import { useDict } from "/@/hooks/dict"
|
||||||
|
|
||||||
// 引入组件
|
// 引入组件
|
||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
|
|
||||||
|
const { daily_menu } = useDict("daily_menu")
|
||||||
|
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
// 搜索变量
|
// 搜索变量
|
||||||
|
|||||||
@@ -0,0 +1,214 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="dialogVisible"
|
||||||
|
title="选择菜品"
|
||||||
|
width="80%"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
draggable
|
||||||
|
@close="dialogVisible = false"
|
||||||
|
fullscreen
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-form :model="queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList(true)">
|
||||||
|
<el-form-item label="菜品名称" prop="name">
|
||||||
|
<el-input placeholder="请输入菜品名称" v-model="queryForm.name" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="菜品分类" prop="categoryId">
|
||||||
|
<select-ctcg v-model="queryForm.categoryId" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button icon="search" type="primary" @click="getDataList" v-auth="'canteen_canteenSpu_view'">查询</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery" v-auth="'canteen_canteenSpu_view'">重置</el-button>
|
||||||
|
<el-button icon="Refresh" @click="tableRef.clearSelection()" v-auth="'canteen_canteenSpu_view'">取消所有勾选</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
border
|
||||||
|
:data="dataList"
|
||||||
|
v-loading="loading"
|
||||||
|
:row-key="(row:any) => row.id"
|
||||||
|
@selection-change=""
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
>
|
||||||
|
<el-table-column reserve-selection type="selection" width="40" />
|
||||||
|
<el-table-column type="index" label="#" width="50" />
|
||||||
|
<el-table-column prop="name" label="菜品名称" width="120px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="categoryId" label="菜品分类" width="100px" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ categoryOptions?.find((item: any) => item?.id === row?.categoryId)?.name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="picUrl" label="菜品封面图" width="160px" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<preview-image :src="scope.row.picUrl" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="sliderPicUrls" label="菜品轮播图" show-overflow-tooltip /> -->
|
||||||
|
<el-table-column prop="sort" label="排序字段" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="status" label="上架状态" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="spu_status" :value="scope.row.status" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="isShow" label="是否在移动端显示" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="is_show" :value="scope.row.isShow"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="price" label="菜品价格" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ displayPrice(scope.row.price) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="marketPrice" label="市场价" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ displayPrice(scope.row.marketPrice) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
v-model:current-page="queryForm.current"
|
||||||
|
v-model:page-size="queryForm.size"
|
||||||
|
:total="total"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="flex items-center w-1/3">
|
||||||
|
<div class="w-16 text-blue-600 text-base font-bold">商户:</div>
|
||||||
|
<select-mch v-model="merchantId" :apiParams="{ types: '1' }" />
|
||||||
|
</div>
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dialogConfirm" :disabled="loading">确认</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from "vue"
|
||||||
|
import { fetchList } from "/@/api/canteen/canteenSpu"
|
||||||
|
import { displayPrice } from "/@/utils/formatMoney"
|
||||||
|
import { useDict } from "/@/hooks/dict"
|
||||||
|
import { getAllSimple as getCanteenCategory } from "/@/api/canteen/canteenCategory"
|
||||||
|
import { useMessage } from "/@/hooks/message"
|
||||||
|
import { saveCanteenSpuBatch } from "/@/api/canteen/canteenOnlineSpu"
|
||||||
|
|
||||||
|
const emit = defineEmits(["refresh"])
|
||||||
|
|
||||||
|
const { spu_status, is_show } = useDict("spu_status", "is_show")
|
||||||
|
|
||||||
|
const queryRef = ref()
|
||||||
|
const tableRef = ref() // 对话框多选表格ref
|
||||||
|
const loading = ref(false) // 对话框多选表格loading
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const queryForm = reactive<any>({
|
||||||
|
current: 1,
|
||||||
|
size: 10,
|
||||||
|
})
|
||||||
|
const total = ref<number>(0)
|
||||||
|
const dataList = ref<any[]>([]) // 对话框多选表格数据
|
||||||
|
const categoryOptions = ref<any>([]) // 菜品分类选项
|
||||||
|
const merchantId = ref<string>("")
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
try {
|
||||||
|
const res = await getCanteenCategory()
|
||||||
|
categoryOptions.value = res.data
|
||||||
|
} catch (error) {
|
||||||
|
categoryOptions.value = []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 打开弹窗
|
||||||
|
const openDialog = async () => {
|
||||||
|
dialogVisible.value = true
|
||||||
|
merchantId.value = ""
|
||||||
|
getDataList(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取商品数据并且勾选
|
||||||
|
const getDataList = async (isSearch = false) => {
|
||||||
|
if (isSearch) {
|
||||||
|
queryForm.current = 1
|
||||||
|
}
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const { code, data } = await fetchList(queryForm)
|
||||||
|
if (code === 0) {
|
||||||
|
dataList.value = data.records
|
||||||
|
total.value = data.total
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
dataList.value = []
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页变化
|
||||||
|
const sizeChangeHandle = (val: number) => {
|
||||||
|
queryForm.size = val
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
const currentChangeHandle = (val: number) => {
|
||||||
|
queryForm.current = val
|
||||||
|
getDataList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryRef.value?.resetFields()
|
||||||
|
getDataList(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商品选择对话框确认
|
||||||
|
const dialogConfirm = async () => {
|
||||||
|
if (!merchantId.value) return useMessage().error("请选择商户")
|
||||||
|
const $table = tableRef.value
|
||||||
|
if ($table) {
|
||||||
|
const currentSelectedRows = $table.getSelectionRows()
|
||||||
|
|
||||||
|
const items = currentSelectedRows.map((item: any) => {
|
||||||
|
return {
|
||||||
|
name: item.name,
|
||||||
|
linkSpuId: item.id,
|
||||||
|
categoryId: item.categoryId,
|
||||||
|
picUrl: item.picUrl,
|
||||||
|
sort: item.sort,
|
||||||
|
status: item.status,
|
||||||
|
price: item.price,
|
||||||
|
stock: item.stock,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
loading.value = true
|
||||||
|
const { code, msg } = await saveCanteenSpuBatch({ merchantId: merchantId.value, items })
|
||||||
|
if (code != 0) return useMessage().error(msg)
|
||||||
|
useMessage().success("保存成功")
|
||||||
|
dialogVisible.value = false
|
||||||
|
emit("refresh")
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error(error as string)
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const tableStyle = {
|
||||||
|
cellStyle: { textAlign: "center" },
|
||||||
|
headerCellStyle: {
|
||||||
|
textAlign: "center",
|
||||||
|
background: "var(--el-table-row-hover-bg-color)",
|
||||||
|
color: "var(--el-text-color-primary)",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -24,7 +24,16 @@
|
|||||||
@click="formDialogRef.openDialog()"
|
@click="formDialogRef.openDialog()"
|
||||||
v-auth="'canteen_canteenOnlineSpu_add'"
|
v-auth="'canteen_canteenOnlineSpu_add'"
|
||||||
>
|
>
|
||||||
新 增
|
新增常驻菜品
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="folder-add"
|
||||||
|
type="primary"
|
||||||
|
class="ml10"
|
||||||
|
@click="exportFormDialogRef.openDialog()"
|
||||||
|
v-auth="'canteen_canteenOnlineSpu_add'"
|
||||||
|
>
|
||||||
|
导入每日菜品
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
@@ -79,11 +88,11 @@
|
|||||||
{{ displayPrice(scope.row.price) }}
|
{{ displayPrice(scope.row.price) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="marketPrice" label="市场价" show-overflow-tooltip min-width="100">-->
|
<!-- <el-table-column prop="marketPrice" label="市场价" show-overflow-tooltip min-width="100">-->
|
||||||
<!-- <template #default="scope">-->
|
<!-- <template #default="scope">-->
|
||||||
<!-- {{ displayPrice(scope.row.marketPrice) }}-->
|
<!-- {{ displayPrice(scope.row.marketPrice) }}-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<el-table-column prop="stock" label="库存" show-overflow-tooltip min-width="100" />
|
<el-table-column prop="stock" label="库存" show-overflow-tooltip min-width="100" />
|
||||||
<el-table-column prop="salesCount" label="商品销量" show-overflow-tooltip min-width="100" />
|
<el-table-column prop="salesCount" label="商品销量" show-overflow-tooltip min-width="100" />
|
||||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||||
@@ -109,6 +118,8 @@
|
|||||||
|
|
||||||
<!-- 编辑、新增 -->
|
<!-- 编辑、新增 -->
|
||||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
<!-- 关联每日菜品 -->
|
||||||
|
<export-form-dialog ref="exportFormDialogRef" @refresh="getDataList(false)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -120,12 +131,13 @@ import { useDict } from "/@/hooks/dict"
|
|||||||
import { displayPrice } from "/@/utils/formatMoney"
|
import { displayPrice } from "/@/utils/formatMoney"
|
||||||
import { fetchList as getCanteenOnlineCategory } from "/@/api/canteen/canteenOnlineCategory"
|
import { fetchList as getCanteenOnlineCategory } from "/@/api/canteen/canteenOnlineCategory"
|
||||||
|
|
||||||
// 引入组件
|
|
||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
|
const ExportFormDialog = defineAsyncComponent(() => import("./export-form.vue"))
|
||||||
|
|
||||||
const { spu_status } = useDict("spu_status")
|
const { spu_status } = useDict("spu_status")
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
|
const exportFormDialogRef = ref()
|
||||||
// 搜索变量
|
// 搜索变量
|
||||||
const queryRef = ref()
|
const queryRef = ref()
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true)
|
||||||
@@ -147,7 +159,6 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// table hook
|
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
|
|||||||
@@ -8,17 +8,17 @@
|
|||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="商品名称" prop="name">
|
<el-form-item label="菜品名称" prop="name">
|
||||||
<el-input v-model.trim="form.name" placeholder="请输入商品名称" />
|
<el-input v-model.trim="form.name" placeholder="请输入菜品名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="商品分类" prop="categoryId">
|
<el-form-item label="菜品分类" prop="categoryId">
|
||||||
<select-ctcg v-model="form.categoryId" />
|
<select-ctcg v-model="form.categoryId" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" class="mb20">
|
<el-col :span="24" class="mb20">
|
||||||
<el-form-item label="商品封面图" prop="picUrl">
|
<el-form-item label="菜品封面图" prop="picUrl">
|
||||||
<upload-img v-model:imageUrl="form.picUrl" />
|
<upload-img v-model:imageUrl="form.picUrl" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="商品状态" prop="status">
|
<el-form-item label="菜品状态" prop="status">
|
||||||
<el-radio-group v-model="form.status">
|
<el-radio-group v-model="form.status">
|
||||||
<el-radio :label="item.value" v-for="(item, index) in spu_status" border :key="index">{{ item.label }}</el-radio>
|
<el-radio :label="item.value" v-for="(item, index) in spu_status" border :key="index">{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="14" class="mb20">
|
<el-col :span="14" class="mb20">
|
||||||
<el-form-item label="商品价格" prop="price">
|
<el-form-item label="菜品价格" prop="price">
|
||||||
<el-input-number v-model="form.price" :min="0" :precision="2" placeholder="请输入商品价格" />
|
<el-input-number v-model="form.price" :min="0" :precision="2" placeholder="请输入菜品价格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
|
|
||||||
<!-- <el-col :span="24" class="mb20">-->
|
<!-- <el-col :span="24" class="mb20">-->
|
||||||
<!-- <el-form-item label="商品详情" prop="description">-->
|
<!-- <el-form-item label="菜品详情" prop="description">-->
|
||||||
<!-- <editor v-if="visible" v-model:get-html="form.description" placeholder="请输入商品详情"></editor>-->
|
<!-- <editor v-if="visible" v-model:get-html="form.description" placeholder="请输入菜品详情"></editor>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -131,24 +131,24 @@ const form = reactive({
|
|||||||
|
|
||||||
// 定义校验规则
|
// 定义校验规则
|
||||||
const dataRules = ref({
|
const dataRules = ref({
|
||||||
categoryId: [{ required: true, message: "商品分类不能为空", trigger: "blur" }],
|
categoryId: [{ required: true, message: "菜品分类不能为空", trigger: "blur" }],
|
||||||
merchantId: [{ required: true, message: "商户不能为空", trigger: "blur" }],
|
merchantId: [{ required: true, message: "商户不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "商品名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "菜品名称不能为空", trigger: "blur" }],
|
||||||
picUrl: [{ required: true, message: "商品封面图不能为空", trigger: "blur" }],
|
picUrl: [{ required: true, message: "菜品封面图不能为空", trigger: "blur" }],
|
||||||
status: [{ required: true, message: "商品状态不能为空", trigger: "blur" }],
|
status: [{ required: true, message: "菜品状态不能为空", trigger: "blur" }],
|
||||||
sort: [{ validator: rule.number, trigger: "blur" }],
|
sort: [{ validator: rule.number, trigger: "blur" }],
|
||||||
price: [
|
price: [
|
||||||
{ validator: rule.number, trigger: "blur" },
|
{ validator: rule.number, trigger: "blur" },
|
||||||
{ required: true, message: "商品状态不能为空", trigger: "blur" },
|
{ required: true, message: "菜品状态不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
marketPrice: [
|
marketPrice: [
|
||||||
{ validator: rule.number, trigger: "blur" },
|
{ validator: rule.number, trigger: "blur" },
|
||||||
{ required: true, message: "商品状态不能为空", trigger: "blur" },
|
{ required: true, message: "菜品状态不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
costPrice: [{ validator: rule.number, trigger: "blur" }],
|
costPrice: [{ validator: rule.number, trigger: "blur" }],
|
||||||
stock: [
|
stock: [
|
||||||
{ validator: rule.number, trigger: "blur" },
|
{ validator: rule.number, trigger: "blur" },
|
||||||
{ required: true, message: "商品状态不能为空", trigger: "blur" },
|
{ required: true, message: "菜品状态不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
giveIntegral: [{ validator: rule.number, trigger: "blur" }],
|
giveIntegral: [{ validator: rule.number, trigger: "blur" }],
|
||||||
salesCount: [{ validator: rule.number, trigger: "blur" }],
|
salesCount: [{ validator: rule.number, trigger: "blur" }],
|
||||||
@@ -205,7 +205,7 @@ const getcanteenSpuData = (id: string) => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const categoryList = ref<any>([]) // 商品分类树
|
const categoryList = ref<any>([]) // 菜品分类树
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const data = await getAllSimple()
|
const data = await getAllSimple()
|
||||||
categoryList.value = data.data
|
categoryList.value = data.data
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<el-row v-show="showSearch">
|
<el-row v-show="showSearch">
|
||||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
<el-form :model="state.queryForm" ref="queryRef" :inline="true" @keyup.enter="getDataList">
|
||||||
<el-form-item label="商品名称" prop="name">
|
<el-form-item label="菜品名称" prop="name">
|
||||||
<el-input placeholder="请输入商品名称" v-model="state.queryForm.name" />
|
<el-input placeholder="请输入菜品名称" v-model="state.queryForm.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品分类" prop="categoryId">
|
<el-form-item label="菜品分类" prop="categoryId">
|
||||||
<select-ctcg v-model="state.queryForm.categoryId" style="width: 200px" />
|
<select-ctcg v-model="state.queryForm.categoryId" style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -51,30 +51,30 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="50" />
|
<el-table-column type="index" label="#" width="50" />
|
||||||
<el-table-column prop="name" label="商品名称" width="120px" show-overflow-tooltip />
|
<el-table-column prop="name" label="菜品名称" width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="categoryId" label="商品分类" width="100px" show-overflow-tooltip>
|
<el-table-column prop="categoryId" label="菜品分类" width="100px" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ categoryOptions?.find((item: any) => item?.id === row?.categoryId)?.name }}
|
{{ categoryOptions?.find((item: any) => item?.id === row?.categoryId)?.name }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="picUrl" label="商品封面图" align="center" width="160px" show-overflow-tooltip>
|
<el-table-column prop="picUrl" label="菜品封面图" align="center" width="160px" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<preview-image :src="scope.row.picUrl" />
|
<preview-image :src="scope.row.picUrl" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="sliderPicUrls" label="商品轮播图" show-overflow-tooltip /> -->
|
<!-- <el-table-column prop="sliderPicUrls" label="菜品轮播图" show-overflow-tooltip /> -->
|
||||||
<el-table-column prop="sort" label="排序字段" show-overflow-tooltip />
|
<el-table-column prop="sort" label="排序字段" show-overflow-tooltip />
|
||||||
<el-table-column prop="status" label="上架状态" show-overflow-tooltip>
|
<el-table-column prop="status" label="上架状态" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="spu_status" :value="scope.row.status" />
|
<dict-tag :options="spu_status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="isShow" label="是否在移动端显示" show-overflow-tooltip>
|
<el-table-column prop="isShow" label="是否在移动端显示" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="is_show" :value="scope.row.isShow"></dict-tag>
|
<dict-tag :options="is_show" :value="scope.row.isShow"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="price" label="商品价格" show-overflow-tooltip>
|
<el-table-column prop="price" label="菜品价格" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{ displayPrice(scope.row.price) }}
|
{{ displayPrice(scope.row.price) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -84,10 +84,10 @@
|
|||||||
{{ displayPrice(scope.row.marketPrice) }}
|
{{ displayPrice(scope.row.marketPrice) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column prop="costPrice" label="成本价" show-overflow-tooltip />-->
|
<!-- <el-table-column prop="costPrice" label="成本价" show-overflow-tooltip />-->
|
||||||
<!-- <el-table-column prop="stock" label="库存" show-overflow-tooltip />-->
|
<!-- <el-table-column prop="stock" label="库存" show-overflow-tooltip />-->
|
||||||
<!-- <el-table-column prop="giveIntegral" label="赠送积分" show-overflow-tooltip /> -->
|
<!-- <el-table-column prop="giveIntegral" label="赠送积分" show-overflow-tooltip /> -->
|
||||||
<!-- <el-table-column prop="salesCount" label="商品销量" show-overflow-tooltip />-->
|
<!-- <el-table-column prop="salesCount" label="菜品销量" show-overflow-tooltip />-->
|
||||||
<!-- <el-table-column prop="virtualSalesCount" label="虚拟销量" show-overflow-tooltip /> -->
|
<!-- <el-table-column prop="virtualSalesCount" label="虚拟销量" show-overflow-tooltip /> -->
|
||||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip min-width="160" />
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="150" fixed="right">
|
||||||
@@ -126,7 +126,7 @@ import { getAllSimple as getCanteenCategory } from "/@/api/canteen/canteenCatego
|
|||||||
// 引入组件
|
// 引入组件
|
||||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||||
|
|
||||||
const { spu_status,is_show } = useDict("spu_status","is_show")
|
const { spu_status, is_show } = useDict("spu_status", "is_show")
|
||||||
// 定义变量内容
|
// 定义变量内容
|
||||||
const formDialogRef = ref()
|
const formDialogRef = ref()
|
||||||
// 搜索变量
|
// 搜索变量
|
||||||
@@ -135,7 +135,7 @@ const showSearch = ref(true)
|
|||||||
// 多选变量
|
// 多选变量
|
||||||
const selectObjs = ref([]) as any
|
const selectObjs = ref([]) as any
|
||||||
const multiple = ref(true)
|
const multiple = ref(true)
|
||||||
const categoryOptions = ref<any>([]) // 商品分类选项
|
const categoryOptions = ref<any>([]) // 菜品分类选项
|
||||||
|
|
||||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
queryForm: {},
|
queryForm: {},
|
||||||
|
|||||||
@@ -23,20 +23,21 @@
|
|||||||
:data="dataList"
|
:data="dataList"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:row-key="(row:any) => row.id"
|
:row-key="(row:any) => row.id"
|
||||||
:reserve-selection="true"
|
|
||||||
@selection-change=""
|
@selection-change=""
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50" reserve-selection fixed="left" align="center" />
|
<el-table-column type="selection" width="50" reserve-selection fixed="left" />
|
||||||
<el-table-column type="index" label="#" width="50" fixed="left" align="center" />
|
<el-table-column type="index" label="#" width="50" fixed="left" />
|
||||||
<el-table-column prop="productName" label="商品名称" min-width="150px" align="center" show-overflow-tooltip />
|
<el-table-column prop="productName" label="商品名称" min-width="150px" show-overflow-tooltip />
|
||||||
<el-table-column prop="picUrl" label="封面图" align="center" show-overflow-tooltip>
|
<el-table-column prop="picUrl" label="封面图" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<preview-image @click.stop :src="scope.row.picUrl" />
|
<preview-image @click.stop :src="scope.row.picUrl" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stock" label="库存" min-width="80px" align="center" show-overflow-tooltip />
|
<el-table-column prop="stock" label="库存" min-width="80px" show-overflow-tooltip />
|
||||||
<el-table-column prop="productCode" label="货号" min-width="100px" align="center" show-overflow-tooltip />
|
<el-table-column prop="productCode" label="货号" min-width="100px" show-overflow-tooltip />
|
||||||
<el-table-column label="包装单位" min-width="300px" align="center">
|
<el-table-column label="包装单位" min-width="300px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="scope.row.erpUnitVos && scope.row.erpUnitVos.length > 0">
|
<div v-if="scope.row.erpUnitVos && scope.row.erpUnitVos.length > 0">
|
||||||
<div class="flex flex-wrap gap-2">
|
<div class="flex flex-wrap gap-2">
|
||||||
@@ -49,12 +50,12 @@
|
|||||||
<div v-else class="text-gray-400">无包装单位</div>
|
<div v-else class="text-gray-400">无包装单位</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productNature" label="商品性质" show-overflow-tooltip align="center" width="150">
|
<el-table-column prop="productNature" label="商品性质" show-overflow-tooltip width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="supermarket_nature" :value="scope.row.productNature" />
|
<dict-tag :options="supermarket_nature" :value="scope.row.productNature" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="status" label="状态" min-width="100px" align="center" show-overflow-tooltip>
|
<el-table-column prop="status" label="状态" min-width="100px" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="status" :value="scope.row.status" />
|
<dict-tag :options="status" :value="scope.row.status" />
|
||||||
</template>
|
</template>
|
||||||
@@ -174,6 +175,15 @@ onMounted(async () => {
|
|||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const tableStyle = {
|
||||||
|
cellStyle: { textAlign: "center" },
|
||||||
|
headerCellStyle: {
|
||||||
|
textAlign: "center",
|
||||||
|
background: "var(--el-table-row-hover-bg-color)",
|
||||||
|
color: "var(--el-text-color-primary)",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog,
|
openDialog,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,7 +31,14 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8" style="width: 100%">
|
||||||
<el-button icon="folder-add" type="primary" class="ml10" @click="create" v-auth="'supermarket_smErpInventoryRecords_add'">
|
<el-button
|
||||||
|
disabled
|
||||||
|
icon="folder-add"
|
||||||
|
type="primary"
|
||||||
|
class="ml10"
|
||||||
|
@click="create"
|
||||||
|
v-auth="'supermarket_smErpInventoryRecords_add'"
|
||||||
|
>
|
||||||
新 增
|
新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@@ -80,18 +80,18 @@
|
|||||||
覆盖导入
|
覆盖导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip effect="dark" content="导入盘点数据" placement="top">
|
<el-tooltip effect="dark" content="导入盘点数据" placement="top">
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
v-auth="'supermarket_supermarketSpu_import'"
|
v-auth="'supermarket_supermarketSpu_import'"
|
||||||
class="ml10"
|
class="ml10"
|
||||||
icon="upload-filled"
|
icon="upload-filled"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="excelUploadPd.show()"
|
@click="excelUploadPd.show()"
|
||||||
>
|
>
|
||||||
盘点导入
|
盘点导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -190,20 +190,14 @@
|
|||||||
@refreshDataList="refreshDataList"
|
@refreshDataList="refreshDataList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<upload-excel
|
<upload-excel-update
|
||||||
ref="excelUploadUpdateRef"
|
ref="excelUploadUpdateRef"
|
||||||
title="覆盖导入库存商品"
|
title="覆盖导入库存商品"
|
||||||
url="/supermarket/supermarketSpu/importNewUpdate"
|
url="/supermarket/supermarketSpu/importNewUpdate"
|
||||||
@refreshDataList="refreshDataList"
|
@refreshDataList="refreshDataList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<upload-excel
|
<upload-excel ref="excelUploadPd" title="导入库存盘点" url="/supermarket/supermarketSpu/importPD" @refreshDataList="refreshDataList" />
|
||||||
ref="excelUploadPd"
|
|
||||||
title="导入库存盘点"
|
|
||||||
url="/supermarket/supermarketSpu/importPD"
|
|
||||||
@refreshDataList="refreshDataList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -213,6 +207,7 @@ import { fetchList, delObjs, getSupermarketCategory, getSupermarketBrand } from
|
|||||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||||
import { useDict } from "/@/hooks/dict"
|
import { useDict } from "/@/hooks/dict"
|
||||||
import UploadExcel from "./components/upload-excel.vue"
|
import UploadExcel from "./components/upload-excel.vue"
|
||||||
|
import UploadExcelUpdate from "./components/upload-excel-update.vue"
|
||||||
import { displayPrice } from "/@/utils/formatMoney"
|
import { displayPrice } from "/@/utils/formatMoney"
|
||||||
import { getSupplierSimpleAll } from "/@/api/supermarketerp/smErpSupplier"
|
import { getSupplierSimpleAll } from "/@/api/supermarketerp/smErpSupplier"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user