(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65ba1d22"],{3749:function(e,t,a){},d43c:function(e,t,a){"use strict";var l=a("3749"),s=a.n(l);s.a},edf7:function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"zbsuploadmanage"},[a("switchseason",{staticClass:"switchseason",on:{switchseason:e.switchseason}}),e._v(" "),a("el-select",{staticClass:"war",attrs:{placeholder:"请选择战区"},model:{value:e.warValue,callback:function(t){e.warValue=t},expression:"warValue"}},e._l(e.teamList,(function(e){return a("el-option",{key:e.war_name,attrs:{label:e.war_name+"战区-"+e.service,value:e.war_name}})})),1),e._v(" "),a("div",{staticClass:"search"},[a("el-input",{attrs:{clearable:"",placeholder:"输入手机号 / 昵称 / 订单号搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch()}},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),e._v(" "),a("el-button",{attrs:{type:"primary",icon:"el-icon-search",loading:e.loading},on:{click:function(t){return e.handleSearch()}}},[e._v("搜索/刷新")])],1),e._v(" "),a("el-tabs",{attrs:{type:"card"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"上传成功",name:"success"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{border:"",stripe:"",data:e.list},on:{"cell-click":e.cellClick}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"60",index:function(t){return 15*(e.page-1)+t+1}}}),e._v(" "),a("el-table-column",{attrs:{label:"上传时间",width:"150",prop:"time","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("getTimeString")(t.row.time)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"上传图片",width:"345",prop:"nickname","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"300px",height:"66px",border:"1px solid #cccccc"},attrs:{fit:"cover",src:t.row.img,"preview-src-list":e.imgList}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"卖货数据",prop:"phone","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("精装版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.hard))]),e._v("套   \n 简约版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.simple))]),e._v("套   \n 老人版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.old))]),e._v("套\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"订单号",prop:"order_num",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"订单金额(元)",prop:"money",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"结算学分数",prop:"score",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{staticStyle:{padding:"0"},attrs:{label:"头像",prop:"avatar",width:"50","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{attrs:{width:"36",height:"36",src:e.row.avatar}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"用户名",prop:"nickname",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",prop:"phone",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作人",prop:"type",width:"80","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===+t.row.type?a("div",[e._v("用户本人")]):a("div",{staticStyle:{color:"#f40"}},[e._v(e._s(t.row.type))])]}}])}),e._v(" "),e.$store.state.user.BP.includes("BP1")||e.$store.state.user.BP.includes("*")?a("el-table-column",{attrs:{label:"操作",prop:"status",width:"120","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",size:"mini"},on:{click:function(a){return e.handleEdit(t.$index,t.row)}}},[e._v("调整数据")])]}}],null,!1,3832155614)}):e._e()],1)],1),e._v(" "),a("el-tab-pane",{attrs:{label:"上传失败",name:"fail"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{border:"",stripe:"",data:e.list},on:{"cell-click":e.cellClick}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"60",index:function(t){return 15*(e.page-1)+t+1}}}),e._v(" "),a("el-table-column",{attrs:{label:"上传时间",width:"150",prop:"time","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v(e._s(e._f("getTimeString")(t.row.time)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"上传图片",width:"345",prop:"nickname","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"300px",height:"66px",border:"1px solid #cccccc"},attrs:{fit:"cover",src:t.row.img,"preview-src-list":e.imgList}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"卖货数据",prop:"phone","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("精装版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.hard))]),e._v("套   \n 简约版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.simple))]),e._v("套   \n 老人版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.old))]),e._v("套\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"订单号",prop:"order_num",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"订单金额(元)",prop:"money",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"失败原因",prop:"remark",width:"120","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{color:"#f40"}},[e._v(e._s(t.row.remark))])]}}])}),e._v(" "),a("el-table-column",{staticStyle:{padding:"0"},attrs:{label:"头像",prop:"avatar",width:"50","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{attrs:{width:"36",height:"36",src:e.row.avatar}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"用户名",prop:"nickname",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",prop:"phone",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"判定订单是否有效",prop:"status",width:"200","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"success",icon:"el-icon-success",size:"mini"},on:{click:function(a){return e.handleJudge(t.row.id,1,t)}}},[e._v("有效")]),e._v(" "),a("el-button",{attrs:{type:"danger",icon:"el-icon-error",size:"mini"},on:{click:function(a){return e.handleJudge(t.row.id,0,t)}}},[e._v("无效")])]}}])})],1)],1),e._v(" "),a("el-tab-pane",{attrs:{label:"判定记录",name:"record"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{border:"",stripe:"",data:e.list},on:{"cell-click":e.cellClick}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"60",index:function(t){return 15*(e.page-1)+t+1}}}),e._v(" "),a("el-table-column",{attrs:{label:"上传时间",width:"150",prop:"time","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"上传图片",width:"345",prop:"img","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"300px",height:"66px",border:"1px solid #cccccc"},attrs:{fit:"cover",src:t.row.img,"preview-src-list":e.imgList}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"卖货数据",prop:"phone","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("精装版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.hard))]),e._v("套   \n 简约版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.simple))]),e._v("套   \n 老人版:"),a("span",{staticStyle:{color:"#f40","margin-right":"8px"}},[e._v(e._s(t.row.old))]),e._v("套\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"订单号",prop:"order_num",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"订单金额(元)",prop:"money",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"失败原因",prop:"remark",width:"120","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticStyle:{color:"#f40"}},[e._v(e._s(t.row.remark))])]}}])}),e._v(" "),a("el-table-column",{staticStyle:{padding:"0"},attrs:{label:"头像",prop:"avatar",width:"50","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{attrs:{width:"36",height:"36",src:e.row.avatar}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"用户名",prop:"nickname",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"手机号",prop:"phone",width:"120","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"审核人",prop:"note",width:"80","label-class-name":"label"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作结果",prop:"type",width:"80","label-class-name":"label"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{style:{color:1===+t.row.type?"green":"#f40"}},[e._v(e._s(1===+t.row.type?"判定有效":"判定无效"))])]}}])})],1)],1)],1),e._v(" "),a("el-pagination",{attrs:{background:"",total:e.total,"page-size":15,"current-page":e.page,layout:"total, prev, pager, next, jumper"},on:{"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"调整学分",visible:e.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{attrs:{model:e.form}},[a("el-form-item",{attrs:{label:"用户昵称","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.nickname,callback:function(t){e.$set(e.form,"nickname",t)},expression:"form.nickname"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户手机号","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"当前订单号","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.order_num,callback:function(t){e.$set(e.form,"order_num",t)},expression:"form.order_num"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"当前订单获得学分数","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.form.score,callback:function(t){e.$set(e.form,"score",t)},expression:"form.score"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"精装版数量","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.form.hard,callback:function(t){e.$set(e.form,"hard",t)},expression:"form.hard"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"简约版数量","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.form.simple,callback:function(t){e.$set(e.form,"simple",t)},expression:"form.simple"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"老人版数量","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.form.old,callback:function(t){e.$set(e.form,"old",t)},expression:"form.old"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.submitChange}},[e._v("调整学分")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"判定图片",visible:e.dialogJudgeVisible,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogJudgeVisible=t}}},[a("el-form",{attrs:{model:e.form}},[a("el-form-item",{attrs:{label:"用户昵称","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.judeg.nickname,callback:function(t){e.$set(e.judeg,"nickname",t)},expression:"judeg.nickname"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用户手机号","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.judeg.phone,callback:function(t){e.$set(e.judeg,"phone",t)},expression:"judeg.phone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"当前订单号","label-width":"147px"}},[a("el-input",{attrs:{disabled:""},model:{value:e.judeg.order_num,callback:function(t){e.$set(e.judeg,"order_num",t)},expression:"judeg.order_num"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"订单金额","label-width":"147px"}},[a("el-input",{model:{value:e.judeg.money,callback:function(t){e.$set(e.judeg,"money",t)},expression:"judeg.money"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"选择日期","label-width":"147px"}},[a("el-date-picker",{attrs:{type:"date",placeholder:"选择日期",clearable:!1},model:{value:e.judeg.time,callback:function(t){e.$set(e.judeg,"time",t)},expression:"judeg.time"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"精装版","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.judeg.hard,callback:function(t){e.$set(e.judeg,"hard",t)},expression:"judeg.hard"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"简约版","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.judeg.simple,callback:function(t){e.$set(e.judeg,"simple",t)},expression:"judeg.simple"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"老人版","label-width":"147px"}},[a("el-input-number",{attrs:{size:"small",min:0},model:{value:e.judeg.old,callback:function(t){e.$set(e.judeg,"old",t)},expression:"judeg.old"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogJudgeVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:1===e.judegType?"primary":"danger"},on:{click:e.submitJudeg}},[e._v("判定"+e._s(1===e.judegType?"有效":"无效"))])],1)],1)],1)},s=[],i=(a("ac6a"),a("386d"),a("b775"));function n(e){return Object(i["a"])({method:"get",url:"/upload/succ",params:e})}function o(e){return Object(i["a"])({method:"get",url:"/upload/fail",params:e})}function r(e){return Object(i["a"])({method:"get",url:"/upload/search",params:e})}function c(e){return Object(i["a"])({method:"post",url:"/upload/adj_score",data:e})}function d(e){return Object(i["a"])({method:"post",url:"/upload/judge",data:e})}function u(e){return Object(i["a"])({method:"get",url:"/judge/record",params:e})}var m={name:"ZbsUploadManage",data:function(){return{season_list_index:0,total:0,page:1,activeName:"success",list:[],imgList:[],warValue:"请选择战区",search:"",loading:!1,judegType:0,dialogFormVisible:!1,dialogJudgeVisible:!1,form:{id:"",nickname:"",phone:"",score:"",hard:0,simple:0,old:0},judeg:{nickname:"",phone:"",order_num:"",money:"",hard:"",simple:"",old:"",id:"",time:new Date((new Date).toLocaleDateString())}}},computed:{season:function(){return this.$store.state.user.season_list[this.season_list_index].season},teamList:function(){return this.$store.state.user.team_list}},watch:{activeName:function(e){this.page=1,this.search.trim().length?this.handleSearch():(this.search="",this.switchRequest(e))},season:function(){this.page=1,this.search.trim().length?this.handleSearch():(this.search="",this.switchRequest(this.activeName))},warValue:function(){this.search="",this.switchRequest(this.activeName)}},beforeRouteEnter:function(e,t,a){a((function(t){e.params.phone&&(t.search=e.params.phone+"")}))},created:function(){var e=this;this.loading=!0,n({page:1,season:this.season,war_name:this.warValue}).then((function(t){e.loading=!1,e.list=t.data.list,e.total=t.data.total}))},methods:{switchseason:function(e){this.season_list_index=e},switchRequest:function(e,t){var a=this;this.page=t||1,"success"===e?(this.loading=!0,n({page:this.page,season:this.season,war_name:this.warValue}).then((function(e){a.loading=!1,a.list=e.data.list,a.total=e.data.total}))):"fail"===e?(this.loading=!0,o({page:this.page,season:this.season,war_name:this.warValue}).then((function(e){a.loading=!1,a.list=e.data.list,a.total=e.data.total}))):"record"===e&&(this.loading=!0,u({page:this.page,season:this.season,war_name:this.warValue}).then((function(e){a.loading=!1,a.list=e.data.list,a.total=e.data.total})))},handleSearch:function(e){var t=this;if(this.search.length)if(this.search.trim().length){this.loading=!0,!e&&(this.page=1);var a=0;"fail"===this.activeName&&(a=1),"record"===this.activeName&&(a=2),r({phone:this.search.trim(),season:this.season,page:this.page,status:a}).then((function(e){t.loading=!1,t.total=e.data.total,t.list=e.data.list}))}else this.$message({message:"手机号格式不正确,请重新输入",type:"warning"});else this.page=1,this.switchRequest(this.activeName)},submitChange:function(){var e=this;this.$confirm("此操作将调整用户学分并留下操作记录, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=e.form,a=t.id,l=t.hard,s=t.simple,i=t.old;e.loading=!0,c({id:a,hard:l,simple:s,old:i,season:e.season}).then((function(t){200===t.code?(e.$message.success({message:"调整成功"}),e.dialogFormVisible=!1,e.loading=!1,e.list.forEach((function(e){e.id===a&&(e.hard=+l,e.simple=+s,e.old=+i,e.score=10*(e.hard+e.simple+e.old))}))):e.$message.error({message:"调整失败"})}))})).catch((function(){e.$message.info({message:"已取消调整"})}))},handleEdit:function(e,t){Object.assign(this.form,t),this.dialogFormVisible=!0},handleJudge:function(e,t,a){var l=a.$index,s=a.row;this.judegType=t,this.judegIndex=l,Object.assign(this.judeg,s),this.dialogJudgeVisible=!0,console.log(this.judegIndex)},submitJudeg:function(){var e=this,t=this.judegType;this.$confirm("此操作将判定当前订单".concat(0===+t?"无效":"有效","并留下操作记录, 是否继续?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,d({type:t,id:e.judeg.id,season:e.season,old:e.judeg.old?e.judeg.old:0,hard:e.judeg.hard?e.judeg.hard:0,simple:e.judeg.simple?e.judeg.simple:0,money:e.judeg.money,order_num:e.judeg.order_num,time:+new Date(e.judeg.time)/1e3}).then((function(a){e.loading=!1,200===a.code?(e.$notify.success({title:"完成",message:"已判定当前订单".concat(0===+t?"无效":"有效")}),e.list.splice(e.judegIndex,1),e.dialogJudgeVisible=!1):300===a.code?(e.$notify.success({title:"提示",message:"判定失败,当前订单已被判定"}),e.list.splice(e.judegIndex,1),e.dialogJudgeVisible=!1):e.$notify.error({title:"失败",message:"取消用户比赛资格失败"})}))})).catch((function(){e.$message.info({message:"已取消"})}))},handleCurrentChange:function(e){this.loading=!0,this.page=e,this.search.trim().length?this.handleSearch(e):this.switchRequest(this.activeName,e)},cellClick:function(e,t,a,l){"IMG"===l.target.nodeName&&(this.imgList=[],this.imgList[0]=e.img)}}},p=m,h=(a("d43c"),a("2877")),b=Object(h["a"])(p,l,s,!1,null,null,null);t["default"]=b.exports}}]);