fix: 代码合并,耗材出入库代码修改

This commit is contained in:
2025-03-21 11:32:10 +08:00
15 changed files with 120 additions and 173 deletions

View File

@@ -119,6 +119,14 @@ const AuthAPI = {
method: "post", method: "post",
data, data,
}); });
},
// 库存修改
modifyStock(data: any) {
return request<any, Responseres>({
url: `${baseURL}/modifyStock`,
method: "post",
data,
});
} }
}; };

View File

@@ -7,8 +7,7 @@
<el-table-column label="使用门槛"> <el-table-column label="使用门槛">
<template v-slot="scope"> <template v-slot="scope">
{{ {{
`${scope.row.fullAmount}${ `${scope.row.fullAmount}${scope.row.discountAmount ? "" + scope.row.discountAmount + "" : ""
scope.row.discountAmount ? "" + scope.row.discountAmount + "" : ""
}` }`
}} }}
</template> </template>
@@ -23,14 +22,9 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
:total="tableData.total" @current-change="paginationChange" @size-change="sizeChange"
:current-page="tableData.page + 1" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:page-size="tableData.size"
@current-change="paginationChange"
@size-change="sizeChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
<span slot="footer" class="dialog-footer" v-if="!radio"> <span slot="footer" class="dialog-footer" v-if="!radio">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="confirmHandle"> </el-button> <el-button type="primary" @click="confirmHandle"> </el-button>
@@ -57,7 +51,7 @@ export default {
}, },
categoryList: [], categoryList: [],
tableData: { tableData: {
page: 0, page: 1,
size: 10, size: 10,
total: 0, total: 0,
loading: false, loading: false,

View File

@@ -141,7 +141,7 @@ export default {
}, },
tableData: { tableData: {
data: [], data: [],
page: 0, page: 1,
size: 30, size: 30,
loading: false, loading: false,
total: 0, total: 0,

View File

@@ -10,10 +10,7 @@
<el-table-column label="手机号" prop="phone"></el-table-column> <el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="状态"> <el-table-column label="状态">
<template v-slot="scope"> <template v-slot="scope">
<span <span style="font-weight: 400; font-size: 14px" :style="{ color: scope.row.state == 2 ? '#3F9EFF' : '' }">
style="font-weight: 400; font-size: 14px"
:style="{ color: scope.row.state == 2 ? '#3F9EFF' : '' }"
>
{{ stateFilter(scope.row.state) }} {{ stateFilter(scope.row.state) }}
</span> </span>
</template> </template>
@@ -43,7 +40,7 @@ export default {
}, },
tableData: { tableData: {
data: [], data: [],
page: 0, page: 1,
size: 30, size: 30,
loading: false, loading: false,
total: 0, total: 0,

View File

@@ -6,32 +6,17 @@
<el-input v-model="form.stockNumber" readonly style="width: 180px"></el-input> <el-input v-model="form.stockNumber" readonly style="width: 180px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="实际数量"> <el-form-item label="实际数量">
<el-input-number <el-input-number v-model="form.actualNumber" :min="0" :step="1" step-strictly
v-model="form.actualNumber" style="width: 180px"></el-input-number>
:min="0"
:step="1"
step-strictly
style="width: 180px"
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="盈亏数量"> <el-form-item label="盈亏数量">
<el-input <el-input v-model="profitNumber" readonly :class="{ lose: profitNumber < 0 }" style="width: 180px"></el-input>
v-model="profitNumber"
readonly
:class="{ lose: profitNumber < 0 }"
style="width: 180px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="单价"> <el-form-item label="单价">
<el-input v-model="form.price" readonly></el-input> <el-input v-model="form.price" readonly></el-input>
</el-form-item> </el-form-item>
<el-form-item label="盈亏金额"> <el-form-item label="盈亏金额">
<el-input <el-input v-model="profitPrice" readonly :class="{ lose: profitNumber < 0 }" style="width: 180px"></el-input>
v-model="profitPrice"
readonly
:class="{ lose: profitNumber < 0 }"
style="width: 180px"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="form.remark" placeholder="请输入备注" style="width: 300px"></el-input> <el-input v-model="form.remark" placeholder="请输入备注" style="width: 300px"></el-input>
@@ -58,7 +43,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="售价" prop="price"> <el-table-column label="售价" prop="price">
<template v-slot="scope">{{ scope.row.price }}</template> <template v-slot="scope">{{ scope.row.winLossAmount }}</template>
</el-table-column> </el-table-column>
<el-table-column label="账存数量" prop="beforeNumber"></el-table-column> <el-table-column label="账存数量" prop="beforeNumber"></el-table-column>
<el-table-column label="盈亏数量" prop="inOutNumber"></el-table-column> <el-table-column label="盈亏数量" prop="inOutNumber"></el-table-column>
@@ -70,15 +55,9 @@
<el-table-column label="盘点备注" prop="remark"></el-table-column> <el-table-column label="盘点备注" prop="remark"></el-table-column>
</el-table> </el-table>
</div> </div>
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-sizes="[5, 10, 30, 50]"
:total="tableData.total" :page-size="tableData.size" @current-change="paginationChange" @size-change="sizeChange"
:current-page="tableData.page + 1" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:page-sizes="[5, 10, 30, 50]"
:page-size="tableData.size"
@current-change="paginationChange"
@size-change="sizeChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</el-dialog> </el-dialog>
</template> </template>
@@ -117,7 +96,7 @@ export default {
productId: "", productId: "",
}, },
tableData: { tableData: {
page: 0, page: 1,
size: 5, size: 5,
total: 0, total: 0,
loading: false, loading: false,

View File

@@ -6,12 +6,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="searhForm.category" placeholder="商品分类"> <el-select v-model="searhForm.category" placeholder="商品分类">
<el-option <el-option :label="item.name" :value="item.id" v-for="item in categoryList" :key="item.id"></el-option>
:label="item.name"
:value="item.id"
v-for="item in categoryList"
:key="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@@ -20,20 +15,9 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="head-container"> <div class="head-container">
<el-table <el-table ref="table" :data="tableData.list" @select="firstSelectChange" v-loading="tableData.loading"
ref="table" :row-key="getRowKey" @selection-change="onSelectionChange">
:data="tableData.list" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
@select="firstSelectChange"
v-loading="tableData.loading"
:row-key="getRowKey"
@selection-change="onSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column label="商品信息"> <el-table-column label="商品信息">
<template v-slot="scope"> <template v-slot="scope">
<div class="shop_info"> <div class="shop_info">
@@ -72,14 +56,9 @@
<el-table-column label="分类名称" prop="categoryName"></el-table-column> <el-table-column label="分类名称" prop="categoryName"></el-table-column>
</el-table> </el-table>
</div> </div>
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
:total="tableData.total" @current-change="paginationChange" @size-change="sizeChange"
:current-page="tableData.page + 1" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:page-size="tableData.size"
@current-change="paginationChange"
@size-change="sizeChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
@@ -103,7 +82,7 @@ export default {
}, },
categoryList: [], categoryList: [],
tableData: { tableData: {
page: 0, page: 1,
size: 10, size: 10,
total: 0, total: 0,
loading: false, loading: false,
@@ -198,7 +177,7 @@ export default {
async tbShopCategoryGet() { async tbShopCategoryGet() {
try { try {
const res = await tbShopCategoryGet({ const res = await tbShopCategoryGet({
page: 0, page: 1,
size: 100, size: 100,
sort: "id", sort: "id",
shopId: localStorage.getItem("shopId"), shopId: localStorage.getItem("shopId"),
@@ -239,6 +218,7 @@ export default {
max-height: 60vh; max-height: 60vh;
overflow-y: scroll; overflow-y: scroll;
} }
.shop_info { .shop_info {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -513,6 +513,7 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
.app-container { .app-container {
} }
</style> </style>

View File

@@ -1,25 +1,17 @@
<!-- 新增pad选菜页 --> <!-- 新增pad选菜页 -->
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="`${preview ? '预览' : form.id ? '编辑' : '添加'}平板菜谱`" top="5vh" width="1000px" v-model="dialogVisible"
:title="`${preview ? '预览' : form.id ? '编辑' : '添加'}平板菜谱`" :show-close="preview">
top="5vh"
width="1000px"
v-model="dialogVisible"
:show-close="preview"
>
<div class="content" v-loading="pageLoading"> <div class="content" v-loading="pageLoading">
<div class="editor_wrap" :class="[`type${typeListActive}`]"> <div class="editor_wrap" :class="[`type${typeListActive}`]">
<template v-if="typeListActive != 6"> <template v-if="typeListActive != 6">
<div <div class="btn_wrap" :class="[`div${index + 1}`]" v-for="(item, index) in form.list" :key="index"
class="btn_wrap" @click="showSelectGoods(index)">
:class="[`div${index + 1}`]"
v-for="(item, index) in form.list"
:key="index"
@click="showSelectGoods(index)"
>
<div class="btn" v-if="!item.id"> <div class="btn" v-if="!item.id">
<el-icon size="40" color="#dddfe6"><Plus /></el-icon> <el-icon size="40" color="#dddfe6">
<Plus />
</el-icon>
</div> </div>
<div class="cover" v-else> <div class="cover" v-else>
<img class="img" :src="item.coverImg" /> <img class="img" :src="item.coverImg" />
@@ -33,13 +25,8 @@
</div> </div>
</div> </div>
<div class="goods_list" v-else> <div class="goods_list" v-else>
<div <div class="btn_wrap" :class="[`div${index + 1}`]" v-for="(item, index) in form.list" :key="index"
class="btn_wrap" @click="selectGoods(item)">
:class="[`div${index + 1}`]"
v-for="(item, index) in form.list"
:key="index"
@click="selectGoods(item)"
>
<div class="info" :class="{ active: item.active }"> <div class="info" :class="{ active: item.active }">
<span class="t1">{{ item.name }}</span> <span class="t1">{{ item.name }}</span>
<span class="t1">{{ item.lowPrice }}</span> <span class="t1">{{ item.lowPrice }}</span>
@@ -61,12 +48,7 @@
<el-button type="primary" :loading="loading" @click="submitHandle"> </el-button> <el-button type="primary" :loading="loading" @click="submitHandle"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<GoodsSelect <GoodsSelect ref="refSelGoods" radio disableCategory @success="selectConfirmGoods"></GoodsSelect>
ref="refSelGoods"
radio
disableCategory
@success="selectConfirmGoods"
></GoodsSelect>
<!-- <shopList ref="shopList" disableCategory radio @success="selectConfirmGoods" /> --> <!-- <shopList ref="shopList" disableCategory radio @success="selectConfirmGoods" /> -->
</div> </div>
</template> </template>
@@ -109,7 +91,7 @@ export default {
try { try {
const res = await tbProduct({ const res = await tbProduct({
categoryId: this.category, categoryId: this.category,
page: 0, page: 1,
size: 20, size: 20,
sort: "id", sort: "id",
shopId: localStorage.getItem("shopId"), shopId: localStorage.getItem("shopId"),

View File

@@ -11,13 +11,8 @@
<div class="tree_wrap"> <div class="tree_wrap">
<!-- <el-tree :data="treeData" node-key="id" highlight-current :props="{ label: 'name' }" default-expand-all <!-- <el-tree :data="treeData" node-key="id" highlight-current :props="{ label: 'name' }" default-expand-all
@node-click="treeItemClick"></el-tree> --> @node-click="treeItemClick"></el-tree> -->
<div <div class="item" :class="{ active: selectCatoryIndex == index }" v-for="(item, index) in treeData"
class="item" :key="item.id" @click="treeItemClick(item, index)">
:class="{ active: selectCatoryIndex == index }"
v-for="(item, index) in treeData"
:key="item.id"
@click="treeItemClick(item, index)"
>
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
@@ -27,14 +22,7 @@
<el-button type="primary" @click="addHandle">新建</el-button> <el-button type="primary" @click="addHandle">新建</el-button>
</div> </div>
<div class="table" id="table_drag"> <div class="table" id="table_drag">
<el-table <el-table ref="table" :data="tableData.list" border height="100%" v-loading="tableData.loading" row-key="id">
ref="table"
:data="tableData.list"
border
height="100%"
v-loading="tableData.loading"
row-key="id"
>
<el-table-column label="序号" type="index" width="80"></el-table-column> <el-table-column label="序号" type="index" width="80"></el-table-column>
<el-table-column label="ID" prop="id" width="80"></el-table-column> <el-table-column label="ID" prop="id" width="80"></el-table-column>
<el-table-column label="菜品名称" prop="productNames"></el-table-column> <el-table-column label="菜品名称" prop="productNames"></el-table-column>
@@ -55,14 +43,9 @@
</el-table> </el-table>
</div> </div>
<div class="head-container"> <div class="head-container">
<el-pagination <el-pagination @size-change="paginationSizeChange" :total="tableData.total" :current-page="tableData.page"
@size-change="paginationSizeChange" :page-size="tableData.size" @current-change="paginationChange"
:total="tableData.total" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:current-page="tableData.page"
:page-size="tableData.size"
@current-change="paginationChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div> </div>
</div> </div>
<AddPadPage ref="AddPadPage" :category="selectCatory.id" @success="addSuccess" /> <AddPadPage ref="AddPadPage" :category="selectCatory.id" @success="addSuccess" />
@@ -183,7 +166,7 @@ export default {
this.tableData.loading = true; this.tableData.loading = true;
try { try {
const res = await paoductCategoryApi.getList({ const res = await paoductCategoryApi.getList({
page: 0, page: 1,
size: 100, size: 100,
}); });
this.treeDataOrgin = res; this.treeDataOrgin = res;

View File

@@ -25,8 +25,14 @@
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0" <el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
@click="handleSwitchChange(scope.row)"></el-switch> @click="handleSwitchChange(scope.row)"></el-switch>
</template> </template>
<template #kucunedit="scope">
{{ scope.row.stockNumber }} <el-icon @click="kucunedit(scope.row)" style="cursor: pointer;color: #4080ff;">
<EditPen />
</el-icon>
</template>
<template #tuikuantuihui="scope"> <template #tuikuantuihui="scope">
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0" <el-switch v-if="!scope.row.productId" v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
@click="handleSwitchhaocai(scope.row)"></el-switch> @click="handleSwitchhaocai(scope.row)"></el-switch>
</template> </template>
<template #sellOut="scope"> <template #sellOut="scope">
@@ -139,6 +145,10 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</MyDialog> </MyDialog>
<!-- 库存修改 -->
<MyDialog ref="myDialogRefkucun" @confirm="confirmkucun" width="30%" title="库存修改">
<el-input-number v-model="kucundata.stockNumber" :min="0" />
</MyDialog>
</div> </div>
</template> </template>
@@ -155,6 +165,7 @@ import editModalConfig from "./indexconfig/edit";
import searchConfig from "./indexconfig/search"; import searchConfig from "./indexconfig/search";
import MyDialog from "@/components/mycomponents/myDialog.vue"; import MyDialog from "@/components/mycomponents/myDialog.vue";
import Statistics from "./indexconfig/statistics.vue"; import Statistics from "./indexconfig/statistics.vue";
const { const {
searchRef, searchRef,
contentRef, contentRef,
@@ -174,8 +185,10 @@ const myDialogRef = ref(null);
const route = useRoute(); const route = useRoute();
const myDialogRefbaosun = ref(null); const myDialogRefbaosun = ref(null);
const myDialogRefhaocai = ref(null); const myDialogRefhaocai = ref(null);
const myDialogRefkucun = ref(null);
let haocaiData = ref({}); let haocaiData = ref({});
let options = ref([]); let options = ref([]);
let kucundata = ref(0)
const form = reactive({ const form = reactive({
warnLine: "", warnLine: "",
}); });
@@ -189,6 +202,16 @@ function newHandleQueryClick(e: IObject | undefined) {
contentRef.value?.fetchPageData({ ...e, ...filterParams }, true); contentRef.value?.fetchPageData({ ...e, ...filterParams }, true);
getTongji(e); getTongji(e);
} }
// 库存修改
function kucunedit(item) {
kucundata.value = item
myDialogRefkucun.value.open()
}
async function confirmkucun() {
let res = await UserAPI.modifyStock({ id: kucundata.value.id, stockNumber: kucundata.value.stockNumber })
ElMessage.success('成功')
myDialogRefkucun.value.close()
}
function editOpen(item: any) { function editOpen(item: any) {
haocaiData.value = item haocaiData.value = item
if (haocaiData.value.consList.length == 0) { if (haocaiData.value.consList.length == 0) {

View File

@@ -1,18 +1,19 @@
<template> <template>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<el-table :data="props.list" border style="width: 100%"> <el-table :data="props.list" border style="">
<el-table-column prop="productName" align="center" label="商品名称/规格名称" /> <el-table-column prop="productName" align="center" label="商品名称/规格名称" />
<el-table-column prop="beforeNumber" align="center" label="原库存" /> <el-table-column prop="beforeNumber" align="center" label="原库存" />
<el-table-column prop="afterNumber" align="center" label="变动后库存" /> <el-table-column prop="afterNumber" align="center" label="变动后库存" />
<el-table-column prop="inOutNumber" align="center" label="报损数量" /> <el-table-column prop="inOutNumber" align="center" label="报损数量" />
<el-table-column prop="createUserName" align="center" label="报损人" /> <el-table-column prop="createUserName" align="center" label="报损人" />
<el-table-column prop="orderId" align="center" label="图片">
<template slot-scope="scope">
<img :src="JSON.parse(scope.row.imgUrls)[0]" alt="" style="width: 50px;height: 50px;">
</template>
</el-table-column>
<el-table-column prop="remark" align="center" label="备注" /> <el-table-column prop="remark" align="center" label="备注" />
<el-table-column prop="createTime" align="center" label="操作时间" /> <el-table-column prop="createTime" align="center" label="操作时间" />
<el-table-column prop="" align="center" label="图片">
<template v-slot="scope">
<img :src="scope.row.imagesone" alt="" v-if="scope.row.imagesone" style="width: 50px;height: 50px;">
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</template> </template>

View File

@@ -76,7 +76,8 @@ const contentConfig: IContentConfig<UserPageQuery> = {
label: "商品规格", align: "center", prop: "type", templet: "custom", label: "商品规格", align: "center", prop: "type", templet: "custom",
slotName: "type", slotName: "type",
}, },
{ label: "库存", align: "center", prop: "stockNumber" }, // { label: "库存", align: "center", prop: "stockNumber" },
{ label: "库存", align: "center", slotName: "kucunedit", templet: "custom", prop: "stockNumber" },
{ label: "耗材信息", align: "center", prop: "consName", slotName: "consumables", templet: "custom", }, { label: "耗材信息", align: "center", prop: "consName", slotName: "consumables", templet: "custom", },
{ {
label: "上架", label: "上架",

View File

@@ -13,7 +13,7 @@
</el-icon> </el-icon>
<div> <div>
<div><span>增加数量</span><span class="datastyle" @click="clickEvent('inSumTotal')">{{ dataAll.dataList.inSumTotal <div><span>增加数量</span><span class="datastyle" @click="clickEvent('inSumTotal')">{{ dataAll.dataList.inSumTotal
}}</span></div> }}</span></div>
<div style="display: flex;"> <div style="display: flex;">
<div> <div>
<span>手动增加</span><span class="datastyle" @click="clickEvent('winInNum')">{{ dataAll.dataList.winInNum <span>手动增加</span><span class="datastyle" @click="clickEvent('winInNum')">{{ dataAll.dataList.winInNum
@@ -132,8 +132,15 @@ async function clickEvent(key) {
obj = { page: dataAll.pagingConfig.pageNumber, size: dataAll.pagingConfig.pageSize, productId: "", inOutType: "out", inOutItem: "damage-out" } obj = { page: dataAll.pagingConfig.pageNumber, size: dataAll.pagingConfig.pageSize, productId: "", inOutType: "out", inOutItem: "damage-out" }
break; break;
} }
dataAll.tableData = []
let res = await UserAPI.stockFlow(obj); let res = await UserAPI.stockFlow(obj);
dataAll.tableData = res.records dataAll.tableData = res.records
dataAll.tableData.forEach((item, index) => {
if (item.imgUrls.length > 7) {
item.imagesone = JSON.parse(item.imgUrls)[0]
}
})
dataAll.pagingConfig.total = res.totalRow dataAll.pagingConfig.total = res.totalRow
dataAll.pagingConfig.pageSize = res.pageSize dataAll.pagingConfig.pageSize = res.pageSize
dataAll.pagingConfig.pageNumber = res.pageNumber dataAll.pagingConfig.pageNumber = res.pageNumber

View File

@@ -22,10 +22,7 @@
<el-table-column label="用户" prop="headImg" width="200px"> <el-table-column label="用户" prop="headImg" width="200px">
<template v-slot="scope"> <template v-slot="scope">
<div class="user_info"> <div class="user_info">
<el-image <el-image :src="scope.row.headImg" style="width: 40px; height: 40px; flex-shrink: 0">
:src="scope.row.headImg"
style="width: 40px; height: 40px; flex-shrink: 0"
>
<template #error> <template #error>
<div class="image-slot"> <div class="image-slot">
<i class="el-icon-user"></i> <i class="el-icon-user"></i>
@@ -55,20 +52,15 @@
</el-table> </el-table>
</div> </div>
<div class="head-container"> <div class="head-container">
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
:total="tableData.total" @size-change="sizeChange" @current-change="paginationChange"
:current-page="tableData.page + 1" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:page-size="tableData.size"
@size-change="sizeChange"
@current-change="paginationChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import shopUserApi from "@/api/account/shopUser"; import shopUserApi from "@/api/account/shopUser";
import dayjs from "dayjs"; import dayjs from "dayjs";
let cacheData = {}; let cacheData = {};
@@ -81,7 +73,7 @@ const state = reactive({
}, },
tableData: { tableData: {
data: [], data: [],
page: 0, page: 1,
size: 10, size: 10,
loading: false, loading: false,
total: 0, total: 0,
@@ -175,7 +167,7 @@ defineExpose({
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.user_info { .user_info {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -184,6 +176,7 @@ defineExpose({
margin-left: 10px; margin-left: 10px;
} }
} }
:deep(.el-input--small .el-input__inner) { :deep(.el-input--small .el-input__inner) {
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
@@ -231,12 +224,13 @@ defineExpose({
} }
} }
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.gap-20 { .gap-20 {
gap: 20px; gap: 20px;
} }
</style> </style>

View File

@@ -13,20 +13,15 @@
</el-table> </el-table>
</div> </div>
<div class="head-container"> <div class="head-container">
<el-pagination <el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
:total="tableData.total" @size-change="sizeChange" @current-change="paginationChange"
:current-page="tableData.page + 1" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
:page-size="tableData.size"
@size-change="sizeChange"
@current-change="paginationChange"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { $douyin_storelist, $douyin_bindstore } from "@/api/coup/index"; import { $douyin_storelist, $douyin_bindstore } from "@/api/coup/index";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
@@ -44,7 +39,7 @@ export default {
}, },
tableData: { tableData: {
data: [], data: [],
page: 0, page: 1,
size: 10, size: 10,
loading: false, loading: false,
total: 0, total: 0,
@@ -141,7 +136,7 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.user_info { .user_info {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -150,6 +145,7 @@ export default {
margin-left: 10px; margin-left: 10px;
} }
} }
:deep(.el-input--small .el-input__inner) { :deep(.el-input--small .el-input__inner) {
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
@@ -197,12 +193,13 @@ export default {
} }
} }
} }
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.gap-20 { .gap-20 {
gap: 20px; gap: 20px;
} }
</style> </style>