Commit 5dc4b6bc by duanguohui

超市管理

parent 4edd7cc0
......@@ -2873,8 +2873,7 @@
"version": "4.6.0",
"resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true,
"optional": true
"dev": true
},
"coa": {
"version": "2.0.2",
......@@ -3674,8 +3673,7 @@
"deep-equal": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz",
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
"dev": true
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"deep-is": {
"version": "0.1.3",
......@@ -4858,8 +4856,7 @@
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz",
"integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=",
"dev": true
"integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo="
},
"extend-shallow": {
"version": "3.0.2",
......@@ -4971,6 +4968,11 @@
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
"dev": true
},
"fast-diff": {
"version": "1.1.2",
"resolved": "https://registry.npm.taobao.org/fast-diff/download/fast-diff-1.1.2.tgz",
"integrity": "sha1-S2LEK44D3j+EhGC2OQeZIGldAVQ="
},
"fast-glob": {
"version": "2.2.7",
"resolved": "https://registry.npm.taobao.org/fast-glob/download/fast-glob-2.2.7.tgz",
......@@ -5312,8 +5314,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
......@@ -5334,14 +5335,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -5356,20 +5355,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -5486,8 +5482,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -5499,7 +5494,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -5514,7 +5508,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -5522,14 +5515,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -5548,7 +5539,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -5629,8 +5619,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
......@@ -5642,7 +5631,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -5728,8 +5716,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -5765,7 +5752,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -5785,7 +5771,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -5829,14 +5814,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},
......@@ -7882,8 +7865,7 @@
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-copy": {
"version": "0.1.0",
......@@ -8186,6 +8168,11 @@
"no-case": "^2.2.0"
}
},
"parchment": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/parchment/download/parchment-1.1.4.tgz",
"integrity": "sha1-rt7Xq5OP6SHUw0vDOc4RaLwv/eU="
},
"parent-module": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/parent-module/download/parent-module-1.0.1.tgz",
......@@ -9167,6 +9154,41 @@
"integrity": "sha1-YOWl/WSn+L+k0qsu1v30yFutFU4=",
"dev": true
},
"quill": {
"version": "1.3.6",
"resolved": "https://registry.npm.taobao.org/quill/download/quill-1.3.6.tgz",
"integrity": "sha1-mfTeH+6FkloNfUFjttgyjyMxek0=",
"requires": {
"clone": "^2.1.1",
"deep-equal": "^1.0.1",
"eventemitter3": "^2.0.3",
"extend": "^3.0.1",
"parchment": "^1.1.4",
"quill-delta": "^3.6.2"
},
"dependencies": {
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
},
"eventemitter3": {
"version": "2.0.3",
"resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-2.0.3.tgz",
"integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo="
}
}
},
"quill-delta": {
"version": "3.6.3",
"resolved": "https://registry.npm.taobao.org/quill-delta/download/quill-delta-3.6.3.tgz",
"integrity": "sha1-sZ/SuJQSMBxg4f8hPY2GDqwPEDI=",
"requires": {
"deep-equal": "^1.0.1",
"extend": "^3.0.2",
"fast-diff": "1.1.2"
}
},
"randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz",
......@@ -9648,8 +9670,7 @@
"version": "4.0.8",
"resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true,
"optional": true
"dev": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
......@@ -11301,6 +11322,15 @@
"vue-style-loader": "^4.1.0"
}
},
"vue-quill-editor": {
"version": "3.0.6",
"resolved": "https://registry.npm.taobao.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",
"integrity": "sha1-H4VkYhHWijGoCnLLf0W7LxGbyPs=",
"requires": {
"object-assign": "^4.1.1",
"quill": "^1.3.4"
}
},
"vue-router": {
"version": "3.0.6",
"resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.0.6.tgz",
......
......@@ -13,6 +13,7 @@
"element-ui": "^2.9.1",
"moment": "^2.24.0",
"vue": "^2.6.10",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
......
......@@ -8,6 +8,12 @@ import 'element-ui/lib/theme-chalk/index.css'
import '../src/assets/css/reset.css'
import '../src/assets/css/function.less'
import '../src/assets/css/main.less'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
// use
Vue.use(VueQuillEditor)
axios.defaults.baseURL = 'http://47.94.209.240:8088/'
// axios.defaults.baseURL = 'https://www.i-sirius.com/api/'
......
<template>
<div class="cook-detail">
<div class="cook-detail">
<p class="my_title">
<em>请填写厨师信息</em>
<em>请编辑商品信息</em>
</p>
<div class="cook_infor">
<el-row>
<el-form label-width="110px" :model="addForm">
<el-col :span="18" class="mt30">
<el-form-item label="头像:" :rules="{required: true}">
<el-upload
class="avatar-uploader"
:action="$ImageUploadUrl"
:show-file-list="false"
: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>
</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 label="花卉绿植名称:" :rules="{required: true}">
<el-input v-model="addForm.name1" placeholder="请输入名称" disabled></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.cuisine" placeholder="请输入菜系"></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<!-- <el-col :span="15">
<el-form-item label="类型:" :rules="{required: true}">
<el-radio v-model="addForm.type" label="面点">面点</el-radio>
<el-radio v-model="addForm.type" label="热炒">热炒</el-radio>
<el-radio v-model="addForm.type" label="冷菜">冷菜</el-radio>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="15">
<el-form-item label="拿手菜:" :rules="{required: true}">
<el-input v-model="addForm.food" placeholder="请输入拿手菜"></el-input>
<el-form-item label="价格:" :rules="{required: true}">
<el-input v-model="addForm.marketPrice" placeholder="请输入价格" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="可预约:" :rules="{required: true}">
<el-switch v-model="addForm.status"></el-switch>
</el-form-item>
</el-col>
<el-col :sm="20">
<el-form-item label="预约时间">
<el-col :sm="11">
<el-form-item prop="date1">
<el-date-picker v-model="addForm.starDate" type="datetime" placeholder="开始时间">
</el-date-picker>
<el-form-item label="库存:" :rules="{required: true}">
<el-input value="0" placeholder="请输入库存" disabled></el-input>
</el-form-item>
</el-col>
<el-col class="line" :sm="2" style="text-align: center">-</el-col>
<el-col :sm="11">
<el-form-item prop="date2">
<el-date-picker v-model="addForm.endDate" type="datetime" placeholder="结束时间">
</el-date-picker>
<el-col :span="15">
<el-form-item label="标签:" :rules="{required: true}">
<el-input v-model="addForm.name2" placeholder="请输入标签" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="18" class="mt30">
<el-form-item label="主图:" :rules="{required: true}">
<el-upload
class="avatar-uploader"
:action="$ImageUploadUrl"
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="排序号:" :rules="{required: true}">
<el-input type="number" v-model="addForm.num" placeholder="请输入排序号"></el-input>
<el-form-item label="详情:">
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="备注:" :rules="{required: true}">
<el-input v-model="addForm.message" placeholder="请输入备注"></el-input>
</el-form-item>
<el-col :span="24">
<quill-editor
class="edit_class"
v-model="addForm.sourceInfo"
ref="myQuillEditor"
@change="onEditorChange($event)">
</quill-editor>
</el-col>
</el-form>
</el-row>
<el-row style="text-align: center; padding-top: 50px">
<el-row style="text-align: center; margin-top: 150px">
<el-button type="primary" @click="saveBtn">保存</el-button>
<el-button type="primary" @click="goBack" plain>取消</el-button>
</el-row>
......@@ -92,54 +72,46 @@
</template>
<script>
import moment from 'moment'
import { quillEditor } from 'vue-quill-editor'
export default {
name: 'cookDetail',
data () {
return {
addForm: {
},
imageUrl: ''
}
},
created (){
if (this.$route.params.id) {
this.getData()
}
this.addForm = this.$route.params.item
this.imageUrl = this.$route.params.item.masterImg
},
components: {
quillEditor
},
methods: {
getData () {
this.$axios.get('/pccook/get/' + this.$route.params.id).then((res)=>{
this.addForm = res.data.data
this.imageUrl = this.addForm.url
res.data.data.status == 'Y' ? this.addForm.status = true : this.addForm.status = false
})
onEditorChange ({ editor, html, text }) {
console.log('editor change!', editor, html, text)
},
saveBtn () {
var param = this.addForm
if (this.$route.params.id) {
delete param.createDate
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')
this.$axios.post('/pccook/update/cook', param).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')
this.$axios.post('/pccook/add/cook', param).then(()=>{
this.$message.success('新增成功')
var params = {
id: this.addForm.id,
imgUrl: this.imageUrl,
message: this.addForm.sourceInfo
}
if (!this.imageUrl || !this.addForm.sourceInfo) {
this.$message.error('请填写完整信息')
return
}
this.$axios.post('/pcproduct/update/product', params).then(()=>{
this.$message.success('编辑成功')
this.goBack()
})
}
},
handleAvatarSuccess(res, file) {
this.addForm.url = res.data
this.imageUrl = URL.createObjectURL(file.raw);
this.imageUrl = res.data
// console.log(res, file)
// this.imageUrl = URL.createObjectURL(file.raw);
},
goBack () {
this.$router.go(-1)
......@@ -149,6 +121,11 @@ export default {
</script>
<style scoped lang="less">
.edit_class{
margin-left: 100px;
height: 200px;
width: 100%;
}
.cook-detail {
width: 100%;
// height: calc(100% - 34px);
......
<template>
<div class="cook-detail">
<div class="cook-detail">
<p class="my_title">
<em>厨师信息</em>
<em>商品信息</em>
</p>
<div class="cook_infor">
<el-row>
<el-col :span="3"><span>厨师名称:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.name}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>电话:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.phone}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>菜系:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.cuisine}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>类型:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.type}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>拿手菜:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.food}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>可预约:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.status == 'Y' ? '是' : '否'}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>预约时间:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.starDate}} ~ {{cookData.endDate}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>排序号:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.num}}</div></el-col>
</el-row>
<el-row>
<el-col :span="3"><span>备注:</span></el-col>
<el-col :span="10"><div class="col_rt">{{cookData.message}}</div></el-col>
<el-form label-width="110px" :model="addForm">
<el-col :span="15">
<el-form-item label="花卉绿植名称:" :rules="{required: true}">
<el-input v-model="addForm.name1" placeholder="请输入名称" disabled></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="15">
<el-form-item label="类型:" :rules="{required: true}">
<el-radio v-model="addForm.type" label="面点">面点</el-radio>
<el-radio v-model="addForm.type" label="热炒">热炒</el-radio>
<el-radio v-model="addForm.type" label="冷菜">冷菜</el-radio>
</el-form-item>
</el-col> -->
<el-col :span="15">
<el-form-item label="价格:" :rules="{required: true}">
<el-input v-model="addForm.marketPrice" placeholder="请输入价格" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="库存:" :rules="{required: true}">
<el-input value="0" placeholder="请输入库存" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="标签:" :rules="{required: true}">
<el-input v-model="addForm.name2" placeholder="请输入标签" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="18" class="mt30">
<el-form-item label="主图:" :rules="{required: true}">
<el-upload
class="avatar-uploader"
:action="$ImageUploadUrl"
:show-file-list="false"
:on-success="handleAvatarSuccess"
disabled
>
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="详情:">
</el-form-item>
</el-col>
<el-col :span="24">
<div class="edit_class" v-html="addForm.description"></div>
</el-col>
</el-form>
</el-row>
<el-row style="text-align: center; padding-top: 150px">
<el-col :span="24"><el-button type="primary" @click="goBack">返回</el-button></el-col>
<el-row style="text-align: center; margin-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'
import { quillEditor } from 'vue-quill-editor'
export default {
name: 'cookDetail',
data () {
return {
cookData: {}
addForm: {
},
imageUrl: ''
}
},
created (){
this.getData()
this.addForm = this.$route.params.item
this.imageUrl = this.$route.params.item.masterImg
},
components: {
quillEditor
},
methods: {
getData () {
this.$axios.get('/pccook/get/' + this.$route.params.id).then((res)=>{
this.cookData = res.data.data
onEditorChange ({ editor, html, text }) {
console.log('editor change!', editor, html, text)
},
saveBtn () {
var params = {
id: this.addForm.id,
imgUrl: this.imageUrl,
message: this.addForm.sourceInfo
}
if (!this.imageUrl || !this.addForm.sourceInfo) {
this.$message.error('请填写完整信息')
return
}
this.$axios.post('/pcproduct/update/product', params).then(()=>{
this.$message.success('编辑成功')
// this.goBack()
})
},
handleAvatarSuccess(res, file) {
this.imageUrl = res.data
// console.log(res, file)
// this.imageUrl = URL.createObjectURL(file.raw);
},
goBack () {
this.$router.go(-1)
}
......@@ -72,6 +117,11 @@ export default {
</script>
<style scoped lang="less">
.edit_class{
margin-left: 100px;
// height: 200px;
width: 100%;
}
.cook-detail {
width: 100%;
// height: calc(100% - 34px);
......
......@@ -10,27 +10,18 @@
<div class="cook-list">
<div class="cook_top">
<el-form :inline="true" :model="formInline" class="demo-form-inline" label-width="60px" label-position="left">
<el-form-item label="姓名">
<el-input v-model="formInline.name" placeholder="姓名"></el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model="formInline.phone" placeholder="手机号"></el-input>
</el-form-item>
<el-form-item label="预约">
<el-select v-model="formInline.status">
<el-option label="是" value="true"></el-option>
<el-option label="否" value="false"></el-option>
</el-select>
<el-form-item label="名称">
<el-input v-model="formInline.name" placeholder="名称"></el-input>
</el-form-item>
<el-form-item>
<el-button class="searchButton" type="primary" @click="onSubmit" size="small">搜索</el-button>
<el-button type="primary" @click="getList" size="small">搜索</el-button>
</el-form-item>
</el-form>
</div>
<div class="main_table">
<p class="my_title">
<em>厨师信息</em>
<el-button type="primary" plain class="btn-search" @click="add" size="small">新增</el-button>
<em>花卉绿植信息</em>
<!-- <el-button type="primary" plain class="btn-search" @click="add" size="small">新增</el-button> -->
</p>
<el-table
:data="data"
......@@ -41,43 +32,31 @@
:header-row-style="{height: '60px'}"
style="width: 100%">
<el-table-column
prop="name"
label="厨师姓名"
prop="name1"
label="名称"
align="center">
</el-table-column>
<el-table-column
prop="cuisine"
label="菜系"
prop="marketPrice"
align="center"
>
label="价格">
</el-table-column>
<el-table-column
prop="food"
prop="stock"
align="center"
label="类型">
label="库存">
0
</el-table-column>
<el-table-column
prop="status"
prop="name2"
align="center"
label="是否可预约">
<template slot-scope="scope">
<span>{{scope.row.status == 'Y' ? '是' : '否'}}</span>
</template>
</el-table-column>
<el-table-column
prop="starDate"
align="center"
label="预约时间">
<template slot-scope="scope">
<span v-if="scope.row.status == 'Y'">{{scope.row.starDate}} ~ {{scope.row.endDate}}</span>
</template>
label="标签">
</el-table-column>
<el-table-column
align="center"
label="操作">
<template slot-scope="scope">
<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="goEdit(scope.row, $event)" class="btn_edit btn_edit_add">编辑</a>
</template>
</el-table-column>
</el-table>
......@@ -102,8 +81,6 @@ export default {
return {
formInline: {
name: '',
phone: '',
status: ''
},
allPage: 1,
currentPage: 10,
......@@ -117,15 +94,16 @@ export default {
},
methods: {
onSubmit () {
console.log('submit!')
},
add () {
this.$router.push({name: 'cookAdd', params: {}})
this.$router.push({name: 'flowerAdd', params: {}})
},
goEdit (id, e) {
goEdit (item, e) {
console.log(item)
e.stopPropagation()
this.$router.push({name: 'cookAdd', params: {
id: id
this.$router.push({name: 'flowerAdd', params: {
item: item
}})
},
goDelete (id, e) {
......@@ -147,13 +125,11 @@ export default {
},
getList () {
let parms = {
"name": this.formInline.name,
"phone": this.formInline.phone,
"status": this.formInline.status
"name1": this.formInline.name,
}
this.$axios({
method: 'post',
url: '/pccook/get/list?p=' + this.allPage + '&c=' + this.currentPage,
url: '/pcproduct/get/list?p=' + this.allPage + '&c=' + this.currentPage,
data: parms
}).then((res) => {
this.data = res.data.data.resultList
......@@ -163,17 +139,19 @@ export default {
})
},
handleRowChange (row, event, column) {
this.$router.push('/cookDetail/' + row.id)
this.$router.push({name: 'flowerDetail', params: {
item: row
}})
},
searchList () {
this.getOrderList()
this.getList()
},
goPage (num) {
this.allPage = Number(this.allPage) + num
this.getOrderList()
this.getList()
},
goToPage () {
this.getOrderList()
this.getList()
},
}
}
......@@ -183,4 +161,8 @@ export default {
.searchButton{
margin-top: 43px;
}
.btn_edit_add {
// text-align: center;
margin-right: 0!important;
}
</style>
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