|
- webpackJsonp([35],{"+7UF":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-form",{ref:"listQuery",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.listQuery}},[r("el-form-item",{attrs:{label:"门店名称",prop:"name"}},[r("el-input",{attrs:{placeholder:"门店名称"},model:{value:t.listQuery.name,callback:function(e){t.$set(t.listQuery,"name","string"==typeof e?e.trim():e)},expression:"listQuery.name"}})],1),t._v(" "),"sa"==t.usertype?r("el-form-item",{attrs:{label:"所属集团",prop:"org"}},[r("el-select",{attrs:{placeholder:"所属集团",clearable:""},model:{value:t.listQuery.org,callback:function(e){t.$set(t.listQuery,"org",e)},expression:"listQuery.org"}},t._l(t.manageList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1):t._e(),t._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:t.fetchData}},[t._v("查询")]),t._v(" "),r("el-button",{on:{click:function(e){t.resetForm("listQuery")}}},[t._v("重置")]),t._v(" "),r("el-button",{attrs:{type:"success"},on:{click:t.handleDownload}},[t._v("导出")])],1)],1),t._v(" "),"user"!=t.usertype?r("div",{staticClass:"listbutton"},[r("router-link",{attrs:{to:"add"}},[r("el-button",{attrs:{type:"primary"}},[t._v("添加门店")])],1)],1):t._e(),t._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:t.listLoading,expression:"listLoading",modifiers:{body:!0}}],attrs:{data:t.list,"element-loading-text":"拼命加载中",border:"",fit:""}},[r("el-table-column",{attrs:{align:"center",label:"shop_id",width:"110",prop:"id"}}),t._v(" "),r("el-table-column",{attrs:{label:"门店信息",prop:"name"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v("名称:"+t._s(e.row.name))]),r("br"),t._v(" "),r("span",[t._v("地点:"+t._s(e.row.provincename)+t._s(e.row.cityname)+t._s(e.row.address))]),r("br"),t._v(" "),r("span",[t._v("电话:"+t._s(e.row.phone))])]}}])}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"POS数",prop:"posnum",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("router-link",{attrs:{to:{path:"/ota/mac/index",query:{jid:e.row.org,sid:e.row.id}}}},[r("el-button",{attrs:{type:"text"}},[t._v(t._s(e.row.posnum))])],1)]}}])}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"所属集团",prop:"orgname",width:"200"}}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"会员",prop:"posnum",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"text"}},[t._v(t._s(e.row.membernum))])]}}])}),t._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("router-link",{attrs:{to:{path:"update/"+e.row.id,query:{showform:!0}}}},[r("el-button",{attrs:{type:"text",size:"mini"}},[t._v("编辑门店")])],1),t._v(" "),r("router-link",{attrs:{to:{path:"show/"+e.row.id}}},[r("el-button",{attrs:{type:"text",size:"mini"}},[t._v("详情")])],1),t._v(" "),r("router-link",{attrs:{to:{path:"mac/"+e.row.id,query:{orgId:e.row.org}}}},[r("el-button",{attrs:{type:"text",size:"mini"}},[t._v("设备编辑")])],1)]}}])})],1),t._v(" "),r("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.currPage,"page-sizes":[10,30,50,100],"page-size":t.listQuery.limit,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)},i=[],o={render:n,staticRenderFns:i};e.a=o},"9bBU":function(t,e,r){r("mClu");var n=r("FeBl").Object;t.exports=function(t,e,r){return n.defineProperty(t,e,r)}},C4MV:function(t,e,r){t.exports={default:r("9bBU"),__esModule:!0}},LRqo:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("zXnI"),i=r("+7UF"),o=r("VU/8"),a=o(n.a,i.a,null,null,null);e.default=a.exports},bOdI:function(t,e,r){"use strict";e.__esModule=!0;var n=r("C4MV"),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t,e,r){return e in t?(0,i.default)(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},g45I:function(t,e,r){"use strict";function n(t){return r.i(u.a)({url:"/service-org/shop/list",method:"get",params:t})}function i(t){return r.i(u.a)({url:"/unionService/shop/shop",method:"post",data:t})}function o(t){return r.i(u.a)({url:"/service-org/shop/detail?shopId="+t,method:"get"})}function a(t){return r.i(u.a)({url:"/unionService/shop/shop",method:"put",data:t})}function s(t){return r.i(u.a)({url:"/unionService/device/store",method:"put",data:t})}function l(t){return r.i(u.a)({url:"/service-org/shop/delete?shopId="+t,method:"DELETE"})}e.a=n,e.f=i,e.b=o,e.c=a,e.d=s,e.e=l;var u=r("Vo7i")},mClu:function(t,e,r){var n=r("kM2E");n(n.S+n.F*!r("+E39"),"Object",{defineProperty:r("evD5").f})},zXnI:function(t,e,r){"use strict";var n=r("bOdI"),i=r.n(n),o=r("g45I"),a=r("zppT");e.a={data:function(){return{usertype:this.$store.getters.usertype,manageList:[],list:null,listLoading:!0,listQuery:{name:"",org:this.$store.getters.orgId,orderField:"id",dire:"desc",limit:10,offset:0},currPage:1,total:null}},created:function(){this.fetchData(),"user"!=this.usertype&&this.manageSelect(),this.$route.query.id&&(this.listQuery.org=parseInt(this.$route.query.id))},methods:i()({manageSelect:function(){var t=this;r.i(a.a)().then(function(e){t.manageList=e.result.rows})},fetchData:function(){var t=this;this.listLoading=!0,r.i(o.a)(this.listQuery).then(function(e){t.list=e.result.rows,t.total=e.result.total,t.listLoading=!1})},resetForm:function(t){this.$refs[t].resetFields()},handleDelete:function(t){console.log(t)},handleSizeChange:function(t){this.listQuery.limit=t,this.listQuery.offset=(this.currPage-1)*t,this.fetchData()},handleCurrentChange:function(t){this.currPage=t,this.listQuery.offset=this.listQuery.limit*(t-1),this.fetchData()},handleDownload:function(){var t=this;r.e(89).then(r.bind(null,"zWO4")).then(function(e){var n=["shop_id","名称","地点","电话","pos数","所属集团","会员"],i=["id","name","addr","phone","posnum","orgname","membernum"],a={name:t.listQuery.name,org:t.listQuery.org,orderField:t.listQuery.orderField,dire:t.listQuery.dire};r.i(o.a)(a).then(function(r){var o=r.result.rows,a=t.formatJson(i,o);e.export_json_to_excel(n,a,"门店列表")})})},formatJson:function(t,e){return e.map(function(e){return t.map(function(t){return"addr"==t?e.provincename+e.cityname+e.address:"membernum"==t?"0":e[t]})})}},"handleDelete",function(t){var e=this;this.$confirm("此操作将删除您所选的数据, 是否继续?","",{type:"warning",center:!0}).then(function(){r.i(o.e)(t).then(function(t){e.$message({type:"success",message:"操作成功!"}),e.fetchData()})}).catch(function(){})})}},zppT:function(t,e,r){"use strict";function n(t){return r.i(u.a)({url:"/unionService/org/org",method:"post",data:t})}function i(t){return r.i(u.a)({url:"/service-org/org/list",method:"get",params:t})}function o(t){return r.i(u.a)({url:"/service-org/org/list",method:"get",params:t})}function a(t){return r.i(u.a)({url:"/service-org/org/delete?orgId="+t,method:"DELETE"})}function s(t){return r.i(u.a)({url:"/service-org/org/detail?orgId="+t,method:"get"})}function l(t){return r.i(u.a)({url:"/service-org/org/update",method:"put",data:t})}e.e=n,e.a=i,e.f=o,e.d=a,e.b=s,e.c=l;var u=r("Vo7i")}});
- //# sourceMappingURL=35.0fc494313d27671ab00a.js.map
|