启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-00f82344.a99e98cb.js

1 lines
5.0 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00f82344"],{"07e9":function(e,t,a){"use strict";a("58a6")},"58a6":function(e,t,a){},9809:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"container"},[a("div",{staticClass:"demo-input-suffix acea-row"},[a("el-form",{ref:"formValidate",attrs:{"label-width":"120px",rules:e.ruleValidate,model:e.formValidate}},[a("el-form-item",{attrs:{label:"参数模板名称:",prop:"template_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入参数模板名称"},model:{value:e.formValidate.template_name,callback:function(t){e.$set(e.formValidate,"template_name",t)},expression:"formValidate.template_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"平台分类:",prop:"cate_ids"}},[a("el-cascader",{staticClass:"selWidth",attrs:{filterable:"",options:e.cateList,props:{multiple:!0,emitPath:!1},clearable:""},model:{value:e.formValidate.cate_ids,callback:function(t){e.$set(e.formValidate,"cate_ids",t)},expression:"formValidate.cate_ids"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{min:0,label:"排序"},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}},[a("el-table",{attrs:{data:e.data,border:"",size:"small"}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"参数名称","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small"},model:{value:t.row.name,callback:function(a){e.$set(t.row,"name",a)},expression:"scope.row.name"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"参数值","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"priceBox",attrs:{size:"small"},model:{value:t.row.value,callback:function(a){e.$set(t.row,"value",a)},expression:"scope.row.value"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"排序","min-width":"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,size:"small","controls-position":"right"},model:{value:t.row.sort,callback:function(a){e.$set(t.row,"sort",a)},expression:"scope.row.sort"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"submission",attrs:{type:"text"},on:{click:function(a){return e.delSpecs(t.$index)}}},[e._v("删除")])]}}])})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{size:"small",type:"primary",plain:""},on:{click:e.onAdd}},[e._v("添加参数")])],1)],1)],1)])]),e._v(" "),a("div",{staticClass:"footer"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("保存")])],1)],1)},r=[],i=(a("7f7f"),a("55dd"),a("ac6a"),a("c4c8")),l={name:"specsCreate",data:function(){return{listLoading:!0,ruleValidate:{template_name:[{required:!0,message:"请输入参数模板名称",trigger:"blur"}],cate_ids:[{required:!0,message:"请选择平台分类",trigger:"change"}]},data:[],cateList:[],formValidate:{cate_ids:[],sort:0}}},created:function(){this.onAdd(),this.$route.params.id&&this.getInfo(),this.getCategorySelect()},mounted:function(){},methods:{onAdd:function(){var e={name:"",value:"",sort:0,parameter_id:0};this.data.push(e)},onEdit:function(e){var t=this;this.$modalForm(levelUpdateApi(e)).then((function(){return t.getList("")}))},getInfo:function(){var e=this;Object(i["kb"])(this.$route.params.id).then((function(t){var a=[];e.$route.params.id&&"copy"!=e.$route.query.type&&t.data.cateId.forEach((function(e,t){a.push(e.category.store_category_id)})),e.formValidate={template_name:t.data.template_name,sort:t.data.sort,cate_ids:a},e.data=t.data.parameter}))},getCategorySelect:function(){var e=this;Object(i["w"])().then((function(t){e.cateList=t.data})).catch((function(t){e.$message.error(t.message)}))},delSpecs:function(e){this.data.splice(e,1)},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(e){t.formValidate.params=t.data;for(var a=0;a<t.formValidate.params.length;a++){var s=t.formValidate.params[a];if(!s.name.trim())return t.$message.error("请输入参数名称");if(!s.value.trim())return t.$message.error("请输入参数值")}t.$route.params.id&&"copy"!=t.$route.query.type?Object(i["Ab"])(t.$route.params.id,t.formValidate).then((function(e){t.$message.success(e.message),t.$router.push({path:"/admin/product/specs"})})).catch((function(e){t.$message.error(e.message)})):Object(i["jb"])(t.formValidate).then((function(e){t.$message.success(e.message),t.$router.push({path:"/admin/product/specs"})})).catch((function(e){t.$message.error(e.message)}))}}))}}},o=l,n=(a("07e9"),a("2877")),c=Object(n["a"])(o,s,r,!1,null,"4e3daf43",null);t["default"]=c.exports}}]);