1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-cabc8f1a"],{"2c87":function(t,e){t.exports="data:image/png;base64,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"},"83f1":function(t,e,i){var a=i("24fb"),o=i("1de5"),s=i("2c87");e=a(!1);var n=o(s);e.push([t.i,"#publish_first[data-v-cc136296]{background-color:#fff;height:100vh;overflow:scroll;overflow-x:hidden;position:relative}#publish_first .content[data-v-cc136296]{padding:0 .75rem;background-color:#fff;padding-bottom:2.1875rem}#publish_first .content .item[data-v-cc136296]{text-align:left;padding:.875rem 0;border-bottom:1px solid #f1f1f1}#publish_first .content .item .input[data-v-cc136296]{margin-top:1.125rem}#publish_first .content .item .input input[data-v-cc136296]{outline:none;border:none;width:100%;font-size:12px}#publish_first .content .item-category[data-v-cc136296]{text-align:left;padding:.875rem 0;border-bottom:1px solid #f1f1f1}#publish_first .content .item-category .category-spe[data-v-cc136296]{margin-top:.75rem}#publish_first .content .item-category .category-spe .category-btn[data-v-cc136296]{width:7.1875rem;height:1.875rem;background-image:-webkit-gradient(linear,left top,left bottom,from(#ff2c29),to(#ff2c29)),-webkit-gradient(linear,left top,left bottom,from(#ff1f1c),to(#ff1f1c));background-image:-webkit-linear-gradient(#ff2c29,#ff2c29),-webkit-linear-gradient(#ff1f1c,#ff1f1c);background-image:linear-gradient(#ff2c29,#ff2c29),linear-gradient(#ff1f1c,#ff1f1c);background-blend-mode:normal,normal;border-radius:.9375rem;color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;font-size:16px;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#publish_first .content .item-upload[data-v-cc136296]{text-align:left;padding-top:.875rem}#publish_first .content .item-upload .upload[data-v-cc136296]{margin-top:1rem}#publish_first .content .item-upload .img_uploader[data-v-cc136296]{margin-top:1rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}#publish_first .content .item-upload .img_uploader .photoBox[data-v-cc136296]{position:relative;width:4.5rem;height:4.5rem;border:1px dashed #c0ccda;margin-right:.2rem;margin-left:.2rem;margin-bottom:.2rem}#publish_first .content .item-upload .img_uploader .photoBox div[data-v-cc136296],#publish_first .content .item-upload .img_uploader .photoBox img[data-v-cc136296]{width:100%;height:100%}#publish_first .content .item-upload .img_uploader .photoBox i[data-v-cc136296]{width:1.2rem;height:1.2rem;position:absolute;top:.1rem;right:.1rem;background:url("+n+");background-size:100%}#publish_first .content .item-upload .img_uploader .van-uploader[data-v-cc136296]{width:4.5rem;height:4.5rem;overflow:hidden;background:#f2f2f2;margin-left:.2rem;margin-right:.875rem;margin-bottom:.9375rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#publish_first .content .item-upload .img_uploader .van-uploader .van-icon[data-v-cc136296]{font-size:24px;line-height:4.5rem;color:#666}#publish_first .content .item-add[data-v-cc136296]{text-align:left;padding-top:.875rem;padding-bottom:.375rem;border-bottom:1px solid #f1f1f1}#publish_first .content .item-add .add-spe[data-v-cc136296]{margin-top:.75rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#publish_first .content .item-add .add-spe .add-btn[data-v-cc136296]{padding:0 .5rem;height:1.875rem;border-radius:.9375rem;border:.0625rem solid #ff1f1c;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#ff1f1c}#publish_first .content .item-add .add-spe .add-btn .icon[data-v-cc136296]{margin-right:.25rem;font-size:18px}#publish_first .content .item-textarea[data-v-cc136296]{text-align:left;padding-top:.875rem}#publish_first .content .item-textarea .txt[data-v-cc136296]{margin-top:1rem;margin-left:.25rem;border:none;outline:none;background-color:#fafafa;padding-top:.75rem;padding-left:.75rem;height:8.5rem;width:100%;border-radius:.3125rem}#publish_first .wrap[data-v-cc136296]{padding:.5rem 1rem;width:100%;height:3.0625rem;background-color:#fff;-webkit-box-shadow:0 0 .5rem 0 rgba(0,0,0,.08);box-shadow:0 0 .5rem 0 rgba(0,0,0,.08);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#publish_first .wrap[data-v-cc136296],#publish_first .wrap .left[data-v-cc136296]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#publish_first .wrap .left[data-v-cc136296]{color:red}#publish_first .wrap .right-btn[data-v-cc136296]{width:5.8125rem;height:1.875rem;background-color:red;border-radius:.9375rem;color:#fff}#publish_first .agreement-pop .tit[data-v-cc136296],#publish_first .wrap .right-btn[data-v-cc136296]{-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#publish_first .agreement-pop .tit[data-v-cc136296]{width:100%;position:relative;height:2.8125rem;border-bottom:1px solid #ccc;font-size:18px}#publish_first .agreement-pop .tit i[data-v-cc136296]{position:absolute;right:2rem}#publish_first .agreement-pop .pop-content[data-v-cc136296]{padding:0 .875rem;padding-top:.75rem;text-align:left}#publish_first .pop[data-v-cc136296]{border-radius:1rem;background-color:#fff}#publish_first .pop .top[data-v-cc136296]{padding:1rem;border-bottom:1px solid #e2e2e2}#publish_first .pop .top .input[data-v-cc136296]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;color:#666;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;outline:none;border:none;border-bottom:1px solid #e2e2e2;margin-bottom:1rem;width:100%;padding-bottom:.5rem}#publish_first .pop .top .input[data-v-cc136296]:last-child{margin-bottom:0}#publish_first .pop .bottom[data-v-cc136296]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:3rem;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#publish_first .pop .bottom div[data-v-cc136296]{width:50%}",""]),t.exports=e},"85e6":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"publish_first",attrs:{id:"publish_first"}},[i("c-title",{attrs:{hide:!1,text:"拍品发布"}}),i("div",{staticClass:"content"},[i("div",{staticClass:"item"},[i("div",{staticClass:"title"},[t._v("拍品标题")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.title,expression:"form.title"}],attrs:{type:"text",placeholder:"请输入拍品标题"},domProps:{value:t.form.title},on:{input:function(e){e.target.composing||t.$set(t.form,"title",e.target.value)}}})])]),i("div",{staticClass:"item"},[i("div",{staticClass:"title"},[t._v("拍品单位(如: 个/件/包)")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.sku,expression:"form.sku"}],attrs:{type:"text",placeholder:"请输入拍品单位"},domProps:{value:t.form.sku},on:{input:function(e){e.target.composing||t.$set(t.form,"sku",e.target.value)}}})])]),i("div",{staticClass:"item"},[i("div",{staticClass:"title"},[t._v("拍品库存")]),i("div",{staticClass:"input"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.form.stock,expression:"form.stock"}],attrs:{type:"number",placeholder:"请输入拍品库存"},domProps:{value:t.form.stock},on:{input:function(e){e.target.composing||t.$set(t.form,"stock",e.target.value)}}})])]),i("div",{staticClass:"item-category"},[i("div",{staticClass:"title"},[t._v("拍品分类")]),i("section",{ref:"classify",staticStyle:{height:"48px",background:"white","margin-top":"10px","line-height":"48px"}},[i("span",{staticClass:"block",staticStyle:{float:"left"}},[i("van-button",{staticStyle:{"max-width":"15rem",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap","border-radius":"5px",color:"#1f2d3d",border:"1px solid #bfcbd9","min-width":"5rem"},attrs:{plain:"",type:"primary"},on:{click:t.seleRegional}},[t._v(t._s(t.regional)+" ")])],1)])]),i("div",{staticClass:"item-upload"},[i("div",{staticClass:"title"},[t._v("拍品图片")]),i("div",{staticClass:"img_uploader"},[t.form.thumb?i("div",{staticClass:"photoBox"},[i("img",{staticStyle:{width:"100%"},attrs:{src:t.form.thumb}}),i("i",{on:{click:t.removeImg1}})]):t._e(),i("van-uploader",{attrs:{"after-read":t.onRead}},[i("van-icon",{attrs:{name:"photograph"}})],1)],1)]),i("div",{staticClass:"item-upload"},[i("div",{staticClass:"title"},[t._v("其他图片")]),i("div",{staticClass:"img_uploader"},[t._l(t.form.thumb_url,(function(e,a){return[i("div",{key:a,staticClass:"photoBox"},[i("img",{staticStyle:{width:"100%"},attrs:{src:e}}),i("i",{on:{click:function(e){return t.removeImg(a)}}})])]})),i("van-uploader",{attrs:{"after-read":t.multipleMethod_1,multiple:""}},[i("van-icon",{attrs:{name:"photograph"}})],1)],2)]),t.fun.isTextEmpty(t.form.goods_id)?i("div",{staticClass:"item-textarea"},[i("div",{staticClass:"title"},[t._v("拍品描述")]),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.describe,expression:"form.describe"}],staticClass:"txt",attrs:{placeholder:"拍品描述"},domProps:{value:t.form.describe},on:{input:function(e){e.target.composing||t.$set(t.form,"describe",e.target.value)}}})]):t._e(),t.fun.isTextEmpty(t.form.goods_id)?i("div",{staticClass:"item-upload"},[i("div",{staticClass:"title"},[t._v("拍品详情")]),i("div",{staticClass:"img_uploader"},[t._l(t.form.content,(function(e,a){return[i("div",{key:a,staticClass:"photoBox"},[i("img",{staticStyle:{width:"100%"},attrs:{src:e}}),i("i",{on:{click:function(e){return t.removeImg2(a)}}})])]})),i("van-uploader",{attrs:{"after-read":t.multipleMethod_2,multiple:""}},[i("van-icon",{attrs:{name:"photograph"}})],1)],2)]):t._e(),i("div",{staticClass:"item-add"},[i("div",{staticClass:"title"},[t._v("拍品属性")]),i("div",{staticStyle:{display:"flex","flex-wrap":"wrap"}},[t._l(t.param,(function(e,a){return i("div",{key:a,staticClass:"add-spe",staticStyle:{"margin-right":"0.5rem"}},[i("div",{staticClass:"add-btn"},[i("span",[t._v(t._s(e.attrname))]),t._v(":"),i("span",[t._v(t._s(e.attrvalue))]),t._v(" "),i("i",{staticClass:"iconfont icon-close11",staticStyle:{"margin-left":"0.5rem","font-size":"12px"},on:{click:function(e){return t.deleteAttr(a)}}})])])})),i("div",{staticClass:"add-spe"},[i("div",{staticClass:"add-btn",on:{click:t.addAttr}},[i("span",{staticClass:"icon"},[t._v("+")]),i("span",[t._v("添加属性")])])])],2)])]),i("div",{staticClass:"wrap"},[i("div",{staticClass:"left"},[i("van-checkbox",{attrs:{"checked-color":"#ff0000"},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}}),i("span",{on:{click:function(e){e.stopPropagation(),t.show1=!0}}},[t._v("《竞拍服务协议》")])],1),i("div",{staticClass:"right-btn",on:{click:function(e){return e.stopPropagation(),t.toNext.apply(null,arguments)}}},[t._v("下一步")])]),i("van-popup",{staticStyle:{width:"100%",height:"100%"},attrs:{position:"right"},model:{value:t.show1,callback:function(e){t.show1=e},expression:"show1"}},[i("div",{staticClass:"agreement-pop"},[i("div",{staticClass:"tit"},[i("span",[t._v("竞拍服务协议")]),i("i",{staticClass:"iconfont icon-close11",on:{click:function(e){t.show1=!1}}})]),i("div",{staticClass:"pop-content",domProps:{innerHTML:t._s(t.protocol)}})])]),i("van-popup",{staticStyle:{width:"70%"},attrs:{position:"center","close-on-masker":!1,round:""},model:{value:t.show3,callback:function(e){t.show3=e},expression:"show3"}},[i("div",{staticClass:"pop"},[i("div",{staticClass:"top"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.attrname,expression:"attrname"}],staticClass:"input",attrs:{placeholder:"属性名",type:"text"},domProps:{value:t.attrname},on:{input:function(e){e.target.composing||(t.attrname=e.target.value)}}}),i("input",{directives:[{name:"model",rawName:"v-model",value:t.attrvalue,expression:"attrvalue"}],staticClass:"input",attrs:{placeholder:"属性值",type:"text"},domProps:{value:t.attrvalue},on:{input:function(e){e.target.composing||(t.attrvalue=e.target.value)}}})]),i("div",{staticClass:"bottom"},[i("div",{staticStyle:{"border-right":"#e2e2e2"},on:{click:function(e){t.show3=!1}}},[t._v("取消")]),i("div",{staticStyle:{color:"#ef3e3e"},on:{click:t.pushAttr}},[t._v("确定")])])])]),i("van-popup",{staticClass:"fenleiDiv",staticStyle:{position:"absolute"},attrs:{position:"bottom",overlay:!0},on:{"click-overlay":t.isCoverLayer},model:{value:t.dateshow_1,callback:function(e){t.dateshow_1=e},expression:"dateshow_1"}},[i("van-picker",{attrs:{columns:t.columns,"show-toolbar":""},on:{change:t.onChange,cancel:t.onCancelbtn,confirm:t.onConfirmbtn}})],1)],1)},o=[],s=(i("e7e5"),i("d399")),n=i("ade3"),r=(i("d3b7"),i("159b"),i("14d9"),i("a434"),i("d81d"),i("ddb0"),i("b0c0"),i("a9e3"),i("b64b"),i("a15b"),i("ac1f"),i("5319"),i("3ca3"),i("2b3d"),i("9861"),i("88a7"),i("271a"),i("5494"),i("00b4"),i("6968")),l=document.createElement("canvas"),c=l.getContext("2d"),d={data:function(){return{cat_level:"2",linshi1:[],linshi2:[],attrvalue:"",attrname:"",param:[],show3:!1,columns:[{values:[],className:"column1",defaultIndex:0},{values:[],className:"column2",defaultIndex:0},{values:[],className:"column3",defaultIndex:0}],form:{title:"",sku:"",describe:"",thumb:"",thumb_url:[],content:[],stock:""},checked:!0,protocol:"",imageUrl:"",fileList2:[],photosize:4194304,goodsHandle_1:{},dateshow_1:!1,regional:"请选择商品分类",onConfirmbtnIndex:[],titleTest:"商品发布",isType:!1,cargon_data:{title:"",sku:"",thumb:"",price:"",market_price:"",cost_price:"",stock:""},uploadUrl:"",fileList1:[],upNumMax:0,upNumMaxOther:0,fileList3:[],fileList4:[],fileList5:[],options:[],selectedOptions3:[],sectionOptions:[],jumpState:!0,number:1,fuwenben:"0",show1:!1,show2:!1,checkbox3:["2"],radio1:1,radio:"1",list:["a","b","c"],result:["a","b"]}},activated:function(){window.scrollTo(0,0),this.initData(),this.getAgreement(),this.init(),this.getJson(),this.$route.params.id&&(this.form.goods_id=this.$route.params.id,this.getInfo())},methods:{getInfo:function(){var t=this,e={art:"editGoods",goods_id:this.$route.params.id};$http.get("plugin.auction.api.index.getAuctionData",e,"获取中").then((function(e){1==e.result?(t.form.title=e.data.editGoods.title,t.form.sku=e.data.editGoods.sku,t.form.thumb=e.data.editGoods.thumb,t.form.describe=e.data.editGoods.has_one_auction_goods.describe,t.form.content=e.data.editGoods.content,t.form.thumb_url=e.data.editGoods.thumb_url,t.form.stock=e.data.editGoods.stock,e.data.editGoods.has_many_params.forEach((function(e,i,a){var o={};o.attrvalue=e.value,o.attrname=e.title,t.param.push(o)})),t.selectedOptions3=e.data.editGoods.has_many_goods_category[0].category_ids.split(","),t.fuwenben="1"):t.$dialog.alert({message:e.msg})})).catch((function(t){}))},initData:function(){this.cat_level="2",this.attrvalue="",this.attrname="",this.param=[],this.show3=!1,this.form={sku:"",describe:"",thumb:"",thumb_url:[],content:[],stock:""},this.checked=!0,this.show1=!1,this.protocol="",this.photosize=4194304,this.imageUrl="",this.fileList2=[],this.photosize=4194304,this.goodsHandle_1={},this.dateshow_1=!1,this.regional="请选择商品分类",this.onConfirmbtnIndex=[],this.titleTest="商品发布",this.isType=!1,this.cargon_data={title:"",sku:"",thumb:"",price:"",market_price:"",cost_price:"",stock:""},this.imageUrl="",this.uploadUrl="",this.fileList1=[],this.fileList2=[],this.upNumMax=0,this.upNumMaxOther=0,this.fileList3=[],this.fileList4=[],this.fileList5=[],this.options=[],this.selectedOptions3=[],this.sectionOptions=[],this.jumpState=!0,this.number=1,this.show1=!1,this.show2=!1,this.checkbox3=["2"],this.radio1=1,this.radio="1",this.list=["a","b","c"],this.result=["a","b"],this.fuwenben="0"},deleteAttr:function(t){this.param.splice(t,1)},pushAttr:function(){var t={attrname:this.attrname,attrvalue:this.attrvalue};this.param.push(t),this.show3=!1},addAttr:function(){this.show3=!0,this.attrname="",this.attrvalue=""},clearSrcoll:function(){var t,e,i=1;e=setInterval((function(){t=document.documentElement.scrollTop||document.body.scrollTop,t-=i,window.scrollTo(0,t),t+=i,window.scrollTo(0,t),clearInterval(e)}),1)},init:function(){for(var t in this.cargon_data)this.cargon_data[t]="";this.isType=this.fun.isTextEmpty(this.$route.params.goods_id),this.selectedOptions3=[],this.imageUrl="",this.fileList1=[],this.fileList2=[],this.fileList3=[],this.fileList4=[],this.upNumMax=0,this.upNumMaxOther=0,this.regional="请选择商品分类"},goodsHandlefunction_1:function(t){var e={},i=t.map((function(t,e){return t.label}));this.columns[0].values=i,Array.isArray(t[0].children)?(this.columns[1].values=t[0].children.map((function(t,e){return t.label})),t[0].children[0]&&(Array.isArray(t[0].children[0].children)?this.columns[2].values=t[0].children[0].children.map((function(t,e){return t.label})):this.columns[2].values=[])):this.columns[1].values=[];for(var a=0;a<i.length;a++){Array.isArray(t[a].children)?e[i[a]]=t[a].children.map((function(t,e){return t.label})):e[i[a]]=[];for(var o=0;o<t[a].children.length;o++)if(Array.isArray(t[a].children[o].children)){var s=t[a].children[o].children.map((function(t,e){return t.label}));e[i[a]][o]=Object(n["a"])({},e[i[a]][o],s)}else e[i[a]][o]=Object(n["a"])({},e[i[a]][o],[])}return e},getJson:function(){var t=this,e=this,i={art:"getGoodsCategory"};$http.get("plugin.auction.api.index.getAuctionData",i,"加载中").then((function(i){if(1===i.result){if("2"==e.cat_level){e.sectionOptions=[];for(var a=0;a<i.data.getGoodsCategory.length;a++){e.sectionOptions.push({id:i.data.getGoodsCategory[a].id,value:i.data.getGoodsCategory[a].id,label:i.data.getGoodsCategory[a].name,children:[]});for(var o=0;o<i.data.getGoodsCategory[a].childrens.length;o++)e.sectionOptions[a].children.push({id:i.data.getGoodsCategory[a].childrens[o].id,value:i.data.getGoodsCategory[a].childrens[o].id,label:i.data.getGoodsCategory[a].childrens[o].name})}e.options=e.sectionOptions,e.goodsHandle_1=e.goodsHandlefunction_1(e.options)}else if("3"==e.cat_level){e.sectionOptions=[];for(var s=0;s<i.data.getGoodsCategory.length;s++)if(e.sectionOptions.push({id:i.data.getGoodsCategory[s].id,value:i.data.getGoodsCategory[s].id,label:i.data.getGoodsCategory[s].name,children:[]}),!i.data.getGoodsCategory[s].childrens||i.data.getGoodsCategory[s].childrens.length<1);else for(var n=0;n<i.data.getGoodsCategory[s].childrens.length;n++)if(e.sectionOptions[s].children.push({id:i.data.getGoodsCategory[s].childrens[n].id,value:i.data.getGoodsCategory[s].childrens[n].id,label:i.data.getGoodsCategory[s].childrens[n].name,children:[]}),!i.data.getGoodsCategory[s].childrens[n].childrens||i.data.getGoodsCategory[s].childrens[n].childrens.length<1);else for(var r=0;r<i.data.getGoodsCategory[s].childrens[n].childrens.length;r++)e.sectionOptions[s].children[n].children.push({id:i.data.getGoodsCategory[s].childrens[n].childrens[r].id,value:i.data.getGoodsCategory[s].childrens[n].childrens[r].id,label:i.data.getGoodsCategory[s].childrens[n].childrens[r].name});e.options=e.sectionOptions,e.goodsHandle_1=e.goodsHandlefunction_1(e.options)}}else t.$dialog.alert({message:i.msg});e.getGoodsJson()}),(function(t){}))},getGoodsJson:function(){var t=this;if(!t.isType){if(t.selectedOptions3=[],t.selectedOptions3=[Number(t.DataInfo.category_ids.parentid),Number(t.DataInfo.category_ids.childid),Number(t.DataInfo.category_ids.thirdid)],Number(t.DataInfo.category_ids.parentid)){var e=[],i=0,a=0;if(t.options.forEach((function(a,o,s){a.id==t.DataInfo.category_ids.parentid&&(i=o,e.push(a.label))})),t.columns[0].defaultIndex=i,Number(t.DataInfo.category_ids.childid)&&(t.options[i].children.forEach((function(i,o,s){i.id==t.DataInfo.category_ids.childid&&(a=o,e.push(i.label))})),e.length>0&&(t.columns[1].values=t.goodsHandle_1[e[0]].map((function(t,e){return Object.keys(t)[0]}))),t.columns[1].defaultIndex=a,Number(t.DataInfo.category_ids.thirdid))){t.options[i].children[a].children.forEach((function(i,a,o){i.id==t.DataInfo.category_ids.thirdid&&e.push(i.label)}));var o=[];if(e.length>0)for(var s=0;s<t.goodsHandle_1[e[0]].length;s++)Object.keys(t.goodsHandle_1[e[0]][s])[0]==e[1]&&(o=t.goodsHandle_1[e[0]][s][e[1]]);t.columns[2].values=o,t.columns[2].defaultIndex=a}t.regional=e.join("/")}if(t.cargon_data.title=t.DataInfo.title.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"),t.cargon_data.sku=t.DataInfo.sku,t.imageUrl=t.DataInfo.thumb,t.cargon_data.thumb=t.DataInfo.thumb,null!=t.DataInfo.thumb_url&&""!=t.DataInfo.thumb_url){t.fileList3=[],t.fileList4=[],t.upNumMax=t.DataInfo.thumb_url.length;for(var n=0;n<t.DataInfo.thumb_url.length;n++)t.fileList3.push({url:t.DataInfo.thumb_url[n]}),t.fileList4.push({url:t.DataInfo.thumb_url[n]})}t.cargon_data.price=t.DataInfo.price,t.cargon_data.market_price=t.DataInfo.market_price,t.cargon_data.cost_price=t.DataInfo.cost_price,t.cargon_data.stock=t.DataInfo.stock}},seleRegional:function(){this.dateshow_1=!0},onCancelbtn:function(t,e){this.dateshow_1=!1},onConfirmbtn:function(t,e){var i=[],a=this.options;if(Array.isArray(a)&&a.length>0&&Array.isArray(e)){if(i.push(a[e[0]].id),!(Array.isArray(a[e[0]].children)&&a[e[0]].children.length>0))return this.$notify("至少要选择二级分类"),this.dateshow_1=!1,void this.$emit("CoverLayer",!1);i.push(a[e[0]].children[e[1]].id),Array.isArray(a[e[0]].children[e[1]].children)&&a[e[0]].children[e[1]].children.length>0&&i.push(a[e[0]].children[e[1]].children[e[2]].id)}this.selectedOptions3=i,this.dateshow_1=!1,this.$emit("CoverLayer",!1),Array.isArray(t)?this.regional=t.join("/"):this.regional=t,this.onConfirmbtnIndex=e},onChange:function(t,e,i){var a=t.getColumnValue(0),o=t.getColumnValue(1);if(0==i)if(this.goodsHandle_1[e[0]].length>0){var s=this.goodsHandle_1[e[0]].map((function(t,e){return Object.keys(t)[0]}));t.setColumnValues(1,s),t.setColumnValues(2,this.goodsHandle_1[e[0]][0][s[0]])}else t.setColumnValues(1,[]),t.setColumnValues(2,[]);else if(1==i){for(var n=[],r=0;r<this.goodsHandle_1[a].length;r++)Object.keys(this.goodsHandle_1[a][r])[0]==o&&(n=this.goodsHandle_1[a][r][o]);t.setColumnValues(2,n)}},onRead:function(t,e){s["a"].loading({message:"上传中",forbidClick:!0});var i=new FormData;!0===e?i.append("file",t):i.append("file",t.file);var a=this;axios.post(this.fun.getRealUrl("upload.uploadPic"),i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(i){var o=i.data;1===o.result?(s["a"].clear(),a.imageUrl=!0===e?URL.createObjectURL(t):URL.createObjectURL(t.file),a.form.thumb=o.data.img_url):(s["a"].clear(),Object(s["a"])(o.msg))})).catch((function(t){s["a"].clear()}))},multipleMethod_1:function(t,e){if(t&&t.length)for(var i=0;i<t.length;i++)this.onRead_1(t[i],e);else this.onRead_1(t,e)},multipleMethod_2:function(t,e){if(t&&t.length)for(var i=0;i<t.length;i++)this.onRead_2(t[i],e);else this.onRead_2(t,e)},onRead_1:function(t,e){s["a"].loading({message:"上传中",forbidClick:!0});var i=new FormData;!0===e?i.append("file",t):i.append("file",t.file);var a=this;axios.post(this.fun.getRealUrl("upload.uploadPic"),i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(i){var o=i.data;1===o.result?(s["a"].clear(),!0===e?a.fileList2.push({url:URL.createObjectURL(t)}):a.fileList2.push({url:URL.createObjectURL(t.file)}),a.form.thumb_url.push(o.data.img_url)):(s["a"].clear(),Object(s["a"])(o.msg))})).catch((function(t){s["a"].clear()}))},onRead_2:function(t,e){s["a"].loading({message:"上传中",forbidClick:!0});var i=new FormData;!0===e?i.append("file",t):i.append("file",t.file);var a=this;axios.post(this.fun.getRealUrl("upload.uploadPic"),i,{headers:{"Content-Type":"multipart/form-data"}}).then((function(i){var o=i.data;1===o.result?(s["a"].clear(),!0===e?a.fileList5.push({url:URL.createObjectURL(t)}):a.fileList5.push({url:URL.createObjectURL(t.file)}),a.form.content.push(o.data.img_url)):(s["a"].clear(),Object(s["a"])(o.msg))})).catch((function(t){s["a"].clear()}))},onphotosize2:function(t){this.imgPreview(t.file,2)},imgPreview:function(t,e){var i=this;if(t&&window.FileReader&&/^image/.test(t.type)){var a=new FileReader;a.readAsDataURL(t),a.onloadend=function(){var e=this.result,a=new Image;a.src=e,a.onload=function(){var e=this.width,o=this.height,s=400,n=400,r=e,d=o;(e>s||o>n)&&(e/o>s/n?(r=s,d=Math.round(s*(o/e))):(d=n,r=Math.round(n*(e/o)))),l.width=r,l.height=d,c.clearRect(0,0,r,d),c.drawImage(a,0,0,r,d),l.toBlob((function(t){i.multipleMethod_1(t,!0)}),t.type||"image/png")}}}},removeImg:function(t){this.form.thumb_url.splice(t,1)},removeImg1:function(){this.form.thumb=""},removeImg2:function(t){this.form.content.splice(t,1)},toNext:function(){if(this.fun.isTextEmpty(this.form.title))Object(s["a"])("请输入拍品标题");else if(this.fun.isTextEmpty(this.form.sku))Object(s["a"])("请输入拍品单位");else if(this.selectedOptions3.length<=0)Object(s["a"])("请选择商品分类");else if(this.checked){var t={form:this.form,param_title:this.param.length>0?this.param.map((function(t){return t.attrname})):[],param_value:this.param.length>0?this.param.map((function(t){return t.attrvalue})):[],category:this.selectedOptions3};this.$router.push(this.fun.getUrl("publishSecond",t))}else Object(s["a"])("请同意竞拍服务协议")},getAgreement:function(){var t=this;$http.get("plugin.auction.api.index.getAuctionData",{},"获取中").then((function(e){1==e.result?(t.protocol=e.data.getAgreement.protocol,t.cat_level=e.data.getAgreement.cat_level):t.$dialog.alert({message:e.msg})})).catch((function(t){}))}},components:{cTitle:r["a"]}},p=d,u=p,h=(i("a891"),i("2877")),f=Object(h["a"])(u,a,o,!1,null,"cc136296",null);e["default"]=f.exports},a891:function(t,e,i){"use strict";i("c117")},c117:function(t,e,i){var a=i("83f1");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var o=i("499e").default;o("82670458",a,!0,{sourceMap:!1,shadowMode:!1})}}]); |