Merge branch '20120518-daili' into dev
3 files added
9 files modified
| | |
| | | storeStoreList(data) { |
| | | return $http.post('/store/storeList', data); |
| | | }, |
| | | storeStorePersonList(data) { |
| | | return $http.post('/agency/userList', data); |
| | | }, |
| | | //门店详情 |
| | | storeDtl(data) { |
| | | return $http.post('/store/dtl', data); |
| | |
| | | storeAdd(data) { |
| | | return $http.post('/store/add', data); |
| | | }, |
| | | |
| | | agencyAddUser(data){ |
| | | return $http.post('/agency/addUser', data); |
| | | }, |
| | | |
| | | |
| | | |
| | |
| | | }else{ |
| | | var appToken = str |
| | | } |
| | | |
| | | } |
| | | } |
| | | console.log('token:',localStorage.hjToken) |
| | | let user_pwd = localStorage.user_pwd; |
| | | let hjToken = localStorage.hjToken; |
| | | // let appToken = sessionStorage.appToken; |
| | |
| | | name:'stores-detail', |
| | | component:()=>import("@/views/mine/stores/stores-detail.vue") |
| | | }, |
| | | |
| | | { |
| | | path:"/order/wxScore", |
| | | name:'order-wxScore', |
| | | component:()=>import("@/views/order/wxScore.vue") |
| | | path:"/mine/storesOprs", |
| | | name:'storeOprs', |
| | | component:()=>import("@/views/mine/stores/storeOprs.vue") |
| | | }, |
| | | { |
| | | path:"/mine/storeOprs-add", |
| | | name:'stores-add', |
| | | component:()=>import("@/views/mine/stores/storeOprs-add.vue") |
| | | }, |
| | | { |
| | | path:"/mine/storeOprs-detail", |
| | | name:'stores-detail', |
| | | component:()=>import("@/views/mine/stores/storeOprs-detail.vue") |
| | | }, |
| | | //和微分 |
| | | { |
| | |
| | | component:()=>import("@/views/old/store/wx-pay-score.vue") |
| | | }, |
| | | { |
| | | path:"/order/wxScore", |
| | | name:'order-wxScore', |
| | | component:()=>import("@/views/order/wxScore.vue") |
| | | }, |
| | | { |
| | | path:"/order/wxScore", |
| | | name:'order-wxScore', |
| | | component:()=>import("@/views/order/wxScore.vue") |
| | | }, |
| | | // 添加店员 |
| | | { |
| | | path:"/wx-test-code", |
| | | name:'wxTestCode', |
| | | component:()=>import("@/views/old/store/wx-test-code.vue") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | commit(SET_FOOTER_NAV, footernav); |
| | | commit(SET_USER_PAGE, userPage); |
| | | commit(SET_USER_INFO, data.body); |
| | |
| | | <use xlink:href="#iconshanghuguanliliebiao"></use> |
| | | </svg> |
| | | </div> |
| | | <div> |
| | | <div style="width:120px"> |
| | | <p class="name" v-text="item.merName">商户名称</p> |
| | | <p class="tel" v-text="item.priMblNo">未配置产品</p> |
| | | <p class="tel" v-text="item.hbStatusName"></p> |
| | | </div> |
| | | </div> |
| | | <van-button :style="{background:$store.state.backColor}" class="btn" @click.stop="goStoreMer(item.merId)" v-if="orgType != 2">门店管理</van-button> |
| | | <van-button :style="{background:$store.state.backColor}" class="btn" @click.stop="goTempDetail(item.merId)" v-if="orgType != 2">产品管理</van-button> |
| | | </div> |
| | | </div> |
| | |
| | | goMerDetail(merId){ |
| | | this.$router.push({ |
| | | path:'/mine/mer-info', |
| | | query:{ |
| | | merId |
| | | } |
| | | }) |
| | | }, |
| | | //跳转到模板详情 |
| | | goStoreMer(merId){ |
| | | this.$router.push({ |
| | | path:'/mine/stores', |
| | | query:{ |
| | | merId |
| | | } |
| | |
| | | |
| | | .name { |
| | | font-weight: bold; |
| | | max-width: 170px; |
| | | max-width: 120px; |
| | | } |
| | | |
| | | .tel { |
| | |
| | | |
| | | .btn { |
| | | .lh(25px); |
| | | margin-right: 0px; |
| | | padding: 0 12px; |
| | | background: @c-bg-default; |
| | | border-radius: 13px; |
New file |
| | |
| | | |
| | | <!-- |
| | | 新增门店 |
| | | --> |
| | | |
| | | <template> |
| | | <div class="stores-add-box h-100-g"> |
| | | |
| | | <v-navbar title="新增店员" fixed></v-navbar> |
| | | <div class="cell-group"> |
| | | <v-cell v-model="form.priName" :max="6" label='负责人姓名' placeholder='请输入负责人姓名'></v-cell> |
| | | <v-cell v-model="form.priMblNo" :max="11" type="tel" label='负责人手机号' placeholder='请输入负责人手机号'></v-cell> |
| | | </div> |
| | | <p class="tip">*该手机号将作为登录用户名,密码将通过短信发至手机</p> |
| | | <div class="cell-group"> |
| | | <v-cell v-model="form.priEmail" :max="50" label='联系邮箱' placeholder='请输入邮箱地址'></v-cell> |
| | | </div> |
| | | |
| | | <footer class="flex-center-g footer"> |
| | | <van-button class="btn" @click="addStore">新增店员</van-button> |
| | | </footer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex'; |
| | | export default { |
| | | name: "stores-add", |
| | | data(){ |
| | | return { |
| | | queryStoreId:"", |
| | | isShowArea:false, |
| | | Btn:false, |
| | | form:{ |
| | | priName:'', //负责人姓名 |
| | | priEmail:'', //联系邮箱 |
| | | priMblNo:'', //负责人手机 |
| | | }, |
| | | |
| | | rule:[ |
| | | {key:"priName",message:"请输入负责人姓名",type:"isEmpty"}, |
| | | {key:"priName",message:"请输入正确的负责人姓名",rule:/^[\u4e00-\u9fa50-9a-zA-Z]{1,6}$/}, |
| | | {key:"priMblNo",message:"请输入负责人手机号",type:"isEmpty"}, |
| | | {key:"priMblNo",message:"请输入正确的手机号",type:"isTel"}, |
| | | {key:"priEmail",message:"请输入联系邮箱",type:"isEmpty"}, |
| | | {key:"priEmail",message:"请输入正确的联系邮箱",type:"isEmail"}, |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapState(['areaList']) |
| | | }, |
| | | created() { |
| | | this.queryStoreId =this.$route.query.storeId; |
| | | }, |
| | | methods:{ |
| | | // 验证form参数 |
| | | validatorForm(){ |
| | | return this.$validator(this.form,this.rule).check(item=>{ |
| | | this.$notify(item.message) |
| | | }) |
| | | }, |
| | | // 新增门店 |
| | | addStore(){ |
| | | if(!this.validatorForm()) return |
| | | if(this.Btn)return |
| | | let list = { |
| | | name: this.form.priName, |
| | | mblNo: this.form.priMblNo, |
| | | email: this.form.priEmail, |
| | | orgId:this.queryStoreId |
| | | }; |
| | | this.$api.agencyAddUser(list).then(() => { |
| | | this.$notify('新增成功'); |
| | | this.Btn = true; |
| | | setTimeout(() => this.$router.go(-1), 1000); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .stores-add-box{ |
| | | background-color: @c-bg-f5; |
| | | padding-top: 44px; |
| | | .tip { |
| | | margin: 10px 0 15px 21px; |
| | | font-size: @font-12; |
| | | color: @c-text-999; |
| | | } |
| | | } |
| | | |
| | | |
| | | .cell-group { |
| | | margin: 10px 8px 0; |
| | | } |
| | | |
| | | .btn { |
| | | width: 340px; |
| | | height: 44px; |
| | | border: none; |
| | | font-size: @font-16; |
| | | border-radius: 22px; |
| | | background-color: @c-bg-default; |
| | | color: @c-text-fff; |
| | | |
| | | } |
| | | |
| | | .footer { |
| | | margin-top: 60px; |
| | | padding-bottom: 30px; |
| | | } |
| | | |
| | | |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div class="stores-detail h-100-g"> |
| | | |
| | | <v-navbar title="店员详情" fixed rightText='保存' @right-click="Save"></v-navbar> |
| | | <div class="cell-group"> |
| | | <v-cell v-model="form.priName" :max="6" label='负责人姓名' :readonly="true" placeholder='负责人姓名'></v-cell> |
| | | <v-cell v-model="form.priMblNo" :max="11" type="tel" label='负责人手机号' :readonly="true" placeholder='负责人手机号'></v-cell> |
| | | <v-cell v-model="form.priEmail" :max="50" label='联系邮箱' placeholder='联系邮箱'></v-cell> |
| | | </div> |
| | | <footer class="flex-center-g footer"> |
| | | <van-button class="btn" @click="freeze">{{menText}}</van-button> |
| | | </footer> |
| | | <van-dialog |
| | | class="setting-box-dialog" |
| | | v-model="dialogShow" |
| | | show-cancel-button |
| | | :message='Msg' |
| | | @confirm="onConfirm" |
| | | > |
| | | </van-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex'; |
| | | export default { |
| | | name: "stores-detail", |
| | | data(){ |
| | | return { |
| | | isShowArea:false, |
| | | dialogShow:false, |
| | | menText:'冻结店员', |
| | | Status:null, |
| | | Msg:'', |
| | | Btn:false, |
| | | form:{ |
| | | priName:'', //负责人姓名 |
| | | priEmail:'', //联系邮箱 |
| | | priMblNo:'', //负责人手机号 |
| | | }, |
| | | rule:[ |
| | | {key:"priEmail",message:"请输入邮箱",type:"isEmpty"}, |
| | | ] |
| | | } |
| | | }, |
| | | created(){ |
| | | this.init(); |
| | | }, |
| | | methods:{ |
| | | init(){ |
| | | let mgrId =this.$route.query.mgrId; |
| | | this.$api.getUserDetail(mgrId).then((res) => { |
| | | let data = res.body; |
| | | this.Status = data.status; |
| | | data.status ? this.menText = '冻结店员':this.menText = '启用店员'; |
| | | this.form = { |
| | | priName:data.name, //负责人姓名 |
| | | priEmail:data.email, //联系邮箱 |
| | | priMblNo:data.mblNo //负责人手机 |
| | | } |
| | | }) |
| | | }, |
| | | freeze(){ |
| | | this.dialogShow = !this.dialogShow; |
| | | this.Msg = `请问是否确认${this.Status ? '冻结' : '启用'}该店员?`; |
| | | }, |
| | | |
| | | //冻结/启用 门店 |
| | | onConfirm() { |
| | | if(this.Btn2){return} |
| | | this.Btn2 = true; |
| | | this.$api.userFreezeMgr(this.$route.query.mgrId).then((res) => { |
| | | this.Btn2 = false; |
| | | this.$notify_success(`${ this.Status ? '冻结' : '启用'}店员成功`) |
| | | this.Status = this.Status ? 0 : 1; |
| | | this.menText = this.Status ? '冻结店员' :'启用店员'; |
| | | }); |
| | | }, |
| | | // 保存门店 |
| | | Save(){ |
| | | if(this.Btn){return} |
| | | this.Btn = true; |
| | | let list = { |
| | | name: this.form.priName, |
| | | mblNo: this.form.priMblNo, |
| | | email: this.form.priEmail, |
| | | orgId:this.queryStoreId, |
| | | id:this.$route.query.mgrId |
| | | }; |
| | | if(this.$validator(this.form,this.rule).check(item=>{ |
| | | this.$notify(item.message); |
| | | })){ |
| | | this.$api.userUpdate(list).then((res) => { |
| | | this.Btn = false; |
| | | this.$notify_success('保存成功!'); |
| | | }); |
| | | } |
| | | }, |
| | | //关闭地区弹窗 |
| | | closeAreaModal(){ |
| | | this.isShowArea = false; |
| | | this.$refs.Area.reset() |
| | | }, |
| | | //保存 地区选择 |
| | | setAreaValue(arr){ |
| | | this.form.areaText = arr[0].name + '-' +arr[1].name +'-'+ arr[2].name; |
| | | this.form.provCode= arr[0].code; |
| | | this.form.cityCode= arr[1].code; |
| | | this.form.areaCode= arr[2].code; |
| | | this.isShowArea = false; |
| | | this.$refs.Area.reset() |
| | | }, |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .stores-detail{ |
| | | background-color: @c-bg-f5; |
| | | padding-top: 44px; |
| | | |
| | | .cell-group { |
| | | margin: 10px 8px 0; |
| | | } |
| | | |
| | | .btn { |
| | | width: 340px; |
| | | height: 44px; |
| | | border: none; |
| | | font-size: @font-16; |
| | | border-radius: 22px; |
| | | background-color: @c-bg-default; |
| | | color: @c-text-fff; |
| | | |
| | | } |
| | | |
| | | |
| | | .footer { |
| | | margin-top: 60px; |
| | | padding-bottom: 30px; |
| | | } |
| | | |
| | | } |
| | | </style> |
New file |
| | |
| | | <!-- |
| | | |
| | | 店员管理-主页 |
| | | |
| | | --> |
| | | <template> |
| | | <div class="stores-box h-100-g"> |
| | | <v-navbar title="店员管理" fixed></v-navbar> |
| | | <van-search class="search" placeholder="负责人姓名/负责人手机号" v-model="value" shape='round' @search="onSearch"/> |
| | | <div class="item-box"> |
| | | <van-list |
| | | v-model="loading" |
| | | :finished="finished" |
| | | immediate-check='false' |
| | | offset="50" |
| | | finished-text="没有更多了" |
| | | @load="onLoad" |
| | | > |
| | | <div class="stores-item flex-start-g" v-for="(item, index) in list" :key="index" @click="go(item.id)"> |
| | | <p class="icon-box flex-center-g"> |
| | | <svg class="icon" aria-hidden="true" style="width:25px;height:25px;fill:#fff" > |
| | | <use xlink:href="#iconyonghu"></use> |
| | | </svg> |
| | | </p> |
| | | <div> |
| | | <p class="name" v-text="item.name || ''">店员名称</p> |
| | | <p class="c-text-666-g font-12-g" v-text="item.mblNo || ''">13586695442</p> |
| | | </div> |
| | | </div> |
| | | </van-list> |
| | | </div> |
| | | <van-button class="btn" @click="goAdd"> |
| | | <div class="inner"> |
| | | <van-icon name="plus"/> |
| | | <span class="text">新增</span> |
| | | </div> |
| | | </van-button> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "stores", |
| | | data() { |
| | | return { |
| | | value: '', |
| | | list:[], |
| | | loading:false, |
| | | finished:false, |
| | | storeId:'', |
| | | queryStoreId:"" |
| | | } |
| | | }, |
| | | |
| | | created(){ |
| | | this.queryStoreId =this.$route.query.storeId; |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | this.loading = true |
| | | this.$api.storeStorePersonList({ |
| | | searchKey:this.value, |
| | | orgId:this.queryStoreId, |
| | | }).then((res) => { |
| | | if(res.body.length < 10){ |
| | | this.list = [...this.list,...res.body] |
| | | this.storeId = '' |
| | | this.finished = true |
| | | this.loading = false |
| | | }else{ |
| | | this.list = [...this.list,...res.body] |
| | | this.storeId = this.list[this.list.length-1].storeId |
| | | this.finished = false |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | go(id) { |
| | | this.$router.push({path:'/mine/storeOprs-detail',query:{mgrId:id,storeId:this.queryStoreId}}); |
| | | }, |
| | | goAdd(){ |
| | | console.log(this.storeId) |
| | | this.$router.push({path:'/mine/storeOprs-add',query:{storeId:this.queryStoreId}}) |
| | | }, |
| | | onLoad(){ |
| | | this.init() |
| | | }, |
| | | onSearch(val){ |
| | | this.list = [] |
| | | this.loading = true |
| | | this.$api.storeStorePersonList({ |
| | | searchKey:this.value, |
| | | orgId:this.queryStoreId, |
| | | }).then(res=>{ |
| | | if(res.body.length < 10){ |
| | | this.list = [...this.list,...res.body] |
| | | this.storeId = '' |
| | | this.finished = true |
| | | this.loading = false |
| | | }else{ |
| | | this.list = [...this.list,...res.body] |
| | | this.storeId = this.list[this.list.length-1].storeId |
| | | this.finished = false |
| | | this.loading = false |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .stores-box { |
| | | |
| | | background-color: @c-bg-f5; |
| | | padding-top: 44px; |
| | | box-sizing: border-box; |
| | | .btn { |
| | | position: fixed; |
| | | width: 50px; |
| | | height: 50px; |
| | | padding: 0; |
| | | right: 8px; |
| | | bottom: 68px; |
| | | border-radius: 50%; |
| | | color: @c-text-f5; |
| | | z-index: @zIndex-50; |
| | | box-shadow: 0px 5px 9px 0px rgba(80, 47, 183, 0.2); |
| | | background: linear-gradient(0deg, rgba(106, 79, 188, 1), rgba(137, 110, 219, 1)); |
| | | |
| | | .inner { |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .text { |
| | | .lh(15px); |
| | | } |
| | | } |
| | | |
| | | //搜索框 |
| | | .search { |
| | | margin-top: 10px; |
| | | padding: 15px 8px; |
| | | } |
| | | |
| | | |
| | | .item-box { |
| | | background-color: @c-bg-fff; |
| | | padding-bottom: 25px; |
| | | } |
| | | |
| | | |
| | | .stores-item { |
| | | height: 67px; |
| | | margin: 0 8px 10px; |
| | | padding-left: 12px; |
| | | box-shadow: 0px 0px 5px 0px rgba(66, 61, 93, 0.08); |
| | | border-radius: 3px; |
| | | |
| | | .icon-box { |
| | | width: 32px; |
| | | height: 32px; |
| | | margin-right: 15px; |
| | | border-radius: 50%; |
| | | background-color: @c-bg-black; |
| | | } |
| | | |
| | | .name { |
| | | margin-bottom: 5px; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |
| | |
| | | return { |
| | | isShowArea:false, |
| | | Btn:false, |
| | | |
| | | form:{ |
| | | areaText:'', //地区文字展示 |
| | | storeName:'', //门店名称 |
| | |
| | | ...mapState(['areaList']) |
| | | }, |
| | | created() { |
| | | this.merId = this.$route.query.merId; |
| | | }, |
| | | methods:{ |
| | | // 验证form参数 |
| | |
| | | priIdNo: this.form.priIdNo, |
| | | outChanNo: this.form.outChanNo, |
| | | }; |
| | | |
| | | if(this.merId){ |
| | | list.merId = this.merId; |
| | | } |
| | | this.$api.storeAdd(list).then(() => { |
| | | this.$notify('新增成功'); |
| | | this.Btn = true; |
| | |
| | | --> |
| | | <template> |
| | | <div class="stores-box h-100-g"> |
| | | |
| | | <v-navbar title="门店管理" fixed></v-navbar> |
| | | <van-search class="search" placeholder="请输入门店名称/负责人姓名/负责人手机号" v-model="value" shape='round' @search="onSearch"/> |
| | | <div class="item-box"> |
| | |
| | | <p class="name" v-text="item.storeName || ''">门店名称</p> |
| | | <p class="c-text-666-g font-12-g" v-text="item.priMblNo || ''">13586695442</p> |
| | | </div> |
| | | <van-button :style="{background:$store.state.backColor}" class="opr-btn" @click.stop="goStoreOprs(item.storeId)" v-if="orgType != 2">店员管理</van-button> |
| | | </div> |
| | | </van-list> |
| | | </div> |
| | | |
| | | <van-button class="btn" @click="$router.push('/mine/stores-add')"> |
| | | <van-button class="btn" @click="$router.push(`/mine/stores-add?merId=${merId}`)"> |
| | | <div class="inner"> |
| | | <van-icon name="plus"/> |
| | | <span class="text">新增</span> |
| | |
| | | list:[], |
| | | loading:false, |
| | | finished:false, |
| | | storeId:'' |
| | | storeId:'', |
| | | merId:'', |
| | | } |
| | | }, |
| | | |
| | | created(){ |
| | | this.merId = this.$route.query.merId; |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | console.log("merId:"+this.merId); |
| | | this.loading = true |
| | | this.$api.storeStoreList({ |
| | | searchKey:this.value, |
| | | storeId:this.storeId, |
| | | merId:this.merId, |
| | | }).then((res) => { |
| | | if(res.body.storeList.length < 10){ |
| | | this.list = [...this.list,...res.body.storeList] |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | goStoreOprs(storeId){ |
| | | this.$router.push({ |
| | | path:'/mine/storesOprs', |
| | | query:{ |
| | | storeId:storeId |
| | | } |
| | | }) |
| | | }, |
| | | go(id) { |
| | | this.$router.push({path:'/mine/stores-detail',query:{storeId:id}}); |
| | | }, |
| | |
| | | this.loading = true |
| | | this.$api.storeStoreList({ |
| | | searchKey:this.value, |
| | | merId:this.merId, |
| | | }).then(res=>{ |
| | | if(res.body.storeList.length < 10){ |
| | | this.list = [...this.list,...res.body.storeList] |
| | |
| | | .name { |
| | | margin-bottom: 5px; |
| | | font-weight: bold; |
| | | width:200px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .opr-btn { |
| | | .lh(25px); |
| | | margin-right: 0px; |
| | | padding: 0 12px; |
| | | background: @c-bg-default; |
| | | border-radius: 13px; |
| | | color: @c-text-fff; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .name { |
| | | width: 200px; |
| | | font-size: @font-16; |
| | | font-weight: bold; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .time { |