Commit 02873d64 authored by 石盼盼's avatar 石盼盼

Merge branch 'spp' into 'master'

Spp

See merge request !18
parents ca47f110 70536b3c
......@@ -9,8 +9,8 @@ const baseUrl = '/api'
// todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
// const h5Url ='http://localhost:8080' // 测试h5线上地址
const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址
const h5Url = 'http://localhost:8080' // 测试h5线上地址
// const h5Url = 'http://repair.h5.zeruiedu.com' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
......@@ -45,6 +45,7 @@ export default {
REPAIR_COMPLETE: baseUrl + '/worker/repair/complete', // 确认完成
REPAIR_APPRAISAL: baseUrl + '/worker/repair/appraisal', // 查看评论
USER_EDIT: baseUrl + '/worker/user/edit', // 修改手机号
WORKER_BACK: baseUrl + '/worker/repair/worker/back', // 工人端退回报修单
// 管理员端
GET_WORKER: baseUrl + '/worker/get/worker', // 查看评论
......
......@@ -5,14 +5,13 @@ import myAxios from './index'
import {
Toast
} from 'vant'
import logo2 from "@/assets/images/login/logo2.png"
// 微信分享方法
const share = (param) => {
Toast.loading({
message: "加载中...",
duration: 0, //持续展示 toast
duration: 1000, //持续展示 toast
})
const successCall = (res) => {
console.log('res', res)
......@@ -47,7 +46,7 @@ const share = (param) => {
] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮,所有menu项见附录3
wx.ready(function () {
//分享到朋友圈
// 分享到朋友圈
// wx.updateTimelineShareData({
// title: `${shareCircle.title}:${shareCircle.desc}`, // 分享标题
// link: shareCircle.link, // 分享链接
......@@ -79,7 +78,6 @@ const share = (param) => {
}
myAxios.post(apiList.WX_JSSDK, curParams)
.then(res => {
console.log(res,111111)
successCall(res)
Toast.clear()
})
......
......@@ -133,6 +133,7 @@
class="btn-item"
@click="zd_click(item)"
>发起转单</div>
<div v-if="item.is_can_back==1" class="btn-item" @click="back_click(item)">发起退回</div>
<div
v-if="item.is_can_begin_repair==1"
class="btn-item"
......@@ -166,6 +167,17 @@
</div>
</div>
</van-popup>
<!-- 发起退回弹窗 -->
<van-popup v-model="backShow" close-icon="close">
<div class="cancel_cont">
<div class="pop_title">备注退回原因</div>
<textarea placeholder="请输入转单理由" maxlength="100" v-model="back_reason"></textarea>
<div class="btnItem flex-h">
<div class="cancel" @click="back_cancel">取消</div>
<div class="sure" @click="back_submit">提交</div>
</div>
</div>
</van-popup>
<!-- 备注耗材弹窗 -->
<van-popup v-model="hcShow" close-icon="close">
<div class="cancel_cont">
......@@ -207,9 +219,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>
......@@ -312,6 +328,8 @@ export default {
currentDate: new Date(2021, 0, 17),
showEnd: false,
endTime: "请选择截止日期",
backShow: false,//工人退回弹窗
back_reason: '',//工人退回原因
}
},
created () {
......@@ -320,6 +338,38 @@ export default {
this.getUserInfo()
},
methods: {
back_click(item){
this.curItem = item
this.back_reason = ''
this.backShow = true
},
back_cancel(){
this.backShow = false
},
//发起退回
back_submit(){
if (this.back_reason === '') {
this.$toast('退回原因不可为空')
return
}
const curParams = {
repair_order_id: this.curItem.id,
content: this.back_reason
}
this.$http
.get(this.$myApi.WORKER_BACK, curParams)
.then((data) => {
this.backShow = false
this.$toast('操作成功')
const idx = this.list.findIndex(item => item.id === this.curItem.id)
if (idx !== -1) {
this.list.splice(idx, 1)
}
})
.catch(() => {
this.backShow = false
})
},
showAll(item,e){
this.$toast(e.target.innerHTML,{
duration: 0
......
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