Commit db64f8fc authored by 扫地僧's avatar 扫地僧

所有功能菜单基本属性

parent e1269c17
import request from './request'
import qs from 'qs'
export function storeList(data) {
return request({
url: '/store/storeList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditStore(data) {
return request({
url: '/store/addOrEditStore',
method: 'post',
data: qs.stringify(data)
})
}
export function delStore(data) {
return request({
url: '/store/delStore',
method: 'post',
data: qs.stringify(data)
})
}
import request from './request'
import qs from 'qs'
export function workerList(data) {
return request({
url: '/worker/workerList',
method: 'post',
data: qs.stringify(data)
})
}
export function addOrEditWorker(data) {
return request({
url: '/worker/addOrEditWorker',
method: 'post',
data: qs.stringify(data)
})
}
export function delWorker(data) {
return request({
url: '/worker/delWorker',
method: 'post',
data: qs.stringify(data)
})
}
......@@ -131,8 +131,8 @@ export const asyncRouterMap = [
{ path: 'roles', component: _import('system/roles'), name: 'system_roles', meta: { title: '系统角色' }},
{ path: 'user', component: _import('system/user'), name: 'system_user', meta: { title: '系统用户' }},
{ path: 'param', component: _import('system/param'), name: 'system_param', meta: { title: '系统参数' }},
{ path: 'dataDicFl', component: _import('system/dataDicFl'), name: 'system_dataDicFl', meta: { title: '数据字典分类' }},
{ path: 'dataDicX', component: _import('system/dataDicX'), name: 'system_dataDicX', meta: { title: '数据字典项' }}
{ path: 'dataDictCat', component: _import('system/dataDictCat'), name: 'system_dataDictCat', meta: { title: '数据字典分类' }},
{ path: 'dataDictItem', component: _import('system/dataDictItem'), name: 'system_dataDictItem', meta: { title: '数据字典项' }}
]
},
{ path: '*', redirect: '/404', hidden: true }
......
......@@ -10,8 +10,14 @@
</div>
<el-row :gutter="15">
<el-col :span="4">
<el-col class="input-name" :span="7">维修工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.repairWorkerName" @keyup.enter.native="seachFun"></el-input></el-col>
<el-col class="input-name" :span="7">店铺名称</el-col>
<el-col :span="17"><el-input placeholder="请输入店铺名称" v-model="seacherParam.storeName" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="4">
<el-col class="input-name" :span="7">管理员名称</el-col>
<el-col :span="17"><el-input placeholder="请输入管理员名称" v-model="seacherParam.administratorsName" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col>
</el-row>
</el-card>
......@@ -26,14 +32,21 @@
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="repairWorkerName" label="姓名"></el-table-column>
<el-table-column label="性别">
<el-table-column prop="storeName" label="店铺名称"></el-table-column>
<el-table-column prop="contactNumber" label="联系电话"></el-table-column>
<el-table-column prop="contacts" label="联系人"></el-table-column>
<el-table-column prop="qq" label="qq"></el-table-column>
<el-table-column prop="wechat" label="wechat"></el-table-column>
<el-table-column prop="storePosition" label="详细地址"></el-table-column>
<el-table-column prop="storeBusinessTimeStart" label="营业时间起"></el-table-column>
<el-table-column prop="storeBusinessTimeEnd" label="营业时间止"></el-table-column>
<el-table-column label="是否推荐">
<template slot-scope="scope">
<span>{{scope.row.sex===1?'男':'女'}}</span>
<span>{{scope.row.isRecommend===1?'是':'否'}}</span>
</template>
</el-table-column>
<el-table-column prop="repairWorkerPhone" label="电话"></el-table-column>
<el-table-column prop="repairWorkerIdCard" label="身份证号"></el-table-column>
<el-table-column prop="clicks" label="点击量"></el-table-column>
<el-table-column prop="administratorsName" label="店铺管理员名称"></el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">
<span>{{fattTime(scope.row.createTime)}}</span>
......@@ -102,43 +115,63 @@
<div class="dialog-body-content">
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>姓名</label></el-col>
<el-col :span="8" class="content-left"><label>店铺名称</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.repairWorkerName"></el-input>
<span v-else>{{dialogBindData.repairWorkerName}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.storeName"></el-input>
<span v-else>{{dialogBindData.storeName}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>性别</label></el-col>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>联系电话</label></el-col>
<el-col :span="16" class="content-right">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.sex">
<el-radio size="small" :label="1"></el-radio>
<el-radio size="small" :label="0"></el-radio>
</el-radio-group>
<span v-else>{{dialogBindData.sex===1?"男":"女"}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入联系电话" v-model="dialogBindData.contactNumber"></el-input>
<span v-else>{{dialogBindData.contactNumber}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>联系人</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入联系人" v-model="dialogBindData.contacts"></el-input>
<span v-else>{{dialogBindData.contacts}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>qq</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入qq" v-model="dialogBindData.qq"></el-input>
<span v-else>{{dialogBindData.qq}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>电话</label></el-col>
<el-col :span="8" class="content-left"><label>wechat</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入电话号码" v-model="dialogBindData.repairWorkerPhone"></el-input>
<span v-else>{{dialogBindData.repairWorkerPhone}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入wechat" v-model="dialogBindData.wechat"></el-input>
<span v-else>{{dialogBindData.wechat}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>详细地址</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入详细地址" v-model="dialogBindData.storePosition"></el-input>
<span v-else>{{dialogBindData.storePosition}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>身份证号</label></el-col>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>是否推荐</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身份证号" v-model="dialogBindData.repairWorkerIdCard"></el-input>
<span v-else>{{dialogBindData.repairWorkerIdCard}}</span>
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.sex">
<el-radio size="small" :label="1"></el-radio>
<el-radio size="small" :label="0"></el-radio>
</el-radio-group>
<span v-else>{{dialogBindData.isRecommend===1?"是":"否"}}</span>
</el-col>
</el-row>
<!-- <el-row :gutter="15">
......@@ -160,14 +193,14 @@
</template>
<script>
import * as repair from "../../api/repair";
import * as store from "../../api/store";
import * as common from "../../api/common";
import { fattCreateTime } from "../../utils/fattTime";
export default {
data() {
return {
seacherParam: {
repairWorkerName: ""
storeName: ""
},
// 表格数据
dataOption: null,
......@@ -195,11 +228,22 @@ export default {
// visitReasonId:"1001"
dialogBindData: {
repairWorkerId: "",
repairWorkerName: "",
sex: 1,
repairWorkerPhone: "",
repairWorkerIdCard: ""
storeId: "",
storeName: "",
storePosition: "",
isAuditing: 1,
isShopping: 1,
isRecommend:"",
isAvailable:"",
contactNumber:"",
contacts:"",
qq:"",
wechat:"",
storePosition:"",
storeBusinessTimeStart:"",
storeBusinessTimeEnd:"",
administratorsName:"",
clicks:""
},
// 是否提交
submmitSuccess: false
......@@ -213,7 +257,7 @@ export default {
methods: {
seachFun() {
this.$seach
.submmit(this, repair.getRepairWorkerList)
.submmit(this, store.storeList)
.then(res => {
this.dataOption = res.data.data;
// 初始化分页数据
......@@ -281,10 +325,10 @@ export default {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// }
// 发送添加请求
const isSubmitActive = this.dialogBindData.repairWorkerName&&this.dialogBindData.repairWorkerPhone&&this.dialogBindData.repairWorkerIdCard;
const isSubmitActive = this.dialogBindData.storeName&&this.dialogBindData.storePosition&&this.dialogBindData.storeDetails;
if (isSubmitActive) {
this.submmitSuccess = true;
repair.addOrEditRepairWorker(this.dialogBindData).then(res => {
store.addOrEditStore(this.dialogBindData).then(res => {
this.getList(() => {
this.$message({
message: this.dialogType === 1 ? "添加成功" : "编辑成功",
......@@ -325,8 +369,8 @@ export default {
},
// 获取表格数据
getList(cb) {
repair
.getRepairWorkerList({ pageNo: this.pageNo, pageSize: this.pageSize })
store
.storeList({ pageNo: this.pageNo, pageSize: this.pageSize })
.then(res => {
// 初始话表格数据
this.dataOption = res.data.data;
......
......@@ -342,11 +342,15 @@ export default {
edit(data) {
debugger
this.dialogType = 2;
this.getRoleList(() => {
this.getSectionsByDeptId(data.deptId, () => {
this.reBindData(data);
this.dialogState = true;
});
// this.getRoleList(() => {
// this.getSectionsByDeptId(data.deptId, () => {
// this.reBindData(data);
// this.dialogState = true;
// });
// });
this.getRoleAndUserData(() => {
this.reBindData(data);
this.dialogState = true;
});
},
check(data) {
......
......@@ -10,8 +10,8 @@
</div>
<el-row :gutter="15">
<el-col :span="4">
<el-col class="input-name" :span="7">维修工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.repairWorkerName" @keyup.enter.native="seachFun"></el-input></el-col>
<el-col class="input-name" :span="7">工名称</el-col>
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.workerName" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col>
</el-row>
</el-card>
......@@ -26,14 +26,20 @@
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="repairWorkerName" label="姓名"></el-table-column>
<el-table-column prop="workerName" label="姓名"></el-table-column>
<el-table-column label="性别">
<template slot-scope="scope">
<span>{{scope.row.sex===1?'男':'女'}}</span>
<span>{{scope.row.workerSex===1?'男':'女'}}</span>
</template>
</el-table-column>
<el-table-column prop="repairWorkerPhone" label="电话"></el-table-column>
<el-table-column prop="repairWorkerIdCard" label="身份证号"></el-table-column>
<el-table-column prop="workerAge" label="年龄"></el-table-column>
<el-table-column prop="workerBirthday" label="生日"></el-table-column>
<el-table-column prop="workerAncestral" label="祖籍"></el-table-column>
<el-table-column prop="workerHeight" label="身高"></el-table-column>
<el-table-column prop="workerWeight" label="体重"></el-table-column>
<el-table-column prop="workerBust" label="胸围"></el-table-column>
<el-table-column prop="workerWaist" label="腰围"></el-table-column>
<el-table-column prop="workerHipline" label="臀围"></el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">
<span>{{fattTime(scope.row.createTime)}}</span>
......@@ -104,8 +110,8 @@
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>姓名</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.repairWorkerName"></el-input>
<span v-else>{{dialogBindData.repairWorkerName}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入姓名" v-model="dialogBindData.workerName"></el-input>
<span v-else>{{dialogBindData.workerName}}</span>
</el-col>
</el-row>
......@@ -113,29 +119,29 @@
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>性别</label></el-col>
<el-col :span="16" class="content-right">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.sex">
<el-radio-group v-if="dialogType===1 || dialogType===2" v-model="dialogBindData.workerSex">
<el-radio size="small" :label="1"></el-radio>
<el-radio size="small" :label="0"></el-radio>
</el-radio-group>
<span v-else>{{dialogBindData.sex===1?"男":"女"}}</span>
<span v-else>{{dialogBindData.workerSex===1?"男":"女"}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>电话</label></el-col>
<el-col :span="8" class="content-left"><label>年龄</label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入电话号码" v-model="dialogBindData.repairWorkerPhone"></el-input>
<span v-else>{{dialogBindData.repairWorkerPhone}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入年龄" v-model="dialogBindData.workerAge"></el-input>
<span v-else>{{dialogBindData.workerAge}}</span>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="8" class="content-left"><label>份证号</label></el-col>
<el-col :span="8" class="content-left"><label></label></el-col>
<el-col :span="16" class="content-right">
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身份证号" v-model="dialogBindData.repairWorkerIdCard"></el-input>
<span v-else>{{dialogBindData.repairWorkerIdCard}}</span>
<el-input v-if="dialogType===1 || dialogType===2" size="small" placeholder="请输入身高" v-model="dialogBindData.workerHeight"></el-input>
<span v-else>{{dialogBindData.workerHeight}}</span>
</el-col>
</el-row>
......@@ -160,14 +166,16 @@
</template>
<script>
import * as repair from "../../api/repair";
import * as worker from "../../api/worker";
import * as common from "../../api/common";
import { fattCreateTime } from "../../utils/fattTime";
export default {
data() {
return {
seacherParam: {
repairWorkerName: ""
workerName: "",
workerNumber:"",
workerAge:""
},
// 表格数据
dataOption: null,
......@@ -195,11 +203,27 @@ export default {
// visitReasonId:"1001"
dialogBindData: {
repairWorkerId: "",
repairWorkerName: "",
sex: 1,
repairWorkerPhone: "",
repairWorkerIdCard: ""
workerId: "",
workerName: "",
workerSex: 1,
workerAge: "",
workerBirthday: "",
workerHeight: "",
workerWeight: "",
workerBust: 1,
workerWaist: "",
workerHipline: "",
workerHomePic: "",
workerPic: "",
workerResume: 1,
storeId: "",
administratorsId: "",
isAuditing: "",
isShopping: "",
clicks: 1,
isRecommend: "",
serialNumber: ""
},
// 是否提交
submmitSuccess: false
......@@ -213,7 +237,7 @@ export default {
methods: {
seachFun() {
this.$seach
.submmit(this, repair.getRepairWorkerList)
.submmit(this, worker.workerList)
.then(res => {
this.dataOption = res.data.data;
// 初始化分页数据
......@@ -284,7 +308,7 @@ export default {
const isSubmitActive = this.dialogBindData.repairWorkerName&&this.dialogBindData.repairWorkerPhone&&this.dialogBindData.repairWorkerIdCard;
if (isSubmitActive) {
this.submmitSuccess = true;
repair.addOrEditRepairWorker(this.dialogBindData).then(res => {
worker.addOrEditWorker(this.dialogBindData).then(res => {
this.getList(() => {
this.$message({
message: this.dialogType === 1 ? "添加成功" : "编辑成功",
......@@ -325,8 +349,8 @@ export default {
},
// 获取表格数据
getList(cb) {
repair
.getRepairWorkerList({ pageNo: this.pageNo, pageSize: this.pageSize })
worker
.workerList({ pageNo: this.pageNo, pageSize: this.pageSize })
.then(res => {
// 初始话表格数据
this.dataOption = res.data.data;
......
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 to comment