Commit 5deb5bc7 authored by 石盼盼's avatar 石盼盼
parents 843438c6 d7f3d801
...@@ -26,6 +26,7 @@ export default { ...@@ -26,6 +26,7 @@ export default {
// 登录相关 // 登录相关
SENDCODE: baseUrl + '/worker/send', // 发送验证码 SENDCODE: baseUrl + '/worker/send', // 发送验证码
BINDLOGIN: baseUrl + '/worker/bind/login', // 手机号验证码登录绑定微信 BINDLOGIN: baseUrl + '/worker/bind/login', // 手机号验证码登录绑定微信
REFRESHTOKEN: baseUrl + '/worker/change/token',
USERINFO: baseUrl + '/worker/user/info', // 获取用户信息 USERINFO: baseUrl + '/worker/user/info', // 获取用户信息
REPAIR_LIST: baseUrl + '/worker/repair/list', // 工人/审核员端报修单列表 REPAIR_LIST: baseUrl + '/worker/repair/list', // 工人/审核员端报修单列表
......
...@@ -5,14 +5,15 @@ export function updateToken (cb, errcb) { ...@@ -5,14 +5,15 @@ export function updateToken (cb, errcb) {
.post(apiList.REFRESHTOKEN, null, { .post(apiList.REFRESHTOKEN, null, {
headers: { headers: {
token: window.localStorage.getItem('token'), token: window.localStorage.getItem('token'),
type: 1 // type: 1
} }
}) })
.then((response) => { .then((response) => {
console.log(response, 'response--------')
if (response.status === 200) { if (response.status === 200) {
const curdata = response.data const curdata = response.data
const code = curdata.code const code = curdata.meta.code
const msg = curdata.msg const msg = curdata.meta.message
console.log('换取token ' + code + ' --- ' + msg) console.log('换取token ' + code + ' --- ' + msg)
if (code === 200) { if (code === 200) {
window.localStorage.setItem('token', curdata.data.token) window.localStorage.setItem('token', curdata.data.token)
...@@ -22,7 +23,7 @@ export function updateToken (cb, errcb) { ...@@ -22,7 +23,7 @@ export function updateToken (cb, errcb) {
typeof cb === 'function' && cb() typeof cb === 'function' && cb()
} else { } else {
console.log('token换取失败-------', curdata) console.log('token换取失败-------', curdata)
// typeof errcb === 'function' && errcb(curdata) typeof errcb === 'function' && errcb(curdata)
} }
} }
}) })
......
@import "../global.scss"; @import "../global.scss";
.cont {
.tips-cont { min-height: 100vh;
@extend .flex-h; background: #fff;
@extend .flex-space-between; padding: 0.4rem 0rem;
width: 100%; }
height: 2.36rem; .top {
background: $color-main; height: 0.36rem;
color: #ffffff; margin-bottom: 0.38rem;
padding: .4rem .3rem .3rem .3rem; margin-left: 0.3rem;
font-size: .28rem; }
.top .point {
.left-cont { width: 0.1rem;
width: 4rem; height: 0.1rem;
background: #0054ff;
.tips-title { border-radius: 50%;
@extend .flex-h; margin-right: 0.13rem;
@extend .flex-align-center; }
font-size: .36rem; .top .status {
margin-bottom: .16rem; color: #0054ff;
font-size: 0.36rem;
img { font-weight: bold;
width: .35rem; }
height: .35rem; .menu .hc_total {
margin-left: .12rem; color: #727272;
vertical-align: middle; font-size: 0.28rem;
} }
} .menu .options {
width: 1.76rem;
.tip-text { height: 0.58rem;
font-size: .32rem; background: #ffffff;
margin-top: .2rem; border: 1px solid #0054ff;
} border-radius: 0.12rem;
} color: #0054ff;
font-size: 0.28rem;
.btn { line-height: 0.58rem;
@extend .flex-h; text-align: center;
@extend .flex-hc; position: relative;
@extend .flex-align-center; z-index: 10;
min-width: 1.6rem; margin-right: 0.3rem;
max-width: 2.5rem; }
height: .46rem; .menu .options .option-box {
border: 1px solid #ffffff; width: 1.7rem;
text-align: center; // height: 2rem;
line-height: .46rem; background: #fff;
border-radius: .25rem; border: 1px solid #0054ff;
font-size: .28rem; position: absolute;
padding: 0 .1rem; top: 0.57rem;
left: 0rem;
p { z-index: 10;
margin-right: .05rem; border-radius: 0 0 0.12rem 0.12rem;
} }
.order-item {
.iconfont { width: 6.9rem;
font-size: .16rem;
}
}
.purchase-btn {
width: 1.88rem;
height: .6rem;
line-height: .6rem;
color: #000000;
background: #FFCA3C;
text-align: center;
line-height: .6rem;
border-radius: .16rem;
margin-top: .56rem;
// &.disabled-btn {
// color: #cccccc;
// background: #aca9a2;
// }
&.disabled-btn {
opacity: 0.6;
}
}
}
.content {
padding: .1rem .3rem;
background: #ffffff; background: #ffffff;
margin-top: .12rem; box-shadow: 0px 0px 0.12rem 0.01rem rgba(214, 214, 214, 0.78);
border-radius: 0.12rem;
margin: 0.4rem auto 0.2rem;
padding: 0.4rem 0.3rem;
font-size: 0.3rem;
} }
.title {
.placeholder-view { color: #0054ff;
font-size: 0.32rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
.item {
// height: 0.3rem;
margin-bottom: 0.2rem;
}
.item-title {
// min-width: 1.5rem;
color: #000000;
}
.item-desc {
color: #727272;
}
.que-desc {
margin: .2rem auto;
}
.img {
width: 1.2rem;
height: 1.2rem;
border-radius: 0.08rem;
margin-top: 0.08rem;
}
.img img {
width: 100%; width: 100%;
height: 2rem; height: 100%;
border-radius: 0.08rem;
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.list-item {
margin-bottom: 0.4rem;
}
.line {
width: 6.28rem;
height: 0.01rem;
background: #f1f1f1;
margin-bottom: 0.4rem;
}
.ma-item {
margin-top: 0.3rem;
}
.one {
color: #727272;
margin-bottom: 0.3rem;
}
.one-item {
margin-left: 0.3rem;
margin-right: 0.3rem;
}
.btn-item {
width: 1.8rem;
height: 0.7rem;
background: #0054ff;
border-radius: 0.35rem;
text-align: center;
line-height: 0.7rem;
color: #fff;
font-size: 0.27rem;
margin-left: 0.2rem;
}
.sf-btn {
background: #ffffff; background: #ffffff;
border: 1px solid #0054ff;
color: #0054ff;
}
.blank {
height: 1rem;
}
.van-popup {
width: 6.9rem;
max-height: 7rem;
// height: 5.9rem;
background: #fff;
border-radius: 0.12rem;
padding-top: 0.4rem;
padding-bottom: 0.2rem;
text-align: center;
}
.pop_title {
color: #000000;
font-size: 0.36rem;
font-weight: bold;
margin-bottom: 0.4rem;
}
.van-popup textarea {
width: 6.3rem;
height: 3rem;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
padding: 0.3rem 0.2rem;
}
.van-popup textarea::-webkit-input-placeholder {
color: #c8c8c8;
font-size: 0.26rem;
}
.btnItem {
margin-top: 0.4rem;
margin-left: 0.65rem;
}
.btnItem .cancel {
width: 2.65rem;
height: 0.78rem;
border: 1px solid #c8c8c8;
border-radius: 0.39rem;
color: #000000;
font-size: 0.32rem;
text-align: center;
line-height: 0.78rem;
margin-right: 0.3rem;
}
.btnItem .sure {
width: 2.65rem;
height: 0.78rem;
background: linear-gradient(270deg, #0054ff, #1965ff);
border-radius: 0.39rem;
color: #ffffff;
font-size: 0.32rem;
text-align: center;
line-height: 0.78rem;
margin-right: 0.3rem;
}
.input {
width: 6.3rem;
height: 0.76rem;
background: #ffffff;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
text-align: left;
padding-left: 0.2rem;
margin-bottom: 0.1rem;
font-size: 0.3rem;
}
.input::-webkit-input-placeholder {
color: #c8c8c8;
font-size: 0.3rem;
}
.math-btn {
margin-left: 0.3rem;
margin-right: 0.3rem;
color: #0256ff;
font-size: 0.3rem;
}
.hc_total {
text-align: left;
color: #000000;
font-size: 0.26rem;
margin-left: 0.3rem;
}
.sure-btn {
width: 3.12rem;
height: 0.78rem;
background: linear-gradient(270deg, #0054ff, #1965ff);
border-radius: 0.39rem;
color: #ffffff;
text-align: center;
line-height: 0.78rem;
margin: 1.2rem auto;
} }
\ No newline at end of file
...@@ -5,58 +5,59 @@ ...@@ -5,58 +5,59 @@
<div class="status">工作中</div> <div class="status">工作中</div>
</div> </div>
<div class="menu flex-h flex-hb"> <div class="menu flex-h flex-hb">
<div class="hc_total">{{count}}个工单</div> <div class="hc_total">{{count}}个工单</div>
<div class="options" > <div class="options" >
{{currentName}} <div @click="chooseTab">{{curSelect.name}}</div>
<div class="option-box" v-show="true"> <div class="option-box" v-show="tabShow">
<div <div
class="option-item" class="option-item"
v-for="item in optionList" v-for="item in optionList"
:key="item.time_type" :key="item.type"
:value="item.name" :value="item.name"
@click="changeItem(item.time_type,item.name)" @click="changeItem(item)"
>{{item.name}}</div> >{{item.name}}</div>
</div>
</div> </div>
</div> </div>
</div>
<van-pull-refresh v-model="isloading" @refresh="onRefresh"> <van-pull-refresh v-model="isloading" @refresh="onRefresh">
<div class="order-item" v-for="(item, index) in list" :key="item.id"> <div class="order-item" v-for="(item, index) in list" :key="item.id">
<div class="title">{{item.order_status_display }}</div> <div class="title">{{item.order_status_display }}</div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">预约时间:</div> <div class="item-title">预约时间</div>
<div class="item-desc">{{item.appointment_date}} {{item.appointment_time.start_time}}-{{item.appointment_time.end_time}}</div> <div class="item-desc">{{item.appointment_date}} {{item.appointment_time.start_time}}-{{item.appointment_time.end_time}}</div>
</div> </div>
<div class="item-title">问题描述:</div> <div class="item-title">问题描述</div>
<div class="item-desc que-desc">{{item.description}}</div> <div class="item-desc que-desc">{{item.description}}</div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-start">
<div class="item-title">服务地址:</div> <div class="item-title">服务地址</div>
<div class="item-desc">{{item.region.region_name}}-{{item.room.room_name}}-{{item.address}}</div> <div class="item-desc">{{item.region.region_name}}-{{item.room.room_name}}-{{item.address}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">客户姓名:</div> <div class="item-title">客户姓名</div>
<div class="item-desc">{{item.realname}}</div> <div class="item-desc">{{item.realname}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div> <div class="item-title">联系电话</div>
<div class="item-desc phone">{{item.telephone}}</div> <div class="item-desc phone">{{item.telephone}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div> <div class="item-title">提交时间</div>
<div class="item-desc">{{item.created_at}}</div> <div class="item-desc">{{item.created_at}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-start">
<div class="item-title">图片详情:</div> <div class="item-title">图片详情</div>
<div class="img flex-h" v-for="(child, index) in item.image" :key="index"> <div class="img flex-h" v-for="(child, index) in item.image" :key="index">
<img :src="child.url" alt /> <img :src="child.url" alt />
</div> </div>
</div> </div>
<div class="line"></div> <div class="line"></div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">派工对象:</div> <div class="item-title">派工对象</div>
<div class="item-desc">{{item.worker.name}}</div> <div class="item-desc">{{item.worker.name}}</div>
</div> </div>
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div> <div class="item-title">联系电话</div>
<div class="item-desc">{{item.worker.phone}}</div> <div class="item-desc">{{item.worker.phone}}</div>
</div> </div>
<div class="material" v-if="item.no_pay_order != null" > <div class="material" v-if="item.no_pay_order != null" >
...@@ -166,7 +167,25 @@ export default { ...@@ -166,7 +167,25 @@ export default {
}, },
data () { data () {
return { return {
count: '', // 头部日期范围筛选
tabShow: false, // tab范围选择框是否显示
curSelect: { type: '3', name: '本月' }, // 当前选择的日期范围
optionList: [
{ type: '1', name: '今日' },
{ type: '2', name: '本周' },
{ type: '3', name: '本月' },
{ type: '4', name: '自定义' }
],
// 工单数据
count: '', // 工单总数
list: [], // 列表
isloading: false,
page: 1,
more: true,
locked: false,
limit: 10,
status: {}, // 工作状态
imgList: [], imgList: [],
addList: [ addList: [
{ {
...@@ -174,37 +193,9 @@ export default { ...@@ -174,37 +193,9 @@ export default {
sl: '' sl: ''
} }
], ],
xianshi: false,
currentName: '本月',
optionList: [
{
time_type: '1',
name: '今日'
},
{
time_type: '2',
name: '本周'
},
{
time_type: '3',
name: '本月'
},
{
time_type: '4',
name: '自定义'
}
],
activeStatus: 3,
zdShow: false, // 发起转单弹窗 zdShow: false, // 发起转单弹窗
hcShow: false, // 耗材弹窗 hcShow: false, // 耗材弹窗
lookShow: false, // 查看耗材弹窗 lookShow: false // 查看耗材弹窗
list: [],
isloading: false,
page: 1,
more: true,
locked: false,
limit: 10,
status: {}
} }
}, },
created () { created () {
...@@ -233,7 +224,7 @@ export default { ...@@ -233,7 +224,7 @@ export default {
if (this.more && !this.isloading) { if (this.more && !this.isloading) {
this.isloading = true this.isloading = true
const curParams = { const curParams = {
time_type: this.activeStatus, time_type: this.curSelect.type,
page: this.page, page: this.page,
limit: this.limit limit: this.limit
} }
...@@ -246,7 +237,6 @@ export default { ...@@ -246,7 +237,6 @@ export default {
this.locked = false this.locked = false
this.isloading = false this.isloading = false
this.count = data.count this.count = data.count
console.log(data, 1111)
}) })
.catch(() => { .catch(() => {
this.locked = false this.locked = false
...@@ -282,25 +272,19 @@ export default { ...@@ -282,25 +272,19 @@ export default {
this.addList.splice(index, 1) this.addList.splice(index, 1)
}, },
// 点击选择 // 点击选择
show (e) { chooseTab (e) {
if (this.xianshi == true) { this.tabShow = !this.tabShow
this.xianshi = false
} else if (this.xianshi == false) {
this.xianshi = true
}
}, },
// 日期维度变化 // 日期维度变化
changeItem (time_type, name) { changeItem (item) {
console.log(time_type, name, '111111111111111111') if (item.type !== this.curSelect.type) {
if (time_type == this.activeStatus) { this.curSelect = item
return this.tabShow = false
setTimeout(() => {
this.initData()
this.getList()
}, 0)
} }
this.activeStatus = time_type
this.currentName = name
setTimeout(() => {
this.initData()
this.getList()
}, 0)
}, },
// 备注耗材弹窗 // 备注耗材弹窗
bz_click (id) { bz_click (id) {
...@@ -341,233 +325,11 @@ export default { ...@@ -341,233 +325,11 @@ export default {
query: { id } query: { id }
}) })
} }
} },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.cont { @import "@assets/styles/tabbar/index.scss";
min-height: 100vh; </style>
background: #fff;
padding: 0.4rem 0rem;
}
.top {
height: 0.36rem;
margin-bottom: 0.38rem;
margin-left: 0.3rem;
}
.top .point {
width: 0.1rem;
height: 0.1rem;
background: #0054ff;
border-radius: 50%;
margin-right: 0.13rem;
}
.top .status {
color: #0054ff;
font-size: 0.36rem;
font-weight: bold;
}
.menu .hc_total {
color: #727272;
font-size: 0.28rem;
}
.menu .options {
width: 1.76rem;
height: 0.58rem;
background: #ffffff;
border: 1px solid #0054ff;
border-radius: 0.12rem;
color: #0054ff;
font-size: 0.28rem;
line-height: 0.58rem;
text-align: center;
position: relative;
margin-right: 0.3rem;
}
.menu .options .option-box {
width: 1.7rem;
// height: 2rem;
background: #fff;
border: 1px solid #0054ff;
position: absolute;
top: 0.57rem;
left: 0rem;
border-radius: 0 0 0.12rem 0.12rem;
}
.order-item {
width: 6.9rem;
background: #ffffff;
box-shadow: 0px 0px 0.12rem 0.01rem rgba(214, 214, 214, 0.78);
border-radius: 0.12rem;
margin-top: 0.4rem;
padding: 0.4rem 0.3rem;
margin-bottom: 0.2rem;
margin-left: 0.3rem;
}
.title {
color: #0054ff;
font-size: 0.32rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
.item {
// height: 0.3rem;
margin-bottom: 0.2rem;
}
.item-title {
color: #000000;
font-size: 0.3rem;
}
.item-desc {
color: #727272;
font-size: 0.3rem;
}
.que-desc {
margin-top: 0.4rem;
margin-bottom: 0.4rem;
}
.img {
width: 1.2rem;
height: 1.2rem;
border-radius: 0.08rem;
// margin-top: 0.8rem;
}
.img img {
width: 100%;
height: 100%;
border-radius: 0.08rem;
margin-left: 0.16rem;
margin-right: 0.16rem;
}
.list-item {
margin-bottom: 0.4rem;
}
.line {
width: 6.28rem;
height: 0.01rem;
background: #f1f1f1;
margin-bottom: 0.4rem;
}
.ma-item {
margin-top: 0.3rem;
}
.one {
color: #727272;
font-size: 0.3rem;
margin-bottom: 0.3rem;
}
.one-item {
margin-left: 0.3rem;
margin-right: 0.3rem;
}
.btn-item {
width: 1.8rem;
height: 0.7rem;
background: #0054ff;
border-radius: 0.35rem;
text-align: center;
line-height: 0.7rem;
color: #fff;
font-size: 0.27rem;
margin-left: 0.2rem;
}
.sf-btn {
background: #ffffff;
border: 1px solid #0054ff;
color: #0054ff;
}
.blank {
height: 1rem;
}
.van-popup {
width: 6.9rem;
max-height: 7rem;
// height: 5.9rem;
background: #fff;
border-radius: 0.12rem;
padding-top: 0.4rem;
padding-bottom: 0.2rem;
text-align: center;
}
.pop_title {
color: #000000;
font-size: 0.36rem;
font-weight: bold;
margin-bottom: 0.4rem;
}
.van-popup textarea {
width: 6.3rem;
height: 3rem;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
padding: 0.3rem 0.2rem;
}
.van-popup textarea::-webkit-input-placeholder {
color: #c8c8c8;
font-size: 0.26rem;
}
.btnItem {
margin-top: 0.4rem;
margin-left: 0.65rem;
}
.btnItem .cancel {
width: 2.65rem;
height: 0.78rem;
border: 1px solid #c8c8c8;
border-radius: 0.39rem;
color: #000000;
font-size: 0.32rem;
text-align: center;
line-height: 0.78rem;
margin-right: 0.3rem;
}
.btnItem .sure {
width: 2.65rem;
height: 0.78rem;
background: linear-gradient(270deg, #0054ff, #1965ff);
border-radius: 0.39rem;
color: #ffffff;
font-size: 0.32rem;
text-align: center;
line-height: 0.78rem;
margin-right: 0.3rem;
}
.input {
width: 6.3rem;
height: 0.76rem;
background: #ffffff;
border: 1px solid #f1f1f1;
border-radius: 0.08rem;
text-align: left;
padding-left: 0.2rem;
margin-bottom: 0.1rem;
font-size: 0.3rem;
}
.input::-webkit-input-placeholder {
color: #c8c8c8;
font-size: 0.3rem;
}
.math-btn {
margin-left: 0.3rem;
margin-right: 0.3rem;
color: #0256ff;
font-size: 0.3rem;
}
.hc_total {
text-align: left;
color: #000000;
font-size: 0.26rem;
margin-left: 0.3rem;
}
.sure-btn {
width: 3.12rem;
height: 0.78rem;
background: linear-gradient(270deg, #0054ff, #1965ff);
border-radius: 0.39rem;
color: #ffffff;
text-align: center;
line-height: 0.78rem;
margin: 1.2rem auto;
}
</style>
\ No newline at end of file
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