1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-75d70626"],{"3e1e":function(e,t,i){"use strict";i.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"content"},[e._l(e.list,(function(i,s){return t("div",{key:s,staticClass:"item"},[t("div",{staticClass:"unit",staticStyle:{display:"flex"}},[t("label",{staticStyle:{width:"40%"}},[e._v("派工单号:")]),t("div",{staticStyle:{width:"60%","word-break":"break-all"}},[e._v(e._s(i.dispatch_order_no))])]),t("div",{staticClass:"unit",staticStyle:{display:"flex"}},[t("label",{staticStyle:{width:"40%"}},[e._v("产品名称:")]),t("div",{staticStyle:{width:"60%"}},[e._v(e._s(i.product_title))])]),t("div",{staticClass:"unit",staticStyle:{display:"flex"}},[t("label",[e._v("数量:")]),t("Input",{staticStyle:{width:"70%",padding:"0 0 0 0.2rem"},attrs:{size:"small",placeholder:"请输入",type:"number"},on:{"on-change":function(t){return e.handleChangeNumber(t,s)}},model:{value:i.finished_num,callback:function(t){e.$set(i,"finished_num",t)},expression:"item.finished_num"}})],1),t("div",{staticClass:"unit"},[t("label",[e._v("班组:")]),t("b-form-select",{staticStyle:{height:"1.4rem",width:"70%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:e.teamList},on:{change:t=>e.handleChangeTeam(t,s)},scopedSlots:e._u([{key:"first",fn:function(){return[t("b-form-select-option",{attrs:{value:"",disabled:""}},[e._v("请选择班组")])]},proxy:!0}],null,!0),model:{value:i.team_finish_id,callback:function(t){e.$set(i,"team_finish_id",t)},expression:"item.team_finish_id"}})],1),t("div",{staticClass:"unit"},[t("label",[e._v("人员:")]),t("Select",{staticStyle:{width:"70%",background:"#fff"},attrs:{size:"small",transfer:"",multiple:""},on:{"on-change":function(t){return e.handleChangeEmployee(t,s)}},model:{value:i.employee_id,callback:function(t){e.$set(i,"employee_id",t)},expression:"item.employee_id"}},e._l(e.employeeList,(function(e){return t("Option",{key:e.id,attrs:{label:e.text,value:e.value}})})),1)],1),t("div",{staticClass:"unit"},[t("label",[e._v("设备:")]),t("b-form-select",{staticStyle:{height:"1.4rem",width:"70%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:e.equipmentList},on:{change:t=>e.handleChangeEquipment(t,s)},scopedSlots:e._u([{key:"first",fn:function(){return[t("b-form-select-option",{attrs:{value:"",disabled:""}},[e._v("请选择设备")])]},proxy:!0}],null,!0),model:{value:i.equipment_id,callback:function(t){e.$set(i,"equipment_id",t)},expression:"item.equipment_id"}})],1),e._l(i.break,(function(a,l){return t("div",{key:l,staticStyle:{display:"flex","align-items":"center"}},[t("div",{staticStyle:{width:"35%",padding:"0 0.5rem 1rem 0.5rem"}},[t("label",[e._v("不良品原因:")]),t("b-form-select",{staticStyle:{height:"1.4rem",width:"100%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:e.breakList},scopedSlots:e._u([{key:"first",fn:function(){return[t("b-form-select-option",{attrs:{value:"",disabled:""}},[e._v("请选择原因")])]},proxy:!0}],null,!0),model:{value:a.break_id,callback:function(t){e.$set(a,"break_id",t)},expression:"_item.break_id"}})],1),t("div",{staticStyle:{width:"35%",padding:"0 0.5rem 1rem 0.5rem"}},[t("label",[e._v("不良品数量:")]),t("Input",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"请输入",type:"number"},model:{value:a.break_num,callback:function(t){e.$set(a,"break_num",t)},expression:"_item.break_num"}})],1),t("div",{staticStyle:{width:"30%",display:"flex"}},[t("div",{staticClass:"boo",on:{click:function(t){return e.handleBreakAdd(l,i,s)}}},[e._v(" + ")]),t("div",{staticClass:"boo",on:{click:function(t){return e.handleBreakCancel(l,i,s)}}},[e._v(" -")])])])}))],2)})),t("div",{staticClass:"footer_btn"},[t("b-button",{staticStyle:{width:"35%","margin-left":"3%"},attrs:{variant:"primary"},on:{click:e.handleReturn}},[e._v("返回")]),t("b-button",{staticStyle:{width:"35%","margin-right":"3%"},attrs:{variant:"primary"},on:{click:e.handleSure}},[e._v("确认")])],1)],2)])},a=[],l={data(){return{list:[],name:"",formData:{},teamList:[],employeeList:[],equipmentList:[],state:!0,breakList:[]}},created(){const e={url:"http://121.36.142.167:7774/jbl/api/module-data/defective_list/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:15,specialConditions:[],dynamicFormCode:"defective",developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...e}).then(e=>{this.breakList=e.data.content.filter(e=>e.status),this.breakList.forEach(e=>{e.value=e.defective_code,e.text=e.title})});const t={url:"http://121.36.142.167:7774/jbl/api/module-data/device_list/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:15,specialConditions:[],dynamicFormCode:"device",developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...t}).then(e=>{this.equipmentList=e.data.content.filter(e=>e.status),this.equipmentList.forEach(e=>{e.value=e.device_code,e.text=e.title})});const i={url:"http://121.36.142.167:7774/jbl/api/module-data/team_list/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:15,specialConditions:[],dynamicFormCode:"team",developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...i}).then(e=>{this.teamList=e.data.content.filter(e=>e.status),this.teamList.forEach(e=>{e.value=e.team_code,e.text=e.title})});const s={url:"http://121.36.142.167:7774/jbl/api/module-data/team_code_btn/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:15,specialConditions:[],workflowSearchBean:{},dynamicFormCode:"person",dynamicFormTable:null,ignoreField:!0,developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...s}).then(e=>{this.employeeList=e.data.content,this.employeeList.forEach(e=>{e.value=e.no,e.text=e.name})})},beforeRouteLeave(e,t,i){localStorage.removeItem(this.$route.query.id+""),i()},beforeRouteEnter(e,t,i){localStorage.getItem(e.query.id)?i():i(e=>{e.$router.replace("/cms/finish/detail")})},mounted(){const e=this.$route.query.id;this.initData(e)},methods:{handleChangeNumber(e,t){this.list[t].not_finished_num=this.list[t].dispatch_num-1*e.target.value},handleChangeEmployee(e,t){this.list[t].employee_id_show=this.employeeList.filter(t=>-1!==e.indexOf(t.no)).map(e=>e.name).toString().replace(/,/g,"/$/$/$").replace(/\//g,""),console.log(this.list[t])},handleChangeTeam(e,t){this.list[t].team_id_show=this.teamList.find(t=>t.team_code===e).title},handleChangeEquipment(e,t){this.list[t].equipment_id_show=this.equipmentList.find(t=>t.device_code===e).title},initData(e){this.list=JSON.parse(localStorage.getItem(e+"")),this.list.forEach(e=>{e.team_finish_id=e.dispatch_orders.team_id,e.team_id_show=e.dispatch_orders.team_id_show,e.equipment_id=e.dispatch_orders.equipment_id,e.equipment_id_show=e.dispatch_orders.equipment_id_show,e.finished_num=e.not_finished_num,e.dispatch_order_no=e.dispatch_no,e.id=null,e.employee_id=e.dispatch_orders.employee_id.split(","),e.employee_id_show=e.dispatch_orders.employee_id_show,e.break=[{break_id:"",break_num:0}]})},handleBreakAdd(e,t,i){t.break.splice(e+1,0,{break_id:"",break_num:0}),this.list.splice(i,1,t)},handleBreakCancel(e,t,i){0===e?t.break=[{break_id:"",break_num:0}]:t.break.splice(e,1),this.list.splice(i,1,t)},handleReturn(){localStorage.removeItem(this.$route.query.id+""),this.$router.go(-1)},handleSure(){console.log(this.list),this.list.forEach(e=>{const t={url:"http://121.36.142.167:7774/jbl/api/module-data/completion_orders/completion_orders",post:{bizId:-1,bizTypeEk:"LOWCODE",dynamicFormId:"474201923419320320",showModelId:"474382714828959744",data:{completion_orders:{completion_order_no:null,completion_time:new Date,created_by:null,created_date:null,employee_id:e.employee_id.toString(),employee_id_show:e.employee_id_show,equipment_id:e.equipment_id,equipment_id_show:e.equipment_id_show,last_modified_by:null,last_modified_date:null,process_id:e.dispatch_orders.process_id,process_id_show:e.dispatch_orders.process_id_show,remark:null,site:null,team_id:e.team_finish_id,team_id_show:e.team_id_show},completion_orders_dtl:[e]}}};this.axios.post("/api/testdwy",{...t}).then(e=>{200==e.code&&(this.$Message.success(e.msg),this.$router.push("/cms/home"))})})}}},o=l,n=(i("d5df"),i("2877")),d=Object(n["a"])(o,s,a,!1,null,"72291b22",null);t["default"]=d.exports},"67c8":function(e,t,i){},d5df:function(e,t,i){"use strict";i("67c8")}}]);
|