1 |
- import{d as G,z as H,r as c,f as J,x as L,Q,o as s,c as A,i as e,w as r,a as t,R as z,m,B as u,j as f,F as M,V as W,G as X,_ as Y,q as Z,H as E,I as O,J as $,K as ee}from"./index-03f5d926.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang-e704331b.js";import{_ as ae}from"./ContentWrap.vue_vue_type_script_setup_true_lang-48ba01fb.js";import{d as g}from"./formatTime-f911d219.js";import{d as te}from"./download-20922b56.js";import{_ as re,a as ne,d as oe,e as pe}from"./ContractForm.vue_vue_type_script_setup_true_lang-d3e0146f.js";import{u as ie}from"./useMessage-2e335eca.js";import"./index-662200b7.js";import"./el-card-0ac51a7f.js";import"./Dialog-05c67d4e.js";import"./_plugin-vue_export-helper-1b428a4d.js";const ce=G({name:"CrmContract",__name:"index",setup(se){const x=ie(),{t:T}=H(),y=c(!0),C=c(0),I=c([]),n=J({pageNo:1,pageSize:10,name:null,customerId:null,businessId:null,orderDate:[],no:null,discountPercent:null,productPrice:null}),v=c(),h=c(!1),d=async()=>{y.value=!0;try{const p=await ne(n);I.value=p.list,C.value=p.total}finally{y.value=!1}},b=()=>{n.pageNo=1,d()},F=()=>{v.value.resetFields(),b()},V=c(),P=(p,l)=>{V.value.open(p,l)},N=async()=>{try{await x.exportConfirm(),h.value=!0;const p=await pe(n);te.excel(p,"\u5408\u540C.xls")}catch{}finally{h.value=!1}};return L(()=>{d()}),(p,l)=>{const S=W,k=X,w=Y,i=Z,K=E,U=ae,a=O,R=$,q=le,_=Q("hasPermi"),D=ee;return s(),A(M,null,[e(U,null,{default:r(()=>[e(K,{class:"-mb-15px",model:t(n),ref_key:"queryFormRef",ref:v,inline:!0,"label-width":"68px"},{default:r(()=>[e(k,{label:"\u5408\u540C\u7F16\u53F7",prop:"no"},{default:r(()=>[e(S,{modelValue:t(n).no,"onUpdate:modelValue":l[0]||(l[0]=o=>t(n).no=o),placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u7F16\u53F7",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(k,{label:"\u5408\u540C\u540D\u79F0",prop:"name"},{default:r(()=>[e(S,{modelValue:t(n).name,"onUpdate:modelValue":l[1]||(l[1]=o=>t(n).name=o),placeholder:"\u8BF7\u8F93\u5165\u5408\u540C\u540D\u79F0",clearable:"",onKeyup:z(b,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(k,null,{default:r(()=>[e(i,{onClick:b},{default:r(()=>[e(w,{icon:"ep:search",class:"mr-5px"}),l[5]||(l[5]=m(" \u641C\u7D22"))]),_:1}),e(i,{onClick:F},{default:r(()=>[e(w,{icon:"ep:refresh",class:"mr-5px"}),l[6]||(l[6]=m(" \u91CD\u7F6E"))]),_:1}),u((s(),f(i,{type:"primary",onClick:l[2]||(l[2]=o=>P("create"))},{default:r(()=>[e(w,{icon:"ep:plus",class:"mr-5px"}),l[7]||(l[7]=m(" \u65B0\u589E "))]),_:1})),[[_,["crm:contract:create"]]]),u((s(),f(i,{type:"success",plain:"",onClick:N,loading:t(h)},{default:r(()=>[e(w,{icon:"ep:download",class:"mr-5px"}),l[8]||(l[8]=m(" \u5BFC\u51FA "))]),_:1},8,["loading"])),[[_,["crm:contract:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(U,null,{default:r(()=>[u((s(),f(R,{data:t(I),stripe:!0,"show-overflow-tooltip":!0},{default:r(()=>[e(a,{label:"\u5408\u540C\u7F16\u53F7",align:"center",prop:"id"}),e(a,{label:"\u5408\u540C\u540D\u79F0",align:"center",prop:"name"}),e(a,{label:"\u5BA2\u6237\u540D\u79F0",align:"center",prop:"customerId"}),e(a,{label:"\u5546\u673A\u540D\u79F0",align:"center",prop:"businessId"}),e(a,{label:"\u5DE5\u4F5C\u6D41\u540D\u79F0",align:"center",prop:"processInstanceId"}),e(a,{label:"\u4E0B\u5355\u65F6\u95F4",align:"center",prop:"orderDate",formatter:t(g),width:"180px"},null,8,["formatter"]),e(a,{label:"\u8D1F\u8D23\u4EBA",align:"center",prop:"ownerUserId"}),e(a,{label:"\u5408\u540C\u7F16\u53F7",align:"center",prop:"no"}),e(a,{label:"\u5F00\u59CB\u65F6\u95F4",align:"center",prop:"startTime",formatter:t(g),width:"180px"},null,8,["formatter"]),e(a,{label:"\u7ED3\u675F\u65F6\u95F4",align:"center",prop:"endTime",formatter:t(g),width:"180px"},null,8,["formatter"]),e(a,{label:"\u5408\u540C\u91D1\u989D",align:"center",prop:"price"}),e(a,{label:"\u6574\u5355\u6298\u6263",align:"center",prop:"discountPercent"}),e(a,{label:"\u4EA7\u54C1\u603B\u91D1\u989D",align:"center",prop:"productPrice"}),e(a,{label:"\u8054\u7CFB\u4EBA",align:"center",prop:"contactId"}),e(a,{label:"\u516C\u53F8\u7B7E\u7EA6\u4EBA",align:"center",prop:"signUserId"}),e(a,{label:"\u6700\u540E\u8DDF\u8FDB\u65F6\u95F4",align:"center",prop:"contactLastTime",formatter:t(g),width:"180px"},null,8,["formatter"]),e(a,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:t(g),width:"180px"},null,8,["formatter"]),e(a,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),e(a,{label:"\u64CD\u4F5C",width:"120px"},{default:r(o=>[u((s(),f(i,{link:"",type:"primary",onClick:j=>P("update",o.row.id)},{default:r(()=>l[9]||(l[9]=[m(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[_,["crm:contract:update"]]]),u((s(),f(i,{link:"",type:"danger",onClick:j=>(async B=>{try{await x.delConfirm(),await oe(B),x.success(T("common.delSuccess")),await d()}catch{}})(o.row.id)},{default:r(()=>l[10]||(l[10]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[_,["crm:contract:delete"]]])]),_:1})]),_:1},8,["data"])),[[D,t(y)]]),e(q,{total:t(C),page:t(n).pageNo,"onUpdate:page":l[3]||(l[3]=o=>t(n).pageNo=o),limit:t(n).pageSize,"onUpdate:limit":l[4]||(l[4]=o=>t(n).pageSize=o),onPagination:d},null,8,["total","page","limit"])]),_:1}),e(re,{ref_key:"formRef",ref:V,onSuccess:d},null,512)],64)}}});export{ce as default};
|