(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-applyForBuy-applyForBuyDetailAdd-applyForBuyDetailAdd"],{"12e5":function(t,e,i){"use strict";i.r(e);var a=i("cbf6"),n=i("ca51");for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("2c91");var s,r=i("f0c5"),c=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"adca454c",null,!1,a["a"],s);e["default"]=c.exports},2944:function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".input-bx[data-v-adca454c]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-adca454c]{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-adca454c]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-adca454c]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.choose-bx[data-v-adca454c]{height:%?700?%;width:100%;background:#fff}.detail-bx[data-v-adca454c]{padding:%?0?% %?20?%;border:1px solid #acacac}.li-item[data-v-adca454c]{height:auto;border-bottom:%?1?% solid #ccc;padding:%?10?% %?30?%;line-height:1.8;vertical-align:bottom;background:#fff;position:relative}.li-title[data-v-adca454c]{font-size:%?30?%;color:#666;width:%?500?%}.li-amount[data-v-adca454c]{font-size:%?30?%;color:#666;position:absolute;right:%?0?%;top:%?20?%}.detail-li[data-v-adca454c]{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-adca454c]{font-size:%?30?%;color:#666;margin-left:%?20?%;display:block;width:100%;height:auto;padding:%?10?% 0}.ipt-input[data-v-adca454c]{width:%?200?%;height:%?50?%;border:1px solid #acacac;font-size:%?30?%;color:#666;margin-top:%?20?%;display:inline-block}.btn-del[data-v-adca454c]{width:%?50?%;height:%?50?%;border-radius:50%;background:#f60;font-size:%?32?%;color:#fff;position:absolute;right:0;top:%?10?%;text-align:center}.btn-bx[data-v-adca454c]{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-adca454c]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-adca454c]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.li-item2[data-v-adca454c]{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-adca454c]{font-size:%?30?%;color:#666;font-weight:700}.li-bd2[data-v-adca454c]{font-size:%?30?%;color:#666}.demo-msg[data-v-adca454c]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-adca454c]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}.grace-scroll-y[data-v-adca454c]{height:%?800?%;width:100%}",""]),t.exports=e},"2c91":function(t,e,i){"use strict";var a=i("7f52"),n=i.n(a);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},"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"),c=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"5dedde33",null,!1,a["a"],s);e["default"]=c.exports},"7f52":function(t,e,i){var a=i("2944");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("74b89452",a,!0,{sourceMap:!1,shadowMode:!1})},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},"9cfd":function(t,e,i){"use strict";var a=i("618e"),n=i.n(a);n.a},ac33:function(t,e,i){"use strict";var a=i("4ea4");i("4de4"),i("d81d"),i("a434"),i("d3b7"),i("acd8"),i("e25e"),i("25f0"),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")),c=a(i("3bab")),l=a(i("6c9b")),d={data:function(){return{searchValue:"",g_username:"epans",g_employeName:"Epans",g_employeId:"2",today_now:"2019-12-01",isShowChooseBx:!1,orderCode:" ",dataList:[],detailList:[]}},onLoad:function(t){var e=this,i=uni.getStorageSync("g_employeName"),a=uni.getStorageSync("g_pastureId");e.g_employeName=i;var n=e.get_today_now(),o=uni.getStorageSync("g_username"),s=uni.getStorageSync("g_employeId");e.g_username=o,e.g_employeId=s,e.today_now=n;var r={name:"autoCreatCode",parammaps:{codeType:"SG",pastureId:a}};e.ajax("/authdata/GetDataByName",r,"POST",e.get_orderCode_data)},onBackPress:function(){return uni.navigateTo({url:"/pages/index/applyForBuy/applyForBuy"}),!0},methods:{on_close_tap:function(){this.isShowChooseBx=!1},inputting:function(t){console.log(t)},confirm:function(t){var e=this,i=uni.getStorageSync("g_pastureId");console.log(t);var a="/authdata/GetDataByName",n={name:"getPartsListSGAPP",offset:1,pagecount:50,parammaps:{partCode:t,pastureId:i}};e.ajax(a,n,"POST",e.get_chooselist_data)},closeShade: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("id",o),console.log("detailList",s),null==s)e.detailList=[],n.amount=0,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=0,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]))},on_fail_tap:function(t){var e=this,i=t.currentTarget.dataset.index;e.detailList;console.log("当前点击的数据",i);var a=t.detail.value;e.detailList[i]["purpose"]=a},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,e.detailList=i,console.log("当前更改:",JSON.stringify(e.detailList))},formSubmit:function(t){var e=this,i=(e.dataValue,uni.getStorageSync("g_pastureId")),a=(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("发送数据send_data3:"+JSON.stringify(d));var o=e.detailList.filter((function(t){return t.amount>t.reportery})),s=e.detailList.filter((function(t){return 0==t.amount}));console.log(o);var r=e.detailList.filter((function(t){return parseInt(t.amount)!=parseFloat(t.amount)}));if(console.log("rest_arr3",r),r.length>0)uni.showModal({title:"提示",content:"申购数量不可为小数!",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else if(s.length>0)uni.showModal({title:"提示",content:"申购数量不可为0!",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else{for(var c=[],l=0;l0?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=[]},ca51:function(t,e,i){"use strict";i.r(e);var a=i("ac33"),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},cbf6: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-view",{staticClass:"li-title"},[i("v-uni-text",[t._v("备件编号:"+t._s(e.partCode))])],1),i("v-uni-view",{staticClass:"li-title"},[i("v-uni-text",[t._v(t._s(e.partName)+" ("+t._s(e.specification)+")")])],1),i("v-uni-view",{staticClass:"li-amount"},[i("v-uni-text",[t._v("库存:"+t._s(e.reportery))])],1)],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.partCode))]),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-text",{staticClass:"detli-tt"},[t._v("品牌: "+t._s(e.brand))]),i("v-uni-text",{staticClass:"detli-tt"},[t._v("单价: "+t._s(e.price))]),i("v-uni-text",{staticClass:"detli-tt"},[t._v("现有库存: "+t._s(e.reportery))]),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-text",{staticClass:"detli-tt"},[t._v("备注:")]),i("v-uni-view",{staticClass:"detli-tt"},[i("v-uni-textarea",{attrs:{placeholder:"请输入.....",name:"purpose","data-index":a,"auto-height":!0},on:{input:function(e){arguments[0]=e=t.$handleEvent(e),t.on_fail_tap.apply(void 0,arguments)}},model:{value:e.purpose,callback:function(i){t.$set(e,"purpose",i)},expression:"item.purpose"}})],1),i("v-uni-text",{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("X")])],1)],1)]}))],2)],1),i("v-uni-view",{staticClass:"btn-bx"},[i("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[t._v("确定")]),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=[]}}]);