6.8c85846f7d3b6d56cd62.js 17 KB

12
  1. webpackJsonp([6],{"+6Bu":function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e,t){var i={};for(var l in e)t.indexOf(l)>=0||Object.prototype.hasOwnProperty.call(e,l)&&(i[l]=e[l]);return i}},M7rk:function(e,t){},"Wnr/":function(e,t){},g5t5:function(e,t,i){"use strict";var l=i("woOf"),r=i.n(l),n=[{name:"订单已提交,等待付款",time:"2017-04-01 12:00:00 "},{name:"订单付款成功",time:"2017-04-01 12:00:00 "},{name:"在北京市进行下级地点扫描,等待付款",time:"2017-04-01 12:00:00 "},{name:"在分拨中心广东深圳公司进行卸车扫描,等待付款",time:"2017-04-01 12:00:00 "},{name:"在广东深圳公司进行发出扫描",time:"2017-04-01 12:00:00 "},{name:"到达目的地网点广东深圳公司,快件将很快进行派送",time:"2017-04-01 12:00:00 "},{name:"订单已签收,期待再次为您服务",time:"2017-04-01 12:00:00 "}],s={name:"logisticsDialog",props:{value:Boolean},computed:{visible:{get:function(){return this.value},set:function(e){this.value=e}}},data:function(){return{logisticsList:r()({},n)}},methods:{emitInput:function(e){this.$emit("input",e)},handleClose:function(){this.emitInput(!1)}}},a={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"订单跟踪",visible:e.visible,"before-close":e.handleClose,width:"40%"},on:{"update:visible":function(t){e.visible=t}}},[i("el-steps",{attrs:{direction:"vertical",active:6,"finish-status":"success",space:"50px"}},e._l(e.logisticsList,function(e){return i("el-step",{key:e.name,attrs:{title:e.name,description:e.time}})}))],1)},staticRenderFns:[]};var o=i("VU/8")(s,a,!1,function(e){i("M7rk")},null,null);t.a=o.exports},u5in:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i("Dd8w"),r=i.n(l),n=i("+6Bu"),s=i.n(n),a=i("woOf"),o=i.n(a),u=i("FWz8"),c=i("xT6B"),d=i("5LJj"),p=i("oqQY"),f=i.n(p),m={pageNum:1,pageSize:10,orderSn:null,receiverKeyword:null,status:null,orderType:null,sourceType:null,dateRange:[],createTime:null,endTime:null},h={name:"orderList",components:{LogisticsDialog:i("g5t5").a},data:function(){return{listQuery:o()({},m),listLoading:!0,list:null,total:null,operateType:1,multipleSelection:[],closeOrder:{dialogVisible:!1,content:null,orderIds:[]},statusOptions:[{label:"待付款",value:0},{label:"待发货",value:1},{label:"已发货",value:2},{label:"已完成",value:3},{label:"已关闭",value:4}],orderTypeOptions:[{label:"正常订单",value:0},{label:"秒杀订单",value:1}],sourceTypeOptions:[{label:"PC订单",value:0},{label:"APP订单",value:1},{label:"学校采购",value:2},{label:"个人订单",value:3}],operateOptions:[{label:"批量发货",value:1},{label:"关闭订单",value:2},{label:"删除订单",value:3}],logisticsDialogVisible:!1}},created:function(){this.getList(),this.$route.params.status+""&&(this.listQuery.status=this.$route.params.status),this.$route.query.orderSn&&(this.listQuery.orderSn=this.$route.query.orderSn)},filters:{formatCreateTime:function(e){var t=new Date(e);return Object(c.a)(t,"yyyy-MM-dd hh:mm:ss")},formatPayType:function(e){return 1===e?"支付宝":2===e?"微信":3===e?"余额":"未支付"},formatOrderFormType:function(e){if("MEC"===e)return"管乐迷"},formatSourceType:function(e){return 0===e?"PC订单":1===e?"APP订单":2===e?"学校采购":3===e?"个人订单":"其他订单"},formatStatus:function(e){return 1===e?"待发货":2===e?"已发货":3===e?"已完成":4===e?"已关闭":5===e?"无效订单":"待付款"}},methods:{checkSelectable:function(e){return 1===e.status},handleResetSearch:function(){this.listQuery=o()({},m)},handleSearchList:function(){this.listQuery.pageNum=1,this.getList()},onTableSelectALL:function(e){var t=this,i=this.list||[];if(e.length>0){var l=this.multipleSelection.map(function(e){return e.id});e.forEach(function(e){-1==l.indexOf(e.id)&&t.multipleSelection.push(e)})}else{var r=i.map(function(e){return e.id}),n=this.multipleSelection.map(function(e){return e.id}),s=[];r.forEach(function(e){-1!==n.indexOf(e)&&s.push(e)}),console.log(r,n,"sids",s);var a=[];this.multipleSelection.forEach(function(e){-1===s.indexOf(e.id)&&a.push(e)}),this.multipleSelection=a}},onTableSelect:function(e,t){var i=this.multipleSelection.map(function(e){return e.id});-1!==e.map(function(e){return e.id}).indexOf(t.id)?-1===i.indexOf(t.id)&&this.multipleSelection.push(t):-1!==i.indexOf(t.id)&&this.multipleSelection.splice(i.indexOf(t.id),1)},handleViewOrder:function(e,t){this.$router.push({path:"/oms/orderDetail",query:{id:t.id}})},handleCloseOrder:function(e,t){var i=this,l=2===t.status||t.deliveryTime?"该订单已发货,关闭后将自动返还库存?":"是否要关闭订单?";this.$confirm(l,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.h)({ids:[t.id],status:4}).then(function(e){i.$message({message:"关闭成功!",type:"success",duration:1e3}),i.getList()})})},handleDeliveryOrder:function(e,t){var i=this.covertOrder(t);this.$router.push({path:"/oms/deliverOrderList",query:{list:[i]}})},handleOverOrder:function(e,t){var i=this;this.$confirm("是否要完成订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(u.h)({ids:[t.id],status:3}).then(function(e){i.$message({message:"完成成功!",type:"success",duration:1e3}),i.getList()})})},handleViewLogistics:function(e,t){this.logisticsDialogVisible=!0},handleDeleteOrder:function(e,t){var i=[];i.push(t.id),this.deleteOrder(i)},handleBatchOperate:function(){if(null==this.multipleSelection||this.multipleSelection.length<1)this.$message({message:"请选择要操作的订单",type:"warning",duration:1e3});else if(1===this.operateType){for(var e=[],t=0;t<this.multipleSelection.length;t++)1===this.multipleSelection[t].status&&e.push(this.covertOrder(this.multipleSelection[t]));if(0===e.length)return void this.$message({message:"选中订单中没有可以发货的订单",type:"warning",duration:1e3});this.$router.push({path:"/oms/deliverOrderList",query:{list:e}})}else if(2===this.operateType){this.closeOrder.orderIds=[];for(var i=0;i<this.multipleSelection.length;i++)this.closeOrder.orderIds.push(this.multipleSelection[i].id);this.closeOrder.dialogVisible=!0}else if(3===this.operateType){for(var l=[],r=0;r<this.multipleSelection.length;r++)l.push(this.multipleSelection[r].id);this.deleteOrder(l)}},handleSizeChange:function(e){this.listQuery.pageNum=1,this.listQuery.pageSize=e,this.getList()},handleCurrentChange:function(e){this.listQuery.pageNum=e,this.getList()},handleCloseOrderConfirm:function(){var e=this;this.$refs.closeOrder.validate(function(t){if(t){var i={ids:e.closeOrder.orderIds.join(","),note:e.closeOrder.content};Object(u.a)(i).then(function(t){e.closeOrder.orderIds=[],e.closeOrder={dialogVisible:!1,content:null,orderIds:[]},e.getList(),e.$message({message:"修改成功",type:"success",duration:1e3})})}})},getList:function(){var e=this;this.listLoading=!0,console.log(this.listQuery,"listQuery");var t=this.listQuery,i=t.dateRange,l=t.createTime,n=t.endTime,a=s()(t,["dateRange","createTime","endTime"]);i&&i.length>0&&(l=f()(i[0]).format("YYYY-MM-DD"),n=f()(i[1]).format("YYYY-MM-DD")),Object(u.d)(r()({createTime:l,endTime:n},a)).then(function(t){e.list=t.data.list,e.total=t.data.total,e.$nextTick(function(){if(e.multipleSelection){var t=e.multipleSelection.map(function(e,t){return e.id});e.list.forEach(function(i,l){if(-1!=t.indexOf(i.id))if(1===i.status)e.$refs.orderTable.toggleRowSelection(i,!0);else{var r=e.multipleSelection.findIndex(function(e){return e.id===i.id});e.multipleSelection.splice(r,1)}})}e.listLoading=!1})})},deleteOrder:function(e){var t=this;this.$confirm("是否要进行该删除操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var i={ids:e.join(",")};Object(u.b)(i).then(function(e){t.$message({message:"删除成功!",type:"success",duration:1e3}),t.getList()})})},covertOrder:function(e){var t=e.receiverProvince+e.receiverCity+e.receiverRegion+e.receiverDetailAddress;return{orderId:e.id,orderSn:e.orderSn,receiverName:e.receiverName,receiverPhone:e.receiverPhone,receiverPostCode:e.receiverPostCode,address:t,deliveryCompany:null,deliverySn:null,isError:!1}},onExport:function(){Object(d.a)(this,{url:"/api-mall-admin/export/orderDetail",fileName:"订单列表.xls",method:"post",params:r()({},this.listQuery)},"您确定导出订单列表?")}}},v={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("el-card",{staticClass:"filter-container",attrs:{shadow:"never"}},[i("div",[i("i",{staticClass:"el-icon-search"}),e._v(" "),i("span",[e._v("筛选搜索")]),e._v(" "),i("el-button",{staticStyle:{float:"right"},attrs:{size:"small",type:"danger"},on:{click:function(t){e.onExport()}}},[e._v("\n 导出\n ")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-right":"15px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.handleSearchList()}}},[e._v("\n 查询搜索\n ")]),e._v(" "),i("el-button",{staticStyle:{float:"right","margin-right":"15px"},attrs:{size:"small"},on:{click:function(t){e.handleResetSearch()}}},[e._v("\n 重置\n ")])],1),e._v(" "),i("div",{staticStyle:{"margin-top":"15px"}},[i("el-form",{attrs:{inline:!0,model:e.listQuery,size:"small","label-width":"140px"}},[i("el-form-item",{attrs:{label:"输入搜索:"}},[i("el-input",{staticClass:"input-width",attrs:{placeholder:"订单编号"},model:{value:e.listQuery.orderSn,callback:function(t){e.$set(e.listQuery,"orderSn",t)},expression:"listQuery.orderSn"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"收货人:"}},[i("el-input",{staticClass:"input-width",attrs:{placeholder:"收货人姓名/手机号码"},model:{value:e.listQuery.receiverKeyword,callback:function(t){e.$set(e.listQuery,"receiverKeyword",t)},expression:"listQuery.receiverKeyword"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"提交时间:"}},[i("el-date-picker",{staticClass:"input-width",staticStyle:{width:"260px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange",placeholder:"请选择时间","range-separator":"~","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.listQuery.dateRange,callback:function(t){e.$set(e.listQuery,"dateRange",t)},expression:"listQuery.dateRange"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"订单状态:"}},[i("el-select",{staticClass:"input-width",attrs:{placeholder:"全部",clearable:""},model:{value:e.listQuery.status,callback:function(t){e.$set(e.listQuery,"status",t)},expression:"listQuery.status"}},e._l(e.statusOptions,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),i("el-form-item",{attrs:{label:"订单分类:"}},[i("el-select",{staticClass:"input-width",attrs:{placeholder:"全部",clearable:""},model:{value:e.listQuery.orderType,callback:function(t){e.$set(e.listQuery,"orderType",t)},expression:"listQuery.orderType"}},e._l(e.orderTypeOptions,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),i("el-form-item",{attrs:{label:"订单来源:"}},[i("el-select",{staticClass:"input-width",attrs:{placeholder:"全部",clearable:""},model:{value:e.listQuery.sourceType,callback:function(t){e.$set(e.listQuery,"sourceType",t)},expression:"listQuery.sourceType"}},e._l(e.sourceTypeOptions,function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1)],1)],1)]),e._v(" "),i("el-card",{staticClass:"operate-container",attrs:{shadow:"never"}},[i("div",{staticStyle:{display:"flex","align-items":"center"}},[i("div",[i("i",{staticClass:"el-icon-tickets"}),e._v(" "),i("span",[e._v("数据列表")])]),e._v(" "),i("el-button",{staticStyle:{"margin-left":"15px"},attrs:{type:"primary",size:"small"},on:{click:function(t){e.handleBatchOperate()}}},[e._v("\n 批量发货\n ")])],1)]),e._v(" "),i("div",{staticClass:"table-container"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"orderTable",staticStyle:{width:"100%"},attrs:{data:e.list,border:""},on:{select:e.onTableSelect,"select-all":e.onTableSelectALL}},[i("el-table-column",{attrs:{type:"selection",width:"55",selectable:e.checkSelectable,align:"center"}}),e._v(" "),i("el-table-column",{attrs:{label:"编号",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.id))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"订单编号",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.orderSn))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"提交时间",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatCreateTime")(t.row.createTime)))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"来源",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatOrderFormType")(t.row.orderFormType)))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"用户类型",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return["STUDENT"==t.row.platformType?i("p",[e._v("学生")]):"TEACHER"==t.row.platformType?i("p",[e._v("老师")]):"SCHOOL"==t.row.platformType?i("p",[e._v("学校")]):i("p",[e._v("--")])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"用户编号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.userId))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"用户名",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.username))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"手机号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.phone||"-"))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"订单金额",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("¥"+e._s(t.row.totalAmount))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"支付方式",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[2!=t.row.sourceType&&3!=t.row.sourceType&&4!=t.row.sourceType?i("span",[e._v("\n "+e._s(e._f("formatPayType")(t.row.payType))+"\n ")]):i("span",[e._v("-")])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"订单来源",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatSourceType")(t.row.sourceType)))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"订单状态",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("formatStatus")(t.row.status)))]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"操作",width:"200",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("p",{staticClass:"table-btn-group"},[i("el-button",{attrs:{size:"mini"},on:{click:function(i){e.handleViewOrder(t.$index,t.row)}}},[e._v("查看订单")]),e._v(" "),i("el-button",{directives:[{name:"show",rawName:"v-show",value:0===t.row.status||1===t.row.status||2===t.row.status||3===t.row.status,expression:"scope.row.status === 0 || scope.row.status === 1 || scope.row.status === 2 || scope.row.status === 3"}],attrs:{size:"mini",type:"danger"},on:{click:function(i){e.handleCloseOrder(t.$index,t.row)}}},[e._v("关闭订单")]),e._v(" "),i("el-button",{directives:[{name:"show",rawName:"v-show",value:1===t.row.status,expression:"scope.row.status === 1"}],attrs:{size:"mini"},on:{click:function(i){e.handleDeliveryOrder(t.$index,t.row)}}},[e._v("订单发货")]),e._v(" "),i("el-button",{directives:[{name:"show",rawName:"v-show",value:1===t.row.status,expression:"scope.row.status === 1"}],attrs:{size:"mini",type:"success"},on:{click:function(i){e.handleOverOrder(t.$index,t.row)}}},[e._v("完成订单")])],1)]}}])})],1)],1),e._v(" "),i("div",{staticClass:"pagination-container"},[i("el-pagination",{attrs:{background:"",layout:"total, sizes,prev, pager, next,jumper","current-page":e.listQuery.pageNum,"page-size":e.listQuery.pageSize,"page-sizes":[5,10,15],total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){e.$set(e.listQuery,"pageNum",t)}}})],1),e._v(" "),i("el-dialog",{attrs:{title:"关闭订单",visible:e.closeOrder.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.$set(e.closeOrder,"dialogVisible",t)}}},[i("el-form",{ref:"closeOrder",attrs:{model:e.closeOrder,"label-width":"150px"}},[i("el-form-item",{attrs:{label:"操作备注:",prop:"content",rules:[{required:!0,message:"请填写操作备注",trigger:"blur"}]}},[i("el-input",{attrs:{type:"textarea",rows:"3"},model:{value:e.closeOrder.content,callback:function(t){e.$set(e.closeOrder,"content",t)},expression:"closeOrder.content"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.closeOrder.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.handleCloseOrderConfirm}},[e._v("确 定")])],1)],1),e._v(" "),i("logistics-dialog",{model:{value:e.logisticsDialogVisible,callback:function(t){e.logisticsDialogVisible=t},expression:"logisticsDialogVisible"}})],1)},staticRenderFns:[]};var y=i("VU/8")(h,v,!1,function(e){i("Wnr/")},"data-v-164735d0",null);t.default=y.exports}});
  2. //# sourceMappingURL=6.8c85846f7d3b6d56cd62.js.map