1 line
3.6 KiB
JavaScript
1 line
3.6 KiB
JavaScript
|
webpackJsonp([36],{HPCu:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o={data:function(){return{visible:!1,dataForm:{id:0,status:"",isEmpty:"",productId:"",specModel:"",productCode:"",productName:"",quantity:"",warehousPositionId:"",warehousPositionName:"",dateNum:"",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/mtwarehouspositionrelat/info/"+a.dataForm.id),method:"get",params:a.$http.adornParams()}).then(function(t){var e=t.data;e&&0===e.code&&(a.dataForm=e.mtWarehousePositionRelat)})})},dataFormSubmit:function(){var t=this;this.$refs.dataForm.validate(function(a){a&&t.$http({url:t.$http.adornUrl("/work/mtwarehouspositionrelat/"+(t.dataForm.id?"update":"save")),method:"post",data:t.$http.adornData({id:t.dataForm.id||void 0,status:t.dataForm.status,isEmpty:t.dataForm.isEmpty,productId:t.dataForm.productId,specModel:t.dataForm.specModel,productCode:t.dataForm.productCode,productName:t.dataForm.productName,quantity:t.dataForm.quantity,warehousPositionId:t.dataForm.warehousPositionId,warehousPositionName:t.dataForm.warehousPositionName,dateNum:t.dataForm.dateNum,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)})})}}},r={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:"productCode"}},[e("el-input",{attrs:{placeholder:"产品编码",readonly:""},model:{value:t.dataForm.productCode,callback:function(a){t.$set(t.dataForm,"productCode",a)},expression:"dataForm.productCode"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"板材名称",prop:"productName"}},[e("el-input",{attrs:{placeholder:"板材名称",readonly:""},model:{value:t.dataForm.productName,callback:function(a){t.$set(t.dataForm,"productName",a)},expression:"dataForm.productName"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"货物数量",prop:"quantity"}},[e("el-input",{attrs:{placeholder:"货物数量, 货物总的数量",clearable:""},model:{value:t.dataForm.quantity,callback:function(a){t.$set(t.dataForm,"quantity",a)},expression:"dataForm.quantity"}})],1),t._v(" "),e("el-form-item",{attrs:{label:"库位名称",prop:"warehousPositionName"}},[e("el-input",{attrs:{placeholder:"库位名称",readonly:""},model:{value:t.dataForm.warehousPositionName,callback:function(a){t.$set(t.dataForm,"warehousPositionName",a)},expression:"dataForm.warehousPositionName"}})],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:[]},d=e("VU/8")(o,r,!1,null,null,null);a.default=d.exports}});
|