(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-naturalGasMeter-naturalGasMeterDetailAdd-naturalGasMeterDetailAdd"],{3142:function(a,e,t){"use strict";var i;t.d(e,"b",(function(){return s})),t.d(e,"c",(function(){return n})),t.d(e,"a",(function(){return i}));var s=function(){var a=this,e=a.$createElement,t=a._self._c||e;return t("v-uni-view",{staticClass:"page"},[t("v-uni-view",{staticClass:"grace-list-items",staticStyle:{background:"#fff","margin-bottom":"16upx"}},[t("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[t("v-uni-text",{staticClass:"grace-icons icon-comments icon grace-blue"}),t("v-uni-text",{staticClass:"title grace-black"},[a._v("设备信息")]),t("v-uni-button",{staticClass:"grace-button",attrs:{type:"primary",size:"mini"},on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.on_replace_new.apply(void 0,arguments)}}},[a._v("更换新表")])],1),t("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[t("v-uni-text",{staticClass:" grace-black9 g-card-w"},[a._v("设备编号:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[a._v(a._s(a.dataValue.formNumber))])],1),t("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[t("v-uni-text",{staticClass:" grace-black9 g-card-w"},[a._v("设备名称:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[a._v(a._s(a.dataValue.formName))])],1),t("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[t("v-uni-text",{staticClass:" grace-black9 g-card-w"},[a._v("上次日期:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[a._v(a._s(void 0==a.dataValue.lastDate?" ":a.dataValue.lastDate))])],1)],1),t("v-uni-view",{staticClass:"g-line"}),t("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[t("v-uni-text",{staticClass:"grace-icons icon-article icon grace-blue"}),t("v-uni-text",{staticClass:"title grace-black"},[a._v("天然气表详情")])],1),t("graceShade",{attrs:{show:a.isShowChooseBx}},[t("v-uni-view",{staticClass:"demo-msg grace-relative"},[t("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[t("v-uni-text",{staticClass:"grace-icons icon-shoucang icon grace-red"}),t("v-uni-text",{staticClass:"title grace-black"},[a._v("更换新表")])],1),t("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(e){arguments[0]=e=a.$handleEvent(e),a.formSubmit2.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("设备编号")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"formNumber",placeholder:"",value:a.dataValue.formNumber,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("初始值")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"startAmount",placeholder:" "}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("日期")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"today_now",placeholder:"",value:a.today_now,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("记录人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:a.g_employeName,disabled:!0}})],1),t("v-uni-view",{staticClass:"btn-bx"},[t("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[a._v("保存")]),t("v-uni-button",{staticClass:"btn-res",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.formCancel2.apply(void 0,arguments)}}},[a._v("取消")])],1)],1),t("v-uni-view",{staticClass:"close-btn grace-icons icon-close3 grace-black grace-absolute-rt",on:{click:function(e){if(e.target!==e.currentTarget)return null;arguments[0]=e=a.$handleEvent(e),a.closeShade.apply(void 0,arguments)}}})],1)],1),t("v-uni-view",{staticClass:"input-bx"},[t("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(e){arguments[0]=e=a.$handleEvent(e),a.formSubmit.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("上次值")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"aAmount",placeholder:"",value:a.dataValue.aAmount,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("燃气类型")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"useType",placeholder:"",value:a.dataValue.useType,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("牧场")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"pastureName",placeholder:"",value:a.dataValue.pastureName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("部门")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"departName",placeholder:"",value:a.dataValue.departName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("负责人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"employeName",placeholder:"",value:a.dataValue.employeName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("当前值")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"endAmount",value:" "}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("单价")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"price",placeholder:"",value:a.dataValue.price}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[a._v("记录人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:a.g_employeName}})],1),t("v-uni-view",{staticClass:"grace-items grace-noborder"},[t("v-uni-view",{staticClass:"grace-label grace-bold"},[a._v("备注")])],1),t("v-uni-view",{staticClass:"grace-items grace-noborder"},[t("v-uni-view",{staticClass:"other"},[t("v-uni-textarea",{attrs:{placeholder:"请输入.....",name:"details",value:a.dataValue.note}})],1)],1),t("v-uni-view",{staticClass:"btn-bx"},[t("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[a._v("保存")]),t("v-uni-button",{staticClass:"btn-res",on:{click:function(e){arguments[0]=e=a.$handleEvent(e),a.formCancel.apply(void 0,arguments)}}},[a._v("取消")])],1)],1)],1)],1)},n=[]},5266:function(a,e,t){"use strict";var i=t("4ea4");t("acd8"),Object.defineProperty(e,"__esModule",{value:!0}),e.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:"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/naturalGasMeter/naturalGasMeter"}),!0},onLoad:function(a){var e=this,t=uni.getStorageSync("g_employeName");e.g_employeName=t,console.log("前一个页面数据:",a);var i=a.code;e.code=i,e.first_road_data()},methods:{first_road_data:function(a){var e=this,t=e.code,i=uni.getStorageSync("g_pastureId"),s="/authdata/GetDataByName",n={name:"findByNMeasureGas",parammaps:{formNumber:t,pastureId:i}};e.ajax(s,n,"POST",e.get_list_data)},on_replace_new:function(a){this.isShowChooseBx=!0},closeShade:function(){this.isShowChooseBx=!1},formSubmit2:function(a){var e=this,t=a.detail.value;console.log(t);var i=e.dataValue,s=uni.getStorageSync("g_pastureId"),n=uni.getStorageSync("g_employeId"),r={data:[{name:"changeMeasureCNG",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)),e.ajax("/authdata/ExecDataByConfig",r,"POST",e.get_add_status2)},get_add_status2:function(a){console.log("保存状态:",a);var e=this;if("ok"==a.msg)uni.showToast({title:"保存成功",duration:1e3,icon:"none",success:function(a){e.isShowChooseBx=!1,setTimeout((function(){e.first_road_data()}),500)}});else{var t=a.data;uni.showModal({title:"保存失败",content:t,showCancel:!1,success:function(a){a.confirm&&console.log("用户点击确定")}})}},formCancel2:function(a){this.isShowChooseBx=!1},road_name_id_time_data:function(a){var e=this,t=e.get_today_now(),i=uni.getStorageSync("g_username"),s=uni.getStorageSync("g_employeId");e.dataValue.g_username=i,e.g_username=i,e.g_employeId=s,e.dataValue.DATE=t,e.today_now=e.get_today()},formSubmit:function(a){var e=this,t=a.detail.value,i=this.dataValue,s=uni.getStorageSync("g_employeId"),n=uni.getStorageSync("g_pastureId"),r=e.get_today_now(),o={common:{returnmap:"0"},data:[{name:"checkMeasure",type:"v",parammaps:{endAmount:t.endAmount,checkdate:r,measureId:i.measureId}},{name:"insertGasExecData",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:""}},{name:"updateMeasureExecData",type:"e",parammaps:{endAmount:t.endAmount,measureId:i.measureId,endDate:r,lastRecodeId:"@insertGasExecData.LastInsertId"}}]};if(console.log("需要发送的数据:"+JSON.stringify(o)),parseFloat(t.endAmount)