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