(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-todo-maintenance-maintenanceDetail-maintenanceDetailListEdit-maintenanceDetailListEdit"],{"1dbb":function(t,e,i){"use strict";i.r(e);var a=i("4e86"),n=i("2c9f");for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("f22d");var s,r=i("f0c5"),d=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"aa2d79e8",null,!1,a["a"],s);e["default"]=d.exports},"2c9f":function(t,e,i){"use strict";i.r(e);var a=i("9b41"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},3389:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".gui-search[data-v-5dedde33]{background:#fff;border-radius:%?66?%;box-sizing:border-box;padding:0 %?10?%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden}.gui-search-icon[data-v-5dedde33]{text-align:center;-webkit-flex-shrink:0;flex-shrink:0}.gui-search-input[data-v-5dedde33]{width:%?600?%;margin:0 %?10?%;border:none;padding:0}",""]),t.exports=e},"3b3e":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={props:{height:{type:String,default:"60rpx"},background:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"28rpx"},iconWidth:{type:String,default:"60rpx"},iconColor:{type:String,default:"#A5A7B2"},iconFontSize:{type:String,default:"30rpx"},inputHeight:{type:String,default:"30rpx"},inputFontSize:{type:String,default:"26rpx"},placeholder:{type:String,default:"关键字"},kwd:{type:String,default:""}},data:function(){return{inputVal:""}},created:function(){this.inputVal=this.kwd},methods:{clearKwd:function(){this.inputVal="",this.$emit("clear","")},inputting:function(t){this.$emit("inputting",t.detail.value)},confirm:function(t){this.$emit("confirm",t.detail.value)}}};e.default=a},"4e86":function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"page"},[i("v-uni-view",{staticClass:"grace-list-items",staticStyle:{background:"#fff","margin-bottom":"16upx"}},[i("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[i("v-uni-text",{staticClass:"grace-icons icon-comments icon grace-blue"}),i("v-uni-text",{staticClass:"title grace-black"},[t._v("领用单号:"+t._s(t.orderCode))])],1)],1),i("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[i("v-uni-text",{staticClass:"grace-icons icon-article icon grace-blue"}),i("v-uni-text",{staticClass:"title grace-black"},[t._v("备件领用")])],1),i("v-uni-view",{staticStyle:{padding:"30rpx","background-color":"#F6F7F8"}},[i("graceSearch",{attrs:{placeholder:"请输入编号或名称"},on:{inputting:function(e){arguments[0]=e=t.$handleEvent(e),t.inputting.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"input-bx"},[i("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(e){arguments[0]=e=t.$handleEvent(e),t.formSubmit.apply(void 0,arguments)}}},[i("v-uni-view",{staticClass:"equit-bx"},[i("graceShade",{attrs:{show:t.isShowChooseBx}},[i("v-uni-view",{staticClass:"demo-msg grace-relative"},[i("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[i("v-uni-text",{staticClass:"grace-icons icon-shoucang icon grace-red"}),i("v-uni-text",{staticClass:"title grace-black"},[t._v("新增备件")])],1),i("v-uni-scroll-view",{staticClass:"grace-scroll-y",attrs:{"scroll-y":!0,"scroll-top":"30"}},[t._l(t.dataList,(function(e,a){return[i("v-uni-view",{staticClass:"li-item",attrs:{"data-index":a},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onDataListTap.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"li-title"},[t._v(t._s(e.partName)+" ("+t._s(e.specification)+")")]),i("v-uni-text",{staticClass:"li-date"},[t._v("库存:"+t._s(e.reportery)+t._s(e.unit))])],1)]}))],2),i("v-uni-view",{staticClass:"btn-bx"},[i("v-uni-button",{staticClass:"btn-sub",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.on_close_tap.apply(void 0,arguments)}}},[t._v("关闭")])],1)],1)],1),i("v-uni-view",{staticClass:"detail-bx"},[t._l(t.detailList,(function(e,a){return[i("v-uni-view",{staticClass:"detail-li",attrs:{"data-index":a},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onDetailListTap.apply(void 0,arguments)}}},[i("v-uni-view",{staticStyle:{width:"100%",position:"relative"}},[i("v-uni-text",{staticClass:"detli-tt"},[t._v("名称: "+t._s(e.partName))]),i("v-uni-text",{staticClass:"detli-tt"},[t._v("规格: "+t._s(e.specification))]),i("v-uni-view",{staticClass:"detli-tt",staticStyle:{"vertical-align":"top"}},[i("v-uni-text",{},[t._v("数量:")]),i("v-uni-view",{staticStyle:{display:"inline-block",width:"300upx"}},[i("graceNumberBox",{attrs:{value:e.amount,minNum:0,index:a,step:1},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.grace_number_change.apply(void 0,arguments)}}})],1)],1),i("v-uni-button",{staticClass:"btn-del",attrs:{"data-index":a},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.onDeleteTap.apply(void 0,arguments)}}},[t._v("删除")])],1)],1)]}))],2)],1),i("v-uni-view",{staticClass:"btn-bx"},[i("v-uni-button",{staticClass:"btn-sub",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.on_cancel_tap.apply(void 0,arguments)}}},[t._v("返回")])],1)],1)],1)],1)},o=[]},"618e":function(t,e,i){var a=i("3389");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("d6865264",a,!0,{sourceMap:!1,shadowMode:!1})},"6c9b":function(t,e,i){"use strict";i.r(e);var a=i("ad69"),n=i("9673");for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("9cfd");var s,r=i("f0c5"),d=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"5dedde33",null,!1,a["a"],s);e["default"]=d.exports},9673:function(t,e,i){"use strict";i.r(e);var a=i("3b3e"),n=i.n(a);for(var o in a)"default"!==o&&function(t){i.d(e,t,(function(){return a[t]}))}(o);e["default"]=n.a},"9b41":function(t,e,i){"use strict";var a=i("4ea4");i("4de4"),i("4160"),i("d81d"),i("a434"),i("b680"),i("acd8"),i("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(i("3423")),o=a(i("3fe5")),s=a(i("2e9e")),r=a(i("ed72")),d=a(i("3bab")),l=a(i("6c9b")),c={data:function(){return{searchValue:"",g_username:"epans",g_employeName:"Epans",g_employeId:"2",today_now:"2019-12-01",isShowChooseBx:!1,useform:"",dataList:[],detailList:[],dataValue:{sumPrices:0}}},onLoad:function(t){var e=this,i=uni.getStorageSync("g_employeName"),a=uni.getStorageSync("g_pastureId");e.g_employeName=i;t.isbtn;e.isbtn=t.isbtn;t.isadd;e.isadd=t.isadd,console.log(t);var n=t.id;e.id=n;var o=t.usecode;e.orderCode=o;var s=JSON.parse(t.all);console.log(s),this.dataValue=s,this.all=s;var r="/authdata/GetDataByName",d={name:"getpartapplyListBybig",parammaps:{id:n,pastureId:a}};e.ajax(r,d,"POST",e.get_detailList_data),e.road_name_id_time_data()},onBackPress:function(){var t=this.isbtn;return uni.navigateTo({url:"/pages/todo/maintenanceDetail/maintenanceDetail?isbtn="+t}),!0},methods:{road_name_id_time_data:function(t){var e=this,i=e.get_today_now(),a=uni.getStorageSync("g_username"),n=uni.getStorageSync("g_employeId");e.dataValue.g_username=a,e.g_username=a,e.g_employeId=n,e.today_now=i},inputting:function(t){console.log(t)},confirm:function(t){var e=this;console.log(t);var i=uni.getStorageSync("g_pastureId"),a="/authdata/GetDataByName",n={name:"getPartsListLY",parammaps:{partCode:t,pastureId:i}};e.ajax(a,n,"POST",e.get_chooselist_data)},on_close_tap:function(){this.isShowChooseBx=!1},onDataListTap:function(t){var e=this;e.isShowChooseBx=!1;var i=t.currentTarget.dataset.index,a=e.dataList,n=a[i];console.log("当前点击的数据",JSON.stringify(n));var o=n.id,s=e.detailList;if(console.log("detailList",s),null==s)e.detailList=[],n.amount=1,e.searchValue="",e.detailList.push(n);else{var r=s.filter((function(t){return t.id==o}));console.log("isExist",r),0==r.length&&(n.amount=1,e.searchValue="",console.log(n),e.detailList.push(n)),e.dataList=[]}},onDetailListTap:function(t){var e=this,i=t.currentTarget.dataset.index,a=e.detailList;console.log("当前点击的数据",JSON.stringify(a[i]))},onDeleteTap:function(t){var e=this,i=t.currentTarget.dataset.index,a=e.detailList;console.log("当前点击的数据",JSON.stringify(a[i])),e.detailList.splice(i,1)},grace_number_change:function(t){var e=this,i=e.detailList,a=t[1],n=t[0];i[a]["amount"]=n,i[a]["sumPrice"]=n*i[a]["price"],e.detailList=i,console.log("当前更改:",JSON.stringify(e.detailList));var o=0;i.forEach((function(t,e){o+=t["sumPrice"]})),e.dataValue.sumPrices=o.toFixed(2)},formSubmit:function(t){var e=this,i=e.dataValue,a=uni.getStorageSync("g_pastureId"),n=(uni.getStorageSync("g_pastureNum"),uni.getStorageSync("g_employeId")),o=uni.getStorageSync("g_dempmId"),s={common:{returnmap:"0"},data:[{name:"insertBigpartapply",type:"e",parammaps:{pastureId:a,applyCode:e.orderCode,applyType:2,departmentId:o,empId:n,applyDate:e.today_now,RUCode:i.upkeepCode,SHStatus:e.dataValue.sumPrices>500?2:9}},{name:"insertSpotList",resultmaps:{list:e.detailList},children:[{name:"insertpartapply",type:"e",parammaps:{bigId:"@insertBigpartapply.LastInsertId",pastureId:"@insertSpotList.pastureId",partId:"@insertSpotList.partId",partCode:"@insertSpotList.partCode",partName:"@insertSpotList.partName",specification:"@insertSpotList.specification",brandId:"@insertSpotList.brandId",price:"@insertSpotList.price",amount:"@insertSpotList.amount",eqName:"@insertSpotList.eqName",eqCode:"@insertSpotList.eqCode",providerId:"@insertSpotList.providerId",reportery:"@insertSpotList.reportery",note:"@insertSpotList.note"}}]}]};console.log("发送数据:"+JSON.stringify(s)),e.ajax("/authdata/ExecDataByConfig",s,"POST",e.get_edit_status3)},get_chooselist_data:function(t){console.log("列表数据:",t);var e=t.data.list;e.map((function(t){return t.reportery=parseFloat(t.reportery)})),this.dataList=e,this.isShowChooseBx=!0},get_detailList_data:function(t){if(console.log("详情列表数据:",t),void 0==t.data.list)this.detailList=[];else{var e=t.data.list;e.map((function(t){return t.amount=parseFloat(t.amount)})),console.log("详情列表数据:",e),this.detailList=e}},on_cancel_tap:function(t){var e=this,i=e.all,a=e.isbtn,n=i.id;uni.redirectTo({url:"/pages/todo/maintenance/maintenanceDetail/maintenanceDetail?all="+JSON.stringify(i)+"&id="+n+"&isbtn="+a})},get_edit_status3:function(t){console.log("保存状态:",t);var e=this,i=e.all,a=i.id;if(console.log(i),"ok"==t.msg)uni.showToast({title:"保存成功",duration:500,icon:"none",success:function(t){setTimeout((function(){uni.redirectTo({url:"/pages/todo/maintenance/maintenanceDetail/maintenanceDetail?all="+JSON.stringify(i)+"&isbtn=yes&id="+a})}),1e3)}});else{var n=t.data;uni.showModal({title:"保存失败"+n,content:n,showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}})}}},components:{gracePage:o.default,graceFlex:s.default,graceSelectImgAndUpload:r.default,graceNumberBox:n.default,graceShade:d.default,graceSearch:l.default}};e.default=c},"9b59":function(t,e,i){var a=i("eeef");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("db4d3918",a,!0,{sourceMap:!1,shadowMode:!1})},"9cfd":function(t,e,i){"use strict";var a=i("618e"),n=i.n(a);n.a},ad69:function(t,e,i){"use strict";var a;i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return a}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"gui-search",style:{height:t.height,backgroundColor:t.background}},[i("v-uni-view",{staticClass:"gui-search-icon grace-icons icon-search",style:{color:t.iconColor,fontSize:t.iconFontSize,lineHeight:t.height,width:t.iconWidth}}),i("v-uni-input",{staticClass:"gui-search-input",style:{height:t.inputHeight,lineHeight:t.inputHeight,fontSize:t.inputFontSize},attrs:{type:"text",value:"",placeholder:t.placeholder,"confirm-type":"search"},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.inputting.apply(void 0,arguments)},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.confirm.apply(void 0,arguments)}},model:{value:t.inputVal,callback:function(e){t.inputVal=e},expression:"inputVal"}}),t.inputVal.length>0?i("v-uni-view",{staticClass:"gui-search-icon grace-icons icon-close",style:{color:t.iconColor,fontSize:t.iconFontSize,lineHeight:t.height,width:t.iconWidth},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.clearKwd.apply(void 0,arguments)}}}):t._e()],1)},o=[]},eeef:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".input-bx[data-v-aa2d79e8]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-aa2d79e8]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding:%?30?% 0}.btn-sub[data-v-aa2d79e8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-aa2d79e8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.choose-bx[data-v-aa2d79e8]{height:%?700?%;width:100%;background:#fff}.detail-bx[data-v-aa2d79e8]{padding:%?0?% %?20?%;border:1px solid #acacac}.li-item[data-v-aa2d79e8]{height:auto;border-bottom:%?1?% solid #ccc;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;padding:%?10?% %?30?%;line-height:1.8;vertical-align:bottom;background:#fff}.li-title[data-v-aa2d79e8]{font-size:%?30?%;color:#666;width:%?450?%}.li-date[data-v-aa2d79e8]{font-size:%?30?%;color:#666}.detail-li[data-v-aa2d79e8]{width:100%;height:auto;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;border-bottom:%?1?% solid #d3d3d3;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;box-sizing:border-box}.detli-tt[data-v-aa2d79e8]{font-size:%?30?%;color:#666;margin-left:%?20?%;display:block;width:100%;height:auto;padding:%?10?% 0}.ipt-input[data-v-aa2d79e8]{width:%?200?%;height:%?50?%;border:1px solid #acacac;font-size:%?30?%;color:#666;margin-top:%?20?%;display:inline-block}.btn-del[data-v-aa2d79e8]{width:%?200?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff;position:absolute;right:0;bottom:%?10?%}.btn-bx[data-v-aa2d79e8]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;margin-top:%?80?%}.btn-sub[data-v-aa2d79e8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-aa2d79e8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.li-item2[data-v-aa2d79e8]{height:%?90?%;border-bottom:%?1?% solid #ccc;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;margin:%?0?% %?30?%;line-height:3;vertical-align:bottom}.li-hd2[data-v-aa2d79e8]{font-size:%?30?%;color:#666;font-weight:700}.li-bd2[data-v-aa2d79e8]{font-size:%?30?%;color:#666}.demo-msg[data-v-aa2d79e8]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-aa2d79e8]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}.grace-scroll-y[data-v-aa2d79e8]{height:%?800?%;width:100%}",""]),t.exports=e},f22d:function(t,e,i){"use strict";var a=i("9b59"),n=i.n(a);n.a}}]);