pages-index-collect-collectDetailAdd-collectDetailAdd.f6dfedb6.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-collect-collectDetailAdd-collectDetailAdd"],{"0dfe":function(t,e,i){var a=i("5eba");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=i("4f06").default;n("bdb7aa16",a,!0,{sourceMap:!1,shadowMode:!1})},"26aa":function(t,e,i){"use strict";i.r(e);var a=i("f28d"),n=i("4007");for(var o in n)"default"!==o&&function(t){i.d(e,t,(function(){return n[t]}))}(o);i("8632");var s,c=i("f0c5"),r=Object(c["a"])(n["default"],a["b"],a["c"],!1,null,"2a7bccd8",null,!1,a["a"],s);e["default"]=r.exports},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},4007:function(t,e,i){"use strict";i.r(e);var a=i("86b8"),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},"5eba":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".input-bx[data-v-2a7bccd8]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-2a7bccd8]{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-2a7bccd8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-2a7bccd8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.choose-bx[data-v-2a7bccd8]{height:%?700?%;width:100%;background:#fff}.detail-bx[data-v-2a7bccd8]{padding:%?0?% %?20?%;border:1px solid #acacac}.li-item[data-v-2a7bccd8]{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-2a7bccd8]{font-size:%?30?%;color:#666;width:%?500?%}.li-amount[data-v-2a7bccd8]{font-size:%?30?%;color:#666;position:absolute;right:%?0?%;top:%?20?%}.detail-li[data-v-2a7bccd8]{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-2a7bccd8]{font-size:%?30?%;color:#666;margin-left:%?20?%;display:block;width:100%;height:auto;padding:%?10?% 0}.ipt-input[data-v-2a7bccd8]{width:%?200?%;height:%?50?%;border:1px solid #acacac;font-size:%?30?%;color:#666;margin-top:%?20?%;display:inline-block}.btn-del[data-v-2a7bccd8]{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-2a7bccd8]{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-2a7bccd8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-2a7bccd8]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.li-item2[data-v-2a7bccd8]{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-2a7bccd8]{font-size:%?30?%;color:#666;font-weight:700}.li-bd2[data-v-2a7bccd8]{font-size:%?30?%;color:#666}.demo-msg[data-v-2a7bccd8]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-2a7bccd8]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}.grace-scroll-y[data-v-2a7bccd8]{height:%?800?%;width:100%}",""]),t.exports=e},"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,c=i("f0c5"),r=Object(c["a"])(n["default"],a["b"],a["c"],!1,null,"5dedde33",null,!1,a["a"],s);e["default"]=r.exports},8632:function(t,e,i){"use strict";var a=i("0dfe"),n=i.n(a);n.a},"86b8":function(t,e,i){"use strict";var a=i("4ea4");i("4de4"),i("4160"),i("d81d"),i("a434"),i("b680"),i("d3b7"),i("acd8"),i("25f0"),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")),c=a(i("ed72")),r=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:[],dataValue:{sumPrices:0}}},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 c={name:"autoCreatCode",parammaps:{codeType:"LY",pastureId:a}};e.ajax("/authdata/GetDataByName",c,"POST",e.get_orderCode_data)},onBackPress:function(){return uni.navigateTo({url:"/pages/index/collect/collect"}),!0},methods:{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:"getPartsListLY",offset:1,pagecount:50,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("id",o),console.log("detailList",s),null==s)e.detailList=[],n.amount=0,e.searchValue="",e.detailList.push(n);else{var c=s.filter((function(t){return t.id==o}));console.log("isExist",c),0==c.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]["note"]=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,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,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(l));var o=e.detailList.filter((function(t){return t.amount>t.reportery})),s=e.detailList.filter((function(t){return 0==t.amount}));if(console.log(o),o.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=[],r=0;r<e.detailList.length;r++)c.push(e.detailList[r]);c.map((function(t){return t.amount=t.amount.toString()})),console.log(c);var l={common:{returnmap:"0"},data:[{name:"insertBigpartapply",type:"e",parammaps:{pastureId:i,applyCode:e.orderCode,applyType:0,departmentId:n,empId:a,applyDate:e.today_now,SHStatus:e.dataValue.sumPrices>500?2:9}},{name:"insertSpotList",resultmaps:{list:c},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",note:"@insertSpotList.note",reportery:"@insertSpotList.reportery",contractId:"@insertSpotList.contractId"}}]}]};e.ajax("/authdata/ExecDataByConfig",l,"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)})),e.map((function(t){return t.sumPrice=0})),this.dataList=e,this.show=!0,this.isShowChooseBx=!0},get_orderCode_data:function(t){console.log("领用单号数据:",t),this.orderCode=t.data.list[0].orderCode},on_cancel_tap:function(t){uni.navigateTo({url:"/pages/index/collect/collect"})},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/collect/collect"})}),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:c.default,graceNumberBox:n.default,graceShade:r.default,graceSearch:l.default}};e.default=d},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},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=[]},f28d: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-text",{staticClass:"detli-tt"},[t._v("总价: "+t._s(e.sumPrice.toFixed(2)))]),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:"note","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.note,callback:function(i){t.$set(e,"note",i)},expression:"item.note"}})],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)]})),0!=t.detailList.length?i("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row"},[i("v-uni-text",{staticClass:" grace-black5 g-card-w"},[t._v("合计总价:")]),i("v-uni-text",{staticClass:" grace-black5"},[t._v(t._s(t.dataValue.sumPrices))])],1):t._e()],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=[]}}]);