detail.84d96a5c.js 5.3 KB

1
  1. import{S as R,_ as M,d as z,cT as S,m as g,cl as T,r as B,ag as q,B as I,o as r,A as l,x as p,b as s,H as c,G as E,u as n,a as _,D as V,cr as C,cc as m,c_ as j}from"./index.0ae106f0.js";import{u as H}from"./use-page-search.dd23dee3.js";import{a as d}from"./apis.0c7813ed.js";import{h as L}from"./export.e35d0526.js";import"./createRequset.68e3a4aa.js";const{detail:U}=d,G=[{prop:"depart",label:"\u90E8\u95E8",minWidth:"155px"},{prop:"saler",label:"\u9500\u552E\u4EBA\u5458",minWidth:"80px"},{prop:"plat_name",label:"\u5E73\u53F0\u7C7B\u578B",minWidth:"155px"},{prop:"company_name",label:"\u516C\u53F8\u540D\u79F0",minWidth:"155px"},{prop:"order_type",label:"\u8BA2\u5355\u7C7B\u578B",minWidth:"80px"},{prop:"orderCode",label:"\u786E\u8BA4\u5355\u7F16\u53F7",minWidth:"155px"},{prop:"cgdNo",label:"\u91C7\u8D2D\u5355\u7F16\u53F7",minWidth:"155px"},{prop:"customerAttr",label:"\u5BA2\u6237\u5C5E\u6027",minWidth:"80px"},{prop:"branch",label:"\u5BA2\u6237\u5206\u516C\u53F8",minWidth:"80px"},{prop:"customerName",label:"\u5BA2\u6237\u540D\u79F0",minWidth:"155px"},{prop:"good_name",label:"\u4EA7\u54C1\u540D\u79F0",minWidth:"155px"},{prop:"first_cat",label:"\u4E00\u7EA7\u5206\u7C7B",minWidth:"80px"},{prop:"good_price",label:"\u9500\u552E\u5355\u4EF7",minWidth:"120px"},{prop:"oldCode",label:"\u539F\u9500\u552E\u5355\u53F7",minWidth:"155px"},{prop:"cgdPrice",label:"\u91C7\u8D2D\u5355\u4EF7",minWidth:"120px"},{prop:"good_num",label:"\u4E0B\u5355\u6570\u91CF",minWidth:"80px"},{prop:"total_price",label:"\u9500\u552E\u603B\u989D",minWidth:"155px"},{prop:"order_time",label:"\u9500\u552E\u4E0B\u5355\u65F6\u95F4",minWidth:"155px"},{prop:"pay_time",label:"\u56DE\u6B3E\u65E5\u671F",minWidth:"155px"},{prop:"pay_fee",label:"\u56DE\u6B3E\u91D1\u989D",minWidth:"120px"},{prop:"pay_date_num",label:"\u8D26\u671F",minWidth:"70px"},{prop:"manager",label:"\u4E1A\u52A1\u7ECF\u7406",minWidth:"80px"},{prop:"profit_rate",label:"\u6BDB\u5229\u7387",minWidth:"80px"},{prop:"profit_range",label:"\u6BDB\u5229\u7387\u533A\u95F4",minWidth:"80px"},{prop:"profit_coefficient",label:"\u6BDB\u5229\u7387\u63D0\u6210\u7CFB\u6570",minWidth:"120px"},{prop:"total_percentage",label:"\u660E\u7EC6\u603B\u63D0\u6210",minWidth:"120px"}],x={columns:G,showTitle:!1,superUserNoAction:!1,apis:{httpList:U}},O=R(new Date).subtract(1,"month").format("YYYY-MM"),b={formItems:[{field:"year_month",type:"date_picker",defaultValue:O,placeholder:"\u660E\u7EC6\u6708\u4EFD",trigger:"change",otherOptions:{editable:!1,clearable:!1,type:"month",format:"YYYY-MM",valueFormat:"YYYY-MM"}}]},X={style:{display:"flex"}},J={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},K={style:{color:"red"}},Q={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},Z={style:{color:"#000000","font-size":"14px","margin-right":"10px","line-height":"26px"}},F="saleDepartment",$=z({__name:"detail",setup(ee){const{hasPermissionWithCode:h}=S(F),i=g(null),o=T(!1),u=g({}),D=e=>({result:{...e,depart_type:"4"}}),v=e=>({result:{...e,depart_type:"4"}}),y={onSuccess:()=>o.value=!1,onStart:()=>o.value=!0,onFail:()=>o.value=!1},A={pageSearchHook:()=>H(D,v,b)};async function W(){const e=i.value.getBasicParams();try{await L({fileType:"application/vnd.ms-excel;charset=utf-8",url:"/admin/report/exportinfo",name:"\u9500\u552E\u90E8\u63D0\u6210\u4E1A\u7EE9\u660E\u7EC6.xlsx",...y,params:e})}catch{}}async function f(){const e=i.value.getBasicParams();o.value=!0;const{data:t}=await d.isConfirm({...e});return o.value=!1,u.value=t||{},j.NEXT}x.beforeRequestList=f;async function w(){C.confirm("\u662F\u5426\u786E\u8BA4\u5168\u90E8\u660E\u7EC6?",{type:"warning"}).then(async()=>{const e=i.value.getBasicParams(),{message:t,code:a}=await d.confirm({...e,depart_type:"4",status:"1"});Number(a)===1?(m.success("\u660E\u7EC6\u5DF2\u786E\u8BA4\u5B8C\u6210"),f()):m.warning(t)})}async function k(){C.confirm("\u662F\u5426\u53D6\u6D88\u786E\u8BA4\u5168\u90E8\u660E\u7EC6?",{type:"warning"}).then(async()=>{const e=i.value.getBasicParams(),{message:t,code:a}=await d.delete({...e,id:u.value.id,status:"0"});Number(a)===1?(m.success("\u660E\u7EC6\u53D6\u6D88\u786E\u8BA4\u5B8C\u6210"),f()):m.warning(t)})}return(e,t)=>{const a=B("ElButton"),N=B("PageContainer"),Y=q("loading");return I((r(),l(N,{hooks:A,pageName:F,getContentRef:P=>i.value=P,contentConfig:n(x),searchConfig:n(b)},{content_header:p(()=>[s("div",X,[s("div",J,[c(" \u5F53\u524D\u72B6\u6001\uFF1A "),s("span",K,E(Number(u.value.status)===1?"\u5DF2\u786E\u8BA4":"\u672A\u786E\u8BA4"),1)]),s("div",Q," \u786E\u8BA4\u4EBA\uFF1A"+E(u.value.apply_name||"--"),1),s("div",Z," \u786E\u8BA4\u65F6\u95F4\uFF1A"+E(u.value.createtime||"--"),1),Number(u.value.length)===0&&n(h)("21")?(r(),l(a,{key:0,onClick:w,size:"small"},{default:p(()=>[c("\u786E\u8BA4\u5168\u90E8\u660E\u7EC6 ")]),_:1})):_("v-if",!0),Number(u.value.status)===1&&n(h)("22")?(r(),l(a,{key:1,onClick:k,size:"small"},{default:p(()=>[c("\u53D6\u6D88\u786E\u8BA4\u5168\u90E8\u660E\u7EC6 ")]),_:1})):_("v-if",!0),n(h)("18")?(r(),l(a,{key:2,icon:n(V)("arrow-up-line"),onClick:W,type:"primary",size:"small"},{default:p(()=>[c("\u5BFC\u51FA ")]),_:1},8,["icon"])):_("v-if",!0)])]),_:1},8,["getContentRef","contentConfig","searchConfig"])),[[Y,o.value]])}}});var ie=M($,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/saleDepartment/components/detail.vue"]]);export{ie as default};