pages-index-applyForBuy-applyForBuyDetailEdit-applyForBuyDetailEdit.ebee6840.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-applyForBuy-applyForBuyDetailEdit-applyForBuyDetailEdit"],{1740:function(t,e,i){"use strict";i.r(e);var a=i("73b7"),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},"186c":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".input-bx[data-v-49ec0f28]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-49ec0f28]{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-49ec0f28]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-49ec0f28]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.choose-bx[data-v-49ec0f28]{height:%?700?%;width:100%;background:#fff}.detail-bx[data-v-49ec0f28]{padding:%?0?% %?20?%;border:1px solid #acacac}.li-item[data-v-49ec0f28]{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-49ec0f28]{font-size:%?30?%;color:#666;width:%?500?%}.li-amount[data-v-49ec0f28]{font-size:%?30?%;color:#666;position:absolute;right:%?0?%;top:%?20?%}.detail-li[data-v-49ec0f28]{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-49ec0f28]{font-size:%?30?%;color:#666;margin-left:%?20?%;display:block;width:100%;height:auto;padding:%?10?% 0}.ipt-input[data-v-49ec0f28]{width:%?200?%;height:%?50?%;border:1px solid #acacac;font-size:%?30?%;color:#666;margin-top:%?20?%;display:inline-block}.btn-del[data-v-49ec0f28]{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-49ec0f28]{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-49ec0f28]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-49ec0f28]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.li-item2[data-v-49ec0f28]{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-49ec0f28]{font-size:%?30?%;color:#666;font-weight:700}.li-bd2[data-v-49ec0f28]{font-size:%?30?%;color:#666}.demo-msg[data-v-49ec0f28]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-49ec0f28]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}.grace-scroll-y[data-v-49ec0f28]{height:%?800?%;width:100%}",""]),t.exports=e},"1f3a":function(t,e,i){"use strict";var a=i("991a"),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"),l=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"5dedde33",null,!1,a["a"],s);e["default"]=l.exports},"73b7":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")),l=a(i("3bab")),c=a(i("6c9b")),u={data:function(){return{searchValue:"",g_username:"epans",g_employeName:"Epans",g_employeId:"2",today_now:"2019-12-01",isShowChooseBx:!1,orderNumber:" ",dataList:[],detailList:[]}},onLoad:function(t){var e=this,i=uni.getStorageSync("g_employeName");e.g_employeName=i;uni.getStorageSync("g_pastureId");var a=e.get_today_now(),n=uni.getStorageSync("g_username"),o=uni.getStorageSync("g_employeId");e.g_username=n,e.g_employeId=o,e.today_now=a;var s=t.id,r=t.name;e.orderNumber=r,this.id=s;var l=JSON.parse(t.all);this.all=l,this.dataValue=l,console.log(l);i=uni.getStorageSync("g_employeName");e.g_employeName=i;uni.getStorageSync("g_pastureId"),a=e.get_today_now(),n=uni.getStorageSync("g_username"),o=uni.getStorageSync("g_employeId");e.dataValue.g_username=n,e.g_username=n,e.g_employeId=o,e.today_now=a;var c={name:"getpartpurchaseBybig",parammaps:{id:s}};e.ajax("/authdata/GetDataByName",c,"POST",e.get_detailList_data1);var u={name:"getSHstatueSG",parammaps:{id:s}};e.ajax("/authdata/GetDataByName",u,"POST",e.get_examstatus_data)},onBackPress:function(){return uni.navigateTo({url:"/pages/index/applyForBuy/applyForBuy"}),!0},methods:{get_detailList_data1:function(t){console.log("详情列表数据:",t);var e=t.data.list;this.detailList=null==e?[]:e},get_examstatus_data:function(t){console.log("审核状态:",t),this.status1=t.data.list[0]["库管审核"],this.status2=t.data.list[0]["技术助理审核"],this.status3=t.data.list[0]["采购审核"]},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},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("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;e.dataValue,uni.getStorageSync("g_pastureId"),uni.getStorageSync("g_pastureNum"),uni.getStorageSync("g_employeId"),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(r));var i=e.detailList.filter((function(t){return t.amount>t.reportery})),a=e.detailList.filter((function(t){return 0==t.amount}));console.log(i);var n=e.detailList.filter((function(t){return parseInt(t.amount)!=parseFloat(t.amount)}));if(n.length>0)uni.showModal({title:"提示",content:"申购数量不可为小数!",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else if(a.length>0)uni.showModal({title:"提示",content:"申购数量不可为0!",showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}});else{for(var o=[],s=0;s<e.detailList.length;s++)o.push(e.detailList[s]);o.map((function(t){return t.amount=t.amount.toString()})),console.log(o);var r={common:{returnmap:"0"},data:[{name:"updatepartpurchaseCharge",type:"e",parammaps:{id:e.id}},{name:"deletePartpurchase",type:"e",parammaps:{bigId:e.id}},{name:"insertSpotList",resultmaps:{list:o},children:[{name:"insertPartpurchase",type:"e",parammaps:{bigId:e.id,pastureId:"@insertSpotList.pastureId",partId:"@insertSpotList.partId",partCode:"@insertSpotList.partCode",partName:"@insertSpotList.partName",specification:"@insertSpotList.specification",unit:"@insertSpotList.unit",brandId:"@insertSpotList.brandId",storageAmount:"@insertSpotList.reportery",purpose:"@insertSpotList.purpose",amount:"@insertSpotList.amount",price:"@insertSpotList.price"}}]}]};e.ajax("/authdata/ExecDataByConfig",r,"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.show=!0,this.isShowChooseBx=!0},on_cancel_tap:function(t){uni.navigateTo({url:"/pages/index/applyForBuy/applyForBuy"})},get_edit_status3:function(t){console.log("保存状态:",t);if("ok"==t.msg)uni.showToast({title:"保存成功",duration:500,icon:"none",success:function(t){setTimeout((function(){uni.redirectTo({url:"/pages/index/applyForBuy/applyForBuy"})}),1e3)}});else{var e=t.data;uni.showModal({title:"保存失败"+e,content:e,showCancel:!1,success:function(t){t.confirm&&console.log("用户点击确定")}})}}},components:{gracePage:o.default,graceFlex:s.default,graceSelectImgAndUpload:r.default,graceNumberBox:n.default,graceShade:l.default,graceSearch:c.default}};e.default=u},"78bf":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.orderNumber))])],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=[]},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},"991a":function(t,e,i){var a=i("186c");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("21ba9013",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=[]},c431:function(t,e,i){"use strict";i.r(e);var a=i("78bf"),n=i("1740");for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("1f3a");var s,r=i("f0c5"),l=Object(r["a"])(n["default"],a["b"],a["c"],!1,null,"49ec0f28",null,!1,a["a"],s);e["default"]=l.exports}}]);