beehole-store-server
Version:
www.bee-hole.com
1 lines • 8.96 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-572ef69d","chunk-7d00b296"],{"1b6c":function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return s}));var i=n("5530"),o=n("bf0f");function c(t,e){return function(){return Object(o["b"])(t,Object(i["a"])({},e))}}function s(t,e){return Object(o["b"])(t,Object(i["a"])({},e))}},a62d:function(t,e,n){"use strict";n.r(e);var i=n("5530"),o=n("c7a1"),c=n("b9ab"),s=n("5d9e"),a=n("5880"),r=n("1b6c");e["default"]={name:"pushConfig",data:function(){return{formData:{business_no:"",secret:"",wms_id:"",shop_code:""}}},components:{CountryList:c["a"],AdvanceTable:s["a"]},computed:Object(i["a"])({},Object(a["mapGetters"])(["shopId"])),created:function(){this.getList()},methods:{getList:function(){var t=this;Object(o["b"])({shop_id:this.shopId,name:"pushConfig"}).then((function(e){e.list&&e.list.length&&(t.config=JSON.parse(e.list[0].config),t.formData.business_no=t.config.business_no,t.formData.secret=t.config.secret,t.formData.wms_id=t.config.wms_id,t.formData.shop_code=t.config.shop_code)}))},onSubmit:function(){var t=this,e=this;return this.formData.business_no&&this.formData.secret?void Object(o["a"])({config:JSON.stringify(this.formData),shop_id:e.shopId,lang:"zh-CN",name:"pushConfig",is_default:1}).then((function(n){t.$message.info(Object(r["b"])("view.config.pushconfig.submit.callback")),e.getList()})):(this.$message.info(Object(r["b"])("view.config.pushconfig.please_input")),!1)}}}},b9ab:function(t,e,n){"use strict";n("d3b7"),n("ddb0"),n("b0c0");var i=function(){var t=this,e=t._self._c;return e("div",[t.hiddenBtn?t._e():e("a-button",{attrs:{type:"primary"},on:{click:function(e){return e.target!==e.currentTarget?null:t.openModal.apply(null,arguments)}}},[t._v(" "+t._s(t.$t("compoent.countryList.btn"))+" ")]),t.open?e("ant-modal",{attrs:{visible:t.open,"modal-title":t.formTitle,"adjust-size":!0,modalHeight:"580",modalWidth:t.getWidth},on:{cancel:t.cancel,ok:t.backChecked}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("a-tree",{attrs:{checkable:"","tree-data":t.treeData,"replace-fields":t.fieldNames,selectedKeys:t.keys,checkedKeys:t.checkedKeys},on:{select:t.onSelect,check:t.onCheck},scopedSlots:t._u([{key:"title",fn:function(n){var i=n.name,o=n.key;return["0-0-1"===o?e("span",{staticStyle:{color:"#1890ff"}},[t._v(t._s(i))]):[t._v(t._s(i))]]}}],null,!1,3052740220)})],1)]):t._e()],1)},o=[],c=n("5530"),s=n("53ca"),a=(n("d81d"),n("c740"),n("a434"),n("d9a1")),r=n("2dd7"),d=n("5d9e"),u=n("1b6c"),l=n("c7a1"),f=n("5880"),h={name:"catCheckbox",components:{AntModal:r["a"],AdvanceTable:d["a"]},computed:Object(c["a"])(Object(c["a"])({},Object(f["mapGetters"])(["shopId","isMobile"])),{},{getWidth:function(){return this.isMobile?"350":"1200"}}),data:function(){return{open:!1,formTitle:Object(u["b"])("compoent.countryList.modal.title"),loading:!1,defaults:[{value:1,key:"1",name:"默认"},{value:0,key:"0",name:"不默认"}],fieldNames:[],treeData:[],keys:[],selectedCountry:[],formData:{shop_id:"",lang:"zh-CN",name:"PsCountry"},checkedKeys:[]}},props:{type:{default:"radio"},hiddenBtn:!1,checked:[]},created:function(){this.initColunmns()},methods:{openModal:function(){var t=this;this.open=!0,this.getList(),this.selectedRowKeys=[],this.selectedRows=[],"checkbox"===this.type&&this.checked&&this.checked.length&&("object"===Object(s["a"])(this.checked[0])?this._.map(this.checked,(function(e){t.selectedRowKeys.push(e.id),t.selectedRows.push(e)})):"string"===typeof this.checked[0]&&"number"===typeof this.checked[0]&&(this.selectedRowKeys=this.checked))},getList:function(){var t=this;Object(a["b"])().then((function(e){t.fieldNames={children:"child",title:"name"},Object(l["b"])({name:t.formData.name,shop_id:t.shopId}).then((function(e){if(e.list&&e.list.length)try{t.checkedKeys=[];var n=JSON.parse(e.list[0].config);t.selectedCountry=n,t._.map(n,(function(e){t.checkedKeys.push(e.key)}))}catch(i){}})),t.treeData=e.list}))},cancel:function(){this.open=!1},backChecked:function(){var t=this,e=JSON.parse(JSON.stringify(this.formData)),n={config:JSON.stringify(this.selectedCountry),shop_id:this.shopId,lang:"zh-CN",name:e.name,is_default:1};Object(l["a"])(n).then((function(e){t.$message.info(Object(u["b"])("api.info.operation")),t.$emit("ok",t.selectedCountry),t.cancel()}))},initColunmns:function(){this.getList()},onSelect:function(t,e){},onCheck:function(t,e){var n=this;this.checkedKeys=t;var i=e.checked,o=e.node.dataRef;if(i)if(o.child){var c=o.child[0];c.child?this._.map(o.child,(function(t){t.child&&n._.map(t.child,(function(t){var e=n._.findIndex(n.selectedCountry,{key:t.key});-1===e&&n.selectedCountry.push(t)}))})):this._.map(o.child,(function(t){var e=n._.findIndex(n.selectedCountry,{key:t.key});-1===e&&n.selectedCountry.push(t)}))}else this.selectedCountry.push(o);else if(o.child){var s=o.child[0];s.child?this._.map(o.child,(function(t){t.child&&n._.map(t.child,(function(t){var e=n._.findIndex(n.selectedCountry,{key:t.key});-1!==e&&n.selectedCountry.splice(e,1)}))})):this._.map(o.child,(function(t){var e=n._.findIndex(n.selectedCountry,{key:t.key});-1!==e&&n.selectedCountry.splice(e,1)}))}else{var a=this._.findIndex(this.selectedCountry,{key:o.key});-1!==a&&this.selectedCountry.splice(a,1)}},changeLang:function(){},changeDefault:function(){}}},p=Object(c["a"])({},h),m=p,b=n("2877"),g=Object(b["a"])(m,i,o,!1,null,null,null);e["a"]=g.exports},c7a1:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return r})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return u})),n.d(e,"c",(function(){return l}));var i=n("b775"),o={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 c(t){return Object(i["b"])({url:o.configAdd,method:"post",data:t})}function s(t){return Object(i["b"])({url:o.configList,method:"post",params:t})}function a(t){return Object(i["b"])({url:o.huobiGet,method:"get",params:t})}function r(t){return Object(i["b"])({url:o.huobiSet,method:"post",params:t})}function d(t){return Object(i["b"])({url:o.systemGet,method:"post",params:t})}function u(t){return Object(i["b"])({url:o.systemSet,method:"post",data:t})}function l(t){return Object(i["b"])({url:o.copyrightApi,method:"post",data:t})}},d42f:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("a-card",{staticStyle:{"margin-bottom":"10px",padding:"10px"},attrs:{bordered:!1}},[e("a-form-model",t._b({ref:"ruleForm",attrs:{model:t.formData,layout:"inline"}},"a-form-model",{labelCol:{span:24},wrapperCol:{span:24}},!1),[e("a-form-model-item",{attrs:{label:t.$t("view.config.pushconfig.business_no")}},[e("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("view.config.pushconfig.business_no")},model:{value:t.formData.business_no,callback:function(e){t.$set(t.formData,"business_no",e)},expression:"formData.business_no"}})],1),e("a-form-model-item",{attrs:{label:t.$t("view.config.pushconfig.secret")}},[e("a-input",{staticStyle:{width:"100%"},attrs:{type:"password",placeholder:t.$t("view.config.pushconfig.secret")},model:{value:t.formData.secret,callback:function(e){t.$set(t.formData,"secret",e)},expression:"formData.secret"}})],1),e("a-form-model-item",{attrs:{label:t.$t("view.config.pushconfig.wms_id")}},[e("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("view.config.pushconfig.wms_id")},model:{value:t.formData.wms_id,callback:function(e){t.$set(t.formData,"wms_id",e)},expression:"formData.wms_id"}})],1),e("a-form-model-item",{attrs:{label:t.$t("view.config.pushconfig.shop_code")}},[e("a-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("view.config.pushconfig.shop_code")},model:{value:t.formData.shop_code,callback:function(e){t.$set(t.formData,"shop_code",e)},expression:"formData.shop_code"}})],1)],1),e("a-form-model",t._b({staticStyle:{"margin-top":"10px"}},"a-form-model",{labelCol:{span:24},wrapperCol:{span:24}},!1),[e("a-form-model-item",{attrs:{"wrapper-col":{wrapperCol:{span:14,offset:18}}}},[e("a-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v(t._s(t.$t("view.config.pushconfig.submit.btn")))]),e("p"),e("a-alert",{staticStyle:{width:"fit-content"},attrs:{message:t.$t("view.config.pushconfig.example"),type:"warning","show-icon":""}})],1)],1)],1)],1)},o=[],c=n("5530"),s=n("a62d"),a=Object(c["a"])({},s["default"]),r=a,d=n("2877"),u=Object(d["a"])(r,i,o,!1,null,null,null);e["default"]=u.exports},d9a1:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return c}));var i=n("b775");function o(t){return Object(i["b"])({url:"/benefit_code/country_list",method:"post",params:t})}function c(t){return Object(i["b"])({url:"/benefit_code/zend_country_list",method:"post",params:t})}}}]);