|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-singleSpecification"],{"0d73":function(e,t,n){"use strict";n.r(t);var i=n("f770"),a=n("bcdf");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("e48d");var c=n("f0c5"),r=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"d91fc9fc",null,!1,i["a"],void 0);t["default"]=r.exports},1249:function(e,t,n){"use strict";n.r(t);var i=n("13a3"),a=n("6589");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("b3ba");var c=n("f0c5"),r=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"05242d00",null,!1,i["a"],void 0);t["default"]=r.exports},"13a3":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=[]},"381e":function(e,t,n){var i=n("3b98");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("7e9af91d",i,!0,{sourceMap:!1,shadowMode:!1})},"3b98":function(e,t,n){var i=n("24fb");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-d91fc9fc]{background:#fff;padding:0 %?20?%;width:%?710?%;margin:auto;margin-top:%?31?%;border-radius:%?10?%}.container_input_item .select_and_input[data-v-d91fc9fc]{height:%?106?%;display:flex;align-items:center;justify-content:space-between}.container_input_item .select_and_input .greyColor[data-v-d91fc9fc]{color:#bbb}.container_input_item .radio[data-v-d91fc9fc]{padding:%?30?% 0}.container_input_item_label[data-v-d91fc9fc]{padding-left:%?10?%;color:#333;font-size:%?30?%;display:flex;align-items:center}.container_input_item_label .select_label[data-v-d91fc9fc]{max-width:%?520?%}.container_input_item_label .select_check[data-v-d91fc9fc]{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-d91fc9fc]{font-size:%?24?%}.container_input_item_label .select[data-v-d91fc9fc]{background:#e93323;border:none}.container_input_item_label .select .iconfont[data-v-d91fc9fc]{color:#fff}.container_input_item_value[data-v-d91fc9fc]{padding-right:%?10?%;flex:1;display:flex;align-items:center;justify-content:flex-end}.container_input_item_value > span[data-v-d91fc9fc]:nth-child(1){display:inline-block;margin-right:%?15?%}.container_input_item_value .text[data-v-d91fc9fc]{color:#000;display:inline-block;max-width:%?400?%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container_input_item_value uni-input[data-v-d91fc9fc]{text-align:right}.container_input_item_value .select_group[data-v-d91fc9fc]{display:flex}.container_input_item_value_select[data-v-d91fc9fc]{display:flex;margin-right:%?110?%}.container_input_item .flex_start[data-v-d91fc9fc]{padding:0 %?10?%;margin-top:%?40?%;justify-content:flex-start}.container_input > uni-view[data-v-d91fc9fc]:not(:last-child){border-bottom:1px solid #eee}.inputPlaceHolder[data-v-d91fc9fc]{color:#bbb}',""]),e.exports=t},"54f3":function(e,t,n){var i=n("efa7");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("2da4e85c",i,!0,{sourceMap:!1,shadowMode:!1})},6589:function(e,t,n){"use strict";n.r(t);var i=n("ff8a"),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},"8a1a":function(e,t,n){"use strict";n("7a82"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("d3b7"),n("159b");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},a5eb:function(e,t,n){"use strict";n("7a82");var i=n("4ea4").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("53ca")),o=i(n("5530"));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("e9c4"),n("d9e2"),n("d401"),n("d3b7"),n("159b"),n("b64b"),n("14d9"),n("99af"),n("ac1f"),n("00b4"),n("5319"),n("4d63"),n("c607"),n("2c3e"),n("25f0"),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},b3ba:function(e,t,n){"use strict";var i=n("54f3"),a=n.n(i);a.a},bcdf:function(e,t,n){"use strict";n.r(t);var i=n("8a1a"),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},e48d:function(e,t,n){"use strict";var i=n("381e"),a=n.n(i);a.a},efa7:function(e,t,n){var i=n("24fb");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-05242d00]{padding-bottom:%?126?%}.more_than[data-v-05242d00]{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-05242d00]{position:fixed;left:0;bottom:0;width:100%;height:%?126?%;background:#fff;display:flex;align-items:center;justify-content:center}.handle .button[data-v-05242d00]{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},f770: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=[]},ff8a:function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("d3b7"),n("159b"),n("b64b"),n("99af"),n("a434");var a=i(n("0d73")),o=n("a5eb"),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}}]); |