import{P as D}from"./page.3b4d44cb.js";import{b7 as y,b as A,ar as B,a as v,N as C,E as S,_ as Y,c as s,e as R,k as $,i as t,g as i,h as e,t as c,m as f}from"./index.0308b213.js";import{V as F,W as M}from"./storeActivity.634c4426.js";const E={components:{Page:D},setup(){const o=y(),n=A({loading:!1,delLoading:!1,tableData:[]}),p=()=>{o.push({path:"/store/marketing/addReturnStock"})},g=l=>{console.log("\u8BE6\u60C5"),o.push({path:"/store/marketing/returnStockDetail",query:{id:l}})},m=l=>{console.log("\u64A4\u9500"),C.alert("\u786E\u5B9A\u8981\u64A4\u9500\u6D3B\u52A8\u5417\uFF1F","\u63D0\u793A",{showCancelButton:!0}).then(r=>{n.delLoading=!0,F().then(d=>{S.success("\u64A4\u9500\u6210\u529F"),_()}).finally(()=>{n.delLoading=!1})}).catch(()=>{})},_=()=>{n.loading=!0,M().then(l=>{console.log("\u83B7\u53D6\u5217\u8868\uFF1A",l),n.tableData=l.list?[l.list]:[]}).finally(()=>{n.loading=!1})};return _(),{...B(n),toAddReturnStock:p,toDetail:g,del:m,dayjs:v}}};const L={class:"container"},P=f("\u521B\u5EFA\u6EE1\u53CD\u6D3B\u52A8"),N=f("\u67E5\u770B"),V=f("\u64A4\u9500\u6D3B\u52A8");function j(o,n,p,g,m,_){const l=s("el-button"),r=s("el-col"),d=s("el-row"),b=s("el-alert"),u=s("el-table-column"),h=s("el-table"),k=s("Page");return R(),$(k,{showBorder:!1,loading:o.loading},{main:t(()=>[i("div",L,[e(d,null,{default:t(()=>[e(r,null,{default:t(()=>[e(l,{type:"primary",onClick:n[0]||(n[0]=a=>o.toAddReturnStock())},{default:t(()=>[P]),_:1})]),_:1})]),_:1}),e(d,null,{default:t(()=>[e(r,null,{default:t(()=>[e(b,{title:"\u6BCF\u4E2A\u95E8\u5E97\u6700\u591A\u652F\u6301\u4E0A\u67B6\u4E00\u4E2A\u8FD4\u5238\u6D3B\u52A8\u3002",type:"warning",closable:!1,"show-icon":""})]),_:1})]),_:1}),e(d,null,{default:t(()=>[e(r,null,{default:t(()=>[e(h,{border:"",data:o.tableData,style:{width:"100%"}},{default:t(()=>[e(u,{align:"center",prop:"title",label:"\u6D3B\u52A8\u540D\u79F0"}),e(u,{align:"center",label:"\u6D3B\u52A8\u65F6\u95F4",width:"300"},{default:t(a=>[i("span",null,c(o.dayjs(a.row.starttime*1e3).format("YYYY-MM-DD"))+"~"+c(o.dayjs(a.row.endtime*1e3).format("YYYY-MM-DD")),1)]),_:1}),e(u,{align:"center",label:"\u53CD\u5377\u6761\u4EF6"},{default:t(a=>[i("span",null,"\u6EE1"+c(a.row.condition)+"\u5143",1)]),_:1}),e(u,{align:"center",label:"\u72B6\u6001"},{default:t(a=>[i("span",null,c(a.row.status==1?"\u6D3B\u52A8\u5DF2\u751F\u6548":a.row.status==2?"\u6D3B\u52A8\u672A\u5F00\u59CB":"\u6D3B\u52A8\u7ED3\u675F\u6216\u5DF2\u64A4\u9500"),1)]),_:1}),e(u,{align:"center",label:"\u64CD\u4F5C"},{default:t(a=>[e(l,{onClick:w=>o.toDetail(a.row.id)},{default:t(()=>[N]),_:2},1032,["onClick"]),e(l,{loading:o.delLoading,onClick:w=>o.del(a.row.id)},{default:t(()=>[V]),_:2},1032,["loading","onClick"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1})])]),_:1},8,["loading"])}const W=Y(E,[["render",j],["__scopeId","data-v-51e0f90b"]]);export{W as default};
