qy-renren-qt/dist/2209301437/static/js/37.js

1 line
3.0 KiB
JavaScript
Raw Normal View History

2022-09-30 14:43:03 +08:00
webpackJsonp([37],{YJFl:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,whCode:"CK"+(new Date).getTime(),whName:"",address:"",remark:""},dataRule:{whCode:[{required:!0,message:"仓库编码不能为空",trigger:"blur"}],whName:[{required:!0,message:"仓库名称不能为空",trigger:"blur"}],address:[{required:!0,message:"地址不能为空",trigger:"blur"}]}}},methods:{init:function(e){var a=this;this.dataForm.id=e||"",this.visible=!0,this.$nextTick(function(){a.$refs.dataForm.resetFields(),a.dataForm.id&&a.$http({url:a.$http.adornUrl("/work/mtwarehousing/info/"+a.dataForm.id),method:"get",params:a.$http.adornParams()}).then(function(e){var t=e.data;t&&0===t.code&&(a.dataForm=t.mtWarehouseing)})})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(a){a&&e.$http({url:e.$http.adornUrl("/work/mtwarehousing/"+(e.dataForm.id?"update":"save")),method:"post",data:e.$http.adornData({id:e.dataForm.id||void 0,whCode:e.dataForm.whCode,whName:e.dataForm.whName,address:e.dataForm.address,remark:e.dataForm.remark})}).then(function(a){var t=a.data;t&&0===t.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$emit("refreshDataList")}}):e.$message.error(t.msg)})})}}},o={render:function(){var e=this,a=e.$createElement,t=e._self._c||a;return t("el-dialog",{attrs:{title:e.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:e.visible},on:{"update:visible":function(a){e.visible=a}}},[t("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(a){if(!("button"in a)&&e._k(a.keyCode,"enter",13,a.key,"Enter"))return null;e.dataFormSubmit()}}},[t("el-form-item",{attrs:{label:"仓库编码",prop:"whCode"}},[t("el-input",{attrs:{placeholder:"仓库编码",clearable:""},model:{value:e.dataForm.whCode,callback:function(a){e.$set(e.dataForm,"whCode",a)},expression:"dataForm.whCode"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"仓库名称",prop:"whName"}},[t("el-input",{attrs:{placeholder:"仓库名称",clearable:""},model:{value:e.dataForm.whName,callback:function(a){e.$set(e.dataForm,"whName",a)},expression:"dataForm.whName"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"地址",prop:"address"}},[t("el-input",{attrs:{placeholder:"地址",clearable:""},model:{value:e.dataForm.address,callback:function(a){e.$set(e.dataForm,"address",a)},expression:"dataForm.address"}})],1),e._v(" "),t("el-form-item",{attrs:{label:"备注",prop:"remark"}},[t("el-input",{attrs:{placeholder:"",clearable:""},model:{value:e.dataForm.remark,callback:function(a){e.$set(e.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1),e._v(" "),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(a){e.visible=!1}}},[e._v("取消")]),e._v(" "),t("el-button",{attrs:{type:"primary"},on:{click:function(a){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},d=t("VU/8")(r,o,!1,null,null,null);a.default=d.exports}});