1 |
- (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)<parseFloat(t.aAmount))uni.showToast({title:"当前值不得小于上次值!",duration:2e3,icon:"none"});else{var c="/authdata/ExecDataByConfig";a.ajax(c,o,"POST",a.get_add_status)}},formCancel:function(e){uni.navigateTo({url:"/pages/index/waterMeter/waterMeter"})},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/waterMeter/waterMeter"})}),1e3)}});else{var a=e.data;uni.showToast({title:"保存失败"+a,duration:2e3,icon:"none"})}}},components:{gracePage:s.default,graceFlex:n.default,graceShade:r.default}};a.default=o},"27db":function(e,a,t){var i=t("24fb");a=i(!1),a.push([e.i,".input-bx[data-v-0c12918a]{height:auto;background:#fff;padding:0 %?30?%}.btn-bx[data-v-0c12918a]{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-0c12918a]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#169bd5;font-size:%?32?%;color:#fff}.btn-res[data-v-0c12918a]{width:%?290?%;height:%?86?%;border-radius:%?10?%;background:#f60;font-size:%?32?%;color:#fff}.demo-msg[data-v-0c12918a]{width:100%;padding:%?40?%;background:#fff}.close-btn[data-v-0c12918a]{width:%?80?%;height:%?80?%;line-height:%?80?%;text-align:center;font-size:%?40?%;z-index:7}",""]),e.exports=a},6175:function(e,a,t){"use strict";var i;t.d(a,"b",(function(){return s})),t.d(a,"c",(function(){return n})),t.d(a,"a",(function(){return i}));var s=function(){var e=this,a=e.$createElement,t=e._self._c||a;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"},[e._v("设备信息")]),t("v-uni-button",{staticClass:"grace-button",attrs:{type:"primary",size:"mini"},on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.on_replace_new.apply(void 0,arguments)}}},[e._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"},[e._v("设备编号:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(e.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"},[e._v("设备名称:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(e.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"},[e._v("上次日期:")]),t("v-uni-text",{staticClass:" grace-black5 grace-bold"},[e._v(e._s(void 0==e.dataValue.lastDate?" ":e.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"},[e._v("水表详情")])],1),t("graceShade",{attrs:{show:e.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"},[e._v("更换新表")])],1),t("v-uni-form",{staticClass:"grace-form grace-margin-top",on:{submit:function(a){arguments[0]=a=e.$handleEvent(a),e.formSubmit2.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("设备编号")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"formNumber",placeholder:"",value:e.dataValue.formNumber,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._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 "},[e._v("日期")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"today_now",placeholder:"",value:e.today_now,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("记录人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:e.g_employeName,disabled:!0}})],1),t("v-uni-view",{staticClass:"btn-bx"},[t("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[e._v("保存")]),t("v-uni-button",{staticClass:"btn-res",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.formCancel2.apply(void 0,arguments)}}},[e._v("取消")])],1)],1),t("v-uni-view",{staticClass:"close-btn grace-icons icon-close3 grace-black grace-absolute-rt",on:{click:function(a){if(a.target!==a.currentTarget)return null;arguments[0]=a=e.$handleEvent(a),e.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(a){arguments[0]=a=e.$handleEvent(a),e.formSubmit.apply(void 0,arguments)}}},[t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("上次值")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"aAmount",placeholder:"",value:e.dataValue.aAmount,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("水类型")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"useType",placeholder:"",value:e.dataValue.useType,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("牧场")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"pastureName",placeholder:"",value:e.dataValue.pastureName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("部门")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"departName",placeholder:"",value:e.dataValue.departName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("负责人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"employeName",placeholder:"",value:e.dataValue.employeName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("当前值")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"endAmount",placeholder:"",placeholder:" "}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("单价")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"price",placeholder:"",value:e.dataValue.price}})],1),t("v-uni-view",{staticClass:"grace-items"},[t("v-uni-view",{staticClass:"grace-label grace-bold "},[e._v("记录人")]),t("v-uni-input",{staticClass:"input",attrs:{type:"text",name:"g_employeName",placeholder:"",value:e.g_employeName,disabled:!0}})],1),t("v-uni-view",{staticClass:"grace-items grace-noborder"},[t("v-uni-view",{staticClass:"grace-label grace-bold"},[e._v("备注")])],1),t("v-uni-view",{staticClass:"grace-items grace-noborder"},[t("v-uni-view",{staticClass:"other"},[t("v-uni-textarea",{attrs:{placeholder:"请输入.....",name:"note",value:e.dataValue.note}})],1)],1),t("v-uni-view",{staticClass:"btn-bx"},[t("v-uni-button",{staticClass:"btn-sub",attrs:{formType:"submit"}},[e._v("保存")]),t("v-uni-button",{staticClass:"btn-res",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.formCancel.apply(void 0,arguments)}}},[e._v("取消")])],1)],1)],1)],1)},n=[]},"68ee":function(e,a,t){var i=t("27db");"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var s=t("4f06").default;s("0229c944",i,!0,{sourceMap:!1,shadowMode:!1})},"94b9":function(e,a,t){"use strict";t.r(a);var i=t("0f59"),s=t.n(i);for(var n in i)"default"!==n&&function(e){t.d(a,e,(function(){return i[e]}))}(n);a["default"]=s.a},cc53:function(e,a,t){"use strict";var i=t("68ee"),s=t.n(i);s.a},f8cc:function(e,a,t){"use strict";t.r(a);var i=t("6175"),s=t("94b9");for(var n in s)"default"!==n&&function(e){t.d(a,e,(function(){return s[e]}))}(n);t("cc53");var r,o=t("f0c5"),c=Object(o["a"])(s["default"],i["b"],i["c"],!1,null,"0c12918a",null,!1,i["a"],r);a["default"]=c.exports}}]);
|