Commit 073f1845 by me

小程序后台3.0版本

parent a34ecd77
......@@ -21,12 +21,24 @@
<el-menu-item index="/tab/bannerList" >banner管理</el-menu-item>
<el-menu-item index="/tab/cookbook" >菜谱管理</el-menu-item>
<el-menu-item index="/tab/cookList">厨师人员管理</el-menu-item>
<el-menu-item index="/tab/bjList">保洁人员管理</el-menu-item>
<el-menu-item index="/tab/bjList" >保洁人员管理</el-menu-item>
<el-menu-item index="/tab/wxList">维修人员管理</el-menu-item>
<el-menu-item index="/tab/flowerList">花卉绿植管理</el-menu-item>
<el-menu-item index="/tab/orderList">订单管理</el-menu-item>
<el-menu-item index="/tab/flowerList" >花卉绿植管理</el-menu-item>
<!-- <el-menu-item index="/tab/orderList" v-if="index7=='1'">订单管理</el-menu-item> -->
</el-menu-item-group>
</el-submenu>
<el-submenu index="2">
<template slot="title"><i class="icon"><img src="../assets/img/icon/guanli.png" alt=""></i>订单管理</template>
<el-menu-item-group>
<el-menu-item index="/tab/wmorderList">外卖订单</el-menu-item>
<el-menu-item index="/tab/jzorderList">家政订单</el-menu-item>
<el-menu-item index="/tab/csorderList">花卉绿植订单</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-menu-item index="/tab/log">
<i class="icon"><img src="../assets/img/icon/ico2.png" alt=""></i>
<span slot="title">操作日志</span>
......@@ -63,8 +75,13 @@ export default {
return {
userName: '',
currentDate: '',
index:0,
index1:0,
index2:0,
index3:0,
index4:0,
index5:0,
index6:0,
index7:0,
}
},
mounted () {
......@@ -73,9 +90,18 @@ export default {
},
methods: {
getUserInfor () {
// var routerParams = this.$route.query.nameId;
// this.index = routerParams;
// console.log(routerParams)
var _this = this;
let routerParams = JSON.parse(window.localStorage.getItem('routerParams'))
console.log(routerParams)
// for(var i= 0; i<routerParams.length-1; i++){
// _this.index1 = routerParams[0].check;
// _this.index2 = routerParams[1].check
// _this.index3 = routerParams[2].check
// _this.index4 = routerParams[3].check
// _this.index5 = routerParams[4].check
// _this.index6 = routerParams[5].check
// _this.index7 = routerParams[6].check
// }
if (window.localStorage.length > 0) {
var userInfo = localStorage.getItem('userInfo')
if (userInfo != null) {
......
......@@ -10,9 +10,11 @@ import flowerList from './views/flowerManage/flowerList'
import flowerAdd from './views/flowerManage/flowerAdd'
import flowerDetail from './views/flowerManage/flowerDetail'
import bjList from './views/bjManage/bjList'
import bjAdd from './views/bjManage/bjAdd'
import bjDetail from './views/bjManage/bjDetail'
import wxList from './views/wxManage/wxList'
import wxDetail from './views/wxManage/wxDetail'
import wxAdd from './views/wxManage/wxAdd'
import OrderList from './views/orderList/OrderList'
import OrderDetail from './views/orderList/OrderDetail'
import DefaultPage from './views/DefaultPage'
......@@ -21,6 +23,9 @@ import BannerList from './views/banner/bannerList'
import BannerAdd from './views/banner/bannerAdd'
import Log from './views/log'
import cookbook from './views/cookbook'
import jzorderList from './views/jzorderList/jzorderList'
import wmorderList from './views/wmorderList/wmorderList'
import csorderList from './views/csorderList/csorderList'
Vue.use(Router)
export default new Router({
......@@ -101,6 +106,11 @@ export default new Router({
name: 'bjList',
component: bjList
},
{
path: 'bjAdd',
name: 'bjAdd',
component: bjAdd
},
{
path: '/bjDetail/:id',
name: 'bjDetail',
......@@ -111,11 +121,31 @@ export default new Router({
name: 'wxList',
component: wxList
},
{
path: 'wxAdd',
name: 'wxAdd',
component: wxAdd
},
{
path: '/wxDetail/:id',
name: 'wxDetail',
component: wxDetail
},
{
path: 'jzorderList',
name: 'jzorderList',
component: jzorderList
},
{
path: 'wmorderList',
name: 'wmorderList',
component: wmorderList
},
{
path: 'csorderList',
name: 'csorderList',
component: csorderList
},
{
path: 'orderList',
name: 'orderList',
......
......@@ -21,7 +21,6 @@ export default {
passWord: '',
locPwd: false,
},
// nameId:1,
}
},
created () {
......@@ -36,15 +35,11 @@ export default {
url: '/operator/login/user',
data: _this.userForm,
}).then((res) => {
console.log(res.data.data.accessToken)
console.log(res)
if (res.data.code === '0') {
this.$router.push({
name: 'userList',
// query:{
// nameId:_this.nameId,
// },
})
window.localStorage.setItem('userInfo', JSON.stringify(res.data))
this.$router.push({ name: 'userList',})
window.localStorage.setItem('userInfo', JSON.stringify(res.data))
window.localStorage.setItem('routerParams', JSON.stringify(res.data.data.roleList));
window.localStorage.setItem('token', JSON.stringify(res.data.data.accessToken))
}
})
......
<template>
<div class="cook-detail">
<p class="my_title">
<em>请填写保洁人员信息</em>
</p>
<div class="cook_infor">
<el-row>
<el-form label-width="110px" :model="addForm">
<el-col :span="5" class="mt30 rightmt30">
<el-form-item :rules="{required: true}">
<el-upload
class="avatar-uploader"
:action="$ImageUploadUrl"
:show-file-list="false"
accept="image/jpeg,image/gif,image/png,image/bmp"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess"
>
<!-- :before-upload="beforeAvatarUpload" -->
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<em style=" float: right; font-size: 10px;">(图片大小不能超过2MB)</em>
</el-col>
<el-col :span="15">
<el-form-item label="姓名:" :rules="{required: true}">
<el-input v-model="addForm.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="年龄:" :rules="{required: true}">
<el-input v-model="addForm.age" placeholder="年龄"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="联系方式:" :rules="{required: true}">
<el-input v-model="addForm.phone" placeholder="请输入联系方式"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="工作时间:" :rules="{required: true}">
<el-input v-model="addForm.workYears" placeholder="请输入工作时间"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="状态:" :rules="{required: true}">
<el-radio v-model="addForm.status" label="1">可预约</el-radio>
<el-radio v-model="addForm.status" label="0">不可预约</el-radio>
</el-form-item>
</el-col>
<el-col :sm="20">
<el-form-item label="推荐理由:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.recommend"></el-input>
</el-form-item>
<el-form-item label="服务项目:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.serviceItems"></el-input>
</el-form-item>
<el-form-item label="清洁工具:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.tool"></el-input>
</el-form-item>
<el-form-item label="清洁剂:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.agent"></el-input>
</el-form-item>
<el-form-item label="收费标准:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.standard"></el-input>
</el-form-item>
<el-form-item label="备注:">
<el-input type="textarea" v-model="addForm.remarks"></el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<el-row style="text-align: center; padding-top: 50px">
<el-button type="primary" @click="saveBtn">保存</el-button>
<el-button type="primary" @click="goBack" plain>取消</el-button>
</el-row>
</div>
</div>
</template>
<script>
import moment from 'moment'
export default {
name: 'cookDetail',
data () {
return {
addForm: {
name:'',
status:'',
age:'',
phone:'',
workYears:'',
serviceItems:'',
standard:'',
},
imageUrl: '',
imageFileName:[],
}
},
created (){
if (this.$route.params.id) {
this.getData()
}
},
methods: {
getData () {
this.$axios({
method:'get',
url:'/pccleaning/get/' + this.$route.params.id,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then((res)=>{
this.addForm = res.data.data
this.imageUrl = this.addForm.url
console.log(res.data.data)
// res.data.data.status == '1' ? this.addForm.status = "1" : this.addForm.status = "0"
})
},
saveBtn () {
var param = this.addForm
if (this.$route.params.id) {
delete param.createDate
console.log(param)
// param.status ? param.status = '1' : param.status = '0'
param.starDate = moment(param.starDate).format('YYYY-MM-DD HH:MM:SS')
param.endDate = moment(param.endDate).format('YYYY-MM-DD HH:MM:SS')
this.$axios({
method:'POST',
url:'/pccleaning/update/cook',
data:param,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then(()=>{
this.$message.success('修改成功')
this.goBack()
})
} else {
param.id = 0
// param.status ? param.status = 'Y' : param.status = 'N'
param.starDate = moment(param.starDate).format('YYYY-MM-DD HH:MM:SS')
param.endDate = moment(param.endDate).format('YYYY-MM-DD HH:MM:SS')
// console.log(param.name)
if(param.name!="" && param.standard!='' &&param.age!='' &&param.phone!='' &&param.status!='' &&param.workYears!='' && param.serviceItems!=''){
this.$axios({
method:'POST',
url:'/pccleaning/add/cook',
data:param,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then(()=>{
this.$message.success('新增成功')
this.goBack()
})
}else{
this.$message({
message: '请填写完整',
type: 'warning'
});
}
}
},
handleAvatarSuccess(res, file) {
this.addForm.url = res.data
this.imageUrl = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
this.imageFileName.push(file.name);
const isJPG = file.type === 'image/jpeg';
const isGIF = file.type === 'image/gif';
const isPNG = file.type === 'image/png';
const isBMP = file.type === 'image/bmp';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG && !isGIF && !isPNG && !isBMP) {
this.common.errorTip('上传图片必须是JPG/GIF/PNG/BMP 格式!');
}
if (!isLt2M) {
this.common.errorTip('上传图片大小不能超过 2MB!');
}
return (isJPG || isBMP || isGIF || isPNG) && isLt2M;
},
goBack () {
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="less">
.cook-detail {
width: 100%;
// height: calc(100% - 34px);
background-color: #ffffff;
padding: 30px 40px;
box-sizing: border-box;
.my_title {margin-bottom: 45px}
.cook_infor {font-size: 16px; padding-left: 30px; padding-right: 70px;
.el-row {margin-bottom: 24px;
span {color: #333333}
.col_rt {color: #666666}
}
}
.rightmt30{
float: right;
padding-right: 70px;
}
}
</style>
......@@ -30,37 +30,43 @@
<el-row>
<el-col :span="3"><span>服务项目:</span></el-col>
<el-col :span="12">
<div class="col_rt">(一)日常保洁</div>
<div class="col_rt">{{cookData.serviceItems}}</div>
<!-- <div class="col_rt">(一)日常保洁</div>
<div class="col_rt">1、客厅卧室门窗、家具、地面的保洁;</div>
<div class="col_rt">2、其他特殊清洁剂:多功能清洁剂、除胶剂、火碱。</div>
<div class="col_rt">3、以上清洁剂为保洁员自带。</div>
<div class="col_rt">(二)开荒保洁</div>
<div class="col_rt">1、所有日常保洁项目;</div>
<div class="col_rt">2、特殊污渍去除;</div>
<div class="col_rt">3、天花板、墙面整体清洁。</div>
<div class="col_rt">3、天花板、墙面整体清洁。</div> -->
</el-col>
</el-row>
<el-row>
<el-col :span="3"><span>清洁工具:</span></el-col>
<el-col :span="12">
<div class="col_rt">1、工作毛巾、胶手套、百洁布、钢丝球;</div>
<!-- <div class="col_rt">1、工作毛巾、胶手套、百洁布、钢丝球;</div>
<div class="col_rt">2、玻璃刮刀、上水器、铲刀、清洁桶;</div>
<div class="col_rt">3、以上工具为保洁员自带。</div>
<div class="col_rt">3、以上工具为保洁员自带。</div> -->
<div class="col_rt">{{cookData.tool}}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="3"><span>清洁剂:</span></el-col>
<el-col :span="12">
<div class="col_rt">1、玻璃清洁剂、中性清洁剂、洁厕剂、消毒液、去污粉;</div>
<div class="col_rt">{{cookData.agent}}</div>
<!-- <div class="col_rt">1、玻璃清洁剂、中性清洁剂、洁厕剂、消毒液、去污粉;</div>
<div class="col_rt">2、其他特殊清洁剂:多功能清洁剂、除胶剂、火碱。</div>
<div class="col_rt">3、以上清洁剂为保洁员自带。</div>
<div class="col_rt">3、以上清洁剂为保洁员自带。</div> -->
</el-col>
</el-row>
<el-row>
<el-col :span="3"><span>收费标准:</span></el-col>
<el-col :span="12">
<div class="col_rt">1、日常保洁(暂定):45元/小时/人(三小时起步),55元/小时/人(两小时起步);</div>
<div class="col_rt">2、开荒保洁(暂定):10元/平米。</div>
<div class="col_rt">{{cookData.standard}}</div>
<!-- <div class="col_rt">1、日常保洁(暂定):45元/小时/人(三小时起步),55元/小时/人(两小时起步);</div>
<div class="col_rt">2、开荒保洁(暂定):10元/平米。</div> -->
</el-col>
</el-row>
......@@ -92,6 +98,7 @@ export default {
}
}).then((res)=>{
this.cookData = res.data.data
console.log(res)
})
},
goBack () {
......
......@@ -21,6 +21,7 @@
<div class="main_table">
<p class="my_title">
<em>人员信息</em>
<el-button type="primary" plain class="btn-search" @click="add" size="small">新增</el-button>
</p>
<el-table
:data="data"
......@@ -50,18 +51,17 @@
prop="status"
align="center"
label="状态">
可预约
<!-- <template slot-scope="scope">
<span>{{scope.row.status == 'Y' ? '是' : '否'}}</span>
</template> -->
<template slot-scope="scope">
<span>{{scope.row.status == '1' ? '可预约' : '不可预约'}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
<a href="javascript:;" @click="goDetail(scope.row.id, $event)" class="btn_edit btn_edit_add">详情</a>
<!-- <a href="javascript:;" @click="goEdit(scope.row.id, $event)" class="btn_edit">编辑</a>
<a href="javascript:;" @click="goDelete(scope.row.id, $event)" class="btn_delete">删除</a> -->
<!-- <a href="javascript:;" @click="goDetail(scope.row.id, $event)" class="btn_edit btn_edit_add">详情</a> -->
<a href="javascript:;" @click="goEdit(scope.row.id, $event)" class="btn_edit">编辑</a>
<a href="javascript:;" @click="goDelete(scope.row.id, $event)" class="btn_delete">删除</a>
</template>
</el-table-column>
</el-table>
......@@ -104,14 +104,16 @@ export default {
console.log('submit!')
},
add () {
this.$router.push({name: 'cookAdd', params: {}})
this.$router.push({name: 'bjAdd', params: {}})
},
goDetail (id, e) {
this.$router.push('/bjDetail/' + id)
},
goEdit (id, e) {
e.stopPropagation()
this.$router.push({name: 'cookAdd', params: {
console.log(id)
console.log(e)
this.$router.push({name: 'bjAdd', params: {
id: id
}})
},
......@@ -124,12 +126,19 @@ export default {
}).then(() => {
this.$axios({
method: 'get',
url: '/pccook/delete/' + id,
url: '/pccleaning/delete/' + id,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then((res) => {
this.getList()
setTimeout(()=>{
if(this.data.length<=0){
console.log(1)
--this.allPage;
this.getList()
}
},600,true)
})
}).catch(() => {
......@@ -141,6 +150,8 @@ export default {
"phone": this.formInline.phone,
// "status": this.formInline.status
}
console.log(this.formInline.name)
console.log(this.formInline.phone)
this.$axios({
method: 'post',
url: '/pccleaning/get/list?p=' + this.allPage + '&c=' + this.currentPage,
......@@ -159,14 +170,14 @@ export default {
this.$router.push('/bjDetail/' + row.id)
},
searchList () {
this.getOrderList()
this.getList()
},
goPage (num) {
this.allPage = Number(this.allPage) + num
this.getOrderList()
this.getList()
},
goToPage () {
this.getOrderList()
this.getList()
},
}
}
......
......@@ -10,17 +10,17 @@
<div class="order-list">
<el-card class="box-card no-margin-card margin-bottom20">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-col :sm="4" >
<el-col :sm="6" >
<el-form-item label="订单号">
<el-input v-model="formInline.orderNumber" placeholder="订单号"></el-input>
</el-form-item>
</el-col>
<el-col :sm="4">
<el-col :sm="5">
<el-form-item label="姓名">
<el-input v-model="formInline.name" placeholder="姓名"></el-input>
</el-form-item>
</el-col>
<el-col :sm="12">
<el-col :sm="11">
<el-form-item label="时间">
<el-col :sm="11">
<el-form-item prop="date1">
......@@ -37,7 +37,7 @@
</el-col>
</el-form-item>
</el-col>
<el-col :sm="6" class="margin-bottom20">
<el-col :sm="6" class="margin-bottom20">
<el-form-item label="类型" >
<el-select v-model="formInline.type">
<el-option label="全部" value=""></el-option>
......@@ -48,7 +48,7 @@
</el-form-item>
</el-col>
<el-col :sm="2" :offset="1">
<el-col :sm="1" :offset="1">
<el-form-item>
<el-button class="searchButton" type="primary" @click="searchList" size="small">搜索</el-button>
</el-form-item>
......@@ -337,6 +337,7 @@ export default {
alert(1)
},
getOrderList () {
console.log(1)
let parms = {
'endDate': this.formInline.endTime ? moment(this.formInline.endTime).format('YYYY-MM-DD HH:mm:ss') : '',
'starDate': this.formInline.startTime ? moment(this.formInline.startTime).format('YYYY-MM-DD HH:mm:ss') : '',
......@@ -353,6 +354,7 @@ export default {
}
}).then((res) => {
res.data.data.resultList.forEach((item)=>{
console.log(res)
if (item.type == 'WM' || item.type == 'CS') {
item.titleName = ''
item.detail.forEach((info)=>{
......@@ -368,6 +370,7 @@ export default {
})
},
handleRowChange (row, event, column) {
console.log(row)
this.$router.push({ name: 'orderDetail', params: { id: row.id, type: row.type} })
},
searchList () {
......
<template>
<div class="cook-detail">
<p class="my_title">
<em>请填写维修人员信息</em>
</p>
<div class="cook_infor">
<el-row>
<el-form label-width="110px" :model="addForm">
<el-col :span="6" class="mt30 rightmt30">
<el-form-item :rules="{required: true}" >
<el-upload
class="avatar-uploader"
:action="$ImageUploadUrl"
:show-file-list="false"
accept="image/jpeg,image/gif,image/png,image/bmp"
:before-upload="beforeAvatarUpload"
:on-success="handleAvatarSuccess"
>
<!-- :before-upload="beforeAvatarUpload" -->
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
<em style=" float: right; font-size: 10px;">(图片大小不能超过2MB)</em>
</el-col>
<el-col :span="15">
<el-form-item label="姓名:" :rules="{required: true}">
<el-input v-model="addForm.name" placeholder="请输入姓名"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="维修类型:" :rules="{required: true}">
<el-select v-model="addForm.type" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="联系方式:" :rules="{required: true}">
<el-input v-model="addForm.phone" placeholder="请输入联系方式"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="工作时间:" :rules="{required: true}">
<el-input v-model="addForm.workYears" placeholder="请输入工作时间"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="状态:" :rules="{required: true}">
<el-radio v-model="addForm.status" label="1">可预约</el-radio>
<el-radio v-model="addForm.status" label="0">不可预约</el-radio>
</el-form-item>
</el-col>
<el-col :sm="20">
<el-form-item label="推荐理由:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.recommend"></el-input>
</el-form-item>
<el-form-item label="维修服务:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.serviceItems"></el-input>
</el-form-item>
<el-form-item label="维修工具:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.tool"></el-input>
</el-form-item>
<el-form-item label="收费标准:" :rules="{required: true}">
<el-input type="textarea" v-model="addForm.standard"></el-input>
</el-form-item>
<el-form-item label="备注:">
<el-input type="textarea" v-model="addForm.remarks"></el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<el-row style="text-align: center; padding-top: 50px">
<el-button type="primary" @click="saveBtn">保存</el-button>
<el-button type="primary" @click="goBack" plain>取消</el-button>
</el-row>
</div>
</div>
</template>
<script>
import moment from 'moment'
export default {
name: 'cookDetail',
data () {
return {
addForm: {
name:'',
type:'',
phone:'',
status:'',
workYears:'',
serviceItems:'',
standard:''
},
imageUrl: '',
imageFileName:[],
options: [{
value: '综合维修',
label: '综合维修'
}, {
value: '电工',
label: '电工'
}, {
value: '水暖工',
label: '水暖工'
}],
}
},
created (){
if (this.$route.params.id) {
this.getData()
}
},
methods: {
getData () {
this.$axios({
method:'get',
url:'/pcrepair/get/' + this.$route.params.id,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then((res)=>{
this.addForm = res.data.data
this.imageUrl = this.addForm.url
console.log(res.data.data)
})
},
saveBtn () {
var param = this.addForm
console.log(param)
if (this.$route.params.id) {
delete param.createDate
param.starDate = moment(param.starDate).format('YYYY-MM-DD HH:MM:SS')
param.endDate = moment(param.endDate).format('YYYY-MM-DD HH:MM:SS')
this.$axios({
method:'POST',
url:'/pcrepair/update/cook',
data:param,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then(()=>{
this.$message.success('修改成功')
this.goBack()
})
} else {
param.id = 0
param.starDate = moment(param.starDate).format('YYYY-MM-DD HH:MM:SS')
param.endDate = moment(param.endDate).format('YYYY-MM-DD HH:MM:SS')
if(param.name!="" && param.type!='' &&param.phone!='' &&param.status!='' &&param.workYears!='' && param.serviceItems!='' && param.standard!=''){
this.$axios({
method:'POST',
url:'/pcrepair/add/cook',
data:param,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then(()=>{
this.$message.success('新增成功')
this.goBack()
})
}else{
this.$message({
message: '请填写完整',
type: 'warning'
});
}
}
},
handleAvatarSuccess(res, file) {
this.addForm.url = res.data
this.imageUrl = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
this.imageFileName.push(file.name);
const isJPG = file.type === 'image/jpeg';
const isGIF = file.type === 'image/gif';
const isPNG = file.type === 'image/png';
const isBMP = file.type === 'image/bmp';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG && !isGIF && !isPNG && !isBMP) {
this.common.errorTip('上传图片必须是JPG/GIF/PNG/BMP 格式!');
}
if (!isLt2M) {
this.common.errorTip('上传图片大小不能超过 2MB!');
}
return (isJPG || isBMP || isGIF || isPNG) && isLt2M;
},
goBack () {
this.$router.go(-1)
}
}
}
</script>
<style scoped lang="less">
.cook-detail {
width: 100%;
// height: calc(100% - 34px);
background-color: #ffffff;
padding: 30px 40px;
box-sizing: border-box;
.my_title {margin-bottom: 45px}
.cook_infor {font-size: 16px; padding-left: 30px; padding-right: 70px;
.el-row {margin-bottom: 24px;
span {color: #333333}
.col_rt {color: #666666}
}
}
.rightmt30{
float: right;
padding-right: 70px;
}
}
</style>
......@@ -30,26 +30,30 @@
<el-row>
<el-col :span="3"><span>维修服务:</span></el-col>
<el-col :span="12">
<div class="col_rt">(一):电工维修项目服务</div>
<div class="col_rt">
{{cookData.serviceItems}}
</div>
<!-- <div class="col_rt">(一):电工维修项目服务</div>
<div class="col_rt">1.家庭用电老旧线路维修改造、更换电源线、开关、检修更换灯具、判断家庭用电设备故障;</div>
<div class="col_rt">2.工程安装,家庭装修水电改造,根据业主需求进行电源线路简单设计改造。</div>
<div class="col_rt">(二):水暖维修服务</div>
<div class="col_rt">1.家庭马桶、洗手盆、淋浴间管道疏通、地漏、上下水管道更换;</div>
<div class="col_rt">2.家庭卫生洁具更换包括水龙头、马桶水箱配件、淋浴间配件、阀门等维修更换,上门服务;</div>
<div class="col_rt">2.家庭卫生洁具更换包括水龙头、马桶水箱配件、淋浴间配件、阀门等维修更换,上门服务;</div> -->
</el-col>
</el-row>
<el-row>
<el-col :span="3"><span>维修工具:</span></el-col>
<el-col :span="12">
<div class="col_rt">电工: 老虎钳、试电笔、改锥、万用表等由维修工人自带。</div>
<div class="col_rt">水暖: 扳手、管钳、老虎钳、改锥、生胶带等由维修工自带。</div>
<div class="col_rt">{{cookData.tool}}</div>
<!-- <div class="col_rt">水暖: 扳手、管钳、老虎钳、改锥、生胶带等由维修工自带。</div> -->
</el-col>
</el-row>
<el-row>
<el-col :span="3"><span>收费标准:</span></el-col>
<el-col :span="12">
<div class="col_rt">电工: 家庭装修2.5平方线路暗敷40元/米、明敷30元/米。4平方线路暗敷50元/米,明敷40元/米。其他维修根据每个用户要求和使用材料不同可协商。</div>
<div class="col_rt">水暖: 4分PPR管暗敷55元/米,明敷45元/米,安装完毕后做试压、试水试验。其他根据用户要求和装修材料标准协商。</div>
<div class="col_rt">{{cookData.standard}}</div>
<!-- <div class="col_rt">水暖: 4分PPR管暗敷55元/米,明敷45元/米,安装完毕后做试压、试水试验。其他根据用户要求和装修材料标准协商。</div> -->
</el-col>
</el-row>
......@@ -81,6 +85,7 @@ export default {
}
}).then((res)=>{
this.cookData = res.data.data
console.log(res)
})
},
goBack () {
......
......@@ -21,6 +21,7 @@
<div class="main_table">
<p class="my_title">
<em>人员信息</em>
<el-button type="primary" plain class="btn-search" @click="add" size="small">新增</el-button>
</p>
<el-table
:data="data"
......@@ -50,18 +51,18 @@
prop="status"
align="center"
label="状态">
可预约
<!-- <template slot-scope="scope">
<span>{{scope.row.status == 'Y' ? '是' : '否'}}</span>
</template> -->
<!-- 可预约 -->
<template slot-scope="scope">
<span>{{scope.row.status == '1' ? '可预约' : '不可预约'}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
<a href="javascript:;" @click="goDetail(scope.row.id, $event)" class="btn_edit btn_edit_add">详情</a>
<!-- <a href="javascript:;" @click="goEdit(scope.row.id, $event)" class="btn_edit">编辑</a>
<a href="javascript:;" @click="goDelete(scope.row.id, $event)" class="btn_delete">删除</a> -->
<!-- <a href="javascript:;" @click="goDetail(scope.row.id, $event)" class="btn_edit btn_edit_add">详情</a> -->
<a href="javascript:;" @click="goEdit(scope.row.id, $event)" class="btn_edit">编辑</a>
<a href="javascript:;" @click="goDelete(scope.row.id, $event)" class="btn_delete">删除</a>
</template>
</el-table-column>
</el-table>
......@@ -104,14 +105,14 @@ export default {
console.log('submit!')
},
add () {
this.$router.push({name: 'cookAdd', params: {}})
this.$router.push({name: 'wxAdd', params: {}})
},
goDetail (id, e) {
this.$router.push('/wxDetail/' + id)
},
goEdit (id, e) {
e.stopPropagation()
this.$router.push({name: 'cookAdd', params: {
this.$router.push({name: 'wxAdd', params: {
id: id
}})
},
......@@ -124,16 +125,24 @@ export default {
}).then(() => {
this.$axios({
method: 'get',
url: '/pccook/delete/' + id,
url: '/pcrepair/delete/' + id,
headers: {
'token':JSON.parse(window.localStorage.getItem('token')),
}
}).then((res) => {
this.getList()
this.getList()
setTimeout(()=>{
if(this.data.length<=0){
console.log(1)
--this.allPage;
this.getList()
}
},600,true)
})
}).catch(() => {
})
},
getList () {
let parms = {
......@@ -152,21 +161,21 @@ export default {
this.data = res.data.data.resultList
this.countPage = res.data.data.countPage
this.page = res.data.data.page
console.log(res.data)
console.log(this.data)
})
},
handleRowChange (row, event, column) {
this.$router.push('/wxDetail/' + row.id)
},
searchList () {
this.getOrderList()
this.getList()
},
goPage (num) {
this.allPage = Number(this.allPage) + num
this.getOrderList()
this.getList()
},
goToPage () {
this.getOrderList()
this.getList()
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment