qy-renren-qt/dist/2209300913/static/js/34.js
2022-09-30 09:18:17 +08:00

1 line
2.3 KiB
JavaScript

webpackJsonp([34],{ylsz:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={data:function(){return{visible:!1,dataForm:{id:0,status:"",remark:""},dataRule:{}}},methods:{init:function(t){var a=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick(function(){a.$refs.dataForm.resetFields(),a.dataForm.id&&a.$http({url:a.$http.adornUrl("/work/mtwarehousrank/info/"+a.dataForm.id),method:"get",params:a.$http.adornParams()}).then(function(t){var e=t.data;e&&0===e.code&&(a.dataForm=e.mtWarehouseRank)})})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(a){a&&t.$http({url:t.$http.adornUrl("/work/mtwarehousrank/"+(t.dataForm.id?"update":"save")),method:"post",data:t.$http.adornData({id:t.dataForm.id||void 0,status:t.dataForm.status,remark:t.dataForm.remark})}).then(function(a){var e=a.data;e&&0===e.code?t.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}}):t.$message.error(e.msg)})})}}},o={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-dialog",{attrs:{title:t.dataForm.id?"修改":"新增","close-on-click-modal":!1,visible:t.visible},on:{"update:visible":function(a){t.visible=a}}},[e("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"80px"},nativeOn:{keyup:function(a){if(!("button"in a)&&t._k(a.keyCode,"enter",13,a.key,"Enter"))return null;t.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:"状态",prop:"status"}},[e("el-switch",{attrs:{"active-value":0,"inactive-value":1,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:t.dataForm.status,callback:function(a){t.$set(t.dataForm,"status",a)},expression:"dataForm.status"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"备注",prop:"remark"}},[e("el-input",{attrs:{placeholder:"",clearable:""},model:{value:t.dataForm.remark,callback:function(a){t.$set(t.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1),t._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){t.visible=!1}}},[t._v("取消")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){t.dataFormSubmit()}}},[t._v("确定")])],1)],1)},staticRenderFns:[]},i=e("VU/8")(r,o,!1,null,null,null);a.default=i.exports}});