UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 10.4 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-967ef426"],{"7c5e":function(t,e,i){},"8d39":function(t,e,i){},"8d4c":function(t,e,i){"use strict";i("b0c0");var n=function(){var t=this,e=t._self._c;return t.huobiList&&t.huobiList.length?e("a-select",{attrs:{placeholder:"请选择","allow-clear":"",disabled:t.disable,getPopupContainer:function(t){return t.parentNode}},on:{change:t.back},model:{value:t.checkedHuoBi,callback:function(e){t.checkedHuoBi=e},expression:"checkedHuoBi"}},t._l(t.huobiList,(function(i,n){return e("a-select-option",{key:n,attrs:{value:i.name}},[t._v(t._s(i.name))])})),1):t._e()},s=[],a=(i("d81d"),i("7db0"),i("d3b7"),i("c7a1")),o={name:"HuoBiSelect",props:{huobi:{type:String,default:""},disable:{type:Boolean,default:!1}},data:function(){return{huobiList:[],checkedHuoBi:this.huobi}},watch:{huobi:function(t,e){t!==e&&(this.checkedHuoBi=t)}},created:function(){this.initLit()},methods:{initLit:function(){var t=this;Object(a["d"])().then((function(e){e.quote_currency&&e.quote_currency.map((function(e){t.huobiList.push({name:e})}))}))},back:function(t){var e=this,i=this.huobiList.find((function(t){return t.name===e.checkedHuoBi}));this.$emit("change",this.checkedHuoBi),this.$emit("changeView",i)}}},c=o,r=i("2877"),u=Object(r["a"])(c,n,s,!1,null,null,null);e["a"]=u.exports},a9b0:function(t,e,i){"use strict";i.r(e);i("b0c0");var n=function(){var t=this,e=t._self._c;return e("div",[e("a-card",{staticStyle:{"margin-bottom":"10px",height:"60px"},attrs:{bordered:!1}},[e("a-input",{staticStyle:{"margin-bottom":"5px","margin-left":"16px",width:"30%","margin-top":"15px"},attrs:{placeholder:t.$t("view.shopview.form.search.placeholder")},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}}),e("a-button",{staticClass:"editable-add-btn",staticStyle:{"margin-top":"5px","margin-left":"10px"}},[t._v(" "+t._s(t.$t("view.list.search.btn"))+" ")])],1),e("a-card",{staticClass:"table-card",attrs:{bordered:!1}},[e("a-button",{staticClass:"editable-add-btn",staticStyle:{"margin-top":"10px","margin-left":"12px","margin-bottom":"8px"},on:{click:t.showAdd}},[t._v(" "+t._s(t.$t("view.shopview.form.add.btn"))+" ")]),e("a-table",{attrs:{bordered:"","data-source":t.searchSource,columns:t.Columns,pagination:{pageSize:100,total:t.total_count}},scopedSlots:t._u([{key:"autoTrans",fn:function(i,n){return[0==n.is_default?e("a-switch",{attrs:{"checked-children":t.$t("view.shopview.open.label"),"un-checked-children":t.$t("view.shopview.close.label"),checked:1===n.auto_trans},on:{click:function(e){return t.changeAutoTrans(n)}}}):t._e()]}},{key:"is_default",fn:function(i,n){return[1==n.is_default?e("span",[t._v(t._s(t.$t("view.config.style.isKefu.true")))]):e("span",[t._v(t._s(t.$t("view.config.style.isKefu.false")))])]}},{key:"operation",fn:function(i,n){return[e("a",{staticStyle:{color:"#3e86ed"},attrs:{href:"javascript:"},on:{click:function(e){return t.showUpdate(n)}}},[t._v(t._s(t.$t("view.article.list.article.update")))])]}}])})],1),e("a-modal",{attrs:{title:t.$t("view.shopview.form.setting.title")},on:{ok:t.isOK},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[[e("div",[t._v(" "+t._s(t.$t("view.shopview.form.name.label"))+": "),e("a-input",{staticStyle:{"margin-top":"10px"},attrs:{value:t.selectView},model:{value:t.selectView,callback:function(e){t.selectView=e},expression:"selectView"}})],1),e("div",{staticStyle:{width:"120px","margin-top":"10px"}},[t._v(" "+t._s(t.$t("view.shopview.form.locale.label"))+": "),e("a-select",{staticStyle:{width:"120px","margin-top":"10px"},attrs:{value:t.selectLanguage},on:{change:t.lHandleChange}},t._l(t.lang,(function(i,n){return e("a-select-option",{key:n,attrs:{value:i.code}},[t._v(t._s(i.name))])})),1)],1),e("div",{staticStyle:{width:"120px","margin-top":"10px"}},[t._v(" "+t._s(t.$t("view.shopview.form.currency.label"))+": "),e("huo-bi",{staticStyle:{width:"120px","margin-top":"10px"},attrs:{huobi:t.selectCurrency},on:{change:t.cHandleChange}})],1)]],2),e("a-modal",{attrs:{title:t.$t("app.avatar.logout.ts"),visible:t.sw_visible,"confirm-loading":t.sw_confirmLoading},on:{ok:t.sw_handleOk,cancel:t.sw_handleCancel}},[e("p",[t._v(t._s(t.ShopInfo))])])],1)},s=[],a=i("5530"),o=(i("d3b7"),i("25f0"),i("4de4"),i("caad"),i("2532"),i("8d4c")),c=i("d047"),r=i("5880"),u=i("645b"),l={name:"ShoViewList",components:{Template:u["default"],HuoBi:o["a"]},data:function(){return{sw_visible:!1,sw_confirmLoading:!1,selectView:"",selectLanguage:"",selectCurrency:"",actionName:"",visible:!1,selectViewId:0,searchKey:"",page:1,limit:100,total_count:0,dataSource:[],Columns:[{title:"ID",dataIndex:"view_id"},{title:this.$t("view.shopview.form.name.label"),dataIndex:"name"},{title:this.$t("view.shopview.form.locale.label"),dataIndex:"language"},{title:this.$t("view.shopview.form.currency.label"),dataIndex:"currency"},{title:this.$t("view.shopview.form.auto_trans.label"),dataIndex:"auto_trans",scopedSlots:{customRender:"autoTrans"}},{title:this.$t("view.shopview.form.default.label"),dataIndex:"is_default",scopedSlots:{customRender:"is_default"}},{title:this.$t("view.shopview.form.operation.label"),dataIndex:"operation",scopedSlots:{customRender:"operation"}}],record:{},ShopInfo:"",money:0,lang:[{code:"zh-CN",name:"中文简体"},{code:"en-US",name:"English"},{code:"fr-FR",name:"Français"}]}},methods:{showUpdate:function(t){this.selectViewId=t.view_id,this.selectView=t.name,this.selectLanguage=t.language,this.selectCurrency=t.currency,this.actionName="更新",this.visible=!0},showAdd:function(){this.selectViewId=0,this.actionName="添加",this.selectLanguage="",this.selectCurrency="",this.visible=!0},isOK:function(){var t=this;if("添加"===this.actionName){var e={shop_id:this.shopId,view_id:-1,name:this.selectView,language:this.selectLanguage,currency:this.selectCurrency};Object(c["h"])(e).then((function(e){t.getList(),t.$message.success(t.$t("src.views.member.group.success").toString())}))}"更新"===this.actionName&&(e={shop_id:this.shopId,view_id:this.selectViewId,name:this.selectView,language:this.selectLanguage,currency:this.selectCurrency},Object(c["h"])(e).then((function(e){t.getList(),t.$message.success(t.$t("src.views.member.group.success").toString())}))),this.visible=!1},cHandleChange:function(t){this.selectCurrency=t},lHandleChange:function(t){this.selectLanguage=t},getList:function(){var t=this,e={page:this.page,limit:this.limit,shop_id:this.shopId};Object(c["i"])(e).then((function(e){void 0!==e&&(t.total_count=e.total_count,t.page=e.page,t.limit=e.limit,t.dataSource=e.list)}))},changeAutoTrans:function(t){var e=this;0===t.auto_trans?(this.record=t,this.sw_visible=!0,Object(c["d"])({shop_id:1}).then((function(t){t&&(e.money=t.money,e.ShopInfo=e.$t("view.shopview.shopyue.message",{money:t.money}))}))):Object(c["b"])({view_id:t.view_id}).then((function(t){e.getList(),e.$message.success(e.$t("src.views.member.group.success").toString())}))},sw_handleOk:function(){var t=this;if(1===this.record.auto_trans)Object(c["b"])({view_id:this.record.view_id}).then((function(e){t.getList(),t.$message.success(t.$t("src.views.member.group.success").toString())}));else{if(this.money<1)return void this.$message.error("view.shopview.yuebuzu.message");Object(c["f"])({view_id:this.record.view_id}).then((function(e){t.getList(),t.$message.success(t.$t("src.views.member.group.success").toString()),Object(c["a"])({shop_id:1,lang:t.record.language}).then((function(t){}))}))}this.sw_visible=!1},sw_handleCancel:function(){this.sw_visible=!1}},created:function(){var t=this;this.getList(),Object(c["e"])().then((function(e){var i=JSON.parse(e.lang);t.lang=i}))},computed:Object(a["a"])(Object(a["a"])({},Object(r["mapGetters"])(["shopId"])),{},{searchSource:function(){var t=this;return this.dataSource?this.dataSource.filter((function(e){return e.view_id.toString().includes(t.searchKey)||e.name.toString().includes(t.searchKey)||e.language.toString().includes(t.searchKey)})):[]}})},d=l,h=(i("f22d"),i("d32e"),i("2877")),f=Object(h["a"])(d,n,s,!1,null,"1cefe8ab",null);e["default"]=f.exports},c7a1:function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return o})),i.d(e,"d",(function(){return c})),i.d(e,"e",(function(){return r})),i.d(e,"f",(function(){return u})),i.d(e,"g",(function(){return l})),i.d(e,"c",(function(){return d}));var n=i("b775"),s={configAdd:"/mallconfig/save",configList:"/mallconfig/list",huobiGet:"/pmethod/currency/get",huobiSet:"/pmethod/currencyrates/set",systemGet:"/config/sys/get",systemSet:"/config/sys/set",copyrightApi:"/config/copyright"};function a(t){return Object(n["b"])({url:s.configAdd,method:"post",data:t})}function o(t){return Object(n["b"])({url:s.configList,method:"post",params:t})}function c(t){return Object(n["b"])({url:s.huobiGet,method:"get",params:t})}function r(t){return Object(n["b"])({url:s.huobiSet,method:"post",params:t})}function u(t){return Object(n["b"])({url:s.systemGet,method:"post",params:t})}function l(t){return Object(n["b"])({url:s.systemSet,method:"post",data:t})}function d(t){return Object(n["b"])({url:s.copyrightApi,method:"post",data:t})}},d047:function(t,e,i){"use strict";i.d(e,"i",(function(){return a})),i.d(e,"h",(function(){return o})),i.d(e,"b",(function(){return c})),i.d(e,"f",(function(){return r})),i.d(e,"a",(function(){return u})),i.d(e,"d",(function(){return l})),i.d(e,"g",(function(){return d})),i.d(e,"e",(function(){return h})),i.d(e,"c",(function(){return f}));var n=i("b775"),s={list:"/shop/view/list"};function a(t){return Object(n["b"])({url:s.list,method:"post",data:t})}function o(t){return Object(n["b"])({url:"/shop/view/add",method:"post",data:t})}function c(t){return Object(n["b"])({url:"/shop/view/close_auto_trans",method:"post",data:t})}function r(t){return Object(n["b"])({url:"/shop/view/open_auto_trans",method:"post",data:t})}function u(t){return Object(n["b"])({url:"/trans_task/add_shop_job",method:"post",data:t})}function l(t){return Object(n["b"])({url:"/shop/getinfo",method:"post",data:t})}function d(t){return Object(n["b"])({url:"/mall_config/save",method:"post",data:t})}function h(t){return Object(n["b"])({url:"/lang/get",method:"post",data:t})}function f(t){return Object(n["b"])({url:"/mall_config/get",method:"post",data:t})}},d32e:function(t,e,i){"use strict";i("7c5e")},f22d:function(t,e,i){"use strict";i("8d39")}}]);