zx/public/static/js/pages-product-addGoods-spec...

1 line
24 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-specificationProperties"],{"0558":function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.container[data-v-e90c5f94]{padding-top:%?20?%;padding-bottom:%?130?%}.content_input[data-v-e90c5f94]{padding:%?32?% %?30?%;box-sizing:border-box;margin:auto;width:%?710?%;height:%?106?%;background:#fff;border-radius:10px;display:flex;justify-content:space-between;align-items:center}.content_input > uni-view[data-v-e90c5f94]:nth-child(1){font-size:%?30?%;color:#333}.content_input > uni-view[data-v-e90c5f94]:nth-child(2){text-align:right}.content_add[data-v-e90c5f94]{margin:auto;margin-top:%?30?%;width:%?710?%;height:%?106?%;background:#fff;border-radius:10px;display:flex;align-items:center;justify-content:center}.content_add .iconfont[data-v-e90c5f94]{font-size:%?35?%;margin-right:%?10?%;color:#e93323}.content_add span[data-v-e90c5f94]{color:#e93323;font-size:%?30?%}.content_message[data-v-e90c5f94]{background:#fff;padding:%?32?% %?20?% %?30?% %?20?%;width:%?710?%;margin:auto;margin-top:%?30?%;border-radius:%?10?%}.content_message_title[data-v-e90c5f94]{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee;padding-bottom:%?32?%}.content_message_title > uni-view[data-v-e90c5f94]:nth-child(1){padding-left:%?10?%}.content_message_title > uni-view[data-v-e90c5f94]:nth-child(2){padding-right:%?10?%}.content_message_title .title[data-v-e90c5f94]{max-width:%?460?%}.content_message_content[data-v-e90c5f94]{padding-top:%?30?%}.content_message .btn[data-v-e90c5f94]{font-size:%?26?%;margin:0 %?20?%;position:relative}.content_message .btn_del[data-v-e90c5f94]{color:#999}.content_message .btn_del[data-v-e90c5f94]:after{content:"";display:inline-block;width:%?1?%;height:%?18?%;background-color:#bbb;position:absolute;top:%?11?%;right:%?-20?%}.content_message .btn_edit[data-v-e90c5f94]{margin-right:%?10?%;color:#e93323}.handle[data-v-e90c5f94]{position:fixed;left:0;bottom:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle_button[data-v-e90c5f94]{width:%?690?%;height:%?86?%;background:#e93323;border-radius:%?43?%;font-size:%?32?%;color:#fff;display:flex;align-items:center;justify-content:center}.placeholderClass[data-v-e90c5f94]{color:#bbb;font-size:%?30?%}',""]),t.exports=e},"112b":function(t,e,n){"use strict";var a=n("fbd3"),i=n.n(a);i.a},"12ea":function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.attrList=function(t,e){return i.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.categoryBrandlist=function(t){return i.default.get("server/".concat(t,"/category/brandlist"),{},{login:!0})},e.categoryList=function(t){return i.default.get("server/".concat(t,"/category/list"),{},{login:!0})},e.categorySelect=function(t){return i.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.getDeliveryType=function(t){return i.default.get("server/".concat(t,"/product/config"),{},{login:!0})},e.merClassifyAdd=function(t,e){return i.default.post("server/".concat(t,"/category/create"),e,{login:!0})},e.merClassifyDetail=function(t,e){return i.default.get("server/".concat(t,"/category/detail/").concat(e),{},{login:!0})},e.merClassifyLst=function(t){return i.default.get("server/".concat(t,"/category/select"),{},{login:!0})},e.merClassifyUpdate=function(t,e,n){return i.default.post("server/".concat(t,"/category/update/").concat(e),n,{login:!0})},e.productCreate=function(t,e){return i.default.post("server/".concat(t,"/product/create"),e,{login:!0})},e.productDeleteApi=function(t,e){return i.default.post("server/".concat(t,"/product/delete/").concat(e),{},{login:!0})},e.productDestory=function(t,e,n){return i.default.post("server/".concat(t,"/product/destory/").concat(e),n,{login:!0})},e.productDetail=function(t,e){return i.default.get("server/".concat(t,"/product/detail/").concat(e),{},{login:!0})},e.productLstApi=function(t,e){return i.default.get("server/".concat(t,"/product/lst"),e,{login:!0})},e.productOffApi=function(t,e,n){return i.default.post("server/".concat(t,"/product/status/").concat(e),n,{login:!0})},e.productRecommendApi=function(t,e,n){return i.default.post("server/".concat(t,"/product/good/").concat(e),n,{login:!0})},e.productRestore=function(t,e){return i.default.post("server/".concat(t,"/product/restore/").concat(e),{},{login:!0})},e.productTitle=function(t,e){return i.default.get("server/".concat(t,"/product/title"),e,{login:!0})},e.productUpdate=function(t,e,n){return i.default.post("server/".concat(t,"/product/update/").concat(e),n,{login:!0})},e.specificationAdd=function(t,e){return i.default.post("server/".concat(t,"/attr/create"),e,{login:!0})},e.specificationDel=function(t,e){return i.default.post("server/".concat(t,"/attr/delete"),e,{login:!0})},e.specificationDetail=function(t,e){return i.default.get("server/".concat(t,"/attr/detail/").concat(e),{},{login:!0})},e.specificationLst=function(t,e){return i.default.get("server/".concat(t,"/attr/lst"),e,{login:!0})},e.specificationUpdate=function(t,e,n){return i.default.post("server/".concat(t,"/attr/update/").concat(e),n,{login:!0})},e.storeClassifyDel=function(t,e){return i.default.post("server/".concat(t,"/category/delete/").concat(e),{},{login:!0})},e.storeClassifyLst=function(t){return i.default.get("server/".concat(t,"/category/lst"),{},{login:!0})},e.templateCreate=function(t,e){return i.default.post("server/".concat(t,"/template/create"),e,{login:!0})},e.templateDelete=function(t,e){return i.default.post("server/".concat(t,"/template/delete"),e,{login:!0})},e.templateDetail=function(t,e){return i.default.get("server/".concat(t,"/template/detail/").concat(e),{},{login:!0})},e.templateList=function(t,e){return i.default.get("server/".concat(t,"/template/lst"),e,{login:!0})},e.templateUpdate=function(t,e,n){return i.default.post("server/".concat(t,"/template/update/").concat(e),n,{login:!0})},n("c223");var i=a(n("fea3"))},"1e5b8":function(t,e,n){"use strict";var a=n("3f5a"),i=n.n(a);i.a},"239d":function(t,e,n){"use strict";n.r(e);var a=n("a5c7"),i=n("3b9d");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("1e5b8");var c=n("828b"),r=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"e90c5f94",null,!1,a["a"],void 0);e["default"]=r.exports},"277b":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("5c47"),n("dfcf"),n("bf0f"),n("2797"),n("dd2b");var a={props:{specData:{type:Object,default:function(){return{showpopup:!1,name:"",detail:""}}}},data:function(){return{specification:[],name:this.names,detail:this.details,loading:!1}},watch:{},onLoad:function(t){},onShow:function(){},methods:{close:function(){this.$emit("changeClose")},resetData:function(){this.$set(this.specData,"name",""),this.$set(this.specData,"detail","")},save:function(){if(!this.specData.name)return this.$util.Tips({title:"请输入规格名称"});if(!this.specData.detail)return this.$util.Tips({title:"请输入规格属性"});var t=this.specData.detail.split(/[(\r\n)\r\n]+/);this.loading=!0,t.forEach((function(e,n){e||t.splice(n,1)})),this.$emit("getData",{value:this.specData.name,detail:t}),this.loading=!1}}};e.default=a},"3b9d":function(t,e,n){"use strict";n.r(e);var a=n("c9c7"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"3f5a":function(t,e,n){var a=n("0558");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("5ef4abe7",a,!0,{sourceMap:!1,shadowMode:!1})},"6c24":function(t,e,n){"use strict";n.r(e);var a=n("f4c3"),i=n("7dad");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("112b");var c=n("828b"),r=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"490cfcb3",null,!1,a["a"],void 0);e["default"]=r.exports},"7dad":function(t,e,n){"use strict";n.r(e);var a=n("277b"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},a1a4:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.pouponCount[data-v-490cfcb3]{padding-top:%?60?%;padding-bottom:%?130?%;position:fixed;bottom:0;width:100%;left:0;background-color:#fff;z-index:77;border-radius:%?16?% %?16?% 0 0;padding-bottom:%?20?%;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9)}.pouponCount.on[data-v-490cfcb3]{-webkit-transform:translateZ(0);transform:translateZ(0)}.pouponCount .icon-guanbi[data-v-490cfcb3]{position:absolute;right:%?30?%;color:#8a8a8a;font-size:%?35?%;top:%?20?%}.container_content[data-v-490cfcb3]{width:%?710?%;background:#fff;margin:0 auto %?90?%}.container_content .specifications[data-v-490cfcb3]{padding:%?32?% %?20?% %?30?% %?20?%}.container_content .specifications uni-textarea[data-v-490cfcb3]{height:%?122?%}.container_content .specifications > uni-view[data-v-490cfcb3]{text-align:right;color:#666;font-size:%?24?%;border-bottom:1px solid #eee;padding-bottom:%?19?%}.container_content .specification_properties_title[data-v-490cfcb3]{padding:%?0?% %?19?% %?20?% %?19?%}.container_content .specification_properties_textarea[data-v-490cfcb3]{height:%?180?%;padding:0 %?19?% %?20?% %?19?%}.container_content .specification_properties_textarea uni-textarea[data-v-490cfcb3]{width:100%;height:100%;background:#f5f5f5;padding:%?21?% %?35?% 0 %?20?%}.container_content .specification_properties .tip[data-v-490cfcb3]{color:#e93323;font-size:%?22?%;display:flex;align-items:center;padding:%?10?% %?40?% %?40?% %?40?%}.container_content .specification_properties .tip > span[data-v-490cfcb3]:nth-child(1){margin-right:%?10?%}.handle[data-v-490cfcb3]{position:fixed;bottom:0;left:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle_button[data-v-490cfcb3]{display:flex;align-items:center;justify-content:center;color:#fff;font-size:%?32?%;width:%?690?%;height:%?86?%;background:#e93323;border-radius:%?43?%}.textPlaceHolder[data-v-490cfcb3]{font-size:%?30?%;color:#bbb}.propertiesPlaceholder[data-v-490cfcb3]{color:#bbb;font-size:%?28?%}',""]),t.exports=e},a5c7:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"container"},[n("v-uni-view",{staticClass:"content_input"},[n("v-uni-view",[t._v("规格名称")]),n("v-uni-view",[n("v-uni-input",{attrs:{type:"text",placeholder:"填写规格名称","placeholder-class":"placeholderClass"},model:{value:t.formData.template_name,callback:function(e){t.$set(t.formData,"template_name",e)},expression:"formData.template_name"}})],1)],1),n("v-uni-view",{staticClass:"content_add",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.addSingleSpecification.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"iconfont icon-tianjia1"}),n("span",[t._v("添加规格属性")])],1),t.formData.template_value.length>0?n("v-uni-view",t._l(t.formData.template_value,(function(e,a){return n("v-uni-view",{key:a,staticClass:"content_message"},[n("v-uni-view",{staticClass:"content_message_title"},[n("v-uni-view",{staticClass:"title line1"},[t._v(t._s(e.value))]),n("v-uni-view",[n("span",{staticClass:"btn btn_del",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.formData.template_value.splice(a,1)}}},[t._v("删除")]),n("span",{staticClass:"btn btn_edit",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.editAttr(e,a)}}},[t._v("编辑")])])],1),n("v-uni-view",{staticClass:"content_message_content"},t._l(e.detail,(function(e,a){return n("v-uni-view",{key:a},[t._v(t._s(e))])})),1)],1)})),1):t._e(),n("v-uni-view",{staticClass:"handle"},[n("v-uni-view",{staticClass:"handle_button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[t._v("保存")])],1),n("specification-attr",{ref:"increaseSpec",attrs:{specData:t.specData},on:{changeClose:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)},getData:function(e){arguments[0]=e=t.$handleEvent(e),t.getAttr.apply(void 0,arguments)}}})],1)},i=[]},c25d:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionSheet=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#000000";return new Promise((function(n,a){uni.showActionSheet({itemList:t,itemColor:e,success:function(t){n(t.tapIndex)},fail:function(t){a(t.errMsg)}})}))},e.Authorize=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scope.userInfo";return new Promise((function(e,n){uni.authorize({scope:t,success:function(t){e(t)},fail:function(t){n(t)}})}))},e.GetUserInfo=function(){return new Promise((function(t,e){uni.getUserInfo({success:function(e){t(e)},fail:function(t){e(t)}})}))},e.Loading=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"正在加载...",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};uni.showLoading((0,o.default)({title:t,mask:!0},e))},e.Modal=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"提示",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"这是一个模态弹窗!";return new Promise((function(n,a){uni.showModal({title:t,content:e,success:function(t){t.confirm&&n(),t.cancel&&a()}})}))},e.ScrollTo=function(t){uni.pageScrollTo({scrollTop:t,duration:300})},e.Toast=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:800,i=(0,o.default)({title:t,duration:a,position:"center",mask:!0,icon:e||"none"},n);uni.showToast(i)},e.chooseImage=function(t){return new Promise((function(e,n){uni.chooseImage({count:t,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(t){e(t)},fail:function(t){n(t)}})}))},e.clearStorage=function(){try{uni.clearStorageSync()}catch(t){throw new Error("处理失败")}},e.convertObj=c,e.formatDate=r,e.getQuarterStartDate=function(){var t=new Date(l,function(){var t=0;u<3&&(t=0);2<u&&u<6&&(t=3);5<u&&u<9&&(t=6);u>8&&(t=9);return t}(),1);return r(t,"yyyy-MM-dd")},e.getStorage=function(t){var e=uni.getStorageSync(t);try{"number"!=typeof JSON.parse(e)&&(e=JSON.parse(e))}catch(n){}return e},e.hideLoading=function(){try{uni.hideLoading()}catch(t){throw new Error("处理失败")}},e.navigateBack=function(t){uni.navigateBack({delta:t})},e.navigateTo=function(t,e,n){var a=e,i="navigateTo";switch(a=n?a+"?"+c(n):a,t){case 1:i="navigateTo";break;case 2:i="redirectTo";break;case 3:i="reLaunch";break;case 4:i="switchTab";break;default:i="navigateTo";break}uni[i]({url:a,animationType:"slide-in-right",animationDuration:200})},e.pathToBase64=function(t){return new Promise((function(e,n){if("object"===("undefined"===typeof window?"undefined":(0,i.default)(window))&&"document"in window){if("function"===typeof FileReader){var a=new XMLHttpRequest;return a.open("GET",t,!0),a.responseType="blob",a.onload=function(){if(200===this.status){var t=new FileReader;t.onload=function(t){e(t.target.result)},t.onerror=n,t.readAsDataURL(this.response)}},a.onerror=n,void a.send()}var o=document.createElement("canvas"),c=o.getContext("2d"),r=new Image;return r.onload=function(){o.width=r.width,o.height=r.height,c.drawImage(r,0,0),e(o.toDataURL()),o.height=o.width=0},r.onerror=n,void(r.src=t)}"object"!==("undefined"===typeof plus?"undefined":(0,i.default)(plus))?"object"===("undefined"===typeof wx?"undefined":(0,i.default)(wx))&&wx.canIUse("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:t,encoding:"base64",success:function(t){e("data:image/png;base64,"+t.data)},fail:function(t){n(t)}}):n(new Error("not support")):plus.io.resolveLocalFileSystemURL(getLocalFilePath(t),(function(t){t.file((function(t){var a=new plus.io.FileReader;a.onload=function(t){e(t.target.result)},a.onerror=function(t){n(t)},a.readAsDataURL(t)}),(function(t){n(t)}))}),(function(t){n(t)}))}))},e.removeStorage=function(t){t&&uni.removeStorageSync(t)},e.serialize=function(t){if(null!=t&&""!=t)try{return JSON.parse(JSON.stringify(t))}catch(e){return t instanceof Array?[]:{}}return t},e.setStorage=function(t,e){if("string"==typeof e)return uni.setStorageSync(t,e),e;uni.setStorageSync(t,JSON.stringify(e))},e.showMonthFirstDay=function(){var t=(new Date).setDate(1);return r(new Date(t).getTime(),"yyyy-MM-dd")},e.showWeekFirstDay=function(){var t=new Date,e=t.getDay()||7;return t.setDate(t.getDate()-e+1),r(t,"yyyy-MM-dd")},e.throttle=function(t,e){var n,a;e=e||200;return function(){for(var i=this,o=arguments.length,c=new Array(o),r=0;r<o;r++)c[r]=arguments[r];n=c,a||(a=setTimeout((function(){a=null,t.apply(i,n)}),e))}},e.unique=function(t){t=t||[];for(var e={},n=0;n<t.length;n++){var a=JSON.stringify(t[n]);"undefined"==typeof a&&(e[a]=1)}for(var n in t.length=0,e)t[t.length]=n;return t};var i=a(n("fcf3")),o=a(n("9b1b"));function c(t){var e,n=[];return Object.keys(t).forEach((function(e){n.push("".concat(e,"=").concat(t[e]))})),e=n.join("&"),e}function r(t,e){return t?(e=e||"yyyy-MM-dd hh:mm:ss",new Date(t).format(e)):""}n("d4b5"),n("7a76"),n("c9b5"),n("bf0f"),n("2797"),n("dc8a"),n("aa9c"),n("c223"),n("5c47"),n("0506"),n("a1c1"),n("23f4"),n("7d2f"),n("9c4e"),n("ab80"),Date.prototype.format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,String(this.getFullYear()).substr(4-RegExp.$1.length))),e)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[n]:("00"+e[n]).substr(String(e[n]).length)));return t};var s=new Date,u=s.getMonth(),l=s.getYear();l+=l<2e3?1900:0},c9c7:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("aa9c");n("c25d");var i=a(n("6c24")),o=n("12ea"),c={components:{specificationAttr:i.default},data:function(){return{mer_id:"",template_id:"",specData:{showpopup:!1,name:"",detail:""},formData:{template_name:"",template_value:[]},index:""}},onLoad:function(t){this.mer_id=t.mer_id,this.template_id=t.template_id,this.template_id&&this.getSpecData()},methods:{addSingleSpecification:function(){this.$set(this,"index",""),this.$set(this.specData,"showpopup",!0),this.$refs.increaseSpec.resetData()},getAttr:function(t){""==this.index?this.formData.template_value.push(t):this.$set(this.formData.template_value,this.index-1,t),this.$set(this.specData,"showpopup",!1)},close:function(){this.$set(this.specData,"showpopup",!1)},getSpecData:function(){var t=this;uni.showLoading({title:"",mask:!0}),(0,o.specificationDetail)(t.mer_id,t.template_id).then((function(e){uni.hideLoading(),t.formData=e.data})).catch((function(e){return t.$util.Tips({title:e})}))},submit:function(){var t=this;return t.formData.template_name?0==t.formData.template_value.length?t.$util.Tips({title:"请添加规格属性"}):void(t.template_id?(0,o.specificationUpdate)(t.mer_id,t.template_id,t.formData).then((function(e){t.$util.Tips({title:e.message,icon:"success"}),uni.redirectTo({url:"/pages/product/addGoods/mulSpecification?mer_id=".concat(t.mer_id)})})).catch((function(e){return t.$util.Tips({title:e})})):(0,o.specificationAdd)(t.mer_id,t.formData).then((function(e){t.$util.Tips({title:e.message,icon:"success"}),uni.redirectTo({url:"/pages/product/addGoods/mulSpecification?mer_id=".concat(t.mer_id)})})).catch((function(e){return t.$util.Tips({title:e})}))):t.$util.Tips({title:"请输入规格名称"})},editAttr:function(t,e){this.index=e+1,this.$set(this.specData,"showpopup",!0),this.$set(this.specData,"name",t.value);for(var n="",a=0;a<t.detail.length;a++)n+=t.detail[a]+"\n";this.$set(this.specData,"detail",n)}}};e.default=c},f4c3:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"pouponCount",class:1==t.specData.showpopup?"on":""},[n("v-uni-button",{staticClass:"iconfont icon-guanbi",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"container_content"},[n("v-uni-view",{staticClass:"specifications"},[n("v-uni-textarea",{attrs:{maxlength:"20",placeholder:"输入规格名称,例如:尺码","placeholder-class":"textPlaceHolder"},model:{value:t.specData.name,callback:function(e){t.$set(t.specData,"name",e)},expression:"specData.name"}}),n("v-uni-view",[t.specData.name?n("v-uni-text",[t._v(t._s(t.specData.name.length))]):n("v-uni-text",[t._v("0")]),t._v("/20")],1)],1),n("v-uni-view",{staticClass:"specification_properties"},[n("v-uni-view",{staticClass:"specification_properties_title"},[t._v("规格属性")]),n("v-uni-view",{staticClass:"specification_properties_textarea"},[n("v-uni-textarea",{attrs:{placeholder:"请填写规格属性,例如:大码中码小码,使用换行符换行","placeholder-class":"propertiesPlaceholder"},model:{value:t.specData.detail,callback:function(e){t.$set(t.specData,"detail",e)},expression:"specData.detail"}})],1),n("v-uni-view",{staticClass:"tip"},[n("v-uni-text",{staticClass:"iconfont"},[t._v("")]),n("v-uni-text",[t._v("每行只能填一个规格属性,多个请换行输入")])],1)],1)],1),n("v-uni-view",{staticClass:"handle"},[n("v-uni-button",{staticClass:"handle_button",attrs:{disabled:t.loading},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.save.apply(void 0,arguments)}}},[t._v("保存")])],1)],1),n("v-uni-view",{staticClass:"mask",attrs:{catchtouchmove:"true",hidden:0==t.specData.showpopup},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.close.apply(void 0,arguments)}}})],1)},i=[]},fbd3:function(t,e,n){var a=n("a1a4");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("9f7d4d1e",a,!0,{sourceMap:!1,shadowMode:!1})}}]);