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 lines
4.6 KiB
1 lines
4.6 KiB
import{d as V,v as $,f as F,l as j,r as D,bc as L,h as g,c as b,e as a,w as s,a as i,u as o,t as m,k as t,i as _,J as R,m as U,z as I,B as M,bd as G,S as H,E as J,D as K,G as q,H as A,K as O,$ as Q,a0 as W,a1 as X,L as Y}from"./index-1dc7b228.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{g as Z,d as ee}from"./delivery-9e721de0.js";const te={class:"main-container"},ae={class:"flex justify-between items-center"},oe={class:"detail-head !m-0"},ne=i("span",{class:"iconfont iconxiangzuojiantou !text-xs"},null,-1),le={class:"ml-[1px]"},se=i("span",{class:"adorn"},"|",-1),ie={class:"right"},re={class:"mt-[10px]"},me={class:"w-[50px] h-[50px] flex items-center justify-center"},pe=["src"],ce={class:"mt-[16px] flex justify-end"},Se=V({__name:"company",setup(de){const v=$(),u=F(),x=v.meta.title,e=j({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{company_name:"",logo:"",url:"",create_time:"",modify_time:""}}),h=D(),c=(r=1)=>{e.loading=!0,e.page=r,Z({page:e.page,limit:e.limit,...e.searchParam}).then(n=>{e.loading=!1,e.data=n.data.data,e.total=n.data.total,G(e.page,e.limit,e.searchParam)}).catch(()=>{e.loading=!1})};c(L(e.searchParam).page);const C=()=>{u.push("/shop/order/delivery/company_add")},w=r=>{u.push("/shop/order/delivery/company_edit?company_id="+r.company_id)},k=r=>{H.confirm(t("companyDeleteTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{ee(r).then(()=>{c()}).catch(()=>{})})},E=r=>{r&&(r.resetFields(),c())};return(r,n)=>{const d=J,P=K,f=q,N=A,y=O,p=Q,T=W,B=X,z=Y;return g(),b("div",te,[a(y,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[i("div",ae,[i("div",oe,[i("div",{class:"left",onClick:n[0]||(n[0]=l=>o(u).push("/shop/order/delivery"))},[ne,i("span",le,m(o(t)("returnToPreviousPage")),1)]),se,i("span",ie,m(o(x)),1)]),a(d,{type:"primary",onClick:C},{default:s(()=>[_(m(o(t)("addCompany")),1)]),_:1})]),a(y,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:s(()=>[a(N,{inline:!0,model:e.searchParam,ref_key:"searchFormRef",ref:h},{default:s(()=>[a(f,{label:o(t)("companyName"),prop:"company_name"},{default:s(()=>[a(P,{modelValue:e.searchParam.company_name,"onUpdate:modelValue":n[1]||(n[1]=l=>e.searchParam.company_name=l),modelModifiers:{trim:!0},placeholder:o(t)("companyNamePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(f,null,{default:s(()=>[a(d,{type:"primary",onClick:n[2]||(n[2]=l=>c())},{default:s(()=>[_(m(o(t)("search")),1)]),_:1}),a(d,{onClick:n[3]||(n[3]=l=>E(h.value))},{default:s(()=>[_(m(o(t)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),i("div",re,[R((g(),U(T,{data:e.data,size:"large"},{empty:s(()=>[i("span",null,m(e.loading?"":o(t)("emptyData")),1)]),default:s(()=>[a(p,{prop:"company_name",label:o(t)("companyName"),"min-width":"120"},null,8,["label"]),a(p,{prop:"logo",label:o(t)("logo"),"min-width":"120"},{default:s(({row:l})=>[i("div",me,[l.logo?(g(),b("img",{key:0,class:"max-w-[100%] max-h-[100%]",src:o(I)(l.logo)},null,8,pe)):M("",!0)])]),_:1},8,["label"]),a(p,{prop:"url",label:o(t)("url"),"min-width":"120"},null,8,["label"]),a(p,{prop:"express_no",label:o(t)("expressNo"),"min-width":"120"},null,8,["label"]),a(p,{prop:"express_no_electronic_sheet",label:o(t)("expressNoElectronicSheet"),"min-width":"120"},null,8,["label"]),a(p,{label:o(t)("electronicSheetSwitchName"),"min-width":"120"},{default:s(({row:l})=>[i("span",null,m(l.electronic_sheet_switch==1?"支持":"不支持"),1)]),_:1},8,["label"]),a(p,{label:o(t)("operation"),fixed:"right",align:"right","min-width":"120"},{default:s(({row:l})=>[a(d,{type:"primary",link:"",onClick:S=>w(l)},{default:s(()=>[_(m(o(t)("edit")),1)]),_:2},1032,["onClick"]),a(d,{type:"primary",link:"",onClick:S=>k(l.company_id)},{default:s(()=>[_(m(o(t)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[z,e.loading]]),i("div",ce,[a(B,{"current-page":e.page,"onUpdate:current-page":n[4]||(n[4]=l=>e.page=l),"page-size":e.limit,"onUpdate:page-size":n[5]||(n[5]=l=>e.limit=l),layout:"total, sizes, prev, pager, next, jumper",total:e.total,onSizeChange:n[6]||(n[6]=l=>c()),onCurrentChange:c},null,8,["current-page","page-size","total"])])])]),_:1})])}}});export{Se as default};
|
|
|