beehole-store-server
Version:
www.bee-hole.com
1 lines • 12.1 kB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7970105c","chunk-d757ac5e"],{"002b":function(t,e,a){"use strict";a("e9bb")},"49dd":function(t,e,a){"use strict";a.r(e);a("b0c0");var i=function(){var t=this,e=t._self._c;return e("div",[e("ant-modal",{attrs:{visible:t.open,"modal-title":t.formTitle,"adjust-size":!0,modalHeight:"480",modalWidth:t.isMobile?"100vw":"640"},on:{cancel:t.cancel}},[e("a-form-model",{ref:"form",attrs:{slot:"content",model:t.formData,rules:t.rules,layout:"vertical"},slot:"content"},[t.formData.cat_id?e("a-row",{staticClass:"form-row top-view",staticStyle:{"padding-top":"0"},attrs:{gutter:32}},[e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("view-tabs",{attrs:{"view-id":t.view_id,defaultLang:t.defaultLang},on:{change:t.changeView,"update:defaultLang":function(e){t.defaultLang=e},"update:default-lang":function(e){t.defaultLang=e}}})],1)],1):t._e(),e("a-row",{staticClass:"form-row",class:{"top-view1":t.formData.cat_id},style:{paddingTop:t.formData.cat_id?"60px":"0"},attrs:{gutter:32}},[e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("a-form-model-item",{attrs:{prop:"ai"}},[e("ai",{attrs:{value:t.formData.ai},on:{"update:value":function(e){return t.$set(t.formData,"ai",e)}}})],1)],1)],1),e("a-row",{staticClass:"form-row",attrs:{gutter:32}},[e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("a-form-model-item",{attrs:{label:t.$t("view.test.list.form.name"),prop:"name"}},[e("a-input",{attrs:{placeholder:t.$t("view.test.list.form.placeholder.name"),disabled:1==t.formData.ai&&t.defaultLang!==t.lang},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}},[t.defaultLang!==t.lang?e("aiTs",{attrs:{slot:"suffix",disabled:1==t.formData.ai&&t.defaultLang!==t.lang,value:t.formData.name,lang:t.lang,loadding:t.aiTsUpdate},on:{"update:value":function(e){return t.$set(t.formData,"name",e)},"update:loadding":function(e){t.aiTsUpdate=e}},slot:"suffix"}):t._e()],1)],1)],1)],1),e("a-row",{staticClass:"form-row",attrs:{gutter:32}},[e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("a-form-model-item",{attrs:{label:t.$t("view.test.list.table.supCat"),prop:"p_cat_id"}},[e("cat-list",{attrs:{"view-id":t.view_id,"p-cat-id":t.formData.p_cat_id},on:{"update:pCatId":function(e){return t.$set(t.formData,"p_cat_id",e)},"update:p-cat-id":function(e){return t.$set(t.formData,"p_cat_id",e)}}})],1)],1)],1),e("a-row",{staticClass:"form-row",attrs:{gutter:32}},[e("a-col",{attrs:{lg:24,md:24,sm:24}},[e("a-form-model-item",{attrs:{label:t.image_url,prop:"image_url"}},[e("a-row",{staticStyle:{display:"flex"},attrs:{gutter:[16,8]}},[e("a-col",{attrs:{lg:7,md:7,sm:8}},[e("img",{staticClass:"iamge",attrs:{src:t.formData.image_url&&"http"!=t.formData.image_url?t.formData.image_url:"https://img.alicdn.com/imgextra/i1/20841398/TB2saKTcA9WBuNjSspeXXaz5VXa-20841398.png"}})]),e("a-col",{staticClass:"item-image-input",attrs:{lg:17,md:17,sm:14}},[e("attach-list",{attrs:{params:{good_id:3},value:t.formData.image_url},on:{"update:value":function(e){return t.$set(t.formData,"image_url",e)}}}),e("a-input",{staticStyle:{"margin-top":"10px"},attrs:{placeholder:t.$t("view.test.form.add.placeholder.img.link")},model:{value:t.formData.image_url,callback:function(e){t.$set(t.formData,"image_url",e)},expression:"formData.image_url"}})],1)],1)],1)],1)],1)],1),e("template",{slot:"footer"},[e("a-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v(t._s(t.$t("view.test.form.add.modal.btn.save"))+" ")]),e("a-button",{on:{click:t.cancel}},[t._v(" "+t._s(t.$t("view.test.form.add.modal.btn.cancel"))+" ")])],1)],2)],1)},n=[],c=a("5530"),s=a("c2f7"),r=Object(c["a"])({},s["default"]),o=r,d=(a("002b"),a("2877")),u=Object(d["a"])(o,i,n,!1,null,"c53b2762",null);e["default"]=u.exports},"6be3":function(t,e,a){"use strict";a("b0c0");var i=function(){var t=this,e=t._self._c;return e("div",[t.catLists&&t.catLists.length?e("a-select",{attrs:{placeholder:"请选择","allow-clear":"",getPopupContainer:function(t){return t.parentNode},disabled:0!=t.readOnly},on:{change:t.back},model:{value:t.checkedcatId,callback:function(e){t.checkedcatId=e},expression:"checkedcatId"}},[0!=t.readOnly?e("div",{attrs:{slot:"suffixIcon"},slot:"suffixIcon"}):t._e(),t._l(t.catLists,(function(a,i){return e("a-select-option",{key:i,attrs:{value:a.cat_id}},[t._v(t._s(t.$t(a.name)))])}))],2):t._e()],1)},n=[],c=a("5530"),s=a("dcb0"),r=a("2f62"),o={name:"CatSelect",props:{viewId:{default:""},pCatId:{default:0},readOnly:{default:0}},computed:Object(c["a"])({},Object(r["c"])(["shopId"])),data:function(){return{catLists:[],checkedcatId:this.pCatId}},created:function(){this.initLit()},watch:{viewId:function(t,e){t!==e&&this.initLit()}},methods:{initLit:function(){var t=this;Object(s["f"])({shop_id:this.shopId,view_id:this.viewId}).then((function(e){e.list.unshift({cat_id:0,name:"view.test.list.form.pcat_1"}),t.catLists=e.list}))},back:function(){this.$emit("update:pCatId",this.checkedcatId),this.$emit("change",this.checkedcatId)}}},d=Object(c["a"])({},o),u=d,l=a("2877"),f=Object(l["a"])(u,i,n,!1,null,null,null);e["a"]=f.exports},"8ebd":function(t,e,a){"use strict";var i=function(){var t=this,e=t._self._c;return e("a-tooltip",[e("template",{slot:"title"},[t._v(" "+t._s(t.$t("app.form.ai.ts"))+" ")]),e("a-switch",{attrs:{"checked-children":t.$t("app.form.ai.open"),"un-checked-children":t.$t("app.form.ai.close")},on:{change:t.back},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}})],2)},n=[],c=a("5530"),s={name:"ai",props:{value:{default:1},id:{default:-1}},data:function(){return{checked:!0}},watch:{value:function(){this.checked=!!this.value}},created:function(){-1!==this.id&&void 0!==this.id||this.back()},methods:{back:function(){var t=0;this.checked&&(t=1),this.$emit("update:value",t),this.$emit("change",t)}}},r=Object(c["a"])({},s),o=r,d=a("2877"),u=Object(d["a"])(o,i,n,!1,null,null,null);e["a"]=u.exports},"8f0e":function(t,e,a){"use strict";var i=a("5530"),n=(a("a9e3"),a("d81d"),a("7db0"),a("d3b7"),a("d047")),c=a("2f62");e["a"]={name:"ViewSelect",props:{viewId:{type:Number,default:0},lang:{type:String},backVal:{type:String,default:"viewId"}},computed:Object(i["a"])({},Object(c["c"])(["shopId"])),data:function(){return{viewLists:[],checkedViewId:0,checkedLang:""}},created:function(){this.checkedViewId||(this.checkedViewId=this.viewId),this.checkedLang&&""!==this.checkedLang||(this.checkedLang=this.lang),this.initLit()},methods:{initLit:function(){var t=this;Object(n["i"])({ShopId:this.shopId,limit:100,page:1}).then((function(e){t._.map(e.list,(function(e){1===e.is_default&&t.$emit("update:defaultLang",e.language)})),"viewId"===t.backVal?(t.viewLists=e.list,e.list&&(t.checkedLang=t.viewLists[0].language,t.checkedViewId=t.viewLists[0].view_id,t.back())):(t.viewLists=e.list,t.viewList&&(t.checkedLang=t.viewLists[0].language,t.checkedViewId=t.viewLists[0].view_id,t.back()))}))},back:function(t){var e=this,a=this.viewLists.find((function(t){return"viewId"===e.backVal?t.view_id===e.checkedViewId:t.language===e.checkedLang}));"viewId"===this.backVal?(this.checkedLang=a.language,this.$emit("change",this.checkedViewId,this.checkedLang)):(this.checkedViewId=a.view_id,this.$emit("change",this.checkedLang,this.checkedViewId)),this.$emit("changeView",a)}}}},bf9b:function(t,e,a){"use strict";a("b0c0");var i=function(){var t=this,e=t._self._c;return e("div",[t.viewLists&&t.viewLists.length?["viewId"==t.backVal?e("a-tabs",{attrs:{animated:!1},on:{change:t.back},model:{value:t.checkedViewId,callback:function(e){t.checkedViewId=e},expression:"checkedViewId"}},t._l(t.viewLists,(function(t){return e("a-tab-pane",{key:t.view_id,attrs:{tab:t.name}})})),1):e("a-tabs",{attrs:{animated:!1},on:{change:t.back},model:{value:t.checkedLang,callback:function(e){t.checkedLang=e},expression:"checkedLang"}},t._l(t.viewLists,(function(t){return e("a-tab-pane",{key:t.language,attrs:{tab:t.name}})})),1)]:t._e()],2)},n=[],c=a("5530"),s=a("8f0e"),r=Object(c["a"])({},s["a"]),o=r,d=a("2877"),u=Object(d["a"])(o,i,n,!1,null,null,null);e["a"]=u.exports},c2f7:function(t,e,a){"use strict";a.r(e);var i=a("5530"),n=(a("b0c0"),a("2dd7")),c=a("dcb0"),s=a("1b6c"),r=a("2f62"),o=a("fb04"),d=a("bf9b"),u=a("6be3"),l=a("8ebd"),f=a("50af");e["default"]={name:"CareteCat",components:{AntModal:n["a"],AttachList:o["a"],ViewTabs:d["a"],CatList:u["a"],ai:l["a"],aiTs:f["a"]},props:{viewId:0},computed:Object(i["a"])({},Object(r["c"])(["shopId","isMobile"])),data:function(){return{open:!1,formData:{name:"",p_cat_id:0},formTitle:"",rules:{name:[{required:!0,message:Object(s["a"])("分类名不能为空"),trigger:"blur"}]},image_url:Object(s["a"])("view.test.list.form.image_url"),catname:Object(s["a"])("view.test.list.form.name"),view_id:this.viewId,aiTsUpdate:!1,lang:"",defaultLang:""}},created:function(){},methods:{handleAdd:function(){this.open=!0,this.formTitle=Object(s["b"])("view.test.form.add.modal.title")},handleEdit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this,a={cat_id:t.cat_id};t.view_id&&(a.view_id=t.view_id),Object(c["c"])(a).then((function(t){e.formData=t,e.open=!0,e.formTitle="编辑"+t.name}))},cancel:function(){this.open=!1,this.$emit("close")},submitForm:function(){var t=this,e=this;this.$refs.form.validate((function(a){if(a){if(t.aiTsUpdate)return t.$message.warning(t.$t("view.test.form.add.message.aiUpdate")),!1;var i=JSON.parse(JSON.stringify(t.formData));e.shopId&&(i.shop_id=e.shopId),i.cat_id&&(i.view_id=e.view_id),Object(c["a"])(i).then((function(t){if("ok"===t.result){e.$message.info(e.$t("view.test.form.add.message.success"));var a=new Date,n=a.getFullYear()+"-"+(1+a.getMonth())+"-"+a.getDate();i.cat_id,e.$emit("ok",Object.assign({id:Math.random(100),created_at:n},i))}}))}}))},changeView:function(t,e){this.view_id=t,this.lang=e,this.handleEdit({cat_id:this.formData.cat_id,view_id:t})}}}},d047:function(t,e,a){"use strict";a.d(e,"i",(function(){return c})),a.d(e,"h",(function(){return s})),a.d(e,"b",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"a",(function(){return d})),a.d(e,"d",(function(){return u})),a.d(e,"g",(function(){return l})),a.d(e,"e",(function(){return f})),a.d(e,"c",(function(){return m}));var i=a("b775"),n={list:"/shop/view/list"};function c(t){return Object(i["b"])({url:n.list,method:"post",data:t})}function s(t){return Object(i["b"])({url:"/shop/view/add",method:"post",data:t})}function r(t){return Object(i["b"])({url:"/shop/view/close_auto_trans",method:"post",data:t})}function o(t){return Object(i["b"])({url:"/shop/view/open_auto_trans",method:"post",data:t})}function d(t){return Object(i["b"])({url:"/trans_task/add_shop_job",method:"post",data:t})}function u(t){return Object(i["b"])({url:"/shop/getinfo",method:"post",data:t})}function l(t){return Object(i["b"])({url:"/mall_config/save",method:"post",data:t})}function f(t){return Object(i["b"])({url:"/lang/get",method:"post",data:t})}function m(t){return Object(i["b"])({url:"/mall_config/get",method:"post",data:t})}},dcb0:function(t,e,a){"use strict";a.d(e,"d",(function(){return c})),a.d(e,"a",(function(){return s})),a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"g",(function(){return d})),a.d(e,"e",(function(){return u})),a.d(e,"f",(function(){return l}));var i=a("b775"),n={catlist:"/cat/list",catadd:"/cat/add",catInfo:"/cat/info",catDelete:"/cat/delete",publicCatList:"/standard/cat",infoList:"/good/info/list",parentList:"/cat/parent/list",cartSubAdd:"/cat/sub/add"};function c(t){return Object(i["b"])({url:n.catlist,method:"post",params:t})}function s(t){var e=t.view_id?n.cartSubAdd:n.catadd;return Object(i["b"])({url:e,method:"post",params:t}).then((function(){return{result:"ok",cat_id:12}}))}function r(t){return Object(i["b"])({url:n.catInfo,method:"post",params:t})}function o(t){return Object(i["b"])({url:n.catDelete,method:"post",params:t})}function d(t){return Object(i["b"])({url:n.publicCatList,method:"post",params:t})}function u(t){return Object(i["b"])({url:n.infoList,method:"post",params:t})}function l(t){return Object(i["b"])({url:n.parentList,method:"post",params:t})}},e9bb:function(t,e,a){}}]);