Compare commits

...

2 Commits

Author SHA1 Message Date
zzyuan d967a8b610 库存管理采购管理页面 2025-05-15 17:26:48 +08:00
zzyuan b5c6a43a58 商超接口修改 2025-05-15 17:26:22 +08:00
13 changed files with 643 additions and 126 deletions

View File

@ -0,0 +1,75 @@
import request from '@/utils/request'
// 分页查询 仓库类别-列表
export function getWareHouseCategoryPageApi(data) {
return request({
url: '/smart-canteen/warehouse_category/list',
method: 'get',
headers: {
"merchant-id":"378915229716713472",
},
params:data
})
}
// 仓库类别新增
export function addWareHouseCategoryApi(data) {
return request({
url: '/smart-canteen/warehouse_category/add',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}
// 仓库类别新增
export function editWareHouseCategoryApi(data) {
return request({
url: '/smart-canteen/warehouse_category/edit',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}
// 仓库类别删除
export function delWareHouseCategoryApi(data) {
return request({
url: '/smart-canteen/warehouse_category/del',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
})
}

View File

@ -61,7 +61,7 @@ export function getMaterialListApi(data) {
// 新增商品
export function addMaterialApi(data) {
return request({
url: '/smart-canteen/supermarket_product/add',
url: '/smart-canteen/supermarket_product',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@ -85,14 +85,14 @@ export function updateMaterialApi(data) {
// 删除商品
export function removeMaterialApi(data) {
return request({
url: '/smart-canteen/supermarket_product/del',
url: '/smart-canteen/supermarket_product/del/'+data.productId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
}
})
}
}
// 批量删除商品
export function batchRemoveMaterialApi(data) {
return request({

View File

@ -27,7 +27,7 @@ export function supermarketPageListApi(data) {
// 超市列表-新增
export function insertSupermarketApi(data) {
return request({
url: '/smart-canteen/supermarket_info/add',
url: '/smart-canteen/supermarket_info',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@ -50,12 +50,11 @@ export function editSupermarketApi(data) {
// 超市列表-删除
export function deleteSupermarketApi(data) {
return request({
url: '/smart-canteen/supermarket_info/del',
url: '/smart-canteen/supermarket_info/del/'+data.supermarketId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
}
})
}

View File

@ -27,7 +27,7 @@ export function drpUnitPageListApi(data) {
// 单位列表-新增
export function addDrpUnitApi(data) {
return request({
url: '/smart-canteen/supermarket_unit/add',
url: '/smart-canteen/supermarket_unit',
method: 'post',
headers: {
"merchant-id":"378915229716713472",
@ -49,14 +49,13 @@ export function editDrpUnitApi(data) {
}
// 单位列表-删除
export function removeDrpUnitApi(data) {
export function removeDrpUnitApi(unitId) {
return request({
url: '/smart-canteen/supermarket_unit/del',
url: '/smart-canteen/supermarket_unit/del/'+unitId,
method: 'post',
headers: {
"merchant-id":"378915229716713472",
},
data: data
}
})
}

View File

@ -84,7 +84,7 @@ service.interceptors.request.use(config => {
// console.log(sessionObj)
// console.log(requestObj)
if(requestObj.data&&requestObj.data.indexOf('pageNum')==-1){
if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 3000 && sessionObj.url === requestObj.url) {
if (sessionObj.data === requestObj.data && requestObj.time - sessionObj.time < 2000 && sessionObj.url === requestObj.url) {
console.warn(`[${sessionObj.url}]: 数据正在处理,请勿重复提交`)
return Promise.reject(new Error('数据正在处理,请勿重复提交'))
}

View File

@ -721,92 +721,7 @@
<el-table-column label="硒(μg/100g)" prop="selenium" align="center" width="140"></el-table-column>
</el-table>
</el-col>
</el-row>
<!-- <el-descriptions v-if="baseForm.sizeType==1" title="" :column="2" size="small" border :labelStyle="{width:'150px'}">
<el-descriptions-item>
<template slot="label">热量(千卡)</template>
{{baseForm.calories||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">蛋白质(g)</template>
{{baseForm.protein||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">脂肪(g)</template>
{{baseForm.fat||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">碳水化合物(g)</template>
{{baseForm.carbohydrate||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">膳食纤维(g)</template>
{{baseForm.dietaryFiber||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">胆固醇(mg)</template>
{{baseForm.cholesterol||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.calcium||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.sodium||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">总嘌呤含量(mg)</template>
{{baseForm.purine||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.iron||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(μg)</template>
{{baseForm.iodine||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.kalium||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">维生素a(μg)</template>
{{baseForm.vitaminA||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">维生素c(mg)</template>
{{baseForm.vitaminC||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">维生素e(mg)</template>
{{baseForm.vitaminE||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.magnesium||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">(mg)</template>
{{baseForm.zinc||0}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">血糖生成指数(GI)</template>
{{baseForm.glycemicIndex||0}}
</el-descriptions-item>
</el-descriptions> -->
</el-row>
</div>
</el-tab-pane>
</el-tabs>

View File

@ -1162,6 +1162,7 @@ export default {
}
getNutrition(data).then(response => {
this.form = response.data;
this.formTable = [this.form]
this.$set(this.form,"categoryId",Number(response.data.categoryId))
this.chosenType(this.form.categoryId)
this.open = true;
@ -1257,6 +1258,7 @@ export default {
}
}
this.form[field] = newValue;
this.formTable[0][field] = newValue;
},
/**
@ -1281,6 +1283,7 @@ export default {
}
//
this.form[field] = value.toFixed(2);
this.formTable[0][field] = value.toFixed(2);
}
}

View File

@ -0,0 +1,235 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="关键字" prop="searchValue">
<el-input v-model="queryParams.searchValue" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeOptions" :filterable="true" style="width: 240px;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="供应商" prop="supplierId">
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width: 240px;">
<el-option label="供应商1" :value="1"></el-option>
<el-option label="供应商2" :value="2"></el-option>
<el-option label="供应商3" :value="2"></el-option>
</el-select>
</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
size="mini"
@click=""
>录入</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" width="80" type="index" fixed="left">
<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="materialCode" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="货品类别" align="center" prop="categoryName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="计量单位" align="center" prop="" :show-overflow-tooltip="true" width="120" />
<el-table-column label="货品规格" align="center" prop="" :show-overflow-tooltip="true" width="120" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="最近一次采购" align="center">
<el-table-column label="价格" align="center" prop="" width="100" :show-overflow-tooltip="true" >
<!-- <template slot-scope="scope">
<span>{{ (scope.row.lastOrderGoodsPrice/100).toFixed(2) }}</span>
</template> -->
</el-table-column>
<el-table-column label="时间" align="center" prop="" width="120" :show-overflow-tooltip="true" />
<el-table-column label="供应商" align="center" prop="" width="100" :show-overflow-tooltip="true" />
</el-table-column>
<el-table-column label="市场价格" align="center">
<el-table-column label="录入/抓取时间" align="center" prop="" width="120" :show-overflow-tooltip="true" />
<el-table-column label="价格" align="center" prop="" width="100" :show-overflow-tooltip="true" >
<!-- <template slot-scope="scope">
<span>{{ (scope.row.lastOrderGoodsPrice/100).toFixed(2) }}</span>
</template> -->
</el-table-column>
<el-table-column label="来源" align="center" prop="" width="100" :show-overflow-tooltip="true" />
</el-table-column>
<el-table-column label="价格浮动比(%)" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="首选供应商" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="当前最新中标供应商" align="center">
<el-table-column label="供应商名称" align="center" prop="" width="100" :show-overflow-tooltip="true" />
<el-table-column label="中标价(元)" align="center" prop="" width="100" :show-overflow-tooltip="true" >
<!-- <template slot-scope="scope">
<span>{{ (scope.row.lastOrderGoodsPrice/100).toFixed(2) }}</span>
</template> -->
</el-table-column>
</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="handleView(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="评分规则配置" :visible.sync="open" width="800px" append-to-body>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { systemAreaTreeApi } from "@/api/base/stall";
import { systemMaterialTreeApi } from "@/api/dish/material";
export default {
name: "",
dicts: [],
data() {
return {
//
loading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [
{supplierName:'111',areaName:'111'},{supplierName:'222',areaName:'222'},
],
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
supplierName: undefined,
areaId: undefined,
linkman: undefined,
status: undefined,
categoryIdList: []
},
treeTypeOptions:[],//
treeOptions:[],//
//
form: {},
//
rules: {
areaId: [
{ required: true, message: "所属区域不能为空", trigger: "change" }
],
ruleType: [
{ required: true, message: "周期配置不能为空", trigger: "change" }
]
},
};
},
created() {
this.getTypeTreeData();
this.getTreeData();
// this.getList();
},
methods: {
//
getTypeTreeData() {
let param = {
// categoryType:1,
}
systemMaterialTreeApi(param).then((response) => {
this.treeTypeOptions = response.data;
});
},
//
getTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeOptions = response.data;
});
},
/** 搜索按钮操作 */
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,
"supplierName": this.queryParams.supplierName,
"categoryIdList": this.queryParams.categoryIdList,
"areaId": this.queryParams.areaId,
"linkman": this.queryParams.linkman,
"status": this.queryParams.status
}
// getPageCanteenApi(param).then(response => {
// this.tableListData = response.rows;
// this.total = Number(response.total);
this.loading = false;
// });
},
//
cancel() {
this.open = false;
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
}
});
},
handleView(row){
}
}
};
</script>

View File

@ -0,0 +1,280 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable @change="handleAreaChange">
</el-cascader>
</el-form-item>
<el-form-item label="仓库类别">
<el-input v-model="queryParams.categoryName" 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" ref="multipleTable">
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
<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="categoryName" :show-overflow-tooltip="true" >
</el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" >
</el-table-column>
<!-- <el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true" >
</el-table-column> -->
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" >
</el-table-column>
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width" fixed="right">
<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="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="form.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable>
</el-cascader>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="仓库类别名称" prop="categoryName">
<el-input v-model="form.categoryName" placeholder="请输入仓库类别名称" />
</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 { systemAreaTreeApi } from "@/api/base/stall";
import { getWareHouseCategoryPageApi,addWareHouseCategoryApi,editWareHouseCategoryApi,delWareHouseCategoryApi } from "@/api/stockManage/index";
export default {
name: "",
dicts: [],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
title:"",
//
open: false,
chronicOptions:[],
treeAreaOptions:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
categoryName: null,
areaId: null,
},
form: {
areaId:null,
categoryName:null,
},//
rules: {
areaId: [
{ required: true, message: "所属区域不能为空", trigger: "blur" }
],
categoryName: [
{ required: true, message: "仓库类别名称不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList()
this.getAreaTreeData();
},
methods: {
//
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeAreaOptions = response.data;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
areaId:null,
categoryName: null
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
...this.queryParams
}
getWareHouseCategoryPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
areaId:null,
categoryName:null,
};
this.resetForm("form");
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增";
},
handleUpdate(row) {
this.form = Object.assign({}, row);
this.open = true;
this.title = "修改";
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.categoryId != undefined) {
editWareHouseCategoryApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addWareHouseCategoryApi(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() {
return delWareHouseCategoryApi({categoryId:row.categoryId});
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>
<style lang="scss" scoped>
.remind-question{
width: 100%;
height: 50px;
font-size: 22px;
display: flex;
align-items: center;
justify-content: center;
}
.remind-title{
width: 100%;
height: 40px;
font-size: 16px;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
justify-content: center;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>

View File

@ -7,6 +7,7 @@
:close-on-click-modal="false"
:destroy-on-close="true"
@close="handleClose"
@open="handelOpen"
>
<div style="width: 100%;height: 500px;overflow-y: auto;">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
@ -160,14 +161,11 @@
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :disabled="loading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -190,7 +188,8 @@ export default {
}
},
data() {
return {
return {
loading:false,
treeAreaOptions:[],//
treeTypeOptions:[],//
unitOptions:[],//
@ -237,11 +236,18 @@ export default {
},
},
mounted() {
this.getAreaTreeData();//
this.getTypeTreeData();//
this.getDrpUnitList();//
},
methods: {
handelOpen(){
this.getAreaTreeData();//
this.getDrpUnitList();//
},
handleClose() {
this.$emit('update:visible', false);
this.$nextTick(() => {
this.reset();
});
},
//
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
@ -278,7 +284,7 @@ export default {
}
this.form.unitId=null
getDrpUnitListApi(param).then((response) => {
this.unitOptions = response.data;
this.unitOptions = response.rows;
// if(response.data.records.length>0){
// response.data.records.forEach(item => {
// if(item.weighType==this.form.salesMode){
@ -329,19 +335,20 @@ export default {
submitForm() {
this.$refs.form.validate(valid => {
if (valid) {
this.loading=true
this.form.salePrice = Number(this.form.salePrice)*100;
this.form.prefPrice = Number(this.form.prefPrice)*100;
setTimeout(()=>{
this.$set(this.form,"salePrice",Number((this.form.salePrice/100).toFixed(2)))
this.$set(this.form,"prefPrice",Number((this.form.prefPrice/100).toFixed(2)))
this.loading=false
},2000)
this.$emit('submit', this.form);
}
});
},
handleClose() {
this.$emit('update:visible', false);
this.$nextTick(() => {
this.reset();
});
},
cancel() {
this.$emit('update:visible', false);

View File

@ -341,7 +341,7 @@
</el-dialog>
<!-- 添加或修改用户配置对话框 -->
<material-dialog :visible.sync="dialogVisible" :title="title" @submit="handleDialogSubmit" ref="materialDialog" />
<material-dialog :visible.sync="dialogVisible" :title="title" :treeOptions="treeOptions" :treeAreaOptions="treeAreaOptions" @submit="handleDialogSubmit" ref="materialDialog" />
</div>
</template>

View File

@ -276,7 +276,7 @@
</el-tab-pane> -->
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm" :disabled="loadingBtn"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -302,6 +302,7 @@
return {
//
loading: true,
loadingBtn: false,
//
ids: [],
//
@ -570,21 +571,24 @@
console.log(this.baseForm)
this.$refs["baseForm"].validate(valid => {//
if (valid) {
this.loadingBtn=true
this.baseForm.imgUrl = this.checkUrlList[0]
let param = this.baseForm
// param.configList = this.configList;
if (param.supermarketId) {
editSupermarketApi(param).then(response => {
editSupermarketApi(param).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.loadingBtn = false;
this.getList();
});
} else {
insertSupermarketApi(param).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
insertSupermarketApi(param).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.loadingBtn = false;
this.getList();
});
}
}
});