(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-089685f8"],{1175:function(t,e,i){"use strict";i("7181")},"3e1e":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"content"},[t._l(t.list,(function(i,s){return e("div",{key:s,staticClass:"item"},[e("div",{staticClass:"add",on:{click:function(e){return t.handleAdd(i,s)}}},[t._v("+")]),e("div",{staticClass:"delete",on:{click:function(e){return t.handleDelete(s)}}},[t._v("x")]),e("div",{staticClass:"unit"},[e("label",[t._v("派工单号：")]),e("span",[t._v(t._s(i.dispatch_no))])]),e("div",{staticClass:"unit",staticStyle:{display:"flex"}},[e("label",[t._v("产品名称：")]),e("div",{staticStyle:{width:"60%"}},[t._v(t._s(i.product_title))])]),e("div",{staticClass:"unit",staticStyle:{display:"flex"}},[e("label",[t._v("数量：")]),e("input",{directives:[{name:"model",rawName:"v-model",value:i.quantity,expression:"item.quantity"}],staticStyle:{width:"60%",padding:"0 0 0 0.2rem"},attrs:{placeholder:"  请输入"},domProps:{value:i.quantity},on:{input:function(e){e.target.composing||t.$set(i,"quantity",e.target.value)}}})]),e("div",{staticClass:"unit"},[e("label",[t._v("班组：")]),e("span",[e("b-form-select",{staticStyle:{height:"1.4rem",width:"60%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:t.teamList},scopedSlots:t._u([{key:"first",fn:function(){return[e("b-form-select-option",{attrs:{value:"",disabled:""}},[t._v("请选择班组")])]},proxy:!0}],null,!0),model:{value:i.team_id,callback:function(e){t.$set(i,"team_id",e)},expression:"item.team_id"}})],1)]),e("div",{staticClass:"unit"},[e("label",[t._v("人员：")]),e("b-form-select",{staticStyle:{height:"1.4rem",width:"60%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:t.employeeList},scopedSlots:t._u([{key:"first",fn:function(){return[e("b-form-select-option",{attrs:{value:"",disabled:""}},[t._v("请选择人员")])]},proxy:!0}],null,!0),model:{value:i.employee_id,callback:function(e){t.$set(i,"employee_id",e)},expression:"item.employee_id"}})],1),e("div",{staticClass:"unit"},[e("label",[t._v("设备：")]),e("b-form-select",{staticStyle:{height:"1.4rem",width:"60%",border:"0.1rem solid","border-radius":"0.6rem",background:"#fff"},attrs:{options:t.equipmentList},scopedSlots:t._u([{key:"first",fn:function(){return[e("b-form-select-option",{attrs:{value:"",disabled:""}},[t._v("请选择设备")])]},proxy:!0}],null,!0),model:{value:i.equipment_id,callback:function(e){t.$set(i,"equipment_id",e)},expression:"item.equipment_id"}})],1)])})),e("div",{staticClass:"footer_btn"},[e("b-button",{staticStyle:{width:"35%","margin-left":"3%"},attrs:{variant:"primary"},on:{click:t.handleReturn}},[t._v("返回")]),e("b-button",{staticStyle:{width:"35%","margin-right":"3%"},attrs:{variant:"primary"},on:{click:t.handleSure}},[t._v("确认")])],1)],2),t._m(0)])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"footer"},[e("div",[t._v("总计：")]),e("div",{staticClass:"footer_content"},[e("div",[e("label",[t._v("派工单号：")]),e("div",[t._v("123456")])]),e("div",[e("label",[t._v("产品名称：")]),e("div",[t._v("实木板")])]),e("div",[e("label",[t._v("数量：")]),e("div",[t._v("23")])]),e("div",[e("label",[t._v("班组：")]),e("div",[t._v("一班")])]),e("div",[e("label",[t._v("人员：")]),e("div",[t._v("张三")])]),e("div",[e("label",[t._v("设备：")]),e("div",[t._v("一号机")])])])])}],l={data(){return{list:[],email:"",name:"",food:null,checked:[],form:{},teamList:[],employeeList:[],equipmentList:[],state:!0}},created(){this.axios.post("/api/finishedOrderDetailsList",{id:this.$route.query.id.split(",")}).then(t=>{this.list=t.data.list}),this.axios.post("/api/teamList").then(t=>{this.teamList=t.data.data,this.teamList.forEach(t=>{t.value=t.id,t.text=t.title})}),this.axios.post("/api/employeeList").then(t=>{this.employeeList=t.data.data,this.employeeList.forEach(t=>{t.value=t.id,t.text=t.emp_name})}),this.axios.post("/api/equipmentList").then(t=>{this.equipmentList=t.data.data,this.equipmentList.forEach(t=>{t.value=t.id,t.text=t.title})})},methods:{handleReturn(){this.$router.go(-1)},handleDelete(t){1!=this.list.length&&this.list.splice(t,1)},handleAdd(t,e){if(t.quantity){let i=JSON.parse(JSON.stringify(t));i.quantity=Math.floor(t.quantity/2)+t.quantity%2,t.quantity=Math.floor(t.quantity/2),this.list.splice(e,1,t),this.list.splice(e+1,0,i)}},handleSure(){let t=[];this.list.forEach(e=>{let i={};i.id=e.id,i.team_id=e.team_id,i.finished_id=e.employee_id,i.equipment_id=e.equipment_id,i.quantity=e.quantity,t.push(i)}),this.state&&(this.state=!1,this.axios.post("/api/mobileFinishedOrderAdd",{...t}).then(t=>{200==t.code&&(this.state=!0,this.$Message.success(t.msg),this.handleReturn())}))}}},n=l,d=(i("1175"),i("2877")),o=Object(d["a"])(n,s,a,!1,null,"5e4050fa",null);e["default"]=o.exports},7181:function(t,e,i){}}]);