Commit fe673e18 authored by 燕南天's avatar 燕南天

后台修改

parent 0b646031
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<title>xule_pro</title>
</head>
......
const host = " http://47.105.32.6:8990/storeSystem"
// const host = "http://192.168.1.100:8080/store-system"
export default host
\ No newline at end of file
......@@ -11,7 +11,7 @@ export function storeDetails(data) {
export function searchWorkerResult(data) {
return request({
url: '/h5/index/searchWorkerResult',
url: '/h5/index/workers',
method: 'post',
data:qs.stringify(data)
})
......
......@@ -15,11 +15,12 @@
<span>请选择地址</span>
<span class="choose-btn confirm" @click="handleConfirm">确定</span>
</div>
<div class="radio" v-for="(item,idx) in seach" :key="idx">
<input :id="item.codeC" name='chooseCity' type="radio" :value="item" v-model="cityItem">
<label :for="item.codeC"><span>{{item.name}}</span></label>
<div class="select-item">
<div class="radio" v-for="(item,idx) in seach" :key="idx">
<input :id="item.codeC" name='chooseCity' type="radio" :value="item" v-model="cityItem">
<label :for="item.codeC"><span>{{item.name}}</span></label>
</div>
</div>
</div>
</div>
......@@ -43,7 +44,7 @@ export default {
},
beforeMount(){
let obj = {name:'西安',codeC:'610100'}
const cityItem = localStorage.getItem('cityItem')
const cityItem = sessionStorage.getItem('cityItem')
this.cityItem = cityItem?JSON.parse(cityItem):obj
},
methods: {
......@@ -58,7 +59,7 @@ export default {
},
handleConfirm(){
const cityItem = this.cityItem
localStorage.setItem('cityItem',JSON.stringify(cityItem))
sessionStorage.setItem('cityItem',JSON.stringify(cityItem))
this.$emit('emitChangeCity')
},
......@@ -152,11 +153,10 @@ export default {
width: 100%;
left: 0;
background: #fff;
max-height: 400/@r;
overflow-y: auto;
opacity: 0;
bottom: -400/@r;
transition: all .3s;
&.active{
opacity: 1;
bottom: 0;
......@@ -166,12 +166,12 @@ export default {
}
}
.choose-header{
position: fixed;
width: 100%;
// position: fixed;
// width: 100%;
height: 80/@r;
line-height: 80/@r;
left: 0;
bottom: 400/@r;
// left: 0;
// bottom: 400/@r;
background: #de4b4b;
color: #fff;
font-size: 28/@r;
......@@ -179,6 +179,7 @@ export default {
opacity: 0;
bottom:-80/@r;
transition: all .3s;
z-index: 99999;
.cancle,
.confirm{
position: absolute;
......@@ -192,6 +193,13 @@ export default {
padding-right: 20/@r;
}
}
.select-item{
max-height: 400/@r;
overflow-y: auto;
}
// 自定义多选框的样式
label {
margin: 0;
......
......@@ -61,7 +61,7 @@ export default {
getPageData(cb) {
const cityItem = localStorage.getItem('cityItem')
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
const getAdvertList = () => {
......@@ -77,7 +77,7 @@ export default {
};
const getWorkerList = () => {
home.getWorkerList({}).then(res => {
home.getWorkerList({cityId:code}).then(res => {
this.staffData = res.data;
});
};
......@@ -95,7 +95,7 @@ export default {
changeCityGetPgeData(){
const cityItem = localStorage.getItem('cityItem')
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
const getStoreList = () => {
home.getStoreList({cityId:code}).then(res => {
......@@ -103,15 +103,15 @@ export default {
});
};
// const getWorkerList = () => {
// home.getWorkerList({cityId:code}).then(res => {
// this.staffData = res.data;
// });
// };
const getWorkerList = () => {
home.getWorkerList({cityId:code}).then(res => {
this.staffData = res.data;
});
};
axios.all([getStoreList()]).then((s, f) => {
axios.all([getStoreList(),getWorkerList()]).then((s, f) => {
this.$refs.chanceCity.handleCancle()
});
}
......
......@@ -78,7 +78,7 @@ export default {
},
methods: {
taggleModelFun() {
const cityItem = localStorage.getItem('cityItem')
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
this.getChooseData(code,() => {
this.show = !this.show;
......
......@@ -28,10 +28,10 @@ export default {
},
beforeMount(){
const name = this.$route.query
const cityItem = localStorage.getItem('cityItem')
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
let param
if(name){
let param;
if(name.hasOwnProperty('storeName')){
param = {
storeName:name.storeName
}
......
......@@ -28,7 +28,10 @@ export default {
};
},
beforeMount(){
this.getPageData({})
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
this.getPageData({cityId:code})
},
methods:{
toWorkerDetails(id){
......@@ -42,6 +45,9 @@ export default {
},
handleChooseSuccess(data){
const cityItem = sessionStorage.getItem('cityItem')
let code = cityItem?JSON.parse(cityItem).codeC:'610100'
data.cityId = code
this.getPageData(data,()=>{
this.$refs.chooseMore.handleCancle()
})
......
......@@ -62,7 +62,7 @@ export const asyncRouterMap = [
redirect: '/store/storeList',
meta: {
title: '店铺管理',
icon: 'cheliang'
icon: 'commpany'
},
children: [
{ path: 'storeList', component: _import('store/storeList'), name: 'store_storeList', meta: { title: '店铺列表' }}
......@@ -77,7 +77,7 @@ export const asyncRouterMap = [
redirect: '/advert/advertList',
meta: {
title: '运营管理',
icon: 'cheliang'
icon: 'yunying'
},
children: [
{ path: 'advertList', component: _import('advert/advertList'), name: 'advert_advertList', meta: { title: '活动列表' }}
......@@ -92,7 +92,7 @@ export const asyncRouterMap = [
redirect: '/administrators/administratorstList',
meta: {
title: '店铺管理员',
icon: 'cheliang'
icon: 'fangkeshuxing'
},
children: [
{ path: 'administratorstList', component: _import('administrators/administratorstList'), name: 'administrators_administratorstList', meta: { title: '店铺管理员列表' }}
......@@ -107,7 +107,7 @@ export const asyncRouterMap = [
redirect: '/worker/workerList',
meta: {
title: '员工管理',
icon: 'cheliang'
icon: 'fangkeshuxing'
},
children: [
{ path: 'workerList', component: _import('worker/workerList'), name: 'worker_workerList', meta: { title: '员工列表' }}
......
......@@ -15,33 +15,6 @@
<el-col :span="17"><el-input placeholder="请输入关键字" v-model="seacherParam.advertTitle" @keyup.enter.native="seachFun"></el-input></el-col>
</el-col>
<el-col :span="4" :lg="6" :md="6" :sm="8">
<el-col class="input-name" :span="7">启用状态</el-col>
<el-col :span="17" style="line-height:40px">
<el-select v-model="seacherParam.isAvailable" placeholder="请选择">
<el-option
v-for="item in isAvailableData"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-col>
</el-col>
<!-- <el-col :span="4">
<el-col class="input-name" :span="7">审核状态</el-col>
<el-col :span="17" style="line-height:40px">
<el-select v-model="seacherParam.censorStatus" placeholder="请选择">
<el-option
v-for="item in censorStatusData"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-col>
</el-col> -->
</el-row>
</el-card>
<el-card>
......@@ -58,7 +31,7 @@
<el-table-column label="活动标题">
<template slot-scope="scope">
<span>{{`${scope.row.advertTitle}-${scope.row.advertTitle}` || '暂无数据'}}</span>
<span>{{scope.row.advertTitle}}</span>
</template>
</el-table-column>
<el-table-column prop="linkUrl" label="链接地址"></el-table-column>
......@@ -88,29 +61,11 @@
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" circle class="table-icon" @click="check(scope.row)"><i class="iconfont icon-chakan"></i></el-button>
<el-button v-if="scope.row.isAvailable===0" type="primary" icon="el-icon-edit" circle class="table-icon" @click="edit(scope.row)"></el-button>
<!-- <el-popover
v-if="scope.row.censorStatus!=1"
placement="top"
trigger="hover"
width="240"
v-model="scope.row.delState1">
<p style="margin-bottom:10px;font-weight:700;">审核</p>
<div style="padding:10px 0;">
<template>
<el-radio v-model="censorStatus" :label="1">已审核</el-radio>
<el-radio v-model="censorStatus" :label="2">未通过</el-radio>
</template>
</div>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.delState1 = false">取消</el-button>
<el-button type="primary" size="mini" @click="handleCensor(scope.row)">确定</el-button>
</div>
<el-button slot="reference" type="warning" circle icon="el-icon-setting" class="table-icon popver-btn"></el-button>
</el-popover> -->
<el-button type="primary" icon="el-icon-edit" circle class="table-icon" @click="edit(scope.row)"></el-button>
<el-popover
v-if="scope.row.censorStatus==1&&scope.row.isAvailable==0"
v-if="scope.row.isAvailable==0"
placement="top"
width="160"
trigger="hover"
......@@ -125,7 +80,7 @@
</el-popover>
<el-popover
v-if="scope.row.censorStatus==1&&scope.row.isAvailable==1"
v-if="scope.row.isAvailable==1"
placement="top"
width="160"
trigger="hover"
......@@ -201,7 +156,7 @@
:viewUrl="this.dialogBindData.advertPicUrl"
@emitSuccess="handleImgLoad">
</up-load-img>
<img @click="magnify(dialogBindData.advertPicUrl)" v-else :src="dialogBindData.advertPicUrl" width="246" height="144">
<img v-else :src="dialogBindData.advertPicUrl" width="246" height="144">
</el-col>
</el-row>
......@@ -252,7 +207,8 @@ export default {
advertTitle: "",
advertName: "",
isAvailable: null,
censorStatus: null
censorStatus: null,
advertPicUrl:''
},
isAvailableData: [
{ code: 1, name: "已启用" },
......@@ -277,21 +233,6 @@ export default {
// ---------------------------------------查看和编辑dialog--------------------------------
dialogState: false,
dialogType: 1, // 1--增加 2--编辑 3--查看
//dialog弹框绑定数据
// createTime:1527314737000
// createTimeEnd:null
// createTimeStart:null
// isVailable:
// memo:"日常拜访"
// operatorId:null
// operatorType:null
// pk:"1001"
// updateTime:null
// updateTimeEnd:null
// updateTimeStart:null
// visitReason:"日常拜访"
// visitReasonId:"1001"
dialogBindData: {
advertId: "",
......@@ -379,39 +320,17 @@ export default {
}
},
submmitFun() {
// if (this.dialogType === 1) {
// alert(`添加${JSON.stringify(this.dialogBindData)}`);
// } else {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`);
// }
// 发送添加请求
const param = {
advertId: this.dialogBindData.advertId,
advertType: 1,
// advertName: this.dialogBindData.advertName,
advertTitle: this.dialogBindData.advertTitle,
// advertSubtitle: this.dialogBindData.advertSubtitle,
advertContent: this.dialogBindData.advertContent,
advertPicUrl:
this.dialogBindData.advertType == 2
? null
: this.dialogBindData.advertPicUrl,
advertPicUrl:this.dialogBindData.advertPicUrl,
censorStatus: 1,
isAvailable: 1,
linkUrl: this.dialogBindData.linkUrl
};
const isSubmitActive =
param.advertType &&
// param.advertName &&
param.advertTitle &&
// param.advertSubtitle &&
(param.advertPicUrl === null
? true
: this.dialogBindData.advertPicUrl) &&
param.advertContent;
if (isSubmitActive) {
this.submmitSuccess = true;
this.submmitSuccess = true;
adver.addOrEditAdvert(param).then(res => {
this.getList(() => {
this.$message({
......@@ -422,12 +341,6 @@ export default {
this.handleClose();
});
});
} else {
this.$message({
message: "请完善提交信息",
type: "warning"
});
}
},
//关闭弹框
handleClose() {
......@@ -486,7 +399,6 @@ export default {
},
// 改变启用状态
handleIsVailable(data) {
console.log(data.isAvailable);
const param = {
advertId: data.advertId,
isAvailable: data.isAvailable ? 1 : 0
......@@ -513,7 +425,7 @@ export default {
},
// 上传图片成功
handleImgLoad(data) {
this.dialogBindData.advertPicUrl = data.url;
this.dialogBindData.advertPicUrl = data;
},
viewCensorStatus(code) {
if (code == 0) {
......@@ -524,24 +436,8 @@ export default {
return "未通过";
}
},
// 审核函数
handleCensor(data) {
const param = {
advertId: data.advertId,
censorStatus: this.censorStatus
};
adver.addOrEditAdvert(param).then(res => {
if (res.data.code === "1") {
this.getList(() => {
this.$message({
message: "审核完成",
type: "success"
});
this.submmitSuccess = false;
});
}
});
},
// 启用停用
handleUserState(data) {
const param = {
......
......@@ -24,7 +24,7 @@
</div>
<div class="table-wrapper">
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="serialNumber" label="推荐序号" sortable></el-table-column>
<el-table-column prop="storeName" label="店铺名称"></el-table-column>
<el-table-column prop="contactNumber" label="联系电话"></el-table-column>
......@@ -70,7 +70,7 @@
</template>
</el-table-column>
<!-- <el-table-column prop="memo" label="备注"></el-table-column> -->
......@@ -80,7 +80,9 @@
<el-button type="primary" icon="el-icon-edit" circle class="table-icon" @click="edit(scope.row)"></el-button>
<!-- 推荐 -->
<el-button v-if="scope.row.isAuditing==1 && scope.row.isShopping==1" type="primary" icon="el-icon-edit" circle class="table-icon" @click="handleRecommendFun(scope.row)"></el-button>
<el-button v-if="scope.row.isAuditing==1 && scope.row.isShopping==1" type="success" circle class="table-icon" @click="handleRecommendFun(scope.row)"><i class="iconfont icon-tijiao"></i></el-button>
<!-- 删除 -->
......@@ -93,7 +95,7 @@
<el-button size="mini" type="text" @click="scope.row.delState = false">取消</el-button>
<el-button type="primary" size="mini" @click="del(scope.row)">确定</el-button>
</div>
<el-button slot="reference" type="warning" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
<el-button slot="reference" type="danger" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
</el-popover>
<!-- 审核 -->
......@@ -107,7 +109,7 @@
<el-button size="mini" type="text" @click="scope.row.delState1 = false">取消</el-button>
<el-button type="primary" size="mini" @click="handleAuditFun(scope.row)">通过</el-button>
</div>
<el-button slot="reference" type="warning" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
<el-button slot="reference" type="warning" circle icon="el-icon-setting" class="table-icon popver-btn"></el-button>
</el-popover>
......@@ -593,7 +595,9 @@ export default {
);
param.matureTime = this.fattTime(this.dialogBindData.matureTime);
param.administratorsName = this.buildManagerName(this.managerData,this.dialogBindData.administratorsId)
if(this.dialogType==1){
param.serialNumber = 99
}
this.submmitSuccess = true;
store.addOrEditStore(param).then(res => {
this.getList(() => {
......@@ -645,6 +649,7 @@ export default {
.then(res => {
// 初始话表格数据
this.dataOption = res.data.data;
// 初始化分页数据
this.rowCount = res.data.rowCount;
this.pageSize = res.data.pageSize;
......
......@@ -355,7 +355,7 @@ export default {
},
check(data) {
this.dialogType = 3;
this.getSectionsByDeptId(data.deptId, () => {
this.getRoleAndUserData(() => {
this.reBindData(data);
this.dialogState = true;
});
......
......@@ -10,7 +10,7 @@
</div>
<el-row :gutter="15">
<el-col :span="4">
<el-col class="input-name" :span="7">维修工名称</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>
......@@ -25,7 +25,7 @@
<div class="table-wrapper">
<el-table empty-text="暂无数据" :stripe="true" :data="dataOption" v-loading="!dataOption">
<el-table-column prop="serialNumber" label="推荐序号" sortable></el-table-column>
<el-table-column prop="workerNumber" label="工号"></el-table-column>
<el-table-column prop="workerName" label="姓名"></el-table-column>
<el-table-column label="性别">
......@@ -66,15 +66,14 @@
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button type="primary" circle class="table-icon" @click="check(scope.row)"><i class="iconfont icon-chakan"></i></el-button>
<el-button type="primary" icon="el-icon-edit" circle class="table-icon" @click="edit(scope.row)"></el-button>
<!-- 推荐 -->
<el-button v-if="scope.row.isAuditing==1 && scope.row.isShopping==1" type="primary" icon="el-icon-edit" circle class="table-icon" @click="handleRecommendFun(scope.row)"></el-button>
<el-button v-if="scope.row.isAuditing==1 && scope.row.isShopping==1" type="success" circle class="table-icon" @click="handleRecommendFun(scope.row)"><i class="iconfont icon-tijiao"></i></el-button>
<!-- 删除 -->
<el-popover
......@@ -86,7 +85,7 @@
<el-button size="mini" type="text" @click="scope.row.delState = false">取消</el-button>
<el-button type="primary" size="mini" @click="del(scope.row)">确定</el-button>
</div>
<el-button slot="reference" type="warning" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
<el-button slot="reference" type="danger" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
</el-popover>
<!-- 审核 -->
......@@ -100,7 +99,7 @@
<el-button size="mini" type="text" @click="scope.row.delState1 = false">取消</el-button>
<el-button type="primary" size="mini" @click="handleAuditFun(scope.row)">通过</el-button>
</div>
<el-button slot="reference" type="warning" circle icon="el-icon-delete" class="table-icon popver-btn"></el-button>
<el-button slot="reference" type="warning" circle icon="el-icon-setting" class="table-icon popver-btn"></el-button>
</el-popover>
</template>
</el-table-column>
......@@ -471,6 +470,10 @@ export default {
this.dialogBindData.storeId
);
param.matureTime = this.fattTime(this.dialogBindData.matureTime);
if(this.dialogType==1){
param.serialNumber = 99
}
this.submmitSuccess = true;
worker.addOrEditWorker(param).then(res => {
......
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