GvGk.fa6a09f7.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["GvGk"],{GvGk:function(e,t,a){"use strict";a.r(t);var o=a("QbLZ"),n=a.n(o),i=a("t3Un");function s(e){return Object(i.a)({method:"get",params:{_gp:"admin.shop.shopAccount",_mt:"get",id:e}})}var r={data:function(){return{userList:[],loading:!0,ids:[],single:!0,multiple:!0,total:0,accountList:[],title:"",open:!1,updateFlag:!1,queryParams:{pageNum:1,pageSize:10,dangAccount:void 0,dangPassword:void 0,fuziAccount:void 0,fuziPassword:void 0,fuziCookie:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},form:{},rules:{}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,function(e){return Object(i.a)({method:"get",params:n()({_gp:"admin.shop.shopAccount",_mt:"list"},e)})}(this.queryParams).then(function(t){e.accountList=t.data.data.items,e.total=t.data.data.count,e.loading=!1})},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,dangAccount:void 0,dangPassword:void 0,fuziAccount:void 0,fuziPassword:void 0,fuziCookie:void 0,remark:void 0,deleteFlag:void 0,gmtCreate:void 0,gmtUpdate:void 0,userId:void 0,adminId:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map(function(e){return e.id}),this.single=1!=e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加电商账户表"},handleUpdate:function(e){var t=this;this.reset(),s(e.id||this.ids.join(",")).then(function(e){t.form=e.data.data,Object(i.a)({method:"get",params:{_gp:"admin.shop.shopAccount",_mt:"options"}}).then(function(e){t.open=!0,t.updateFlag=!1,t.title="修改电商账户表",t.userList=e.data.data})})},handleUpdateData:function(e){var t=this;this.reset(),s(e.id||this.ids.join(",")).then(function(e){t.form=e.data.data,t.open=!0,t.updateFlag=!0,t.title="更新电商账户表"})},submitForm:function(){var e=this;this.$refs.form.validate(function(t){t&&(void 0!=e.form.id?function(e){return Object(i.a)({method:"post",params:{_gp:"admin.shop.shopAccount",_mt:"update",shopAccount:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)}):function(e){return Object(i.a)({method:"post",params:{_gp:"admin.shop.shopAccount",_mt:"add",shopAccount:e}})}(e.form).then(function(t){t.data?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))})},handleDelete:function(e){var t=this,a=e.id||this.ids.join(",");this.$confirm('是否确认删除电商账户表编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(i.a)({method:"post",params:{_gp:"admin.shop.shopAccount",_mt:"delete",id:e}})}(a)}).then(function(){t.getList(),t.msgSuccess("删除成功")}).catch(function(){})},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有电商账户表数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){return function(e){return Object(i.a)({method:"get",params:n()({_gp:"admin.shop.shopAccount",_mt:"export"},e)})}(t)}).then(function(t){e.download(t.data.data)}).catch(function(){})},handleSee:function(){window.open("../../../../../static/jiaocheng.html")}}},l=a("KHd+"),c=Object(l.a)(r,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"当当账号",prop:"dangAccount"}},[a("el-input",{attrs:{placeholder:"请输入当当账号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.dangAccount,callback:function(t){e.$set(e.queryParams,"dangAccount",t)},expression:"queryParams.dangAccount"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"孔网账号",prop:"fuziAccount"}},[a("el-input",{attrs:{placeholder:"请输入孔网账号",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.fuziAccount,callback:function(t){e.$set(e.queryParams,"fuziAccount",t)},expression:"queryParams.fuziAccount"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:add"],expression:"['shop:shopAccount:add']"}],attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:edit"],expression:"['shop:shopAccount:edit']"}],attrs:{disabled:e.single,type:"success",icon:"el-icon-edit",size:"mini"},on:{click:e.handleUpdate}},[e._v("修改")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:remove"],expression:"['shop:shopAccount:remove']"}],attrs:{disabled:e.multiple,type:"danger",icon:"el-icon-delete",size:"mini"},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:export"],expression:"['shop:shopAccount:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.accountList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{type:"index",label:"序号"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.$index<9?a("span",[e._v("0"+e._s(t.$index+1))]):a("span",[e._v(e._s(t.$index+1))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"店铺id",align:"center",prop:"dangId"}}),e._v(" "),a("el-table-column",{attrs:{label:"店铺名称",align:"center",prop:"dangName"}}),e._v(" "),a("el-table-column",{attrs:{label:"孔网账号",align:"center",prop:"fuziAccount"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),e._v(" "),a("el-table-column",{attrs:{label:"管理员",align:"center",prop:"userName"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间",align:"center",prop:"gmtUpdate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.gmtUpdate)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["admin:shop:shopAccount:update"],expression:"['admin:shop:shopAccount:update']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){e.handleUpdateData(t.row)}}},[e._v("更新")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:edit"],expression:"['shop:shopAccount:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:["shop:shopAccount:remove"],expression:"['shop:shopAccount:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"授权用户",prop:"userId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.userId,callback:function(t){e.$set(e.form,"userId",t)},expression:"form.userId"}},e._l(e.userList,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"店铺id",prop:"dangId"}},[a("el-input",{attrs:{placeholder:"请输入店铺id"},model:{value:e.form.dangId,callback:function(t){e.$set(e.form,"dangId",t)},expression:"form.dangId"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"appkey",prop:"dangAppKey"}},[a("el-input",{attrs:{placeholder:"请输入appkey"},model:{value:e.form.dangAppKey,callback:function(t){e.$set(e.form,"dangAppKey",t)},expression:"form.dangAppKey"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"appsecret",prop:"dangAppSecret"}},[a("el-input",{attrs:{placeholder:"请输appsecret"},model:{value:e.form.dangAppSecret,callback:function(t){e.$set(e.form,"dangAppSecret",t)},expression:"form.dangAppSecret"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"session",prop:"dangSession"}},[a("el-input",{attrs:{placeholder:"session"},model:{value:e.form.dangSession,callback:function(t){e.$set(e.form,"dangSession",t)},expression:"form.dangSession"}})],1),e._v(" "),a("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!e.updateFlag,expression:"!updateFlag"}],attrs:{label:"接口版本",prop:"dangVersion"}},[a("el-input",{attrs:{placeholder:"请输入接口版本"},model:{value:e.form.dangVersion,callback:function(t){e.$set(e.form,"dangVersion",t)},expression:"form.dangVersion"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"店铺名称",prop:"dangName"}},[a("el-input",{attrs:{placeholder:"请输入店铺名称"},model:{value:e.form.dangName,callback:function(t){e.$set(e.form,"dangName",t)},expression:"form.dangName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"孔网账号",prop:"fuziAccount"}},[a("el-input",{attrs:{placeholder:"请输入孔网账号"},model:{value:e.form.fuziAccount,callback:function(t){e.$set(e.form,"fuziAccount",t)},expression:"form.fuziAccount"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"孔网密码",prop:"fuziPassword"}},[a("el-input",{attrs:{type:"password",placeholder:"请输入孔网密码"},model:{value:e.form.fuziPassword,callback:function(t){e.$set(e.form,"fuziPassword",t)},expression:"form.fuziPassword"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"孔网cookie",prop:"fuziCookie"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.fuziCookie,callback:function(t){e.$set(e.form,"fuziCookie",t)},expression:"form.fuziCookie"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"教程",prop:"remark"}},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.handleSee()}}},[e._v("查看设置方法")])],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},[],!1,null,null,null);c.options.__file="index.vue";t.default=c.exports}}]);