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

'修改,'

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