You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
5.7 KiB
1 lines
5.7 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-44ae5f33"],{"427c":function(e,t,r){"use strict";var n=r("8f38");r.n(n).a},"8f38":function(e,t,r){},d3c3:function(e,t,r){"use strict";r.r(t);r("cca6"),r("96cf");var n=r("1da1"),a=r("6842"),o={data:function(){return{uomList:[],queryInfo:{length:5,startNo:1,materialNo:this.$route.query.materialNo},uomInfo:{materialNo:this.$route.query.materialNo,status:!0,versUnit:this.$route.query.uom,unit:"",versNum:"",remark:""},total:0,dialogUom:!1,type:0}},created:function(){this.initTable(),this.rules={versNum:[{required:!0,message:"请输入数量位",trigger:"blur"}],unit:[{required:!0,message:"请输入单位",trigger:"blur"}]}},methods:{initTable:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e.queryInfo),t.next=3,Object(a.p)(r);case 3:n=t.sent,e.uomList=n.result.data,e.total=n.result.pagination.total;case 7:case"end":return t.stop()}}),t)})))()},handleSizeChange:function(e){this.queryInfo.length=e,this.initTable()},handleCurrentChange:function(e){this.queryInfo.startNo=e,this.initTable()},showCreateDialog:function(){this.type=0,this.dialogUom=!0},handelConfirm:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(r){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=2;break}return t.abrupt("return",e.$message.error("请检查是否存在未填项!"));case 2:if(0!==e.type){t.next=9;break}return t.next=5,Object(a.v)(e.uomInfo);case 5:200===(n=t.sent).status?e.$message.success(n.message):e.$message.error(n.message),t.next=13;break;case 9:return t.next=11,Object(a.g)(e.uomInfo);case 11:o=t.sent,e.$message.success(o.message);case 13:e.initTable(),e.handelCancel(),e.dialogUom=!1;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},editUom:function(e){this.type=1,this.uomInfo=JSON.parse(JSON.stringify(e)),this.dialogUom=!0},handelCancel:function(){this.dialogUom=!1,this.uomInfo={materialNo:this.$route.query.materialNo,status:!0,versUnit:this.$route.query.uom,unit:"",versNum:"",remark:""},this.$refs.ruleForm.clearValidate()},deleteUom:function(e){var t=this;return Object(n.a)(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t.$confirm("是否删除","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:if("confirm"!=r.sent){r.next=10;break}return r.next=7,Object(a.f)(e.id);case 7:n=r.sent,t.$message.success(n.message),t.initTable();case 10:r.next=15;break;case 12:r.prev=12,r.t0=r.catch(0);case 15:case"end":return r.stop()}}),r,null,[[0,12]])})))()}}},s=(r("427c"),r("2877")),i=Object(s.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"table"},[r("div",{staticClass:"m-bottom-2 p-top-1 d-flex"},[r("FeesButton",{attrs:{text:"新增",icon:"el-icon-circle-plus-outline"},on:{buttonClick:e.showCreateDialog}})],1),r("el-table",{staticStyle:{width:"40%"},attrs:{border:"",data:e.uomList}},[r("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticClass:"text-color cursor",on:{click:function(r){return e.editUom(t.row)}}},[e._v(" 编辑 ")]),r("span",{staticClass:"link-text-color cursor c-red",on:{click:function(r){return e.deleteUom(t.row)}}},[e._v(" 删除 ")])]}}])}),r("el-table-column",{attrs:{prop:"materialNo",label:"物料编号",align:"center"}}),r("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"}}),r("el-table-column",{attrs:{prop:"versUnit",label:"收货单位",width:"80",align:"center"}}),r("el-table-column",{attrs:{prop:"versNum",label:"数量",width:"80",align:"center"}}),r("el-table-column",{attrs:{prop:"status",label:"状态",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("el-tag",{attrs:{type:n.status?"":"danger"}},[e._v(" "+e._s(n.vstatusName)+" ")])]}}])}),r("el-table-column",{attrs:{prop:"remark",label:"备注",width:"180",align:"center"}})],1),r("el-pagination",{attrs:{background:"","current-page":e.queryInfo.startNo,"page-size":e.queryInfo.length,"page-sizes":[5,10,20,30,50],layout:" prev, pager, next,total, sizes, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.queryInfo,"startNo",t)},"update:current-page":function(t){return e.$set(e.queryInfo,"startNo",t)}}}),r("el-dialog",{attrs:{title:0==e.type?"新建":"编辑",visible:e.dialogUom,"before-close":e.handelCancel},on:{"update:visible":function(t){e.dialogUom=t}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.uomInfo,rules:e.rules}},[r("el-form-item",{attrs:{label:"单位:",prop:"unit","label-width":"90px"}},[r("el-input",{model:{value:e.uomInfo.unit,callback:function(t){e.$set(e.uomInfo,"unit",t)},expression:"uomInfo.unit"}})],1),r("el-form-item",{attrs:{label:"数量:",prop:"versNum","label-width":"90px"}},[r("el-input",{model:{value:e.uomInfo.versNum,callback:function(t){e.$set(e.uomInfo,"versNum",t)},expression:"uomInfo.versNum"}})],1),r("el-form-item",{attrs:{label:"备注:",prop:"remark","label-width":"90px"}},[r("el-input",{model:{value:e.uomInfo.remark,callback:function(t){e.$set(e.uomInfo,"remark",t)},expression:"uomInfo.remark"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.handelCancel}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.handelConfirm}},[e._v("确 定")])],1)],1)],1)}),[],!1,null,"672612b6",null);t.default=i.exports}}]);
|