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
14 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[909],{43525:function(Ot,V,t){t.d(V,{Ku:function(){return $},n3:function(){return H},Nm:function(){return X},gp:function(){return Y},nB:function(){return q},Jz:function(){return B},DM:function(){return k},kJ:function(){return b},$P:function(){return w}});var $={};t.r($),t.d($,{Params:function(){return rt},request:function(){return it}});var H={};t.r(H),t.d(H,{Params:function(){return ut},request:function(){return vt}});var b={};t.r(b),t.d(b,{Params:function(){return ct},request:function(){return ht}});var B={};t.r(B),t.d(B,{Params:function(){return _},request:function(){return ft}});var X={};t.r(X),t.d(X,{Params:function(){return T},request:function(){return mt}});var Y={};t.r(Y),t.d(Y,{Params:function(){return e},request:function(){return gt}});var k={};t.r(k),t.d(k,{Params:function(){return St},request:function(){return Ht}});var q={};t.r(q),t.d(q,{Params:function(){return pt},request:function(){return xt}});var w={};t.r(w),t.d(w,{Params:function(){return tt},request:function(){return Pt}});var I=t(97857),s=t.n(I),A=t(72004),u=t.n(A),R=t(12444),E=t.n(R),O=t(9783),r=t.n(O),Z=t(88593),rt=u()(function a(){E()(this,a),r()(this,"page",void 0),r()(this,"page_size",void 0),r()(this,"status",void 0)});function it(a,c){return(0,Z.request)("/order/batchList",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var ut=u()(function a(){E()(this,a),r()(this,"status1",void 0),r()(this,"status2",void 0),r()(this,"total",void 0)});function vt(a,c){return(0,Z.request)("/order/batchListTotal",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var ct=u()(function a(){E()(this,a)});function ht(a,c,G){return(0,Z.request)("/order/batchSend",s()({method:"PUT",params:s()({},a),data:s()({},c)},G||{}))}var _=u()(function a(){E()(this,a)});function ft(a,c,G){return(0,Z.request)("/order/batchSend",s()({method:"POST",params:s()({},a),data:s()({},c)},G||{}))}var T=u()(function a(){E()(this,a),r()(this,"orderID",void 0)});function mt(a,c){return(0,Z.request)("/order/detail",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var e=u()(function a(){E()(this,a),r()(this,"code",void 0),r()(this,"createdAt",void 0),r()(this,"goodsID",void 0),r()(this,"influenceId",void 0),r()(this,"name",void 0),r()(this,"orderID",void 0),r()(this,"page",void 0),r()(this,"page_size",void 0),r()(this,"phone",void 0),r()(this,"status",void 0),r()(this,"userId",void 0)});function gt(a,c){return(0,Z.request)("/order/list",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var St=u()(function a(){E()(this,a),r()(this,"id",void 0),r()(this,"status",void 0)});function Ht(a,c){return(0,Z.request)("/order/postSale",s()({method:"POST",params:s()({},a),data:{}},c||{}))}var pt=u()(function a(){E()(this,a),r()(this,"confirmTimeEnd",void 0),r()(this,"confirmTimeStart",void 0),r()(this,"orderId",void 0),r()(this,"page",void 0),r()(this,"page_size",void 0),r()(this,"status",void 0)});function xt(a,c){return(0,Z.request)("/order/postSale/list",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var jt=null;function Rt(a,c){return Request("/order/postSale/refund",_objectSpread({method:"POST",params:_objectSpread({},a),data:{}},c||{}))}var tt=u()(function a(){E()(this,a)});function Pt(a,c,G){return(0,Z.request)("/order/send",s()({method:"PUT",params:s()({},a),data:s()({},c)},G||{}))}},95749:function(Ot,V,t){t.d(V,{Z:function(){return b}});var $=t(84908),H=t(85893);function b(B){return(0,H.jsx)($.Z,{title:(B==null?void 0:B.title)||B.children,placement:"topLeft",children:(0,H.jsx)("div",{className:"fm-ellipsis-2",children:B.children})})}},85932:function(Ot,V,t){t.r(V),t.d(V,{default:function(){return Dt}});var $=t(15009),H=t.n($),b=t(99289),B=t.n(b),X=t(13769),Y=t.n(X),k=t(19632),q=t.n(k),w=t(5574),I=t.n(w),s=t(97857),A=t.n(s),u=t(67294),R=t(84485),E=t(84739),O=t(26713),r=t(79216),Z=t(12461),rt=t(8702),it=t(43525),ut={},vt=t(95749),ct=t(73935),ht=t(85402),_=t(71577),ft=t(59652),T=t(2587),mt=t(69677),e=t(85893),gt=R.Z.Title,St=R.Z.Text,Ht=function(f){var v,n=f.record;return _jsxs(Space,{style:{width:250,overflowX:"hidden"},align:"start",children:[_jsx(Image,{style:{width:120,height:120,objectFit:"cover"},src:n==null||(v=n.image)===null||v===void 0?void 0:v.split(",")[0]}),_jsxs("div",{children:[_jsxs(St,{children:["ID:",n==null?void 0:n.spu_no]}),_jsx(Ellipsis,{title:n==null?void 0:n.title,children:_jsx(gt,{level:5,children:n==null?void 0:n.title})})]})]})};function pt(d){var f,v,n,m,x,D,W,K=d.visible,et=d.onOk,M=d.onCancel,i=d.data,L=d.handleAudit,N=i.goods,F=N===void 0?{}:N,at=(0,u.useState)(""),U=I()(at,2),lt=U[0],J=U[1];return(0,e.jsxs)(ht.Z,{title:"\u9000\u6B3E\u5BA1\u6838",destroyOnClose:!0,width:document.body.clientWidth>1e3?document.body.clientWidth-200:800,open:K,onOk:et,onCancel:M,footer:(0,e.jsxs)(O.Z,{children:[(0,e.jsx)(_.Z,{onClick:M,children:"\u53D6\u6D88"}),(0,e.jsx)(_.Z,{onClick:function(){return L(1)},children:"\u5BA1\u6838\u4E0D\u901A\u8FC7"}),(0,e.jsx)(_.Z,{onClick:function(){return L(2)},type:"primary",children:"\u5BA1\u6838\u901A\u8FC7"})]}),children:[(0,e.jsx)(rt.QVr,{scroll:{x:"max-content"},options:!1,columns:[{title:"\u5546\u54C1\u4FE1\u606F",dataIndex:"goods_id",render:function(y,g){var z;return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(O.Z,{direction:"horizontal",children:[(0,e.jsx)(r.Z,{style:{width:80,height:80,objectFit:"contain"},src:g==null||(z=g.images)===null||z===void 0?void 0:z.split(",")[0]}),(0,e.jsxs)(O.Z,{direction:"vertical",children:[(0,e.jsxs)(R.Z.Text,{children:["ID:",(g==null?void 0:g.goods_id)||"-"]}),(0,e.jsx)(R.Z.Text,{children:(g==null?void 0:g.title)||"-"})]})]})})}},{title:"\u9500\u552E\u4EF7",dataIndex:"price"},{title:"\u5E93\u5B58",dataIndex:"stock"},{title:"\u7D2F\u79EF\u9500\u91CF",dataIndex:"sales"},{title:"30\u65E5\u9500\u91CF",dataIndex:"sales_30"},{title:"\u521B\u5EFA\u65F6\u95F4",valueType:"dateTime",dataIndex:"\u7F3A\u5C11\u5B57\u6BB5"},{title:"\u6807\u7B7E",dataIndex:"tags"}],style:{marginTop:20},bordered:!0,toolBarRender:!1,tooltip:null,search:!1,dataSource:[F||{}]}),(0,e.jsx)(ft.Z,{title:"\u8BA2\u5355\u4FE1\u606F",style:{marginBottom:20},children:(0,e.jsxs)(T.Z,{layout:"horizontal",column:3,children:[(0,e.jsx)(T.Z.Item,{label:"\u5B9E\u4ED8\u91D1\u989D",children:"-"}),(0,e.jsx)(T.Z.Item,{label:"\u9000\u6B3E\u91D1\u989D",children:(i==null?void 0:i.amount)||"-"}),(0,e.jsx)(T.Z.Item,{label:"\u552E\u540E\u539F\u56E0",children:i==null?void 0:i.reason}),(0,e.jsx)(T.Z.Item,{label:"\u6210\u4EA4\u65F6\u95F4",children:i==null||(f=i.order)===null||f===void 0?void 0:f.createdAt}),(0,e.jsx)(T.Z.Item,{label:"\u552E\u540E\u65F6\u95F4",children:i==null?void 0:i.createdAt}),(0,e.jsx)(T.Z.Item,{label:"\u4E70\u5BB6",children:(i==null||(v=i.order)===null||v===void 0||(n=v.address)===null||n===void 0?void 0:n.phone)||"-"}),(0,e.jsx)(T.Z.Item,{label:"\u552E\u540E\u56FE\u7247",span:3,children:(0,e.jsx)(O.Z,{wrap:!0,children:i==null||(m=i.images)===null||m===void 0||(x=m.spilt(","))===null||x===void 0?void 0:x.map(function(P,y){return(0,e.jsx)(r.Z,{src:P},P+y)})})}),(0,e.jsx)(T.Z.Item,{label:"\u552E\u540E\u89C6\u9891",span:3,children:(0,e.jsx)(O.Z,{wrap:!0,children:i==null||(D=i.videos)===null||D===void 0||(W=D.spilt(","))===null||W===void 0?void 0:W.map(function(P,y){return(0,e.jsxs)("video",{controls:!0,width:"300",height:"200",children:[(0,e.jsx)("source",{src:P,type:"video/mp4"}),"Your browser does not support the video tag."]},P+y)})})}),(0,e.jsx)(T.Z.Item,{label:"\u5BA1\u6838\u610F\u89C1",span:3,children:(0,e.jsx)(mt.Z.TextArea,{value:lt,onChange:function(y){J(y.target.value)}})})]})})]})}var xt=["page","page_size"],jt=R.Z.Title,Rt=R.Z.Link,tt=R.Z.Text,Pt=function(f){var v=document.querySelector("#table .ant-spin-container");return v?ct.createPortal((0,e.jsx)(E.Z,A()(A()({style:{textAlign:"right",mariginTop:20},size:"small",pageSize:f.pageSize,showTotal:function(m,x){return console.log({total:m,range:x}),"\u7B2C ".concat(x[0],"-").concat(x[1]," \u6761/\u603B\u5171 ").concat(m," \u6761")}},f),{},{current:f.current,onChange:function(m,x){f.onChange(m,x)}})),v):null},a=function(f){var v,n=f.record;return(0,e.jsxs)(O.Z,{style:{width:250,overflowX:"hidden"},align:"start",children:[(0,e.jsx)(r.Z,{style:{width:120,height:120,objectFit:"cover"},src:n==null||(v=n.image)===null||v===void 0?void 0:v.split(",")[0]}),(0,e.jsxs)("div",{children:[(0,e.jsxs)(tt,{children:["ID:",(n==null?void 0:n.spu_no)||"-"]}),(0,e.jsx)(vt.Z,{title:(n==null?void 0:n.title)||"-",children:(0,e.jsx)(jt,{level:5,children:(n==null?void 0:n.title)||"-"})})]})]})},c=function(f){var v=f.onChange,n=f.value;return _jsxs(Space,{align:"center",children:[_jsx(jt,{level:5,style:{marginBottom:0,fontWeight:900},children:"\u5FEB\u901F\u7B5B\u9009\u8BA2\u5355"}),_jsx(Radio.Group,{value:(n==null?void 0:n.status)||"",onChange:function(x){v(x.target.value)},children:_jsxs(Space,{wrap:!0,children:[_jsx(Radio.Button,{value:"",children:"\u5168\u90E8"}),_jsx(Radio.Button,{value:2,children:"\u5F85\u5BA1\u6838"}),_jsx(Radio.Button,{value:3,children:"\u5DF2\u5BA1\u6838"})]})})]})},G=function(){var f=(0,u.useState)([]),v=I()(f,2),n=v[0],m=v[1],x=(0,u.useState)(0),D=I()(x,2),W=D[0],K=D[1],et=(0,u.useState)(1),M=I()(et,2),i=M[0],L=M[1],N=(0,u.useState)(20),F=I()(N,2),at=F[0],U=F[1],lt=(0,u.useState)({}),J=I()(lt,2),P=J[0],y=J[1],g=(0,u.useRef)(),z=(0,u.useState)({}),ot=I()(z,2),dt=ot[0],Ct=ot[1];return{list:n,listHandler:m,total:W,totalHandler:K,page:i,pageHandler:L,pageSize:at,pageSizeHandler:U,actionRef:g,record:P,recordHandler:y,params:dt,paramsHandler:Ct}};function Dt(){var d=G(),f=d.list,v=d.listHandler,n=d.totalHandler,m=d.actionRef,x=d.record,D=d.recordHandler,W=d.params,K=d.paramsHandler,et=d.page,M=d.pageSize,i=d.pageHandler,L=d.pageSizeHandler,N=d.total,F=(0,u.useRef)(1),at=(0,u.useState)({}),U=I()(at,2),lt=U[0],J=U[1],P=(0,u.useState)({}),y=I()(P,2),g=y[0],z=y[1],ot=(0,u.useState)(!1),dt=I()(ot,2),Ct=dt[0],nt=dt[1],It=function(l){if(!(l!=null&&l.length))return[];var o=q()(l),p=[];return o.forEach(function(S){p.push(S),p.push(S)}),p},Q=function(l,o){return o%2===0?{colSpan:0}:{}},Lt=[{title:"\u8BA2\u5355\u7F16\u53F7",dataIndex:"orderId",hideInTable:!0},{title:"\u552E\u540E\u72B6\u6001",dataIndex:"status",valueType:"select",fieldProps:{options:[{label:"\u5F85\u5BA1\u6838",value:1},{label:"\u9000\u6B3E\u4E2D",value:2},{label:"\u9000\u6B3E\u6210\u529F",value:3},{label:"\u9000\u6B3E\u5931\u8D25",value:4}]},hideInTable:!0},{title:"\u6210\u4EA4\u65F6\u95F4",dataIndex:"createdAt",hideInTable:!0,valueType:"dateRange",search:{transform:function(l){return{confirmTimeStart:l[0],confirmTimeEnd:l[1]}}}},{title:"\u5546\u54C1\u4FE1\u606F",dataIndex:"name",hideInSearch:!0,width:350,onCell:function(l,o){return{colSpan:o%2!==0?1:9}},render:function(l,o,p){if(p%2===0){var S,h;return(0,e.jsxs)(O.Z,{children:[(0,e.jsxs)(tt,{children:["\u8BA2\u5355\u7F16\u53F7:",(o==null||(S=o.order)===null||S===void 0?void 0:S.orderID)||"-"]}),(0,e.jsxs)(tt,{children:["\u7F51\u7EA2\u8D26\u53F7:",(o==null||(h=o.order)===null||h===void 0?void 0:h.code)||"-"]})]})}else{var C;return(0,e.jsx)(a,{record:o==null||(C=o.order)===null||C===void 0?void 0:C.goods})}}},{title:"\u8BA2\u5355\u72B6\u6001",width:160,dataIndex:"orderStatus",hideInSearch:!0,valueType:"select",fieldProps:{options:[{label:"\u5F85\u4ED8\u6B3E",value:1},{label:"\u5F85\u53D1\u8D27",value:2},{label:"\u5DF2\u53D1\u8D27",value:3},{label:"\u5DF2\u5B8C\u6210",value:4},{label:"\u5DF2\u53D6\u6D88",value:5}]},onCell:Q},{title:"\u91D1\u989D",width:120,dataIndex:"amount",hideInSearch:!0,onCell:Q},{title:"\u552E\u540E\u72B6\u6001",width:160,dataIndex:"refundStatus",hideInSearch:!0,valueType:"select",fieldProps:{options:[{label:"\u9000\u6B3E\u4E2D",value:1},{label:"\u9000\u6B3E\u6210\u529F",value:2},{label:"\u9000\u6B3E\u5931\u8D25",value:3}]},onCell:Q},{title:"\u552E\u540E\u539F\u56E0",width:120,dataIndex:"reason",hideInSearch:!0,onCell:Q},{title:"\u4E70\u5BB6",width:120,dataIndex:"customerPhone",hideInSearch:!0,onCell:Q,render:function(l,o){var p,S;return(0,e.jsx)(e.Fragment,{children:o==null||(p=o.order)===null||p===void 0||(S=p.address)===null||S===void 0?void 0:S.phone})}},{title:"\u64CD\u4F5C",width:180,hideInSearch:!0,fixed:"right",onCell:Q,render:function(l,o){return(0,e.jsxs)(O.Z,{direction:"vertical",children:[(0,e.jsx)("a",{onClick:function(){D(o),nt(!0)},children:"\u9000\u6B3E\u5BA1\u6838"}),(0,e.jsx)("a",{onClick:function(){D(o),nt(!0)},children:"\u67E5\u770B"})]})}}],zt=function(l){i(l.current),L(l.pageSize),console.log(l);var o=l.page,p=l.page_size,S=Y()(l,xt);return J(S),it.nB.request(A()({},l)).then(function(h){var C,Tt,Bt,Et,Zt,yt;return v((h==null||(C=h.data)===null||C===void 0?void 0:C.list)||[]),n(h==null||(Tt=h.data)===null||Tt===void 0?void 0:Tt.total),console.log(It(h==null||(Bt=h.data)===null||Bt===void 0?void 0:Bt.list)),{success:!0,data:It(h==null||(Et=h.data)===null||Et===void 0||(Zt=Et.list)===null||Zt===void 0?void 0:Zt.map(function(st){var At;return A()(A()({},st),{},{orderStatus:st==null||(At=st.order)===null||At===void 0?void 0:At.status})})),total:(h==null||(yt=h.data)===null||yt===void 0?void 0:yt.total)*2}})},Ft=function(){var j=B()(H()().mark(function l(o){var p,S;return H()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,it.DM.request({id:g==null?void 0:g.id,status:o});case 2:p=C.sent,p.code===0&&(Z.ZP.success("\u64CD\u4F5C\u6210\u529F"),nt(!1),z({}),m==null||(S=m.current)===null||S===void 0||S.reload());case 4:case"end":return C.stop()}},l)}));return function(o){return j.apply(this,arguments)}}();return(0,e.jsxs)("div",{className:ut.orderList,id:"table",children:[(0,e.jsx)(rt.QVr,{scroll:{x:"max-content"},beforeSearchSubmit:function(l){return F.current=1,K({status:l.status}),i(1),L(20),console.log(l),A()({},l)},defaultSize:"small",onReset:function(){K({status:""}),i(1),L(20)},pagination:!1,options:{reload:!1},params:A()(A()({},W),{},{page:et,page_size:M}),actionRef:m,request:zt,dataSource:It(f),columns:Lt}),(0,e.jsx)(Pt,{current:F.current,pageSize:20,total:N,onChange:function(l,o){i(l),F.current=l,L(o)},pageHandler:i}),(0,e.jsx)(pt,{visible:Ct,handleAudit:Ft,data:g,onOk:function(){z({}),nt(!1)},onCancel:function(){z({}),nt(!1)}})]})}}}]);