This commit is contained in:
Vinjor 2024-11-04 17:55:08 +08:00
parent e0babf97df
commit 0a7bd37abf
2 changed files with 59 additions and 6 deletions

View File

@ -106,6 +106,16 @@
</view> </view>
<project-picker ref="proj" @confirm="projConfirm"></project-picker> <project-picker ref="proj" @confirm="projConfirm"></project-picker>
<tabBarVue msg="1" @socketSuccess="socketSuccess"></tabBarVue> <tabBarVue msg="1" @socketSuccess="socketSuccess"></tabBarVue>
<!-- 提示窗示例 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="success" cancelText="线下告知" confirmText="去签字" title="系统提示" content="客户是否在场进行签字确认?" @confirm="dialogConfirm"
@close="dialogClose"></uni-popup-dialog>
</uni-popup>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="线下告知" value=""
placeholder="请填入告知方式!" @confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
@ -122,7 +132,8 @@ import {
getUserInfo, getUserInfo,
getStrData, getStrData,
getTenantId, getTenantId,
setJSONData setJSONData,
getJSONData
} from '@/utils/auth' } from '@/utils/auth'
export default { export default {
@ -188,6 +199,8 @@ export default {
ticketId: null, ticketId: null,
// //
selectedProj: [], selectedProj: [],
//
tellCusText:"",
} }
}, },
onLoad(){ onLoad(){
@ -225,6 +238,48 @@ export default {
} }
}, },
methods: { methods: {
/**
* 保存当前项目
*/
dialogInputConfirm(val) {
//
this.$refs.inputDialog.close()
const newData = {itemList:getJSONData("newProject"),remark:val}
request({
url: '/admin-api/repair/titem/addNewProj',
method: 'post',
data:newData
}).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '添加维修项目成功!',
icon: 'success'
})
uni.navigateTo({
url: `/pages-order/orderDetail/orderDetail?id=${res.data}&isDetail=0`
});
}else{
uni.showToast({
title: '操作失败,请联系管理员',
icon: 'none'
})
}
})
},
/**
* 去签字
*/
dialogConfirm() {
uni.navigateTo({
url: '/pages-home/service/sign-agin'
})
},
/**
* 客户不在场手动输入
*/
dialogClose() {
this.$refs.inputDialog.open()
},
/** /**
* 添加项目 * 添加项目
*/ */
@ -238,10 +293,8 @@ export default {
projConfirm(proj) { projConfirm(proj) {
this.selectedProj = proj this.selectedProj = proj
if(this.selectedProj.length>0){ if(this.selectedProj.length>0){
setJSONData("newProject",this.selectedProj) setJSONData("newProject",this.formatItem(this.selectedProj))
uni.navigateTo({ this.$refs.alertDialog.open()
url: '/pages-home/service/sign-agin'
})
} }
console.log(this.selectedProj,"selectedProj") console.log(this.selectedProj,"selectedProj")
console.log(this.ticketId,"this.ticketId") console.log(this.ticketId,"this.ticketId")

View File

@ -433,7 +433,7 @@
icon: 'success' icon: 'success'
}) })
uni.navigateTo({ uni.navigateTo({
url: `/pages-order/orderDetail/orderDetail?id=${res.data.id}&isDetail=0` url: `/pages-order/orderDetail/orderDetail?id=${res.data}&isDetail=0`
}); });
}else{ }else{
uni.showToast({ uni.showToast({