1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d78a1"],{"76f2":function(e,t,l){"use strict";l.r(t);var a=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"app-container"},[l("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[l("el-form-item",{attrs:{label:"工艺",prop:"technology"}},[l("el-input",{attrs:{placeholder:"请输入工艺",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.technology,callback:function(t){e.$set(e.queryParams,"technology",t)},expression:"queryParams.technology"}})],1),l("el-form-item",[l("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),l("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),l("el-row",{staticClass:"mb8",attrs:{gutter:10}},[l("el-col",{attrs:{span:1.5}},[l("el-button",{attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),l("el-col",{attrs:{span:1.5}},[l("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),l("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.materialList},on:{"selection-change":e.handleSelectionChange}},[l("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),l("el-table-column",{attrs:{label:"序号",align:"center",type:"index"}}),l("el-table-column",{attrs:{label:"工艺",align:"center",prop:"technology"}}),l("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.state?l("el-tag",{attrs:{type:"info"}},[e._v("未开始")]):e._e(),1===t.row.state?l("el-tag",{attrs:{type:"warning"}},[e._v("正在轧制")]):e._e(),2===t.row.state?l("el-tag",{attrs:{type:"success"}},[e._v("轧制完成")]):e._e(),3===t.row.state?l("el-tag",{attrs:{type:"danger"}},[e._v("存在异常")]):e._e(),4===t.row.state?l("el-tag",{attrs:{type:"warning"}},[e._v("已丢入异常品堆")]):e._e(),5===t.row.state?l("el-tag",{attrs:{type:"warning"}},[e._v("异常品轧制中")]):e._e(),6===t.row.state?l("el-tag",{attrs:{type:"success"}},[e._v("轧制完成")]):e._e()]}}])}),l("el-table-column",{attrs:{label:"直径",align:"center",prop:"diameter"}}),l("el-table-column",{attrs:{label:"厚度",align:"center",prop:"width"}}),l("el-table-column",{attrs:{label:"最终厚度",align:"center",prop:"finalWidth"}}),l("el-table-column",{attrs:{label:"最终直径",align:"center",prop:"finalDiameter"}}),l("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(l){return e.handleUpdate(t.row)}}},[e._v("修改")]),l("el-button",{attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(l){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),l("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),l("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[l("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[l("el-form-item",{attrs:{label:"最终厚度",prop:"finalWidth"}},[l("el-input",{attrs:{placeholder:"请输入最终厚度"},model:{value:e.form.finalWidth,callback:function(t){e.$set(e.form,"finalWidth",t)},expression:"form.finalWidth"}})],1),l("el-form-item",{attrs:{label:"最终直径",prop:"finalDiameter"}},[l("el-input",{attrs:{placeholder:"请输入最终直径"},model:{value:e.form.finalDiameter,callback:function(t){e.$set(e.form,"finalDiameter",t)},expression:"form.finalDiameter"}})],1)],1),l("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),l("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},n=[],i=l("5530"),r=(l("d81d"),l("b775"));function o(e){return Object(r["a"])({url:"/work/material/list-record",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/work/material/"+e,method:"get"})}function u(e){return Object(r["a"])({url:"/work/material",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/work/material",method:"put",data:e})}function d(e){return Object(r["a"])({url:"/work/material/"+e,method:"delete"})}var m={name:"Material",data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,materialList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,specification:null,technology:null,operation:null,stepSize:null,diameter:null,width:null,batchId:null,sort:null,state:null,finalWidth:null,finalDiameter:null,weight:null},form:{},rules:{batchId:[{required:!0,message:"批次号不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,o(this.queryParams).then((function(t){e.materialList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,specification:null,technology:null,operation:null,stepSize:null,diameter:null,width:null,batchId:null,sort:null,createTime:null,createBy:null,updateTime:null,updateBy:null,delFlag:null,state:null,finalWidth:null,finalDiameter:null,weight:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加钽靶主类"},handleUpdate:function(e){var t=this;this.reset();var l=e.id||this.ids;s(l).then((function(e){t.form=e.data,t.open=!0,t.title="修改钽靶主类"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?c(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):u(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,l=e.id||this.ids;this.$modal.confirm('是否确认删除钽靶主类编号为"'+l+'"的数据项?').then((function(){return d(l)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/material/export",Object(i["a"])({},this.queryParams),"material_".concat((new Date).getTime(),".xlsx"))}}},h=m,p=l("2877"),f=Object(p["a"])(h,a,n,!1,null,null,null);t["default"]=f.exports}}]); |