You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
15 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["package-packageorder-pages-suborderedit-suborderedit"],{"01f0":function(e,t,i){"use strict";i.r(t);var n=i("0dee"),a=i.n(n);for(var c in n)"default"!==c&&function(e){i.d(t,e,(function(){return n[e]}))}(c);t["default"]=a.a},"0dee":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={name:"topnav",props:{title:{type:String,default:""},hasHome:{type:String,default:"home"}},data:function(){return{}},methods:{toback:function(){uni.navigateBack({delta:0})},tohome:function(){this.$emit("tohome")}}};t.default=n},"5d25":function(e,t,i){"use strict";var n=i("4ea4");i("4160"),i("a434"),i("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(i("5530")),c=n(i("b85c")),o=i("313c"),r={data:function(){return{pageTitle:"编辑",checkArea:!1,checkBed:!1,checkCarer:!1,checkPrice:!1,multiArray:[],showMuti:[],objectMultiArray:[],multiIndex:[0,0],selectArea:"",selectAreaID:"",objectArray:[],selectCarer:"",selectCarerID:"",array:[],index:0,selectbedID:"",selectbed:"",currentProject:null,salePrice:0,selectItems:[],orderitem:{},urlfrom:"",oid:"",pageFrom:"order"}},onReady:function(){},onLoad:function(e){var t=this,i=uni.getStorageSync("currentProject");this.currentProject=i,this.selectItems=JSON.parse(e.d),this.urlfrom=e.from,this.pageFrom=e.page,this.loadAreas(),this.oid=e.oid,"single"==e.from?this.pageTitle="编辑"+JSON.parse(e.d)[0].service_date:this.pageTitle="批量编辑",o.getOrderItemInfo(t.selectItems[0].id,(function(e){console.log(e),t.orderitem=e,t.selectArea=t.orderitem.bed.building_name+"-"+t.orderitem.bed.area_name,t.selectAreaID=t.orderitem.bed.area_id,t.selectbed=t.orderitem.bed.room_name+"-"+t.orderitem.bed.name,t.selectbedID=t.orderitem.bed.id,t.selectCarer=t.orderitem.paramedic.name,t.selectCarerID=t.orderitem.paramedic.id,t.salePrice=t.orderitem.total}),(function(e){}))},onShow:function(){var e=uni.getStorageSync("selectCarer");null==e||o.isNull(e)||(this.selectCarer=e.name,this.selectCarerID=e.id)},onUnload:function(){uni.removeStorageSync("selectCarer")},onHide:function(){uni.removeStorageSync("selectCarer")},methods:{tohome:function(){uni.navigateTo({url:"../../../../pages/index/index"})},bindCaculate:function(e){this.salePrice=e.detail.value},bindconfirm:function(e){var t=this,i={};if(t.checkBed||t.checkArea){if(o.isNull(t.selectbedID))return o.alert("请选择病床"),!1;i.bed_id=t.selectbedID,console.log(1)}if(t.checkCarer){if(o.isNull(t.selectCarerID))return o.alert("请选择护工"),!1;i.paramedic_id=t.selectCarerID,console.log(2)}if(t.checkPrice){if(o.isNull(t.salePrice))return o.alert("请输入价格"),!1;i.price=t.salePrice,console.log(3)}if(0==t.selectItems.length)return o.alert("未选择子订单"),!1;console.log(4),console.log(t.selectItems);var n,a=[],r=(0,c.default)(t.selectItems);try{for(r.s();!(n=r.n()).done;){var s=n.value;a.push(s.id)}}catch(l){r.e(l)}finally{r.f()}if(i.ids=a.join(","),!t.checkArea&&!t.checkBed&&!t.checkCarer&&!t.checkPrice)return o.alert("请选择需要修改的项目"),!1;uni.showModal({title:"提示",content:"确认修改?",confirmText:"确认",confirmColor:"#000",cancelColor:"#eee",success:function(e){e.confirm&&t.doedit(i)}})},doedit:function(e){var t=this;console.log(e),o.request({bindThis:t,method:"POST",customLoading:!1,api:"manager/update-order-items",data:e,utilSuccess:function(i){if(console.log("3提交成功返回"+i),i.has_warnings){var n=(0,a.default)((0,a.default)({},e),{},{skip_warnings:1});uni.showModal({title:"提示",content:i.errormsg+",确认修改?",confirmText:"确认",confirmColor:"#000",cancelColor:"#eee",success:function(e){e.confirm&&t.doedit(n)}})}else uni.showModal({title:"更新成功",success:function(){var e="fin"==t.pageFrom?"../finishorder/finishorder":"../orderinfo/orderinfo";uni.navigateTo({url:e+"?id="+t.oid})}})},utilFail:function(e){console.log("4提交失败"+e),o.alert(e)}})},bindSelectCarer:function(){uni.navigateTo({url:"../../../packagecarer/pages/selectcarer/selectcarer?from=createOrder"})},bindBack:function(e){uni.navigateBack({})},bindChange:function(e){var t=this,i=e.currentTarget.dataset.type;switch(i){case"area":case"bed":t.checkArea=!t.checkArea,t.checkBed=!t.checkBed;break;case"price":t.checkPrice=!t.checkPrice;break;case"carer":t.checkCarer=!t.checkCarer;break}},bindMultiPickerChange:function(e){console.log("picker发送选择改变携带值为",e.detail.value);var t=e.detail.value,i=this;this.multiIndex=e.detail.value,this.selectArea=i.objectMultiArray[t].name,this.selectAreaID=i.objectMultiArray[t].id,this.selectbedID="",this.selectbed="",i.loadBeds(i.selectAreaID)},bindPickerChange:function(e){var t=this,i=e.detail.value;t.index=e.detail.value,t.selectbedID=t.objectArray[i].id,t.selectbed=t.objectArray[i].name+"床"},loadBeds:function(e){var t=this;o.request({api:"manager/get-area-beds/"+e,utilSuccess:function(e){var i=[],n=[];console.log(e),e.forEach((function(e,t){i.push(e.name),n.push({id:e.id,name:e.room_name+"-"+e.name})})),t.objectArray=n,t.array=i},utilFail:function(e){o.alert(e)}})},binddelete:function(e){var t=this,i=e.currentTarget.dataset.index;uni.showModal({title:"提示",content:"确认删除["+t.selectItems[i].service_date+"]",confirmText:"确认",confirmColor:"#000",cancelColor:"#eee",success:function(e){e.confirm&&t.selectItems.splice(i,1)}})},loadAreas:function(){var e=this;o.request({api:"manager/get-project-areas/"+e.currentProject.id,utilSuccess:function(t){var i=[],n=[];console.log(t),t.forEach((function(e,t){i.push(e.name),n.push({id:e.id,name:e.building_name+"-"+e.name})})),e.multiArray=i,e.objectMultiArray=n},utilFail:function(e){o.alert(e)}})}}};t.default=r},"654c":function(e,t,i){"use strict";var n=i("e49e"),a=i.n(n);a.a},"77a6":function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return c})),i.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",[i("v-uni-view",{staticClass:"nav"},[i("v-uni-view",{staticClass:"navLeft"},[i("v-uni-view",{staticClass:"back",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toback.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"iconfont icon-fanhui"})],1),i("v-uni-view",{staticClass:"navTitle"},[e._v(e._s(e.title))])],1),i("v-uni-view",{staticClass:"navRight"},[e._t("default"),"home"==e.hasHome?i("v-uni-text",{staticClass:"iconfont icon-home iconTop",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.tohome.apply(void 0,arguments)}}}):e._e()],2)],1)],1)},c=[]},9434:function(e,t,i){"use strict";i.r(t);var n=i("f920"),a=i("e11b");for(var c in a)"default"!==c&&function(e){i.d(t,e,(function(){return a[e]}))}(c);i("654c");var o,r=i("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"5c298cbf",null,!1,n["a"],o);t["default"]=s.exports},"9b58":function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,".icon-home[data-v-2198d501]{padding-left:%?55?%;font-size:%?42?%}.nav[data-v-2198d501]{height:%?160?%;background-image:linear-gradient(130deg,#52d5a6,#43c9cf);display:flex;align-items:center;padding:%?0?% %?30?%;padding-top:%?48?%;position:fixed;box-sizing:border-box;top:%?0?%;left:0;width:100%;overflow:hidden;z-index:9999;justify-content:space-between}.nav .navLeft[data-v-2198d501]{display:flex}.nav .navTitle[data-v-2198d501]{font-family:SourceHanSansCN-Medium;font-size:%?36?%;color:#fff;letter-spacing:%?0.37?%;line-height:%?50?%;margin-left:%?40?%;font-weight:600}.nav .navLeft .icon-fanhui[data-v-2198d501]{color:#fff;font-size:%?45?%}.navRight[data-v-2198d501]{display:flex;align-items:center}",""]),e.exports=t},b85c:function(e,t,i){"use strict";i("a4d3"),i("e01a"),i("d28b"),i("d3b7"),i("3ca3"),i("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=a(i("06c5"));function a(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var i;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=(0,n.default)(e))||t&&e&&"number"===typeof e.length){i&&(e=i);var a=0,c=function(){};return{s:c,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,o=e},f:function(){try{r||null==i["return"]||i["return"]()}finally{if(s)throw o}}}}},c25c:function(e,t,i){var n=i("9b58");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=i("4f06").default;a("e30b2bb6",n,!0,{sourceMap:!1,shadowMode:!1})},c85e:function(e,t,i){"use strict";i.r(t);var n=i("77a6"),a=i("01f0");for(var c in a)"default"!==c&&function(e){i.d(t,e,(function(){return a[e]}))}(c);i("caf7");var o,r=i("f0c5"),s=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"2198d501",null,!1,n["a"],o);t["default"]=s.exports},caf7:function(e,t,i){"use strict";var n=i("c25c"),a=i.n(n);a.a},e11b:function(e,t,i){"use strict";i.r(t);var n=i("5d25"),a=i.n(n);for(var c in n)"default"!==c&&function(e){i.d(t,e,(function(){return n[e]}))}(c);t["default"]=a.a},e49e:function(e,t,i){var n=i("fee6");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var a=i("4f06").default;a("f61c0c02",n,!0,{sourceMap:!1,shadowMode:!1})},f920:function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return c})),i.d(t,"a",(function(){return n}));var n={topnav:i("c85e").default},a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",[i("topnav",{attrs:{title:e.pageTitle},on:{tohome:function(t){arguments[0]=t=e.$handleEvent(t),e.tohome.apply(void 0,arguments)}}}),e.selectItems.length>0&&"single"!=e.urlfrom?i("v-uni-view",{staticClass:"selectBox"},[i("v-uni-view",{staticClass:"selectBoxTitle"},[e._v("已选子订单")]),i("v-uni-view",{staticClass:"selectBoxTagBox"},[e._l(e.selectItems,(function(t,n){return[i("v-uni-view",{staticClass:"selectBoxTag",attrs:{"data-index":n},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.binddelete.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"selectBoxTagD"},[e._v(e._s(t.service_date))]),i("v-uni-text",{staticClass:"iconfont icon-close"})],1)]}))],2)],1):e._e(),i("v-uni-view",{staticClass:"content"},[i("v-uni-view",{staticClass:"listBox mp-20"},[i("v-uni-view",{staticClass:"listBoxItem"},[i("v-uni-view",{staticClass:"listBoxItemLeft",attrs:{"data-type":"area"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindChange.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"iconfont icon-check",class:e.checkArea?"icon-check-on":""}),e._v("病区")],1),i("v-uni-picker",{attrs:{disabled:!e.checkArea,value:e.multiIndex,"range-key":e.name,range:e.multiArray},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindMultiPickerChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"listBoxItemRight"},[i("v-uni-text",[e._v(e._s(""==e.selectArea?"请选择病区/楼层":e.selectArea))]),i("v-uni-text",{staticClass:"iconfont icon-Icons_ToolBar_ArrowRight"})],1)],1)],1),i("v-uni-view",{staticClass:"listBoxline"}),i("v-uni-view",{staticClass:"listBoxItem"},[i("v-uni-view",{staticClass:"listBoxItemLeft",attrs:{"data-type":"bed"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindChange.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"iconfont icon-check",class:e.checkBed?"icon-check-on":""}),e._v("病床")],1),i("v-uni-picker",{attrs:{disabled:!e.checkBed,value:e.index,range:e.array},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.bindPickerChange.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"listBoxItemRight"},[i("v-uni-text",[e._v(e._s(""==e.selectbed?"请选择病床":e.selectbed))]),i("v-uni-text",{staticClass:"iconfont icon-Icons_ToolBar_ArrowRight"})],1)],1)],1),i("v-uni-view",{staticClass:"listBoxline"}),i("v-uni-view",{staticClass:"listBoxItem"},[i("v-uni-view",{staticClass:"listBoxItemLeft",attrs:{"data-type":"carer"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindChange.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"iconfont icon-check",class:e.checkCarer?"icon-check-on":""}),e._v("选择护工")],1),i("v-uni-view",{staticClass:"listBoxItemRight",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindSelectCarer.apply(void 0,arguments)}}},[i("v-uni-text",[e._v(e._s(""==e.selectCarer?"请选择":e.selectCarer))]),i("v-uni-text",{staticClass:"iconfont icon-Icons_ToolBar_ArrowRight"})],1)],1),i("v-uni-view",{staticClass:"listBoxline"}),i("v-uni-view",{staticClass:"listBoxItem"},[i("v-uni-view",{staticClass:"listBoxItemLeft",attrs:{"data-type":"price"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindChange.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"iconfont icon-check",class:e.checkPrice?"icon-check-on":""}),e._v("价格")],1),i("v-uni-view",{staticClass:"listBoxItemRight"},[i("v-uni-input",{staticClass:"listBoxItemInput",attrs:{type:"number","placeholder-class":"listBoxItemInputPlaceholder",placeholder:"请输入协商价格",disabled:!e.checkPrice,value:e.salePrice},on:{input:function(t){arguments[0]=t=e.$handleEvent(t),e.bindCaculate.apply(void 0,arguments)}}})],1)],1)],1)],1),i("v-uni-view",{staticClass:"bottom"},[i("v-uni-view",{staticClass:"btnBox"},[i("v-uni-view",{staticClass:"line-btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindBack.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"line-btn-txt"},[e._v("取消")])],1),i("v-uni-view",{staticClass:"line-btn line-btn-green",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.bindconfirm.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"line-btn-txt line-btn-txt-green"},[e._v("确定")])],1)],1)],1)],1)},c=[]},fee6:function(e,t,i){var n=i("24fb");t=n(!1),t.push([e.i,"uni-page-body[data-v-5c298cbf]{padding-top:%?160?%;padding-bottom:%?120?%}.btnBox[data-v-5c298cbf]{display:flex;justify-content:space-around;padding:%?30?%}.line-btn[data-v-5c298cbf]{display:flex;width:48%;height:%?90?%;background:#fff;border:%?2?% solid #0dc99e;line-height:%?90?%;justify-content:center;border-radius:8px;margin-left:1%;margin-right:1%}.line-btn-txt[data-v-5c298cbf]{font-family:SourceHanSansCN-Medium;font-size:%?32?%;color:#0dc99e;letter-spacing:0}.line-btn-green[data-v-5c298cbf]{background:#0dc99e}.line-btn-txt-green[data-v-5c298cbf]{color:#fff}.icon-check[data-v-5c298cbf]{font-size:%?36?%;margin-right:%?20?%}.icon-check-on[data-v-5c298cbf]{color:#0cb790}.icon-Icons_ToolBar_ArrowRight[data-v-5c298cbf]{color:rgba(0,0,0,.45);font-size:%?22?%;margin-left:%?13?%;margin-top:%?5?%}.selectBox[data-v-5c298cbf]{padding:%?30?%;background-color:#fff}.selectBoxTitle[data-v-5c298cbf]{font-family:SourceHanSansCN-Normal;font-size:%?24?%;color:#666;margin-bottom:%?20?%}.selectBoxTagBox[data-v-5c298cbf]{display:flex;flex-wrap:wrap}.selectBoxTag[data-v-5c298cbf]{width:%?210?%;height:%?48?%;background:rgba(13,201,158,.1);border:%?1?% solid #0dc99e;border-radius:%?8?%;line-height:%?48?%;justify-content:center;display:flex;align-items:center;margin-right:%?20?%;margin-top:%?20?%}.selectBoxTagD[data-v-5c298cbf]{font-family:SourceHanSansCN-Normal;font-size:%?28?%;color:#0dc99e;letter-spacing:0;line-height:%?36?%}.icon-close[data-v-5c298cbf]{font-size:%?24?%;color:#0dc99e;margin-left:%?12.5?%}",""]),e.exports=t}}]);