1 |
- import{d as L,h as Q,r as p,e as W,u as Y,aX as Z,q as $,M as aa,o as s,c as V,f as a,w as l,a as t,N as ea,F as z,v as ta,x as m,y as c,z as d,t as la,R as ra,C as oa,A as na,B as sa,j as ia,G as ca,H as _a,I as ua,J as pa,K as ma,_ as da,__tla as fa}from"./index-8dc1e40a.js";import{_ as ya,__tla as ha}from"./index-64aeaa78.js";import{_ as wa,__tla as ga}from"./DictTag-85aade2b.js";import{E as va,__tla as ba}from"./el-link-a41356f3.js";import{_ as Ca,__tla as xa}from"./ContentWrap-0aca5216.js";import{a as ka,D as x,__tla as Ua}from"./dict-f13a3c8f.js";import{d as M,__tla as Ra}from"./formatTime-8a155b2e.js";import{d as Pa}from"./download-20922b56.js";import{P as Ta,b as Na,d as Sa,e as Da,__tla as Va}from"./ProductForm-365e11fc.js";import{f as za,__tla as Ma}from"./formatter-4b974afe.js";import{u as qa,__tla as Aa}from"./useMessage-7a27dd80.js";import{__tla as Fa}from"./index-803dbf9a.js";import"./color-6e929987.js";import{__tla as Ia}from"./el-card-18df90f0.js";import{__tla as Ka}from"./Dialog-41802231.js";import{__tla as Oa}from"./index-4501f2f7.js";import"./tree-0af4953a.js";import{__tla as Xa}from"./index-6f284c9a.js";let q,Ba=Promise.all([(()=>{try{return fa}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{q=da(L({name:"CrmProduct",__name:"index",setup(Ha){const w=qa(),{t:A}=Q(),g=p(!0),k=p(0),U=p([]),r=W({pageNo:1,pageSize:10,name:void 0,status:void 0}),R=p(),v=p(!1),_=async()=>{g.value=!0;try{const i=await Na(r);U.value=i.list,k.value=i.total}finally{g.value=!1}},b=()=>{r.pageNo=1,_()},F=()=>{R.value.resetFields(),b()},P=p(),T=(i,o)=>{P.value.open(i,o)},{currentRoute:Ea,push:I}=Y(),K=async()=>{try{await w.exportConfirm(),v.value=!0;const i=await Da(r);Pa.excel(i,"\u4EA7\u54C1.xls")}catch{}finally{v.value=!1}};return Z(()=>{_()}),$(()=>{_()}),(i,o)=>{const O=ra,C=oa,X=na,B=sa,f=ia,u=ca,H=_a,N=Ca,E=va,n=ua,S=wa,G=pa,J=ya,y=aa("hasPermi"),j=ma;return s(),V(z,null,[a(N,null,{default:l(()=>[a(H,{class:"-mb-15px",model:t(r),ref_key:"queryFormRef",ref:R,inline:!0,"label-width":"68px"},{default:l(()=>[a(C,{label:"\u4EA7\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[a(O,{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(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(C,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[a(B,{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(()=>[(s(!0),V(z,null,ta(t(ka)(t(x).CRM_PRODUCT_STATUS),e=>(s(),m(X,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(C,null,{default:l(()=>[a(u,{onClick:b},{default:l(()=>[a(f,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22 ")]),_:1}),a(u,{onClick:F},{default:l(()=>[a(f,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E ")]),_:1}),d((s(),m(u,{type:"primary",onClick:o[2]||(o[2]=e=>T("create"))},{default:l(()=>[a(f,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[y,["crm:product:create"]]]),d((s(),m(u,{type:"success",plain:"",onClick:K,loading:t(v)},{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(N,null,{default:l(()=>[d((s(),m(G,{data:t(U),stripe:!0,"show-overflow-tooltip":!0},{default:l(()=>[a(n,{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 I({name:"CrmProductDetail",params:{id:h}});var h}},{default:l(()=>[c(la(e.row.name),1)]),_:2},1032,["onClick"])]),_:1}),a(n,{label:"\u4EA7\u54C1\u7C7B\u578B",align:"center",prop:"categoryName",width:"160"}),a(n,{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(n,{label:"\u4EA7\u54C1\u7F16\u7801",align:"center",prop:"no"}),a(n,{label:"\u4EF7\u683C\uFF08\u5143\uFF09",align:"center",prop:"price",formatter:t(za),width:"100"},null,8,["formatter"]),a(n,{label:"\u4EA7\u54C1\u63CF\u8FF0",align:"center",prop:"description",width:"150"}),a(n,{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(n,{label:"\u8D1F\u8D23\u4EBA",align:"center",prop:"ownerUserName",width:"120"}),a(n,{label:"\u66F4\u65B0\u65F6\u95F4",align:"center",prop:"updateTime",formatter:t(M),width:"180px"},null,8,["formatter"]),a(n,{label:"\u521B\u5EFA\u4EBA",align:"center",prop:"creatorName",width:"120"}),a(n,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:t(M),width:"180px"},null,8,["formatter"]),a(n,{label:"\u64CD\u4F5C",align:"center",fixed:"right",width:"160"},{default:l(e=>[d((s(),m(u,{link:"",type:"primary",onClick:D=>T("update",e.row.id)},{default:l(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["crm:product:update"]]]),d((s(),m(u,{link:"",type:"danger",onClick:D=>(async h=>{try{await w.delConfirm(),await Sa(h),w.success(A("common.delSuccess")),await _()}catch{}})(e.row.id)},{default:l(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["crm:product:delete"]]])]),_:1})]),_:1},8,["data"])),[[j,t(g)]]),a(J,{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(Ta,{ref_key:"formRef",ref:P,onSuccess:_},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/crm/product/index.vue"]])});export{Ba as __tla,q as default};
|