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
7.9 KiB
1 line
7.9 KiB
4 years ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-29ba"],{"12Cd":function(e,t,a){"use strict";var i=a("wnCi");a.n(i).a},"5ydV":function(e,t,a){},tMlD:function(e,t,a){"use strict";var i=a("Y4Le"),n=a("Ew9n"),l=a("raay"),s=a("w4ZA"),r=a("3gPr"),c=a("CjUg"),o=a("8OTK"),d=a("6V3D"),u=a("h59h"),m=a("f6dm"),h=a("jHPx"),p={name:"ProductDetail",components:{SlideView:n.a,CRMDetailHead:l.a,DetailImg:d.a,CRMEditBaseInfo:s.a,RelativeFiles:r.a,RelativeHandle:c.a,CRMAllCreate:o.default,Sections:u.a},mixins:[m.a],props:{id:[String,Number],listenerIDs:{type:Array,default:function(){return["crm-main-container"]}},noListenerIDs:{type:Array,default:function(){return[]}},noListenerClass:{type:Array,default:function(){return["el-table__body"]}}},data:function(){return{loading:!1,crmType:"product",headDetails:[{title:"产品类别",value:""},{title:"产品单位",value:""},{title:"产品价格",value:""},{title:"产品编码",value:""}],tabCurrentName:"CRMEditBaseInfo",isCreate:!1}},computed:{tabNames:function(){return[{label:"详细资料",name:"CRMEditBaseInfo"},{label:this.getTabName("附件",this.tabsNumber.fileCount),name:"RelativeFiles"},{label:"操作记录",name:"RelativeHandle"}]},mainFileList:function(){return this.detailData&&this.detailData.cover_images?this.detailData.cover_images:[]},detailFileList:function(){return this.detailData&&this.detailData.details_images?this.detailData.details_images:[]}},mounted:function(){},methods:{getDetial:function(){var e=this;this.loading=!0,Object(i.i)({id:this.id}).then(function(t){e.loading=!1,e.detailData=t.data,e.headDetails[0].value=t.data.category_id_info,e.headDetails[1].value=t.data.unit,e.headDetails[2].value=Object(h.h)(t.data.price||0),e.headDetails[3].value=t.data.num}).catch(function(){e.loading=!1,e.hideView()})},hideView:function(){this.$emit("hide-view")},previewImage:function(e,t){this.$bus.emit("preview-image-bus",{index:t,data:e.map(function(e){return e.file_path&&(e.url=e.file_path),e})})}}},v=(a("12Cd"),a("KHd+")),f=Object(v.a)(p,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("slide-view",{directives:[{name:"empty",rawName:"v-empty",value:!e.canShowDetail,expression:"!canShowDetail"}],attrs:{"listener-ids":e.listenerIDs,"no-listener-ids":e.noListenerIDs,"no-listener-class":e.noListenerClass,"body-style":{padding:0,height:"100%"},"xs-empty-icon":"nopermission","xs-empty-text":"暂无权限"},on:{afterEnter:e.viewAfterEnter,close:e.hideView}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"crmDetailMain",staticClass:"detail-main"},[e.canShowDetail&&e.detailData?a("flexbox",{staticClass:"d-container",attrs:{direction:"column",align:"stretch"}},[a("c-r-m-detail-head",{attrs:{detail:e.detailData,"head-details":e.headDetails,id:e.id,"crm-type":e.crmType},on:{handle:e.detailHeadHandle,close:e.hideView}}),e._v(" "),a("flexbox",{staticClass:"d-container-bd",attrs:{align:"stretch"}},[a("el-tabs",{staticClass:"d-container-bd--left",attrs:{type:"border-card"},model:{value:e.tabCurrentName,callback:function(t){e.tabCurrentName=t},expression:"tabCurrentName"}},e._l(e.tabNames,function(t,i){return a("el-tab-pane",{key:i,attrs:{label:t.label,name:t.name,lazy:""}},["CRMEditBaseInfo"===t.name?a(t.name,{tag:"c-r-m-edit-base-info",attrs:{detail:e.detailData,id:e.id,"crm-type":e.crmType}},[a("sections",{staticClass:"b-cells",attrs:{title:"图片信息","content-height":"auto"}},[a("div",{staticClass:"image"},[e.mainFileList.length>0?a("div",{staticClass:"image-info"},[a("div",{staticClass:"image-info__label"},[e._v("产品图片")]),e._v(" "),a("div",{staticClass:"image-info__list"},e._l(e.mainFileList,function(t,i){return a("img",{directives:[{name:"src",rawName:"v-src",value:t.url||t.file_path,expression:"item.url||item.file_path"}],key:i,staticClass:"main-img",on:{click:function(t){e.previewImage(e.mainFileList,i)}}})}))]):e._e(),e._v(" "),e.detailFileList.length>0?a("div",{staticClass:"image-info"},[a("div",{staticClass:"image-info__label"},[e._v("产品详情图片")]),e._v(" "),a("div",{staticClass:"image-
|