(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f240087c"],{"735d":function(t,e,a){"use strict";a("db35")},9346:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("a-card",{staticClass:"product-setting-card"},[a("a-descriptions",{attrs:{title:"基本信息",column:6}},[a("a-descriptions-item",{attrs:{label:"车间"}},[a("a-select",{staticClass:"selectWidth",attrs:{placeholder:"车间",allowClear:""},model:{value:t.searchData.AreaCode,callback:function(e){t.$set(t.searchData,"AreaCode",e)},expression:"searchData.AreaCode"}},t._l(t.workshopData,(function(e,s){return a("a-select-option",{key:s,attrs:{value:e.area_code,title:e.descriptions}},[t._v(" "+t._s(e.descriptions))])})),1)],1),a("a-descriptions-item",{attrs:{label:"线别"}},[a("a-select",{staticClass:"selectWidth",attrs:{placeholder:"线别",allowClear:""},model:{value:t.searchData.LineId,callback:function(e){t.$set(t.searchData,"LineId",e)},expression:"searchData.LineId"}},t._l(t.LineTypeData,(function(e,s){return a("a-select-option",{key:s,attrs:{value:e.line_id}},[t._v(t._s(e.descriptions))])})),1)],1),a("a-descriptions-item",[a("div",{staticStyle:{width:"200px","margin-top":"-3px"}},[a("a-button",{staticClass:"btn",attrs:{type:"primary"},on:{click:t.getData}},[t._v("查询")]),a("a-button",{staticClass:"btn",attrs:{type:""},on:{click:function(){t.searchData={},t.getThrottle()}}},[t._v("重置")])],1)])],1),a("vxe-grid",{ref:"xTable",attrs:{data:t.tableData,columns:t.columns,border:"","highlight-current-row":"","highlight-hover-row":"",resizable:"",size:"small","row-id":"rowKey","row-key":"","scroll-y":{enabled:!0}},scopedSlots:t._u([{key:"status",fn:function(e){var s=e.row;return[1==s.status?a("span",{staticClass:"redColor"},[t._v("当前工单")]):a("span")]}},{key:"action",fn:function(e){var s=e.row;return[s&&1==s.status?a("span",[a("a-popconfirm",{attrs:{placement:"right",title:"取消 工单号："+s.workOrder},on:{confirm:function(e){return t.settingClick(s)}}},[a("a",[t._v("取消")])])],1):s&&2==s.status?a("span",[a("a-popconfirm",{attrs:{placement:"right",title:"设置 工单号："+s.workOrder},on:{confirm:function(e){return t.settingClick(s)}}},[a("a",[t._v("设置")])])],1):t._e()]}}])})],1)],1)},r=[],i=a("b775"),n={data:function(){return{searchData:{AreaCode:void 0,LineId:void 0},tableData:[],columns:[{title:"序号",type:"seq",width:50,align:"center"},{title:"车间",field:"area",align:"center",showOverflow:!0,showHeaderOverflow:!0},{title:"线别",field:"line",align:"center",showOverflow:!0,showHeaderOverflow:!0},{title:"工单编号",align:"center",field:"workOrder",showOverflow:!0,showHeaderOverflow:!0},{title:"产品系列",align:"center",field:"product",showOverflow:!0,showHeaderOverflow:!0},{title:"状态",align:"center",showOverflow:!0,showHeaderOverflow:!0,slots:{default:"status"}},{title:"操作",align:"center",slots:{default:"action"}}],toggle:!0,LineTypeData:[],workshopData:[]}},methods:{getWorkOrder:function(){var t=this;i["b"].get("/api/option/getAreaOption").then((function(e){1===e.status?t.workshopData=e.data:t.$message.error(e.msg)}))},getLineType:function(){var t=this;i["b"].get("api/option/getLineOption").then((function(e){1==e.status&&(t.LineTypeData=e.data)}))},getThrottle:function(){var t=this;this.toggle?(this.toggle=!1,this.$message.info("已重置"),this.getData(),setTimeout((function(){t.toggle=!0}),1e4)):this.$message.info("不能重复点击")},getData:function(){var t=this;i["b"].get("api/materialIssue/getWorkOrderList?areaCode="+this.searchData.AreaCode+"&lineId="+this.searchData.LineId).then((function(e){1==e.status?t.tableData=e.data:t.$message.error(e.msg)})).catch((function(e){t.$message.error(e)}))},settingClick:function(t){var e=this;i["b"].post("api/materialIssue/setWorkOrderStatus",{AreaCode:t.areaCode,LineId:t.lineId,WorkOrder:t.workOrder,Status:parseInt(t.status)}).then((function(t){1==t.status?(e.getData(),e.$message.success("设置成功")):e.$message.error(t.msg)})).catch((function(t){e.$message.error(t)}))}},mounted:function(){this.getLineType(),this.getWorkOrder()},activated:function(){this.$message.info("请选择车间和线别查询数据")}},o=n,l=(a("735d"),a("2877")),c=Object(l["a"])(o,s,r,!1,null,"3f489226",null);e["default"]=c.exports},db35:function(t,e,a){}}]);