diff --git a/pages-home/service/todoDetail.vue b/pages-home/service/todoDetail.vue index c9bbdc5..9dc3993 100644 --- a/pages-home/service/todoDetail.vue +++ b/pages-home/service/todoDetail.vue @@ -70,6 +70,7 @@ 配件信息 添加配件 + 移交保险公司 + + + + 设置 +
+ + 是否传给保险公司: + + + + 保险公司名称: + + + + 联系人: + + + + 联系电话: + + + + + + +
+
+
+
@@ -160,6 +190,13 @@ export default { selectWares: [], info: {}, imageUrls: [], + settingForm:{ + id: null, + toSafe: '0', + safeName: null, + safeContact: null, + safeMobile: null, + } }; }, onLoad(data) { @@ -171,6 +208,36 @@ export default { this.getDetail() }, methods: { + toggleToSafe(e){ + this.settingForm.toSafe = e.detail.value ? '1' : '0'; + }, + doSetting(){ + request({ + url: '/admin-api/repair/tw/updateSafe', + method: 'post', + data: this.settingForm + }).then(res => { + this.$refs.settingPopup.close() + uni.showToast({ + title: '设置成功!', + icon: 'none' + }) + }) + }, + handleSetting(){ + request({ + url: "/admin-api/repair/tw/getById?id=" + this.id, + method: 'get' + }).then(res => { + const data = res.data + this.settingForm.toSafe = data.toSafe + this.settingForm.safeName = data.safeName + this.settingForm.safeContact = data.safeContact + this.settingForm.safeMobile = data.safeMobile + this.settingForm.id = this.id + this.$refs.settingPopup.open() + }) + }, addWares(){ //配件申请 uni.navigateTo({ @@ -529,4 +596,54 @@ export default { cursor: pointer; margin: 0 20rpx; /* 增加左右边距,使图片距离屏幕边缘有一定距离 */ } +.popup-content { + width: 80%; + max-width: 400px; + background-color: #fff; + padding: 20px; + border-radius: 10px; + margin: auto; +} +.popup-title { + font-size: 18px; + margin-bottom: 20px; + text-align: center; +} +.uni-form-item { + display: flex; + align-items: center; + margin-bottom: 15px; +} +.uni-label { + width: 20rem; +} +.uni-input { + padding: 2px; + border: 1px solid #ccc; + border-radius: 5px; + box-sizing: border-box; + height: 2rem; + width: 26rem; +} +.popup-footer { + display: flex; + justify-content: space-between; + margin-top: 20px; +} +.confirm-btn, .cancel-btn { + flex: 1; + margin: 0 5px; + height: 40px; + line-height: 40px; + border: none; + border-radius: 5px; +} +.confirm-btn { + background-color: #0174F6; + color: #fff; +} +.cancel-btn { + background-color: #f5f5f5; + color: #666; +}