jsk 商超

This commit is contained in:
skjia 2025-06-09 09:42:39 +08:00
parent 9349d1db4e
commit d2a3148552
2 changed files with 25 additions and 29 deletions

View File

@ -69,7 +69,7 @@ export function deleteSupermarketApi(data) {
data: data
})
}
// 商品列表
// 商超商品列表
export function shopPageListApi(data) {
return request({
url: '/smart-canteen/supermarket_product/list',
@ -80,13 +80,20 @@ export function shopPageListApi(data) {
params: data
})
}
// 商品列表
export function shopProductPageListApi(data) {
return request({
url: '/smart-canteen/supermarket_product/getAddList',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params: data
})
}

View File

@ -485,9 +485,7 @@
/>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click=""
>批量线上销售</el-button
>
<el-button type="primary" @click="">批量线上销售</el-button>
</el-form-item>
</el-form>
</el-row>
@ -496,11 +494,7 @@
<el-col :span="24" :xs="24">
<el-table v-loading="loading" :data="tableAddShopListData" height="550" ref="multipleTable" border :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" :reserve-selection="true"/>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="区域" align="center" key="areaName" prop="areaName" :show-overflow-tooltip="true" />
<el-table-column label="名称" align="center" key="materialName" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" key="unitName" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="商品类别" align="center" key="materialTypeName" prop="materialTypeName" :show-overflow-tooltip="true" />
@ -540,17 +534,10 @@
<el-table-column label="条码" align="center" key="barCode" prop="barCode" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleShopUpdate(scope.row)"
>
编辑
</el-button>
<el-button
size="mini"
type="text" style="color: red;"
@click="handleShopDelete(scope.row)"
@click="handleAddShopDelete(scope.row)"
>
删除
</el-button>
@ -567,6 +554,10 @@
</el-col>
</el-row>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelAddShopProduct"> </el-button>
<el-button type="primary" @click="handleAddShopProduct">添加商品</el-button>
</div>
</el-dialog>
@ -578,16 +569,12 @@
<script>
import { systemAreaTreeApi } from "@/api/base/area";
import { drpWareHousePageApi,supermarketPageListApi,insertSupermarketApi,editSupermarketApi,deleteSupermarketApi,userListByRoleApi
,shopPageListApi} from "@/api/superStore/super";
,shopPageListApi,shopProductPageListApi} from "@/api/superStore/super";
import { shopMaterialTreeApi} from "@/api/superStore/shopMaterial";
import { imgUpLoadTwo } from '@/api/system/upload'
import ShopingDialog from './ShopingDialog.vue';
export default {
name: "",
dicts: ['sys_user_type'],
components: {
ShopingDialog
},
data() {
return {
//
@ -755,6 +742,7 @@
orderDTO:{},//
mealtimeList:[],//
selectSupermarketId:"",
selectAreaId:"",
queryAddShopParams:{
pageNum: 1,
pageSize: 10,
@ -1080,6 +1068,7 @@
handleAddShoping(row){
console.log("商品",row)
this.selectSupermarketId=row.supermarketId;
this.selectAreaId=row.areaId;
this.titleProduct="商品";
this.openProduct=true;
this.getShopTreeData();
@ -1130,6 +1119,7 @@
this.reset();
this.openAddProduct = true;
this.titleAddProduct = "新增-超市商品";
this.getAddShopList();
},
/** 新增商品列表 */
getAddShopList() {
@ -1137,10 +1127,9 @@
let param = {
"pageNum": this.queryAddShopParams.pageNum,
"pageSize": this.queryAddShopParams.pageSize,
"warehouseId": this.queryAddShopParams.warehouseId,
"areaId":this.queryAddShopParams.areaId
"areaId":this.selectAreaId
}
shopPageListApi(param).then(response => {
shopProductPageListApi(param).then(response => {
this.tableAddShopListData = response.rows;
console.log("this.tableAddShopListData",this.tableAddShopListData);
this.total = Number(response.total);