1 |
- import{d as j,B as Q,r as u,g as W,u as X,aC as Z,z as $,T as aa,o as n,c as z,i as a,w as l,a as t,U as ea,F as V,C as ta,k as m,l as c,D as d,t as la,Y as ra,I as oa,G as sa,H as na,n as ia,s as ca,J as _a,K as pa,L as ua,M as ma,_ as da,__tla as fa}from"./index-2f799233.js";import{_ as ya,__tla as ha}from"./index-e6cd813f.js";import{_ as wa,__tla as ga}from"./DictTag-ea4c6cc2.js";import{E as ba,__tla as va}from"./el-link-23decf79.js";import{_ as Ca,__tla as xa}from"./ContentWrap-9da801df.js";import{a as ka,D as x,__tla as Ua}from"./dict-20c916e2.js";import{d as M,__tla as Ta}from"./formatTime-2157894c.js";import{d as Na}from"./download-20922b56.js";import{P as Pa,b as Ra,d as Sa,e as Da,__tla as za}from"./ProductForm-cd74e994.js";import{f as Va,__tla as Ma}from"./formatter-4606ca53.js";import{u as Aa,__tla as Fa}from"./useMessage-e567ad40.js";import{__tla as Ka}from"./index-1c180a16.js";import"./color-6e929987.js";import{__tla as Oa}from"./el-card-c64c83d1.js";import{__tla as Ba}from"./Dialog-6fd39e06.js";import{__tla as Ga}from"./index-f0968341.js";import"./tree-0af4953a.js";import{__tla as Ha}from"./index-dd9c509d.js";let A,Ia=Promise.all([(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ha}catch{}})()]).then(async()=>{A=da(j({name:"CrmProduct",__name:"index",setup(qa){const w=Aa(),{t:F}=Q(),g=u(!0),k=u(0),U=u([]),r=W({pageNo:1,pageSize:10,name:void 0,status:void 0}),T=u(),b=u(!1),_=async()=>{g.value=!0;try{const i=await Ra(r);U.value=i.list,k.value=i.total}finally{g.value=!1}},v=()=>{r.pageNo=1,_()},K=()=>{T.value.resetFields(),v()},N=u(),P=(i,o)=>{N.value.open(i,o)},{currentRoute:Ea,push:O}=X(),B=async()=>{try{await w.exportConfirm(),b.value=!0;const i=await Da(r);Na.excel(i,"\u4EA7\u54C1.xls")}catch{}finally{b.value=!1}};return Z(()=>{_()}),$(()=>{_()}),(i,o)=>{const G=ra,C=oa,H=sa,I=na,f=ia,p=ca,q=_a,R=Ca,E=ba,s=pa,S=wa,J=ua,L=ya,y=aa("hasPermi"),Y=ma;return n(),z(V,null,[a(R,null,{default:l(()=>[a(q,{class:"-mb-15px",model:t(r),ref_key:"queryFormRef",ref:T,inline:!0,"label-width":"68px"},{default:l(()=>[a(C,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[a(G,{modelValue:t(r).name,"onUpdate:modelValue":o[0]||(o[0]=e=>t(r).name=e),placeholder:"\u8BF7\u8F93\u5165\u4EA7\u54C1\u540D\u79F0",clearable:"",onKeyup:ea(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(C,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[a(I,{modelValue:t(r).status,"onUpdate:modelValue":o[1]||(o[1]=e=>t(r).status=e),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:l(()=>[(n(!0),z(V,null,ta(t(ka)(t(x).CRM_PRODUCT_STATUS),e=>(n(),m(H,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(C,null,{default:l(()=>[a(p,{onClick:v},{default:l(()=>[a(f,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22 ")]),_:1}),a(p,{onClick:K},{default:l(()=>[a(f,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E ")]),_:1}),d((n(),m(p,{type:"primary",onClick:o[2]||(o[2]=e=>P("create"))},{default:l(()=>[a(f,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[y,["crm:product:create"]]]),d((n(),m(p,{type:"success",plain:"",onClick:B,loading:t(b)},{default:l(()=>[a(f,{icon:"ep:download",class:"mr-5px"}),c(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[y,["crm:product:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(R,null,{default:l(()=>[d((n(),m(J,{data:t(U),stripe:!0,"show-overflow-tooltip":!0},{default:l(()=>[a(s,{label:"\u4EA7\u54C1\u540D\u79F0",align:"center",prop:"name",width:"160"},{default:l(e=>[a(E,{underline:!1,type:"primary",onClick:D=>{return h=e.row.id,void O({name:"CrmProductDetail",params:{id:h}});var h}},{default:l(()=>[c(la(e.row.name),1)]),_:2},1032,["onClick"])]),_:1}),a(s,{label:"\u4EA7\u54C1\u7C7B\u578B",align:"center",prop:"categoryName",width:"160"}),a(s,{label:"\u4EA7\u54C1\u5355\u4F4D",align:"center",prop:"unit"},{default:l(e=>[a(S,{type:t(x).CRM_PRODUCT_UNIT,value:e.row.unit},null,8,["type","value"])]),_:1}),a(s,{label:"\u4EA7\u54C1\u7F16\u7801",align:"center",prop:"no"}),a(s,{label:"\u4EF7\u683C\uFF08\u5143\uFF09",align:"center",prop:"price",formatter:t(Va),width:"100"},null,8,["formatter"]),a(s,{label:"\u4EA7\u54C1\u63CF\u8FF0",align:"center",prop:"description",width:"150"}),a(s,{label:"\u4E0A\u67B6\u72B6\u6001",align:"center",prop:"status",width:"120"},{default:l(e=>[a(S,{type:t(x).CRM_PRODUCT_STATUS,value:e.row.status},null,8,["type","value"])]),_:1}),a(s,{label:"\u8D1F\u8D23\u4EBA",align:"center",prop:"ownerUserName",width:"120"}),a(s,{label:"\u66F4\u65B0\u65F6\u95F4",align:"center",prop:"updateTime",formatter:t(M),width:"180px"},null,8,["formatter"]),a(s,{label:"\u521B\u5EFA\u4EBA",align:"center",prop:"creatorName",width:"120"}),a(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:t(M),width:"180px"},null,8,["formatter"]),a(s,{label:"\u64CD\u4F5C",align:"center",fixed:"right",width:"160"},{default:l(e=>[d((n(),m(p,{link:"",type:"primary",onClick:D=>P("update",e.row.id)},{default:l(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["crm:product:update"]]]),d((n(),m(p,{link:"",type:"danger",onClick:D=>(async h=>{try{await w.delConfirm(),await Sa(h),w.success(F("common.delSuccess")),await _()}catch{}})(e.row.id)},{default:l(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["crm:product:delete"]]])]),_:1})]),_:1},8,["data"])),[[Y,t(g)]]),a(L,{total:t(k),page:t(r).pageNo,"onUpdate:page":o[3]||(o[3]=e=>t(r).pageNo=e),limit:t(r).pageSize,"onUpdate:limit":o[4]||(o[4]=e=>t(r).pageSize=e),onPagination:_},null,8,["total","page","limit"])]),_:1}),a(Pa,{ref_key:"formRef",ref:N,onSuccess:_},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/crm/product/index.vue"]])});export{Ia as __tla,A as default};
|