1 |
- {"version":3,"sources":["webpack:///./components/product-builder/step-1.vue?2474","webpack:///./components/product-builder/step-2.vue?2efb","webpack:///./components/product-builder/step-1.vue?3b0a","webpack:///./components/product-builder/step-2.vue?0dd2","webpack:///./pages/product-builder/_code.vue?c756","webpack:///./components/product-builder/step-1.vue?989f","webpack:///./components/product-builder/step-1.vue","webpack:///./components/product-builder/step-1.vue?f1d1","webpack:///./components/product-builder/step-2.vue","webpack:///./components/product-builder/step-2.vue?6319","webpack:///./components/product-builder/step-2.vue?3fb6","webpack:///./pages/product-builder/_code.vue?c6b7","webpack:///./pages/product-builder/_code.vue","webpack:///./pages/product-builder/_code.vue?e350","webpack:///./pages/product-builder/_code.vue?6d62"],"names":["module","exports","name","components","imageViewer","mixins","stepMixin","props","form2","type","Object","default","data","isBigImageShow","rules","decorated","required","message","trigger","supplyChain","model","min","color","validator","value","cb","length","Error","colorPmsText","this","checkColorPmsText","cycle","form","loaded","computed","computedPriceData","_this","priceData","priceList","filter","item","cycle_id","computedBasePriceData","slice","computedBasePriceIndex","_this2","findIndex","id","computedMinBuyNumber","_this3","target","candidate","website_qty1","website_qty2","website_qty3","website_qty4","website_qty5","website_qty6","website_qty7","website_qty8","some","undefined","index","findEffectIndex","entries","forEach","current","test","decoration","decorationList","i","printService","enable","index2","index3","supplier_qty1","supplier_qty2","supplier_qty3","supplier_qty4","supplier_qty5","supplier_qty6","supplier_qty7","supplier_qty8","additions","additionList","includes","index4","temp","attributeList","sort","a","b","localeCompare","watch","_this4","preData","immediate","handler","generateColorForm","$refs","clearValidate","mounted","autoForm","methods","checkForm","_this5","Promise","resolve","reject","validate","valid","JSON","parse","stringify","rule","trim","array","map","Number","NaN","isNaN","openBigImage","closeBigImage","_this6","targetModel","oldForm","color1","detail","reduce","total","img","label","concat","point","colorId","temp2","push","unshift","$set","modelClick","colorClick","indexOf","splice","component","_vm$detail$main","_vm$detail$main2","_vm","_c","_self","staticClass","attrs","slot","_v","directives","rawName","loading","expression","_s","product_name","main","images","_e","on","image","ref","callback","$$v","_l","key","class","active","disable","$event","staticStyle","formItem","_n","additionForm","computedPrintPriceData","hasAddition","result","Array","isArray","deep","_step","_iterator","_createForOfIteratorHelper","_loop","pId","_objectSpread","colorForm","colorNumber","num","pmsColorText","s","n","done","err","e","f","assign","selectAddition","printServiceClick","dec_code","max_color_count","addition","keyName","selected","step1","step2","step3","layout","asyncData","_ref","_asyncToGenerator","regeneratorRuntime","mark","_callee","$axios","params","wrap","_context","prev","next","get","code","catch","console","log","sent","post","abrupt","stop","form1","form3","weightInfo","head","_this$detail$main","_this$detail$main2","title","meta","content","keywords","seo_title","beforeMount","localStorage","getItem","$route","site","then","res","$store","commit","all","sendEnquiry","addToProject","removeItem","$message","closeAll","error","price_unit_id","label_type","job","goods_id","decoration_id","addition_ids","packaging_addition_ids","decoration_methods","packaging","join","addon","t","colours_number","$notify","duration","location","href","origin","product_code","supply_chain","decorated_in","address_id","defaultAddr","freight_type","transit_time","job_name","note","computedPriceTableData","qty","colour","colour_type","unit","set_up","print_option","fright","sub_total","colour_id","tempAddon","addition_id","addition_config","addition_code","addition_config_id","tempPackaging","tempPrint","_loop2","v","price_type_id","price_type_name","pricetype","pms","updateForm","step"],"mappings":"+EACAA,EAAOC,QAAU,CAAC,C,sBCAlBD,EAAOC,QAAU,CAAC,C,mCCDlB,M,mCCAA,M,sBCCAD,EAAOC,QAAU,CAAC,C,mLCD0O,ECI7O,CACbC,KAAM,QACNC,WAAY,CACV,eAAgBC,KAElBC,OAAQ,CAACC,WACTC,MAAO,CAELC,MAAO,CACLC,KAAMC,OACNC,QAAS,WACP,MAAO,CAAC,CACV,IAGJC,KAAI,WAEF,MAAO,CAELC,gBAAgB,EAChBC,MAAO,CACLC,UAAW,CAAC,CAAEC,UAAU,EAAMC,QAAS,MAAOC,QAAS,WACvDC,YAAa,CAAC,CAAEH,UAAU,EAAMC,QAAS,MAAOC,QAAS,WACzDE,MAAO,CACL,CACEJ,UAAU,EACVE,QAAS,SACTT,KAAM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UJ,EAAIS,QAAQ,OAAST,EAAInB,OAAO,UAAYmB,EAAI7G,UAAU,MAAQ6G,EAAIsF,MAAMzM,MAAM,QAAUmH,EAAInD,SAASmE,GAAG,CAAC,cAAc,SAAAU,GAAM,OAAI1B,EAAImK,WAAWzI,EAAQ,EAAE,KAAI1B,EAAIM,GAAG,KAAKL,EAAG,QAAQ,CAACiB,IAAI,QAAQd,MAAM,CAAC,QAAUJ,EAAIS,QAAQ,OAAST,EAAInB,OAAO,UAAYmB,EAAI7G,UAAU,WAAa6G,EAAIwF,WAAW,MAAQxF,EAAIsF,MAAMzM,MAAM,MAAQmH,EAAIsF,MAAMpN,MAAM,QAAU8H,EAAIsF,MAAMlI,SAAS,MAAQ4C,EAAI1I,OAAO0J,GAAG,CAAC,MAAQhB,EAAI1C,UAAU,cAAc,SAAAoE,GAAM,OAAI1B,EAAImK,WAAWzI,EAAQ,EAAE,MAAKzB,EAAG,MAAM,CAACE,YAAY,yBAAyB,CAACF,EAAG,WAAW,CAACG,MAAM,CAAC,YAAc,cAAc,IAAI,EACn+B,GACsB,IEUpB,EACA,KACA,WACA,MAIa,UAAAP,U","file":"e87987c.js","sourcesContent":["// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {};","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {};","export * from \"-!../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js??ref--7-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-1.vue?vue&type=style&index=0&id=7f99eb3e&prod&lang=scss&scoped=true\"","export * from \"-!../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js??ref--7-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=style&index=0&id=165fd52f&prod&lang=scss&scoped=true\"","// extracted by extract-css-chunks-webpack-plugin\nmodule.exports = {};","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-1.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-1.vue?vue&type=script&lang=js\"","\nimport imageViewer from 'element-ui/packages/image/src/image-viewer'\nimport stepMixin from './stepMixin'\n\nexport default {\n name: 'Step1',\n components: {\n 'image-viewer': imageViewer,\n },\n mixins: [stepMixin],\n props: {\n // 步骤2的表单. 因其打印价格表单会反向影响本组件的最小起购数量, 故需从父组件获取. 只用来计算, 本组件不更改这个数据.\n form2: {\n type: Object,\n default: function () {\n return {}\n },\n },\n },\n data() {\n // this.detail 记录在mixin里;\n return {\n // 查看大图\n isBigImageShow: false,\n rules: {\n decorated: [{ required: true, message: '请选择', trigger: 'change' }],\n supplyChain: [{ required: true, message: '请选择', trigger: 'change' }],\n model: [\n {\n required: true,\n trigger: 'change',\n type: 'number',\n min: 1,\n message: 'Please select model',\n },\n ],\n color: [\n {\n required: true,\n validator: (rules, value, cb) => {\n value.length > 0\n ? cb()\n : cb(new Error('Please select at least one color'))\n },\n trigger: 'change',\n },\n ],\n colorPmsText: [{ trigger: 'blur', validator: this.checkColorPmsText }],\n cycle: [\n {\n required: true,\n message: 'Please select time frame',\n trigger: 'change',\n },\n ],\n },\n form: {\n // 必须要有的初始值, 否则必定会报错Cannot read properties of undefined\n color: [],\n model: 0,\n colorPmsText: '',\n },\n // 标志符,用于控制监听是否启用\n loaded: false,\n }\n },\n computed: {\n // 商品 当前选中周期的 基础价格和打印价格数据\n computedPriceData() {\n return this.priceData.priceList.filter(\n item => item.cycle_id === this.form.cycle\n )\n },\n // 当前选中周期下, 商品对应的各型号基础价格数据. 可以推断当前周期有几个型号\n computedBasePriceData() {\n const model = this.computedPriceData.length\n ? this.computedPriceData[0]\n : {}\n // 属性‘1’里面是基础价格数据, 属性 ’2‘是打印价格数据\n if (model['1']) {\n return model['1'].slice()\n } else {\n return []\n }\n },\n // 当前型号位于基础价格数据的index, 用于取出型号对应的基础数据\n computedBasePriceIndex() {\n return this.computedBasePriceData.findIndex(\n item => item.id === this.form.model\n )\n },\n // 该商品周期的最小起订量. attributeList的属性名(website_qty1, website_qty2)排序, 然后取属性值\n computedMinBuyNumber() {\n // 算基础价格的第一个有效值\n const target = this.computedBasePriceData.length\n ? this.computedBasePriceData[\n this.computedBasePriceIndex > 0 ? this.computedBasePriceIndex : 0\n ]\n : {}\n const candidate = [\n target.website_qty1,\n target.website_qty2,\n target.website_qty3,\n target.website_qty4,\n target.website_qty5,\n target.website_qty6,\n target.website_qty7,\n target.website_qty8,\n ]\n\n if (!candidate.some(item => item !== undefined)) return 1\n // 算出商品基础价格的第一个有效值\n let index = this.findEffectIndex(candidate)\n // 算出打印服务和附加服务的第一个有效价格所处位置.\n Object.entries(this.form2).forEach(current => {\n if (/\\d+/.test(current[0])) {\n const decoration = current[1].decorationList.filter(\n i => i.id === current[1].printService\n )\n if (decoration.length && current[1].enable) {\n // 打印价格的基础阶梯价格\n const index2 = this.findEffectIndex([\n decoration[0].website_qty1,\n decoration[0].website_qty2,\n decoration[0].website_qty3,\n decoration[0].website_qty4,\n decoration[0].website_qty5,\n decoration[0].website_qty6,\n decoration[0].website_qty7,\n decoration[0].website_qty8,\n ])\n // 附加价格\n const index3 = this.findEffectIndex([\n decoration[0].supplier_qty1,\n decoration[0].supplier_qty2,\n decoration[0].supplier_qty3,\n decoration[0].supplier_qty4,\n decoration[0].supplier_qty5,\n decoration[0].supplier_qty6,\n decoration[0].supplier_qty7,\n decoration[0].supplier_qty8,\n ])\n // 让index记录最大值\n if (index2 > index) index = index2\n if (index3 > index) index = index3\n }\n } else {\n // 附加服务的价格\n const additions = this.priceData.additionList[current[0]].filter(\n item => current[1].includes(item.id)\n )\n\n if (additions.length) {\n additions.forEach(target => {\n const index4 = this.findEffectIndex([\n target.website_qty1,\n target.website_qty2,\n target.website_qty3,\n target.website_qty4,\n target.website_qty5,\n target.website_qty6,\n target.website_qty7,\n target.website_qty8,\n ])\n // 让index记录最大值\n if (index4 > index) index = index4\n })\n }\n }\n })\n\n const temp = Object.entries(this.priceData.attributeList)\n .sort((a, b) => a[0].localeCompare(b[0]))\n .filter((item, i) => index === i)\n\n if (temp.length) {\n return temp[0][1]\n } else {\n return 1\n }\n },\n },\n watch: {\n computedBasePriceData() {\n if (!this.loaded || !this.computedBasePriceData.length) return\n // fixme 如果有从商品详情页带过来的型号选择数据, 要选中该值, 而不是默认的第一个值\n if (\n this.computedBasePriceData.filter(i => i.id === this.preData.model)\n .length\n ) {\n this.form.model = this.preData.model\n } else {\n this.form.model = this.computedBasePriceData[0].id\n }\n },\n 'form.model': {\n immediate: true,\n handler: function () {\n if (!this.loaded) return\n\n this.generateColorForm()\n },\n },\n 'form.color': {\n immediate: true,\n handler: function () {\n if (!this.loaded) return\n\n this.generateColorForm()\n this.$refs.form.clearValidate('colorPmsText')\n },\n },\n form2: {\n immediate: true,\n handler: function () {\n if (!this.loaded) return\n\n this.generateColorForm()\n },\n },\n },\n mounted() {\n this.form = {\n supplyChain: 'AU Stock',\n decorated: 'Local',\n model: 0, // 型号的赋值在computedBasePriceData的监听里面, 因为其涉及到基础价格变更后的重新赋值.\n cycle: this.preData.cycle\n ? this.preData.cycle\n : this.priceData.priceList[0].cycle_id,\n color: [],\n colorPmsText: '',\n // 根据所选规格和颜色组合成的自动表单.需要在computedBasePriceData的watch里面生成\n autoForm: [],\n }\n\n this.loaded = true\n },\n methods: {\n checkForm() {\n return new Promise((resolve, reject) => {\n this.$refs.form.validate(valid => {\n if (valid) {\n resolve(JSON.parse(JSON.stringify(this.form)))\n } else {\n reject(new Error('validate step1 form error'))\n }\n })\n })\n },\n checkColorPmsText(rule, value, cb) {\n // fixme. 颜色的两个固定值的id还未确定\n if (!this.form.color.includes(999)) cb()\n\n if (this.form.colorPmsText.trim().length < 1) {\n cb(new Error('You must type color comment here if \"+ PMS\" is checked'))\n } else {\n cb()\n }\n },\n // 找出第一个有效价格的index. 非变异方法, 勿对参数进行赋值操作.\n // 价格留空和111不算到起购量, 为正常数值或者0或者999(POA)就可以算到起购量, 所以在此处将空手动重置为NaN\n findEffectIndex(array) {\n return array\n .map(item => (item === '' ? Number.NaN : Number(item)))\n .findIndex(item => !Number.isNaN(item) && item !== 111)\n },\n openBigImage() {\n this.isBigImageShow = true\n },\n closeBigImage() {\n this.isBigImageShow = false\n },\n generateColorForm() {\n if (!this.loaded || this.form.color.length < 1) {\n this.form.autoForm = []\n return\n }\n // 生成所选规格和颜色组合成的自动表单\n const targetModel = this.computedBasePriceData.filter(\n item => item.id === this.form.model\n )\n const oldForm = JSON.parse(JSON.stringify(this.form.autoForm))\n\n let color1 = []\n if (targetModel.length) {\n color1 = this.detail.color.reduce((total, item) => {\n if (this.form.color.includes(item.id)) {\n const temp = {\n img: item.img || '',\n label: `${item.name}, ${targetModel[0].point}`,\n color: item.name,\n colorId: item.id,\n value: this.computedMinBuyNumber,\n }\n const temp2 = oldForm.filter(item => item.label === temp.label)\n if (temp2.length && temp2[0].value >= this.computedMinBuyNumber) {\n // 如果原来有值且原值大于等于最小起购, 则沿用原值\n temp.value = temp2[0].value\n }\n total.push(temp)\n }\n return total\n }, [])\n if (this.form.color.includes(0)) {\n const temp = {\n img: '',\n label: `Unspecified, ${targetModel[0].point}`,\n color: 'Unspecified',\n colorId: -1,\n value: this.computedMinBuyNumber,\n }\n const temp2 = oldForm.filter(item => {\n return item.label === temp.label\n })\n if (temp2.length && temp2[0].value >= this.computedMinBuyNumber) {\n // 如果原来有值且原值大于等于最小起购, 则沿用原值\n temp.value = temp2[0].value\n }\n color1.unshift(temp)\n }\n if (this.form.color.includes(999)) {\n const temp = {\n img: '',\n label: `+ PMS, ${targetModel[0].point}`,\n color: 'PMS',\n colorId: -1,\n value: this.computedMinBuyNumber,\n }\n const temp2 = oldForm.filter(item => item.label === temp.label)\n if (temp2.length && temp2[0].value >= this.computedMinBuyNumber) {\n // 如果原来有值且原值大于等于最小起购, 则沿用原值\n temp.value = temp2[0].value\n }\n color1.push(temp)\n }\n }\n this.$set(this.form, 'autoForm', color1)\n },\n modelClick(item) {\n if (this.form.model === item.id) {\n this.form.model = 0\n } else {\n this.form.model = item.id\n }\n },\n colorClick(item) {\n const index = this.form.color.indexOf(item.id)\n if (index !== -1) {\n this.form.color.splice(index, 1)\n } else {\n this.form.color.push(item.id)\n }\n },\n },\n}\n","import { render, staticRenderFns } from \"./step-1.vue?vue&type=template&id=7f99eb3e&scoped=true\"\nimport script from \"./step-1.vue?vue&type=script&lang=js\"\nexport * from \"./step-1.vue?vue&type=script&lang=js\"\nimport style0 from \"./step-1.vue?vue&type=style&index=0&id=7f99eb3e&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7f99eb3e\",\n null\n \n)\n\nexport default component.exports","\nimport stepMixin from './stepMixin'\n\nexport default {\n name: 'Step2',\n mixins: [stepMixin],\n props: {\n // 步骤1中选中的周期. 不能直接拿form1来取form1.cycle, 否则步骤1变更时, 涉及到form1的computed会全部重新计算, 可能会导致其他异常\n cycle: {\n type: Number,\n default: function () {\n return 0\n },\n },\n },\n data() {\n return {\n form: {},\n additionForm: {},\n rules: {},\n // 标志符,用于控制监听是否启用\n loaded: false,\n }\n },\n computed: {\n // 商品 当前选中周期的 基础价格和打印价格数据\n computedPriceData() {\n return this.priceData.priceList.filter(\n item => item.cycle_id === this.cycle\n )\n },\n /**\n * 当前选中周期下, 商品对应的各型号打印价格.\n */\n computedPrintPriceData() {\n const model = this.computedPriceData.length\n ? this.computedPriceData[0]\n : {}\n // 属性‘1’里面是基础价格数据, 属性 ’2‘是打印价格数据\n if (model['2']) {\n return model['2'].slice()\n } else {\n return []\n }\n },\n // 计算是否存在附加项\n hasAddition() {\n if (!this.loaded) return false\n let result = false\n const target = this.priceData.additionList\n for (const key in target) {\n if (Array.isArray(target[key]) && target[key].length) {\n result = true\n }\n }\n return result\n },\n },\n watch: {\n computedPrintPriceData: {\n deep: true,\n handler: function () {\n if (!this.loaded) return\n\n const temp = {}\n for (const item of this.computedPrintPriceData) {\n let pId = 0\n // 从 product 页面来的用户选过的打印服务数据\n if (\n this.preData.printService &&\n this.preData.printService[`${item.id}`] &&\n this.preData.printService[`${item.id}`].id\n ) {\n pId = this.preData.printService[`${item.id}`].id\n }\n\n temp[`${item.id}`] = {\n // ...item直接把所有数据一起堆进去, 方便后续的价格计算, 不然计算需要各种遍历, 逻辑会非常难懂.\n ...item,\n enable: pId !== 0,\n // 打印服务. 如果选过的打印服务在这个周期的商品里面有, 则选上. 否则选当前打印服务项的第一个\n printService: item.decorationList.map(i => i.id).includes(pId)\n ? pId\n : item.decorationList[0].id,\n colorForm: item.decorationList.map(decoration => {\n return {\n id: decoration.id,\n // 默认是1, 后台数据允许留空成0, 但既然计算打印价格, 肯定会是1, 不然怎么打印、怎么计算价格\n colorNumber:\n pId === decoration.id\n ? Number(this.preData.printService[`${item.id}`].num)\n : 1,\n pmsColorText: '',\n }\n }),\n }\n }\n this.form = Object.assign(temp, this.additionForm)\n },\n },\n additionForm: {\n deep: true,\n handler: function () {\n if (!this.loaded) return\n\n Object.assign(this.form, this.additionForm)\n },\n },\n },\n mounted() {\n for (const key in this.priceData.additionList) {\n this.$set(\n this.additionForm,\n `${key}`,\n this.preData[`${key}`] ? this.preData[`${key}`].slice() : []\n )\n }\n this.loaded = true\n },\n methods: {\n checkForm() {\n return new Promise((resolve, reject) => {\n this.$refs.form.validate(valid => {\n if (valid) {\n resolve(JSON.parse(JSON.stringify(this.form)))\n } else {\n reject(new Error('validate step2 form error'))\n }\n })\n })\n },\n selectAddition(item, key) {\n if (this.additionForm[`${key}`].includes(item.id)) {\n // 选中清除\n this.$set(\n this.additionForm,\n `${key}`,\n this.additionForm[`${key}`].filter(i => i !== item.id)\n )\n } else {\n this.$set(\n this.additionForm,\n `${key}`,\n this.additionForm[`${key}`].concat([item.id])\n )\n }\n },\n printServiceClick(decoration, item) {\n if (!this.form[`${item.id}`].enable) return\n this.form[`${item.id}`].printService = decoration.id\n },\n },\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./step-2.vue?vue&type=template&id=165fd52f&scoped=true\"\nimport script from \"./step-2.vue?vue&type=script&lang=js\"\nexport * from \"./step-2.vue?vue&type=script&lang=js\"\nimport style0 from \"./step-2.vue?vue&type=style&index=0&id=165fd52f&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"165fd52f\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/extract-css-chunks-webpack-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js??ref--7-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--7-oneOf-1-3!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_code.vue?vue&type=style&index=0&id=3cd9f1bd&prod&lang=scss&scoped=true\"","\nimport step1 from '@/components/product-builder/step-1'\nimport step2 from '@/components/product-builder/step-2'\nimport step3 from '@/components/product-builder/step-3'\n\nexport default {\n name: 'PageProductBuilder',\n components: {\n step1,\n step2,\n step3,\n },\n layout: 'product_builder_layout',\n async asyncData({ $axios, params }) {\n const detail = await $axios\n .get(`/au/goods/detail/${params.code}`)\n .catch(e => {\n console.log(e)\n return {}\n })\n let priceData = {}\n if (detail.result && detail.result.id) {\n priceData = await $axios\n .post('/quote/price', {\n id: detail.result.id,\n })\n .catch(e => {\n console.log(e)\n })\n }\n return {\n detail: detail.result || {},\n priceData: priceData.result || {},\n }\n },\n data() {\n return {\n // 商品详情数据\n detail: {},\n priceData: {},\n loading: false,\n // 用于3个step组件间互通数据\n form1: {},\n form2: {},\n form3: {},\n weightInfo: {},\n preData: {},\n }\n },\n head() {\n return {\n title: this.detail.product_name\n ? `Product Builder: ${this.detail.product_name}`\n : 'PromoCollection',\n meta: [\n { name: 'keywords', content: this.detail.main?.keywords },\n { name: 'description', content: this.detail.main?.seo_title },\n ],\n }\n },\n computed: {},\n beforeMount() {\n const preData = localStorage.getItem(\n `product-user-select-${this.$route.params.code}`\n )\n if (preData) {\n this.preData = JSON.parse(preData)\n }\n },\n mounted() {\n // 从页脚组件抄过来的. 运费计算需要里面的一些数据\n this.$axios.post('home/indexConfigWebsite', { site: 1 }).then(res => {\n this.$store.commit('config/setConfigInfo', res.result)\n })\n if (!this.detail.id) return\n this.$axios.post('/quote/weight', { id: this.detail.id }).then(res => {\n this.weightInfo = res.result\n })\n },\n methods: {\n checkForm(type) {\n this.loading = true\n Promise.all([\n this.$refs.step1.checkForm(),\n this.$refs.step2.checkForm(),\n this.$refs.step3.checkForm(),\n ])\n .then(res => {\n if (type === 2) {\n this.sendEnquiry(res)\n } else {\n this.addToProject(res)\n }\n // 点击按钮后删除从product页面带过来的数据\n this.preData = {}\n localStorage.removeItem(\n `product-user-select-${this.$route.params.code}`\n )\n this.loading = false\n })\n .catch(e => {\n console.log(e)\n this.$message.closeAll()\n this.$message.error('Please make sure to fill in the required fields')\n this.loading = false\n })\n },\n addToProject(res) {\n const temp = {\n cycle_id: res[0].cycle,\n price_unit_id: res[0].model,\n label_type: res[2].job,\n goods_id: this.detail.id,\n // 这个字段从product页面抄过来的, 本来就是空的, 不知道用来干嘛.\n decoration_id: '',\n // 以下3字段在后续逻辑赋值\n addition_ids: '',\n packaging_addition_ids: '',\n decoration_methods: [],\n }\n if (Array.isArray(res[1].packaging)) {\n temp.packaging_addition_ids = res[1].packaging.join(',')\n }\n if (Array.isArray(res[1].addon)) {\n temp.addition_ids = res[1].addon.join(',')\n }\n for (const key in res[1]) {\n if (/\\d+/.test(key)) {\n const t = res[1][key].colorForm.filter(\n i => i.id === res[1][key].printService\n )\n\n temp.decoration_methods.push({\n colours_number: t.length ? t[0].colorNumber : 1,\n decoration_id: res[1][key].printService,\n price_unit_id: res[1][key].id,\n })\n }\n }\n\n this.$axios\n .post('/goods_cart/cartAdd', temp)\n .then(res => {\n console.log(res)\n if (res.code === 1) {\n this.$notify({\n title: 'success',\n message: 'Submitted successfully',\n type: 'success',\n duration: 3000,\n })\n // 天坑. 本页面用了不同的layout, 如果直接用router.push跳转会导致页面空白...\n location.href = location.origin + '/home/projects'\n }\n })\n .catch(e => {\n console.log(e)\n })\n },\n sendEnquiry(res) {\n const result = {\n product_code: this.detail.product_code,\n cycle_id: res[0].cycle,\n price_unit_id: res[0].model,\n supply_chain: res[0].supplyChain,\n decorated_in: res[0].decorated,\n address_id: res[2].defaultAddr.id,\n freight_type: res[2].freight_type || 1,\n // 目前没这功能, 暂时写死固定值\n transit_time: '2 Days',\n job_name: res[2].job || 'default_job',\n note: res[2].note || '',\n item: [],\n // addon: [], // 在后续逻辑赋值\n // decoration: [],\n // packaging: [],\n }\n const priceData = this.$refs.step3.computedPriceTableData\n result.item = res[0].autoForm.map(i => {\n const temp = {\n qty: i.value,\n colour: i.color,\n colour_type: 1,\n model: res[0].model,\n unit: priceData[0][`${i.value}_value`],\n set_up: priceData[1][`${i.value}_value`],\n print_option: priceData[2][`${i.value}_value`],\n addon: priceData[3][`${i.value}_value`],\n packaging: priceData[4][`${i.value}_value`],\n fright: priceData[5][`${i.value}_value`],\n sub_total: priceData[6][`${i.value}_value`],\n }\n if (i.color === 'Unspecified') temp.colour_type = 3\n if (i.color === 'PMS') {\n temp.colour_type = 2\n temp.colour = res[0].colorPmsText\n }\n if (i.colorId >= 0) temp.colour_id = i.colorId\n return temp\n })\n if (this.priceData.additionList) {\n if (this.priceData.additionList.addon) {\n const tempAddon = this.priceData.additionList.addon\n .filter(item => res[1].addon.includes(item.id))\n .map(item => {\n return {\n addition_id: item.id,\n addition_config: item.addition_code,\n addition_config_id: item.addition_config_id,\n image: '',\n name: item.name,\n }\n })\n if (tempAddon.length) result.addon = tempAddon\n }\n if (this.priceData.additionList.packaging) {\n const tempPackaging = this.priceData.additionList.packaging\n .filter(item => res[1].packaging.includes(item.id))\n .map(item => {\n return {\n addition_id: item.id,\n addition_config: item.addition_code,\n addition_config_id: item.addition_config_id,\n image: '',\n name: item.name,\n }\n })\n if (tempPackaging.length) result.packaging = tempPackaging\n }\n }\n const tempPrint = []\n for (const key in res[1]) {\n const target = res[1][key]\n if (/\\d+/.test(key) && target.enable) {\n const v = {\n point: target.point,\n decoration_id: target.printService,\n }\n\n const decoration = target.decorationList.filter(\n i => i.id === target.printService\n )\n if (decoration.length) {\n v.price_type_id = decoration[0].price_type_id\n v.price_type_name = decoration[0].pricetype.name || ''\n }\n\n const formItem = target.colorForm.filter(\n i => i.id === target.printService\n )\n if (formItem.length) {\n v.pms = formItem[0].pmsColorText || ''\n v.max_color_count = formItem[0].colorNumber || 0\n }\n tempPrint.push(v)\n }\n }\n if (tempPrint.length) result.decoration = tempPrint\n // console.log(result)\n this.$axios\n .post('/order/add', result)\n .then(res => {\n console.log(res)\n if (res.code === 1) {\n this.$notify({\n title: 'success',\n message: 'Submitted successfully',\n type: 'success',\n duration: 3000,\n })\n // 对应的跳转页面还没开发.\n location.href = location.origin + '/product/' + `${this.detail.product_code}`\n }\n })\n .catch(e => {\n console.log(e)\n })\n },\n updateForm(data, step) {\n switch (step) {\n case 1:\n this.form1 = data\n break\n case 2:\n this.form2 = data\n break\n case 3:\n this.form3 = data\n break\n }\n },\n },\n}\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_code.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js??ref--2-0!../../node_modules/@nuxt/components/dist/loader.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./_code.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./_code.vue?vue&type=template&id=3cd9f1bd&scoped=true\"\nimport script from \"./_code.vue?vue&type=script&lang=js\"\nexport * from \"./_code.vue?vue&type=script&lang=js\"\nimport style0 from \"./_code.vue?vue&type=style&index=0&id=3cd9f1bd&prod&lang=scss&scoped=true\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3cd9f1bd\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|