1 |
- (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)<parseFloat(t.aAmount))uni.showToast({title:"当前值不得小于上次值!",duration:2e3,icon:"none"});else{var c="/authdata/ExecDataByConfig";e.ajax(c,o,"POST",e.get_add_status)}},formCancel:function(a){uni.redirectTo({url:"/pages/index/naturalGasMeter/naturalGasMeter"})},get_list_data:function(a){console.log("列表数据:",a),this.dataValue=a.data.list[0],this.road_name_id_time_data()},get_add_status:function(a){if(console.log("保存状态:",a),"ok"==a.msg)uni.showToast({title:"保存成功",duration:500,icon:"none",success:function(a){setTimeout((function(){uni.navigateTo({url:"/pages/index/naturalGasMeter/naturalGasMeter"})}),1e3)}});else{var e=a.data;uni.showToast({title:"保存失败"+e,duration:2e3,icon:"none"})}}},components:{gracePage:s.default,graceFlex:n.default,graceShade:r.default}};e.default=o},"59e4":function(a,e,t){"use strict";t.r(e);var i=t("5266"),s=t.n(i);for(var n in i)"default"!==n&&function(a){t.d(e,a,(function(){return i[a]}))}(n);e["default"]=s.a},"9edb":function(a,e,t){"use strict";var i=t("cbbd"),s=t.n(i);s.a},cbbd:function(a,e,t){var i=t("eca7");"string"===typeof i&&(i=[[a.i,i,""]]),i.locals&&(a.exports=i.locals);var s=t("4f06").default;s("363a6216",i,!0,{sourceMap:!1,shadowMode:!1})},e28c:function(a,e,t){"use strict";t.r(e);var i=t("3142"),s=t("59e4");for(var n in s)"default"!==n&&function(a){t.d(e,a,(function(){return s[a]}))}(n);t("9edb");var r,o=t("f0c5"),c=Object(o["a"])(s["default"],i["b"],i["c"],!1,null,"21029bae",null,!1,i["a"],r);e["default"]=c.exports},eca7:function(a,e,t){var i=t("24fb");e=i(!1),e.push([a.i,".input-bx[data-v-21029bae]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-21029bae]{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-21029bae]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-21029bae]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.demo-msg[data-v-21029bae]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-21029bae]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}",""]),a.exports=e}}]);
|