You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.7 KiB
1 lines
4.7 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-005c8d76"],{"6e0d":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n("b775");function a(){return Object(r["a"])({url:"/aliyun/oss/policy",method:"get"})}},"9add":function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"g",(function(){return o})),n.d(e,"f",(function(){return i})),n.d(e,"b",(function(){return u})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return l}));var r=n("b775");function a(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/list",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/create",method:"post",data:t})}function o(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/update/showStatus",method:"post",data:t})}function i(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/update/factoryStatus",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/delete",method:"DELETE",data:t,headers:{"Content-Type":"application/json"}})}function d(t){return Object(r["a"])({url:"/mall/pms/PmsBrand/"+t,method:"get"})}function l(t,e){return Object(r["a"])({url:"/mall/pms/PmsBrand/update/"+t,method:"post",data:e})}},"9b48":function(t,e,n){"use strict";var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[e("el-card",{staticClass:"form-container",attrs:{shadow:"never"}},[e("el-form",{ref:"brandFrom",attrs:{model:t.brand,rules:t.rules,"label-width":"150px"}},[e("el-form-item",{attrs:{label:"品牌名称:",prop:"name"}},[e("el-input",{model:{value:t.brand.name,callback:function(e){t.$set(t.brand,"name",e)},expression:"brand.name"}})],1),e("el-form-item",{attrs:{label:"品牌首字母:"}},[e("el-input",{model:{value:t.brand.firstLetter,callback:function(e){t.$set(t.brand,"firstLetter",e)},expression:"brand.firstLetter"}})],1),e("el-form-item",{attrs:{label:"品牌LOGO:",prop:"logo"}},[e("single-upload",{model:{value:t.brand.logo,callback:function(e){t.$set(t.brand,"logo",e)},expression:"brand.logo"}})],1),e("el-form-item",{attrs:{label:"品牌故事:"}},[e("el-input",{attrs:{placeholder:"请输入内容",type:"textarea",autosize:!0},model:{value:t.brand.brandStory,callback:function(e){t.$set(t.brand,"brandStory",e)},expression:"brand.brandStory"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("brandFrom")}}},[t._v("提交")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onClose("brandFrom")}}},[t._v("关闭")]),t.isEdit?t._e():e("el-button",{on:{click:function(e){return t.resetForm("brandFrom")}}},[t._v("重置")])],1)],1)],1)],1)},a=[],s=n("9add"),o=n("0f39"),i={bigPic:"",brandStory:"",factoryStatus:0,firstLetter:"",logo:"",name:"",showStatus:0,sort:0,qssl:0,dgxy:"",sid:"",orgPath:window.sessionStorage.getItem("orgSidPath"),useOrgSid:window.sessionStorage.getItem("defaultDeptSid"),userSid:window.sessionStorage.getItem("userSid"),createOrgSid:window.sessionStorage.getItem("orgSid")},u={name:"BrandDetail",components:{SingleUpload:o["a"]},props:{isEdit:{type:Boolean,default:!1}},data:function(){return{brand:Object.assign({},i),rules:{name:[{required:!0,message:"请输入品牌名称",trigger:"blur"},{min:2,max:140,message:"长度在 2 到 140 个字符",trigger:"blur"}],sort:[{type:"number",message:"排序必须为数字"}]}}},created:function(){},activated:function(){var t=this;Object(s["d"])(this.$route.query.sid).then((function(e){t.brand=e.data}))},methods:{onSubmit:function(t){var e=this;this.$refs[t].validate((function(n){if(!n)return e.$message({message:"验证失败",type:"error",duration:1e3}),!1;e.$confirm("是否提交数据","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.isEdit?Object(s["e"])(e.$route.query.sid,e.brand).then((function(n){n.success&&(e.$refs[t].resetFields(),e.$message({message:"修改成功",type:"success",duration:1e3}),e.$store.dispatch("tagsView/delView",e.$route),e.$router.go(-1))})):Object(s["a"])(e.brand).then((function(t){t.success&&(e.brand=Object.assign({},i),e.$message({message:"提交成功",type:"success",duration:1e3}),e.$store.dispatch("tagsView/delView",e.$route),e.$router.go(-1))}))}))}))},resetForm:function(t){this.$refs[t].resetFields(),this.brand=Object.assign({},i)},onClose:function(){this.$store.dispatch("tagsView/delView",this.$route),this.$router.go(-1)}}},d=u,l=n("2877"),c=Object(l["a"])(d,r,a,!1,null,null,null);e["a"]=c.exports},b37a:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("brand-detail",{attrs:{"is-edit":!1}})},a=[],s=n("9b48"),o={name:"AddBrand",components:{BrandDetail:s["a"]}},i=o,u=n("2877"),d=Object(u["a"])(i,r,a,!1,null,null,null);e["default"]=d.exports}}]);
|