1 |
- webpackJsonp([27],{P4g8:function(e,t,a){var n=a("gQQ8");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("191c861a",n,!0)},f1h2:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("fZjL"),s=a.n(n),r=a("Dd8w"),o=a.n(r),i=a("FWz8"),l=a("38N9"),u=a.n(l),c=a("hky6"),d=a("jQQ7"),p=a("dClm"),_=a("aANz"),m={name:"warehouseOut",data:function(){return{warehouseList:[],deptList:[],expressCompanyList:[],loading:!1,params:{page_no:1,page_size:10,selectType:"to_be_send"},advancedForm:{},tableData:"",dialogVisible:!1,dialogSendVisible:!1,multipleSelection:[],orderType:[],warehouseOutForm:{},warehouseOutForms:{},auditVisible:!1,auditId:"",auditStatus:"AUDIT_PASS",activeShipped:"unShipped",deliveryTypeList:[],collectingAccountList:[],customerList:[]}},mounted:function(){this.GET_WarehouseOutList(),this.GET_DeptList(),this.GET_ExpressCompanyList(),this.GET_WarehouseList(),this.GET_CollectingAccountList()},watch:{$route:function(e){e.query;this.params.page_no=1,this.GET_WarehouseOutList()}},methods:{GET_CollectingAccountList:function(){var e=this;_.e({page_no:1,page_size:-1,enable_flag:!0}).then(function(t){e.collectingAccountList=t.data})},changRed:function(e){if(e.row.subtract_stock)return{color:"red"}},memberType:function(e){var t="";return this.customerList.map(function(a){if(a.id==e)return t=a.name}),t},payType:function(e){var t="";return this.collectingAccountList.map(function(a){if(a.id==e)return t=a.name}),t},deliveryType:function(e){var t="";return this.deliveryTypeList.map(function(a){if(a.value==e)return t=a.label}),t},warehouseName:function(e){return this.warehouseList.find(function(t){return t.id===e}).name||""},typeName:function(e){var t="";return this.orderType.map(function(a){if(a.value==e)return t=a.label}),t},handleClick:function(e,t){e.name,this.params.selectType=e.name,this.GET_WarehouseOutList()},addWarehouse:function(e){this.$router.push({name:"orderOutboundAdd",params:{id:e.id,send_type:e.order_vo.send_type}})},handleAuditDialog:function(e){this.$router.push({name:"orderOutboundAdd",params:{id:e.id,type:"check",send_type:e.order_vo.send_type}})},handleAuditWarehouseOut:function(){var e=this;i.p(this.auditId,{status:this.auditStatus}).then(function(t){e.$message.success("提交成功!"),e.auditVisible=!1,e.GET_WarehouseOutList()})},GET_ExpressCompanyList:function(){var e=this;i.h({page_no:1,page_size:9999}).then(function(t){e.expressCompanyList=t.data})},warehouseOutShip:function(){var e=this;i.w(this.warehouseOutForms).then(function(t){e.$message.success("发货成功!"),e.GET_WarehouseOutList(),e.dialogSendVisible=!1})},formatFilter:function(e){return e.join(",")},statusFilter:function(e){switch(e){case"WAIT_SHIP":case"WAIT_AUDIT":return"待发货";case"SHIP":return"已发货";default:return""}},GET_WarehouseList:function(){var e=this;p.G().then(function(t){e.warehouseList=t}),p.i(this.params).then(function(t){e.customerList=t.data}),c.u({dictType:"order_send_type"}).then(function(t){e.deliveryTypeList=t.data})},GET_DeptList:function(){var e=this;c.o().then(function(t){e.deptList=d.Foundation.buildTree(t,"0")}),c.u({dictType:"Sale_order_send_status"}).then(function(t){e.orderType=t.data})},handlePrintWarehouseOut:function(){u()({printable:"deliverySheet",type:"html",targetStyles:["*"],ignoreElements:["no-logs","goods-image","no-btn"]})},handleDeleteWarehouseOut:function(){var e=this;this.$confirm("确定要删除这些出库单吗?","提示",{type:"warning"}).then(function(){var t=e.multipleSelection.map(function(e){return e.id});i.d(t).then(function(){e.$message.success("删除成功!"),e.GET_WarehouseOutList()})}).catch(function(){})},handleSelectionChange:function(e){this.multipleSelection=e},handlePageSizeChange:function(e){this.params.page_size=e,this.GET_WarehouseOutList()},handlePageCurrentChange:function(e){this.params.page_no=e,this.GET_WarehouseOutList()},handleSendWarehouseOut:function(e){this.warehouseOutForms=e,this.$router.push({name:"orderOutboundAdd",params:{id:e.id}})},handlePrintWarehouseOutDialog:function(e){this.GET_WarehouseOutDetail(e.id)},GET_WarehouseOutDetail:function(e){var t=this;i.n(e).then(function(e){if(t.warehouseOutForm=e,e.product_list&&e.product_list.length){var a="";e.product_list.forEach(function(e){a+=e.product_name+"、"})}t.warehouseOutForm.illustrate=a,t.dialogVisible=!0})},searchEvent:function(e){var t=this;this.params=o()({},this.params,{sn:e}),s()(this.advancedForm).forEach(function(e){return delete t.params[e]}),this.params.page_no=1,this.GET_WarehouseOutList()},advancedSearchEvent:function(){this.params=o()({},this.params,this.advancedForm),delete this.params.start_time,delete this.params.end_time,this.advancedForm.warehouseOut_time_range&&(this.params.start_time=parseInt(Number(this.advancedForm.warehouseOut_time_range[0])/1e3),this.params.end_time=parseInt(Number(this.advancedForm.warehouseOut_time_range[1])/1e3)),delete this.params.warehouseOut_time_range,this.params.page_no=1,this.GET_WarehouseOutList()},GET_WarehouseOutList:function(){var e=this;this.loading=!0,i.l(this.params).then(function(t){e.loading=!1,e.tableData=t}).catch(function(){e.loading=!1})}}},h=a("XyMi");var f=function(e){a("P4g8")},v=Object(h.a)(m,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.params.selectType,callback:function(t){e.$set(e.params,"selectType",t)},expression:"params.selectType"}},[a("el-tab-pane",{attrs:{label:"未发货",name:"to_be_send"}}),e._v(" "),a("el-tab-pane",{attrs:{label:"已发货",name:"sending"}})],1)],1),e._v(" "),a("div",{staticClass:"search"},[a("el-form",{ref:"advancedForm",attrs:{model:e.advancedForm,"label-width":"160px"}},[a("el-row",[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"订单日期"}},[a("el-date-picker",{attrs:{type:"daterange",align:"center",editable:!1,"unlink-panels":"",clearable:!0,"default-time":["00:00:00","23:59:59"],"range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"timestamp","picker-options":{disabledDate:function(e){return e.getTime()-1>=new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()).getTime()+864e5-1},shortcuts:e.MixinPickerShortcuts}},model:{value:e.advancedForm.goodsExchange_time_range,callback:function(t){e.$set(e.advancedForm,"goodsExchange_time_range",t)},expression:"advancedForm.goodsExchange_time_range"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"仓库"}},[a("el-select",{attrs:{clearable:""},model:{value:e.advancedForm.warehouse_id,callback:function(t){e.$set(e.advancedForm,"warehouse_id",t)},expression:"advancedForm.warehouse_id"}},e._l(e.warehouseList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"订单编号"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入订单编号"},model:{value:e.advancedForm.sn,callback:function(t){e.$set(e.advancedForm,"sn",t)},expression:"advancedForm.sn"}})],1)],1)],1)],1),e._v(" "),a("el-button",{on:{click:e.advancedSearchEvent}},[e._v(" 搜索 ")])],1),e._v(" "),a("en-table-layout",{attrs:{tableData:e.tableData.records,loading:e.loading,"row-style":e.changRed},on:{"selection-change":e.handleSelectionChange}},[a("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[a("div",{staticClass:"toolbar-btns"},["sending"==e.params.selectType?a("span",[e._v("已发货:"+e._s(e.tableData.total))]):e._e()])]),e._v(" "),a("template",{slot:"table-columns"},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"订单编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.sn)+"\n ")]}}])}),e._v(" "),"sending"==e.params.selectType?a("el-table-column",{attrs:{prop:"sn",label:"出库单编号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.sn)+"\n ")]}}],null,!1,3298062784)}):e._e(),e._v(" "),a("el-table-column",{attrs:{label:"客户"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.memberType(t.row.order_vo.member_id))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"order_time",label:"下单时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("unixToDate")(t.row.create_time)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"warehouse_name",label:"仓库名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.warehouseName(t.row.warehouse_id))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"配送方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.deliveryType(t.row.order_vo.send_type)))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"付款方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.payType(t.row.order_vo.pay_type))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.typeName(t.row.status)))]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"250"},scopedSlots:e._u([{key:"default",fn:function(t){return["TO_BE_SEND"!==t.row.status?a("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(a){return e.handleAuditDialog(t.row)}}},[e._v("查看")]):e._e(),e._v(" "),"TO_BE_SEND"==t.row.status&&e.checkPermission(["orderOutboundAdd"])?a("el-button",{attrs:{size:"mini"},on:{click:function(a){return e.addWarehouse(t.row)}}},[e._v("发货")]):e._e()]}}])})],1),e._v(" "),e.tableData?a("el-pagination",{attrs:{slot:"pagination","current-page":e.tableData.pages,"page-sizes":[10,20,50,100],"page-size":e.tableData.size,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handlePageSizeChange,"current-change":e.handlePageCurrentChange},slot:"pagination"}):e._e()],2),e._v(" "),a("el-dialog",{attrs:{title:"出库单表",visible:e.dialogVisible,width:"940px",center:""},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-button",{staticClass:"print",attrs:{size:"mini",type:"primary"},on:{click:e.handlePrintWarehouseOut}},[e._v("打印")]),e._v(" "),a("div",{staticStyle:{width:"900px"},attrs:{id:"deliverySheet"}},[a("div",{staticClass:"tips-t"},[a("div",[e._v("\n 仓库名称编码:"),e.warehouseOutForm.dept_name?a("span",[e._v(e._s(e.warehouseOutForm.dept_name)+"部门")]):e._e(),e.warehouseOutForm.warehouse_name?a("span",[e._v(e._s(e.warehouseOutForm.warehouse_name)+"仓库")]):e._e()]),e._v(" "),a("div",[e._v("日期:"+e._s(e._f("unixToDateStr")(e.warehouseOutForm.out_time)))]),e._v(" "),a("div",[e._v("编号:"+e._s(e.warehouseOutForm.sn))])]),e._v(" "),a("div",{staticClass:"tips-t",staticStyle:{margin:"0 20px"}},[a("div",[e._v("用户电话:"+e._s(e.warehouseOutForm.member_mobile))]),e._v(" "),a("div",[e._v("用户姓名:"+e._s(e.warehouseOutForm.member_real_name))]),e._v(" "),a("div")]),e._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.warehouseOutForm.item_list,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center",background:"#f4f4f4"}}},[a("el-table-column",{attrs:{label:"产品编码"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.product_sn)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"产品名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.product_name)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"规格型号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.product_specification)+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"数量"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.out_num)+"\n ")]}}])})],1),e._v(" "),a("div",{staticClass:"tips-t"},[a("div",[e._v("提货人:"+e._s(e.warehouseOutForm.consignee))]),e._v(" "),a("div",[e._v("\n 客户订单号:"+e._s(e.warehouseOutForm.order_sn_list?e.formatFilter(e.warehouseOutForm.order_sn_list):"")+"\n ")]),e._v(" "),a("div",[e._v("制单人:"+e._s(e.warehouseOutForm.create_by))])])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"订单发货",visible:e.dialogSendVisible,width:"450px"},on:{"update:visible":function(t){e.dialogSendVisible=t}}},[a("el-form",{ref:"warehouseOutForms",attrs:{model:e.warehouseOutForms,"label-width":"120px"}},[a("el-form-item",{attrs:{label:"出库单号:",prop:"name"}},[e._v("\n "+e._s(e.warehouseOutForms.sn)+"\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"订单编号:",prop:"sn"}},[e.warehouseOutForms.order_sn_list?a("span",[e._v(e._s(e.formatFilter(e.warehouseOutForms.order_sn_list)))]):e._e()]),e._v(" "),a("el-form-item",{attrs:{label:"配送方式:",prop:"category_id"}},[a("el-radio",{attrs:{label:"express",disabled:!0},model:{value:e.warehouseOutForms.delivery_type,callback:function(t){e.$set(e.warehouseOutForms,"delivery_type",t)},expression:"warehouseOutForms.delivery_type"}},[e._v("物流配送")]),e._v(" "),a("el-radio",{attrs:{label:"self_pick",disabled:!0},model:{value:e.warehouseOutForms.delivery_type,callback:function(t){e.$set(e.warehouseOutForms,"delivery_type",t)},expression:"warehouseOutForms.delivery_type"}},[e._v("自提")])],1),e._v(" "),"self_pick"===e.warehouseOutForms.delivery_type?a("span",[a("el-form-item",{attrs:{label:"自提点:",prop:"store_id"}},[e._v("\n "+e._s(e.warehouseOutForms.store_name)+"\n ")]),e._v(" "),a("el-form-item",{attrs:{label:"物流费用:",prop:"freight_price"}},[a("el-input",{attrs:{type:"number",oninput:"value=parseInt(value.replace(/[^\\d]/g,''))",minlength:1,maxlength:20,clearable:"",placeholder:"请输入物流费用"},model:{value:e.warehouseOutForms.freight_price,callback:function(t){e.$set(e.warehouseOutForms,"freight_price",t)},expression:"warehouseOutForms.freight_price"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"提货人:",prop:"consignee"}},[a("el-input",{attrs:{minlength:1,maxlength:20,clearable:"",placeholder:"请输入提货人"},model:{value:e.warehouseOutForms.consignee,callback:function(t){e.$set(e.warehouseOutForms,"consignee",t)},expression:"warehouseOutForms.consignee"}})],1)],1):a("span",[a("el-form-item",{attrs:{label:"物流公司:",prop:"logistics_company_id"}},[a("el-select",{model:{value:e.warehouseOutForms.logistics_company_id,callback:function(t){e.$set(e.warehouseOutForms,"logistics_company_id",t)},expression:"warehouseOutForms.logistics_company_id"}},e._l(e.expressCompanyList,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"物流单号:",prop:"tracking_number"}},[a("el-input",{attrs:{minlength:1,maxlength:20,clearable:"",placeholder:"请输入物流单号"},model:{value:e.warehouseOutForms.tracking_number,callback:function(t){e.$set(e.warehouseOutForms,"tracking_number",t)},expression:"warehouseOutForms.tracking_number"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"物流费用:",prop:"freight_price"}},[a("el-input",{attrs:{type:"number",oninput:"value=parseInt(value.replace(/[^\\d]/g,''))",minlength:1,maxlength:20,clearable:"",placeholder:"请输入物流费用"},model:{value:e.warehouseOutForms.freight_price,callback:function(t){e.$set(e.warehouseOutForms,"freight_price",t)},expression:"warehouseOutForms.freight_price"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"提货人:",prop:"consignee"}},[a("el-input",{attrs:{minlength:1,maxlength:20,clearable:"",placeholder:"请输入提货人"},model:{value:e.warehouseOutForms.consignee,callback:function(t){e.$set(e.warehouseOutForms,"consignee",t)},expression:"warehouseOutForms.consignee"}})],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogSendVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.warehouseOutShip}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"审核",visible:e.auditVisible,width:"500px",center:""},on:{"update:visible":function(t){e.auditVisible=t}}},[a("span",[e._v("请选择审核状态:")]),e._v(" "),a("el-radio",{attrs:{label:"AUDIT_PASS"},model:{value:e.auditStatus,callback:function(t){e.auditStatus=t},expression:"auditStatus"}},[e._v("通过")]),e._v(" "),a("el-radio",{attrs:{label:"AUDIT_REJECT"},model:{value:e.auditStatus,callback:function(t){e.auditStatus=t},expression:"auditStatus"}},[e._v("驳回")]),e._v(" "),a("div",{staticClass:"btn-box"},[a("el-button",{attrs:{type:""},on:{click:function(t){e.auditVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.handleAuditWarehouseOut}},[e._v("提交")])],1)],1)],1)},[],!1,f,"data-v-feabfcbe",null);t.default=v.exports},gQQ8:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.search[data-v-feabfcbe] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: #fff;\n overflow: hidden;\n padding: 30px 10px 10px 10px;\n}\n.search[data-v-feabfcbe] .el-form-item .el-form-item__content .el-input {\n width: 200px;\n}\n.search .el-button[data-v-feabfcbe] {\n margin-top: -19px;\n margin-left: 20px;\n}\n.print[data-v-feabfcbe] {\n margin-left: 790px;\n}\n.btn-box[data-v-feabfcbe] {\n text-align: center;\n margin: 30px 0 10px;\n}\n.tips-t[data-v-feabfcbe] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 10px 0;\n}\n.tips-t div[data-v-feabfcbe] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n text-align: center;\n}\n.tips-f[data-v-feabfcbe] {\n padding: 20px 0;\n}\n.face-image[data-v-feabfcbe] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n[data-v-feabfcbe] .el-dialog__body {\n padding: 10px 20px;\n}\n",""])}});
|