You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
12 KiB
1 line
12 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-b1f0f6a4"],{"018e":function(t,e,i){"use strict";var a=i("7f05");i.n(a).a},6359:function(t,e,i){"use strict";i.r(e);var a=i("a34a"),r=i.n(a),s=i("2f62"),n=i("c4ad"),o=i("b0e7"),c=i("b7be"),l=i("d708");function d(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function u(t,e,i,a,r,s,n){try{var o=t[s](n),c=o.value}catch(t){return void i(t)}o.done?e(c):Promise.resolve(c).then(a,r)}function m(t){return function(){var e=this,i=arguments;return new Promise((function(a,r){var s=t.apply(e,i);function n(t){u(s,a,r,n,o,"next",t)}function o(t){u(s,a,r,n,o,"throw",t)}n(void 0)}))}}function p(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function f(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var h={name:"storeIntegralCreate",components:{goodsList:n.default,uploadPictures:o.a},data:function(){return{roterPre:l.a.roterPre,loading:!1,goodsImg:[],productsId:[],submitOpen:!1,spinShow:!1,isChoice:"",current:0,modalPic:!1,grid:{xl:12,lg:20,md:24,sm:24,xs:24},grid2:{xl:8,lg:12,md:12,sm:24,xs:24},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},modals:!1,modal_loading:!1,images:[],formValidate:{is_show:0,attrs:[]},templateList:[],timeList:[],columns:[],specsData:[],picTit:"",tableIndex:0,ruleValidate:{price:[{required:!0,type:"number",message:"请输入兑换积分",trigger:"blur"}],num:[{required:!0,type:"number",message:"请输入购买数量限制",trigger:"blur"}],once_num:[{required:!0,type:"number",message:"请输入单次购买数量限制",trigger:"blur"}]},copy:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?p(i,!0).forEach((function(e){f(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):p(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},Object(s.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:135},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){this.$route.params.id&&(this.copy=this.$route.params.copy,this.current=1,this.getInfo())},methods:{productAttrs:function(t){var e=this;return this.loading=!0,new Promise((function(i,a){var r=e;Object(c.sb)(t.product_id,4).then((function(t){var a=t.data.info;r.specsData=r.specsData.concat(a.attrs),r.specsData.forEach((function(t,e){r.$set(r.specsData[e],"id",e)})),r.columns=a.header,r.columns.unshift({type:"selection",width:60,align:"center"}),r.inputChange(a),i(),e.loading=!1})).catch((function(t){e.loading=!1,a(),r.$Message.error(t.msg)}))}))},inputChange:function(t){var e=this,i=[];t.header.forEach((function(t,e){1===t.type&&i.push({index:e,key:t.key,title:t.title})})),i.forEach((function(t,i){var a=t.title,r=t.key,s={title:a,key:r,align:"center",minWidth:120,render:function(t,i){return t("div",[t("InputNumber",{props:{min:0,precision:0,value:"price"===r?i.row.price:i.row.quota},on:{"on-change":function(t){"price"===r?i.row.price=t:i.row.quota=t,e.specsData[i.index]=i.row,e.formValidate.attrs&&e.formValidate.attrs.length&&e.formValidate.attrs.forEach((function(t,a){t.id===i.row.id&&e.formValidate.attrs.splice(a,1,i.row)}))}}})])}};e.columns.splice(t.index,1,s)}))},changeCheckbox:function(t){this.formValidate.attrs=t},getProductId:function(){var t=m(r.a.mark((function t(e){var i,a,s;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=0;case 1:if(!(i<this.goodsImg.length)){t.next=9;break}if(this.goodsImg[i].product_id!==e.product_id){t.next=6;break}return t
|