index-cf693aae.js 6.1 KB

1
  1. import{d as j,P as G,r as u,x as H,u as L,l as Z,b as $,a3 as aa,o as s,c as D,f as a,A as l,a as t,a4 as ea,F as O,Q as ta,C as m,D as _,k as d,E as la,a8 as ra,U as oa,R as na,S as sa,_ as ia,J as _a,V as ca,W as pa,X as ua,Y as ma,__tla as da}from"./index-6e0fa573.js";import{_ as fa,__tla as ya}from"./index.vue_vue_type_script_setup_true_lang-cd12277f.js";import{_ as ha,__tla as wa}from"./DictTag.vue_vue_type_script_lang-66c5118d.js";import{E as ga,__tla as ba}from"./el-link-084f8f9b.js";import{_ as va,__tla as Ca}from"./ContentWrap.vue_vue_type_script_setup_true_lang-bed37a76.js";import{a as xa,D as x,__tla as ka}from"./dict-33efee75.js";import{d as z,__tla as Ua}from"./formatTime-4408999b.js";import{d as Ra}from"./download-20922b56.js";import{_ as Sa,b as Ta,d as Pa,e as Na,__tla as Va}from"./ProductForm.vue_vue_type_script_setup_true_lang-19ca7aa1.js";import{f as Da,__tla as Oa}from"./formatter-81912927.js";import{u as za,__tla as Aa}from"./useMessage-7f978edc.js";import{__tla as Ea}from"./index-99c4720b.js";import"./color-6e929987.js";import{__tla as Fa}from"./el-card-f999e23d.js";import{__tla as Ma}from"./Dialog-a16029e3.js";import"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as qa}from"./index-24bc0f25.js";import"./tree-0af4953a.js";import{__tla as Qa}from"./index-f6f28fe0.js";let A,Ba=Promise.all([(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Qa}catch{}})()]).then(async()=>{A=j({name:"CrmProduct",__name:"index",setup(Ia){const w=za(),{t:E}=G(),g=u(!0),k=u(0),U=u([]),r=H({pageNo:1,pageSize:10,name:void 0,status:void 0}),R=u(),b=u(!1),c=async()=>{g.value=!0;try{const i=await Ta(r);U.value=i.list,k.value=i.total}finally{g.value=!1}},v=()=>{r.pageNo=1,c()},F=()=>{R.value.resetFields(),v()},S=u(),T=(i,o)=>{S.value.open(i,o)},{currentRoute:Ja,push:M}=L(),q=async()=>{try{await w.exportConfirm(),b.value=!0;const i=await Na(r);Ra.excel(i,"\u4EA7\u54C1.xls")}catch{}finally{b.value=!1}};return Z(()=>{c()}),$(()=>{c()}),(i,o)=>{const Q=ra,C=oa,B=na,I=sa,f=ia,p=_a,J=ca,P=va,K=ga,n=pa,N=ha,W=ua,X=fa,y=aa("hasPermi"),Y=ma;return s(),D(O,null,[a(P,null,{default:l(()=>[a(J,{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(Q,{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(()=>[(s(!0),D(O,null,ta(t(xa)(t(x).CRM_PRODUCT_STATUS),e=>(s(),m(B,{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"}),_(" \u641C\u7D22 ")]),_:1}),a(p,{onClick:F},{default:l(()=>[a(f,{icon:"ep:refresh",class:"mr-5px"}),_(" \u91CD\u7F6E ")]),_:1}),d((s(),m(p,{type:"primary",onClick:o[2]||(o[2]=e=>T("create"))},{default:l(()=>[a(f,{icon:"ep:plus",class:"mr-5px"}),_(" \u65B0\u589E ")]),_:1})),[[y,["crm:product:create"]]]),d((s(),m(p,{type:"success",plain:"",onClick:q,loading:t(b)},{default:l(()=>[a(f,{icon:"ep:download",class:"mr-5px"}),_(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[y,["crm:product:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(P,null,{default:l(()=>[d((s(),m(W,{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(K,{underline:!1,type:"primary",onClick:V=>{return h=e.row.id,void M({name:"CrmProductDetail",params:{id:h}});var h}},{default:l(()=>[_(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(N,{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(Da),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(N,{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(z),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(z),width:"180px"},null,8,["formatter"]),a(n,{label:"\u64CD\u4F5C",align:"center",fixed:"right",width:"160"},{default:l(e=>[d((s(),m(p,{link:"",type:"primary",onClick:V=>T("update",e.row.id)},{default:l(()=>[_(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[y,["crm:product:update"]]]),d((s(),m(p,{link:"",type:"danger",onClick:V=>(async h=>{try{await w.delConfirm(),await Pa(h),w.success(E("common.delSuccess")),await c()}catch{}})(e.row.id)},{default:l(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["crm:product:delete"]]])]),_:1})]),_:1},8,["data"])),[[Y,t(g)]]),a(X,{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:c},null,8,["total","page","limit"])]),_:1}),a(Sa,{ref_key:"formRef",ref:S,onSuccess:c},null,512)],64)}}})});export{Ba as __tla,A as default};