(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-specificationProperties"],{"0c29":function(t,e,n){"use strict";n.r(e);var a=n("0c78"),i=n("7b7a");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("0dea");var c=n("f0c5"),r=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"2ce5583c",null,!1,a["a"],void 0);e["default"]=r.exports},"0c78":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=[]},"0c81":function(t,e,n){"use strict";n.r(e);var a=n("d15c"),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},"0dea":function(t,e,n){"use strict";var a=n("60df"),i=n.n(a);i.a},"307c":function(t,e,n){var a=n("5083");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("4f06").default;i("a58b696e",a,!0,{sourceMap:!1,shadowMode:!1})},3300:function(t,e,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("14d9");n("a5eb");var i=a(n("4a99")),o=n("fdb9"),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 uni-view[data-v-7b9a9616]{text-align:right;color:#666;font-size:%?24?%;border-bottom:1px solid #eee;padding-bottom:%?19?%}.container_content .specification_properties_title[data-v-7b9a9616]{padding:%?0?% %?19?% %?20?% %?19?%}.container_content .specification_properties_textarea[data-v-7b9a9616]{height:%?180?%;padding:0 %?19?% %?20?% %?19?%}.container_content .specification_properties_textarea uni-textarea[data-v-7b9a9616]{width:100%;height:100%;background:#f5f5f5;padding:%?21?% %?35?% 0 %?20?%}.container_content .specification_properties .tip[data-v-7b9a9616]{color:#e93323;font-size:%?22?%;display:flex;align-items:center;padding:%?10?% %?40?% %?40?% %?40?%}.container_content .specification_properties .tip > span[data-v-7b9a9616]:nth-child(1){margin-right:%?10?%}.handle[data-v-7b9a9616]{position:fixed;bottom:0;left:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle_button[data-v-7b9a9616]{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-7b9a9616]{font-size:%?30?%;color:#bbb}.propertiesPlaceholder[data-v-7b9a9616]{color:#bbb;font-size:%?28?%}',""]),t.exports=e},"60df":function(t,e,n){var a=n("6ed7");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("4f06").default;i("3f762c8d",a,!0,{sourceMap:!1,shadowMode:!1})},"6a0f":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=[]},"6ed7":function(t,e,n){var a=n("24fb");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-2ce5583c]{padding-top:%?20?%;padding-bottom:%?130?%}.content_input[data-v-2ce5583c]{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-2ce5583c]:nth-child(1){font-size:%?30?%;color:#333}.content_input > uni-view[data-v-2ce5583c]:nth-child(2){text-align:right}.content_add[data-v-2ce5583c]{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-2ce5583c]{font-size:%?35?%;margin-right:%?10?%;color:#e93323}.content_add span[data-v-2ce5583c]{color:#e93323;font-size:%?30?%}.content_message[data-v-2ce5583c]{background:#fff;padding:%?32?% %?20?% %?30?% %?20?%;width:%?710?%;margin:auto;margin-top:%?30?%;border-radius:%?10?%}.content_message_title[data-v-2ce5583c]{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee;padding-bottom:%?32?%}.content_message_title > uni-view[data-v-2ce5583c]:nth-child(1){padding-left:%?10?%}.content_message_title > uni-view[data-v-2ce5583c]:nth-child(2){padding-right:%?10?%}.content_message_title .title[data-v-2ce5583c]{max-width:%?460?%}.content_message_content[data-v-2ce5583c]{padding-top:%?30?%}.content_message .btn[data-v-2ce5583c]{font-size:%?26?%;margin:0 %?20?%;position:relative}.content_message .btn_del[data-v-2ce5583c]{color:#999}.content_message .btn_del[data-v-2ce5583c]:after{content:"";display:inline-block;width:%?1?%;height:%?18?%;background-color:#bbb;position:absolute;top:%?11?%;right:%?-20?%}.content_message .btn_edit[data-v-2ce5583c]{margin-right:%?10?%;color:#e93323}.handle[data-v-2ce5583c]{position:fixed;left:0;bottom:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle_button[data-v-2ce5583c]{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-2ce5583c]{color:#bbb;font-size:%?30?%}',""]),t.exports=e},"7b7a":function(t,e,n){"use strict";n.r(e);var a=n("3300"),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},a5eb:function(t,e,n){"use strict";n("7a82");var a=n("4ea4").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);28&&(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