1 line
5.0 KiB
JavaScript
1 line
5.0 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2a99da18"],{"3d7b":function(e,t,a){"use strict";a("99af"),a("4160"),a("159b");t["a"]={data:function(){return{urlOptions:{submitURL:"",infoURL:"",getOption:!1,optionArrUrl:[],optionArr:{}},visible:!1,setData:!1,isGetCode:!1}},created:function(){},activated:function(){},methods:{init:function(e){var t=this;this.dataForm.id=e||"",this.visible=!0,this.urlOptions.getOption&&this.getArr(),this.$nextTick((function(){t.$refs["dataForm"].resetFields(),t.dataForm.id?t.$http.get("".concat(t.urlOptions.infoURL,"/").concat(t.dataForm.id)).then((function(e){var a=e.data;if(0!==a.code)return t.$message.error(a.msg);t.dataForm=a.data,t.setData&&t.setDataForm()})).catch((function(){})):t.isGetCode&&t.getCode()}))},getArr:function(){var e=this;this.urlOptions.optionArrUrl.forEach((function(t,a){e.$http.get(t,{params:{page:1,limit:500}}).then((function(t){var o=t.data;if(0!==o.code)return e.$message.error(o.msg);e.$set(e.urlOptions.optionArr,"arr".concat(a),o.data.list)})).catch((function(){}))}))},dataFormSubmit:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(!t)return!1;e.$http[e.dataForm.id?"put":"post"](e.urlOptions.submitURL,e.dataForm).then((function(t){var a=t.data;if(0!==a.code)return e.$message.error(a.msg);e.$message({message:e.$t("prompt.success"),type:"success",duration:500,onClose:function(){e.visible=!1,e.$emit("successSubmit")}})})).catch((function(){}))}))},formClear:function(){this.$refs.dataForm.resetFields()}}}},"80b7":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"100px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"别名",prop:"anotherName"}},[a("el-input",{attrs:{clearable:"",placeholder:"别名"},model:{value:e.dataForm.anotherName,callback:function(t){e.$set(e.dataForm,"anotherName",t)},expression:"dataForm.anotherName"}})],1),a("el-form-item",{attrs:{label:"列标",prop:"columnCode"}},[a("el-input",{attrs:{clearable:"",placeholder:"列标"},model:{value:e.dataForm.columnCode,callback:function(t){e.$set(e.dataForm,"columnCode",t)},expression:"dataForm.columnCode"}})],1),a("el-form-item",{attrs:{label:"行标",prop:"rowCode"}},[a("el-input",{attrs:{clearable:"",placeholder:"行标"},model:{value:e.dataForm.rowCode,callback:function(t){e.$set(e.dataForm,"rowCode",t)},expression:"dataForm.rowCode"}})],1),a("el-form-item",{attrs:{label:"库位编码",prop:"positionCode"}},[a("el-input",{attrs:{clearable:"",placeholder:"库位编码"},model:{value:e.dataForm.positionCode,callback:function(t){e.$set(e.dataForm,"positionCode",t)},expression:"dataForm.positionCode"}})],1),a("el-form-item",{attrs:{label:"方向",prop:"direction"}},[a("el-select",{attrs:{clearable:"",placeholder:"请选择方向"},model:{value:e.dataForm.direction,callback:function(t){e.$set(e.dataForm,"direction",t)},expression:"dataForm.direction"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"是否被占用",prop:"isOccupy"}},[a("el-select",{attrs:{clearable:"",placeholder:"是否被占用"},model:{value:e.dataForm.isOccupy,callback:function(t){e.$set(e.dataForm,"isOccupy",t)},expression:"dataForm.isOccupy"}},e._l(e.options1,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),a("el-form-item",{attrs:{label:"区域名称",prop:"regionName"}},[a("el-input",{attrs:{clearable:"",placeholder:"区域名称"},model:{value:e.dataForm.regionName,callback:function(t){e.$set(e.dataForm,"regionName",t)},expression:"dataForm.regionName"}})],1),a("el-form-item",{attrs:{label:"顺序号",prop:"sequence"}},[a("el-input",{attrs:{clearable:"",placeholder:"顺序号"},model:{value:e.dataForm.sequence,callback:function(t){e.$set(e.dataForm,"sequence",t)},expression:"dataForm.sequence"}})],1),a("el
|