pages-index-electricityMeter-electricityMeterDetailAdd-electricityMeterDetailAdd.1b9298ff.js 12 KB

1
  1. (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)<parseFloat(a.aAmount))uni.showToast({title:"当前值不得小于上次值!",duration:2e3,icon:"none"});else{var o="/authdata/ExecDataByConfig";t.ajax(o,r,"POST",t.get_add_status)}},formCancel:function(e){uni.redirectTo({url:"/pages/index/electricityMeter/electricityMeter"})},get_list_data:function(e){console.log("列表数据:",e),this.dataValue=e.data.list[0],this.road_name_id_time_data()},get_add_status:function(e){if(console.log("保存状态:",e),"ok"==e.msg)uni.showToast({title:"保存成功",duration:500,icon:"none",success:function(e){setTimeout((function(){uni.redirectTo({url:"/pages/index/electricityMeter/electricityMeter"})}),1e3)}});else{var t=e.data;uni.showToast({title:"保存失败"+t,duration:2e3,icon:"none"})}}},components:{gracePage:s.default,graceFlex:n.default,graceShade:c.default}};t.default=r},"4b5c":function(e,t,a){"use strict";var i=a("a88e"),s=a.n(i);s.a},a88e:function(e,t,a){var i=a("d743");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var s=a("4f06").default;s("c6f0b9ac",i,!0,{sourceMap:!1,shadowMode:!1})},b745:function(e,t,a){"use strict";a.r(t);var i=a("d727"),s=a("eb12");for(var n in s)"default"!==n&&function(e){a.d(t,e,(function(){return s[e]}))}(n);a("4b5c");var c,r=a("f0c5"),o=Object(r["a"])(s["default"],i["b"],i["c"],!1,null,"36c45903",null,!1,i["a"],c);t["default"]=o.exports},d727:function(e,t,a){"use strict";var i;a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return i}));var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"page"},[a("v-uni-view",{staticClass:"grace-list-items",staticStyle:{background:"#fff","margin-bottom":"16upx"}},[a("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[a("v-uni-text",{staticClass:"grace-icons icon-comments icon grace-blue"}),a("v-uni-text",{staticClass:"title grace-black"},[e._v("设备信息")]),a("v-uni-button",{staticClass:"grace-button",attrs:{type:"primary",size:"mini"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.on_replace_new.apply(void 0,arguments)}}},[e._v("更换新表")])],1),a("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[a("v-uni-text",{staticClass:" grace-black9 g-card-w"},[e._v("设备编号:")]),a("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(e.dataValue.formNumber))])],1),a("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[a("v-uni-text",{staticClass:" grace-black9 g-card-w"},[e._v("设备名称:")]),a("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(e.dataValue.formName))])],1),a("v-uni-view",{staticClass:"grace-nowrap g-title-bx-row",staticStyle:{padding:"0 20upx"}},[a("v-uni-text",{staticClass:" grace-black9 g-card-w"},[e._v("上次日期:")]),a("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(void 0==e.dataValue.lastDate?" ":e.dataValue.lastDate))])],1)],1),a("v-uni-view",{staticClass:"g-line"}),a("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[a("v-uni-text",{staticClass:"grace-icons icon-article icon grace-blue"}),a("v-uni-text",{staticClass:"title grace-black"},[e._v("电表详情")])],1),a("graceShade",{attrs:{show:e.isShowChooseBx}},[a("v-uni-view",{staticClass:"demo-msg grace-relative"},[a("v-uni-view",{staticClass:"grace-title grace-border-b",staticStyle:{margin:"0 20upx"}},[a("v-uni-text",{staticClass:"grace-icons icon-shoucang icon grace-red"}),a("v-uni-text",{staticClass:"title grace-black"},[e._v("更换新表")])],1),a("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(t){arguments[0]=t=e.$handleEvent(t),e.formSubmit2.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("设备编号")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"formNumber",placeholder:"",value:e.dataValue.formNumber,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("初始值")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"startAmount",placeholder:" "}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("日期")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"today_now",placeholder:"",value:e.today_now,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("记录人")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:e.g_employeName,disabled:!0}})],1),a("v-uni-view",{staticClass:"btn-bx"},[a("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[e._v("保存")]),a("v-uni-button",{staticClass:"btn-res",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.formCancel2.apply(void 0,arguments)}}},[e._v("取消")])],1)],1),a("v-uni-view",{staticClass:"close-btn grace-icons icon-close3 grace-black grace-absolute-rt",on:{click:function(t){if(t.target!==t.currentTarget)return null;arguments[0]=t=e.$handleEvent(t),e.closeShade.apply(void 0,arguments)}}})],1)],1),a("v-uni-view",{staticClass:"input-bx"},[a("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(t){arguments[0]=t=e.$handleEvent(t),e.formSubmit.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("上次值")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"aAmount",placeholder:"",value:e.dataValue.aAmount,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("电类型")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"useType",placeholder:"",value:e.dataValue.useType,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("牧场")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"pastureName",placeholder:"",value:e.dataValue.pastureName,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("部门")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"departName",placeholder:"",value:e.dataValue.departName,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("负责人")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"employeName",placeholder:"",value:e.dataValue.employeName,disabled:!0}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("当前值")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"endAmount",placeholder:" "}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("单价")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"price",placeholder:"",value:e.dataValue.price}})],1),a("v-uni-view",{staticClass:"grace-items"},[a("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("记录人")]),a("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:e.g_employeName}})],1),a("v-uni-view",{staticClass:"grace-items grace-noborder"},[a("v-uni-view",{staticClass:"grace-label grace-bold"},[e._v("备注")])],1),a("v-uni-view",{staticClass:"grace-items grace-noborder"},[a("v-uni-view",{staticClass:"other"},[a("v-uni-textarea",{attrs:{placeholder:"请输入.....",name:"note",value:e.dataValue.note}})],1)],1),a("v-uni-view",{staticClass:"btn-bx"},[a("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[e._v("保存")]),a("v-uni-button",{staticClass:"btn-res",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.formCancel.apply(void 0,arguments)}}},[e._v("取消")])],1)],1)],1)],1)},n=[]},d743:function(e,t,a){var i=a("24fb");t=i(!1),t.push([e.i,".input-bx[data-v-36c45903]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-36c45903]{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-36c45903]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-36c45903]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.demo-msg[data-v-36c45903]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-36c45903]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}",""]),e.exports=t},eb12:function(e,t,a){"use strict";a.r(t);var i=a("234d"),s=a.n(i);for(var n in i)"default"!==n&&function(e){a.d(t,e,(function(){return i[e]}))}(n);t["default"]=s.a}}]);