页面优化绘制(基础设置,设备管理)

This commit is contained in:
zzyuan 2025-03-11 18:31:37 +08:00
parent c0dad068ad
commit 5afb4de81a
4 changed files with 195 additions and 60 deletions

View File

@ -121,7 +121,6 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>
编辑
@ -129,7 +128,7 @@
<el-button
size="mini"
type="text"
icon="el-icon-delete"
style="color: red;"
@click="handleDelete(scope.row)"
>
删除

View File

@ -91,7 +91,7 @@
<span style="color: #4b80fd;">详情</span>
</template>
</el-table-column>
<el-table-column label="食堂图片" align="center" prop="imgUrl" :show-overflow-tooltip="true" width="100">
<el-table-column label="食堂图片" align="center" prop="imgUrl" width="100">
<template slot-scope="scope">
<img :src="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
</template>
@ -118,7 +118,7 @@
</el-table-column>
<el-table-column label="创建时间" align="center" prop="crtime" :show-overflow-tooltip="true" width="160"/>
<el-table-column label="更新时间" align="center" prop="uptime" :show-overflow-tooltip="true" width="160"/>
<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" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@ -132,7 +132,8 @@
>编辑</el-button>
<el-button
size="mini"
type="text"
type="text"
style="color: red;"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
@ -151,7 +152,7 @@
<el-dialog :title="title+'-食堂'" :visible.sync="open" width="1000px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<!-- 基础设置 -->
<el-tab-pane label="基础设置" name="baseSetting" style="height: 550px;">
<el-tab-pane label="基础设置" name="baseSetting" style="height: 600px;overflow-y: auto;">
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="80px">
<el-row>
<el-col :span="12">
@ -214,8 +215,8 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="labelName">
<el-select v-model="baseForm.labelName" placeholder="请选择负责人" style="width: 100%;" @focus="chosenCharger"></el-select>
<el-form-item label="负责人" prop="custName">
<el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -289,17 +290,62 @@
</el-form>
</el-tab-pane>
<!-- 支付设置 -->
<el-tab-pane label="支付设置" name="paySetting">
支付设置
<el-tab-pane label="支付设置" name="paySetting" style="height: 600px;overflow-y: auto;">
<div style="width: 100%;height: auto;">
<div>
<span style="font-weight: bold;">启用本食堂独立规则</span>
<el-switch v-model="payDTO.ifEnablePay"
active-text="开启" inactive-text="关闭"
:active-value="1" :inactive-value="2"></el-switch>
</div>
<div style="color: red;">
*提示需勾选对应的支付方式后配置方可生效只针对下层的设备生效小程序不生效
</div>
<div style="margin: 10px;">
<el-checkbox-group v-model="payTypeList" size="small">
<el-checkbox label="1" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;margin-left: 10px;">支付宝</el-checkbox>
<el-checkbox label="2" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">微信</el-checkbox>
<el-checkbox label="3" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">云闪付</el-checkbox>
<el-checkbox label="4" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">农业银行</el-checkbox>
<el-checkbox label="5" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">工商银行</el-checkbox>
<el-checkbox label="6" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">兴业银行</el-checkbox>
<el-checkbox label="7" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">建设银行</el-checkbox>
<el-checkbox label="8" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">苏州农商银行</el-checkbox>
<el-checkbox label="9" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">银联支付</el-checkbox>
<el-checkbox label="10" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">富友支付</el-checkbox>
<el-checkbox label="11" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">太仓农商行</el-checkbox>
<el-checkbox label="12" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">宁波银行</el-checkbox>
<el-checkbox label="13" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">南京银行</el-checkbox>
<el-checkbox label="14" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">无锡农商行</el-checkbox>
<el-checkbox label="15" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">扫呗支付</el-checkbox>
<el-checkbox label="16" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">甘肃农信社</el-checkbox>
</el-checkbox-group>
</div>
</div>
</el-tab-pane>
<!-- 配送设置 -->
<el-tab-pane label="配送设置" name="deliverySetting">
配送设置
<el-tab-pane label="配送设置" name="deliverySetting" style="height: 600px;overflow-y: auto;">
<div style="width: 100%;height: auto;">
<div>
<span style="font-weight: bold;">启用本食堂独立规则</span>
<el-switch v-model="deliveryModel.ifEnableDelivery"
active-text="开启" inactive-text="关闭"
:active-value="1" :inactive-value="2"></el-switch>
</div>
<div style="margin: 10px;">
<el-checkbox-group v-model="deliveriesList" size="small">
<el-checkbox label="1" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">自取堂食</el-checkbox>
<el-checkbox label="2" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">商家配送</el-checkbox>
<el-checkbox label="3" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">取餐柜配送</el-checkbox><br>
<el-checkbox label="4" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">生鲜柜配送</el-checkbox>
<el-checkbox label="5" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">自取外带</el-checkbox>
<el-checkbox label="6" border style="width: 180px;background: #e8f0ff;margin-bottom: 10px;">取餐点自取</el-checkbox>
</el-checkbox-group>
</div>
</div>
</el-tab-pane>
<!-- 预订/点餐/报餐设置 -->
<el-tab-pane label="预订/点餐/报餐设置" name="orderSetting">
<el-tab-pane label="预订/点餐/报餐设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
</el-tab-pane>
@ -314,15 +360,15 @@
<el-dialog title="选择负责人" :visible.sync="openJob" width="800px" append-to-body>
<el-form :model="dialogQueryParams" ref="dialogQueryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="keyWord">
<el-input v-model="dialogQueryParams.keyWord" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
<el-form-item label="" prop="keyword">
<el-input v-model="dialogQueryParams.keyword" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="" prop="canteenName">
<el-select v-model="baseForm.labelName" placeholder="请选择职位" style="width: 100%;">
<el-form-item label="" prop="job">
<el-select v-model="dialogQueryParams.job" placeholder="请选择职位" style="width: 100%;">
<el-option v-for="item in jobOptions"
:key="item.jobId"
:label="item.jobName"
:value="item.jobId"
:value="item.jobCode"
></el-option>
</el-select>
</el-form-item>
@ -330,7 +376,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
</el-form-item>
</el-form>
<el-table :data="jobTableData" height="500">
<el-table :data="jobTableData" height="500" highlight-current-row @current-change="handleCurrentChange">
<el-table-column label="负责人姓名" align="center" prop="custName" :show-overflow-tooltip="true"/>
<el-table-column label="负责人编号" align="center" prop="custNum" :show-overflow-tooltip="true"/>
<el-table-column label="负责人手机号" align="center" prop="mobile" :show-overflow-tooltip="true"/>
@ -346,8 +392,8 @@
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click=""> </el-button>
<el-button @click=""> </el-button>
<el-button type="primary" @click="confirmChosenCharger"> </el-button>
<el-button @click="openJob=false"> </el-button>
</div>
</el-dialog>
@ -442,15 +488,53 @@
},
jobTableData:[],//
//
dialogTotal: 0,
dialogTotal: 0,
currentCustRow:{},//
fileList: [],//
checkUrlList: [],//
checkUrlNameList: [],//
dialogVisible:false,//
dialogImageUrl:"",//
payDTO:{
"ifEnablePay": "2",
"payMap": {},
"payTypes": ""
},//
payTypeList:[],//
deliveryModel:{//
"ifEnableDelivery": "2",
"deliveries": "",
"minDeliveryFeeOnOff": 1,
"deliveryList": [
{
"deliveryEndTime": "23:59:59",
"deliveryStartTime": "00:00:00",
"deliveryType": 2
},
{
"deliveryEndTime": "23:59:59",
"deliveryStartTime": "00:00:00",
"deliveryType": 3
},
{
"deliveryEndTime": "23:59:59",
"deliveryStartTime": "00:00:00",
"deliveryType": 4
},
{
"deliveryEndTime": "23:59:59",
"deliveryStartTime": "00:00:00",
"deliveryType": 5
},
{
"deliveryEndTime": "23:59:59",
"deliveryStartTime": "00:00:00",
"deliveryType": 6
}
],
},
deliveriesList:[],//
deliveryModel:{},//
payDTO:{},//
orderDTO:{},//
mealtimeList:[],//
@ -556,6 +640,10 @@
console.log(response)
this.canteenId = response.canteenId;
this.baseForm = response.canteenSaveDTO;
if(response.canteenSaveDTO.imgUrl){
this.fileList=[{url:response.canteenSaveDTO.imgUrl}]
this.checkUrlList=[response.canteenSaveDTO.imgUrl]
}
this.deliveryModel = response.deliveryModel;
this.orderDTO = response.orderDTO;
this.payDTO = response.payDTO;
@ -681,8 +769,9 @@
});
},
//
chosenCharger(){
openChosenCharger(){
this.queryCustJobPage()
this.currentCustRow = {}
this.openJob=true
},
//
@ -702,7 +791,9 @@
let param = {
"current": this.dialogQueryParams.pageNum,
"ifQueryJob": 1,
"size": this.dialogQueryParams.pageSize
"size": this.dialogQueryParams.pageSize,
"job": this.dialogQueryParams.job,
"keyword": this.dialogQueryParams.keyword
}
queryCustJobPageApi(param).then((response) => {
this.jobTableData = response.records
@ -710,6 +801,20 @@
console.log(response)
});
},
handleCurrentChange(val) {
console.log(val)
this.currentCustRow = val;
},
confirmChosenCharger(){
if(this.currentCustRow != {}){
this.baseForm.custName = this.currentCustRow.custName
this.baseForm.custId = this.currentCustRow.custId
}else{
this.baseForm.custName = this.baseForm.custName||""
this.baseForm.custId = this.baseForm.custId||""
}
this.openJob=false
},
//
handleRemove(file, fileList) {
console.log(file, fileList);
@ -778,4 +883,12 @@
}
};
</script>
<style lang="scss" scoped>
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>

View File

@ -104,7 +104,7 @@
</el-table-column>
<el-table-column label="线上流水号前缀" align="center" prop="onLineMealCodePrefix" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="线下流水号前缀" align="center" prop="offLineMealCodePrefix" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="档口图片" align="center" prop="imgUrl" :show-overflow-tooltip="true" width="100">
<el-table-column label="档口图片" align="center" prop="imgUrl" width="100">
<template slot-scope="scope">
<img :src="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
</template>
@ -127,7 +127,7 @@
</el-table-column>
<el-table-column label="创建时间" align="center" prop="crtime" :show-overflow-tooltip="true" width="160"/>
<el-table-column label="更新时间" align="center" prop="uptime" :show-overflow-tooltip="true" width="160"/>
<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" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@ -141,7 +141,7 @@
>编辑</el-button>
<el-button
size="mini"
type="text"
type="text" style="color: red;"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
@ -160,7 +160,7 @@
<el-dialog :title="title+'-档口'" :visible.sync="open" width="1000px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<!-- 基础设置 -->
<el-tab-pane label="基础设置" name="baseSetting" style="height: 550px;">
<el-tab-pane label="基础设置" name="baseSetting" style="height: 600px;overflow-y: auto;">
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="80px">
<el-row>
<el-col :span="12">
@ -202,8 +202,8 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="labelName">
<el-select v-model="baseForm.labelName" placeholder="请选择负责人" style="width: 100%;" @focus="chosenCharger"></el-select>
<el-form-item label="负责人" prop="custName">
<el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -315,9 +315,7 @@
<el-col :span="12">
<el-form-item label="档口图片">
<el-upload
:http-request="
(obj) => imgUpLoad(obj, 'fileUrl')
"
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
action="#"
:limit="1"
:file-list="fileList"
@ -336,36 +334,37 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<!-- 配送设置 -->
<el-tab-pane label="配送设置" name="deliverySetting">
<el-tab-pane label="配送设置" name="deliverySetting" style="height: 600px;overflow-y: auto;">
配送设置
</el-tab-pane>
<!-- 预订/点餐/报餐设置 -->
<el-tab-pane label="预订/点餐/报餐设置" name="orderSetting">
<el-tab-pane label="预订/点餐/报餐设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
</el-tab-pane>
</el-tabs>
</el-tabs>
<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 title="选择负责人" :visible.sync="openJob" width="800px" append-to-body>
<el-form :model="dialogQueryParams" ref="dialogQueryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="" prop="keyWord">
<el-input v-model="dialogQueryParams.keyWord" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
<el-form-item label="" prop="keyword">
<el-input v-model="dialogQueryParams.keyword" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="" prop="jobName">
<el-select v-model="dialogQueryParams.jobName" placeholder="请选择职位" style="width: 100%;">
<el-form-item label="" prop="job">
<el-select v-model="dialogQueryParams.job" placeholder="请选择职位" style="width: 100%;">
<el-option v-for="item in jobOptions"
:key="item.jobId"
:label="item.jobName"
:value="item.jobId"
:value="item.jobCode"
></el-option>
</el-select>
</el-form-item>
@ -373,7 +372,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
</el-form-item>
</el-form>
<el-table :data="jobTableData" height="500">
<el-table :data="jobTableData" height="500" highlight-current-row @current-change="handleCurrentChange">
<el-table-column label="负责人姓名" align="center" prop="custName" :show-overflow-tooltip="true"/>
<el-table-column label="负责人编号" align="center" prop="custNum" :show-overflow-tooltip="true"/>
<el-table-column label="负责人手机号" align="center" prop="mobile" :show-overflow-tooltip="true"/>
@ -389,8 +388,8 @@
/>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click=""> </el-button>
<el-button @click=""> </el-button>
<el-button type="primary" @click="confirmChosenCharger"> </el-button>
<el-button @click="openJob=false"> </el-button>
</div>
</el-dialog>
@ -503,7 +502,8 @@ export default {
},
jobTableData:[],//
//
dialogTotal: 0,
dialogTotal: 0,
currentCustRow:null,//
fileList: [],//
checkUrlList: [],//
checkUrlNameList: [],//
@ -632,6 +632,10 @@ export default {
console.log(response)
this.stallId = response.stallId;
this.baseForm = response.stallSaveDTO;
if(response.canteenSaveDTO.imgUrl){
this.fileList=[{url:response.stallSaveDTO.imgUrl}]
this.checkUrlList=[response.stallSaveDTO.imgUrl]
}
this.areaId = this.baseForm.areaId
let arr=[this.baseForm.areaId]
//
@ -791,8 +795,9 @@ export default {
});
},
//
chosenCharger(){
openChosenCharger(){
this.queryCustJobPage()
this.currentCustRow = null
this.openJob=true
},
//
@ -812,7 +817,9 @@ export default {
let param = {
"current": this.dialogQueryParams.pageNum,
"ifQueryJob": 1,
"size": this.dialogQueryParams.pageSize
"size": this.dialogQueryParams.pageSize,
"job": this.dialogQueryParams.job,
"keyword": this.dialogQueryParams.keyword
}
queryCustJobPageApi(param).then((response) => {
this.jobTableData = response.records
@ -820,6 +827,20 @@ export default {
console.log(response)
});
},
handleCurrentChange(val) {
console.log(val)
this.currentCustRow = val;
},
confirmChosenCharger(){
if(this.currentCustRow){
this.baseForm.custName = this.currentCustRow.custName
this.baseForm.custId = this.currentCustRow.custId
}else{
this.baseForm.custName = this.baseForm.custName||""
this.baseForm.custId = this.baseForm.custId||""
}
this.openJob=false
},
//
handleRemove(file, fileList) {
console.log(file, fileList);
@ -888,3 +909,11 @@ export default {
}
};
</script>
<style lang="scss" scoped>
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>

View File

@ -101,19 +101,17 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="openLogDialog(scope.row)"
>异常</el-button>
<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"
style="color: red;"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
@ -807,10 +805,6 @@
this.menuSubData = this.menuSubData.concat(item.dishesList)
}
});
});
},