25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
7.2 KiB

  1. webpackJsonp([53],{"/g4u":function(e,r,t){"use strict";var i=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"app-container"},[t("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleForm}},["user"!=this.$store.getters.usertype||1!=e.shopList.length?t("el-form-item",{attrs:{label:"门店","label-width":e.formLabelWidth,prop:"storeId",clearable:""}},[t("el-select",{attrs:{placeholder:"门店"},model:{value:e.ruleForm.storeId,callback:function(r){e.$set(e.ruleForm,"storeId",r)},expression:"ruleForm.storeId"}},e._l(e.shopList,function(e){return t("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),t("el-form-item",{attrs:{label:"序列号","label-width":e.formLabelWidth,prop:"serialNo"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"serialNo"},model:{value:e.ruleForm.serialNo,callback:function(r){e.$set(e.ruleForm,"serialNo","string"==typeof r?r.trim():r)},expression:"ruleForm.serialNo"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"MAC地址","label-width":e.formLabelWidth,prop:"macAddr"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"macAddr"},model:{value:e.ruleForm.macAddr,callback:function(r){e.$set(e.ruleForm,"macAddr","string"==typeof r?r.trim():r)},expression:"ruleForm.macAddr"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"设备名称","label-width":e.formLabelWidth,prop:"alias"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"alias"},model:{value:e.ruleForm.alias,callback:function(r){e.$set(e.ruleForm,"alias","string"==typeof r?r.trim():r)},expression:"ruleForm.alias"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"厂商","label-width":e.formLabelWidth,prop:"manufacturer"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"manufacturer"},model:{value:e.ruleForm.manufacturer,callback:function(r){e.$set(e.ruleForm,"manufacturer",r)},expression:"ruleForm.manufacturer"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"设备类型","label-width":e.formLabelWidth,prop:"deviceType"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"deviceType"},model:{value:e.ruleForm.deviceType,callback:function(r){e.$set(e.ruleForm,"deviceType",r)},expression:"ruleForm.deviceType"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"设备型号","label-width":e.formLabelWidth,prop:"deviceModel"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"deviceModel"},model:{value:e.ruleForm.deviceModel,callback:function(r){e.$set(e.ruleForm,"deviceModel",r)},expression:"ruleForm.deviceModel"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"版本号","label-width":e.formLabelWidth,prop:"curVersion"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"curVersion"},model:{value:e.ruleForm.curVersion,callback:function(r){e.$set(e.ruleForm,"curVersion",r)},expression:"ruleForm.curVersion"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"区域","label-width":e.formLabelWidth,prop:"region"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"region"},model:{value:e.ruleForm.region,callback:function(r){e.$set(e.ruleForm,"region",r)},expression:"ruleForm.region"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"客户","label-width":e.formLabelWidth,prop:"customer"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"customer"},model:{value:e.ruleForm.customer,callback:function(r){e.$set(e.ruleForm,"customer",r)},expression:"ruleForm.customer"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"部门","label-width":e.formLabelWidth,prop:"department"}},[t("el-input",{staticClass:"inputwidth",attrs:{name:"department"},model:{value:e.ruleForm.department,callback:function(r){e.$set(e.ruleForm,"department",r)},expression:"ruleForm.department"}})],1),e._v(" "),t("el-form-item",{attrs:{"label-width":e.formLabelWidth}},[t("el-button",{attrs:{type:"primary"},on:{click:function(r){e.submitForm("ruleForm")}}},[e._v("立即创建")]),e._v(" "),t("el-button",{on:{click:function(r){e.resetForm("ruleForm")}}},[e._v("重置")])],1)],1)],1)},o=[],a={render:i,staticRenderFns:o};r.a=a},"7hYt":function(e,r,t){"use strict";var i=(t("IcnI"),t("lJq3")),o=t("g45I");r.a={created:function(){var e=this;t.i(o.a)().then(function(r){e.shopList=r.result.rows,1==e.shopList.length&&"user"==e.$store.getters.usertype&&(e.ruleForm.storeId=e.shopList[0].id)})},data:function(){var e=this;return{shopList:[],ruleForm:{organizationId:this.$store.getters.orgId,storeId:"",serialNo:"",macAddr:"",manufacturer:"",deviceType:"",deviceModel:"",curVersion:"",region:"",customer:"",department:"",alias:""},formLabelWidth:"100px",rules:{storeId:[{required:function(r){return"user"==e.$store.getters.usertype}(),message:"门店必选",trigger:"blur"}],serialNo:[{required:!0,message:"请输入序列号",trigger:"blur"},{max:100,message:"序列号长度不能超过100",trigger:"blur"}],macAddr:[{required:!0,message:"请输入MAC地址",trigger:"blur"},{max:30,message:"MAC地址长度不能超过30位",trigger:"blur"},{pattern:/^[A-Z0-9]+$/,message:'MAC地址格式为大写字母或数字,去掉分隔符"-"或":"',trigger:"blur"}],curVersion:[{required:!0,message:"版本号不能为空",trigger:"blur"},{max:30,message:"版本号长度不能超过30",trigger:"blur"},{pattern:/^[0-9]+\.[0-9]+\.[0-9]+$/,message:"请输入正确的版本号,如1.0.0",trigger:"blur"}]}}},methods:{submitForm:function(e){var r=this;this.$refs[e].validate(function(e){if(!e)return console.log("error submit!!"),!1;t.i(i.e)(r.ruleForm).then(function(e){var t=r.$router;r.$message({message:"操作成功",type:"success",duration:1e3,onClose:function(){t.push({path:"index"})}})})})},resetForm:function(e){this.$refs[e].resetFields()}}}},Pog0:function(e,r,t){var i=t("T4Xi");"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);t("rjj0")("4c5877f6",i,!0)},T4Xi:function(e,r,t){r=e.exports=t("FZ+f")(!0),r.push([e.i,".inputwidth{width:50%}","",{version:3,sources:["D:/projects/gitLab/wxpos/posadmin/src/views/ota/mac/add.vue"],names:[],mappings:"AACA,YACI,SAAW,CACd",file:"add.vue",sourcesContent:["\n.inputwidth {\n width: 50%;\n}\n"],sourceRoot:""}])},g45I:function(e,r,t){"use strict";function i(e){return t.i(n.a)({url:"/service-org/shop/list",method:"get",params:e})}function o(e){return t.i(n.a)({url:"/unionService/shop/shop",method:"post",data:e})}function a(e){return t.i(n.a)({url:"/service-org/shop/detail?shopId="+e,method:"get"})}function s(e){return t.i(n.a)({url:"/unionService/shop/shop",method:"put",data:e})}function l(e){return t.i(n.a)({url:"/unionService/device/store",method:"put",data:e})}function u(e){return t.i(n.a)({url:"/service-org/shop/delete?shopId="+e,method:"DELETE"})}r.a=i,r.f=o,r.b=a,r.c=s,r.d=l,r.e=u;var n=t("Vo7i")},lJq3:function(e,r,t){"use strict";function i(e){return t.i(u.a)({url:"/service-device/devices",method:"post",data:e})}function o(e){return t.i(u.a)({url:"/unionService/device",method:"post",data:e})}function a(e){return t.i(u.a)({url:"/unionService/device",method:"put",data:e})}function s(e){return t.i(u.a)({url:"/unionService/device/batch",method:"post",data:e})}function l(e){return t.i(u.a)({url:"/unionService/device/status",method:"put",data:e})}r.a=i,r.e=o,r.d=a,r.c=s,r.b=l;var u=t("Vo7i")},rRex:function(e,r,t){"use strict";function i(e){t("Pog0")}Object.defineProperty(r,"__esModule",{value:!0});var o=t("7hYt"),a=t("/g4u"),s=t("VU/8"),l=i,u=s(o.a,a.a,l,null,null);r.default=u.exports}});
  2. //# sourceMappingURL=53.a5d9bfa10143f2fad013.js.map