Commit 969e7da4 authored by 石盼盼's avatar 石盼盼

Merge branch 'spp' into 'master'

Spp

See merge request !9
parents d380aaa9 0f8875be
......@@ -9,12 +9,16 @@ const baseUrl = '/api'
// todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url = 'http://localhost:8080/' // 测试h5线上地址
const h5Url ='http://localhost:8080/' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
const wxLogin = '/api/worker/login' // 微信登录获取token、登录状态
window.localStorage.setItem('wxLogin', wxLogin)
const curScope = 'scopes=snsapi_base&type=1'
export default {
// url地址
......
......@@ -159,6 +159,7 @@
.item-title {
// min-width: 1.5rem;
color: #000000;
white-space: nowrap;
}
.item-desc {
......
......@@ -110,7 +110,15 @@
}
.ma-item {
// margin-top: 0.3rem;
height: 0.6rem;
height: 0.4rem;
margin-top: 0.2rem;
}
.item_line{
width: 6.28rem;
height: 0.01rem;
background: #f1f1f1;
margin-bottom: 0.4rem;
margin-top: 0.4rem;
}
.bz-title{
margin-bottom: 0.2rem;
......@@ -145,16 +153,25 @@
.blank {
height: 1rem;
}
.van-popup {
.cancel_cont {
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;
}
// .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;
......@@ -236,3 +253,40 @@
line-height: 0.78rem;
margin: 1.2rem auto;
}
// 日期选择样式
.date {
width: 92%;
height: 0.58rem;
margin: 0.36rem auto 0.4rem;
}
.date .start {
width: 3.08rem;
height: 0.58rem;
background: #FFFFFF;
border: 0.02rem solid #0054FF;
border-radius: 0.12rem;
text-align: center;
line-height: 0.58rem;
color: #000000;
font-size: 0.28rem;
}
.date .end {
width: 3.08rem;
height: 0.58rem;
background: #FFFFFF;
border: 0.02rem solid #0054FF;
border-radius: 0.12rem;
text-align: center;
line-height: 0.58rem;
color: #000000;
font-size: 0.28rem;
}
.date .blue {
width: 0.31rem;
height: 0.03rem;
background: #0054FF;
}
\ No newline at end of file
......@@ -4,9 +4,7 @@ import Home from '../views/tabbar/Home.vue'
import selfApi from '@/api/apiList'
Vue.use(VueRouter)
const routes = [
{
const routes = [{
path: '/',
name: 'home',
meta: {
......@@ -15,9 +13,9 @@ const routes = [
keepAlive: true
},
component: Home
},
// 登录
{
},
// 登录
{
path: '/login',
name: 'login',
meta: {
......@@ -25,8 +23,8 @@ const routes = [
hideBack: true
},
component: () => import('@/views/login/login.vue')
},
{
},
{
path: '/mine',
name: 'mine',
meta: {
......@@ -34,8 +32,8 @@ const routes = [
hideBack: true
},
component: () => import('../views/tabbar/mine.vue')
},
{
},
{
path: '/admin_home',
name: 'admin_home',
meta: {
......@@ -43,8 +41,8 @@ const routes = [
hideBack: true
},
component: () => import('../views/tabbar/admin_home.vue')
},
{
},
{
path: '/modifyPhone',
name: 'mesmodifyPhonesage',
meta: {
......@@ -52,9 +50,9 @@ const routes = [
hideBack: true
},
component: () => import('../views/tabbar/modifyPhone.vue')
},
// 个人中心
{
},
// 个人中心
{
path: '/charge',
name: 'charge',
meta: {
......@@ -62,8 +60,8 @@ const routes = [
hideBack: true
},
component: () => import('@/views/my/charge.vue')
},
{
},
{
path: '/lookEvaluate',
name: 'lookEvaluate',
meta: {
......@@ -71,14 +69,14 @@ const routes = [
hideBack: true
},
component: () => import('@/views/my/lookEvaluate.vue')
}
}
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes,
scrollBehavior (to, from, savePosition) {
scrollBehavior(to, from, savePosition) {
if (savePosition) {
return savePosition
} else {
......@@ -107,6 +105,8 @@ router.beforeEach((to, from, next) => {
role = to.query.role
window.localStorage.setItem('role', role)
}
console.log('router里的', window.localStorage.getItem('role'));
// console.log(token)
// console.log(status)
window.localStorage.setItem('token', token)
......@@ -114,6 +114,14 @@ router.beforeEach((to, from, next) => {
}
if (token && status === '200') {
console.log('ok-------1', 200)
if (role == 2) {
window.localStorage.setItem('role', '')
setTimeout(() => {
next({
path: '/admin_home'
})
}, 50)
}
next()
} else if (token && status === '100') {
console.log('ok-------2', 100)
......
......@@ -82,7 +82,18 @@ export default {
}
this.$http.post(this.$myApi.BINDLOGIN, curParams)
.then(res => {
window.document.location = this.$myApi.WINDOWHREF_ASK // url-
const httpUrl = window.localStorage.getItem('httpUrl')
console.log('httpUrl',httpUrl)
const h5Url = window.localStorage.getItem('h5Url')
console.log('h5Url',h5Url)
const wxLogin = window.localStorage.getItem('wxLogin')
console.log('wxLogin',wxLogin)
const t = res.role == 3 ? h5Url : `${h5Url}admin_home` // 测试h5线上地址
console.log('的数据傅雷家书蝶恋蜂狂',res,'链接',httpUrl,'h5Url',h5Url, 'role',t)
let url = `${httpUrl}${wxLogin}?callBack=${t}&scopes=snsapi_userinfo&type=1`
console.log('1111111111111111111111111111111链接',url)
window.document.location = url // url-
})
.catch(() => {})
},
......
......@@ -211,8 +211,11 @@ export default {
changeInput(e,index){
this.hc_number = e.target.value
console.log('商品数量',this.hc_number)
this.getMonery()
this.totalCount()
if( this.addList[index].mc){
this.getMonery()
}
},
getMonery(){
console.log('addlist',this.addList);
......
......@@ -6,7 +6,7 @@
</div>
<div class="menu flex-h flex-hb">
<div class="hc_total">{{count}}个工单</div>
<div class="options" >
<div class="options">
<div @click="chooseTab">{{curSelect.name}}</div>
<div class="option-box" v-show="tabShow">
<div
......@@ -19,19 +19,28 @@
</div>
</div>
</div>
<div class="date flex-h flex-hb flex-vc" v-if="this.curSelect.type==4">
<div class="start" @click="stShow">{{startTime}}</div>
<div class="blue"></div>
<div class="end" @click="endShow">{{endTime}}</div>
</div>
<van-pull-refresh v-model="isloading" @refresh="onRefresh">
<div class="order-item" v-for="(item, index) in list" :key="index">
<div class="order-item" v-for="(item, index) in list" :key="item.id">
<div class="title">{{item.order_status_display }}</div>
<div class="item flex-h flex-vc">
<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 class="item-title">问题描述:</div>
<div class="item-desc que-desc">{{item.description}}</div>
<div class="item-desc que-desc">{{item.repair_type.type_name}}-{{item.description}}</div>
<div class="item flex-h flex-start">
<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 class="item flex-h flex-vc">
<div class="item-title">客户姓名:</div>
......@@ -47,93 +56,105 @@
</div>
<div class="item flex-h flex-start">
<div class="item-title">图片详情:</div>
<div class="img flex-h" v-for="(child, index) in item.image" :key="index">
<div
@click="preview(item.image,index)"
class="img flex-h"
v-for="(child, index) in item.image"
:key="index"
>
<img :src="child.url" alt />
</div>
</div>
<div class="line"></div>
<div class="item flex-h flex-vc">
<div class="item flex-h flex-vc" v-if="item.worker">
<div class="item-title">派工对象:</div>
<div class="item-desc">{{item.worker.name}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item flex-h flex-vc" v-if="item.worker">
<div class="item-title">联系电话:</div>
<div class="item-desc">{{item.worker.phone}}</div>
</div>
<div class="material" v-if="item.no_pay_order != null" >
<div class="material" v-if="item.pay_order != ''">
<div class="item-title">已支付耗材</div>
<div class="ma-item flex-h flex-hb">
<div class="one">洁具</div>
<div class="one">水龙头*1</div>
<div class="one">¥16</div>
<div v-for="(parent, index) in item.pay_order" :key="index">
<div class="ma-item flex-h flex-hb" v-for="(child, index) in parent.goods" :key="index">
<div class="one">{{child.parent_detail.goods_name}}</div>
<div class="one">{{child.good_detail.goods_name}}*{{child.number}}</div>
<div class="one">{{child.price}}</div>
</div>
</div>
<div class="line"></div>
<div class="material" v-if="item.free_material_order && item.order_status_display !== '已完成'" >
<div class="item_line"></div>
</div>
<!-- <div class="line"></div> -->
<div class="material" v-if="item.free_material_order">
<div class="item-title bz-title">备注耗材</div>
<div class="ma-item flex-h flex-hb" v-for="(child, index) in item.free_material_order.goods" :key="index">
<div
class="ma-item flex-h flex-hb"
v-for="(child, index) in item.free_material_order.goods"
:key="index"
>
<div class="one">免费</div>
<div class="one">{{child.goods_name}}*{{child.number}}</div>
<div class="one">¥0</div>
</div>
<div class="item_line"></div>
</div>
<div class="btn flex-h flex-hr">
<div v-if="item.is_can_remark_material==1" class="btn-item bz-btn" @click="bz_click(item)" >备注耗材</div>
<div
v-if="item.is_can_confirm_complete==1" class="btn-item qr-btn" @click="sure_click(item, index)">确认完成</div>
v-if="item.is_can_remark_material==1"
class="btn-item bz-btn"
@click="bz_click(item)"
>备注耗材</div>
<div
v-if="item.is_can_confirm_complete==1"
class="btn-item qr-btn"
@click="sure_click(item, index)"
>确认完成</div>
<div
v-if="item.is_can_initiate_charge==1"
class="btn-item sf-btn"
@click="tz_charge(item.id)" >发起收费</div>
@click="tz_charge(item.id)"
>发起收费</div>
<div
v-if="item.is_can_initiate_transfer_order==1"
class="btn-item"
@click="zd_click(item)">发起转单</div>
@click="zd_click(item)"
>发起转单</div>
<div
v-if="item.is_can_begin_repair==1"
class="btn-item"
@click="starRepir(item.id,index)" >开始维修</div>
@click="starRepir(item.id,index)"
>开始维修</div>
<div v-if="item.is_can_see_appraisal==1" class="btn-item" @click="look_comment(item)">查看评价</div>
<div v-if="item.is_can_see_material==1" class="btn-item sf-btn" @click="look_click(item)" >查看耗材</div>
<div
v-if="item.is_can_see_material==1"
class="btn-item sf-btn"
@click="look_click(item)"
>查看耗材</div>
</div>
</div>
<!-- 空数据 -->
<van-empty
class="custom-image"
description="暂无工单哦~"
v-if="!list.length && !more"
/>
<van-empty class="custom-image" description="暂无工单哦~" v-if="!list.length && !more" />
</van-pull-refresh>
<div class="blank"></div>
<!-- 发起转单弹窗 -->
<van-popup v-model="zdShow" close-icon="close">
<div class="cancel_cont">
<div class="pop_title">备注转单原因</div>
<textarea placeholder="请输入转单理由" v-model="reason"></textarea>
<div class="btnItem flex-h">
<div class="cancel" @click="cancel" >取消</div>
<div class="sure" @click="zd_submit" >提交</div>
<div class="cancel" @click="cancel">取消</div>
<div class="sure" @click="zd_submit">提交</div>
</div>
</div>
</van-popup>
<!-- 备注耗材弹窗 -->
<van-popup v-model="hcShow" close-icon="close">
<div class="cancel_cont">
<div class="pop_title">备注耗材</div>
<div
class="list-item"
v-for="(item,index) in addList"
:key="index"
>
<input
class="input"
v-model="item.goods_name"
type="text"
placeholder="请输入耗材名称"
/>
<input
class="input"
v-model.number="item.number"
type="number"
placeholder="请输入耗材个数"
/>
<div class="list-item" v-for="(item,index) in addList" :key="index">
<input class="input" v-model="item.goods_name" type="text" placeholder="请输入耗材名称" />
<input class="input" v-model.number="item.number" type="number" placeholder="请输入耗材个数" />
</div>
<div class="math-btn flex-h flex-vc flex-hb">
<div v-if="addList.length>1" class="del-btn" @click="delMeth">-删除</div>
......@@ -143,18 +164,51 @@
<div class="cancel" @click="cancel">取消</div>
<div class="sure" @click="bz_submit">提交</div>
</div>
</div>
</van-popup>
<!-- 查看耗材弹窗 -->
<van-popup v-model="lookShow" close-icon="close">
<div class="cancel_cont">
<div class="pop_title">查看耗材</div>
<div class="tc_line"></div>
<div class="ma-item one-item flex-h flex-hb" v-for="(item, index) in expend_detail.list" :key="index">
<div
class="ma-item one-item flex-h flex-hb"
v-for="(item, index) in expend_detail.list"
:key="index"
>
<div class="one">{{item.parent_detail ? item.parent_detail.goods_name : '其它'}}</div>
<div class="one">{{item.goods_name}}*{{item.number}}</div>
<div class="one">{{item.is_free ? '免费' : '' + item.price}}</div>
</div>
<div class="hc_total">共计{{expend_detail.number}}件,总价: ¥{{expend_detail.price}}</div>
<div class="sure-btn" @click="cancel">确定</div>
</div>
</van-popup>
<!-- 选择开始日期弹窗 -->
<van-popup v-model="showStart" round position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="startObj.minDate"
:max-date="startObj.maxDate"
@confirm="birConfirm"
@cancel="birCancel"
:formatter="formatter"
/>
</van-popup>
<!-- 选择截止日期弹窗 -->
<van-popup v-model="showEnd" round position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="endObj.minDate"
:max-date="endObj.maxDate"
@confirm="endTimeConfirm"
@cancel="endTimeCancel"
:formatter="formatter"
/>
</van-popup>
<!-- tabbar -->
<my-tabbar curname="home"></my-tabbar>
......@@ -164,6 +218,7 @@
<script>
import myTabbar from '@components/common/tabbar.vue'
import { trimStrSpace } from '@assets/js/format.js'
import { ImagePreview } from 'vant';
export default {
name: 'home',
components: {
......@@ -206,6 +261,19 @@ export default {
lookShow: false, // 查看耗材弹窗
expend_detail: {},// 耗材详情
user: '',
startTime: '请选择开始日期',
showStart: false,
startObj:{
minDate: new Date(2021, 0, 1),
maxDate: new Date(),
},
endObj:{
minDate: new Date(2021, 0, 1),
maxDate: new Date(),
},
currentDate: new Date(2021, 0, 17),
showEnd: false,
endTime: "请选择截止日期",
}
},
created () {
......@@ -213,6 +281,73 @@ export default {
this.getUserInfo()
},
methods: {
preview(img, index){
let temp = img.map(item=>{
return item.url
})
ImagePreview({
images: temp,
startPosition: index,
});
},
endShow(){
this.showEnd = true
},
stShow(){
this.showStart = true
},
formatter(type, val) {
if (type === "year") {
return `${val}年`;
} else if (type === "month") {
return `${val}月`;
} else if (type === "day") {
return `${val}日`;
}
return val;
},
birConfirm(value) {
this.showStart = false
if(this.startTime == this.conversionTime(value)){
return
}
console.log('啊啊啊',value);
this.startTime = this.conversionTime(value)
this.$set(this.endObj,'minDate',value)
this.anginList()
console.log('开始时间',this.startTime);
},
conversionTime(temp){
let mounth = (temp.getMonth() + 1) <10 ? '0'+(temp.getMonth() + 1) : (temp.getMonth() + 1)
let date = temp.getDate() <10 ? '0' + temp.getDate() : temp.getDate()
return temp.getFullYear() +
"-" +
mounth +
"-" +
date
},
birCancel() {
this.showStart = false;
},
endTimeConfirm(value){
this.showEnd = false
if(this.endTime == this.conversionTime(value)){
return
}
this.endTime = this.conversionTime(value)
this.$set(this.startObj,'maxDate',value)
this.anginList()
console.log('结束时间',this.endTime);
},
endTimeCancel() {
this.showEnd = false;
},
anginList(){
if(this.startTime !='请选择开始日期' && this.endTime!='请选择截止日期'){
this.initData()
this.getList()
}
},
// 初始化
initData () {
this.list = []
......@@ -242,10 +377,21 @@ export default {
getList () {
if (this.more && !this.isloading) {
this.isloading = true
const curParams = {
let curParams = {}
if(this.curSelect.type==4){
curParams = {
time_type: this.curSelect.type,
page: this.page,
limit: this.limit
limit: this.limit,
start: this.startTime,
end: this.endTime,
}
}else{
curParams = {
time_type: this.curSelect.type,
page: this.page,
limit: this.limit,
}
}
this.$http
.get(this.$myApi.REPAIR_LIST, curParams)
......@@ -279,10 +425,11 @@ export default {
if (item.type !== this.curSelect.type) {
this.curSelect = item
this.tabShow = false
setTimeout(() => {
if(this.curSelect.type == 4){
return
}
this.initData()
this.getList()
}, 0)
}
},
// 开始维修
......@@ -380,7 +527,6 @@ export default {
.post(this.$myApi.MATERIAL_REMARK, curParams)
.then((data) => {
this.hcShow = false
this.$toast('操作成功')
vm.$set(vm.list, index, data)
})
......
......@@ -45,7 +45,7 @@
>{{item.appointment_date}} {{item.appointment_time.start_time}}-{{item.appointment_time.end_time}}</div>
</div>
<div class="item-title">问题描述:</div>
<div class="item-desc que-desc">{{item.description}}</div>
<div class="item-desc que-desc">{{item.repair_type.type_name}}-{{item.description}}</div>
<div class="item flex-h flex-start">
<div class="item-title">服务地址:</div>
<div
......@@ -56,9 +56,10 @@
<div class="item-title">客户姓名:</div>
<div class="item-desc">{{item.realname}}</div>
</div>
<!--<a :href="'tel' + item.telephone">{{item.telephone}}</a> -->
<div class="item flex-h flex-vc">
<div class="item-title">联系电话:</div>
<div class="item-desc phone">{{item.telephone}}</div>
<div class="item-desc phone" @click="callPhone(item)">{{item.telephone}}</div>
</div>
<div class="item flex-h flex-vc">
<div class="item-title">提交时间:</div>
......@@ -66,14 +67,18 @@
</div>
<div class="item flex-h flex-start">
<div class="item-title">图片详情:</div>
<div class="img flex-h" v-for="(child, index) in item.image" :key="index">
<div @click="preview(item.image,index)" class="img flex-h" v-for="(child, index) in item.image" :key="index">
<img :src="child.url" alt />
</div>
</div>
<div v-if="item.is_can_assign_worker==1">
<div class="line"></div>
<div v-if="item.is_can_assign_worker==1" class="item flex-h flex-vc flex-hb" @click="workers">
<div
v-if="item.is_can_assign_worker==1"
class="item flex-h flex-vc flex-hb"
@click="workers"
>
<div class="flex-h flex-vc">
<div class="item-title">派工对象:</div>
<div class="item-desc">{{workerName}}</div>
......@@ -87,11 +92,14 @@
</div>
<div class="line"></div>
<div class="allBtn flex-h flex-hr">
<div v-if="item.is_can_assign_worker==1" class="button sureBtn" @click="sureOrder(item)">确定</div>
<div
v-if="item.is_can_assign_worker==1"
class="button sureBtn"
@click="sureOrder(item,index)"
>确定</div>
<div v-if="item.is_can_cancel==1" class="button" @click="cancelOrder(item)">取消</div>
</div>
</div>
</div>
<!-- 空数据 -->
<van-empty class="custom-image" description="暂无工单哦~" v-if="!list.length && !more" />
......@@ -125,8 +133,8 @@
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
:min-date="startObj.minDate"
:max-date="startObj.maxDate"
@confirm="birConfirm"
@cancel="birCancel"
:formatter="formatter"
......@@ -138,8 +146,8 @@
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
:min-date="endObj.minDate"
:max-date="endObj.maxDate"
@confirm="endTimeConfirm"
@cancel="endTimeCancel"
:formatter="formatter"
......@@ -151,6 +159,7 @@
<script>
import myTabbar from '@components/common/tabbar.vue'
import { trimStrSpace } from '@assets/js/format.js'
import { ImagePreview } from 'vant';
export default {
name: 'home',
components: {
......@@ -160,14 +169,20 @@ export default {
return {
reson: '',//取消原因
qxShow: false, // 发起转单弹窗
workerName: '请选择',
workerName: '',
worker_id: '',
showWorker: false,
columns: [],
startTime: '请选择开始日期',
showStart: false,
minDate: new Date(1931, 0, 1),
startObj:{
minDate: new Date(2021, 0, 1),
maxDate: new Date(),
},
endObj:{
minDate: new Date(2021, 0, 1),
maxDate: new Date(),
},
currentDate: new Date(2021, 0, 17),
showEnd: false,
endTime: "请选择截止日期",
......@@ -181,7 +196,7 @@ export default {
{ type: '4', name: '自定义' }
],
statusShow: false,
curSelectStatus: { statustype: '1', name: '未受理' },
curSelectStatus: { statustype: '2', name: '派工中' },
statusList: [
{ statustype: '1', name: '未受理' },
{ statustype: '2', name: '派工中' },
......@@ -213,11 +228,26 @@ export default {
this.getWorkers()
},
methods: {
preview(img, index){
let temp = img.map(item=>{
return item.url
})
ImagePreview({
images: temp,
startPosition: index,
});
},
callPhone(item){
console.log('电话',item)
let phoneNumber = item.telephone
window.location.href = 'tel://' + phoneNumber
},
//指派工人
sureOrder(item){
sureOrder(item,index){
const vm = this
const index = this.list.findIndex(item => item.id === this.curItem.id)
console.log('1111',item);
// const index = this.list.findIndex(item => item.id === this.curItem.id)
// console.log('index',index);
// console.log('1111',item);
this.curItem = item
this.repair_order_id = item.id
if(this.worker_id == '') {
......@@ -231,11 +261,19 @@ export default {
this.$http
.post(this.$myApi.REPAIR_ASSIGN, curParams)
.then((data) => {
console.log('指派工人',data);
this.$toast('操作成功')
vm.$set(vm.list, index, data)
this.changeList(data,index)
})
.catch(() => {})
},
changeList(data,index){
if(this.curSelectStatus.statustype == 0){
this.$set(this.list, index, data)
}else{
this.list.splice(index,1)
}
},
// 取消工单
cancelOrder(item){
console.log('aaa',item);
......@@ -271,9 +309,14 @@ export default {
return val;
},
birConfirm(value) {
this.showStart = false
console.log('啊啊啊',value);
if(this.startTime == this.conversionTime(value)){
return
}
this.startTime = this.conversionTime(value)
this.showStart = false
this.$set(this.endObj,'minDate',value)
this.anginList()
console.log('开始时间',this.startTime);
},
conversionTime(temp){
......@@ -289,10 +332,21 @@ export default {
this.showStart = false;
},
endTimeConfirm(value){
this.endTime = this.conversionTime(value)
this.showEnd = false
if(this.endTime == this.conversionTime(value)){
return
}
this.endTime = this.conversionTime(value)
this.$set(this.startObj,'maxDate',value)
this.anginList()
console.log('结束时间',this.endTime);
},
anginList(){
if(this.startTime !='请选择开始日期' && this.endTime!='请选择截止日期'){
this.initData()
this.getList()
}
},
endTimeCancel() {
this.showEnd = false;
},
......@@ -320,26 +374,24 @@ export default {
getList () {
if (this.more && !this.isloading) {
this.isloading = true
let curParams = {}
console.log('类型',this.curSelect.type);
// if(this.curSelect.type==4){
// const curParams = {
// time_type: this.curSelect.type,
// page: this.page,
// limit: this.limit,
// start: this.startTime,
// end: this.endTime
// }
// }else{
// const curParams = {
// time_type: this.curSelect.type,
// page: this.page,
// limit: this.limit
// }
// }
const curParams = {
if(this.curSelect.type==4){
curParams = {
time_type: this.curSelect.type,
page: this.page,
limit: this.limit
limit: this.limit,
start: this.startTime,
end: this.endTime,
status: this.curSelectStatus.statustype
}
}else{
curParams = {
time_type: this.curSelect.type,
page: this.page,
limit: this.limit,
status: this.curSelectStatus.statustype
}
}
this.$http
.get(this.$myApi.REPAIR_LIST, curParams)
......@@ -350,6 +402,12 @@ export default {
this.locked = false
this.isloading = false
this.count = data.count
if(data.worker){
this.worker_id = data.worker.id
this.workerName = data.worker.name
}
console.log('工人',data.worker.id,data.worker.name);
})
.catch(() => {
this.locked = false
......@@ -378,6 +436,9 @@ export default {
if (item.type !== this.curSelect.type) {
this.curSelect = item
this.tabShow = false
if(this.curSelect.type == 4){
return
}
setTimeout(() => {
this.initData()
this.getList()
......@@ -388,14 +449,15 @@ export default {
changeStatus (item) {
if (item.statustype !== this.curSelectStatus.statustype) {
this.curSelectStatus = item
console.log('1111',this.curSelectStatus);
this.statusShow = false
setTimeout(() => {
// this.initData()
// this.getList()
this.initData()
this.getList()
}, 0)
}
},
// 单提交
// 取消工单提交
qx_submit () {
const vm = this
const index = this.list.findIndex(item => item.id === this.curItem.id)
......@@ -412,7 +474,7 @@ export default {
.then((data) => {
this.qxShow = false
this.$toast('操作成功')
vm.$set(vm.list, index, data)
this.changeList(data,index)
})
.catch(() => {
this.qxShow = false
......
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