1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4ca68f57"],{"16e1":function(e,t,i){"use strict";i.r(t);var l=function(){var e=this,t=e._self._c;return t("div",{staticStyle:{width:"100vw",height:"100vh"}},[t("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center","padding-top":"1rem",position:"relative"}},[t("div",{staticStyle:{position:"absolute",top:".2rem",left:"1rem",color:"#FFFFFF","font-weight":"bold","font-size":"3rem","letter-spacing":"1rem"}},[e._v("完工屏")]),t("Form",{attrs:{"label-width":150},nativeOn:{submit:function(e){e.preventDefault()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleBlur.apply(null,arguments)}}},[t("FormItem",{attrs:{label:"派工单号:"}},[t("Input",{staticStyle:{width:"25rem"},attrs:{clearable:"",placeholder:"扫码填入",size:"large"},model:{value:e.order_no,callback:function(t){e.order_no=t},expression:"order_no"}})],1)],1),t("div",{staticStyle:{position:"absolute",top:"1.1rem",right:"0"}},[t("Button",{staticStyle:{"margin-right":"1rem"},attrs:{size:"large",id:"full_screen_btn",type:"primary"},on:{click:e.handleFullScreenClick}},[e._v(" "+e._s(e.isFullScreen?"收 缩":"全 屏")+" ")]),t("Button",{staticStyle:{"margin-right":"1rem"},attrs:{type:"primary",size:"large"},on:{click:e.handleSure}},[e._v("确认")]),t("Button",{staticStyle:{"margin-right":"1rem"},attrs:{size:"large"},on:{click:e.handleReturn}},[e._v("返回")])],1)],1),t("div",{staticClass:"bdy",style:e.show?{position:"relative",top:"-200px"}:{}},e._l(e.list,(function(i,l){return t("div",{key:l,staticClass:"item"},[t("div",{staticStyle:{position:"absolute",width:"2.4rem",height:"2.4rem",top:"0px",right:"0px","border-radius":"50%","background-color":"red",color:"#FFFFFF","text-align":"center","line-height":"1.6","font-size":"1.6rem"},on:{click:function(t){return e.handleDel(l)}}},[e._v("X")]),t("div",{staticClass:"it_ti"},[t("label",[e._v("派工单号:")]),t("span",[e._v(e._s(i.dispatch_no))])]),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工类型:")]),t("Select",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:"",transfer:""},model:{value:i.completion_type_show,callback:function(t){e.$set(i,"completion_type_show",t)},expression:"item.completion_type_show"}},e._l(e.completionList,(function(e){return t("Option",{key:e.id,attrs:{value:e.value,label:e.text}})})),1)],1),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工时间:")]),t("DatePicker",{staticStyle:{width:"200px"},attrs:{type:"date",placeholder:"请选择"},model:{value:i.completion_time,callback:function(t){e.$set(i,"completion_time",t)},expression:"item.completion_time"}})],1),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工工序:")]),t("Select",{staticStyle:{width:"200px"},attrs:{filterable:"",clearable:"",transfer:""},model:{value:i.process_id,callback:function(t){e.$set(i,"process_id",t)},expression:"item.process_id"}},e._l(e.processList,(function(e){return t("Option",{key:e.id,attrs:{value:e.value,label:e.text}})})),1)],1),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工班组:")]),t("Select",{staticStyle:{width:"200px"},attrs:{clearable:"",filterable:"",transfer:""},model:{value:i.team_id,callback:function(t){e.$set(i,"team_id",t)},expression:"item.team_id"}},e._l(e.teamList,(function(e){return t("Option",{key:e.id,attrs:{value:e.value,label:e.text}})})),1)],1),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工设备:")]),t("Select",{staticStyle:{width:"200px"},attrs:{clearable:"",filterable:"",transfer:""},model:{value:i.equipment_id,callback:function(t){e.$set(i,"equipment_id",t)},expression:"item.equipment_id"}},e._l(e.equipmentList,(function(e){return t("Option",{key:e.id,attrs:{value:e.value,label:e.text}})})),1)],1),t("div",{staticClass:"it_ti"},[t("label",[e._v("完工人员:")]),t("Select",{staticStyle:{width:"200px"},attrs:{clearable:"",multiple:"",filterable:"",transfer:""},on:{"on-change":e.handleChangeEmp},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:{value:e.value,label:e.text}})})),1)],1),t("Divider",[e._v("产品明细")]),e._l(i.children,(function(i,o){return t("div",{key:o,staticClass:"itemmingxi"},[t("div",{staticStyle:{position:"absolute",width:"2rem",height:"2rem",top:"-.4rem",right:"-.4rem","border-radius":"50%","background-color":"#c91d31",color:"#FFFFFF","text-align":"center","line-height":".6","font-size":"2.5rem"},on:{click:function(t){return e.handleDelItem(l,o)}}},[e._v("-")]),t("div",[t("label",[e._v("销售订单号:")]),t("span",[e._v(e._s(i.order_no))])]),t("div",[t("label",[e._v("经销商名称:")]),t("span",[e._v(e._s(i.dealer_name))])]),t("div",[t("label",[e._v("产品编码:")]),t("span",[e._v(e._s(i.product_no))])]),t("div",{staticStyle:{display:"flex"}},[t("span",[e._v("产品名称:")]),t("span",{staticStyle:{width:"200px"}},[e._v(e._s(i.product_title))])]),t("div",{staticStyle:{display:"flex"}},[t("label",[e._v("规格型号:")]),t("span",[e._v(e._s(i.product_size))])]),t("div",[t("label",[e._v("计量单位:")]),t("span",[e._v(e._s(i.product_unit_title))])]),t("div",[t("label",[e._v("工艺名称1:")]),t("span",[e._v(e._s(i.in_process_title))])]),t("div",[t("label",[e._v("花色名称1:")]),t("span",[e._v(e._s(i.in_color))])]),t("div",[t("label",[e._v("工艺名称2:")]),t("span",[e._v(e._s(i.in_process_title_two))])]),t("div",[t("label",[e._v("花色名称2:")]),t("span",[e._v(e._s(i.in_color_two))])]),t("div",[t("label",[e._v("工艺类型:")]),t("span",[e._v(e._s(i.craft_type_dk_show))])]),t("div",[t("label",[e._v("派工数量:")]),t("span",[e._v(e._s(i.dispatch_num))])]),t("div",[t("label",[e._v("完工数量:")]),t("Input",{staticStyle:{width:"150px"},attrs:{clearable:"",placeholder:"请输入"},on:{"on-focus":function(t){return e.handlefocus(l,o)}},model:{value:i.finished_num,callback:function(t){e.$set(i,"finished_num",t)},expression:"_item.finished_num"}})],1),t("div",[t("label",[e._v("未完工数量:")]),t("span",[e._v(e._s(i.not_finished_num))])])])}))],2)})),0),t("van-number-keyboard",{attrs:{show:e.show,theme:"custom","extra-key":".","close-button-text":"完成"},on:{blur:e.handleonBlur,input:e.onInput,delete:e.onDelete}})],1)},o=[],s={data(){return{show:!1,isFullScreen:!1,list:[],order_no:"",teamList:[],equipmentList:[],employeeList:[],chooseIndex:0,itemIndex:0,processList:[],completionList:[],employee:{employee_id:null,employee_id_show:null}}},created(){localStorage.getItem("dwy_url")||this.$router.push("/cms/chipScreen"),this.axios.post("/api/testdwyget",{url:localStorage.getItem("dwy_url")+"jbl/api/dict-tables/find-by-code?dictCode=completion_type"}).then(e=>{this.completionList=e.data.dictItems,this.completionList.forEach(e=>{e.text=e.value})});const e={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/process_dossier_code/page",post:{direction:"DESC",fromClientType:"pc",ignoreField:!0,number:0,property:"id",rules:[],size:999,specialConditions:[]}};this.axios.post("/api/testdwy",{...e}).then(e=>{this.processList=e.data.content,this.processList.forEach(e=>{e.value=e.process_code,e.text=e.title})});const t={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/device_list/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:999,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:localStorage.getItem("dwy_url")+"jbl/api/module-data/team_list/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:999,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 l={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/team_code_btn/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[],size:999,specialConditions:[],workflowSearchBean:{},dynamicFormCode:"person",dynamicFormTable:null,ignoreField:!0,developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...l}).then(e=>{this.employeeList=e.data.content,this.employeeList.forEach(e=>{e.value=e.no,e.text=e.name})})},methods:{handleChangeEmp(e){if(0!=e.length){let t=e.toString(),i="",l=[];e.forEach((e,t)=>{let o=this.employeeList.find(t=>t.value==e).text,s=this.employeeList.find(t=>t.value==e);s.checkDisabled=!1,s.checked=!0,l.push(s),0==t?i=o:i+="$$$"+o}),this.employee={employee_id:t,employee_id_show:i,employee_id_biz_data:l}}else this.employee={employee_id_show:null,employee_id:null};console.log(this.employee)},handleDelItem(e,t){this.list[e].children.splice(t,1)},handleDel(e){this.list.splice(e,1)},handleReturn(){this.isFullScreen&&this.handleFullScreenClick(),this.$router.go(-1)},onInput(e){this.list[this.chooseIndex].children[this.itemIndex].finished_num=this.list[this.chooseIndex].children[this.itemIndex].finished_num+""+e},onDelete(){this.list[this.chooseIndex].children[this.itemIndex].finished_num+="",this.list[this.chooseIndex].children[this.itemIndex].finished_num=this.list[this.chooseIndex].children[this.itemIndex].finished_num.substring(0,this.list[this.chooseIndex].children[this.itemIndex].finished_num.length-1)},handleonBlur(){this.show=!1},handleFullScreenClick(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this.enterFullScreen():this.exitFullScreen()},handlefocus(e,t){this.chooseIndex=e,this.itemIndex=t,this.show=!0},enterFullScreen(){let e=document.documentElement,t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;if(t)t.call(e);else if("undefined"!==typeof window.ActiveXObject){let e=new ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}},handleSure(){this.list.forEach((e,t)=>{let i={completion_order_no:null,completion_time:new Date(Date.parse(e.completion_time)).toISOString(),completion_type:this.completionList.find(t=>t.value==e.completion_type_show).code,completion_type_show:e.completion_type_show,created_by:null,created_date:null,dispatch_order_no:e.dispatch_no,...this.employee,equipment_id:e.equipment_id,equipment_id_show:this.equipmentList.find(t=>t.value==e.equipment_id)?this.equipmentList.find(t=>t.value==e.equipment_id).text:null,last_modified_by:null,last_modified_date:null,process_id:e.process_id,process_id_show:this.processList.find(t=>t.value==e.process_id)?this.processList.find(t=>t.value==e.process_id).text:null,remark:e.remark,site:null,tag:null,team_id:e.team_id,team_id_show:this.teamList.find(t=>t.value==e.team_id)?this.teamList.find(t=>t.value==e.team_id).text:null},l=[];e.children.forEach(e=>{let t={item_num:e.item_num,product_no:e.product_no,in_product_tile:e.in_product_tile,in_process_title:e.in_process_title,in_color:e.in_color,in_process_title_two:e.in_process_title_two,in_color_two:e.in_color_two,product_size:e.product_size,product_unit:e.product_unit,product_unit_title:e.product_unit_title,finished_num:e.finished_num,dispatch_num:e.dispatch_num,production_num:e.production_num,production_no:e.production_no,production_item_no:e.production_item_no,dispatch_order_no:e.dispatch_order_no,dispatch_item_no:e.dispatch_item_no,order_no:e.order_no,order_item_no:e.order_item_no,customer_no:e.customer_no,customer_name:e.customer_name,dealer_no:e.dealer_no,dealer_name:e.dealer_name,product_title:e.product_title,process_title:e.process_title,color:e.color,process_title_two:e.process_title_two,color_two:e.color_two,color_code_two:e.color_code_two,dispatch_item_id:e.dispatch_item_id,process_code_two:e.process_code_two,color_code:e.color_code,order_item_id:e.order_item_id,production_item_id:e.production_item_id,process_code:e.process_code,process_router_id:e.process_router_id,craft_type_dk:e.craft_type_dk,craft_type_dk_show:e.craft_type_dk_show,mat_type:e.mat_type,refer_type:"DISPATCH",site:null,not_finished_num:e.not_finished_num};l.push(t)});let o={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/completion_orders/completion_orders",post:{bizId:-1,bizTypeEk:"LOWCODE",data:{completion_orders_dtl:l,completion_orders:i},dynamicFormId:"474201923419320320",showModelId:"474382714828959744"}};this.axios.post("/api/testdwy",{...o}).then(e=>{200==e.code&&(this.$Message.success(e.msg),t==this.list.length-1&&(this.list=[]))})})},exitFullScreen(){let e=document,t=e.cancelFullScreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitExitFullscreen||e.exitFullscreen;if(t)t.call(e);else if("undefined"!==typeof window.ActiveXObject){let e=new ActiveXObject("WScript.Shell");null!=e&&e.SendKeys("{F11}")}},handleBlur(){if(this.order_no){let e=this.func.hexToString(this.order_no),t=this.list.map(e=>e.dispatch_no);const i={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/dispatch_orders/page",post:{direction:"DESC",property:"id",fromClientType:"pc",number:0,sorts:[],rules:[{field:"dispatch_orders.dispatch_no",option:"LIKE_ANYWHERE",values:[e]}],size:15,specialConditions:[],workflowSearchBean:{},dynamicFormCode:"dispatch_orders",dynamicFormTable:null,ignoreField:!0,developmentSystemId:null,debugFlag:!0}};this.axios.post("/api/testdwy",{...i}).then(e=>{if(0!=e.data.content.length&&-1==t.indexOf(e.data.content[0].dispatch_orders.dispatch_no)){e.data.content.forEach((e,t)=>{e.dispatch_order_no=e.dispatch_orders.dispatch_no,e.not_finished_num=e.dispatch_num-(e.finished_num?e.finished_num:0),e.finished_num=e.not_finished_num,e.item_num=t+1,e.dispatch_item_no=e.item_num,e.dispatch_item_id=e.id,e.refer_type="DISPATCH",e.site=null}),e.data.content[0].dispatch_orders.completion_time=new Date;let t={...e.data.content[0].dispatch_orders,completion_type_show:"完工后质检",children:e.data.content};this.list.push(t),console.log(this.list)}})}}}},n=s,r=(i("db20"),i("2877")),a=Object(r["a"])(n,l,o,!1,null,"35a677a6",null);t["default"]=a.exports},"9c0a":function(e,t,i){},db20:function(e,t,i){"use strict";i("9c0a")}}]);
|