3 行
22 KiB
JavaScript
可执行文件
3 行
22 KiB
JavaScript
可执行文件
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ac177f10"],{"0123":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"diy-pre-sale"}},[e("el-form",{attrs:{model:t.componentData,"label-width":"80px","label-position":"top"}},[e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"上边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginTop,callback:function(e){t.$set(t.componentData,"marginTop",e)},expression:"componentData.marginTop"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"下边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginBottom,callback:function(e){t.$set(t.componentData,"marginBottom",e)},expression:"componentData.marginBottom"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"左右边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginLR,callback:function(e){t.$set(t.componentData,"marginLR",e)},expression:"componentData.marginLR"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"组件圆角(px)"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.borderRadius,callback:function(e){t.$set(t.componentData,"borderRadius",e)},expression:"componentData.borderRadius"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"背景颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.backgroundColorChange},model:{value:t.componentData.backgroundColor,callback:function(e){t.$set(t.componentData,"backgroundColor",e)},expression:"componentData.backgroundColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.backgroundColorReset}},[t._v("重置")])],1),e("el-form-item",{attrs:{label:"标题"}},[e("el-input",{attrs:{placeholder:"不填写默认为'预售'"},model:{value:t.componentData.title,callback:function(e){t.$set(t.componentData,"title",e)},expression:"componentData.title"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"标题文字颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"titleTextColor")}},model:{value:t.componentData.titleTextColor,callback:function(e){t.$set(t.componentData,"titleTextColor",e)},expression:"componentData.titleTextColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#333","titleTextColor")}}},[t._v("重置")])],1),e("el-form-item",{attrs:{label:"描述内容"}},[e("el-input",{attrs:{placeholder:"建议不要超过10个字"},model:{value:t.componentData.desc,callback:function(e){t.$set(t.componentData,"desc",e)},expression:"componentData.desc"}})],1),e("el-form-item",{attrs:{label:"按钮文字"}},[e("el-input",{attrs:{placeholder:"建议不要超过4个字"},model:{value:t.componentData.buttonText,callback:function(e){t.$set(t.componentData,"buttonText",e)},expression:"componentData.buttonText"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"文字颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":t.buttonTextColorChange},model:{value:t.componentData.buttonTextColor,callback:function(e){t.$set(t.componentData,"buttonTextColor",e)},expression:"componentData.buttonTextColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonTextColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮背景颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.buttonColorChange},model:{value:t.componentData.buttonColor,callback:function(e){t.$set(t.componentData,"buttonColor",e)},expression:"componentData.buttonColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮边框颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.buttonBorderColorChange},model:{value:t.componentData.buttonBorderColor,callback:function(e){t.$set(t.componentData,"buttonBorderColor",e)},expression:"componentData.buttonBorderColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonBorderColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"价格颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.priceColorChange},model:{value:t.componentData.priceColor,callback:function(e){t.$set(t.componentData,"priceColor",e)},expression:"componentData.priceColor"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"商品圆角"}},[e("div",{staticStyle:{width:"100%","padding-left":"20px","box-sizing":"border-box"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.imgRadius,callback:function(e){t.$set(t.componentData,"imgRadius",e)},expression:"componentData.imgRadius"}})],1)]),t.componentData.isMerchant?t._e():e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"自定义预售商品"}},[e("div",{staticClass:"viewMoreSwitch"},[e("p",[t._v(t._s(t.componentData.customize?"手动设置预售商品":"自动获取最新预售商品"))]),e("el-switch",{model:{value:t.componentData.customize,callback:function(e){t.$set(t.componentData,"customize",e)},expression:"componentData.customize"}})],1)]),t.componentData.customize?[e("el-form-item",{attrs:{label:"添加预售商品"}},[e("draggable",{staticClass:"items-list",attrs:{forceFallback:"true",delay:"50",filter:".select"},model:{value:t.componentData.ids,callback:function(e){t.$set(t.componentData,"ids",e)},expression:"componentData.ids"}},[t.componentData.ids&&t.items[t.componentData.ids[0]]?t._l(t.componentData.ids,(function(o,n){return e("div",{key:n,staticClass:"items"},[e("el-image",{attrs:{src:t.items[o].goods_img,fit:"fill"},scopedSlots:t._u([{key:"error",fn:function(){return[e("el-image",{staticClass:"img",attrs:{src:t.errorImage}})]},proxy:!0}],null,!0)}),e("div",{staticClass:"close",on:{click:function(e){return t.deleteItem(n)}}},[e("i",{staticClass:"el-icon-error"})])],1)})):t._e(),e("div",{staticClass:"items select",on:{click:function(e){t.itemsSelectDialog=!0}}},[e("i",{staticClass:"el-icon-plus"})])],2)],1),e("preSaleDialog",{attrs:{visible:t.itemsSelectDialog,selection:"true"},on:{"update:visible":function(e){t.itemsSelectDialog=e},preSaleSelect:t.onPreSaleSelect}})]:t._e()],2)],1)},a=[],r=o("c7eb"),i=o("2909"),c=o("b85c"),l=o("1da1"),s=(o("99af"),o("a15b"),o("14d9"),o("a434"),o("d3b7"),o("b76a")),u=o.n(s),f=o("e4e9"),p={name:"diy-pre-sale",props:["componentData"],data:function(){return{itemsSelectDialog:!1,errorImage:"/Public/images/empty-image-1.png",items:{}}},methods:{backgroundColorChange:function(t){this.componentData.backgroundColor=t},backgroundColorReset:function(){this.componentData.backgroundColor="rgba(255,255,255,1)"},colorChange:function(t,e){console.log(t,e),this.componentData[e]=t},colorReset:function(t,e){this.componentData[e]=t},buttonTextColorChange:function(t){this.componentData.buttonTextColor=t},buttonColorChange:function(t){this.componentData.buttonColor=t},buttonBorderColorChange:function(t){this.componentData.buttonBorderColor=t},buttonTextColorReset:function(){this.componentData.buttonTextColor="#000"},buttonColorReset:function(){this.componentData.buttonColor="#f8f8f8"},priceColorChange:function(t){this.componentData.priceColor=t},buttonBorderColorReset:function(){this.componentData.buttonBorderColor="rgb(200,200,200)"},onPreSaleSelect:function(t){var e=this;return Object(l["a"])(Object(r["a"])().mark((function o(){var n,a,l,s;return Object(r["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(!(t&&t.length>0)){o.next=7;break}n=[],a=Object(c["a"])(t);try{for(a.s();!(l=a.n()).done;)s=l.value,n.push(s.id)}catch(r){a.e(r)}finally{a.f()}return o.next=6,e.getItems([].concat(n,Object(i["a"])(e.componentData.ids)));case 6:e.componentData.ids=e.componentData.ids.concat(n);case 7:case"end":return o.stop()}}),o)})))()},deleteItem:function(t){this.componentData.ids.splice(t,1),this.componentData.ids=Object(i["a"])(this.componentData.ids)},getItems:function(t){var e=this;return Object(l["a"])(Object(r["a"])().mark((function o(){return Object(r["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(t&&0!=t.length){o.next=2;break}return o.abrupt("return");case 2:return o.abrupt("return",new Promise((function(o){e.$http.post("/SmallProgramApi/Diy/getAdvanceList",{ids:t.join(",")}).then((function(n){if(1==n.data.status){var a=n.data.data;e.items={};var r,i=Object(c["a"])(a);try{for(i.s();!(r=i.n()).done;){var l=r.value;e.items[l.id]=l}}catch(s){i.e(s)}finally{i.f()}e.compareIdsAndRealData(t,e.items),o(1)}}))})));case 3:case"end":return o.stop()}}),o)})))()},compareIdsAndRealData:function(t,e){if(t.length!=e.length)for(var o in t)e[t[o]]||this.deleteGoods(o)}},mounted:function(){this.getItems(this.componentData.ids)},components:{draggable:u.a,preSaleDialog:f["a"]}},d=p,m=(o("af4b"),o("2877")),h=Object(m["a"])(d,n,a,!1,null,"bf440c72",null);e["default"]=h.exports},"0c47":function(t,e,o){"use strict";var n=o("da84"),a=o("d44e");a(n.JSON,"JSON",!0)},"131a":function(t,e,o){"use strict";var n=o("23e7"),a=o("d2bb");n({target:"Object",stat:!0},{setPrototypeOf:a})},"159b":function(t,e,o){"use strict";var n=o("da84"),a=o("fdbc"),r=o("785a"),i=o("17c2"),c=o("9112"),l=function(t){if(t&&t.forEach!==i)try{c(t,"forEach",i)}catch(e){t.forEach=i}};for(var s in a)a[s]&&l(n[s]&&n[s].prototype);l(r)},"17c2":function(t,e,o){"use strict";var n=o("b727").forEach,a=o("a640"),r=a("forEach");t.exports=r?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1da1":function(t,e,o){"use strict";o.d(e,"a",(function(){return a}));o("d3b7");function n(t,e,o,n,a,r,i){try{var c=t[r](i),l=c.value}catch(s){return void o(s)}c.done?e(l):Promise.resolve(l).then(n,a)}function a(t){return function(){var e=this,o=arguments;return new Promise((function(a,r){var i=t.apply(e,o);function c(t){n(i,a,r,c,l,"next",t)}function l(t){n(i,a,r,c,l,"throw",t)}c(void 0)}))}}},"1f68":function(t,e,o){"use strict";var n=o("83ab"),a=o("edd0"),r=o("861d"),i=o("1787"),c=o("7b0b"),l=o("1d80"),s=Object.getPrototypeOf,u=Object.setPrototypeOf,f=Object.prototype,p="__proto__";if(n&&s&&u&&!(p in f))try{a(f,p,{configurable:!0,get:function(){return s(c(this))},set:function(t){var e=l(this);i(t)&&r(e)&&u(e,t)}})}catch(d){}},"23dc":function(t,e,o){"use strict";var n=o("d44e");n(Math,"Math",!0)},3410:function(t,e,o){"use strict";var n=o("23e7"),a=o("d039"),r=o("7b0b"),i=o("e163"),c=o("e177"),l=a((function(){i(1)}));n({target:"Object",stat:!0,forced:l,sham:!c},{getPrototypeOf:function(t){return i(r(t))}})},"375d":function(t,e,o){"use strict";o("3ec2")},"3ec2":function(t,e,o){},"53ca":function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));o("a4d3"),o("e01a"),o("d28b"),o("d3b7"),o("3ca3"),o("ddb0");function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}},"944a":function(t,e,o){"use strict";var n=o("d066"),a=o("e065"),r=o("d44e");a("toStringTag"),r(n("Symbol"),"Symbol")},a15b:function(t,e,o){"use strict";var n=o("23e7"),a=o("e330"),r=o("44ad"),i=o("fc6a"),c=o("a640"),l=a([].join),s=r!==Object,u=s||!c("join",",");n({target:"Array",proto:!0,forced:u},{join:function(t){return l(i(this),void 0===t?",":t)}})},a224:function(t,e,o){},a640:function(t,e,o){"use strict";var n=o("d039");t.exports=function(t,e){var o=[][t];return!!o&&n((function(){o.call(null,e||function(){return 1},1)}))}},af4b:function(t,e,o){"use strict";o("a224")},b636:function(t,e,o){"use strict";var n=o("e065");n("asyncIterator")},c7eb:function(t,e,o){"use strict";o.d(e,"a",(function(){return a}));o("a4d3"),o("e01a"),o("b636"),o("d28b"),o("944a"),o("d9e2"),o("14d9"),o("fb6a"),o("b0c0"),o("0c47"),o("23dc"),o("3410"),o("1f68"),o("131a"),o("d3b7"),o("3ca3"),o("159b"),o("ddb0");var n=o("53ca");function a(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
a=function(){return e};var t,e={},o=Object.prototype,r=o.hasOwnProperty,i=Object.defineProperty||function(t,e,o){t[e]=o.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,o){return t[e]=o}}function p(t,e,o,n){var a=e&&e.prototype instanceof y?e:y,r=Object.create(a.prototype),c=new R(n||[]);return i(r,"_invoke",{value:j(t,o,c)}),r}function d(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",b="executing",g="completed",v={};function y(){}function C(){}function D(){}var w={};f(w,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x($([])));k&&k!==o&&r.call(k,l)&&(w=k);var S=D.prototype=y.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function o(a,i,c,l){var s=d(t[a],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==Object(n["a"])(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,c,l)}),(function(t){o("throw",t,c,l)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return o("throw",t,c,l)}))}l(s.arg)}var a;i(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,a){o(t,n,e,a)}))}return a=a?a.then(r,r):r()}})}function j(e,o,n){var a=m;return function(r,i){if(a===b)throw new Error("Generator is already running");if(a===g){if("throw"===r)throw i;return{value:t,done:!0}}for(n.method=r,n.arg=i;;){var c=n.delegate;if(c){var l=T(c,n);if(l){if(l===v)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=b;var s=d(e,o,n);if("normal"===s.type){if(a=n.done?g:h,s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=g,n.method="throw",n.arg=s.arg)}}}function T(e,o){var n=o.method,a=e.iterator[n];if(a===t)return o.delegate=null,"throw"===n&&e.iterator["return"]&&(o.method="return",o.arg=t,T(e,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var r=d(a,e.iterator,o.arg);if("throw"===r.type)return o.method="throw",o.arg=r.arg,o.delegate=null,v;var i=r.arg;return i?i.done?(o[e.resultName]=i.value,o.next=e.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,v):i:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,v)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function $(e){if(e||""===e){var o=e[l];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function o(){for(;++a<e.length;)if(r.call(e,a))return o.value=e[a],o.done=!1,o;return o.value=t,o.done=!0,o};return i.next=i}}throw new TypeError(Object(n["a"])(e)+" is not iterable")}return C.prototype=D,i(S,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:C,configurable:!0}),C.displayName=f(D,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,D):(t.__proto__=D,f(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,o,n,a,r){void 0===r&&(r=Promise);var i=new O(p(t,o,n,a),r);return e.isGeneratorFunction(o)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(S),f(S,u,"Generator"),f(S,l,(function(){return this})),f(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),o=[];for(var n in e)o.push(n);return o.reverse(),function t(){for(;o.length;){var n=o.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=$,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var o in this)"t"===o.charAt(0)&&r.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var o=this;function n(n,a){return c.type="throw",c.arg=e,o.next=n,a&&(o.method="next",o.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),E(o),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var n=o.completion;if("throw"===n.type){var a=n.arg;E(o)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,o,n){return this.delegate={iterator:$(e),resultName:o,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}},e4e9:function(t,e,o){"use strict";var n=function(){var t=this,e=t._self._c;return e("el-dialog",{staticClass:"common-pre-sale-dialog",attrs:{title:"商品选择",width:"900px",top:"5vh",visible:t.childrenVisible,"append-to-body":""},on:{"update:visible":function(e){t.childrenVisible=e},close:t.onClose},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-pagination",{attrs:{background:"","page-size":8,layout:"prev, pager, next, jumper",total:t.total,"hide-on-single-page":""},on:{"current-change":t.paginationCurrentChange}}),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.dialogClose}},[t._v("确定")])]},proxy:!0}])},[e("el-input",{staticStyle:{width:"220px"},attrs:{size:"small",clearable:"",placeholder:"商品名称/货号/条码"},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.getTableData(1))}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[e("template",{slot:"append"},[e("el-button",{attrs:{icon:"el-icon-search"},on:{click:function(e){return t.getTableData(1)}}})],1)],2),e("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData,size:"small","tooltip-effect":"light"},on:{"selection-change":t.selectionChange}},[t.selection?e("el-table-column",{attrs:{type:"selection",width:"55"}}):t._e(),t.radio?e("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-radio",{attrs:{label:o.$index},on:{change:t.tableRadioChange},model:{value:t.tableRadio,callback:function(e){t.tableRadio=e},expression:"tableRadio"}})]}}],null,!1,861188003)}):t._e(),e("el-table-column",{attrs:{label:"商品图标",width:"80"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-image",{staticClass:"img",attrs:{src:o.row.goods_img},scopedSlots:t._u([{key:"error",fn:function(){return[e("el-image",{staticClass:"img",attrs:{src:t.errorImage}})]},proxy:!0}],null,!0)})]}}])}),e("el-table-column",{attrs:{prop:"goods_name",label:"商品名称",width:"350"}}),e("el-table-column",{attrs:{prop:"advance_start_time",label:"预售开始时间",width:"180"}}),e("el-table-column",{attrs:{prop:"advance_end_time",label:"预售结束时间",width:"180"}})],1)],1)},a=[],r={name:"pre-sale-dialog",props:["visible","selection","radio"],watch:{visible:{handler:function(t){this.childrenVisible=t},immediate:!0},childrenVisible:function(t){this.$emit("update:visible",t)}},mounted:function(){this.getTableData()},data:function(){return{tableData:[],multipleSelection:[],childrenVisible:!1,total:0,errorImage:"/Public/images/empty-image-1.png",tableRadio:"",keyword:""}},methods:{getTableData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.$http.post("/Retail/Diy/getAdvanceList",{page:e,keyword:this.keyword,limit:8}).then((function(e){1==e.data.status&&(t.tableData=e.data.data,t.total=e.data.count)}))},paginationCurrentChange:function(t){this.getTableData(t)},selectionChange:function(t){this.multipleSelection=t},dialogClose:function(){this.$emit("preSaleSelect",this.multipleSelection),this.$emit("update:visible",!1)},onClose:function(){this.$refs.multipleTable.clearSelection(),this.radio&&(this.multipleSelection=[]),this.tableRadio=""},tableRadioChange:function(t){this.multipleSelection=[this.tableData[t]]}}},i=r,c=(o("375d"),o("2877")),l=Object(c["a"])(i,n,a,!1,null,null,null);e["a"]=l.exports}}]); |