1 |
- import{d as X,ai as Y,b as Z,e as W,r as T,g as B,O as $,o,c as P,a as e,k as p,w as r,i as a,S as m,F as O,J as ee,l as u,j as R,aU as te,aj as ae,ak as re,I as le,s as se,n as oe,E as ie,p as pe,_ as _e,__tla as ce}from"./index-66208f93.js";import{g as me,__tla as ue}from"./index-1b3f29aa.js";import z,{__tla as de}from"./ProductAttributes-08049645.js";import fe,{__tla as ne}from"./ProductPropertyAddForm-246d1f9d.js";import{u as ye,__tla as ke}from"./useMessage-798a77de.js";import{r as I,__tla as be}from"./formRules-f0247544.js";import n,{__tla as he}from"./SkuList-2f6b2127.js";import M,{__tla as ge}from"./MobileSkuList-245aeff9.js";import{__tla as Te}from"./PcComponents.css_vue_type_style_index_0_src_00d8480b_scoped_00d8480b_lang-6620fa8a.js";import{__tla as ve}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-e54b32e6.js";import{__tla as De}from"./index-4eee12bb.js";import{__tla as Pe}from"./el-image-viewer-3d1b9860.js";import{__tla as Re}from"./UploadImg-866c0e44.js";import{__tla as we}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-d74843b7.js";import{__tla as Fe}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-fc10c60c.js";import{__tla as Se}from"./el-text-3f15b2ca.js";import{__tla as Le}from"./property-f420ec74.js";import{__tla as xe}from"./Dialog-948825d3.js";import{__tla as Ce}from"./el-image-5afdbf9a.js";let N,Ve=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return ke}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ce}catch{}})()]).then(async()=>{let w,F,S,L;w={key:1},F={class:"mobile-card-title"},S={class:"mobile-card-title"},L={class:"mobile-card-title"},N=_e(X({name:"ProductSpuSkuForm",__name:"SkuForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:Y.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:A,emit:E}){const J=Z(),y=W(()=>J.getMobile),d=[{name:"stock",rule:l=>l>=0,message:"\u5546\u54C1\u5E93\u5B58\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E 1 "},{name:"price",rule:l=>l>=.01,message:"\u5546\u54C1\u9500\u552E\u4EF7\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E 0.01 \u5143"},{name:"marketPrice",rule:l=>l>=.01,message:"\u5546\u54C1\u5E02\u573A\u4EF7\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E 0.01 \u5143"},{name:"costPrice",rule:l=>l>=.01,message:"\u5546\u54C1\u6210\u672C\u4EF7\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E 0.00 \u5143"},{name:"settlementPrice",rule:l=>l>=.01,message:"\u5546\u54C1\u7ED3\u7B97\u4EF7\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E 0.00 \u5143"}],q=ye(),x=i,C=T(),f=T(),s=T([]),c=T(),t=B({specType:!1,subCommissionType:!1,skus:[]}),k=B({specType:[I],subCommissionType:[I]});$(()=>x.propFormData,l=>{l&&(te(t,l),s.value=me(l))},{immediate:!0});const G=E;A({validate:async()=>{if(f)try{c.value.validateSku(),await e(f).validate(),Object.assign(x.propFormData,t)}catch(l){throw q.error("\u3010\u5E93\u5B58\u4EF7\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),G("update:activeName","sku"),l}}});const V=()=>{s.value=[],t.skus=[{price:0,marketPrice:0,costPrice:0,settlementPrice:0,barCode:"",picUrl:"",stock:0,promotionFee:0,mark:"",weight:0,volume:0,firstBrokeragePrice:0,secondBrokeragePrice:0,highPrecisionSettlementPrice:0}]},j=l=>{c.value.generateTableData(l)};return(l,b)=>{const h=ae,U=re,_=le,H=se,g=ee,v=oe,K=ie,Q=pe;return o(),P(O,null,[e(y)?(o(),P("div",w,[a(g,{ref_key:"formRef",ref:f,model:e(t),rules:e(k),disabled:i.isDetail,class:"mobile-card"},{default:r(()=>[R("div",F,[a(v,{icon:"ep:list"}),u(" \u5546\u54C1\u89C4\u683C ")]),a(_,{props:"specType"},{default:r(()=>[a(U,{modelValue:e(t).specType,"onUpdate:modelValue":b[1]||(b[1]=D=>e(t).specType=D),onChange:V,class:"w-80"},{default:r(()=>[a(h,{label:!1,class:"radio"},{default:r(()=>[u("\u5355\u89C4\u683C")]),_:1}),a(h,{label:!0},{default:r(()=>[u("\u591A\u89C4\u683C")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules","disabled"]),a(g,{ref_key:"formRef",ref:f,model:e(t),rules:e(k),disabled:i.isDetail,class:"mobile-card"},{default:r(()=>[R("div",S,[a(v,{icon:"ep:list"}),u(" \u5546\u54C1\u5C5E\u6027 ")]),e(t).specType?m("",!0):(o(),p(_,{key:0},{default:r(()=>[e(y)?(o(),p(e(M),{key:1,ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"is-detail":i.isDetail,"property-list":e(s),"rule-config":d},null,8,["prop-form-data","is-detail","property-list"])):(o(),p(e(n),{key:0,ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"property-list":e(s),"rule-config":d},null,8,["prop-form-data","property-list"]))]),_:1})),e(t).specType?(o(),p(_,{key:1},{default:r(()=>[a(z,{"property-list":e(s),onSuccess:j,"is-detail":i.isDetail},null,8,["property-list","is-detail"])]),_:1})):m("",!0)]),_:1},8,["model","rules","disabled"]),e(t).specType&&e(s).length>0&&!e(y)?(o(),p(g,{key:0,ref_key:"formRef",ref:f,model:e(t),rules:e(k),disabled:i.isDetail,class:"mobile-card"},{default:r(()=>[R("div",L,[a(v,{icon:"ep:list"}),u(" \u89C4\u683C\u5217\u8868 ")]),a(Q,null,{default:r(()=>[a(K,{span:24},{default:r(()=>[a(_,null,{default:r(()=>[a(e(n),{ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"property-list":e(s),"rule-config":d,"is-detail":i.isDetail},null,8,["prop-form-data","property-list","is-detail"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules","disabled"])):m("",!0),e(t).specType&&e(s).length>0&&e(y)?(o(),p(e(M),{key:1,ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"property-list":e(s),"rule-config":d,"is-detail":i.isDetail},null,8,["prop-form-data","property-list","is-detail"])):m("",!0)])):(o(),p(g,{key:0,ref_key:"formRef",ref:f,model:e(t),rules:e(k),"label-width":"120px",disabled:i.isDetail,class:"noBorder"},{default:r(()=>[a(_,{label:"\u5546\u54C1\u89C4\u683C",props:"specType"},{default:r(()=>[a(U,{modelValue:e(t).specType,"onUpdate:modelValue":b[0]||(b[0]=D=>e(t).specType=D),onChange:V,class:"w-80"},{default:r(()=>[a(h,{label:!1,class:"radio"},{default:r(()=>[u("\u5355\u89C4\u683C")]),_:1}),a(h,{label:!0},{default:r(()=>[u("\u591A\u89C4\u683C")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(t).specType?m("",!0):(o(),p(_,{key:0,class:"skulist"},{default:r(()=>[a(e(n),{ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"property-list":e(s),"rule-config":d},null,8,["prop-form-data","property-list"])]),_:1})),e(t).specType?(o(),p(_,{key:1,label:"\u5546\u54C1\u5C5E\u6027"},{default:r(()=>[a(H,{class:"mb-10px mr-15px",onClick:e(C).open},{default:r(()=>[u("\u6DFB\u52A0\u5C5E\u6027")]),_:1},8,["onClick"]),a(z,{"property-list":e(s),onSuccess:j,"is-detail":i.isDetail},null,8,["property-list","is-detail"])]),_:1})):m("",!0),e(t).specType&&e(s).length>0?(o(),P(O,{key:2},[i.isDetail?m("",!0):(o(),p(_,{key:0,label:"\u6279\u91CF\u8BBE\u7F6E"},{default:r(()=>[a(e(n),{"is-batch":!0,"prop-form-data":e(t),"property-list":e(s)},null,8,["prop-form-data","property-list"])]),_:1})),a(_,{label:"\u89C4\u683C\u5217\u8868"},{default:r(()=>[a(e(n),{ref_key:"skuListRef",ref:c,"prop-form-data":e(t),"property-list":e(s),"rule-config":d,"is-detail":i.isDetail},null,8,["prop-form-data","property-list","is-detail"])]),_:1})],64)):m("",!0)]),_:1},8,["model","rules","disabled"])),a(fe,{ref_key:"attributesAddFormRef",ref:C,propertyList:e(s)},null,8,["propertyList"])],64)}}}),[["__scopeId","data-v-c6005340"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/SkuForm.vue"]])});export{Ve as __tla,N as default};
|