新年开关
This commit is contained in:
@@ -86,8 +86,8 @@ export default defineConfig({
|
||||
'process.env': {
|
||||
// API_URL: "http://guangdongadminapi.zhongshuai2023.com",
|
||||
// API_URL: "http://iadminapi.zhongshuai2023.com",
|
||||
API_URL: "http://192.168.1.62:1002",
|
||||
// API_URL: "http://guangdongadminapi.zhongshuai2023.com",
|
||||
// API_URL: "http://192.168.1.63:1002",
|
||||
API_URL: "http://guangdongadminapi.zhongshuai2023.com",
|
||||
|
||||
// API_URL: "http://192.168.1.54:1002",
|
||||
WS_URL: "ws://lv.com",
|
||||
|
||||
10
dist/5861.1641a54e.async.js
vendored
Normal file
10
dist/5861.1641a54e.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7117],{49091:function(oe,I,i){var l=i(35361),O=i(11642),E=i(73356),D=i(56929),$=i(959),j=i(50925),R=i(41268),z=i(50159),C=i(50959),x=i(50756),T=i(11527),c=["rules","name","phoneName","fieldProps","onTiming","captchaTextRender","captchaProps"],y=C.forwardRef(function(v,B){var _=j.Z.useFormInstance(),k=(0,C.useState)(v.countDown||60),ee=(0,$.Z)(k,2),U=ee[0],re=ee[1],te=(0,C.useState)(!1),Q=(0,$.Z)(te,2),W=Q[0],M=Q[1],J=(0,C.useState)(),Y=(0,$.Z)(J,2),le=Y[0],N=Y[1],ie=v.rules,r=v.name,d=v.phoneName,g=v.fieldProps,s=v.onTiming,e=v.captchaTextRender,o=e===void 0?function(u,m){return u?"".concat(m," \u79D2\u540E\u91CD\u65B0\u83B7\u53D6"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"}:e,t=v.captchaProps,a=(0,D.Z)(v,c),n=function(){var u=(0,E.Z)((0,O.Z)().mark(function m(h){return(0,O.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.prev=0,N(!0),b.next=4,a.onGetCaptcha(h);case 4:N(!1),M(!0),b.next=13;break;case 8:b.prev=8,b.t0=b.catch(0),M(!1),N(!1),console.log(b.t0);case 13:case"end":return b.stop()}},m,null,[[0,8]])}));return function(h){return u.apply(this,arguments)}}();return(0,C.useImperativeHandle)(B,function(){return{startTiming:function(){return M(!0)},endTiming:function(){return M(!1)}}}),(0,C.useEffect)(function(){var u=0,m=v.countDown;return W&&(u=window.setInterval(function(){re(function(h){return h<=1?(M(!1),clearInterval(u),m||60):h-1})},1e3)),function(){return clearInterval(u)}},[W]),(0,C.useEffect)(function(){s&&s(U)},[U,s]),(0,T.jsxs)("div",{style:(0,l.Z)((0,l.Z)({},g==null?void 0:g.style),{},{display:"flex",alignItems:"center"}),ref:B,children:[(0,T.jsx)(R.Z,(0,l.Z)((0,l.Z)({},g),{},{style:(0,l.Z)({flex:1,transition:"width .3s",marginRight:8},g==null?void 0:g.style)})),(0,T.jsx)(z.ZP,(0,l.Z)((0,l.Z)({style:{display:"block"},disabled:W,loading:le},t),{},{onClick:(0,E.Z)((0,O.Z)().mark(function u(){var m;return(0,O.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(f.prev=0,!d){f.next=9;break}return f.next=4,_.validateFields([d].flat(1));case 4:return m=_.getFieldValue([d].flat(1)),f.next=7,n(m);case 7:f.next=11;break;case 9:return f.next=11,n("");case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(0),console.log(f.t0);case 16:case"end":return f.stop()}},u,null,[[0,13]])})),children:o(W,U)}))]})}),K=(0,x.G)(y);I.Z=K},35748:function(oe,I,i){var l=i(35361),O=i(56929),E=i(50959),D=i(20734),$=i(11527),j=["fieldProps","min","proFieldProps","max"],R=function(x,T){var c=x.fieldProps,y=x.min,K=x.proFieldProps,v=x.max,B=(0,O.Z)(x,j);return(0,$.jsx)(D.Z,(0,l.Z)({valueType:"digit",fieldProps:(0,l.Z)({min:y,max:v},c),ref:T,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:K},B))},z=E.forwardRef(R);I.Z=z},20902:function(oe,I,i){var l=i(35361),O=i(56929),E=i(50959),D=i(20734),$=i(11527),j=["fieldProps","proFieldProps"],R=function(C,x){var T=C.fieldProps,c=C.proFieldProps,y=(0,O.Z)(C,j);return(0,$.jsx)(D.Z,(0,l.Z)({ref:x,valueType:"textarea",fieldProps:T,proFieldProps:c},y))};I.Z=E.forwardRef(R)},23885:function(oe,I,i){i.d(I,{Z:function(){return s}});var l=i(50959),O=i(82187),E=i.n(O),D=i(8146),$=i(76144),j=i(15676),R=i(39910),z=i(70939),C=function(e,o){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)o.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(t[a[n]]=e[a[n]]);return t},T=e=>{var{prefixCls:o,className:t,hoverable:a=!0}=e,n=C(e,["prefixCls","className","hoverable"]);const{getPrefixCls:u}=l.useContext($.E_),m=u("card",o),h=E()(`${m}-grid`,t,{[`${m}-grid-hoverable`]:a});return l.createElement("div",Object.assign({},n,{className:h}))},c=i(601),y=i(54531),K=i(79349),v=i(56352);const B=e=>{const{antCls:o,componentCls:t,headerHeight:a,cardPaddingBase:n,tabsMarginBottom:u}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.bf)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)} 0 0`},(0,y.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},y.vS),{[`
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7117,5861],{49091:function(oe,I,i){var l=i(35361),O=i(11642),E=i(73356),D=i(56929),$=i(959),j=i(50925),R=i(41268),z=i(50159),C=i(50959),x=i(50756),T=i(11527),c=["rules","name","phoneName","fieldProps","onTiming","captchaTextRender","captchaProps"],y=C.forwardRef(function(v,B){var _=j.Z.useFormInstance(),k=(0,C.useState)(v.countDown||60),ee=(0,$.Z)(k,2),U=ee[0],re=ee[1],te=(0,C.useState)(!1),Q=(0,$.Z)(te,2),W=Q[0],M=Q[1],J=(0,C.useState)(),Y=(0,$.Z)(J,2),le=Y[0],N=Y[1],ie=v.rules,r=v.name,d=v.phoneName,g=v.fieldProps,s=v.onTiming,e=v.captchaTextRender,o=e===void 0?function(u,m){return u?"".concat(m," \u79D2\u540E\u91CD\u65B0\u83B7\u53D6"):"\u83B7\u53D6\u9A8C\u8BC1\u7801"}:e,t=v.captchaProps,a=(0,D.Z)(v,c),n=function(){var u=(0,E.Z)((0,O.Z)().mark(function m(h){return(0,O.Z)().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.prev=0,N(!0),b.next=4,a.onGetCaptcha(h);case 4:N(!1),M(!0),b.next=13;break;case 8:b.prev=8,b.t0=b.catch(0),M(!1),N(!1),console.log(b.t0);case 13:case"end":return b.stop()}},m,null,[[0,8]])}));return function(h){return u.apply(this,arguments)}}();return(0,C.useImperativeHandle)(B,function(){return{startTiming:function(){return M(!0)},endTiming:function(){return M(!1)}}}),(0,C.useEffect)(function(){var u=0,m=v.countDown;return W&&(u=window.setInterval(function(){re(function(h){return h<=1?(M(!1),clearInterval(u),m||60):h-1})},1e3)),function(){return clearInterval(u)}},[W]),(0,C.useEffect)(function(){s&&s(U)},[U,s]),(0,T.jsxs)("div",{style:(0,l.Z)((0,l.Z)({},g==null?void 0:g.style),{},{display:"flex",alignItems:"center"}),ref:B,children:[(0,T.jsx)(R.Z,(0,l.Z)((0,l.Z)({},g),{},{style:(0,l.Z)({flex:1,transition:"width .3s",marginRight:8},g==null?void 0:g.style)})),(0,T.jsx)(z.ZP,(0,l.Z)((0,l.Z)({style:{display:"block"},disabled:W,loading:le},t),{},{onClick:(0,E.Z)((0,O.Z)().mark(function u(){var m;return(0,O.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(f.prev=0,!d){f.next=9;break}return f.next=4,_.validateFields([d].flat(1));case 4:return m=_.getFieldValue([d].flat(1)),f.next=7,n(m);case 7:f.next=11;break;case 9:return f.next=11,n("");case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(0),console.log(f.t0);case 16:case"end":return f.stop()}},u,null,[[0,13]])})),children:o(W,U)}))]})}),K=(0,x.G)(y);I.Z=K},35748:function(oe,I,i){var l=i(35361),O=i(56929),E=i(50959),D=i(20734),$=i(11527),j=["fieldProps","min","proFieldProps","max"],R=function(x,T){var c=x.fieldProps,y=x.min,K=x.proFieldProps,v=x.max,B=(0,O.Z)(x,j);return(0,$.jsx)(D.Z,(0,l.Z)({valueType:"digit",fieldProps:(0,l.Z)({min:y,max:v},c),ref:T,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:K},B))},z=E.forwardRef(R);I.Z=z},20902:function(oe,I,i){var l=i(35361),O=i(56929),E=i(50959),D=i(20734),$=i(11527),j=["fieldProps","proFieldProps"],R=function(C,x){var T=C.fieldProps,c=C.proFieldProps,y=(0,O.Z)(C,j);return(0,$.jsx)(D.Z,(0,l.Z)({ref:x,valueType:"textarea",fieldProps:T,proFieldProps:c},y))};I.Z=E.forwardRef(R)},23885:function(oe,I,i){i.d(I,{Z:function(){return s}});var l=i(50959),O=i(82187),E=i.n(O),D=i(8146),$=i(76144),j=i(15676),R=i(39910),z=i(70939),C=function(e,o){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)o.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(t[a[n]]=e[a[n]]);return t},T=e=>{var{prefixCls:o,className:t,hoverable:a=!0}=e,n=C(e,["prefixCls","className","hoverable"]);const{getPrefixCls:u}=l.useContext($.E_),m=u("card",o),h=E()(`${m}-grid`,t,{[`${m}-grid-hoverable`]:a});return l.createElement("div",Object.assign({},n,{className:h}))},c=i(601),y=i(54531),K=i(79349),v=i(56352);const B=e=>{const{antCls:o,componentCls:t,headerHeight:a,cardPaddingBase:n,tabsMarginBottom:u}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,c.bf)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)} 0 0`},(0,y.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},y.vS),{[`
|
||||
> ${t}-typography,
|
||||
> ${t}-typography-edit-content
|
||||
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${o}-tabs-top`]:{clear:"both",marginBottom:u,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},_=e=>{const{cardPaddingBase:o,colorBorderSecondary:t,cardShadow:a,lineWidth:n}=e;return{width:"33.33%",padding:o,border:0,borderRadius:0,boxShadow:`
|
||||
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -8,6 +8,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/umi.9d553cde.js"></script>
|
||||
<script src="/umi.24ab5343.js"></script>
|
||||
|
||||
</body></html>
|
||||
File diff suppressed because one or more lines are too long
1
dist/src__pages__config__config__index.c34c2b5a.async.js
vendored
Normal file
1
dist/src__pages__config__config__index.c34c2b5a.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/src__pages__order__components__BonusFormModal.16017d75.async.js
vendored
Normal file
1
dist/src__pages__order__components__BonusFormModal.16017d75.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/src__pages__order__components__OrderExportForm.3a260dfb.async.js
vendored
Normal file
1
dist/src__pages__order__components__OrderExportForm.3a260dfb.async.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[321],{76237:function(v,a,e){e.r(a);var m=e(90228),u=e.n(m),p=e(87999),E=e.n(p),c=e(5e4),d=e(19014),h=e(49547),D=e(50959),n=e(11527);a.default=function(r){var O=r.modalOpenState,M=r.onModalOpenState,P=r.onSubmit,o=(0,D.useRef)(),f=function(){var i=E()(u()().mark(function _(l){var s;return u()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P(l);case 2:(s=o.current)===null||s===void 0||s.resetFields();case 3:case"end":return t.stop()}},_)}));return function(l){return i.apply(this,arguments)}}();return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(c.Y,{title:"\u56E2\u961F\u7EDF\u8BA1\u5BFC\u51FA",formRef:o,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var _;(_=o.current)===null||_===void 0||_.resetFields()}}},onFinish:f,open:O,onOpenChange:M,children:[(0,n.jsx)(d.Z,{hidden:!0,width:"md",name:"id"}),(0,n.jsx)(h.A.Group,{children:(0,n.jsx)(d.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165!"}],width:"md",name:"userName",label:"\u56E2\u961F\u957F\u8D26\u53F7",placeholder:"\u8BF7\u8F93\u5165"})})]})})}}}]);
|
||||
1
dist/src__pages__order__index.588b868a.async.js
vendored
Normal file
1
dist/src__pages__order__index.588b868a.async.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
6
dist/umi.9d553cde.js → dist/umi.24ab5343.js
vendored
6
dist/umi.9d553cde.js → dist/umi.24ab5343.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,36 +1,37 @@
|
||||
import { GithubOutlined } from '@ant-design/icons';
|
||||
import { DefaultFooter } from '@ant-design/pro-components';
|
||||
import React from 'react';
|
||||
|
||||
const Footer: React.FC = () => {
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
return (
|
||||
<DefaultFooter
|
||||
style={{
|
||||
background: 'none',
|
||||
}}
|
||||
copyright="中帅新能源"
|
||||
copyright={`${currentYear} 中帅新能源`}
|
||||
links={[
|
||||
{
|
||||
key: 'Ant Design Pro',
|
||||
key: 'support',
|
||||
title: '中帅新能源提供技术支持',
|
||||
href: '',
|
||||
href: '/',
|
||||
blankTarget: false,
|
||||
},
|
||||
{
|
||||
key: 'icp',
|
||||
title: '豫ICP备2024076153号', // ← 替换为你的 ICP 备案号
|
||||
href: 'https://beian.miit.gov.cn/',
|
||||
blankTarget: true,
|
||||
},
|
||||
{
|
||||
key: 'gongan',
|
||||
title: '豫公网安备41010702004050号', // ← 替换为你的公安备案号
|
||||
href: 'https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=41010702004050', // 注意:替换最后的数字为你自己的备案号后缀
|
||||
blankTarget: true,
|
||||
},
|
||||
// {
|
||||
// key: 'github',
|
||||
// title: <GithubOutlined />,
|
||||
// href: 'https://github.com/ant-design/ant-design-pro',
|
||||
// blankTarget: true,
|
||||
// },
|
||||
// {
|
||||
// key: 'Ant Design',
|
||||
// title: 'Ant Design',
|
||||
// href: 'https://ant.design',
|
||||
// blankTarget: true,
|
||||
// },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
export default Footer;
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
EditableProTable,
|
||||
ActionType
|
||||
} from '@ant-design/pro-components';
|
||||
import { Card, message, Tabs, InputNumber, TimePicker, Input, Button } from 'antd';
|
||||
import { Card, message, Tabs, InputNumber, TimePicker, Input, Button, Switch } from 'antd';
|
||||
import type { FC } from 'react';
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { config, configUpdate } from '@/services/config/index'
|
||||
@@ -38,6 +38,15 @@ const BasicForm: FC<Record<string, any>> = () => {
|
||||
values.beginTime = dayjs(values.beginTime).format('HH:mm')
|
||||
}
|
||||
try {
|
||||
|
||||
if (values.newYearSwitch === true || values.newYearSwitch === false) {
|
||||
if (values.newYearSwitch) {
|
||||
values.newYearSwitch = 1
|
||||
} else {
|
||||
values.newYearSwitch = 0
|
||||
}
|
||||
}
|
||||
|
||||
await configUpdate(values);
|
||||
message.success('配置成功');
|
||||
return true;
|
||||
@@ -407,6 +416,33 @@ const BasicForm: FC<Record<string, any>> = () => {
|
||||
</ProForm >
|
||||
}
|
||||
|
||||
if (i.configKey == 'NEW_YEAR_SWITCH') {
|
||||
data = <ProForm
|
||||
style={{
|
||||
marginTop: 8,
|
||||
maxWidth: 600,
|
||||
}}
|
||||
layout="vertical"
|
||||
initialValues={value}
|
||||
onFinish={onFinish}
|
||||
>
|
||||
<ProForm.Group>
|
||||
<ProFormDigit
|
||||
name="id"
|
||||
disabled
|
||||
hidden={true}
|
||||
/>
|
||||
<ProForm.Item
|
||||
rules={[{ required: true, message: '请输入!' }]}
|
||||
label="新年开关"
|
||||
name={'newYearSwitch'}
|
||||
>
|
||||
<Switch checkedChildren="开" unCheckedChildren="关" />
|
||||
</ProForm.Item>
|
||||
</ProForm.Group>
|
||||
</ProForm >
|
||||
}
|
||||
|
||||
if (i.configKey == 'ALERT_EMAIL') {
|
||||
data = <ProForm
|
||||
style={{
|
||||
|
||||
50
src/pages/order/components/OrderExportForm.tsx
Normal file
50
src/pages/order/components/OrderExportForm.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import { ProForm, ModalForm, ProFormRadio, ProFormText, ProFormTextArea, ProFormMoney, ProFormCaptcha, ProFormInstance } from '@ant-design/pro-components';
|
||||
import { Button } from 'antd';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { smsCode } from '@/services/user/user'
|
||||
|
||||
|
||||
|
||||
export default ({ modalOpenState, onModalOpenState, onSubmit }) => {
|
||||
const restFormRef = useRef<ProFormInstance>();
|
||||
|
||||
const handleFinish = async (formValues) => {
|
||||
await onSubmit(formValues);
|
||||
restFormRef.current?.resetFields();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<ModalForm
|
||||
title="团队统计导出"
|
||||
formRef={restFormRef}
|
||||
submitter={{
|
||||
searchConfig: {
|
||||
resetText: '重置',
|
||||
},
|
||||
resetButtonProps: {
|
||||
onClick: () => {
|
||||
restFormRef.current?.resetFields();
|
||||
},
|
||||
},
|
||||
}}
|
||||
onFinish={handleFinish}
|
||||
open={modalOpenState}
|
||||
onOpenChange={onModalOpenState}
|
||||
>
|
||||
<ProFormText hidden={true} width="md" name="id" />
|
||||
<ProForm.Group>
|
||||
<ProFormText
|
||||
rules={[{ required: true, message: '请输入!' }]}
|
||||
width="md"
|
||||
name="userName"
|
||||
label="团队长账号"
|
||||
placeholder="请输入"
|
||||
/>
|
||||
|
||||
</ProForm.Group>
|
||||
</ModalForm>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { orderPage, orderExport, orderRefund, getWeiXinCollect, getCollect, getBalance, getZhiFuBaoCollect, deliverGoods } from '@/services/order';
|
||||
import { orderPage, orderExport, orderRefund, getWeiXinCollect, getCollect, getBalance, getZhiFuBaoCollect, deliverGoods, orderExportTeam } from '@/services/order';
|
||||
import { exportData } from '@/utils/func';
|
||||
import React, { useRef, useEffect, useState } from 'react';
|
||||
import { useIntl, useAccess } from '@umijs/max';
|
||||
@@ -6,6 +6,9 @@ import { message, Tag, Col, Row, Card, Image, Button, Select } from 'antd';
|
||||
import { ActionType, PageContainer, ProTable } from '@ant-design/pro-components';
|
||||
import BonusFormModal from './components/BonusFormModal';
|
||||
import EscFormModal from './components/EscFormModal';
|
||||
import OrderExportForm from './components/OrderExportForm';
|
||||
|
||||
|
||||
import { usersPage } from '@/services/user/user';
|
||||
import UpdateForm from './fahuo';
|
||||
|
||||
@@ -14,6 +17,10 @@ const LogTableList: React.FC = () => {
|
||||
const actionRef = useRef<ActionType>();
|
||||
const [searchParams, setSearchParams] = useState(null);
|
||||
const [bonusFormModal, setBonusFormModal] = useState(false);
|
||||
const [orderExportForm, setOrderExport] = useState(false);
|
||||
|
||||
|
||||
|
||||
const [row, setRow] = useState();
|
||||
const [selectedRowsState, setSelectedRows] = useState([]);
|
||||
const [escFormModal, setEscFormModal] = useState(false);
|
||||
@@ -332,6 +339,21 @@ const LogTableList: React.FC = () => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const orderExportSubmit = async (fields) => {
|
||||
let data = JSON.parse(JSON.stringify(searchParams))
|
||||
delete data.pageSize
|
||||
delete data.current
|
||||
delete data.userId
|
||||
|
||||
const res = await orderExportTeam({
|
||||
...fields,
|
||||
...data
|
||||
});
|
||||
exportData(res, fields.userName + '团队订单统计')
|
||||
setOrderExport(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<PageContainer>
|
||||
<Row gutter={10} className='mb-30'>
|
||||
@@ -392,6 +414,12 @@ const LogTableList: React.FC = () => {
|
||||
modalOpenState={bonusFormModal}
|
||||
onModalOpenState={setBonusFormModal}
|
||||
/>
|
||||
<OrderExportForm
|
||||
values={row}
|
||||
modalOpenState={orderExportForm}
|
||||
onModalOpenState={setOrderExport}
|
||||
onSubmit={orderExportSubmit}
|
||||
/>
|
||||
<ProTable
|
||||
actionRef={actionRef}
|
||||
rowKey="id"
|
||||
@@ -410,6 +438,10 @@ const LogTableList: React.FC = () => {
|
||||
>
|
||||
退单
|
||||
</Button>,
|
||||
<Button hidden={!access.hasPerms('/api/orders/export')} type="primary" onClick={async () => {
|
||||
setOrderExport(true);
|
||||
|
||||
}}>团队统计导出</Button>,
|
||||
<Button hidden={!access.hasPerms('/api/orders/export')} type="primary" onClick={async () => {
|
||||
let data = JSON.parse(JSON.stringify(searchParams))
|
||||
delete data.pageSize
|
||||
@@ -440,7 +472,7 @@ const LogTableList: React.FC = () => {
|
||||
<UpdateForm
|
||||
onSubmit={async (values) => {
|
||||
console.log(values);
|
||||
|
||||
|
||||
let success = false;
|
||||
if (values.orderId) {
|
||||
success = await deliverGoods({ ...values });
|
||||
|
||||
@@ -91,3 +91,15 @@ export async function deliverGoods(bodys) {
|
||||
data: bodys || {},
|
||||
});
|
||||
}
|
||||
|
||||
export async function orderExportTeam(bodys) {
|
||||
return request('/api/orders/teamExport', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
data: bodys || {},
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user