daShangDao_newAdmin/dist/assets/index.357ecf3c.js
2026-06-15 17:26:14 +08:00

2 lines
8.8 KiB
JavaScript

import{_ as e,a8 as a,$ as l,ah as o,ai as t,aa as n,a9 as i,a3 as s,ab as d,a5 as r,a4 as p,aG as u,ac as c,ae as b,aE as f,aM as m,b as v,af as g,ag as h,as as y,o as k,k as _,at as w,aU as C,l as j,m as I,w as N,J as x,I as z,aw as $,v as S,t as V,H as B,an as P,a6 as T,a7 as F,ao as G,E as D}from"./vendor.be06958f.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as E,d as U}from"./shopGoodsPublished.5fd5a242.js";import{f as H}from"./shop.845bfc63.js";import"./index.c0a98caf.js";const J={class:"p-2"},K={class:"mb-[10px]"},M=(e=>(T("data-v-606bfadc"),e=e(),F(),e))((()=>j("div",{class:"image-slot"}," 暂无 ",-1))),A={class:"truncate-cell"},L={key:0},R={key:1},q={key:2},O={key:3},W={key:4},Q={key:5},X={key:6},Y={key:7},Z={key:8},ee={key:9},ae={key:10},le={key:11},oe={key:12},te={key:13},ne={key:0},ie={key:1},se={class:"truncate-cell"},de={key:0},re={key:0},pe=Object.assign({name:"ShopGoodsPublished"},{__name:"index",setup(T){const F=e([]),pe=e(!0),ue=e(!0),ce=e([]),be=e(!0),fe=e(!0),me=e(0),ve=e([]),ge=e(),he=a({pageNum:1,pageSize:10,shopId:void 0,isbn:void 0,conditionCode:void 0,goodsName:void 0,shopName:void 0,platformId:void 0,status:void 0,itemNumber:void 0,price:void 0}),ye=[{value:"A",label:"一品"},{value:"B",label:"二品"},{value:"C",label:"三品"},{value:"D",label:"四品"},{value:"E",label:"五品"},{value:"F",label:"六品"},{value:"G",label:"六五品"},{value:"H",label:"七品"},{value:"I",label:"七五品"},{value:"J",label:"八品"},{value:"K",label:"八五品"},{value:"L",label:"九品"},{value:"M",label:"九五品"},{value:"N",label:"全新"}],ke=async()=>{pe.value=!0;try{const e=await E(he);F.value=e.data.list||[],me.value=e.data.total||0}catch(e){console.error("获取列表失败:",e),G.error("获取列表失败")}finally{pe.value=!1}},_e=()=>{he.pageNum=1,ke()},we=()=>{var e;null==(e=ge.value)||e.resetFields(),_e()},Ce=e=>{ce.value=e.map((e=>e.id)),be.value=1!==e.length,fe.value=!e.length},je=async e=>{const a=(null==e?void 0:e.id)||ce.value;try{await D.confirm(`是否确认删除记录发布数据编号为"${a}"的数据项?`,"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),await U(a),G.success("删除成功"),await ke()}catch(l){"cancel"!==l&&(console.error("删除失败:",l),G.error("删除失败"))}},Ie=e=>{he.pageSize=e,he.pageNum=1,ke()},Ne=e=>{he.pageNum=e,ke()},xe=e=>{if(!e)return"-";const a=e.toString();if(14!==a.length)return e;return`${a.substring(0,4)}-${a.substring(4,6)}-${a.substring(6,8)} ${a.substring(8,10)}:${a.substring(10,12)}:${a.substring(12,14)}`};return l((()=>{ke(),(async()=>{try{const e=await H();ve.value=e.map((e=>({value:e.id,label:e.shopName})))}catch(e){console.error("获取店铺列表失败:",e)}})()})),(e,a)=>{const l=o,T=t,G=n,D=i,E=s,U=d,H=r,ce=p,be=u,ke=c,ze=b,$e=f,Se=m,Ve=v,Be=g,Pe=h,Te=y;return k(),_("div",J,[w(j("div",K,[I(H,{shadow:"hover"},{default:N((()=>[I(U,{ref_key:"queryFormRef",ref:ge,model:he,inline:!0},{default:N((()=>[I(G,{label:"店铺",prop:"shopId"},{default:N((()=>[I(T,{modelValue:he.shopId,"onUpdate:modelValue":a[0]||(a[0]=e=>he.shopId=e),placeholder:"请选择店铺",clearable:""},{default:N((()=>[(k(!0),_(x,null,z(ve.value,(e=>(k(),B(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),I(G,{label:"商品条码",prop:"isbn"},{default:N((()=>[I(D,{modelValue:he.isbn,"onUpdate:modelValue":a[1]||(a[1]=e=>he.isbn=e),placeholder:"请输入条码",clearable:"",onKeyup:$(_e,["enter"])},null,8,["modelValue"])])),_:1}),I(G,{label:"品相",prop:"conditionCode"},{default:N((()=>[I(T,{modelValue:he.conditionCode,"onUpdate:modelValue":a[2]||(a[2]=e=>he.conditionCode=e),placeholder:"请选择品相",clearable:"",loading:pe.value},{default:N((()=>[(k(),_(x,null,z(ye,(e=>I(l,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),64))])),_:1},8,["modelValue","loading"])])),_:1}),I(G,null,{default:N((()=>[I(E,{type:"primary",icon:"Search",onClick:_e},{default:N((()=>[S("搜索")])),_:1}),I(E,{icon:"Refresh",onClick:we},{default:N((()=>[S("重置")])),_:1})])),_:1})])),_:1},8,["model"])])),_:1})],512),[[C,ue.value]]),I(H,{shadow:"never"},{header:N((()=>[I(be,{gutter:10,class:"mb8"},{default:N((()=>[I(ce,{span:1.5},{default:N((()=>[I(E,{type:"danger",plain:"",icon:"Delete",disabled:fe.value,onClick:a[3]||(a[3]=e=>je())},{default:N((()=>[S("删除")])),_:1},8,["disabled"])])),_:1}),I(ce,{span:1.5},{default:N((()=>[I(E,{type:"primary",icon:"Search",onClick:a[4]||(a[4]=()=>ue.value=!ue.value)},{default:N((()=>[S(V(ue.value?"隐藏搜索":"显示搜索"),1)])),_:1})])),_:1})])),_:1})])),default:N((()=>[w((k(),B(Be,{data:F.value,onSelectionChange:Ce,style:{"font-size":"17px"}},{default:N((()=>[I(ke,{type:"selection",width:"55",align:"center"}),P("",!0),I(ke,{label:"商品对应关系",align:"center"},{default:N((()=>[I(ze,{type:"primary",size:"large",style:{"font-size":"20px"}},{default:N((()=>[S("相同货号对应")])),_:1})])),_:1}),I(ke,{label:"店铺",align:"center",prop:"shopName"}),I(ke,{label:"供应商",align:"center",prop:"supplier"}),I(ke,{label:"商品信息","header-align":"center"},{default:N((()=>[I(ke,{label:"图示",align:"center",prop:"bookPic",width:"70","show-overflow-tooltip":!0},{default:N((({row:e})=>[I($e,{style:{width:"40px",height:"40px"},src:e.bookPic,fit:"scale-down","preview-src-list":[e.bookPic],"preview-teleported":""},{error:N((()=>[M])),_:2},1032,["src","preview-src-list"])])),_:1}),I(ke,{label:"商品/规格编码",align:"left",prop:"itemNumber"}),I(ke,{label:"商品/规格名称",align:"left",prop:"goodsName",width:"270","show-overflow-tooltip":!0},{default:N((({row:e})=>[j("div",A,V(e.goodsName||"暂无数据"),1)])),_:1}),I(ke,{label:"品相",align:"left",prop:"conditionCode",width:"80"},{default:N((({row:e})=>["A"===e.conditionCode?(k(),_("span",L,"一品")):"B"===e.conditionCode?(k(),_("span",R,"二品")):"C"===e.conditionCode?(k(),_("span",q,"三品")):"D"===e.conditionCode?(k(),_("span",O,"四品")):"E"===e.conditionCode?(k(),_("span",W,"五品")):"F"===e.conditionCode?(k(),_("span",Q,"六品")):"G"===e.conditionCode?(k(),_("span",X,"六五品")):"H"===e.conditionCode?(k(),_("span",Y,"七品")):"I"===e.conditionCode?(k(),_("span",Z,"七五品")):"J"===e.conditionCode?(k(),_("span",ee,"八品")):"K"===e.conditionCode?(k(),_("span",ae,"八五品")):"L"===e.conditionCode?(k(),_("span",le,"九品")):"M"===e.conditionCode?(k(),_("span",oe,"九五品")):"N"===e.conditionCode?(k(),_("span",te,"全新")):P("",!0)])),_:1}),I(ke,{label:"售价",align:"left",prop:"price","show-overflow-tooltip":!0,width:"100"},{default:N((({row:e})=>[S(V((e.price/100).toFixed(2)),1)])),_:1}),I(ke,{label:"商品条码",align:"left",prop:"isbn",width:"150"},{default:N((({row:e})=>[!e.isbn||e.isbn.startsWith("678")?(k(),_("span",ne)):(k(),_("span",ie,V(e.isbn),1))])),_:1})])),_:1}),I(ke,{label:"线上商品数量",align:"center",prop:"inventory"}),I(ke,{label:"线上商品",align:"left",prop:"onlineProducts","show-overflow-tooltip":!0},{default:N((({row:e})=>[j("div",se,[1===e.shopType?(k(),B(Se,{key:0,type:"primary",href:`https://mobile.yangkeduo.com/goods.html?goods_id=${e.onlineId}`,target:"_blank",underline:!1},{default:N((()=>[null!=e.onlineId?(k(),_("span",de," https://mobile.yangkeduo.com/goods.html?goods_id="+V(e.onlineId),1)):P("",!0)])),_:2},1032,["href"])):2===e.shopType?(k(),B(Se,{key:1,type:"primary",href:`https://book.kongfz.com/${e.mallId}/${e.onlineId}`,target:"_blank",underline:!1},{default:N((()=>[null!=e.mallId&&null!=e.onlineId?(k(),_("span",re," https://book.kongfz.com/"+V(e.mallId)+"/"+V(e.onlineId),1)):P("",!0)])),_:2},1032,["href"])):P("",!0)])])),_:1}),I(ke,{label:"最后设置人",align:"center",prop:"createdBy"},{default:N((({row:e})=>{return[j("span",null,V((a=e.createdBy,a?a.toString():"-")),1)];var a})),_:1}),I(ke,{label:"最后设置时间",align:"center",prop:"updatedTime"},{default:N((({row:e})=>[j("span",null,V(xe(e.updatedTime)),1)])),_:1}),I(ke,{label:"操作",align:"center","class-name":"small-padding fixed-width"},{default:N((e=>[I(Ve,{content:"删除",placement:"top"},{default:N((()=>[I(E,{link:"",type:"primary",icon:"Delete",onClick:a=>je(e.row)},null,8,["onClick"])])),_:2},1024)])),_:1})])),_:1},8,["data"])),[[Te,pe.value]]),w(I(Pe,{"current-page":he.pageNum,"page-size":he.pageSize,"page-sizes":[10,20,50,100],total:me.value,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:Ie,onCurrentChange:Ne},null,8,["current-page","page-size","total"]),[[C,me.value>0]])])),_:1})])}}});pe.__scopeId="data-v-606bfadc";export{pe as default};