diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index d37c797..1e6687f 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -106,6 +106,16 @@ + + + + + + + + @@ -122,7 +132,8 @@ import { getUserInfo, getStrData, getTenantId, - setJSONData + setJSONData, + getJSONData } from '@/utils/auth' export default { @@ -188,6 +199,8 @@ export default { ticketId: null, //新加的维修项目 selectedProj: [], + //告知客户的内容 + tellCusText:"", } }, onLoad(){ @@ -225,6 +238,48 @@ export default { } }, 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) { this.selectedProj = proj if(this.selectedProj.length>0){ - setJSONData("newProject",this.selectedProj) - uni.navigateTo({ - url: '/pages-home/service/sign-agin' - }) + setJSONData("newProject",this.formatItem(this.selectedProj)) + this.$refs.alertDialog.open() } console.log(this.selectedProj,"selectedProj") console.log(this.ticketId,"this.ticketId") diff --git a/pages-home/service/sign-agin.vue b/pages-home/service/sign-agin.vue index 653947b..6376eeb 100644 --- a/pages-home/service/sign-agin.vue +++ b/pages-home/service/sign-agin.vue @@ -433,7 +433,7 @@ icon: 'success' }) uni.navigateTo({ - url: `/pages-order/orderDetail/orderDetail?id=${res.data.id}&isDetail=0` + url: `/pages-order/orderDetail/orderDetail?id=${res.data}&isDetail=0` }); }else{ uni.showToast({