(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-todo-repair-repairDetail-repairDetailListAdd-repairDetailListAdd"],{3389:function(t,e,a){var i=a("24fb");e=i(!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},"366f":function(t,e,a){"use strict";a.r(e);var i=a("6014"),n=a("a567");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("68e3");var r,s=a("f0c5"),l=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"29eeba94",null,!1,i["a"],r);e["default"]=l.exports},"3b3e":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={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=i},"4dd4":function(t,e,a){"use strict";var i=a("4ea4");a("99af"),a("4de4"),a("4160"),a("d81d"),a("a434"),a("b680"),a("d3b7"),a("acd8"),a("25f0"),a("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(a("3423")),o=i(a("3fe5")),r=i(a("2e9e")),s=i(a("ed72")),l=i(a("3bab")),d=i(a("6c9b")),c={data:function(){return{searchValue:"",g_username:"epans",g_employeName:"Epans",g_employeId:"2",today_now:"2019-12-01",isShowChooseBx:!1,orderCode:" ",dataList:[],detailList:[],dataValue:{sumPrices:0}}},onLoad:function(t){var e=this,a=uni.getStorageSync("g_employeName"),i=uni.getStorageSync("g_pastureId");e.g_employeName=a;t.isbtn;e.isbtn=t.isbtn,console.log(t);t.id;var n=t.code;e.repairCode=n;var o=JSON.parse(t.all);console.log(o),this.dataValue=o,this.all=o,e.road_name_id_time_data();var r={name:"autoCreatCode",parammaps:{codeType:"LY",pastureId:i}};e.ajax("/authdata/GetDataByName",r,"POST",e.get_orderCode_data)},onBackPress:function(){return uni.navigateTo({url:"/pages/todo/repairDetail/repairDetail"}),!0},methods:{road_name_id_time_data:function(t){var e=this,a=e.get_today_now(),i=uni.getStorageSync("g_username"),n=uni.getStorageSync("g_employeId");e.dataValue.g_username=i,e.g_username=i,e.g_employeId=n,e.today_now=a},inputting:function(t){console.log(t)},confirm:function(t){var e=this,a=uni.getStorageSync("g_pastureId");console.log(t);var i="/authdata/GetDataByName",n={name:"getPartsListLY_m",parammaps:{partCode:t,pastureId:a}};e.ajax(i,n,"POST",e.get_chooselist_data)},on_close_tap:function(){this.isShowChooseBx=!1},onDataListTap:function(t){var e=this;e.isShowChooseBx=!1;var a=t.currentTarget.dataset.index,i=e.dataList,n=i[a];console.log("当前点击的数据",JSON.stringify(n));var o=n.id,r=e.detailList;if(console.log("id",o),console.log("detailList",r),null==r)e.detailList=[],n.amount=0,e.searchValue="",e.detailList.push(n);else{var s=r.filter((function(t){return t.id==o}));console.log("isExist",s),0==s.length&&(n.amount=0,e.searchValue="",console.log(n),e.detailList.push(n)),e.dataList=[]}},on_note_tap:function(t){var e=this,a=t.currentTarget.dataset.index;e.detailList;console.log("当前点击的数据",a);var i=t.detail.value;e.detailList[a]["note"]=i},on_new_tap:function(t){var e=this,a={name:"getPartapply_mr",parammaps:{RUCode:e.repairCode}};e.ajax("/authdata/GetDataByName",a,"POST",e.get_new_data)},onDetailListTap:function(t){var e=this,a=t.currentTarget.dataset.index,i=e.detailList;console.log("当前点击的数据",JSON.stringify(i[a]))},onDeleteTap:function(t){var e=this,a=t.currentTarget.dataset.index,i=e.detailList;console.log("当前点击的数据",JSON.stringify(i[a])),e.detailList.splice(a,1)},grace_number_change:function(t){var e=this,a=e.detailList,i=t[1],n=t[0];a[i]["amount"]=n,a[i]["sumPrice"]=n*a[i]["price"],e.detailList=a,console.log("当前更改:",JSON.stringify(e.detailList));var o=0;a.forEach((function(t,e){o+=t["sumPrice"]})),e.dataValue.sumPrices=o.toFixed(2)},formSubmit:function(t){var e=this,a=(e.dataValue,uni.getStorageSync("g_pastureId")),i=(uni.getStorageSync("g_pastureNum"),uni.getStorageSync("g_employeId")),n=uni.getStorageSync("g_dempmId");if(0==e.detailList.length)wx.showModal({title:"提示",content:"请选择领用备件",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else{console.log("发送数据:"+JSON.stringify(e.detailList));var o=e.detailList.filter((function(t){return t.amount>t.reportery})),r=e.detailList.filter((function(t){return 0==t.amount}));if(console.log(o),r.length>0)uni.showModal({title:"提示",content:"领用数量不可为零!",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else{var s=function(t){return JSON.parse(JSON.stringify(t))},l=s(e.detailList);l.map((function(t){return t.amount=t.amount.toString()})),console.log("tempDetail======",l);var d=s(l),c=s(l);0!=d.length&&(d.forEach((function(t,e){if(t.amount>t.reportery){console.log(t.amount),console.log(t.reportery);var a=parseFloat(t.amount)-parseFloat(t.reportery);d[e].amount=a}else d.splice(e,1)})),d.map((function(t){return t.amount=parseFloat(t.amount).toFixed(2)})),d.map((function(t){return t.amount=t.amount.toString()})),d.map((function(t){return t.reportery=t.reportery.toString()}))),console.log("big_arr======",d);var p=[];0!=c.length&&(c.forEach((function(t,e){if(console.log("j",e),parseFloat(t.amount)<=parseFloat(t.reportery)){console.log("=====小");var a=parseFloat(t.amount);c[e].amount=a,p.push(c[e])}else if(0!=t.reportery&&parseFloat(t.amount)>parseFloat(t.reportery)){console.log("amount====>",t.reportery),console.log("amount====>",t.amount);var i=parseFloat(t.reportery);c[e].amount=i,p.push(c[e]),console.log("=====大")}else console.log("=====无")})),console.log("smarll_arr======",c),p.map((function(t){return t.amount=parseFloat(t.amount).toFixed(2)})),p.map((function(t){return t.amount=t.amount.toString()})),p.map((function(t){return t.reportery=t.reportery.toString()}))),l.map((function(t){return t.reportery=t.reportery.toString()}));var u={common:{returnmap:"0"},data:[{name:"insertSpotList3",resultmaps:{list:l},children:[{name:"updatePartapplyuseAmount_m",type:"e",parammaps:{amount:"@insertSpotList3.amount",paid:"@insertSpotList3.contractId",RUCode:e.repairCode}}]},{name:"insertBigpartapply_m",type:"e",parammaps:{pastureId:a,applyCode:e.orderCode,applyType:1,departmentId:n,empId:i,applyDate:e.today_now,RUCode:e.repairCode}},{name:"insertSpotList2",resultmaps:{list:d},children:[{name:"insertpartapply_m",type:"e",parammaps:{bigId:e.repairCode,prid:"@insertSpotList2.prid",pastureId:"@insertSpotList2.pastureId",partId:"@insertSpotList2.partId",partCode:"@insertSpotList2.partCode",partName:"@insertSpotList2.partName",specification:"@insertSpotList2.specification",brandId:"@insertSpotList2.brandId",price:"@insertSpotList2.price",amount:"@insertSpotList2.amount",eqName:e.all.eqName,eqCode:e.all.eqCode,providerId:"@insertSpotList2.providerId",note:"@insertSpotList2.note",reportery:"@insertSpotList2.reportery",contractId:"@insertSpotList2.contractId"}}]}]},f={common:{returnmap:"0"},data:[{name:"insertSpotList3",resultmaps:{list:l},children:[{name:"updatePartapplyuseAmount_m",type:"e",parammaps:{amount:"@insertSpotList3.amount",paid:"@insertSpotList3.contractId",RUCode:e.repairCode}}]},{name:"insertBigpartapply_m",type:"e",parammaps:{pastureId:a,applyCode:e.orderCode,applyType:1,departmentId:n,empId:i,applyDate:e.today_now,RUCode:e.repairCode}},{name:"insertSpotList2",resultmaps:{list:d},children:[{name:"insertpartapply_m",type:"e",parammaps:{bigId:e.repairCode,prid:"@insertSpotList2.prid",pastureId:"@insertSpotList2.pastureId",partId:"@insertSpotList2.partId",partCode:"@insertSpotList2.partCode",partName:"@insertSpotList2.partName",specification:"@insertSpotList2.specification",brandId:"@insertSpotList2.brandId",price:"@insertSpotList2.price",amount:"@insertSpotList2.amount",eqName:e.all.eqName,eqCode:e.all.eqCode,providerId:"@insertSpotList2.providerId",note:"@insertSpotList2.note",reportery:"@insertSpotList2.reportery",contractId:"@insertSpotList2.contractId"}}]},{name:"insertBigpartapply",type:"e",parammaps:{pastureId:a,applyCode:e.orderCode,applyType:1,departmentId:e.dataValue.departmentId,empId:i,applyDate:e.today_now,RUCode:e.repairCode,SHStatus:e.dataValue.sumPrices>500?2:9}},{name:"insertSpotList",resultmaps:{list:p},children:[{name:"insertpartapply",type:"e",parammaps:{bigId:"@insertBigpartapply.LastInsertId",pastureId:"@insertSpotList.pastureId",partId:"@insertSpotList.partId",contractId:"@insertSpotList.contractId",partCode:"@insertSpotList.partCode",partName:"@insertSpotList.partName",specification:"@insertSpotList.specification",brandId:"@insertSpotList.brandId",price:"@insertSpotList.price",amount:"@insertSpotList.amount",eqName:e.all.eqName,eqCode:e.all.eqCode,providerId:"@insertSpotList.providerId",reportery:"@insertSpotList.reportery",note:"@insertSpotList.note"}}]}]};console.log("send_data3",JSON.stringify(u)),console.log("send_data4",JSON.stringify(f)),0==p.length?e.ajax("/authdata/ExecDataByConfig",u,"POST",e.get_edit_status3):e.ajax("/authdata/ExecDataByConfig",f,"POST",e.get_edit_status3)}}},get_new_data:function(t){if(console.log("新列表数据:",t),t.data.list){var e=this,a=t.data.list,i=e.detailList;a.map((function(t){return t.amount=parseFloat(t.amount)})),a.map((function(t){return t.reportery=parseFloat(t.reportery)}));for(var n=0;n0?a("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=[]},f56f:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".input-bx[data-v-29eeba94]{height:auto;background:#fff;padding:0 %?30?%}.btn-sub[data-v-29eeba94]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-29eeba94]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.choose-bx[data-v-29eeba94]{height:%?700?%;width:100%;background:#fff}.detail-bx[data-v-29eeba94]{padding:%?0?% %?20?%;border:1px solid #acacac}.li-item[data-v-29eeba94]{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-29eeba94]{font-size:%?30?%;color:#666;width:%?440?%}.li-date[data-v-29eeba94]{font-size:%?30?%;color:#666}.detail-li[data-v-29eeba94]{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-29eeba94]{font-size:%?30?%;color:#666;margin-left:%?20?%;display:block;width:100%;height:auto;padding:%?10?% 0}.ipt-input[data-v-29eeba94]{width:%?200?%;height:%?50?%;border:1px solid #acacac;font-size:%?30?%;color:#666;margin-top:%?20?%;display:inline-block}.btn-del[data-v-29eeba94]{width:%?200?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff;position:absolute;right:0;bottom:%?10?%}.btn-bx[data-v-29eeba94]{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%}.btn-sub[data-v-29eeba94]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-29eeba94]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.li-item2[data-v-29eeba94]{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-29eeba94]{font-size:%?30?%;color:#666;font-weight:700}.li-bd2[data-v-29eeba94]{font-size:%?30?%;color:#666}.demo-msg[data-v-29eeba94]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-29eeba94]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}.grace-scroll-y[data-v-29eeba94]{height:%?800?%;width:100%}",""]),t.exports=e}}]);