(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-719fc3bb"],{"0659":function(t,e,o){},a49e:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{overflow:"auto","padding-bottom":"6.6rem","box-sizing":"border-box",height:"100vh"}},[e("div",{staticStyle:{height:"calc(100% - 2rem)"}},[e("div",{staticClass:"home_header"},[t._v("发货屏 "),e("div",{staticStyle:{position:"absolute",right:"1rem",display:"flex","align-items":"center"}},[e("i-switch",{staticStyle:{"margin-right":"1rem"},attrs:{size:"large"},model:{value:t.direction,callback:function(e){t.direction=e},expression:"direction"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("入")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("出")])]),e("Button",{staticStyle:{"margin-right":"1rem","margin-top":".2rem"},attrs:{id:"full_screen_btn",size:"large",type:"primary"},on:{click:t.handleFullScreenClick}},[t._v(" "+t._s(t.isFullScreen?"收 缩":"全 屏")+" ")]),e("div",{staticClass:"return_btn",on:{click:t.handleReturn}},[t._v("返回")]),e("div",{staticClass:"confirm_btn",on:{click:t.handelGoSure}},[t._v("确认")])],1)]),e("div",{staticClass:"home_header_line"}),e("div",{staticClass:"time"},[e("img",{staticClass:"time_pic",attrs:{src:o("fc73"),alt:""}}),e("span",[t._v(t._s(t.time))]),e("span",{staticStyle:{"font-size":"1rem","margin-left":"1rem"}},[t._v("("+t._s(t.name)+")")])]),e("div",{staticStyle:{"margin-left":"1rem",color:"#FFFFFF","font-size":"1.2rem"}},[e("div",{staticStyle:{display:"flex"}},[e("div",{staticStyle:{width:"30rem"}},[e("span",{staticStyle:{width:"7rem",display:"inline-block","text-align":"right"}},[t._v("经销商:")]),e("span",[t._v(t._s(t.data.data.exe_delivery_note_b.distributor)+"-"+t._s(t.data.data.exe_delivery_note_b.distributor_show))])]),e("div",[e("span",{staticStyle:{width:"7rem",display:"inline-block","text-align":"right","margin-left":"2rem"}},[t._v("发货单号:")]),e("span",[t._v(t._s(t.data.data.exe_delivery_note_b.no))])])]),e("div",{staticStyle:{display:"flex","margin-top":"1rem"}},[e("div",{staticStyle:{width:"30rem"}},[e("span",{staticStyle:{width:"7rem",display:"inline-block","text-align":"right"}},[t._v("客户:")]),e("span",[t._v(t._s(t.data.data.exe_delivery_note_b.customer_code_show))])]),e("div",[e("span",{staticStyle:{width:"7rem",display:"inline-block","text-align":"right","margin-left":"2rem"}},[t._v("销售单号:")]),e("span",[t._v(t._s(t.data.data.exe_delivery_note_b.order_no))])])])]),e("div",{staticClass:"home_con_body"},[e("div",{staticClass:"home_con_s"},[e("div",{staticClass:"pack_up_con"},[e("div",{staticClass:"pack_up_grid"},[e("div",{staticStyle:{width:"40%"}},[e("div",[e("p",[t._v("预发总数")]),e("div",[e("span",[t._v(t._s(t.total_num))]),e("span",[t._v("张")])])]),e("div",[e("p",[t._v("已扫总数")]),e("div",[e("span",[t._v(t._s(t.scan_num))]),e("span",[t._v("张")])])]),e("div",[e("p",[t._v("未扫总数")]),e("div",[e("span",[t._v(t._s(t.total_num-t.scan_num))]),e("span",[t._v("张")])])])]),e("div",{staticStyle:{width:"40%"}},[e("div",[e("p",{staticStyle:{color:"red"}},[t._v("异常总数")]),e("div",[e("span",{staticStyle:{color:"red !important","margin-left":"1rem"}},[t._v(t._s(t.error_num))]),e("span",{staticStyle:{color:"red"}},[t._v("张")])])])])]),e("div",{staticStyle:{display:"flex","justify-content":"space-between","margin-top":"1rem"}},[e("div",{staticStyle:{width:"50%"}},[e("table",{staticClass:"true_table"},[t._m(0),t._l(t.tableData,(function(o,i){return e("tr",{key:i,on:{click:function(e){return t.handleChoose(o,i)}}},[e("td",[t._v(t._s(o.order_no))]),e("td",[t._v(" "+t._s(o.product_title)+" ")]),e("td",[t._v(t._s(o.product_size))]),e("td",[t._v(t._s(o.box_no))]),e("td",{staticStyle:{color:"#04FFD5"}},[t._v(t._s(o.out_qty))])])}))],2)]),e("div",{staticStyle:{width:"45%","margin-right":"1rem"}},[e("table",{staticClass:"error_table"},[t._m(1),t._l(t.error_data,(function(o,i){return e("tr",{key:i,on:{click:function(e){return t.handleChoose(o,i)}}},[e("td",[t._v(t._s(o.order_no))]),e("td",[t._v(" "+t._s(o.box_detail.product_title)+" ")]),e("td",[t._v(t._s(o.product_size))]),e("td",[t._v(t._s(o.box_no))]),e("td",[t._v(t._s(o.box_num))])])}))],2)])])])])])])])},s=[function(){var t=this,e=t._self._c;return e("tr",{staticStyle:{height:"2rem"}},[e("th",{staticStyle:{width:"3rem"}},[t._v("订单号")]),e("th",{staticStyle:{width:"3rem"}},[t._v("产品名称")]),e("th",{staticStyle:{width:"3rem"}},[t._v("规格型号")]),e("th",{staticStyle:{width:"2rem"}},[t._v("包装单号")]),e("th",{staticStyle:{width:"2rem"}},[t._v("已扫到数量")])])},function(){var t=this,e=t._self._c;return e("tr",{staticStyle:{height:"2rem"}},[e("th",{staticStyle:{width:"3rem"}},[t._v("订单号")]),e("th",{staticStyle:{width:"3rem"}},[t._v("产品名称")]),e("th",{staticStyle:{width:"3rem"}},[t._v("规格型号")]),e("th",{staticStyle:{width:"2rem"}},[t._v("包装单号")]),e("th",{staticStyle:{width:"2rem"}},[t._v("数量")])])}],a=o("1157"),d=o.n(a);document.title="发货屏";var r={data(){return{direction:!1,time:"",name:"",error_num:0,tableData:[],key_tableData:{},send_goods_out:{},data:{data:{exe_delivery_note_b:{}}},send_goods_out_product:{},is_use:!1,total_num:0,scan_num:0,saveData:0,detail:{},transport_total:0,scan_data:[],new_table_data:[],state:!0,is_error:!1,error_data:[],text1:[],timer:"",times:"",record_state:!1,record_send_goods:{},isFullScreen:!1}},created(){let t=this;d.a.post({url:"http://clouddevice.qingyaokeji.com/api/setFhMessage",data:{device_id:t.$route.query.code,fh:1}}),this.timeFh=setInterval(()=>{d.a.post({url:"http://clouddevice.qingyaokeji.com/api/setFhMessage",data:{device_id:t.$route.query.code,fh:1}})},5e4),this.timer=setInterval(()=>{var t=new Date;let e=new Date(t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"})),o=e.getFullYear(),i=e.getMonth()+1,s=e.getDate(),a=e.toString().split(" ")[4];this.time=`${o}-${i}-${s} ${a}`},1e3)},mounted(){this.name=this.$route.query.title,this.tableData=[];const t=this.$route.query.id,e={url:`${localStorage.getItem("dwy_url")}jbl/api/module-data/delivery_note/delivery_note/478838363726815232/${t}`};this.initData(e)},destroyed(){clearInterval(this.timer),clearInterval(this.timeFh),clearInterval(this.times)},methods:{handleFullScreenClick(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this.enterFullScreen():this.exitFullScreen()},enterFullScreen(){let t=document.documentElement,e=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;if(e)e.call(t);else if("undefined"!==typeof window.ActiveXObject){let t=new ActiveXObject("WScript.Shell");null!=t&&t.SendKeys("{F11}")}},exitFullScreen(){let t=document,e=t.cancelFullScreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen||t.exitFullscreen;if(e)e.call(t);else if("undefined"!==typeof window.ActiveXObject){let t=new ActiveXObject("WScript.Shell");null!=t&&t.SendKeys("{F11}")}},handleErrorShow(){this.error_num&&(this.is_error=!0)},initData(t){let e=this;this.axios.post("/api/testdwyget",{...t}).then(t=>{t.data.data.exe_delivery_note_dtl_b.forEach(t=>{t.this_delivery_qty-=t.out_qty_total?t.out_qty_total:0}),this.data=JSON.parse(JSON.stringify(t.data)),this.$set(this.data.data.exe_delivery_note_b,"order_no",this.data.data.exe_delivery_note_b.order_no.slice(1,this.data.data.exe_delivery_note_b.order_no.length-1)),this.detail=t.data.data.exe_delivery_note_b,this.total_num=0,t.data.data.exe_delivery_note_dtl_b.forEach((t,e)=>{t.out_qty=0,t.product_code=t.material_code,t.unit_price=t.settlement_one_price,this.total_num=this.total_num+t.this_delivery_qty;let o=this.deelUniqueProductKey(t);this.key_tableData[o]=t}),this.axios.post("/api/testdwy",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out_dtl/page",post:{debugFlag:!0,developmentSystemId:null,direction:"DESC",dynamicFormCode:"send_goods_out",dynamicFormTable:null,fromClientType:"pc",ignoreField:!0,number:0,property:"id",rules:[{field:"bus_id",option:"LIKE_ANYWHERE",values:[this.$route.query.id]}],size:999,sorts:[],specialConditions:[],workflowSearchBean:{}}}).then(t=>{this.record_state=0!=t.data.content.length,this.record_state&&(this.record_send_goods=t.data.content[0].send_goods_out),this.tableData=JSON.parse(JSON.stringify(t.data.content)),this.tableData.forEach(t=>{this.scan_num+=1*t.out_qty,t.box_no=t.box_orders_show,t.box_id=t.box_orders,t.sure_id=t.id})}),this.times=setInterval(()=>{d.a.post({url:"http://clouddevice.qingyaokeji.com/api/getOrderNumber",data:{device_id:e.$route.query.code},success:t=>{let o=t.data.map(t=>t.epc),i=this.direction?1:2;const s={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/box_orders/box_orders/diy/defective_order_no_list",post:{defective_order_no_list:o}};0!=o.length&&e.initDataBox(s,i)}})},2e3)})},initDataBox(t,e){if(1==e){let e=t.post["defective_order_no_list"];this.text1.forEach((t,o)=>{-1!=e.indexOf(t)&&this.text1.splice(o,1)}),this.tableData=this.tableData.filter(t=>-1==e.indexOf(t.box_no)),this.error_data=this.error_data.filter(t=>-1==e.indexOf(t.box_no)),this.scan_num=0,this.error_num=0,this.tableData.forEach(t=>{this.scan_num+=1*t.out_qty}),this.error_data.forEach(t=>{this.error_num+=1*t.box_num})}else{t.post["defective_order_no_list"].forEach(t=>{-1==this.text1.indexOf(t)&&this.text1.push(t)});let e=[];this.axios.post("/api/testdwy",{...t}).then(t=>{200==t.code&&(t.data.data.filter(t=>!t.box_orders.delivery_status).forEach((t,o)=>{t.product_code=t.product_no,t.box_no=t.box_orders.defective_order_no,t.box_orders=t.box_orders.id,t.box_id=t.box_orders.id,t.box_detail=t,e.push(t)}),this.getTable(e))})}},getTable(t){let e=Object.keys(this.key_tableData),o=this.tableData.map(t=>`${t.product_title}${t.product_size}${t.box_no}`),i=this.error_data.map(t=>`${t.product_title}${t.product_size}${t.box_no}`);t.forEach(t=>{-1!=this.detail.order_no.indexOf(t.order_no)&&-1!=e.indexOf(this.deelUniqueProductKey(t))?-1==o.indexOf(`${t.product_title}${t.product_size}${t.box_no}`)&&(t.out_qty=1*t.box_num,this.tableData.unshift(t),this.scan_num+=1*t.box_num):-1==i.indexOf(`${t.product_title}${t.product_size}${t.box_no}`)&&(this.error_data.push(t),this.error_num+=1*t.box_num)})},deelUniqueProductKey(t){let e=t.product_code+(t.color?t.color:"")+(t.color_two?t.color_two:"")+(t.process_title?t.process_title:"")+(t.process_title_two?t.process_title_two:"");return e},async handelGoSure(){if(0==this.tableData.length&&!this.record_state)return;this.tableData.forEach((t,e)=>{t.item_num=e+1});const t=new Date,e=t.toISOString();let o={};this.record_state?(o={bizId:this.record_send_goods.dynamic_form_value_id,id:this.record_send_goods.dynamic_form_value_id,bizTypeEk:"LOWCODE",createdDate:e,dynamicFormId:"474057887278641152",showModelId:"474061442555260928",version:1,data:{send_goods_out:{},send_goods_out_product:[]}},o.data.send_goods_out=this.record_send_goods):(o={bizId:-1,bizTypeEk:"LOWCODE",createdDate:e,dynamicFormId:"474057887278641152",showModelId:"474061442555260928",version:1,data:{send_goods_out:{},send_goods_out_product:[]}},o.data.send_goods_out={send_goods_out_no:null,in_out_type:"CK007",box_title:"WH05001",out_time:e,out_depart:"481280388644478976",expect_date_delivery:this.detail.expect_date_delivery,expect_date_arrival:this.detail.expect_date_arrival,delivery_method_dk:this.detail.delivery_method_dk,express_company:null,express_no:null,area_selection:this.detail.area_selection,detailed_address:this.detail.detailed_address,contact:this.detail.contact,contact_way:this.detail.contact_way,status:"NOT_APPROVED",oa_id:null,oa_time:null,remark:null,order_no:this.detail.order_no,site:null,in_out_type_show:"成品发货出库",box_title_show:"成品仓",out_depart_show:"仓储部",out_employee_id_show:this.name,bus_no:this.detail.no,bus_id:this.$route.query.id,delivery_method_dk_show:this.detail.delivery_method_dk_show,area_selection_show:this.detail.area_selection_show}),this.tableData.forEach((t,e)=>{let i={item_num:e+1,product_code:t.product_code,product_title:t.product_title,product_size:t.product_size,product_unit:t.product_unit,product_unit_title:t.product_unit_title,process_code:t.process_code,color_code:t.color_code,process_code_two:t.process_code_two,color_code_two:t.color_code_two,process_title:t.process_title,color:t.color,process_title_two:t.process_title_two,color_two:t.color_two,bus_no:this.detail.no,bus_id:this.$route.query.id,bus_item_id:t.id,bus_item_no:t.item_no,order_no:t.order_no,out_qty:t.out_qty,this_delivery_qty:t.out_qty,order_item_id:t.order_item_id,unit_price:t.unit_price,site:null,customer_name:t.customer_name,customer_no:t.customer_no,dealer_name:t.dealer_name,dealer_no:t.dealer_no,box_orders:t.box_orders,box_orders_show:t.box_no,dynamic_form_value_id:t.dynamic_form_value_id,id:t.sure_id};o.data.send_goods_out_product.push(i)}),this.state&&(this.state=!1,0==this.tableData.length&&this.record_state?await this.axios.post("/api/testdwydel",{url:`${localStorage.getItem("dwy_url")}jbl/api/module-data/send_goods_out/send_goods_out/${this.record_send_goods.dynamic_form_value_id}`}).then(t=>{this.$Message.success(t.msg),this.axios.post("/api/testdwy",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out_dtl/page",post:{debugFlag:!0,developmentSystemId:null,direction:"DESC",dynamicFormCode:"send_goods_out",dynamicFormTable:null,fromClientType:"pc",ignoreField:!0,number:0,property:"id",rules:[{field:"bus_id",option:"LIKE_ANYWHERE",values:[this.$route.query.id]}],size:999,sorts:[],specialConditions:[],workflowSearchBean:{}}}).then(t=>{this.record_state=0!=t.data.content.length,this.record_state&&(this.record_send_goods=t.data.content[0].send_goods_out),this.scan_num=0,this.tableData=JSON.parse(JSON.stringify(t.data.content)),this.tableData.forEach(t=>{this.scan_num+=1*t.out_qty,t.box_no=t.box_orders_show,t.sure_id=t.id})})}):this.record_state?await this.axios.post("/api/testdwyget",{url:`${localStorage.getItem("dwy_url")}jbl/api/module-data/send_goods_out/send_goods_out/474061443708694528/${this.record_send_goods.dynamic_form_value_id}`}).then(t=>{o.version=t.data.version,this.axios.post("/api/testdwyput",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out/send_goods_out",post:o}).then(t=>{200===t.code&&(this.$Message.success(t.msg),this.axios.post("/api/testdwy",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out_dtl/page",post:{debugFlag:!0,developmentSystemId:null,direction:"DESC",dynamicFormCode:"send_goods_out",dynamicFormTable:null,fromClientType:"pc",ignoreField:!0,number:0,property:"id",rules:[{field:"bus_id",option:"LIKE_ANYWHERE",values:[this.$route.query.id]}],size:999,sorts:[],specialConditions:[],workflowSearchBean:{}}}).then(t=>{this.record_state=0!=t.data.content.length,this.record_state&&(this.record_send_goods=t.data.content[0].send_goods_out),this.scan_num=0,this.tableData=JSON.parse(JSON.stringify(t.data.content)),this.tableData.forEach(t=>{this.scan_num+=1*t.out_qty,t.box_no=t.box_orders_show,t.sure_id=t.id})})),setTimeout(()=>{this.state=!0},5e3)})}):await this.axios.post("/api/testdwy",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out/send_goods_out",post:o}).then(t=>{200===t.code&&(this.$Message.success(t.msg),this.axios.post("/api/testdwy",{url:localStorage.getItem("dwy_url")+"jbl/api/module-data/send_goods_out_dtl/page",post:{debugFlag:!0,developmentSystemId:null,direction:"DESC",dynamicFormCode:"send_goods_out",dynamicFormTable:null,fromClientType:"pc",ignoreField:!0,number:0,property:"id",rules:[{field:"bus_id",option:"LIKE_ANYWHERE",values:[this.$route.query.id]}],size:999,sorts:[],specialConditions:[],workflowSearchBean:{}}}).then(t=>{this.record_state=0!=t.data.content.length,this.record_state&&(this.record_send_goods=t.data.content[0].send_goods_out),this.scan_num=0,this.tableData=JSON.parse(JSON.stringify(t.data.content)),this.tableData.forEach(t=>{this.scan_num+=1*t.out_qty,t.box_no=t.box_orders_show,t.sure_id=t.id})})),setTimeout(()=>{this.state=!0},5e3)}));let i={url:localStorage.getItem("dwy_url")+"jbl/api/module-data/box_orders/box_orders/diy/update_delivery_status",post:{defective_order_no_list:this.text1}};await this.axios.post("/api/testdwy",i)},handleReturn(){this.isFullScreen&&this.handleFullScreenClick(),this.$router.go(-1)},handleChoose(t,e){t.is_choose=!t.is_choose,this.tableData.splice(e,1,t)}}},_=r,l=(o("be28"),o("2877")),n=Object(l["a"])(_,i,s,!1,null,"5ac00ff2",null);e["default"]=n.exports},be28:function(t,e,o){"use strict";o("0659")},fc73:function(t,e,o){t.exports=o.p+"static/img/time.2ebb52cd.png"}}]);