You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 lines
10 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[171],{43525:function(ue,Z,t){t.d(Z,{Ku:function(){return L},n3:function(){return O},Nm:function(){return A},gp:function(){return E},nB:function(){return T},Jz:function(){return I},DM:function(){return F},kJ:function(){return U},$P:function(){return b}});var L={};t.r(L),t.d(L,{Params:function(){return N},request:function(){return $}});var O={};t.r(O),t.d(O,{Params:function(){return B},request:function(){return z}});var U={};t.r(U),t.d(U,{Params:function(){return n},request:function(){return k}});var I={};t.r(I),t.d(I,{Params:function(){return H},request:function(){return V}});var A={};t.r(A),t.d(A,{Params:function(){return J},request:function(){return Q}});var E={};t.r(E),t.d(E,{Params:function(){return Y},request:function(){return X}});var F={};t.r(F),t.d(F,{Params:function(){return q},request:function(){return w}});var T={};t.r(T),t.d(T,{Params:function(){return ee},request:function(){return j}});var b={};t.r(b),t.d(b,{Params:function(){return c},request:function(){return d}});var G=t(97857),s=t.n(G),W=t(72004),D=t.n(W),R=t(12444),P=t.n(R),y=t(9783),a=t.n(y),p=t(88593),N=D()(function e(){P()(this,e),a()(this,"page",void 0),a()(this,"page_size",void 0),a()(this,"status",void 0)});function $(e,r){return(0,p.request)("/order/batchList",s()({method:"GET",params:s()({},e),data:{}},r||{}))}var B=D()(function e(){P()(this,e),a()(this,"status1",void 0),a()(this,"status2",void 0),a()(this,"total",void 0)});function z(e,r){return(0,p.request)("/order/batchListTotal",s()({method:"GET",params:s()({},e),data:{}},r||{}))}var n=D()(function e(){P()(this,e)});function k(e,r,o){return(0,p.request)("/order/batchSend",s()({method:"PUT",params:s()({},e),data:s()({},r)},o||{}))}var H=D()(function e(){P()(this,e)});function V(e,r,o){return(0,p.request)("/order/batchSend",s()({method:"POST",params:s()({},e),data:s()({},r)},o||{}))}var J=D()(function e(){P()(this,e),a()(this,"orderID",void 0)});function Q(e,r){return(0,p.request)("/order/detail",s()({method:"GET",params:s()({},e),data:{}},r||{}))}var Y=D()(function e(){P()(this,e),a()(this,"code",void 0),a()(this,"createdAt",void 0),a()(this,"goodsID",void 0),a()(this,"influenceId",void 0),a()(this,"name",void 0),a()(this,"orderID",void 0),a()(this,"page",void 0),a()(this,"page_size",void 0),a()(this,"phone",void 0),a()(this,"status",void 0),a()(this,"userId",void 0)});function X(e,r){return(0,p.request)("/order/list",s()({method:"GET",params:s()({},e),data:{}},r||{}))}var q=D()(function e(){P()(this,e),a()(this,"id",void 0),a()(this,"status",void 0)});function w(e,r){return(0,p.request)("/order/postSale",s()({method:"POST",params:s()({},e),data:{}},r||{}))}var ee=D()(function e(){P()(this,e),a()(this,"confirmTimeEnd",void 0),a()(this,"confirmTimeStart",void 0),a()(this,"orderId",void 0),a()(this,"page",void 0),a()(this,"page_size",void 0),a()(this,"status",void 0)});function j(e,r){return(0,p.request)("/order/postSale/list",s()({method:"GET",params:s()({},e),data:{}},r||{}))}var u=null;function l(e,r){return Request("/order/postSale/refund",_objectSpread({method:"POST",params:_objectSpread({},e),data:{}},r||{}))}var c=D()(function e(){P()(this,e)});function d(e,r,o){return(0,p.request)("/order/send",s()({method:"PUT",params:s()({},e),data:s()({},r)},o||{}))}},85558:function(ue,Z,t){t.r(Z),t.d(Z,{default:function(){return ee}});var L=t(5574),O=t.n(L),U=t(97857),I=t.n(U),A=t(15009),E=t.n(A),F=t(99289),T=t.n(F),b=t(67294),G=t(64082),s=t(77916),W=t(84485),D=t(26713),R=t(29924),P=t(85402),y=t(12461),a=t(81579),p=t(69677),N=t(63922),$=t(8702),B=t(43525),z=t(88593),n=t(85893),k=s.Z.Dragger,H=W.Z.Link,V=W.Z.Text,J=function(u){var l=u.value,c=u.onChange,d=(0,z.useRequest)(function(){return B.n3.request({page:1,page_size:999})}),e=d.data;return(0,n.jsx)(D.Z,{align:"center",children:(0,n.jsx)(R.ZP.Group,{value:(l==null?void 0:l.status)||"",onChange:function(o){c({status:o.target.value})},children:(0,n.jsxs)(D.Z,{wrap:!0,children:[(0,n.jsxs)(R.ZP.Button,{value:"",children:["\u5168\u90E8(","".concat((e==null?void 0:e.total)||0),")"]}),(0,n.jsxs)(R.ZP.Button,{value:1,children:["\u6210\u529F(","".concat((e==null?void 0:e.status1)||0),")"]}),(0,n.jsxs)(R.ZP.Button,{value:2,children:["\u5931\u8D25(","".concat((e==null?void 0:e.status2)||0),")"]})]})})})},Q=function(u){var l=u.onChange,c={name:"file",multiple:!1,accept:".xlsx"},d=function(){var e=T()(E()().mark(function r(o){var v,_,h,x;return E()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(v=o.type,_=/application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet/,_.test(v)){C.next=5;break}return P.Z.error({title:"\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF",content:(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:"\u8BF7\u4E0A\u4F20xlsx\u683C\u5F0F\u7684\u6587\u4EF6"})})}),C.abrupt("return",!1);case 5:return h=new FormData,h.append("file",o,o.name),C.next=9,B.Jz.request({},{},{headers:{"Content-Type":"multipart/form-data"},data:h});case 9:x=C.sent,x.code===0&&(y.ZP.success("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F"),l(x==null?void 0:x.data));case 11:case"end":return C.stop()}},r)}));return function(o){return e.apply(this,arguments)}}();return(0,n.jsx)("div",{style:{height:200,marginBottom:20},children:(0,n.jsxs)(k,I()(I()({},c),{},{beforeUpload:d,showUploadList:!1,children:[(0,n.jsx)("p",{className:"ant-upload-drag-icon",children:(0,n.jsx)(G.Z,{})}),(0,n.jsx)("p",{className:"ant-upload-text",children:"\u70B9\u51FB\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u8FD9\u91CC\u4E0A\u4F20"}),(0,n.jsx)("p",{className:"ant-upload-hint",children:(0,n.jsx)(H,{onClick:function(r){r.stopPropagation()},target:"_blank",href:"https://minio.sumweal.com/nft/221123/hr8mOIB16r02R4dGY6I92SCuYWo29IaB35f48xVVQ7RYb21n0t.xlsx",children:"\u4E0B\u8F7D\u53D1\u8D27\u6A21\u7248"})})]}))})},Y=function(u){var l=u.visible,c=u.onOk,d=u.onCancel,e=u.record,r=a.Z.useForm(),o=O()(r,1),v=o[0];return(0,b.useEffect)(function(){v.setFieldValue("orderID",e==null?void 0:e.orderID)},[e==null?void 0:e.orderID]),(0,n.jsx)(P.Z,{visible:l,title:"\u53D1\u8D27",destroyOnClose:!0,onOk:T()(E()().mark(function _(){var h;return E()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,v.validateFields();case 2:h=f.sent,c(h);case 4:case"end":return f.stop()}},_)})),onCancel:d,children:(0,n.jsxs)(a.Z,{form:v,preserve:!1,children:[(0,n.jsx)(a.Z.Item,{label:"\u8BA2\u5355\u7F16\u53F7",name:"orderID",rules:[{required:!0}],children:(0,n.jsx)(p.Z,{bordered:!1,readOnly:!0})}),(0,n.jsx)(a.Z.Item,{label:"\u67E5\u8BE2\u5730\u5740",name:"courierLink",rules:[{required:!0}],children:(0,n.jsx)(p.Z,{})}),(0,n.jsx)(a.Z.Item,{label:"\u5FEB\u9012\u5355\u53F7",name:"courierNumber",rules:[{required:!0}],children:(0,n.jsx)(p.Z,{})})]})})},X=function(u){var l=u.visible,c=u.onOk,d=u.onCancel,e=u.list,r=[{title:"\u8BA2\u5355\u7F16\u53F7",dataIndex:"orderID",key:"orderID"},{title:"\u5FEB\u9012\u5355\u53F7",dataIndex:"courierNumber",key:"courierNumber"},{title:"\u67E5\u8BE2\u5730\u5740",dataIndex:"courierLink",key:"courierLink"}];return(0,n.jsxs)(P.Z,{title:"\u6279\u91CF\u53D1\u8D27\u9884\u89C8",visible:l,onOk:c,onCancel:d,children:[(0,n.jsx)("div",{style:{marginBottom:10},children:(0,n.jsxs)(V,{type:"secondary",children:["\u8BA2\u5355\u6570:",(e==null?void 0:e.length)||0,"\u5355"]})}),(0,n.jsx)($.QVr,{scroll:{x:"max-content"},options:{reload:!1},bordered:!0,toolBarRender:!1,tooltip:null,search:!1,columns:r,dataSource:e})]})},q=function(){var u=(0,b.useState)(!1),l=O()(u,2),c=l[0],d=l[1],e=function(v){var _;d(!1),v==null||(_=v.current)===null||_===void 0||_.reload()},r=function(){var o=T()(E()().mark(function v(_){var h;return E()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,B.$P.request({},_);case 2:h=f.sent,h.code===0&&(y.ZP.success("\u53D1\u8D27\u6210\u529F"),d(!1));case 4:case"end":return f.stop()}},v)}));return function(_){return o.apply(this,arguments)}}();return{visible:c,visibleHandler:d,onOk:r,onCancel:e}},w=function(){var u=(0,b.useState)(!1),l=O()(u,2),c=l[0],d=l[1];return{visible:c,visibleHandler:d}};function ee(){var j=q(),u=j.visible,l=j.visibleHandler,c=j.onCancel,d=j.onOk,e=w(),r=e.visible,o=e.visibleHandler,v=(0,b.useState)({}),_=O()(v,2),h=_[0],x=_[1],f=(0,b.useState)([]),C=O()(f,2),te=C[0],ne=C[1],K=(0,b.useRef)(),oe=(0,b.useState)({}),re=O()(oe,2),ae=re[0],se=re[1],ie=[{title:"\u8BA2\u5355\u7F16\u53F7",dataIndex:"orderID",key:"orderID",hideInSearch:!0},{title:"\u5BFC\u5165\u65F6\u95F4",dataIndex:"createdAt",key:"createdAt",valueType:"dateTime",hideInSearch:!0},{title:"\u5FEB\u9012\u5355\u53F7",dataIndex:"courierNumber",key:"courierNumber",hideInSearch:!0},{title:"\u67E5\u8BE2\u5730\u5740",dataIndex:"courierLink",key:"courierLink",hideInSearch:!0},{title:"\u5BFC\u5165\u72B6\u6001",dataIndex:"status",key:"status",hideInSearch:!0,valueType:"select",fieldProps:{options:[{label:"\u6210\u529F",value:1},{label:"\u5931\u8D25",value:2}]},render:function(m,i){var M=["black","blue","red"];return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(N.Z,{color:M[i==null?void 0:i.status]||"black",text:m})})}},{title:"\u64CD\u4F5C",fixed:"right",hideInSearch:!0,render:function(m,i){return(0,n.jsx)("div",{children:(i==null?void 0:i.status)===2?(0,n.jsx)(H,{onClick:function(){x(i),l(!0)},children:"\u4FEE\u6539"}):null})}}],le=function(m){return B.Ku.request(I()(I()({},m),{},{page:m.current,page_size:m.pageSize})).then(function(i){var M,S;return{success:!0,data:(i==null||(M=i.data)===null||M===void 0?void 0:M.list)||[],total:i==null||(S=i.data)===null||S===void 0?void 0:S.total}})};return(0,n.jsxs)("div",{children:[(0,n.jsx)(Q,{onChange:function(m){ne(m),o(!0)}}),(0,n.jsx)($.QVr,{scroll:{x:"max-content"},options:{reload:!1},onReset:function(){se({status:""})},params:ae,request:le,actionRef:K,columns:ie,headerTitle:(0,n.jsx)(J,{value:ae,onChange:function(m){se(m)}})}),(0,n.jsx)(Y,{record:h,visible:u,onOk:d,onCancel:function(){c(K)}},h==null?void 0:h.id),(0,n.jsx)(X,{list:te,visible:r,onOk:T()(E()().mark(function g(){var m,i;return E()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,B.kJ.request({},{data:te},{headers:{"Content-Type":"application/json"}});case 2:m=S.sent,(m==null?void 0:m.code)===0&&(y.ZP.success("\u5BFC\u5165\u6210\u529F"),o(!1),K==null||(i=K.current)===null||i===void 0||i.reload());case 4:case"end":return S.stop()}},g)})),onCancel:function(){ne([]),o(!1)}})]})}}}]);