1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-singleSpecification"],{"0b1c":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"container"},[n("select-form",{attrs:{platformClassification:e.formList,form:e.singleSpecification},on:{input:function(t){arguments[0]=t=e.$handleEvent(t),e.input.apply(void 0,arguments)}}}),e.moreThanFlag?n("v-uni-view",{staticClass:"more_than",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.selectMoreThan.apply(void 0,arguments)}}},[n("v-uni-view",[e._v("更多")])],1):e._e(),n("v-uni-view",{staticClass:"handle"},[n("v-uni-view",{staticClass:"button",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.saveSingleSpecification.apply(void 0,arguments)}}},[e._v("保存")])],1)],1)},a=[]},3108:function(e,t,n){"use strict";n.r(t);var i=n("b5437"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},7031:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("bf0f"),n("2797"),n("dc8a"),n("c223"),n("dd2b");var a=i(n("eea6")),o=n("c25d"),c={components:{selectForm:a.default},data:function(){return{singleSpecification:{price:"",cost:"",ot_price:"",stock:"",bar_code:"",weight:"",volume:"",image:"",extension_one:"",extension_two:""},moreThanFlag:!0,formList:[{id:1,label:"售价",type:"input",model:"price",holder:"请填写售价"},{id:2,label:"成本价",type:"input",holder:"请填写成本价",model:"cost"},{id:3,label:"原价",type:"input",holder:"请填写原价",model:"ot_price"},{id:4,label:"库存",type:"input",holder:"请填写库存",model:"stock"}],moreThanList:[{id:5,label:"商品编号",type:"input",holder:"请填写商品编号",model:"bar_code"},{id:6,label:"重量",type:"input",holder:"请输入重量",model:"weight"},{id:7,label:"体积",type:"input",holder:"请输入体积",model:"volume"},{id:8,label:"佣金(一级)",type:"input",holder:"请输入一级佣金",model:"extension_one"},{id:8,label:"佣金(二级)",type:"input",holder:"请输入二级佣金",model:"extension_two"}]}},watch:{singleSpecification:{handler:function(e){this.singleSpecification=e},deep:!0}},onShow:function(){var e=this;(0,o.getStorage)("addGoodsFormData").image&&(this.singleSpecification.image=(0,o.getStorage)("addGoodsFormData").image),(0,o.getStorage)("singleSpecification")&&Object.keys(this.singleSpecification).forEach((function(t){(0,o.getStorage)("singleSpecification")[t]&&(e.singleSpecification[t]=(0,o.getStorage)("singleSpecification")[t])}))},methods:{selectMoreThan:function(){this.formList=this.formList.concat(this.moreThanList),this.moreThanFlag=!1},spliceMoreThan:function(){this.moreThanFlag=!0,this.formList.splice(3,4)},input:function(e){this.singleSpecification=e},saveSingleSpecification:function(){(0,o.setStorage)("singleSpecification",this.singleSpecification),(0,o.navigateBack)(1)}}};t.default=c},"806d":function(e,t,n){var i=n("fa82");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("967d").default;a("0bf659b8",i,!0,{sourceMap:!1,shadowMode:!1})},"9b43":function(e,t,n){var i=n("e49d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("967d").default;a("7b9f75b8",i,!0,{sourceMap:!1,shadowMode:!1})},a267:function(e,t,n){"use strict";n.r(t);var i=n("0b1c"),a=n("b9bc");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("ac4b");var c=n("828b"),r=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"7f962c14",null,!1,i["a"],void 0);t["default"]=r.exports},ac4b:function(e,t,n){"use strict";var i=n("9b43"),a=n.n(i);a.a},b5437:function(e,t,n){"use strict";n("6a54"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("bf0f"),n("2797");var i={props:{platformClassification:{type:Array,default:function(){return[]}},form:{type:Object,default:function(){return{}}}},data:function(){return{value:"",formData:this.form}},watch:{formData:{handler:function(e){this.$emit("input",e)},deep:!0},form:{handler:function(e){this.formData=e},deep:!0}},created:function(){var e=this;this.platformClassification.forEach((function(t){t.inforValue&&e.$emit("formInitData",t.inforValue,t.model)}))},methods:{selectItem:function(e){e.jumpLogic?this.$emit("handleJumpLogic",e):this.$emit("handleSelectItem",e)},radioChange:function(e,t){this.$emit("radioChange",e.detail.value,t)},switchChange:function(e,t){this.$emit("switchChange",e.detail.value,t)},selectRadio:function(e){e.select=!e.select},checkChange:function(e,t){this.$emit("checkChange",e.detail.value,t)}}};t.default=i},b9bc:function(e,t,n){"use strict";n.r(t);var i=n("7031"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);t["default"]=a.a},baa4:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"container_input"},e._l(e.platformClassification,(function(t,i){return t.DoNotShow?e._e():n("v-uni-view",{key:i,staticClass:"container_input_item",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.selectItem(t)}}},["select"==t.type||"input"==t.type||"switch"==t.type?n("v-uni-view",{staticClass:"select_and_input"},[n("v-uni-view",{staticClass:"container_input_item_label"},[-1!=Object.keys(t).indexOf("select")?n("v-uni-text",{staticClass:"select_check",class:{select:t.select},on:{click:function(n){n.stopPropagation(),arguments[0]=n=e.$handleEvent(n),e.selectRadio(t)}}},[t.select?n("v-uni-text",{staticClass:"iconfont"},[e._v("")]):e._e()],1):e._e(),n("v-uni-text",{staticClass:"select_label line1"},[e._v(e._s(t.label))])],1),"select"==t.type?n("v-uni-view",{staticClass:"container_input_item_value greyColor"},[t.value?n("v-uni-text",{staticClass:"text"},[e._v(e._s(t.value))]):n("v-uni-text",[e._v(e._s(t.holder))]),n("v-uni-text",{staticClass:"iconfont"},[e._v("")])],1):e._e(),"input"==t.type?n("v-uni-view",{staticClass:"container_input_item_value"},[n("v-uni-input",{attrs:{type:"text",value:"",placeholder:t.holder,"placeholder-class":"inputPlaceHolder"},model:{value:e.formData[t.model],callback:function(n){e.$set(e.formData,t.model,n)},expression:"formData[item.model]"}})],1):e._e(),"switch"==t.type?n("v-uni-view",{staticClass:"container_input_item_value"},[n("v-uni-switch",{staticStyle:{transform:"scale(0.8)"},attrs:{checked:1==e.formData[t.model],color:"#E93323"},on:{change:function(n){arguments[0]=n=e.$handleEvent(n),e.switchChange(n,t)}}})],1):e._e()],1):e._e(),"radio"==t.type||"check"==t.type?n("v-uni-view",{staticClass:"radio"},[n("v-uni-view",{staticClass:"container_input_item_label"},[e._v(e._s(t.label))]),"radio"==t.type?n("v-uni-view",{staticClass:"container_input_item_value flex_start"},[n("v-uni-radio-group",{staticClass:"select_group",on:{change:function(n){arguments[0]=n=e.$handleEvent(n),e.radioChange(n,t)}}},e._l(t.radioList,(function(i,a){return n("v-uni-label",{key:i.value,staticClass:"container_input_item_value_select"},[n("v-uni-view",[n("v-uni-radio",{attrs:{value:i.value,checked:i.value==t.inforValue}})],1),n("v-uni-view",[e._v(e._s(i.name))])],1)})),1)],1):e._e(),"check"==t.type?n("v-uni-view",{staticClass:"container_input_item_value flex_start"},[n("v-uni-checkbox-group",{staticClass:"select_group",on:{change:function(n){arguments[0]=n=e.$handleEvent(n),e.checkChange(n,t)}}},e._l(t.checkList,(function(i,a){return n("v-uni-label",{key:i.value,staticClass:"container_input_item_value_select"},[n("v-uni-view",[n("v-uni-checkbox",{staticClass:"chenk_list",attrs:{value:i.value,checked:i.value==t.inforValue}})],1),n("v-uni-view",[e._v(e._s(i.name))])],1)})),1)],1):e._e()],1):e._e()],1)})),1)},a=[]},c25d:function(e,t,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionSheet=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#000000";return new Promise((function(n,i){uni.showActionSheet({itemList:e,itemColor:t,success:function(e){n(e.tapIndex)},fail:function(e){i(e.errMsg)}})}))},t.Authorize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scope.userInfo";return new Promise((function(t,n){uni.authorize({scope:e,success:function(e){t(e)},fail:function(e){n(e)}})}))},t.GetUserInfo=function(){return new Promise((function(e,t){uni.getUserInfo({success:function(t){e(t)},fail:function(e){t(e)}})}))},t.Loading=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"正在加载...",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};uni.showLoading((0,o.default)({title:e,mask:!0},t))},t.Modal=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"提示",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"这是一个模态弹窗!";return new Promise((function(n,i){uni.showModal({title:e,content:t,success:function(e){e.confirm&&n(),e.cancel&&i()}})}))},t.ScrollTo=function(e){uni.pageScrollTo({scrollTop:e,duration:300})},t.Toast=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:800,a=(0,o.default)({title:e,duration:i,position:"center",mask:!0,icon:t||"none"},n);uni.showToast(a)},t.chooseImage=function(e){return new Promise((function(t,n){uni.chooseImage({count:e,sizeType:["original","compressed"],sourceType:["album","camera"],success:function(e){t(e)},fail:function(e){n(e)}})}))},t.clearStorage=function(){try{uni.clearStorageSync()}catch(e){throw new Error("处理失败")}},t.convertObj=c,t.formatDate=r,t.getQuarterStartDate=function(){var e=new Date(u,function(){var e=0;l<3&&(e=0);2<l&&l<6&&(e=3);5<l&&l<9&&(e=6);l>8&&(e=9);return e}(),1);return r(e,"yyyy-MM-dd")},t.getStorage=function(e){var t=uni.getStorageSync(e);try{"number"!=typeof JSON.parse(t)&&(t=JSON.parse(t))}catch(n){}return t},t.hideLoading=function(){try{uni.hideLoading()}catch(e){throw new Error("处理失败")}},t.navigateBack=function(e){uni.navigateBack({delta:e})},t.navigateTo=function(e,t,n){var i=t,a="navigateTo";switch(i=n?i+"?"+c(n):i,e){case 1:a="navigateTo";break;case 2:a="redirectTo";break;case 3:a="reLaunch";break;case 4:a="switchTab";break;default:a="navigateTo";break}uni[a]({url:i,animationType:"slide-in-right",animationDuration:200})},t.pathToBase64=function(e){return new Promise((function(t,n){if("object"===("undefined"===typeof window?"undefined":(0,a.default)(window))&&"document"in window){if("function"===typeof FileReader){var i=new XMLHttpRequest;return i.open("GET",e,!0),i.responseType="blob",i.onload=function(){if(200===this.status){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=n,e.readAsDataURL(this.response)}},i.onerror=n,void i.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),t(o.toDataURL()),o.height=o.width=0},r.onerror=n,void(r.src=e)}"object"!==("undefined"===typeof plus?"undefined":(0,a.default)(plus))?"object"===("undefined"===typeof wx?"undefined":(0,a.default)(wx))&&wx.canIUse("getFileSystemManager")?wx.getFileSystemManager().readFile({filePath:e,encoding:"base64",success:function(e){t("data:image/png;base64,"+e.data)},fail:function(e){n(e)}}):n(new Error("not support")):plus.io.resolveLocalFileSystemURL(getLocalFilePath(e),(function(e){e.file((function(e){var i=new plus.io.FileReader;i.onload=function(e){t(e.target.result)},i.onerror=function(e){n(e)},i.readAsDataURL(e)}),(function(e){n(e)}))}),(function(e){n(e)}))}))},t.removeStorage=function(e){e&&uni.removeStorageSync(e)},t.serialize=function(e){if(null!=e&&""!=e)try{return JSON.parse(JSON.stringify(e))}catch(t){return e instanceof Array?[]:{}}return e},t.setStorage=function(e,t){if("string"==typeof t)return uni.setStorageSync(e,t),t;uni.setStorageSync(e,JSON.stringify(t))},t.showMonthFirstDay=function(){var e=(new Date).setDate(1);return r(new Date(e).getTime(),"yyyy-MM-dd")},t.showWeekFirstDay=function(){var e=new Date,t=e.getDay()||7;return e.setDate(e.getDate()-t+1),r(e,"yyyy-MM-dd")},t.throttle=function(e,t){var n,i;t=t||200;return function(){for(var a=this,o=arguments.length,c=new Array(o),r=0;r<o;r++)c[r]=arguments[r];n=c,i||(i=setTimeout((function(){i=null,e.apply(a,n)}),t))}},t.unique=function(e){e=e||[];for(var t={},n=0;n<e.length;n++){var i=JSON.stringify(e[n]);"undefined"==typeof i&&(t[i]=1)}for(var n in e.length=0,t)e[e.length]=n;return e};var a=i(n("fcf3")),o=i(n("9b1b"));function c(e){var t,n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,"=").concat(e[t]))})),t=n.join("&"),t}function r(e,t){return e?(t=t||"yyyy-MM-dd hh:mm:ss",new Date(e).format(t)):""}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(e){var t={"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(e)&&(e=e.replace(RegExp.$1,String(this.getFullYear()).substr(4-RegExp.$1.length))),t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr(String(t[n]).length)));return e};var s=new Date,l=s.getMonth(),u=s.getYear();u+=u<2e3?1900:0},d67a:function(e,t,n){"use strict";var i=n("806d"),a=n.n(i);a.a},e49d:function(e,t,n){var i=n("c86c");t=i(!1),t.push([e.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-7f962c14]{padding-bottom:%?126?%}.more_than[data-v-7f962c14]{background:#fff;border-radius:10px;margin:auto;margin-top:%?15?%;display:flex;align-items:center;justify-content:center;width:%?710?%;height:%?84?%;color:#333;font-size:%?30?%}.handle[data-v-7f962c14]{position:fixed;left:0;bottom:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle .button[data-v-7f962c14]{display:flex;align-items:center;justify-content:center;color:#fff;font-size:%?32?%;width:%?690?%;height:%?86?%;background:#e93323;border-radius:%?43?%}',""]),e.exports=t},eea6:function(e,t,n){"use strict";n.r(t);var i=n("baa4"),a=n("3108");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("d67a");var c=n("828b"),r=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"4e6351e8",null,!1,i["a"],void 0);t["default"]=r.exports},fa82:function(e,t,n){var i=n("c86c");t=i(!1),t.push([e.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_input[data-v-4e6351e8]{background:#fff;padding:0 %?20?%;width:%?710?%;margin:auto;margin-top:%?31?%;border-radius:%?10?%}.container_input_item .select_and_input[data-v-4e6351e8]{height:%?106?%;display:flex;align-items:center;justify-content:space-between}.container_input_item .select_and_input .greyColor[data-v-4e6351e8]{color:#bbb}.container_input_item .radio[data-v-4e6351e8]{padding:%?30?% 0}.container_input_item_label[data-v-4e6351e8]{padding-left:%?10?%;color:#333;font-size:%?30?%;display:flex;align-items:center}.container_input_item_label .select_label[data-v-4e6351e8]{max-width:%?520?%}.container_input_item_label .select_check[data-v-4e6351e8]{display:flex;align-items:center;justify-content:center;width:%?40?%;height:%?40?%;border:1px solid #ccc;border-radius:50%;margin-right:%?20?%}.container_input_item_label .select_check .iconfont[data-v-4e6351e8]{font-size:%?24?%}.container_input_item_label .select[data-v-4e6351e8]{background:#e93323;border:none}.container_input_item_label .select .iconfont[data-v-4e6351e8]{color:#fff}.container_input_item_value[data-v-4e6351e8]{padding-right:%?10?%;flex:1;display:flex;align-items:center;justify-content:flex-end}.container_input_item_value > span[data-v-4e6351e8]:nth-child(1){display:inline-block;margin-right:%?15?%}.container_input_item_value .text[data-v-4e6351e8]{color:#000;display:inline-block;max-width:%?400?%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container_input_item_value uni-input[data-v-4e6351e8]{text-align:right}.container_input_item_value .select_group[data-v-4e6351e8]{display:flex}.container_input_item_value_select[data-v-4e6351e8]{display:flex;margin-right:%?110?%}.container_input_item .flex_start[data-v-4e6351e8]{padding:0 %?10?%;margin-top:%?40?%;justify-content:flex-start}.container_input > uni-view[data-v-4e6351e8]:not(:last-child){border-bottom:1px solid #eee}.inputPlaceHolder[data-v-4e6351e8]{color:#bbb}',""]),e.exports=t}}]); |