qy-renren-qt/dist/2209300913/static/js/24.js

1 line
8.2 KiB
JavaScript
Raw Normal View History

2022-09-30 09:18:17 +08:00
webpackJsonp([24,44],{DF1c:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,productName:"",productCode:"",length:"",heigth:"",width:"",remark:""},dataRule:{productName:[{required:!0,message:"板材名称不能为空",trigger:"blur"}],productCode:[{required:!0,message:"编码不能为空",trigger:"blur"}],length:[{required:!0,message:"长不能为空",trigger:"blur"}],heigth:[{required:!0,message:"高不能为空",trigger:"blur"}],width:[{required:!0,message:"宽不能为空",trigger:"blur"}]}}},methods:{init:function(e){var t=this;this.dataForm.id=e||"",this.visible=!0,this.$nextTick(function(){t.$refs.dataForm.resetFields(),t.dataForm.id&&t.$http({url:t.$http.adornUrl("/work/mtproduct/info/"+t.dataForm.id),method:"get",params:t.$http.adornParams()}).then(function(e){var a=e.data;a&&0===a.code&&(t.dataForm=a.mtProduct)})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/work/mtproduct/"+(e.dataForm.id?"update":"save")),method:"post",data:e.$http.adornData({id:e.dataForm.id||void 0,productName:e.dataForm.productName,productCode:e.dataForm.productCode,length:e.dataForm.length,heigth:e.dataForm.heigth,width:e.dataForm.width,remark:e.dataForm.remark})}).then(function(t){var a=t.data;a&&0===a.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}}):e.$message.error(a.msg)})})}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:"板材名称",prop:"productName"}},[a("el-input",{attrs:{placeholder:"板材名称",clearable:""},model:{value:e.dataForm.productName,callback:function(t){e.$set(e.dataForm,"productName",t)},expression:"dataForm.productName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"编码",prop:"productCode"}},[a("el-input",{attrs:{placeholder:"产品编码",clearable:""},model:{value:e.dataForm.productCode,callback:function(t){e.$set(e.dataForm,"productCode",t)},expression:"dataForm.productCode"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"长",prop:"length"}},[a("el-input",{attrs:{placeholder:"长",clearable:""},model:{value:e.dataForm.length,callback:function(t){e.$set(e.dataForm,"length",t)},expression:"dataForm.length"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"宽",prop:"width"}},[a("el-input",{attrs:{placeholder:"宽",clearable:""},model:{value:e.dataForm.width,callback:function(t){e.$set(e.dataForm,"width",t)},expression:"dataForm.width"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"高",prop:"heigth"}},[a("el-input",{attrs:{placeholder:"高",clearable:""},model:{value:e.dataForm.heigth,callback:function(t){e.$set(e.dataForm,"heigth",t)},expression:"dataForm.heigth"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{placeholder:"",clearable:""},model:{value:e.dataForm.remark,callback:function(t){e.$set(e.dataForm,"remark",t)},expression:"dataForm.remark"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},n=a("VU/8")(r,l,!1,null,null,null);t.default=n.exports},kaLi:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{dataForm:{key:""},dataList:[],pageIndex:1,pageSize:10,totalPage:0,dataListLoading:!1,addOrUpdateVisible:!1}},components:{AddOrUpdate:a("DF1c").default},activated:function(){this.getDataList()