Commit 48ba5020 authored by 郭欢's avatar 郭欢

'修改,'

parent df7fa199
File added
No preview for this file type
const baseUrl = '/api' const baseUrl = '/api'
// if (process.env.NODE_ENV === 'testing') {
// // baseUrl = store.state.apiTestUrl + 'api';
// } else if (process.env.NODE_ENV === 'production') {
// // baseUrl = store.state.apiUrl + 'api';
// baseUrl = '/api'
// }
// todo: url // todo: url
// const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口 const httpUrl = 'http://repair.test.fhxmcy.com' // 测试接口
const httpUrl = 'https://repair.zeruiedu.com' // 正式接口 const h5Url = 'http://repair.test.h5.fhxmcy.com' // 测试h5线上地址
// const h5Url = 'http://localhost:8080' // 测试h5线上地址
const h5Url = 'https://repair.h5.fhxmcy.com' // 正式h5线上地址 // const httpUrl = 'https://repair.zeruiedu.com' // 正式接口
window.localStorage.setItem('httpUrl', httpUrl) // const h5Url = 'https://repair.h5.fhxmcy.com' // 正式h5线上地址
window.localStorage.setItem('h5Url', h5Url)
const wxLogin = '/api/worker/login' // 微信登录获取token、登录状态 const wxLogin = '/api/worker/login' // 微信登录获取token、登录状态
window.localStorage.setItem('wxLogin', wxLogin)
const curScope = 'scopes=snsapi_base&type=1' const curScope = 'scopes=snsapi_base&type=1'
window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url)
window.localStorage.setItem('wxLogin', wxLogin)
export default { export default {
// url地址 // url地址
...@@ -48,8 +43,8 @@ export default { ...@@ -48,8 +43,8 @@ export default {
ORDER_INFO: baseUrl + '/worker/repair/order/info', // 工人端工单详情页 ORDER_INFO: baseUrl + '/worker/repair/order/info', // 工人端工单详情页
// 管理员端 // 管理员端
GET_WORKER: baseUrl + '/worker/get/worker', // 查看评论 GET_WORKER: baseUrl + '/worker/get/worker', // 工人列表
REPAIR_CANCEL: baseUrl + '/worker/repair/cancel', // 查看评论 REPAIR_CANCEL: baseUrl + '/worker/repair/cancel', // 取消退回工单
REPAIR_ASSIGN: baseUrl + '/worker/repair/assign', // 指派工人 REPAIR_ASSIGN: baseUrl + '/worker/repair/assign', // 指派工人
WX_JSSDK: baseUrl + '/worker/wx/jssdk' // 获取jssdk参数 WX_JSSDK: baseUrl + '/worker/wx/jssdk' // 获取jssdk参数
......
...@@ -58,6 +58,10 @@ ...@@ -58,6 +58,10 @@
border-radius: 0 0 0.12rem 0.12rem; border-radius: 0 0 0.12rem 0.12rem;
} }
.option-item.active {
color: #ff0000;
}
// 日期选择样式 // 日期选择样式
.date{ .date{
width: 92%; width: 92%;
......
...@@ -50,6 +50,10 @@ ...@@ -50,6 +50,10 @@
z-index: 10; z-index: 10;
border-radius: 0 0 0.12rem 0.12rem; border-radius: 0 0 0.12rem 0.12rem;
} }
.option-item.active {
color: #ff0000;
}
.order-item { .order-item {
width: 6.9rem; width: 6.9rem;
background: #ffffff; background: #ffffff;
......
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
<div class="item flex-h flex-vc"> <div class="item flex-h flex-vc">
<div class="title">{{order.order_status_display}}</div> <div class="title">{{order.order_status_display}}</div>
</div> </div>
<div class="item flex-h flex-vc">
<div class="item-title">预约时间:</div>
<div
class="item-desc"
>{{order.appointment_date}} {{order.appointment_time.start_time}}-{{order.appointment_time.end_time}}</div>
</div>
<div class="item-title">问题描述:</div> <div class="item-title">问题描述:</div>
<div <div
class="item-desc que-desc" class="item-desc que-desc"
......
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
>{{ order.order_status_display }}(负责人)</div> >{{ order.order_status_display }}(负责人)</div>
<div class="title" v-else>{{ order.order_status_display }}</div> <div class="title" v-else>{{ order.order_status_display }}</div>
</div> </div>
<div class="item flex-h flex-vc">
<div class="item-title">预约时间:</div>
<div
class="item-desc"
>{{order.appointment_date}} {{order.appointment_time.start_time}}-{{order.appointment_time.end_time}}</div>
</div>
<div class="item-title">问题描述:</div> <div class="item-title">问题描述:</div>
<div <div
class="item-desc que-desc" class="item-desc que-desc"
...@@ -44,14 +50,16 @@ ...@@ -44,14 +50,16 @@
<img :src="child.url" alt /> <img :src="child.url" alt />
</div> </div>
</div> </div>
<div class="item flex-h flex-vc"> <template v-if="order.worker">
<div class="item-title">派工对象:</div> <div class="item flex-h flex-vc">
<div class="item-desc">{{ order.work_name }}</div> <div class="item-title">派工对象:</div>
</div> <div class="item-desc">{{ order.work_name }}</div>
<div class="item flex-h flex-vc"> </div>
<div class="item-title">联系电话:</div> <div class="item flex-h flex-vc">
<div class="item-desc">{{ order.telephone }}</div> <div class="item-title">联系电话:</div>
</div> <div class="item-desc">{{ order.worker.phone }}</div>
</div>
</template>
<div class="material" v-if="order.no_pay_order"> <div class="material" v-if="order.no_pay_order">
<div class="item-title bz-title specile-text">待支付耗材:</div> <div class="item-title bz-title specile-text">待支付耗材:</div>
<div <div
......
...@@ -6,16 +6,32 @@ ...@@ -6,16 +6,32 @@
</div> </div>
<div class="menu flex-h flex-hb flex-vc"> <div class="menu flex-h flex-hb flex-vc">
<div class="hc_total">{{ count }}个工单</div> <div class="hc_total">{{ count }}个工单</div>
<div class="options"> <div class="flex-h flex-vc">
<div @click="chooseTab">{{ curSelect.name }}</div> <div class="options">
<div class="option-box" v-show="tabShow"> <div @click="chooseStatus">{{ curStatus.name }}</div>
<div <div class="option-box" v-show="statusTab">
class="option-item" <div
v-for="item in optionList" class="option-item"
:key="item.type" :class="item.type == curStatus.type ? 'active' : ''"
:value="item.name" v-for="item in statusList"
@click="changeItem(item)" :key="item.type"
>{{ item.name }}</div> :value="item.name"
@click="changeStatus(item)"
>{{ item.name }}</div>
</div>
</div>
<div class="options">
<div @click="chooseTab">{{ curSelect.name }}</div>
<div class="option-box" v-show="tabShow">
<div
class="option-item"
:class="item.type == curSelect.type ? 'active' : ''"
v-for="item in optionList"
:key="item.type"
:value="item.name"
@click="changeItem(item)"
>{{ item.name }}</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -266,9 +282,13 @@ ...@@ -266,9 +282,13 @@
v-for="(item, index) in expend_detail.list" v-for="(item, index) in expend_detail.list"
:key="index" :key="index"
> >
<div class="one one1 one_title text-line-one">{{ item.parent_detail ? item.parent_detail.goods_name : '其它' }}</div> <div
class="one one1 one_title text-line-one"
>{{ item.parent_detail ? item.parent_detail.goods_name : '其它' }}</div>
<div class="one one2 flex-h"> <div class="one one2 flex-h">
<div class="_one text-line-one">{{ item.is_free == 2 ? item.good_detail.goods_name : item.goods_name }}</div> <div
class="_one text-line-one"
>{{ item.is_free == 2 ? item.good_detail.goods_name : item.goods_name }}</div>
<div class="_two text-line-one">*{{ item.number }}</div> <div class="_two text-line-one">*{{ item.number }}</div>
</div> </div>
<div class="one one3">{{ item.price }}</div> <div class="one one3">{{ item.price }}</div>
...@@ -323,13 +343,22 @@ export default { ...@@ -323,13 +343,22 @@ export default {
return { return {
// 头部日期范围筛选 // 头部日期范围筛选
tabShow: false, // tab范围选择框是否显示 tabShow: false, // tab范围选择框是否显示
curSelect: { type: '3', name: '本月' }, // 当前选择的日期范围 // todo:日期筛选
curSelect: { type: '5', name: '全部' }, // 当前选择的日期范围
optionList: [ optionList: [
{ type: '5', name: '全部' },
{ type: '1', name: '今日' }, { type: '1', name: '今日' },
{ type: '2', name: '本周' }, { type: '2', name: '本周' },
{ type: '3', name: '本月' }, { type: '3', name: '本月' },
{ type: '4', name: '自定义' } { type: '4', name: '自定义' }
], ],
// todo: 工单状态
curStatus: { type: '3', name: '已派工' }, // 当前选择的工单状态
statusList: [
{ type: '3', name: '已派工' },
{ type: '4', name: '维修中' }
],
statusTab: false,
// 工单数据 // 工单数据
count: '', // 工单总数 count: '', // 工单总数
list: [], // 列表 list: [], // 列表
...@@ -535,13 +564,15 @@ export default { ...@@ -535,13 +564,15 @@ export default {
page: this.page, page: this.page,
limit: this.limit, limit: this.limit,
start: this.startTime, start: this.startTime,
end: this.endTime end: this.endTime,
status: this.curStatus.type
} }
} else { } else {
curParams = { curParams = {
time_type: this.curSelect.type, time_type: this.curSelect.type,
page: this.page, page: this.page,
limit: this.limit limit: this.limit,
status: this.curStatus.type
} }
} }
this.$http this.$http
...@@ -593,6 +624,7 @@ export default { ...@@ -593,6 +624,7 @@ export default {
} }
return return
} }
this.initData() this.initData()
this.getList() this.getList()
} }
...@@ -607,7 +639,9 @@ export default { ...@@ -607,7 +639,9 @@ export default {
this.$http this.$http
.post(this.$myApi.REPAIR_BEGIN, curParams) .post(this.$myApi.REPAIR_BEGIN, curParams)
.then((data) => { .then((data) => {
vm.$set(vm.list, index, data) // vm.$set(vm.list, index, data)
this.list.splice(index, 1)
this.count = this.count - 1
}) })
.catch(() => { }) .catch(() => { })
}, },
...@@ -755,8 +789,10 @@ export default { ...@@ -755,8 +789,10 @@ export default {
this.$http this.$http
.post(this.$myApi.REPAIR_COMPLETE, curParams) .post(this.$myApi.REPAIR_COMPLETE, curParams)
.then((data) => { .then((data) => {
vm.$set(vm.list, index, data) // vm.$set(vm.list, index, data)
this.$toast('操作成功') this.$toast('操作成功')
this.list.splice(index, 1)
this.count = this.count - 1
}) })
.catch(() => { }) .catch(() => { })
}) })
...@@ -779,6 +815,18 @@ export default { ...@@ -779,6 +815,18 @@ export default {
} }
}) })
}, },
/* 工单状态切换 */
changeStatus (item) {
if (item.type == this.curStatus.type) return
this.curStatus = item
this.statusTab = false
this.initData()
this.getList()
},
/* 工单状态展示 */
chooseStatus () {
this.statusTab = !this.statusTab
},
fetchData (to, from) { fetchData (to, from) {
console.log(from.path, 'from----------------') console.log(from.path, 'from----------------')
if (from.path !== undefined && from.path.indexOf('/charge') !== -1) { if (from.path !== undefined && from.path.indexOf('/charge') !== -1) {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<div class="option-box" v-show="statusShow"> <div class="option-box" v-show="statusShow">
<div <div
class="option-item" class="option-item"
:class="item.statustype == curSelectStatus.statustype ? 'active' : ''"
v-for="item in statusList" v-for="item in statusList"
:key="item.statustype" :key="item.statustype"
:value="item.name" :value="item.name"
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
<div class="option-box" v-show="tabShow"> <div class="option-box" v-show="tabShow">
<div <div
class="option-item" class="option-item"
:class="item.type == curSelect.type ? 'active' : ''"
v-for="item in optionList" v-for="item in optionList"
:key="item.type" :key="item.type"
:value="item.name" :value="item.name"
...@@ -342,8 +344,9 @@ export default { ...@@ -342,8 +344,9 @@ export default {
endTime: '请选择截止日期', endTime: '请选择截止日期',
// 头部日期范围筛选 // 头部日期范围筛选
tabShow: false, // tab范围选择框是否显示 tabShow: false, // tab范围选择框是否显示
curSelect: { type: '1', name: '今日' }, // 当前选择的日期范围 curSelect: { type: '5', name: '全部' }, // 当前选择的日期范围
optionList: [ optionList: [
{ type: '5', name: '全部' },
{ type: '1', name: '今日' }, { type: '1', name: '今日' },
{ type: '2', name: '本周' }, { type: '2', name: '本周' },
{ type: '3', name: '本月' }, { type: '3', name: '本月' },
......
...@@ -61,8 +61,8 @@ module.exports = { ...@@ -61,8 +61,8 @@ module.exports = {
proxy: { proxy: {
'/api/': { '/api/': {
// todo: url // todo: url
// target: 'https://repairtest.zeruiedu.com/api', // 测试 target: 'http://repair.test.fhxmcy.com/api', // 测试
target: 'https://repair.zeruiedu.com/api', // 正式 // target: 'https://repair.zeruiedu.com/api', // 正式
autoRewrite: true, autoRewrite: true,
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
......
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