webpackJsonp([23],{Hn7p:function(e,t){},"eYh/":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i("kmJW"),s=(i("NC6I"),i("CCn6")),n=i("P0f4"),a=i("xGts"),r={name:"dialogObj",props:["dialogObj"],data:function(){return{}},watch:{"dialogObj.show":{deep:!0,handler:function(){console.log(this.dialogObj)}}},methods:{handlerAddressChange:function(e){if(e.province&&e.city&&e.district){this.dialogObj.detail=e.detail,this.dialogObj.province=e.province,this.dialogObj.city=e.city,this.dialogObj.receive_mobile=e.mobile,this.dialogObj.receive_name=e.name;var t=a.a.filter(function(t){return t.value===e.province}),i=t[0].children.filter(function(t){return t.value===e.city}),o=i[0].children.filter(function(t){return t.value===e.district});this.dialogObj.province_name=t[0].label,this.dialogObj.city_name=i[0].label,this.dialogObj.district_name=o.length>0?o[0].label:i[0].children[0].label,this.dialogObj.district=o.length>0?o[0].value:i[0].children[0].value}},saveAddress:function(){var e=this;this.$confirm("确定保存?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t={province_id:e.dialogObj.province,province_name:e.dialogObj.province_name,city_id:e.dialogObj.city,city:e.dialogObj.city_name,area:e.dialogObj.district_name,area_id:e.dialogObj.district,address:e.dialogObj.detail,receive_name:e.dialogObj.receive_name,receive_mobile:e.dialogObj.receive_mobile};Object(s._12)(e.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功"}),e.dialogObj.show=!1,e.$emit("reflash")})})}},components:{vueAddress:n.a},mounted:function(){console.log(this.dialogObj)}},l={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{title:"编辑收货地址",center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[i("vue-address",{attrs:{province:e.dialogObj.province,city:e.dialogObj.city,district:e.dialogObj.district,detail:e.dialogObj.detail,mobile:e.dialogObj.receive_mobile,name:e.dialogObj.receive_name},on:{change:e.handlerAddressChange}}),e._v(" "),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.saveAddress}},[e._v("保 存")])],1)],1)},staticRenderFns:[]};var d=i("VU/8")(r,l,!1,function(e){i("kQXt")},"data-v-9d2fec0c",null).exports,c={name:"receiveInfoDialog",props:["showFlag","goodsList","cancelEvent","sureEvent"],data:function(){return{}},methods:{cancelClick:function(){this.cancelEvent()},onAdd:function(){var e=this;this.periods&&this.periods.id?this.exportReceiveInfo().then(function(){e.sureEvent()}):Vue.prototype.$msgbox({message:"请选择期数",type:"warning"})},exportReceiveInfo:function(){return Object(s._28)(this.periods.id)},changePeriods:function(e){if(e.length>1){this.goods_id=e[0];var t=this.goodsList.find(function(t){return t.id===e[0]});this.periods=t.children.find(function(t){return t.id===e[1]})}},handleItemChange:function(e){var t=this;Object(s._76)({goods_id:e[0],limit:100}).then(function(i){i.list.forEach(function(e){e.name=e.title}),t.goodsList.find(function(t){return t.id===e[0]}).children=i.list})}}},h={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("el-dialog",{attrs:{visible:e.showFlag,width:"800px",center:"",title:"按期数导出收货信息"},on:{"update:visible":function(t){e.showFlag=t}}},[i("el-form",{attrs:{"label-width":"150px"}},[i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:e.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":e.handleItemChange,change:e.changePeriods},model:{value:e.selectedGoods,callback:function(t){e.selectedGoods=t},expression:"selectedGoods"}})],1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:e.cancelClick}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.onAdd}},[e._v("确 定")])],1)],1)},staticRenderFns:[]},u=i("VU/8")(c,h,!1,null,null,null).exports,_=i("zSLJ"),p=i("sf/l"),m=i("+TkF"),g={name:"index",components:{page:o.a,addressDialog:d,receiveInfoDialog:u},data:function(){return{dialogObj:{show:!1},showFlag:!1,adressDialog:!1,searchFrom:{user_id:"",theme_id:"",periods_id:"",type:""},nowPage:1,total:0,limit:10,deliverList:[],selectedGoods:[],secGoods:[],periodsId:null,goods_id:null,goodsList:[],themeList:[],uploadHeader:{token:_.a.get("cc_token")},param_token:p.a.md5Code(),logisticsType:[{value:"0",name:"当前待发货 "},{value:"1",name:"所有待发货 "},{value:"2",name:"所有已发货 "}]}},filters:{LogisticsStatusFil:function(e){return m.p[e]}},mounted:function(){this.init()},methods:{periodName:function(e){var t="";return e.goods_id&&(t+="【"+e.goods_id+"】"),e.periods_title?t+=e.periods_title+"<br>":t+="<br>",e.watch_num&&(t+=e.watch_num+"课时"),e.start_at&&(t+="("+e.start_at.slice(5).replace("-","")+")"),(e.has_watch_num||0==e.has_watch_num)&&(t+="-d"+e.has_watch_num),t},cancelEvent:function(){this.showFlag=!1},sureEvent:function(){this.showFlag=!1},exportReceiveInfoTable:function(){this.showFlag=!0},downLoad:function(){window.open("/static/待发货模板.xls")},handleClick:function(e){this.searchFrom.type=e.name,this.getList()},editAddress:function(e){console.log(e),this.dialogObj.detail=e.address,this.dialogObj.receive_mobile=e.receive_mobile,this.dialogObj.receive_name=e.receive_name,this.dialogObj.province_name="",this.dialogObj.city_name="",this.dialogObj.district_name="",this.dialogObj.id=e.id,this.dialogObj.show=!0},onUpdateAddress:function(){this.dialogObj.show=!1,this.getList()},fileSuccess:function(){this.$message({message:"提交成功,请稍后刷新",type:"success"}),this.getList()},init:function(){var e=this;this.getList();Object(s._117)({page:1,limit:100}).then(function(t){e.themeList=t.list}),Object(s._60)({page:1,limit:100,goods_type:"1,2"}).then(function(t){console.log(t),t.list.forEach(function(e){e.name="["+e.id+"]["+m.g[e.goods_type]+"]["+e.current_price/100+"元]"+e.name,e.children=[]}),e.goodsList=t.list})},exportTable:function(){var e={};this.searchFrom.user_id&&(e.user_id=this.searchFrom.user_id),this.searchFrom.theme_id&&(e.theme_id=this.searchFrom.theme_id),this.searchFrom.periods_id&&(e.periods_id=this.searchFrom.periods_id),Object(s._27)("/api/admin/order/deliver/list/export",e,"待发货列表")},initQuery:function(){var e=this,t=this.$route.query;t&&t.goods_id&&t.periods_id?(this.goods_id=t.goods_id,this.selectedGoods=[parseInt(t.goods_id),parseInt(t.periods_id)],Object(s._76)({goods_id:this.selectedGoods[0],limit:100}).then(function(t){t.list.forEach(function(e){e.name=e.title}),e.goodsList.find(function(t){return t.id===e.selectedGoods[0]}).children=t.list;var i=e.goodsList.find(function(t){return t.id===e.selectedGoods[0]});e.periods=i.children.find(function(t){return t.id===e.selectedGoods[1]}),console.log(e.periods)})):Object(s._53)().then(function(t){console.log(t),t&&(e.goods_id=t.goods_id,e.selectedGoods=[parseInt(t.goods_id),parseInt(t.id)],Object(s._76)({goods_id:e.selectedGoods[0],limit:100}).then(function(t){t.list.forEach(function(e){e.name=e.title}),e.goodsList.find(function(t){return t.id===e.selectedGoods[0]}).children=t.list;var i=e.goodsList.find(function(t){return t.id===e.selectedGoods[0]});e.periods=i.children.find(function(t){return t.id===e.selectedGoods[1]}),e.teacher_id="",console.log(e.periods)}))}),console.log(this.goodsList)},onPageChange:function(e){this.nowPage=e,this.getList()},onSizeChange:function(e){this.limit=e,this.nowPage=1,this.getList()},getList:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.user_id&&(t.user_id=this.searchFrom.user_id),this.searchFrom.theme_id&&(t.theme_id=this.searchFrom.theme_id),this.searchFrom.periods_id&&(t.periods_id=this.searchFrom.periods_id),this.searchFrom.type&&(t.type=this.searchFrom.type),Object(s._54)(t).then(function(t){e.deliverList=t.list,e.total=t.total,console.log(e.deliverList)})},reset:function(){this.searchFrom={user_id:"",theme_id:"",periods_id:"",type:""},this.getList()},changePeriods:function(e){if(e.length>1){this.goods_id=e[0];var t=this.goodsList.find(function(t){return t.id===e[0]});this.periods=t.children.find(function(t){return t.id===e[1]}),console.log(this.goodsList),console.log(this.periods),this.searchFrom.periods_id=this.periods.id}},handleItemChange:function(e){var t=this;Object(s._76)({goods_id:e[0],limit:100}).then(function(i){i.list.forEach(function(e){e.name=e.title}),t.goodsList.find(function(t){return t.id===e[0]}).children=i.list})}}},f={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"admin-refresh sms"},[i("div",{staticClass:"section-search"},[i("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px",inline:"",size:"small"}},[i("el-form-item",{attrs:{label:"用户ID"}},[i("el-input",{staticStyle:{width:"80px"},model:{value:e.searchFrom.user_id,callback:function(t){e.$set(e.searchFrom,"user_id",t)},expression:"searchFrom.user_id"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{staticStyle:{width:"480px"},attrs:{"popper-class":"refresh-cascader-multi width-480",options:e.goodsList,props:{value:"id",label:"name"},filterable:""},on:{"active-item-change":e.handleItemChange,change:e.changePeriods},model:{value:e.selectedGoods,callback:function(t){e.selectedGoods=t},expression:"selectedGoods"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"主题"}},[i("el-select",{attrs:{filterable:"",placeholder:"请选择",clearable:""},model:{value:e.searchFrom.theme_id,callback:function(t){e.$set(e.searchFrom,"theme_id",t)},expression:"searchFrom.theme_id"}},e._l(e.themeList,function(e,t){return i("el-option",{key:t,attrs:{label:e.name,value:e.id}})}))],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getList}},[e._v("搜索")]),e._v(" "),i("el-button",{attrs:{type:"success",plain:""},on:{click:e.reset}},[e._v("重置")]),e._v(" "),e.$store.state.readonly?e._e():i("el-button",{attrs:{type:"primary",plain:""},on:{click:function(t){e.downLoad()}}},[e._v("excel模板下载")]),e._v(" "),e.$store.state.export?i("el-button",{attrs:{type:"primary",plain:""},on:{click:e.exportTable}},[e._v("导出当前待发货")]):e._e(),e._v(" "),i("el-button",{attrs:{type:"primary",plain:""},on:{click:e.exportReceiveInfoTable}},[e._v("按期数导出收货信息")])],1),e._v(" "),e.$store.state.import?i("el-form-item",[i("el-upload",{attrs:{"show-file-list":!1,onSuccess:e.fileSuccess,headers:e.uploadHeader,data:{param_token:e.param_token},action:"/api/admin/order/deliver/list/import"}},[i("el-button",{attrs:{type:"success",plain:""}},[e._v("导入发货信息")])],1)],1):e._e()],1)],1),e._v(" "),i("el-tabs",{staticStyle:{"padding-top":"10px","background-color":"#fff"},attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},[i("el-tab-pane",{attrs:{label:"当前待发货",name:"0"}}),e._v(" "),i("el-tab-pane",{attrs:{label:"所有待发货",name:"1"}}),e._v(" "),i("el-tab-pane",{attrs:{label:"所有已发货",name:"2"}})],1),e._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:e.deliverList,size:"mini"}},[i("el-table-column",{staticClass:"f-c",attrs:{width:"200",label:"用户"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("img",{staticClass:"avatar",staticStyle:{"vertical-align":"top"},attrs:{src:t.row.user_avatar}}),e._v(" "),i("span",{staticStyle:{display:"inline-block"}},[e._v("\n "+e._s(t.row.user_nickname)+"\n "),i("br"),e._v("\n (ID:"+e._s(t.row.user_id)+")\n "),i("br"),e._v("\n 手机:"+e._s(t.row.user_mobile)+"\n ")])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"address",label:"收货地址"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.receive_name)+"\n "),i("br"),e._v("\n "+e._s(t.row.receive_mobile)+"\n "),i("br"),e._v("\n "+e._s(t.row.province_name)+e._s(t.row.city_name)+e._s(t.row.area_name)+e._s(t.row.address)+"\n ")]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"periods_title",label:"期数名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("div",{domProps:{innerHTML:e._s(e.periodName(t.row))}})]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"theme_name",label:"主题"}}),e._v(" "),i("el-table-column",{attrs:{prop:"deliver_start_at",label:"预计发货开始时间",width:"100px"}}),e._v(" "),i("el-table-column",{attrs:{prop:"deliver_end_at",label:"预计发货结束时间",width:"100px"}}),e._v(" "),i("el-table-column",{attrs:{prop:"deliver_at",label:"发货时间",width:"100px"}}),e._v(" "),i("el-table-column",{attrs:{prop:"status",label:"物流状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("LogisticsStatusFil")(t.row.status))),i("br"),e._v(" "),2==e.searchFrom.type?i("span",[e._v("\n 名称:"+e._s(t.row.express_name)),i("br"),e._v("\n 单号:"+e._s(t.row.express_no)+"\n ")]):e._e()]}}])}),e._v(" "),e.$store.state.readonly?e._e():i("el-table-column",{attrs:{width:"150",label:"操作",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("el-button",{attrs:{plain:"",type:"info",size:"mini"},on:{click:function(i){e.editAddress(t.row)}}},[e._v("编辑收货地址")])]}}])})],1),e._v(" "),i("page",{attrs:{nowPage:e.nowPage,total:e.total},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}}),e._v(" "),i("address-dialog",{attrs:{dialogObj:e.dialogObj},on:{reflash:e.onUpdateAddress}}),e._v(" "),i("receiveInfoDialog",{attrs:{goodsList:e.goodsList,showFlag:e.showFlag,cancelEvent:e.cancelEvent,sureEvent:e.sureEvent}})],1)},staticRenderFns:[]};var v=i("VU/8")(g,f,!1,function(e){i("jsrr"),i("Hn7p")},"data-v-5a09c7aa",null);t.default=v.exports},jsrr:function(e,t){},kQXt:function(e,t){}});
-
chenyishuai@singsingenglish.com authoredc70bf725