1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f4d1c47"],{1491:function(t,e,r){"use strict";r.d(e,"B",(function(){return o})),r.d(e,"z",(function(){return s})),r.d(e,"g",(function(){return n})),r.d(e,"C",(function(){return i})),r.d(e,"y",(function(){return l})),r.d(e,"l",(function(){return c})),r.d(e,"r",(function(){return u})),r.d(e,"c",(function(){return d})),r.d(e,"D",(function(){return m})),r.d(e,"a",(function(){return f})),r.d(e,"b",(function(){return p})),r.d(e,"o",(function(){return g})),r.d(e,"p",(function(){return h})),r.d(e,"t",(function(){return b})),r.d(e,"x",(function(){return _})),r.d(e,"w",(function(){return v})),r.d(e,"d",(function(){return y})),r.d(e,"e",(function(){return k})),r.d(e,"n",(function(){return x})),r.d(e,"v",(function(){return O})),r.d(e,"j",(function(){return S})),r.d(e,"s",(function(){return w})),r.d(e,"k",(function(){return j})),r.d(e,"i",(function(){return P})),r.d(e,"h",(function(){return I})),r.d(e,"m",(function(){return $})),r.d(e,"q",(function(){return U})),r.d(e,"A",(function(){return L})),r.d(e,"f",(function(){return A})),r.d(e,"u",(function(){return G}));var a=r("b775");function o(t){return Object(a["a"])({url:"/orders/get_agent_gift_bag",method:"get",params:t})}function s(t){return Object(a["a"])({url:"/orders/add_list_tag",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/orders/BatchAddTag",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/orders/export_list",method:"get",params:t})}function l(){return Object(a["a"])({url:"/activity/getactivityinfo",method:"get"})}function c(t){return Object(a["a"])({url:"/orders/GetActivityLimit",method:"get",params:t})}function u(t){return Object(a["a"])({url:"/UserImg/GetUserInfo",method:"get",params:t})}function d(t){return Object(a["a"])({url:"/UserImg/AddUserImgInfo",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/UserImg/uploadImage",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/UserImg/AddUpdateImg",method:"get",params:t})}function p(t){return Object(a["a"])({url:"/UserImg/AddUpdateImgB",method:"get",params:t})}function g(t){return Object(a["a"])({url:"/UserImg/GetImgStatus",method:"get",params:t})}function h(t){return Object(a["a"])({url:"/UserImg/GetImgStatusB",method:"get",params:t})}function b(t){return Object(a["a"])({url:"/UserImg/GetUserList",method:"get",params:t})}function _(t){return Object(a["a"])({url:"/UserImg/UpdateUserImgInfoB ",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/UserImg/UpdateUserImgInfo",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/UserImg/AgainCreateImg",method:"get",params:t})}function k(t){return Object(a["a"])({url:"/UserImg/AgainCreateImgB",method:"get",params:t})}function x(t){return Object(a["a"])({url:"/UserImg/GetCrownInfo",method:"get",params:t})}function O(t){return Object(a["a"])({url:"/UserImg/UpdateCrownImgInfo",method:"post",data:t})}function S(t){return Object(a["a"])({url:"/UserImg/DeleteUserImg",method:"get",params:t})}function w(t){return Object(a["a"])({url:"/UserImg/GetUserInfos",method:"get",params:t})}function j(t){return Object(a["a"])({url:"/UserImg/ExportAddress",method:"get",params:t})}function P(t){return Object(a["a"])({url:"/CrownBigGiftInfo",method:"get",params:t})}function I(t){return Object(a["a"])({url:"/BigGiftInfo",method:"get",params:t})}function $(t){return Object(a["a"])({url:"/BigGift/GetApplyList",method:"get",params:t})}function U(t){return Object(a["a"])({url:"/BigGift/GetUserInfo",method:"get",params:t})}function L(t){return Object(a["a"])({url:"/BigGift/editBelongToUser",method:"post",data:t})}function A(t){return Object(a["a"])({url:"/BigGift/ApplySuccess",method:"post",data:t})}function G(t){return Object(a["a"])({url:"/BigGift/UpdateApply",method:"post",data:t})}},"5cc4":function(t,e,r){},"83d64":function(t,e,r){"use strict";r("5cc4")},d081:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-input",{staticStyle:{width:"300px"},attrs:{type:"text",placeholder:"客户姓名 / 手机号"},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.searchParams.page_index=1,t.getStudioList()}},model:{value:t.searchParams.search_user,callback:function(e){t.$set(t.searchParams,"search_user",e)},expression:"searchParams.search_user"}}),t._v(" "),r("el-input",{staticStyle:{width:"300px"},attrs:{type:"text",placeholder:"店铺名称"},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.searchParams.page_index=1,t.getStudioList()}},model:{value:t.searchParams.search_content,callback:function(e){t.$set(t.searchParams,"search_content",e)},expression:"searchParams.search_content"}}),t._v(" "),r("el-select",{staticStyle:{width:"300px"},model:{value:t.searchParams.activity_id,callback:function(e){t.$set(t.searchParams,"activity_id",e)},expression:"searchParams.activity_id"}},[r("el-option",{attrs:{label:"全部",value:""}}),t._v(" "),t._l(t.activitys,(function(t){return r("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}))],2),t._v(" "),r("el-select",{staticStyle:{width:"200px"},model:{value:t.searchParams.status,callback:function(e){t.$set(t.searchParams,"status",e)},expression:"searchParams.status"}},[r("el-option",{attrs:{value:0,label:"正常"}}),t._v(" "),r("el-option",{attrs:{value:1,label:"禁用"}})],1),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.searchParams.page_index=1,t.getStudioList()}}},[t._v("\n 搜索\n ")]),t._v(" "),r("el-button",{directives:[{name:"read-excel",rawName:"v-read-excel",value:t.importStock,expression:"importStock"}],attrs:{type:"primary",size:"small"}},[t._v("\n 导入工作室\n ")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.downloadTemplate}},[t._v(" 下载模板 ")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.exportStock}},[t._v(" 导出 ")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogFormVisible=!0}}},[t._v("\n 新增\n ")]),t._v(" "),r("el-dialog",{attrs:{title:"新增工作室",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[r("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[r("el-form-item",{attrs:{label:"工作室名称:","label-width":t.formLabelWidth,prop:"name"}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"客户手机号:","label-width":t.formLabelWidth,prop:"mobile"}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off",width:"300px"},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"工作室地址:","label-width":t.formLabelWidth,prop:"address"}},[r("el-col",{attrs:{span:16}},[r("el-cascader",{attrs:{options:t.provinces,placeholder:"请选择省/市/区县"},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"详细地址:","label-width":t.formLabelWidth,prop:"detailAddress"}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off",width:"300px"},model:{value:t.form.detailAddress,callback:function(e){t.$set(t.form,"detailAddress",e)},expression:"form.detailAddress"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"工作室状态:","label-width":t.formLabelWidth,prop:"radio"}},[r("el-col",{attrs:{span:10}},[r("el-radio",{attrs:{label:"0"},model:{value:t.form.radio,callback:function(e){t.$set(t.form,"radio",e)},expression:"form.radio"}},[t._v("正常")]),t._v(" "),r("el-radio",{attrs:{label:"1"},model:{value:t.form.radio,callback:function(e){t.$set(t.form,"radio",e)},expression:"form.radio"}},[t._v("禁用")])],1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addStock("form")}}},[t._v("确 定")])],1)],1),t._v(" "),r("el-table",{staticClass:"tableBorder",staticStyle:{"margin-top":"20px"},attrs:{border:"",stripe:"","header-cell-style":{background:"#f8fbfc"},data:t.list},on:{"sort-change":t.toSort}},[r("el-table-column",{attrs:{type:"index",label:"序号",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{prop:"studio_name",label:"工作室名称",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"工作室地址",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(""+(r.province||"")+(r.city||"")+(r.area||"")+(r.address||""))+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"负责人昵称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_user&&r.get_user.nickname)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"负责人姓名",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_user&&r.get_user.realname)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"负责人手机号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_user&&r.get_user.mobile)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"活动订单金额",align:"center",prop:"get_bonus.order_money",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_bonus&&r.get_bonus.order_money?r.get_bonus&&r.get_bonus.order_money:0)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"产品补助金",align:"center",prop:"get_bonus.bonus",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_bonus&&r.get_bonus.bonus?r.get_bonus&&r.get_bonus.bonus:0)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"已兑换",align:"center",prop:"get_bonus.exchange_bonus",sortable:"custom"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.row;return[t._v("\n "+t._s(r.get_bonus&&r.get_bonus.exchange_bonus?r.get_bonus&&r.get_bonus.exchange_bonus:0)+"\n ")]}}])}),t._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return["0"===a.status?r("el-button",{attrs:{type:"danger",plain:""},on:{click:function(e){return t.forBidden(a)}}},[t._v("禁用")]):r("el-button",{attrs:{type:"primary",plain:""},on:{click:function(e){return t.forBidden(a)}}},[t._v("启用")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:function(e){t.drawer=!0,t.changeStudio(a)}}},[t._v("修改")])]}}])})],1),t._v(" "),r("el-dialog",{attrs:{title:"修改工作室",visible:t.drawer},on:{"update:visible":function(e){t.drawer=e}}},[r("el-form",{attrs:{model:t.form}},[r("el-form-item",{attrs:{label:"工作室名称:","label-width":t.formLabelWidth}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"客户手机号:","label-width":t.formLabelWidth}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off",width:"300px"},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"工作室地址:","label-width":t.formLabelWidth}},[r("el-col",{attrs:{span:16}},[r("el-cascader",{attrs:{options:t.provinces,placeholder:"请选择省/市/区县"},model:{value:t.form.address,callback:function(e){t.$set(t.form,"address",e)},expression:"form.address"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"详细地址:","label-width":t.formLabelWidth}},[r("el-col",{attrs:{span:10}},[r("el-input",{attrs:{autocomplete:"off",width:"300px"},model:{value:t.form.detailAddress,callback:function(e){t.$set(t.form,"detailAddress",e)},expression:"form.detailAddress"}})],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"详细地址:","label-width":t.formLabelWidth}},[r("el-col",{attrs:{span:10}},[r("el-radio",{attrs:{label:"0"},model:{value:t.form.radio,callback:function(e){t.$set(t.form,"radio",e)},expression:"form.radio"}},[t._v("正常")]),t._v(" "),r("el-radio",{attrs:{label:"1"},model:{value:t.form.radio,callback:function(e){t.$set(t.form,"radio",e)},expression:"form.radio"}},[t._v("禁用")])],1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(e){t.drawer=!1}}},[t._v("取 消")]),t._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:t.sureStock}},[t._v("确 定")])],1)],1),t._v(" "),r("pagination",{attrs:{total:t.total,limit:t.searchParams.page_size,page:t.searchParams.page_index},on:{pagination:t.changePagination,"update:limit":t.changePagination}})],1)},o=[],s=(r("5df3"),r("f400"),r("7f7f"),r("456d"),r("ac6a"),r("c7eb")),n=(r("96cf"),r("1da1")),i=r("1491"),l=r("b775");function c(t){return Object(l["a"])({url:"/studio/get_studio",method:"Get",params:t})}function u(t){return Object(l["a"])({url:"/studio/importStudio",method:"Post",data:t})}function d(t){return Object(l["a"])({url:"/studio/AddStudio",method:"Post",data:t})}function m(t){return Object(l["a"])({url:"/studio/SetStatusStudio",method:"Get",params:t})}function f(t){return Object(l["a"])({url:"/studio/UpdateStudio",method:"Post",data:t})}function p(t){return Object(l["a"])({url:"/studio/exportstudio",method:"Get",params:t})}var g=r("02c6"),h=r("2e8e"),b={data:function(){return{drawer:!1,dialogFormVisible:!1,searchParams:{page_index:1,page_size:20,status:0,search_user:"",search_content:"",activity_id:""},activitys:[],list:[],total:0,form:{id:"",name:"",mobile:"",address:"",detailAddress:"",radio:"0"},formLabelWidth:"120px",provinces:g["a"],city:"河南省郑州市",changeList:"",mobile:"",rules:{name:[{required:!0,message:"请输入",trigger:"blur"}],mobile:[{required:!0,message:"请输入",trigger:"blur"}],address:[{required:!0,message:"请输入",trigger:"blur"}],detailAddress:[{required:!0,message:"请输入",trigger:"blur"}],radio:[{required:!0,message:"请输入",trigger:"blur"}]}}},watch:{"searchParams.activity_id":function(){this.searchParams.page_index=1,this.getStudioList()},"searchParams.status":function(){this.searchParams.page_index=1,this.getStudioList()}},mounted:function(){this.provinces=Object(h["b"])(g["a"]),this.searchParams.sort=1,this.searchParams.sort_type=0,this.activityList(this.getStudioList)},methods:{activityList:function(){var t=Object(n["a"])(Object(s["a"])().mark((function t(e){var r,a=this;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=this.$loading(),t.next=3,Object(i["y"])().then((function(t){r.close(),200===t.code&&(a.activitys=t.data,t.data.map((function(t){1===t.is_ing&&(a.searchParams.activity_id=t.id)}))),e&&e()})).catch((function(t){r.close(),e&&e()}));case 3:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}(),getStudioList:function(){var t=this,e=this.$loading();c(this.searchParams).then((function(r){e.close(),200===r.code?(t.list=r.data.list,t.total=r.data.total,console.log(r,"ppp")):t.$message.error(r.message||"获取工作室列表失败")})).catch((function(){e.close(),t.$message.error("获取工作室列表失败")}))},changePagination:function(t){var e=t.page,r=t.limit;this.searchParams.page_size=r,this.searchParams.page_index=e,this.getStudioList()},downloadTemplate:function(){var t=["序号","工作室名称","批发商手机号","省份","城市","地区","详细地址"];Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(e){e.export_json_to_excel({header:t,data:"",filename:"工作室信息",bookType:"xlsx"})}))},importStock:function(t){var e,r,a=this;this.loadingFull=!0,console.log(t,"pppp"),e=Object.create(null),t.forEach((function(t){Object.keys(t).forEach((function(t){e[t]=!0}))})),r=Object.keys(e),console.log(r,"000000");var o=["序号","工作室名称","批发商手机号","省份","城市","地区","详细地址"];JSON.stringify(r)===JSON.stringify(o)?(console.log("xiangdeng"),u({data:t}).then((function(t){a.loadingFull=!1,200===t.code?(a.$message.success(t.message||"成功"),a.getGoodStock()):a.$message.error(t.message||"批量修改失败")})).catch((function(t){a.loadingFull=!1}))):(console.log("buxiangdeng "),this.$message.error("导入数据格式有误,请参照模板修改"))},forBidden:function(t){var e=this;this.$confirm("此操作将禁用该工作室, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r={id:t.id};m(r).then((function(t){200===t.code?(e.$message({type:"success",message:"操作成功"}),e.getStudioList()):e.$message({type:"error",message:t.message})}))})).catch((function(){e.$message({type:"info",message:"操作取消"})}))},exportStock:function(){var t=this;this.loadingFull=!0;var e={search_content:this.searchParams.search_content,status:this.searchParams.status,activity_id:this.searchParams.activity_id,search_user:this.searchParams.search_user};p(e).then((function(e){if(console.log(e,"list"),t.loadingFull=!1,200===e.code)if(!e.data.list||e.data.list.length<0)t.$message.error("没有可导出数据");else{var a=e.data.list;Promise.all([r.e("chunk-5bdd67a2"),r.e("chunk-2c21b5a5")]).then(r.bind(null,"4bf8d")).then((function(t){t.export_json_to_excel({header:Object.keys(a[0]),data:a.map((function(t){return Object.keys(a[0]).map((function(e){return t[e]}))})),filename:"工作室列表",bookType:"xlsx"})})),t.$message.success("导出成功")}else t.$message.error("导出失败")}))},addStock:function(t){var e=this;this.dialogFormVisible=!0;var r={studio_name:this.form.name,mobile:this.form.mobile,province:this.form.address[0],city:this.form.address[1],area:this.form.address[2],address:this.form.detailAddress,status:this.form.radio};this.$refs[t].validate((function(a){a&&(d(r).then((function(r){200===r.code?(e.dialogFormVisible=!1,e.$message({type:"success",message:"新增工作室成功"}),e.$refs[t].resetFields(),e.getStudioList()):e.$message({type:"info",message:r.message})})).catch((function(t){e.$message({type:"error",message:"新增工作室失败"})})),console.log(e.form.radio,"addressS"))}))},changeStudio:function(t){var e=[t.province,t.city,t.area];this.form={id:t.id,name:t.studio_name,mobile:t.get_user.mobile,address:e,detailAddress:t.address,radio:t.status}},sureStock:function(){var t=this;this.drawer=!1;var e={id:this.form.id,studio_name:this.form.name,mobile:this.form.mobile,province:this.form.address[0],city:this.form.address[1],area:this.form.address[2],address:this.form.detailAddress,status:this.form.radio};f(e).then((function(e){200===e.code?(t.dialogFormVisible=!1,t.$message({type:"success",message:"工作室修改成功"}),t.getStudioList()):(t.dialogFormVisible=!1,t.$message({type:"error",message:e.message}))}))},toSort:function(t){t.column;var e=t.prop,r=t.order,a=new Map([["get_bonus.order_money",this.OrdeAmount],["get_bonus.bonus",this.ProductGrants],["get_bonus.exchange_bonus",this.exChange]]);console.log(a,"sortMap11"),a.get(e)&&a.get(e)(r)},exChange:function(t){this.searchParams.sort=t&&"ascending"===t?0:1,this.searchParams.sort_type=2,this.getStudioList()},ProductGrants:function(t){this.searchParams.sort=t&&"ascending"===t?0:1,this.searchParams.sort_type=1,console.log(this.searchParams),this.getStudioList()},OrdeAmount:function(t){this.searchParams.sort=t&&"ascending"===t?0:1,this.searchParams.sort_type=0,this.getStudioList()}}},_=b,v=(r("83d64"),r("2877")),y=Object(v["a"])(_,a,o,!1,null,"b05843de",null);e["default"]=y.exports},f400:function(t,e,r){"use strict";var a=r("c26b"),o=r("b39a"),s="Map";t.exports=r("e0b8")(s,(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=a.getEntry(o(this,s),t);return e&&e.v},set:function(t,e){return a.def(o(this,s),0===t?0:t,e)}},a,!0)}}]);
|