You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
26 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0e522941"],{"0025":function(t,e,a){var l=a("24fb");e=l(!1),e.push([t.i,".el-row{margin-bottom:10px}.el-link{margin-top:10px}.el-form{margin-top:25px}.el-form-item{margin-bottom:0!important}.search-form .el-select{display:block}.el-form .el-input__inner{height:36px}.el-form .el-row .el-col{padding-left:0!important;padding-right:0!important}.eldate-datetime{height:36px!important;width:180px!important}.eldate-date{height:36px!important;width:140px!important}.search-btn .el-button--default{padding:13px 20px!important}.el-table--border{border-right:1px solid #ebeef5}.pagetable .el-table{margin-top:10px;margin-left:15px;min-height:600px}.el-table table thead tr th{border-top:none;border-right:none}.el-table table tbody tr td{border:none}.el-pagination{margin-top:15px;margin-right:40px;float:right}.dialog-form.el-form .el-form-item{margin-bottom:20px!important}.el-input-number .el-input input{height:40px!important}.el-delete:hover{background:#fff0f0}.span_red{color:red}.el-dialog__headerbtn{font-size:24px}.el-dialog__headerbtn:hover{background-color:#cecaca}",""]),t.exports=e},1:function(t,e){},"121a":function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return s})),a.d(e,"e",(function(){return d}));var l=a("b775"),r=a("2d46");function i(){return Object(r["a"])("tools/getdictlist")}function o(t,e){return Object(l["a"])({url:"tools/getdjydict/"+t,method:"get",params:e})}function n(t){return Object(l["a"])({url:"tools/getdictkeylist/"+t,method:"get"})}function s(t){return Object(l["a"])({url:"tools/getdictlist/"+t})}function d(t){var e="/api/tools/download?name="+encodeURI(t);return e}},2:function(t,e){},3:function(t,e){},5556:function(t,e,a){"use strict";a("6632")},"5a8d":function(t,e,a){var l=a("24fb"),r=a("0025");e=l(!1),e.i(r),e.push([t.i,".btn_tools{width:100px;float:left}",""]),t.exports=e},6632:function(t,e,a){var l=a("5a8d");l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);var r=a("499e").default;r("71b16262",l,!0,{sourceMap:!1,shadowMode:!1})},"95fe":function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mainbody"},[a("div",[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:16}},[a("div",{staticClass:"btn_tools"},[a("el-button",{attrs:{icon:"el-icon-plus",type:"primary",size:"medium"},on:{click:t.btn_add}},[t._v("新建")])],1),a("el-upload",{staticClass:"btn_tools",attrs:{action:t.url_upexcel,"on-success":t.btn_excelin,"on-error":t.up_error,"show-file-list":!1}},[a("el-button",{attrs:{icon:"el-icon-folder-add",type:"success",size:"medium"}},[t._v("批量导入")])],1),a("el-button",{staticStyle:{"margin-left":"40px"},attrs:{icon:"el-icon-position",type:"primary",size:"medium"},on:{click:function(e){t.win_printlisttomail=!0}}},[t._v("小票批量发送")]),a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"只导出当前页,请注意设置页面大小和翻页后再导出",placement:"top-start"}},[a("el-button",{attrs:{icon:"el-icon-position",type:"success"},on:{click:t.fun_excel}},[t._v("Excel")])],1)],1),a("el-col",{attrs:{span:4}},[null!=t.unlockstatus?a("el-switch",{staticStyle:{display:"block"},attrs:{"active-color":"#13ce66","inactive-color":"#ff4949","active-text":"企业后台解锁","inactive-text":"用户自主解锁"},on:{change:t.fun_unlockchange},model:{value:t.unlockstatus,callback:function(e){t.unlockstatus=e},expression:"unlockstatus"}}):t._e()],1),a("el-col",{attrs:{span:4}},[a("el-link",{attrs:{icon:"el-icon-download",href:"txxpordermodel.xlsx",type:"primary"}},[t._v("下载导入模版")])],1)],1),a("el-form",{ref:"frm_select",staticClass:"search-form",attrs:{model:t.selectdata,"label-width":"80px"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"提单号"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.sendOrderCode,callback:function(e){t.$set(t.selectdata,"sendOrderCode",e)},expression:"selectdata.sendOrderCode"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"订舱代理"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.agentName,callback:function(e){t.$set(t.selectdata,"agentName",e)},expression:"selectdata.agentName"}})],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"客户名称"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.customerName,callback:function(e){t.$set(t.selectdata,"customerName",e)},expression:"selectdata.customerName"}})],1)],1),a("el-col",{attrs:{span:8}},[a("el-form-item",[a("el-select",{staticStyle:{width:"120px",float:"left"},attrs:{placeholder:"时间方式"},model:{value:t.selectdata.type,callback:function(e){t.$set(t.selectdata,"type",e)},expression:"selectdata.type"}},t._l(t.data_timetype,(function(t){return a("el-option",{key:t.value,attrs:{label:t.title,value:t.value}})})),1),a("el-date-picker",{staticClass:"eldate-date",attrs:{type:"date",placeholder:""},model:{value:t.selectdata.timestart,callback:function(e){t.$set(t.selectdata,"timestart",e)},expression:"selectdata.timestart"}}),t._v(" 至 "),a("el-date-picker",{staticClass:"eldate-date",attrs:{type:"date",placeholder:""},model:{value:t.selectdata.timeend,callback:function(e){t.$set(t.selectdata,"timeend",e)},expression:"selectdata.timeend"}})],1)],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"船公司"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择","allow-create":"","default-first-option":""},model:{value:t.selectdata.carrierCode,callback:function(e){t.$set(t.selectdata,"carrierCode",e)},expression:"selectdata.carrierCode"}},t._l(t.carrierlist,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name+" "+t.code,value:t.code}})})),1)],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"场站"}},[a("el-select",{attrs:{filterable:"","allow-create":"","default-first-option":"",placeholder:"请选择"},model:{value:t.selectdata.depotName,callback:function(e){t.$set(t.selectdata,"depotName",e)},expression:"selectdata.depotName"}},t._l(t.depotlist,(function(t){return a("el-option",{key:t.name,attrs:{label:t.name+" "+t.code,value:t.name}})})),1)],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"船名"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.shipName,callback:function(e){t.$set(t.selectdata,"shipName",e)},expression:"selectdata.shipName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("el-form-item",{attrs:{label:"航次"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.voyNo,callback:function(e){t.$set(t.selectdata,"voyNo",e)},expression:"selectdata.voyNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("el-form-item",{attrs:{label:"操作员"}},[a("el-input",{attrs:{clearable:""},model:{value:t.selectdata.operatorName,callback:function(e){t.$set(t.selectdata,"operatorName",e)},expression:"selectdata.operatorName"}})],1)],1),a("el-col",{staticClass:"search-btn",attrs:{span:4}},[a("el-button",{staticStyle:{"margin-left":"15px"},attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getlist(1)}}},[t._v("查询")]),a("el-button",{attrs:{icon:"el-icon-refresh-right"},on:{click:function(e){return t.fun_select_reset()}}},[t._v("重置")])],1)],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"tab_list",staticStyle:{width:"98%"},attrs:{id:"tab_excellist",data:t.datalist,stripe:"",border:""},on:{"selection-change":t.tab_list_select,"row-dblclick":t.tab_row_show}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"提单号",prop:"sendOrderCode",width:"180"}}),a("el-table-column",{attrs:{label:"船名",prop:"shipName",width:"120"}}),a("el-table-column",{attrs:{label:"航次",prop:"voyNo",width:"120"}}),a("el-table-column",{attrs:{label:"开船日期",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.$ysapp.todate(e.row.etdTime))+" ")]}}])}),a("el-table-column",{attrs:{label:"客户名称",prop:"customerName"}}),a("el-table-column",{attrs:{label:"场站",prop:"depotName"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.depotCode)+" "+t._s(e.row.depotName)+" ")]}}])}),a("el-table-column",{attrs:{label:"箱型箱量",prop:"boxInfoStr"}}),a("el-table-column",{attrs:{label:"总箱量",prop:"boxCount"}}),a("el-table-column",{attrs:{label:"船公司",prop:"carrierName",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.carrierCode)+" "+t._s(e.row.carrierName)+" ")]}}])}),a("el-table-column",{attrs:{label:"订舱代理",prop:"agentName"}}),a("el-table-column",{attrs:{label:"打印次数",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" 总:"+t._s(e.row.printCount)+" 成功:"),a("span",{staticClass:"span_red"},[t._v(t._s(e.row.printOkCount))])]}}])}),a("el-table-column",{attrs:{label:"成功箱量",prop:"printOkCountTotal"}}),a("el-table-column",{attrs:{label:"锁定状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.getIsLock?t._e():a("el-tag",[t._v(t._s(e.getIsLock)+"正常")]),e.row.getIsLock?a("el-tag",{attrs:{type:"danger"}},[t._v(t._s(e.getIsLock)+"已锁定")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"时间",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.$ysapp.todatetime(e.row.addTime))+" ")]}}])}),a("el-table-column",{attrs:{label:"操作员",width:"100",prop:"operatorName"}}),a("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"查看打印链接",placement:"top-start"}},[null!=e.row.printUrl&&e.row.printUrl.length>0?a("el-button",{attrs:{icon:"el-icon-view",type:"info",circle:"",size:"mini"},on:{click:function(a){return t.print_show(e.row)}}}):t._e()],1),a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"跳转到打印链接查看",placement:"top-start"}},[null!=e.row.printUrl&&e.row.printUrl.length>0?a("el-button",{attrs:{icon:"el-icon-right",type:"success",circle:"",size:"mini"},on:{click:function(a){return t.print_gourl(e.row.printUrl)}}}):t._e()],1),a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"生成链接或重新生成",placement:"top-start"}},[a("el-button",{attrs:{icon:"el-icon-finished",type:"primary",size:"mini",circle:""},on:{click:function(a){return t.print_add(e.row)}}})],1),e.row.printUrl&&e.row.printUrl.length>0?a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"取消小票链接",placement:"top-start"}},[a("el-button",{attrs:{icon:"el-icon-finished",type:"danger",size:"mini",circle:""},on:{click:function(a){return t.fun_pringurlcancel(e.row.gid)}}})],1):t._e(),null==e.row.printUrl||0==e.row.printUrl.length?a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"删除,请谨慎操作",placement:"top-start"}},[a("el-button",{attrs:{circle:"",icon:"el-icon-delete",type:"danger",size:"mini"},on:{click:function(a){return t.btn_del(e.row.gid)}}})],1):t._e(),e.row.getIsLock?a("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"打印解锁,解锁后可继续打印",placement:"top-start"}},[a("el-button",{attrs:{circle:"",icon:"el-icon-unlock",type:"success",size:"mini"},on:{click:function(a){return t.fun_unlockprint(e.row.gid)}}})],1):t._e()]}}])})],1),a("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.selectdata.count,"page-size":t.selectdata.limit,"current-page":t.selectdata.page},on:{"size-change":t.pagesize,"current-change":t.pagechange}})],1)],1),a("el-dialog",{staticClass:"mainbody",attrs:{title:t.win_txxp_add_title,width:"860px",visible:t.win_txxp_add},on:{"update:visible":function(e){t.win_txxp_add=e}}},[a("div",[a("el-form",{ref:"frm_orderadd",staticClass:"dialog-form",staticStyle:{"margin-top":"0px","margin-left":"15px"},attrs:{model:t.frm_orderadddata,inline:!0,rules:t.addorderrules,"label-width":"80px"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{prop:"sendOrderCode",label:"提单号"}},[a("el-input",{attrs:{clearable:""},model:{value:t.frm_orderadddata.sendOrderCode,callback:function(e){t.$set(t.frm_orderadddata,"sendOrderCode",e)},expression:"frm_orderadddata.sendOrderCode"}})],1)],1),a("el-col",{attrs:{span:14}},[a("el-form-item",{attrs:{prop:"DepotCode",label:"场 站"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择"},model:{value:t.frm_orderadddata.DepotCode,callback:function(e){t.$set(t.frm_orderadddata,"DepotCode",e)},expression:"frm_orderadddata.DepotCode"}},t._l(t.depotlist,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name+" "+t.code,value:t.code}})})),1)],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{staticStyle:{"margin-bottom":"5px !important"},attrs:{label:"客户名称"}},[a("el-input",{attrs:{clearable:""},model:{value:t.frm_orderadddata.CustomerName,callback:function(e){t.$set(t.frm_orderadddata,"CustomerName",e)},expression:"frm_orderadddata.CustomerName"}})],1)],1),a("el-col",{attrs:{span:14}},[a("el-form-item",{staticStyle:{"margin-bottom":"5px !important"},attrs:{prop:"CarrierCode",label:"船公司"}},[a("el-select",{attrs:{filterable:"",placeholder:"请选择"},model:{value:t.frm_orderadddata.CarrierCode,callback:function(e){t.$set(t.frm_orderadddata,"CarrierCode",e)},expression:"frm_orderadddata.CarrierCode"}},t._l(t.carrierlist,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name+" "+t.code,value:t.code}})})),1)],1)],1)],1),a("el-row",{attrs:{gutter:24}},[t._l(t.boxinfolist,(function(e){return a("el-col",{key:e.index,staticStyle:{"margin-bottom":"10px"},attrs:{span:11}},[t._v(" 箱型: "),a("el-select",{staticStyle:{width:"100px","margin-right":"5px"},attrs:{filterable:"",placeholder:"请选择"},model:{value:e.boxtype,callback:function(a){t.$set(e,"boxtype",a)},expression:"boxitem.boxtype"}},t._l(t.databoxlist,(function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})})),1),t._v(" 箱量:"),a("el-input-number",{staticStyle:{width:"120px"},attrs:{min:1,max:100},model:{value:e.boxcount,callback:function(a){t.$set(e,"boxcount",a)},expression:"boxitem.boxcount"}}),a("el-button",{staticClass:"el-delete",staticStyle:{color:"red","margin-left":"7px",border:"1px solid red"},attrs:{icon:"el-icon-delete",size:"mini",circle:""},on:{click:function(a){return t.boxinfolistdel(e)}}})],1)})),a("el-col",{attrs:{span:1}},[a("el-button",{staticStyle:{"margin-top":"4px"},attrs:{type:"primary",icon:"el-icon-plus",circle:""},on:{click:t.boxinfolistadd}})],1)],2)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-switch",{staticStyle:{"margin-right":"20px"},attrs:{"active-text":"连续"},model:{value:t.win_txxp_add_isNext,callback:function(e){t.win_txxp_add_isNext=e},expression:"win_txxp_add_isNext"}}),a("el-button",{on:{click:function(e){t.win_txxp_add=!1}}},[t._v("取 消")]),t.win_txxp_add_btn?a("el-button",{attrs:{type:"primary"},on:{click:t.txxp_orderadd}},[t._v("确 定")]):t._e()],1)]),a("el-dialog",{attrs:{title:"提箱小票链接",width:"80%",top:"px",visible:t.win_txxp_printurl},on:{"update:visible":function(e){t.win_txxp_printurl=e}}},[a("div",{staticStyle:{width:"80%","min-width":"700px"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:20}},[t._v("提箱小票链接:"),a("a",{staticStyle:{"margin-left":"10px"},attrs:{href:t.currentrow.printUrl,target:"_blank"}},[a("span",{staticStyle:{color:"#409eff"}},[t._v(t._s(t.currentrow.printUrl))])])]),a("el-col",{attrs:{span:4}},[a("el-button",{staticStyle:{"margin-top":"0px !important","margin-left":"10px"},attrs:{size:"mini",icon:"el-icon-copy-document",type:"primary"},on:{click:function(e){return t.$ysapp.copy(t.currentrow.printUrl)}}},[t._v(" 复制 ")])],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:20}},[a("el-input",{attrs:{clearable:"",placeholder:"如需要发送邮件请填写邮件地址,多个邮箱请用英文逗号间隔"},model:{value:t.printsendemail,callback:function(e){t.printsendemail=e},expression:"printsendemail"}})],1),a("el-col",{attrs:{span:4}},[a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"mini",icon:"el-icon-position",type:"success"},on:{click:function(e){return t.print_sendemail()}}},[t._v(" 发送 ")])],1)],1)],1),a("div",{attrs:{id:"frm_print"},domProps:{innerHTML:t._s(t.data_show_printUrl)}})]),a("el-dialog",{attrs:{title:"提箱小票链接批量发送",width:"80%",top:"px",visible:t.win_printlisttomail},on:{"update:visible":function(e){t.win_printlisttomail=e},close:function(e){return t.toggleSelection()}}},[a("div",{staticStyle:{width:"80%","min-width":"700px"}},[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:20}},[a("p",[t._v("提箱小票链接:")]),a("ul",t._l(t.data_printurllist,(function(e,l){return a("li",{key:l},[t._v(" "+t._s(e.sendOrderCode)+": "),a("a",{attrs:{href:e.printUrl,target:"_blank"}},[a("span",{staticStyle:{color:"#409eff"}},[t._v(t._s(e.printUrl))])])])})),0)]),a("el-col",{attrs:{span:4}},[a("el-button",{staticStyle:{"margin-top":"0px !important","margin-left":"10px"},attrs:{size:"mini",icon:"el-icon-copy-document",type:"primary"},on:{click:function(e){return t.fun_btn_printlisttomail_copy()}}},[t._v(" 复制 ")])],1)],1),a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:20}},[a("el-input",{attrs:{clearable:"",placeholder:"如需要发送邮件请填写邮件地址,多个邮箱请用英文逗号间隔"},model:{value:t.printsendemail,callback:function(e){t.printsendemail=e},expression:"printsendemail"}})],1),a("el-col",{attrs:{span:4}},[a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"mini",icon:"el-icon-position",type:"success"},on:{click:function(e){return t.fun_btn_printlisttomail()}}},[t._v(" 发送 ")])],1)],1)],1)])],1)},r=[],i=a("b775");function o(t){return Object(i["a"])({url:"txxp",method:"get",params:t})}function n(t){return Object(i["a"])({url:"txxp",method:"post",data:t})}function s(t){return Object(i["a"])({url:"txxp/up",method:"post",data:t})}function d(t){return Object(i["a"])({url:"txxp/addlist",method:"post",data:t})}function c(t){return Object(i["a"])({url:"txxp/addprinturl/"+t,method:"get"})}function p(t){return Object(i["a"])({url:"txxp/urlcancel",method:"post",data:{gid:t}})}function u(t){return Object(i["a"])({url:"txxp/del",method:"post",data:t})}function m(t){return Object(i["a"])({url:"txxp/sendemail",method:"post",data:t})}function h(){return Object(i["a"])({url:"txxp/upunlock",method:"post"})}function f(t){return Object(i["a"])({url:"txxp/unlockprint",method:"post",data:t})}var b=a("121a"),_=(a("5f87"),a("1146")),g=a.n(_),x=a("21a6"),w=a.n(x),y={data(){return{unlockstatus:null,data_show_printUrl:"",loading:!1,win_printlisttomail:!1,box_str:"",datalist:[],data_timetype:[{title:"创建时间",value:"1"},{title:"开船日期",value:"2"}],url_upexcel:"/api/tools/excelread",selectdata:{limit:this.$pagesize,page:1,count:0,agentName:null,carrierCode:null,customerName:null,depotCode:null,depotName:null,sendOrderCode:null,shipName:null,voyNo:null,timestart:null,timeend:null,StartTime:0,EndTime:0,operatorName:null,type:"1"},win_txxp_add_isNext:!1,win_txxp_add:!1,win_txxp_add_btn:!0,win_txxp_add_title:"新建",win_txxp_printurl:!1,currentrow:[],data_printurllist:[],depotlist:[],carrierlist:[],databoxlist:[],boxinfolist:[],frm_orderadddata:{sendOrderCode:"",DepotCode:"",DepotName:"",CustomerName:"",CarrierCode:"",CarrierName:"",BoxInfo:"",agentName:"",agentCode:""},tableselect:[],printsendemail:"",addorderrules:{sendOrderCode:[{required:!0,message:"必填项不能为空值!",type:"string",trigger:"blur"}],CarrierCode:[{required:!0,message:"必填项不能为空值!",type:"string",trigger:"change"}],DepotCode:[{required:!0,message:"必填项不能为空值!",type:"string",trigger:"change"}]}}},created(){this.pageinit()},methods:{pageinit(){this.orderaddinit(),this.getlist(),Object(b["d"])("carrierlist",{key:"carrierlist_show"}).then(t=>{this.carrierlist=t.data}),Object(b["d"])("boxstationlist").then(t=>{this.depotlist=t.data}),Object(b["a"])("boxtypelist").then(t=>{this.databoxlist=t.data})},orderaddinit(){this.frm_orderadddata={sendOrderCode:"",DepotCode:"",DepotName:"",CustomerName:"",CarrierCode:"",CarrierName:"",BoxInfoStr:"",agentName:"",agentCode:"",gid:null},this.boxinfolist=[],this.boxinfolistadd(),this.win_txxp_add_isNext||(this.win_txxp_add=!1)},txxp_orderadd(){this.$refs["frm_orderadd"].validate(t=>{if(t){this.loading=!0;let t="";for(let a in this.boxinfolist){let e=this.boxinfolist[a];if(0==e.boxtype.length)return this.$message.error("请选择箱型"),void(this.loading=!1);t+=0==t.length?"":",",t+=e.boxtype+"*"+e.boxcount}this.frm_orderadddata.BoxInfoStr=t;let e=this.frm_orderadddata.gid;null==e||void 0==e||0==e.length?n(this.frm_orderadddata).then(t=>{this.orderaddinit(),this.pageinit(),this.$message({message:"提交成功!",type:"success"})}):s(this.frm_orderadddata).then(t=>{this.orderaddinit(),this.pageinit(),this.$message({message:"修改成功!",type:"success"})}),this.loading=!1}})},getlist(t){1==t&&(this.selectdata.page=1),null!=this.selectdata.timestart&&(this.selectdata.StartTime=Date.parse(this.selectdata.timestart)/1e3),null!=this.selectdata.timeend&&(this.selectdata.EndTime=Date.parse(this.selectdata.timeend)/1e3),this.loading=!0,o(this.selectdata).then(t=>{this.datalist=t.data,t.memoData&&null!=t.memoData.unLockStatus?this.unlockstatus=t.memoData.unLockStatus:this.unlockstatus=null,this.selectdata=this.$ysapp.getpagebind(t,this.selectdata),this.loading=!1})},fun_excel(){let t=g.a.utils.table_to_book(document.getElementById("tab_excellist"),{raw:!0});console.log(t);let e=g.a.write(t,{bookType:"xlsx",bookSST:!0,type:"array"});return w.a.saveAs(new Blob([e],{type:"application/octet-stream"}),"txxp.xlsx"),e},pagesize(t){this.selectdata.limit=t,this.getlist()},pagechange(t){this.selectdata.page=t,this.getlist()},tab_list_select(t){this.tableselect=t,this.data_printurllist=[],t.forEach(t=>{null!=t.printUrl&&t.printUrl.length>0&&this.data_printurllist.push(t)})},tab_row_show(t){this.win_txxp_add_title="提单号:"+t.sendOrderCode,this.frm_orderadddata={sendOrderCode:t.sendOrderCode,DepotCode:t.depotCode,CustomerName:t.customerName,CarrierCode:t.carrierCode,BoxInfoStr:t.boxInfoStr,gid:t.gid},this.boxinfolist=[],t.boxInfo.forEach(t=>{this.boxinfolist.push({boxtype:t.boxType,boxcount:t.boxCount})}),this.win_txxp_add_btn="djypaas"==t.systemCode,"djypaas"!=t.systemCode&&(this.frm_orderadddata.DepotCode=t.depotName),this.win_txxp_add=!0},btn_add(){this.win_txxp_add_title="新 建",this.frm_orderadddata.gid&&this.orderaddinit(),this.win_txxp_add=!0,this.win_txxp_add_btn=!0},btn_del(t){let e=new Array;e.push(t),0!=e.length?this.$confirm("您确定要删除选择的 "+e.length+" 条数据?").then(()=>{u(e).then(t=>{this.getlist(),this.$message({message:"删除成功!",type:"success"})})}).catch(()=>{}):this.$message.error({message:"没有找到操作数据"})},btn_excelin(t){if(200!=t.code)this.$message.error(t.message);else{let e=t.data,a=new Array;for(let t in e){let l=e[t],r=Object.keys(l);if(null==l[r[0]]||0==l[r[0]].length||null==l[r[1]]||0==l[r[1]].length||null==l[r[3]]||0==l[r[4]].length)return this.$message.error("第"+(t+1)+"条,提单号、场站、船务公司、箱型箱量不能为空!"),void console.log(l[0]);if(0==l[r[4]].split(",").length)return void this.$message.error("第"+(t+1)+"条,箱型箱量不能为空!");let i=l[r[4]].split(",");for(let e in i){let a=i[e],l=/\w{1,}[*][1-9]{1,}/;if(!l.exec(a))return void this.$message.error("第"+(t+1)+"条,箱型箱量不正确,必须是英文逗号间隔的箱型*箱量 例: 20GP*1,40GP*2")}a.push({sendOrderCode:l[r[0]],DepotName:l[r[1]],CustomerName:l[r[2]],CarrierName:l[r[3]],BoxInfoStr:l[r[4]]})}d(a).then(t=>{this.$message({message:"批量导入成功!",type:"success"}),this.getlist()})}},up_error(){this.$message.error("失败:导入的文件上传失败!")},boxinfolistadd(){this.boxinfolist.length;this.boxinfolist.push({boxtype:"",boxcount:1})},boxinfolistdel(t){if(1==this.boxinfolist.length)this.$message.error("最后一个不能删除!");else{var e=this.boxinfolist.indexOf(t);e>-1&&this.boxinfolist.splice(e,1)}},toggleSelection(t){t?t.forEach(t=>{this.$refs.tab_list.toggleRowSelection(t)}):this.$refs.tab_list.clearSelection()},print_add(t){c(t.gid).then(e=>{let a=e.data;t.printUrl=a,this.currentrow=t,this.print_show(t),this.$message({message:"生成成功!",type:"success"})})},print_show(t){this.currentrow=t,this.data_show_printUrl="";let e='<iframe height="700px" frameborder=0 src="'+this.currentrow.printUrl+'" style="width:100%;"></iframe>';this.data_show_printUrl=e,this.win_txxp_printurl=!0},print_gourl(t){window.open(t),this.$message({message:"打开成功",type:"success"})},print_sendemail(){let t=this.currentrow.gid;m({gid:t,email:this.printsendemail}).then(t=>{this.$message({message:"发送成功!",type:"success"})}).catch(()=>{})},fun_select_reset(){this.selectdata={limit:this.$pagesize,page:1,count:0,agentName:null,carrierCode:null,customerName:null,depotCode:null,sendOrderCode:null,shipName:null,voyNo:null,timestart:null,timeend:null,StartTime:0,EndTime:0,type:"1"}},fun_txxp_show(){this.$layer.open({type:1,title:"打印提箱小票",area:["700px","700px"],content:"http://www.baidu.com"})},fun_btn_printlisttomail(){let t=[];this.data_printurllist.forEach(e=>{t.push(e.gid)}),m({gidlist:t,email:this.printsendemail}).then(t=>{this.$message({message:"批量发送成功!",type:"success"}),this.toggleSelection(),this.win_printlisttomail=!1}).catch(()=>{})},fun_btn_printlisttomail_copy(){let t="";this.data_printurllist.forEach(e=>{t+=e.sendOrderCode+" "+e.printUrl+"\r\n "}),this.$ysapp.copy(t)},fun_pringurlcancel(t){p(t).then(t=>{this.$thisapp.msg("取消成功!"),this.getlist()})},fun_unlockchange(){h().then(t=>{this.$thisapp.msg("锁定方式修改成功!")})},fun_unlockprint(t){f({gid:t}).then(t=>{this.$thisapp.msg("操作成功!"),this.getlist()})}}},v=y,k=(a("5556"),a("2877")),C=Object(k["a"])(v,l,r,!1,null,null,null);e["default"]=C.exports}}]);