2 lines
3.7 KiB
JavaScript
2 lines
3.7 KiB
JavaScript
var B=Object.defineProperty,D=Object.defineProperties;var S=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var b=(o,t,e)=>t in o?B(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))T.call(t,e)&&b(o,e,t[e]);if(k)for(var e of k(t))E.call(t,e)&&b(o,e,t[e]);return o},C=(o,t)=>D(o,S(t));var _=(o,t,e)=>new Promise((n,a)=>{var c=i=>{try{s(e.next(i))}catch(r){a(r)}},u=i=>{try{s(e.throw(i))}catch(r){a(r)}},s=i=>i.done?n(i.value):Promise.resolve(i.value).then(c,u);s((e=e.apply(o,t)).next())});import{q as P,a as R,aC as W,bP as Y,o as d,h as g,p as h,y as f,w as j,j as A,z as I,k as m,l as N,cu as v,eW as V,cI as U,eX as q}from"./index.b9edafc5.js";import{u as z,B as K}from"./useTable.f5e8bb01.js";import{T as X}from"./useForm.354d9dda.js";import{u as G}from"./index.c68a4867.js";import{P as H,c as J,s as L}from"./PriceDrawerWeek.a2df732c.js";import"./index.1818d178.js";import"./Checkbox.3693edd4.js";import"./index.68134fec.js";import"./index.161c6c24.js";import"./index.ec2e2643.js";import"./index.07ffe575.js";import"./useSize.68b0b927.js";import"./eagerComputed.e71ccd62.js";import"./onMountedOrActivated.1b2852ce.js";import"./useWindowSizeFn.163a2397.js";import"./useContentViewHeight.f1232089.js";import"./ArrowLeftOutlined.70e6d78b.js";import"./transButton.28c267d1.js";import"./index.ddea2c87.js";import"./index.42b29c86.js";import"./index.0ae85186.js";import"./index.f9d5ec0c.js";import"./dateUtil.5a03aaf6.js";import"./_baseMerge.aa91e649.js";import"./_isIterateeCall.6ba6d6fa.js";import"./_baseEach.adcefe03.js";import"./get.525b1412.js";import"./index.a1398b2b.js";import"./FullscreenOutlined.6ed405b9.js";import"./index.0180ed58.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.864ed0d9.js";import"./index.345ec072.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.074234ca.js";import"./scrollTo.495af765.js";import"./index.ea48b9f7.js";import"./index.09659ee2.js";import"./index.b7b73885.js";import"./_baseIteratee.2ccd493f.js";import"./index.fe531bc3.js";import"./useRefs.6d27f120.js";import"./download.dc49e8e1.js";import"./index.219c7033.js";import"./uniqBy.20331f76.js";import"./index.4c585e91.js";const M={key:0,class:"flex items-center justify-center"},O=R({__name:"week",setup(o){const[t,{openDrawer:e}]=G(),[n,{reload:a}]=z({title:"\u7A3B\u867E\u4EF7\u683C - \u5217\u8868",api:r=>_(this,null,function*(){r.year&&(r.year=U(r.year).format("YYYY"));const{data:y,meta:p}=yield q(l({},r));return{items:y,total:p==null?void 0:p.total}}),rowKey:"id",columns:J,formConfig:{labelWidth:120,schemas:L},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),c=()=>{v.success("\u64CD\u4F5C\u6210\u529F"),a()},u=()=>{e(!0,{isUpdate:!1})},s=r=>{e(!0,C(l({},r),{isUpdate:!0}))},i=r=>_(this,null,function*(){yield V(r.id),v.success("\u5220\u9664\u6210\u529F"),a()});return(r,y)=>{const p=W("a-button"),F=Y("auth");return d(),g("div",null,[h(m(K),{onRegister:m(n)},{toolbar:f(()=>[j((d(),A(p,{type:"primary",onClick:u},{default:f(()=>[I(" \u65B0\u589E ")]),_:1})),[[F,"endpoint.rice_shrimp_weekly_prices.create"]])]),bodyCell:f(({column:x,record:w})=>[x.key==="action"?(d(),g("div",M,[h(m(X),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,w),auth:"endpoint.rice_shrimp_weekly_prices.edit"},{label:"\u5220\u9664",auth:"endpoint.rice_shrimp_weekly_prices.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,w)}}]},null,8,["actions"])])):N("",!0)]),_:1},8,["onRegister"]),h(H,{onRegister:m(t),onSuccess:c},null,8,["onRegister"])])}}});var Xe=P(O,[["__scopeId","data-v-006cea55"]]);export{Xe as default};
|