(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-electricityMeter-electricityMeterDetailAdd-electricityMeterDetailAdd"],{"234d":function(e,t,a){"use strict";var i=a("4ea4");a("acd8"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=i(a("3fe5")),n=i(a("2e9e")),c=i(a("3bab")),r={data:function(){return{g_username:"epans",g_employeName:"Epans",g_employeId:"2",code:"",today_now:"2020-10-10",isShowChooseBx:!1,dataValue:{formNumber:"0.8NT01",aAmount:"100",formName:"设备部电表",DATE:"2019-06-06",useType:"生活用电",pastureName:"商河牧场",departName:"设备部",employeName:"小明",price:"5元",note:""}}},onBackPress:function(){return uni.redirectTo({url:"/pages/index/electricityMeter/electricityMeter"}),!0},onLoad:function(e){var t=this,a=uni.getStorageSync("g_employeName");t.g_employeName=a,console.log("前一个页面数据:",e);var i=e.code;t.code=i,t.first_road_data()},methods:{first_road_data:function(e){var t=this,a=t.code,i=uni.getStorageSync("g_pastureId"),s="/authdata/GetDataByName",n={name:"findByNMeasureElec",parammaps:{formNumber:a,pastureId:i}};t.ajax(s,n,"POST",t.get_list_data)},on_replace_new:function(e){this.isShowChooseBx=!0},closeShade:function(){this.isShowChooseBx=!1},formSubmit2:function(e){var t=this,a=e.detail.value;console.log(a);var i=t.dataValue,s=uni.getStorageSync("g_pastureId"),n=uni.getStorageSync("g_employeId"),c={data:[{name:"changeMeasureElec",type:"e",parammaps:{startAmount:a.startAmount,pastureId:s,formNumber:a.formNumber}},{name:"addChangeMeasure",type:"e",parammaps:{measureId:i.measureId,changeId:n,pastureId:s}}]};console.log("保存原始数据:"+JSON.stringify(a)),console.log("需要发送的数据:"+JSON.stringify(c)),t.ajax("/authdata/ExecDataByConfig",c,"POST",t.get_add_status2)},get_add_status2:function(e){console.log("保存状态:",e);var t=this;if("ok"==e.msg)uni.showToast({title:"保存成功",duration:1e3,icon:"none",success:function(e){t.isShowChooseBx=!1,setTimeout((function(){t.first_road_data()}),500)}});else{var a=e.data;uni.showModal({title:"保存失败"+a,content:a,showCancel:!1,success:function(e){e.confirm&&console.log("用户点击确定")}})}},formCancel2:function(e){this.isShowChooseBx=!1},road_name_id_time_data:function(e){var t=this,a=t.get_today_now(),i=uni.getStorageSync("g_username"),s=uni.getStorageSync("g_employeId");t.dataValue.g_username=i,t.g_username=i,t.g_employeId=s,t.dataValue.DATE=a,t.today_now=t.get_today()},formSubmit:function(e){var t=this,a=e.detail.value,i=this.dataValue,s=uni.getStorageSync("g_employeId"),n=uni.getStorageSync("g_pastureId"),c=t.get_today_now(),r={common:{returnmap:"0"},data:[{name:"checkMeasure",type:"v",parammaps:{endAmount:a.endAmount,checkdate:c,measureId:i.measureId}},{name:"insertElecExecData",type:"e",parammaps:{endAmount:a.endAmount,measureId:i.measureId,rate:i.rate,employeId:s,formNumber:i.formNumber,formName:i.formName,price:i.price,pastureId:n,note:a.note}},{name:"updateMeasureExecData",type:"e",parammaps:{endAmount:a.endAmount,measureId:i.measureId,endDate:c,lastRecodeId:"@insertElecExecData.LastInsertId"}}]};if(console.log("需要发送的数据:"+JSON.stringify(r)),parseFloat(a.endAmount)