商超管理接口对接,轮播图管理,app更新
This commit is contained in:
parent
63d955e57c
commit
d62b8344b5
|
|
@ -1,5 +1,88 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// ---------- 基础设置 ------------------
|
||||||
|
|
||||||
|
//基础设置
|
||||||
|
export function queryBaseSettingApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/getBaseSettingByKey',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//基础设置
|
||||||
|
export function saveBaseSettingApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/addBaseSetting',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- 轮播图 ------------------
|
||||||
|
|
||||||
|
// 查询轮播图列表
|
||||||
|
export function getCarouselListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/getCarouselImage',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增轮播图
|
||||||
|
export function addCarouselApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/addCarouseImage',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑轮播图
|
||||||
|
export function updateCarouselApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/updateCarouseImageById',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除轮播图
|
||||||
|
export function removeCarouselApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/android/baseSetting/delCarouseImageById',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 来源下拉数据
|
// 来源下拉数据
|
||||||
export function getSourceTypeListApi(data) {
|
export function getSourceTypeListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,17 @@ export function getMenuRecipeDetailApi(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 上传APK
|
||||||
|
export function uploadApkApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/doubleScreenMachine/uploadApk',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 原料类别
|
// 商品类别
|
||||||
export function systemMaterialTreeApi(data) {
|
export function systemMaterialTreeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/tree/list',
|
url: '/smart-canteen/menu_material_category/getTree',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -11,10 +11,10 @@ export function systemMaterialTreeApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 新增原料类别
|
// 新增商品类别
|
||||||
export function addMaterialTypeApi(data) {
|
export function addMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/add',
|
url: '/smart-canteen/menu_material_category/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -22,10 +22,10 @@ export function addMaterialTypeApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//修改原料类别
|
//修改商品类别
|
||||||
export function updateMaterialTypeApi(data) {
|
export function updateMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/edit',
|
url: '/smart-canteen/menu_material_category/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -33,10 +33,10 @@ export function updateMaterialTypeApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//删除原料类别
|
//删除商品类别
|
||||||
export function removeMaterialTypeApi(data) {
|
export function removeMaterialTypeApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterialcategory/remove',
|
url: '/smart-canteen/menu_material_category/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -44,35 +44,24 @@ export function removeMaterialTypeApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 系统区域权限树
|
// 查询商品列表
|
||||||
export function systemAreaTreeApi(data) {
|
|
||||||
return request({
|
|
||||||
url: '/smart-canteen/api/v2/alloc/area/system-auth/tree',
|
|
||||||
method: 'post',
|
|
||||||
headers: {
|
|
||||||
"merchant-id":"378915229716713472",
|
|
||||||
},
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询原料列表
|
|
||||||
export function getMaterialListApi(data) {
|
export function getMaterialListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/page',
|
url: '/smart-canteen/supermarket_product/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增原料
|
// 新增商品
|
||||||
export function addMaterialApi(data) {
|
export function addMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/add',
|
url: '/smart-canteen/supermarket_product/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -81,10 +70,10 @@ export function addMaterialApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑原料
|
// 编辑商品
|
||||||
export function updateMaterialApi(data) {
|
export function updateMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/edit',
|
url: '/smart-canteen/supermarket_product/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -93,20 +82,10 @@ export function updateMaterialApi(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除原料
|
// 删除商品
|
||||||
export function removeMaterialApi(data) {
|
export function removeMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/remove/'+data.materialId,
|
url: '/smart-canteen/supermarket_product/del',
|
||||||
method: 'post',
|
|
||||||
headers: {
|
|
||||||
"merchant-id":"378915229716713472",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 批量删除原料
|
|
||||||
export function batchRemoveMaterialApi(data) {
|
|
||||||
return request({
|
|
||||||
url: '/smart-canteen/api/v1/menumaterial/remove/batch',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -114,7 +93,18 @@ export function batchRemoveMaterialApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 批量修改原料
|
// 批量删除商品
|
||||||
|
export function batchRemoveMaterialApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/supermarket_product/dels',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量修改商品
|
||||||
export function batchUpdateMaterialApi(data) {
|
export function batchUpdateMaterialApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/menumaterial/material/batch/update/category',
|
url: '/smart-canteen/api/v1/menumaterial/material/batch/update/category',
|
||||||
|
|
@ -125,15 +115,15 @@ export function batchUpdateMaterialApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 根据区域ID-获取原料单位下拉选
|
// 根据区域ID-获取商品单位下拉选
|
||||||
//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'}
|
//{current: 1, size: -1, ifListUse: 1, areaId: '421488254718578688'}
|
||||||
export function getDrpUnitListApi(data) {
|
export function getDrpUnitListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen//api/v1/drpunit/page',
|
url: '/smart-canteen/supermarket_unit/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -3,12 +3,12 @@ import request from '@/utils/request'
|
||||||
// 仓库
|
// 仓库
|
||||||
export function drpWareHousePageApi(data) {
|
export function drpWareHousePageApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/drpwarehouse/page',
|
url: '/smart-canteen/warehouse_info/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -16,18 +16,18 @@ export function drpWareHousePageApi(data) {
|
||||||
// 超市列表
|
// 超市列表
|
||||||
export function supermarketPageListApi(data) {
|
export function supermarketPageListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/basics-supermarket/page-supermarket',
|
url: '/smart-canteen/supermarket_info/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 超市列表-新增
|
// 超市列表-新增
|
||||||
export function insertSupermarketApi(data) {
|
export function insertSupermarketApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/basics-supermarket/insert-supermarket',
|
url: '/smart-canteen/supermarket_info/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -38,7 +38,7 @@ export function insertSupermarketApi(data) {
|
||||||
// 超市列表-编辑
|
// 超市列表-编辑
|
||||||
export function editSupermarketApi(data) {
|
export function editSupermarketApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/basics-supermarket/edit-supermarket',
|
url: '/smart-canteen/supermarket_info/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -50,7 +50,7 @@ export function editSupermarketApi(data) {
|
||||||
// 超市列表-删除
|
// 超市列表-删除
|
||||||
export function deleteSupermarketApi(data) {
|
export function deleteSupermarketApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/basics-supermarket/delete-supermarket',
|
url: '/smart-canteen/supermarket_info/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
|
||||||
|
|
@ -15,19 +15,19 @@ export function systemAreaTreeApi(data) {
|
||||||
// 单位列表-分页
|
// 单位列表-分页
|
||||||
export function drpUnitPageListApi(data) {
|
export function drpUnitPageListApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/drpunit/page',
|
url: '/smart-canteen/supermarket_unit/list',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
data: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单位列表-新增
|
// 单位列表-新增
|
||||||
export function addDrpUnitApi(data) {
|
export function addDrpUnitApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/drpunit/add',
|
url: '/smart-canteen/supermarket_unit/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -39,7 +39,7 @@ export function addDrpUnitApi(data) {
|
||||||
// 单位列表-编辑
|
// 单位列表-编辑
|
||||||
export function editDrpUnitApi(data) {
|
export function editDrpUnitApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/drpunit/edit',
|
url: '/smart-canteen/supermarket_unit/edit',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
|
|
@ -49,14 +49,14 @@ export function editDrpUnitApi(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单位列表-删除
|
// 单位列表-删除
|
||||||
export function removeDrpUnitApi(unitId) {
|
export function removeDrpUnitApi(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/smart-canteen/api/v1/drpunit/remove/'+unitId,
|
url: '/smart-canteen/supermarket_unit/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: {
|
headers: {
|
||||||
"merchant-id":"378915229716713472",
|
"merchant-id":"378915229716713472",
|
||||||
},
|
},
|
||||||
// data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,11 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||||
|
<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" prop="canteenName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
<el-table-column label="食堂名称" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="180"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="180"/>
|
||||||
<el-table-column label="负责人" align="center" prop="director" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="负责人" align="center" prop="director" :show-overflow-tooltip="true" width="120"/>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,11 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||||
|
<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" prop="canteenNum" :show-overflow-tooltip="true" width="100" fixed="left"/>
|
<el-table-column label="编号" align="center" prop="canteenNum" :show-overflow-tooltip="true" width="100" fixed="left"/>
|
||||||
<el-table-column label="名称" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
<el-table-column label="名称" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
||||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,11 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||||
|
<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" prop="stallName" :show-overflow-tooltip="true" width="180" fixed="left"/>
|
<el-table-column label="档口名称" align="center" prop="stallName" :show-overflow-tooltip="true" width="180" fixed="left"/>
|
||||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="160"/>
|
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="160"/>
|
||||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="160"/>
|
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="160"/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,382 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="名称">
|
||||||
|
<el-input v-model="queryParams.imageName" placeholder="请输入名称" maxlength="20" clearable style="width: 220px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||||
|
<el-table-column label="名称" align="center" prop="imageName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="外链" align="center" prop="externalUrl" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="图片" align="center" prop="imageUrl">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<img :src="scope.row.imageUrl" v-if="scope.row.imageUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||||
|
<span v-else>无</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="图片地址" align="center" prop="imageUrl" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="启用" align="center" prop="isEnabled" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.isEnabled"
|
||||||
|
active-value="0"
|
||||||
|
inactive-value="2"
|
||||||
|
@change="handleStatusChange(scope.row)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>编辑</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="名称" prop="imageName">
|
||||||
|
<el-input v-model="form.imageName" placeholder="请输入名称" maxlength="30" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="外链地址" prop="externalUrl">
|
||||||
|
<el-input v-model="form.externalUrl" placeholder="请输入外链地址" maxlength="100" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="图片地址">
|
||||||
|
<el-input v-model="form.imageUrl" placeholder="图片地址" disabled clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="图片" prop="imageUrl">
|
||||||
|
<el-upload
|
||||||
|
:http-request="
|
||||||
|
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||||
|
"
|
||||||
|
action="#"
|
||||||
|
:limit="1"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="true"
|
||||||
|
list-type="picture-card"
|
||||||
|
accept=".png, .jpg, .jpeg"
|
||||||
|
:on-change="handleFileChange"
|
||||||
|
:on-success="handleAvatarSuccess"
|
||||||
|
:class="{ disabled: uploadDisabled }"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="el-icon-plus avatar-uploader-icon"
|
||||||
|
></i>
|
||||||
|
</el-upload>
|
||||||
|
<span>* 提示:图片宽高比例为750px*520px</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
|
<img width="100%" :src="dialogImageUrl" alt="">
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getCarouselListApi,addCarouselApi,updateCarouselApi,removeCarouselApi } from "@/api/base/mobile.js";
|
||||||
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
|
export default {
|
||||||
|
name: "",
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
//表格数据
|
||||||
|
tableListData: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
imageName: undefined,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
imageName: [
|
||||||
|
{ required: true, message: "名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
imageUrl: [
|
||||||
|
{ required: true, message: "图片不能为空", trigger: "change" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
fileList: [],//图片
|
||||||
|
checkUrlList: [],//图片
|
||||||
|
checkUrlNameList: [],//食堂图片
|
||||||
|
dialogVisible:false,//图片弹窗
|
||||||
|
dialogImageUrl:"",//图片弹窗
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
//图片上传1张后,隐藏上传框
|
||||||
|
uploadDisabled() {
|
||||||
|
return this.checkUrlList.length > 0
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
let param = {
|
||||||
|
// "pageNum": this.queryParams.pageNum,
|
||||||
|
// "pageSize": this.queryParams.pageSize,
|
||||||
|
"imageName": this.queryParams.imageName
|
||||||
|
}
|
||||||
|
getCarouselListApi(param).then(response => {
|
||||||
|
this.tableListData = response.data;
|
||||||
|
// this.total = Number(response.total);
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "新增";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
this.form = Object.assign({}, row)
|
||||||
|
if(this.form.imageUrl){
|
||||||
|
this.fileList=[{url:this.form.imageUrl}]
|
||||||
|
this.checkUrlList=[this.form.imageUrl]
|
||||||
|
}else{
|
||||||
|
this.fileList=[]
|
||||||
|
this.checkUrlList=[]
|
||||||
|
}
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改";
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.checkUrlList=[]
|
||||||
|
this.checkUrlNameList=[]
|
||||||
|
this.fileList=[]
|
||||||
|
this.form = {};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.imageUrl = this.checkUrlList[0]
|
||||||
|
if (this.form.id != undefined) {
|
||||||
|
updateCarouselApi(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCarouselApi(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleStatusChange(row){
|
||||||
|
let param = {
|
||||||
|
id:row.id,
|
||||||
|
imageName:row.imageName,
|
||||||
|
externalUrl:row.externalUrl,
|
||||||
|
imageUrl:row.imageUrl,
|
||||||
|
}
|
||||||
|
if(row.isEnabled==0){
|
||||||
|
param.isEnabled=2
|
||||||
|
}else{
|
||||||
|
param.isEnabled=0
|
||||||
|
}
|
||||||
|
console.log(param)
|
||||||
|
updateCarouselApi(param).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
|
return removeCarouselApi({id:row.id});
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
// 图片上传
|
||||||
|
imgUpLoad(param, name, index) {
|
||||||
|
// console.log(param,'image')
|
||||||
|
param.type = 'canteen'
|
||||||
|
imgUpLoadTwo(param).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.checkUrlList.push(res.data.url)
|
||||||
|
this.checkUrlNameList.push(res.data.name)
|
||||||
|
this.form.imageUrl = this.checkUrlList[0]
|
||||||
|
} else {
|
||||||
|
this.$modal.msgError(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.$modal.msgError(error)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
checkImageSize(file, fileType) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
reader.onload = (e) => {
|
||||||
|
const img = new Image();
|
||||||
|
img.onload = () => {
|
||||||
|
const { width, height } = img;
|
||||||
|
// 设置你希望限制的图片尺寸
|
||||||
|
const MAX_WIDTH = 750;
|
||||||
|
const MAX_HEIGHT = 520;
|
||||||
|
console.log(width)
|
||||||
|
console.log(height)
|
||||||
|
if (width <= MAX_WIDTH && height <= MAX_HEIGHT) {
|
||||||
|
this.form[fileType] = file.raw
|
||||||
|
this.$refs['form'].validateField(fileType)
|
||||||
|
this.$message.success(`图片尺寸符合要求: ${width}x${height}`);
|
||||||
|
} else {
|
||||||
|
this.$message.error(`图片尺寸不能超过 ${MAX_WIDTH}x${MAX_HEIGHT}`);
|
||||||
|
// 清空当前上传的文件
|
||||||
|
this.form[fileType] = ''
|
||||||
|
this.$refs['form'].validateField(fileType)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
img.src = e.target.result;
|
||||||
|
};
|
||||||
|
reader.readAsDataURL(file.raw);
|
||||||
|
},
|
||||||
|
handleFileChange(file){
|
||||||
|
this.checkImageSize(file,'imageUrl');
|
||||||
|
},
|
||||||
|
handleAvatarSuccess(res, file) {
|
||||||
|
console.log('success')
|
||||||
|
},
|
||||||
|
handleExceed(files, fileList) {
|
||||||
|
this.$message.warning('最多只可以上传一张图片')
|
||||||
|
},
|
||||||
|
handleRemove(file, fileList) {
|
||||||
|
let sum = 0
|
||||||
|
this.checkUrlNameList.forEach((item, index) => {
|
||||||
|
if (item == file.name) {
|
||||||
|
sum = index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.checkUrlNameList.splice(sum, 1)
|
||||||
|
this.checkUrlList.splice(sum, 1)
|
||||||
|
},
|
||||||
|
//图片点击查看
|
||||||
|
handlePictureCardPreview(file) {
|
||||||
|
console.log(file)
|
||||||
|
this.dialogImageUrl = file.url
|
||||||
|
this.dialogVisible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
//隐藏图片上传框的css
|
||||||
|
::v-deep.disabled {
|
||||||
|
.el-upload--picture-card {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<h2 style="font-weight: bold;">基础设置</h2>
|
||||||
|
<div style="width: 100%;margin: 10px auto;border: 1px solid #ccc;padding: 10px;border-radius: 10px;">
|
||||||
|
<h3 style="font-weight: bold;">其他</h3>
|
||||||
|
<div class="item">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<span>首页标题</span>
|
||||||
|
<el-input
|
||||||
|
v-model="indexTitle" style="width: 200px;margin-left: 20px;"
|
||||||
|
auto-complete="off"
|
||||||
|
placeholder="首页标题"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div style="color: #999;">用于移动端修改首页标题,默认为“智慧食堂”,可根据需求进行修改</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 30px 20px;">
|
||||||
|
<!-- <el-switch
|
||||||
|
v-model="accBaseSubData.ifSubManualReceive"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="2">
|
||||||
|
</el-switch> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="width: 100%;display: flex;justify-content: center;">
|
||||||
|
<el-button type="primary" @click="saveBaseSet">保存</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { queryBaseSettingApi,saveBaseSettingApi } from "@/api/base/mobile.js";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "",
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
indexTitle:""
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.queryAccBaseSub()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryAccBaseSub(){
|
||||||
|
queryBaseSettingApi({"key": "首页标题"}).then(response => {
|
||||||
|
this.indexTitle = response.data.value||""
|
||||||
|
});
|
||||||
|
},
|
||||||
|
saveBaseSet(){
|
||||||
|
let param = {
|
||||||
|
"key": "首页标题",
|
||||||
|
"value": this.indexTitle
|
||||||
|
}
|
||||||
|
saveBaseSettingApi(param).then(response => {
|
||||||
|
this.$message.success("保存成功");
|
||||||
|
this.queryAccBaseSub()
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.item{
|
||||||
|
width: 96%;margin: 10px auto;border: 1px solid #ccc;padding: 20px 10px;border-radius: 8px;display: flex;justify-content: space-between;align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
@ -53,6 +53,13 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleApp"
|
||||||
|
>更新APP</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -255,7 +262,80 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog title="更新APP" :visible.sync="openApp" width="800px" append-to-body>
|
||||||
|
<el-form :model="appForm" ref="appForm" size="small" :rules="appFormRules" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="APP版本号" prop="version">
|
||||||
|
<el-input v-model="appForm.version" placeholder="请输入APP版本号" maxlength="50" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="版本号名称" prop="versionName">
|
||||||
|
<el-input v-model="appForm.versionName" placeholder="请输入版本号名称" maxlength="50" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="更新内容" prop="updateContent">
|
||||||
|
<el-input v-model="appForm.updateContent" type="textarea" :rows="3" placeholder="请输入更新内容" maxlength="150" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="APP类型" prop="type">
|
||||||
|
<el-select v-model="appForm.type" placeholder="请选择" style="width: 100%;">
|
||||||
|
<el-option label="食堂APP" :value="1"></el-option>
|
||||||
|
<el-option label="超市APP" :value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="APP名称" prop="apkName">
|
||||||
|
<el-input v-model="appForm.apkName" placeholder="请输入APP名称" maxlength="50" clearable/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="APP路径" prop="apkPath">
|
||||||
|
<el-input v-model="appForm.apkPath" placeholder="请上传App" readonly clearable style="width: 100%;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" style="display: flex;justify-content: center;align-items: center;">
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:limit="1"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:action="upload.url"
|
||||||
|
accept=".apk"
|
||||||
|
:show-file-list="false"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
>上传App
|
||||||
|
</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="confirmApp">确 定</el-button>
|
||||||
|
<el-button @click="openApp=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -265,8 +345,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { getDeviceListPageApi,addDeviceApi, updateDeviceApi, deleteDeviceApi,getMenuRecipeDetailApi } from "@/api/device/index";
|
import { getDeviceListPageApi,addDeviceApi, updateDeviceApi, deleteDeviceApi,getMenuRecipeDetailApi,uploadApkApi } from "@/api/device/index";
|
||||||
import base64 from 'base-64';
|
import base64 from 'base-64';
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
dicts: ["dev_comm_status","dev_status"],
|
dicts: ["dev_comm_status","dev_status"],
|
||||||
|
|
@ -390,6 +471,41 @@
|
||||||
recipeId:"",
|
recipeId:"",
|
||||||
menuData:[],
|
menuData:[],
|
||||||
menuSubData:[],
|
menuSubData:[],
|
||||||
|
openApp:false,
|
||||||
|
appForm:{
|
||||||
|
version:null,
|
||||||
|
versionName:null,
|
||||||
|
apkName:null,
|
||||||
|
apkPath:null,
|
||||||
|
updateContent:null,
|
||||||
|
type:1,//1食堂APP 2超市APP
|
||||||
|
},
|
||||||
|
//导入参数
|
||||||
|
upload: {
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + '/file/upload',
|
||||||
|
},
|
||||||
|
appFormRules:{
|
||||||
|
version: [
|
||||||
|
{ required: true, message: "版本号不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
versionName: [
|
||||||
|
{ required: true, message: "版本号名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
apkName: [
|
||||||
|
{ required: true, message: "APP名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
apkPath: [
|
||||||
|
{ required: true, message: "APP路径不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
updateContent: [
|
||||||
|
{ required: true, message: "更新内容不能为空", trigger: "blur" }
|
||||||
|
]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|
@ -556,7 +672,6 @@
|
||||||
this.$refs['baseForm'].clearValidate(['stallId']);
|
this.$refs['baseForm'].clearValidate(['stallId']);
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
console.log(this.baseForm)
|
console.log(this.baseForm)
|
||||||
|
|
@ -589,8 +704,7 @@
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 今日菜谱按钮操作-打开弹窗 */
|
/** 今日菜谱按钮操作-打开弹窗 */
|
||||||
openMenuDialog(row){
|
openMenuDialog(row){
|
||||||
this.openMenu=true
|
this.openMenu=true
|
||||||
|
|
@ -625,8 +739,45 @@
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
return `${year}-${month}-${day}`;
|
return `${year}-${month}-${day}`;
|
||||||
}
|
},
|
||||||
|
handleApp(){
|
||||||
|
this.appForm = {
|
||||||
|
version:null,
|
||||||
|
versionName:null,
|
||||||
|
apkName:null,
|
||||||
|
apkPath:null,
|
||||||
|
updateContent:null,
|
||||||
|
type:1,//1食堂APP 2超市APP
|
||||||
|
};
|
||||||
|
this.resetForm("appForm");
|
||||||
|
this.openApp = true;
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
console.log(response)
|
||||||
|
this.upload.isUploading = false
|
||||||
|
this.$refs.upload.clearFiles()
|
||||||
|
if(response.code==200){
|
||||||
|
this.appForm.apkPath=response.data.url
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("上传失败,请重新选择文件!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
confirmApp(){
|
||||||
|
console.log(this.appForm)
|
||||||
|
this.$refs["appForm"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
uploadApkApi(this.appForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
this.openApp = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,9 @@
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="商品名称" prop="materialName">
|
<el-form-item label="商品名称" prop="productName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.materialName"
|
v-model="form.productName"
|
||||||
placeholder="请输入商品名称"
|
placeholder="请输入商品名称"
|
||||||
maxlength="40"
|
maxlength="40"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
|
|
@ -83,24 +83,24 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="商品类别" prop="categoryId">
|
<el-form-item label="商品类别" prop="materialId">
|
||||||
<el-cascader v-model="form.categoryId"
|
<el-cascader v-model="form.materialId"
|
||||||
:options="treeTypeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeTypeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
:props="{
|
:props="{
|
||||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||||
value:'id',label:'categoryName'
|
value:'id',label:'categoryName'
|
||||||
}" clearable >
|
}" clearable >
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="商品进价" prop="unitPrice">
|
<el-form-item label="商品进价" prop="prefPrice">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.unitPrice"
|
v-model="form.prefPrice"
|
||||||
placeholder="请输入商品进价"
|
placeholder="请输入商品进价"
|
||||||
@input="handleNumericInput('unitPrice', $event)"
|
@input="handleNumericInput('prefPrice', $event)"
|
||||||
@blur="formatNumericValue('unitPrice')"
|
@blur="formatNumericValue('prefPrice')"
|
||||||
>
|
>
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
@ -110,38 +110,38 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="保质期" prop="shelfLifeDays">
|
<el-form-item label="保质期" prop="qualityNum">
|
||||||
<el-select v-model="form.shelfLifeType" style="width: 80px; margin-left: 10px">
|
<el-select v-model="form.qualityType" style="width: 80px; margin-left: 10px">
|
||||||
<el-option label="按年" value="1" />
|
<el-option label="按年" value="1" />
|
||||||
<el-option label="按月" value="2" />
|
<el-option label="按月" value="2" />
|
||||||
<el-option label="按日" value="3" />
|
<el-option label="按日" value="3" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input v-model="form.shelfLifeDays" placeholder="请输入" style="width: 120px;margin-right: 10px;" @input="(v)=>(form.shelfLifeDays=v.replace(/[^\d]/g,''))"/>
|
<el-input v-model="form.qualityNum" placeholder="请输入" style="width: 120px;margin-right: 10px;" @input="(v)=>(form.qualityNum=v.replace(/[^\d]/g,''))"/>
|
||||||
<span v-if="form.shelfLifeType==1">年</span>
|
<span v-if="form.qualityType==1">年</span>
|
||||||
<span v-if="form.shelfLifeType==2">月</span>
|
<span v-if="form.qualityType==2">月</span>
|
||||||
<span v-if="form.shelfLifeType==3">日</span>
|
<span v-if="form.qualityType==3">日</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="供应资格证书" prop="qualificationCert">
|
<el-form-item label="供应资格证书" prop="supplyCertificate">
|
||||||
<el-select v-model="form.qualificationCert" placeholder="请选择供应资格证书" style="width: 100%">
|
<el-select v-model="form.supplyCertificate" placeholder="请选择供应资格证书" style="width: 100%">
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="商品简介" prop="synopsis">
|
<el-form-item label="商品简介" prop="productRemark">
|
||||||
<el-input
|
<el-input
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="3"
|
:rows="3"
|
||||||
placeholder="请输入商品简介"
|
placeholder="请输入商品简介"
|
||||||
v-model="form.synopsis">
|
v-model="form.productRemark">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="图片" prop="imageUrl">
|
<el-form-item label="图片" prop="imgUrl">
|
||||||
<el-upload
|
<el-upload
|
||||||
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
|
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
|
||||||
action="#"
|
action="#"
|
||||||
|
|
@ -195,31 +195,31 @@ export default {
|
||||||
treeTypeOptions:[],//类型树
|
treeTypeOptions:[],//类型树
|
||||||
unitOptions:[],//单位下拉
|
unitOptions:[],//单位下拉
|
||||||
form: {
|
form: {
|
||||||
materialName: '',//商品名称
|
productName: '',//商品名称
|
||||||
areaId: null,//所属区域
|
areaId: null,//所属区域
|
||||||
categoryId: null,//商品类别
|
materialId: null,//商品类别
|
||||||
materialType: 2,
|
materialType: 2,
|
||||||
salesMode: '2',//计量类型
|
salesMode: '1',//计量类型
|
||||||
salePrice: '',//零售价(元)
|
salePrice: '',//零售价(元)
|
||||||
unitId: '',//商品单位
|
unitId: '',//商品单位
|
||||||
unitPrice: '',//商品进价(元)
|
prefPrice: '',//商品进价(元)
|
||||||
barCode: '',//条码
|
barCode: '',//条码
|
||||||
nutritionId:null,//营养信息
|
nutritionId:null,//营养信息
|
||||||
shelfLifeType:"1",//保质期类型
|
qualityType:"1",//保质期类型
|
||||||
shelfLifeDays:"",//保质期
|
qualityNum:"",//保质期
|
||||||
purPriceCeiling:'',//采购上限价格
|
purPriceCeiling:'',//采购上限价格
|
||||||
size:'',//商品规格
|
size:'',//商品规格
|
||||||
taxRate:'',//商品税率
|
taxRate:'',//商品税率
|
||||||
qualificationCert: '',
|
supplyCertificate: '',
|
||||||
synopsis:"",//简介
|
productRemark:"",//简介
|
||||||
imageUrl:"",//图片
|
imgUrl:"",//图片
|
||||||
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
materialName: [{ required: true, message: '请输入商品名称', trigger: 'blur' }],
|
productName: [{ required: true, message: '请输入商品名称', trigger: 'blur' }],
|
||||||
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
||||||
salePrice: [{ required: true, message: '请输入零售价', trigger: 'change' }],
|
salePrice: [{ required: true, message: '请输入零售价', trigger: 'change' }],
|
||||||
categoryId: [{ required: true, message: '请选择商品类别', trigger: 'change' }],
|
materialId: [{ required: true, message: '请选择商品类别', trigger: 'change' }],
|
||||||
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
||||||
unitId: [{ required: true, message: '请选择商品单位', trigger: 'change' }],
|
unitId: [{ required: true, message: '请选择商品单位', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
|
|
@ -236,7 +236,7 @@ export default {
|
||||||
return this.checkUrlList.length > 0
|
return this.checkUrlList.length > 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
this.getAreaTreeData();//获取区域树
|
this.getAreaTreeData();//获取区域树
|
||||||
this.getTypeTreeData();//获取商品类别树
|
this.getTypeTreeData();//获取商品类别树
|
||||||
this.getDrpUnitList();//获取单位类型下拉
|
this.getDrpUnitList();//获取单位类型下拉
|
||||||
|
|
@ -246,22 +246,22 @@ export default {
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
systemAreaTreeApi({}).then((response) => {
|
systemAreaTreeApi({}).then((response) => {
|
||||||
this.treeAreaOptions = response.data;
|
this.treeAreaOptions = response.data;
|
||||||
console.log(this.treeAreaOptions)
|
this.getTypeTreeData()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//基础设置-选择区域
|
//基础设置-选择区域
|
||||||
handleAreaChange(val){
|
handleAreaChange(val){
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
this.form.categoryId=null
|
this.form.materialId=null
|
||||||
this.getTypeTreeData()
|
this.getTypeTreeData()
|
||||||
this.getDrpUnitList()
|
this.getDrpUnitList()
|
||||||
},
|
},
|
||||||
//类型树
|
//类型树
|
||||||
getTypeTreeData() {
|
getTypeTreeData() {
|
||||||
let param = {
|
let param = {
|
||||||
categoryType:1,
|
categoryType:2,
|
||||||
ifAdd: 1,
|
// ifAdd: 1,
|
||||||
areaId:this.form.areaId
|
// areaId:this.form.areaId
|
||||||
}
|
}
|
||||||
systemMaterialTreeApi(param).then((response) => {
|
systemMaterialTreeApi(param).then((response) => {
|
||||||
this.treeTypeOptions = response.data;
|
this.treeTypeOptions = response.data;
|
||||||
|
|
@ -270,21 +270,22 @@ export default {
|
||||||
//单位类型拉下选
|
//单位类型拉下选
|
||||||
getDrpUnitList() {
|
getDrpUnitList() {
|
||||||
let param = {
|
let param = {
|
||||||
areaId: this.form.areaId||"",
|
weighType:this.form.salesMode,
|
||||||
ifListUse: 1,
|
// areaId: this.form.areaId||""
|
||||||
current: 1,
|
// ifListUse: 1,
|
||||||
size: -1
|
// current: 1,
|
||||||
|
// size: -1
|
||||||
}
|
}
|
||||||
this.form.unitId=null
|
this.form.unitId=null
|
||||||
getDrpUnitListApi(param).then((response) => {
|
getDrpUnitListApi(param).then((response) => {
|
||||||
this.unitOptions = [];
|
this.unitOptions = response.data;
|
||||||
if(response.data.records.length>0){
|
// if(response.data.records.length>0){
|
||||||
response.data.records.forEach(item => {
|
// response.data.records.forEach(item => {
|
||||||
if(item.weighType==this.form.salesMode){
|
// if(item.weighType==this.form.salesMode){
|
||||||
this.unitOptions.push(item)
|
// this.unitOptions.push(item)
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -295,30 +296,30 @@ export default {
|
||||||
this.getTypeTreeData()
|
this.getTypeTreeData()
|
||||||
this.getDrpUnitList()
|
this.getDrpUnitList()
|
||||||
this.$set(this.form,"areaName",row.areaName)
|
this.$set(this.form,"areaName",row.areaName)
|
||||||
this.$set(this.form,"categoryId",row.categoryId)
|
this.$set(this.form,"materialId",row.materialId)
|
||||||
this.$set(this.form,"categoryName",row.categoryName)
|
this.$set(this.form,"categoryName",row.categoryName)
|
||||||
this.$set(this.form,"materialCode",row.materialCode)
|
this.$set(this.form,"materialCode",row.materialCode)
|
||||||
this.$set(this.form,"materialId",row.materialId)
|
this.$set(this.form,"materialId",row.materialId)
|
||||||
this.$set(this.form,"materialName",row.materialName)
|
this.$set(this.form,"productName",row.productName)
|
||||||
this.$set(this.form,"materialType",row.materialType)
|
this.$set(this.form,"materialType",row.materialType)
|
||||||
this.$set(this.form,"salesMode",row.salesMode+'')
|
this.$set(this.form,"salesMode",row.salesMode+'')
|
||||||
this.$set(this.form,"unitId",row.unitId)
|
this.$set(this.form,"unitId",row.unitId)
|
||||||
this.$set(this.form,"salePrice",Number((row.salePrice/100).toFixed(2)))
|
this.$set(this.form,"salePrice",Number((row.salePrice/100).toFixed(2)))
|
||||||
this.$set(this.form,"unitPrice",Number((row.unitPrice/100).toFixed(2)))
|
this.$set(this.form,"prefPrice",Number((row.prefPrice/100).toFixed(2)))
|
||||||
this.$set(this.form,"barCode",row.barCode)
|
this.$set(this.form,"barCode",row.barCode)
|
||||||
if(row.shelfLifeType){
|
if(row.qualityType){
|
||||||
this.$set(this.form,"shelfLifeType",row.shelfLifeType+"")
|
this.$set(this.form,"qualityType",row.qualityType+"")
|
||||||
}else{
|
}else{
|
||||||
this.$set(this.form,"shelfLifeType","1")
|
this.$set(this.form,"qualityType","1")
|
||||||
}
|
}
|
||||||
this.$set(this.form,"shelfLifeDays",row.shelfLifeDays)
|
this.$set(this.form,"qualityNum",row.qualityNum)
|
||||||
this.$set(this.form,"qualificationCert","")
|
this.$set(this.form,"supplyCertificate","")
|
||||||
this.$set(this.form,"synopsis",row.synopsis)
|
this.$set(this.form,"productRemark",row.productRemark)
|
||||||
this.$set(this.form,"imageUrl",row.imageUrl)
|
this.$set(this.form,"imgUrl",row.imgUrl)
|
||||||
//图片反显
|
//图片反显
|
||||||
if(row.imageUrl){
|
if(row.imgUrl){
|
||||||
this.fileList=[{url:row.imageUrl}]
|
this.fileList=[{url:row.imgUrl}]
|
||||||
this.checkUrlList=[row.imageUrl]
|
this.checkUrlList=[row.imgUrl]
|
||||||
}else{
|
}else{
|
||||||
this.fileList=[]
|
this.fileList=[]
|
||||||
this.checkUrlList=[]
|
this.checkUrlList=[]
|
||||||
|
|
@ -329,7 +330,7 @@ export default {
|
||||||
this.$refs.form.validate(valid => {
|
this.$refs.form.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.salePrice = Number(this.form.salePrice)*100;
|
this.form.salePrice = Number(this.form.salePrice)*100;
|
||||||
this.form.unitPrice = Number(this.form.unitPrice)*100;
|
this.form.prefPrice = Number(this.form.prefPrice)*100;
|
||||||
this.$emit('submit', this.form);
|
this.$emit('submit', this.form);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -351,22 +352,22 @@ export default {
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
materialName: '',//商品名称
|
productName: '',//商品名称
|
||||||
areaId: null,//所属区域
|
areaId: null,//所属区域
|
||||||
categoryId: null,//商品类别
|
materialId: null,//商品类别
|
||||||
materialType: 2,
|
materialType: 2,
|
||||||
salesMode: '2',//计量类型
|
salesMode: '1',//计量类型
|
||||||
unitId: '',//商品单位
|
unitId: '',//商品单位
|
||||||
salePrice: '',//商品售价(元)
|
salePrice: '',//商品售价(元)
|
||||||
unitPrice: '',//商品进价(元)
|
prefPrice: '',//商品进价(元)
|
||||||
barCode: '',//条码
|
barCode: '',//条码
|
||||||
str:[],//营养信息类型
|
str:[],//营养信息类型
|
||||||
nutritionId:null,//营养信息
|
nutritionId:null,//营养信息
|
||||||
shelfLifeType:"1",//保质期类型
|
qualityType:"1",//保质期类型
|
||||||
shelfLifeDays:"",//保质期
|
qualityNum:"",//保质期
|
||||||
qualificationCert: '',
|
supplyCertificate: '',
|
||||||
synopsis:"",//简介
|
productRemark:"",//简介
|
||||||
imageUrl:""
|
imgUrl:""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -378,10 +379,10 @@ export default {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.checkUrlList.push(res.data.url)
|
this.checkUrlList.push(res.data.url)
|
||||||
this.checkUrlNameList.push(res.data.name)
|
this.checkUrlNameList.push(res.data.name)
|
||||||
this.$set(this.form,"imageUrl",res.data.url)
|
this.$set(this.form,"imgUrl",res.data.url)
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError(res.msg)
|
this.$modal.msgError(res.msg)
|
||||||
this.$set(this.form,"imageUrl","")
|
this.$set(this.form,"imgUrl","")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
:data="treeOptions"
|
:data="treeOptions"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
:show-checkbox="true"
|
:show-checkbox="true"
|
||||||
:default-expand-all="false"
|
:default-expand-all="true"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:filter-node-method="filterNode"
|
:filter-node-method="filterNode"
|
||||||
ref="typeTree"
|
ref="typeTree"
|
||||||
|
|
@ -88,9 +88,9 @@
|
||||||
}" clearable>
|
}" clearable>
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品名称" prop="materialName">
|
<el-form-item label="商品名称" prop="productName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.materialName"
|
v-model="queryParams.productName"
|
||||||
placeholder="请输入商品名称"
|
placeholder="请输入商品名称"
|
||||||
clearable maxlength="30"
|
clearable maxlength="30"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
|
|
@ -106,9 +106,9 @@
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品编码" prop="materialCode">
|
<el-form-item label="商品编码" prop="productCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.materialCode"
|
v-model="queryParams.productCode"
|
||||||
placeholder="请输入商品编码"
|
placeholder="请输入商品编码"
|
||||||
clearable maxlength="30"
|
clearable maxlength="30"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
|
|
@ -148,7 +148,7 @@
|
||||||
@click="handleBatchDel"
|
@click="handleBatchDel"
|
||||||
>批量删除</el-button>
|
>批量删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini" plain
|
size="mini" plain
|
||||||
|
|
@ -156,8 +156,8 @@
|
||||||
@click="handleBatchEdit"
|
@click="handleBatchEdit"
|
||||||
>批量修改类别
|
>批量修改类别
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
|
@ -184,11 +184,11 @@
|
||||||
@click="importTemplate"
|
@click="importTemplate"
|
||||||
>模板下载
|
>模板下载
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tableList" height="650" ref="multipleTable" border :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="tableList" 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 type="selection" width="50" align="center" :reserve-selection="true"/>
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
|
@ -196,14 +196,14 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品编码" align="center" key="materialCode" prop="materialCode" :show-overflow-tooltip="true" />
|
<el-table-column label="商品编码" align="center" key="productCode" prop="productCode" :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="productName" prop="productName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="所属区域" align="center" key="areaName" prop="areaName" :show-overflow-tooltip="true" />
|
<el-table-column label="所属区域" align="center" key="areaName" prop="areaName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="商品类别" align="center" key="categoryName" prop="categoryName" :show-overflow-tooltip="true" />
|
<el-table-column label="商品类别" align="center" key="categoryName" prop="categoryName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="单位" align="center" key="unitName" prop="unitName" :show-overflow-tooltip="true" width="100"/>
|
<el-table-column label="单位" align="center" key="unitName" prop="unitName" :show-overflow-tooltip="true" width="100"/>
|
||||||
<el-table-column label="商品进价(元)" align="center" key="unitPrice" prop="unitPrice" :show-overflow-tooltip="true">
|
<el-table-column label="商品进价(元)" align="center" key="prefPrice" prop="prefPrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.unitPrice/100).toFixed(2)||"" }}</span>
|
<span>{{ (scope.row.prefPrice/100).toFixed(2)||"" }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零售价(元)" align="center" key="salePrice" prop="salePrice" :show-overflow-tooltip="true">
|
<el-table-column label="零售价(元)" align="center" key="salePrice" prop="salePrice" :show-overflow-tooltip="true">
|
||||||
|
|
@ -387,9 +387,9 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
areaId:null,
|
areaId:null,
|
||||||
materialName:"",
|
productName:"",
|
||||||
barCode:"",
|
barCode:"",
|
||||||
materialCode:"",
|
productCode:"",
|
||||||
materialType:2, //类型(1商品2商品)
|
materialType:2, //类型(1商品2商品)
|
||||||
categoryIdList:[]
|
categoryIdList:[]
|
||||||
},
|
},
|
||||||
|
|
@ -592,18 +592,18 @@ export default {
|
||||||
console.log(this.$refs.typeTree.getCheckedKeys())
|
console.log(this.$refs.typeTree.getCheckedKeys())
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let params= {
|
let params= {
|
||||||
"size": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"current": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
"materialName": this.queryParams.materialName,
|
"productName": this.queryParams.productName,
|
||||||
"barCode": this.queryParams.barCode,
|
"barCode": this.queryParams.barCode,
|
||||||
"materialCode": this.queryParams.materialCode,
|
"productCode": this.queryParams.productCode,
|
||||||
"materialType": this.queryParams.materialType,//类型(1商品2商品)
|
"materialType": this.queryParams.materialType,//类型(1商品2商品)
|
||||||
"categoryIdList": this.$refs.typeTree.getCheckedKeys(),
|
"categoryIdList": this.$refs.typeTree.getCheckedKeys(),
|
||||||
}
|
}
|
||||||
getMaterialListApi(params).then((response) => {
|
getMaterialListApi(params).then((response) => {
|
||||||
this.tableList = response.data.records;
|
this.tableList = response.rows;
|
||||||
this.total = Number(response.data.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -652,7 +652,7 @@ export default {
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除数据项?")
|
.confirm("是否确认删除数据项?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return removeMaterialApi({"materialId":row.materialId});
|
return removeMaterialApi({"productId":row.productId});
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -662,16 +662,16 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection){
|
handleSelectionChange(selection){
|
||||||
this.batchIds = []
|
this.batchIds = []
|
||||||
this.batchIds = selection.map((item) => item.materialId)
|
this.batchIds = selection.map((item) => item.productId)
|
||||||
this.editForm.categoryNames = "";
|
// this.editForm.categoryNames = "";
|
||||||
this.editForm.categoryNames = selection.map((item) => item.materialName);
|
// this.editForm.categoryNames = selection.map((item) => item.materialName);
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
handleBatchDel(){
|
handleBatchDel(){
|
||||||
console.log(this.batchIds)
|
console.log(this.batchIds)
|
||||||
batchRemoveMaterialApi(this.batchIds).then(response => {
|
batchRemoveMaterialApi({"productId":this.batchIds.join(",")}).then(response => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
this.$refs.multipleTable.clearSelection()
|
this.$refs.multipleTable.clearSelection()
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
@ -689,12 +689,12 @@ export default {
|
||||||
materialIdList:this.batchIds,
|
materialIdList:this.batchIds,
|
||||||
categroyId:this.editForm.categroyId
|
categroyId:this.editForm.categroyId
|
||||||
}
|
}
|
||||||
batchUpdateMaterialApi(param).then(response => {
|
// batchUpdateMaterialApi(param).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
// this.$modal.msgSuccess("修改成功");
|
||||||
this.openEdit=false
|
// this.openEdit=false
|
||||||
this.$refs.multipleTable.clearSelection()
|
// this.$refs.multipleTable.clearSelection()
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="所属区域" prop="areaIdList">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="queryParams.areaIdList" :show-all-levels="false" :filterable="true"
|
v-model="queryParams.areaId" :show-all-levels="false" :filterable="true"
|
||||||
:options="treeOptions" :props="treeProps" collapse-tags clearable
|
:options="treeOptions" :props="treeProps" collapse-tags clearable
|
||||||
@change="handleTreeChange"></el-cascader>
|
@change="handleTreeChange"></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" align="center" prop="userName" :show-overflow-tooltip="true" width="100"/>
|
<el-table-column label="联系人" align="center" prop="userName" :show-overflow-tooltip="true" width="100"/>
|
||||||
<el-table-column label="更新时间" align="center" prop="uptime" :show-overflow-tooltip="true" width="160"/>
|
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true" width="160"/>
|
||||||
<el-table-column label="收款码" align="center" prop="payCodeUrl" :show-overflow-tooltip="true" width="120">
|
<el-table-column label="收款码" align="center" prop="payCodeUrl" :show-overflow-tooltip="true" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>未开启</span>
|
<span>未开启</span>
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="超市仓库" prop="warehouseId">
|
<el-form-item label="超市仓库" prop="warehouseId">
|
||||||
<el-select v-model="baseForm.warehouseId" placeholder="请选择超市仓库" style="width: 100%;">
|
<el-select v-model="baseForm.warehouseId" placeholder="请选择超市仓库" clearable style="width: 100%;">
|
||||||
<el-option v-for="item in wareHouseOptions2"
|
<el-option v-for="item in wareHouseOptions2"
|
||||||
:key="item.warehouseId"
|
:key="item.warehouseId"
|
||||||
:label="item.warehouseName"
|
:label="item.warehouseName"
|
||||||
|
|
@ -158,8 +158,8 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户类别" prop="psnTypeList">
|
<el-form-item label="用户类别" prop="userType">
|
||||||
<el-select v-model="baseForm.psnTypeList" multiple style="width: 100%" clearable>
|
<el-select v-model="baseForm.userType" style="width: 100%" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sys_user_type"
|
v-for="dict in dict.type.sys_user_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -219,8 +219,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="配送方式" prop="deliveryWayList">
|
<el-form-item label="配送方式" prop="deliveryWay">
|
||||||
<el-select v-model="baseForm.deliveryWayList" multiple style="width: 100%" clearable>
|
<el-select v-model="baseForm.deliveryWay" style="width: 100%" clearable>
|
||||||
<el-option label="自取" value="1"></el-option>
|
<el-option label="自取" value="1"></el-option>
|
||||||
<el-option label="配送" value="2"></el-option>
|
<el-option label="配送" value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -239,17 +239,7 @@
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item label="是否开启收款码" prop="ifEnablePayCode">
|
|
||||||
<el-switch
|
|
||||||
v-model="baseForm.ifEnablePayCode"
|
|
||||||
active-text="开启"
|
|
||||||
inactive-text="关闭"
|
|
||||||
:active-value="1"
|
|
||||||
:inactive-value="2">
|
|
||||||
</el-switch>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -341,7 +331,7 @@
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
warehouseId: undefined,
|
warehouseId: undefined,
|
||||||
areaIdList: [],
|
areaId: undefined,
|
||||||
},
|
},
|
||||||
wareHouseOptions:[],
|
wareHouseOptions:[],
|
||||||
wareHouseOptions2:[],
|
wareHouseOptions2:[],
|
||||||
|
|
@ -351,8 +341,7 @@
|
||||||
canteenId:"",//食堂数据-编辑
|
canteenId:"",//食堂数据-编辑
|
||||||
canteenData:{},//食堂数据-编辑
|
canteenData:{},//食堂数据-编辑
|
||||||
baseForm: {
|
baseForm: {
|
||||||
"areaId": "",
|
"areaId": "",
|
||||||
"ifEnablePayCode": 2,
|
|
||||||
"ifRelateDrp": 2,
|
"ifRelateDrp": 2,
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
},//基础设置
|
},//基础设置
|
||||||
|
|
@ -431,7 +420,7 @@
|
||||||
areaId: [
|
areaId: [
|
||||||
{ required: true, message: "所属区域不能为空", trigger: "blur" }
|
{ required: true, message: "所属区域不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
deliveryWayList: [
|
deliveryWay: [
|
||||||
{ required: true, message: "配送方式不能为空", trigger: "change" }
|
{ required: true, message: "配送方式不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
mobile: [
|
mobile: [
|
||||||
|
|
@ -460,8 +449,9 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getTreeData();
|
this.getTreeData();
|
||||||
|
this.getWareHouse();
|
||||||
this.getList();
|
this.getList();
|
||||||
this.mgruserListByRole();
|
// this.mgruserListByRole();
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -480,12 +470,18 @@
|
||||||
},
|
},
|
||||||
handleTreeChange(e){
|
handleTreeChange(e){
|
||||||
console.log(e)
|
console.log(e)
|
||||||
let param = {
|
// let param = {
|
||||||
areaIdList:e
|
// areaId:e
|
||||||
}
|
// }
|
||||||
drpWareHousePageApi(param).then(response => {
|
// drpWareHousePageApi(param).then(response => {
|
||||||
this.wareHouseOptions = response.data.records
|
// this.wareHouseOptions = response.rows
|
||||||
this.queryParams.warehouseId = null
|
// this.queryParams.warehouseId = null
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
getWareHouse() {
|
||||||
|
drpWareHousePageApi({}).then(response => {
|
||||||
|
this.wareHouseOptions = response.rows
|
||||||
|
this.wareHouseOptions2 = response.rows
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
@ -502,13 +498,13 @@
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"current": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"size": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"warehouseId": this.queryParams.warehouseId,
|
"warehouseId": this.queryParams.warehouseId,
|
||||||
"areaIdList":this.queryParams.areaIdList
|
"areaId":this.queryParams.areaId
|
||||||
}
|
}
|
||||||
supermarketPageListApi(param).then(response => {
|
supermarketPageListApi(param).then(response => {
|
||||||
this.tableListData = response.records;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
|
@ -532,8 +528,7 @@
|
||||||
this.fileList=[]
|
this.fileList=[]
|
||||||
this.checkUrlList=[]
|
this.checkUrlList=[]
|
||||||
this.baseForm = {
|
this.baseForm = {
|
||||||
"areaId": "",
|
"areaId": "",
|
||||||
"ifEnablePayCode": 2,
|
|
||||||
"ifRelateDrp": 2,
|
"ifRelateDrp": 2,
|
||||||
"imgUrl": "",
|
"imgUrl": "",
|
||||||
}
|
}
|
||||||
|
|
@ -545,12 +540,12 @@
|
||||||
console.log(row)
|
console.log(row)
|
||||||
this.reset();
|
this.reset();
|
||||||
this.baseForm = Object.assign({}, row)
|
this.baseForm = Object.assign({}, row)
|
||||||
let param = {
|
// let param = {
|
||||||
areaIdList:[this.baseForm.areaId]
|
// areaIdList:[this.baseForm.areaId]
|
||||||
}
|
// }
|
||||||
drpWareHousePageApi(param).then(response => {
|
// drpWareHousePageApi(param).then(response => {
|
||||||
this.wareHouseOptions2 = response.data.records
|
// this.wareHouseOptions2 = response.rows
|
||||||
});
|
// });
|
||||||
if(row.imgUrl){
|
if(row.imgUrl){
|
||||||
this.fileList=[{url:row.imgUrl}]
|
this.fileList=[{url:row.imgUrl}]
|
||||||
this.checkUrlList=[row.imgUrl]
|
this.checkUrlList=[row.imgUrl]
|
||||||
|
|
@ -564,7 +559,7 @@
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return deleteSupermarketApi(row.supermarketId);
|
return deleteSupermarketApi({supermarketId:row.supermarketId});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -577,7 +572,7 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.baseForm.imgUrl = this.checkUrlList[0]
|
this.baseForm.imgUrl = this.checkUrlList[0]
|
||||||
let param = this.baseForm
|
let param = this.baseForm
|
||||||
param.configList = this.configList;
|
// param.configList = this.configList;
|
||||||
if (param.supermarketId) {
|
if (param.supermarketId) {
|
||||||
editSupermarketApi(param).then(response => {
|
editSupermarketApi(param).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
|
@ -596,13 +591,13 @@
|
||||||
},
|
},
|
||||||
//基础设置-选择区域
|
//基础设置-选择区域
|
||||||
handleTreeChange2(val){
|
handleTreeChange2(val){
|
||||||
let param = {
|
// let param = {
|
||||||
areaIdList:[val]
|
// areaIdList:[val]
|
||||||
}
|
// }
|
||||||
drpWareHousePageApi(param).then(response => {
|
// drpWareHousePageApi(param).then(response => {
|
||||||
this.wareHouseOptions2 = response.data.records
|
// this.wareHouseOptions2 = response.rows
|
||||||
this.baseForm.warehouseId = null
|
// this.baseForm.warehouseId = null
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
//商户类用户
|
//商户类用户
|
||||||
mgruserListByRole(){
|
mgruserListByRole(){
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPageCanteenApi } from "@/api/base/canteen";
|
|
||||||
import { systemAreaTreeApi } from "@/api/base/area";
|
import { systemAreaTreeApi } from "@/api/base/area";
|
||||||
import { drpUnitPageListApi,addDrpUnitApi, editDrpUnitApi, removeDrpUnitApi } from "@/api/superStore/superUitId";
|
import { drpUnitPageListApi,addDrpUnitApi, editDrpUnitApi, removeDrpUnitApi } from "@/api/superStore/superUitId";
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -197,14 +196,14 @@
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let param = {
|
let param = {
|
||||||
"current": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"size": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"unitName": this.queryParams.unitName,
|
"unitName": this.queryParams.unitName,
|
||||||
"areaId": this.queryParams.areaId
|
"areaId": this.queryParams.areaId
|
||||||
}
|
}
|
||||||
drpUnitPageListApi(param).then(response => {
|
drpUnitPageListApi(param).then(response => {
|
||||||
this.tableListData = response.data.records;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.data.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue