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
15 KiB
1 lines
15 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[713],{43525:function(Re,V,e){e.d(V,{Ku:function(){return R},n3:function(){return z},Nm:function(){return X},gp:function(){return L},nB:function(){return G},Jz:function(){return H},DM:function(){return Y},kJ:function(){return N},$P:function(){return q}});var R={};e.r(R),e.d(R,{Params:function(){return J},request:function(){return se}});var z={};e.r(z),e.d(z,{Params:function(){return w},request:function(){return ie}});var N={};e.r(N),e.d(N,{Params:function(){return ee},request:function(){return ue}});var H={};e.r(H),e.d(H,{Params:function(){return _},request:function(){return ve}});var X={};e.r(X),e.d(X,{Params:function(){return ce},request:function(){return he}});var L={};e.r(L),e.d(L,{Params:function(){return me},request:function(){return fe}});var Y={};e.r(Y),e.d(Y,{Params:function(){return n},request:function(){return Se}});var G={};e.r(G),e.d(G,{Params:function(){return te},request:function(){return ge}});var q={};e.r(q),e.d(q,{Params:function(){return pe},request:function(){return Pe}});var O=e(97857),s=e.n(O),I=e(72004),v=e.n(I),k=e(12444),Z=e.n(k),M=e(9783),o=e.n(M),T=e(88593),J=v()(function a(){Z()(this,a),o()(this,"page",void 0),o()(this,"page_size",void 0),o()(this,"status",void 0)});function se(a,c){return(0,T.request)("/order/batchList",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var w=v()(function a(){Z()(this,a),o()(this,"status1",void 0),o()(this,"status2",void 0),o()(this,"total",void 0)});function ie(a,c){return(0,T.request)("/order/batchListTotal",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var ee=v()(function a(){Z()(this,a)});function ue(a,c,W){return(0,T.request)("/order/batchSend",s()({method:"PUT",params:s()({},a),data:s()({},c)},W||{}))}var _=v()(function a(){Z()(this,a)});function ve(a,c,W){return(0,T.request)("/order/batchSend",s()({method:"POST",params:s()({},a),data:s()({},c)},W||{}))}var ce=v()(function a(){Z()(this,a),o()(this,"orderID",void 0)});function he(a,c){return(0,T.request)("/order/detail",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var me=v()(function a(){Z()(this,a),o()(this,"code",void 0),o()(this,"createdAt",void 0),o()(this,"goodsID",void 0),o()(this,"influenceId",void 0),o()(this,"name",void 0),o()(this,"orderID",void 0),o()(this,"page",void 0),o()(this,"page_size",void 0),o()(this,"phone",void 0),o()(this,"status",void 0),o()(this,"userId",void 0)});function fe(a,c){return(0,T.request)("/order/list",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var n=v()(function a(){Z()(this,a),o()(this,"id",void 0),o()(this,"status",void 0)});function Se(a,c){return(0,T.request)("/order/postSale",s()({method:"POST",params:s()({},a),data:{}},c||{}))}var te=v()(function a(){Z()(this,a),o()(this,"confirmTimeEnd",void 0),o()(this,"confirmTimeStart",void 0),o()(this,"orderId",void 0),o()(this,"page",void 0),o()(this,"page_size",void 0),o()(this,"status",void 0)});function ge(a,c){return(0,T.request)("/order/postSale/list",s()({method:"GET",params:s()({},a),data:{}},c||{}))}var ae=null;function Ne(a,c){return Request("/order/postSale/refund",_objectSpread({method:"POST",params:_objectSpread({},a),data:{}},c||{}))}var pe=v()(function a(){Z()(this,a)});function Pe(a,c,W){return(0,T.request)("/order/send",s()({method:"PUT",params:s()({},a),data:s()({},c)},W||{}))}},95749:function(Re,V,e){e.d(V,{Z:function(){return N}});var R=e(84908),z=e(85893);function N(H){return(0,z.jsx)(R.Z,{title:(H==null?void 0:H.title)||H.children,placement:"topLeft",children:(0,z.jsx)("div",{className:"fm-ellipsis-2",children:H.children})})}},63936:function(Re,V,e){e.r(V),e.d(V,{default:function(){return Me}});var R=e(13769),z=e.n(R),N=e(19632),H=e.n(N),X=e(15009),L=e.n(X),Y=e(99289),G=e.n(Y),q=e(5574),O=e.n(q),s=e(97857),I=e.n(s),v=e(67294),k=e(84485),Z=e(84739),M=e(26713),o=e(79216),T=e(29924),J=e(81579),se=e(85402),w=e(69677),ie=e(12461),ee=e(71577),ue=e(8702),_=e(43525),ve=e(88593),ce={},he=e(44685),me=e(95749),fe=e(73935),n=e(85893),Se=["page","page_size"],te=k.Z.Title,ge=k.Z.Link,ae=k.Z.Text,Ne=function(m){var p=document.querySelector("#table .ant-spin-container");return p?fe.createPortal((0,n.jsx)(Z.Z,I()(I()({style:{textAlign:"right",mariginTop:20},size:"small",pageSize:m.pageSize,showTotal:function(h,d){return console.log({total:h,range:d}),"\u7B2C ".concat(d[0],"-").concat(d[1]," \u6761/\u603B\u5171 ").concat(h," \u6761")}},m),{},{current:m.current,onChange:function(h,d){m.onChange(h,d)}})),p):null},pe=function(m){var p,P,h,d,y,i=m.record;return(0,n.jsxs)(M.Z,{style:{width:250,overflowX:"hidden"},align:"start",children:[(0,n.jsx)(o.Z,{style:{width:120,height:120,objectFit:"cover"},src:i==null||(p=i.commod)===null||p===void 0||(P=p.image)===null||P===void 0?void 0:P.split(",")[0]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)(ae,{children:["ID:",(i==null||(h=i.commod)===null||h===void 0?void 0:h.spu_no)||"-"]}),(0,n.jsx)(me.Z,{title:(i==null||(d=i.commod)===null||d===void 0?void 0:d.title)||"-",children:(0,n.jsx)(te,{level:5,children:(i==null||(y=i.commod)===null||y===void 0?void 0:y.title)||"-"})})]})]})},Pe=function(m){var p=m.onChange,P=m.value;return(0,n.jsxs)(M.Z,{align:"center",children:[(0,n.jsx)(te,{level:5,style:{marginBottom:0,fontWeight:900},children:"\u5FEB\u901F\u7B5B\u9009\u8BA2\u5355"}),(0,n.jsx)(T.ZP.Group,{value:(P==null?void 0:P.status)||"",onChange:function(d){p(d.target.value)},children:(0,n.jsxs)(M.Z,{wrap:!0,children:[(0,n.jsx)(T.ZP.Button,{value:"",children:"\u5168\u90E8"}),(0,n.jsx)(T.ZP.Button,{value:2,children:"\u5F85\u53D1\u8D27"}),(0,n.jsx)(T.ZP.Button,{value:3,children:"\u5F85\u7B7E\u6536"})]})})]})},a=function(m){var p=m.visible,P=m.onOk,h=m.onCancel,d=m.record,y=J.Z.useForm(),i=O()(y,1),C=i[0];return(0,v.useEffect)(function(){C.setFieldValue("orderID",d==null?void 0:d.orderID)},[d==null?void 0:d.orderID]),(0,n.jsx)(se.Z,{visible:p,title:"\u53D1\u8D27",destroyOnClose:!0,onOk:G()(L()().mark(function b(){var $;return L()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,C.validateFields();case 2:$=j.sent,P($);case 4:case"end":return j.stop()}},b)})),onCancel:h,children:(0,n.jsxs)(J.Z,{form:C,children:[(0,n.jsx)(J.Z.Item,{label:"\u8BA2\u5355\u7F16\u53F7",name:"orderID",rules:[{required:!0}],children:(0,n.jsx)(w.Z,{bordered:!1,readOnly:!0})}),(0,n.jsx)(J.Z.Item,{label:"\u67E5\u8BE2\u5730\u5740",name:"courierLink",rules:[{required:!0}],children:(0,n.jsx)(w.Z,{})}),(0,n.jsx)(J.Z.Item,{label:"\u5FEB\u9012\u5355\u53F7",name:"courierNumber",rules:[{required:!0}],children:(0,n.jsx)(w.Z,{})})]})})},c=function(){var m=(0,v.useState)([]),p=O()(m,2),P=p[0],h=p[1],d=(0,v.useState)(0),y=O()(d,2),i=y[0],C=y[1],b=(0,v.useState)(1),$=O()(b,2),E=$[0],j=$[1],ne=(0,v.useState)(20),B=O()(ne,2),Q=B[0],Ce=B[1],je=(0,v.useState)({}),le=O()(je,2),Ie=le[0],xe=le[1],re=(0,v.useRef)(),Te=(0,v.useState)({}),oe=O()(Te,2),be=oe[0],de=oe[1];return{list:P,listHandler:h,total:i,totalHandler:C,page:E,pageHandler:j,pageSize:Q,pageSizeHandler:Ce,actionRef:re,record:Ie,recordHandler:xe,params:be,paramsHandler:de}},W=function(){var m=(0,v.useState)(!1),p=O()(m,2),P=p[0],h=p[1],d=function(C){var b;h(!1),C==null||(b=C.current)===null||b===void 0||b.reload()},y=function(){var i=G()(L()().mark(function C(b,$){var E,j;return L()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,_.$P.request({},b);case 2:E=B.sent,E.code===0&&(ie.ZP.success("\u53D1\u8D27\u6210\u529F"),$==null||(j=$.current)===null||j===void 0||j.reload(),h(!1));case 4:case"end":return B.stop()}},C)}));return function(b,$){return i.apply(this,arguments)}}();return{visible:P,visibleHandler:h,onOk:y,onCancel:d}};function Me(){var g=c(),m=g.list,p=g.listHandler,P=g.totalHandler,h=g.actionRef,d=g.record,y=g.recordHandler,i=g.params,C=g.paramsHandler,b=g.page,$=g.pageSize,E=g.pageHandler,j=g.pageSizeHandler,ne=g.total,B=(0,v.useRef)(1),Q=W(),Ce=Q.visible,je=Q.visibleHandler,le=Q.onCancel,Ie=Q.onOk,xe=(0,v.useState)({}),re=O()(xe,2),Te=re[0],oe=re[1],be=(0,v.useState)(!1),de=O()(be,2),Ge=de[0],$e=de[1],Oe=function(r){if(!(r!=null&&r.length))return[];var t=H()(r),f=[];return t.forEach(function(D){f.push(D),f.push(D)}),f},F=function(r,t){return t%2===0?{colSpan:0}:{}},Je=[{title:"\u8BA2\u5355\u7F16\u53F7",dataIndex:"orderID",hideInTable:!0},{title:"\u8BA2\u5355\u72B6\u6001",dataIndex:"status",hideInTable:!0,valueType:"select",fieldProps:{options:[{label:"\u5F85\u4ED8\u6B3E",value:1},{label:"\u5F85\u53D1\u8D27",value:2},{label:"\u5DF2\u5B8C\u6210",value:3},{label:"\u5DF2\u53D6\u6D88",value:4}]}},{title:"\u5546\u54C1ID",dataIndex:"spu_no",hideInTable:!0},{title:"\u6536\u4EF6\u4EBA\u59D3\u540D",dataIndex:"name",hideInTable:!0},{title:"\u6536\u4EF6\u4EBA\u7535\u8BDD",dataIndex:"phone",hideInTable:!0},{title:"\u4E0B\u5355\u65F6\u95F4",dataIndex:"createdAt",hideInTable:!0,valueType:"dateTime"},{title:"\u5546\u54C1\u4FE1\u606F",dataIndex:"name",hideInSearch:!0,width:350,onCell:function(r,t){return{colSpan:t%2!==0?1:9}},render:function(r,t,f){return f%2===0?(0,n.jsxs)(M.Z,{children:[(0,n.jsxs)(ae,{children:["\u8BA2\u5355\u7F16\u53F7:",(t==null?void 0:t.orderID)||"-"]}),(0,n.jsxs)(ae,{children:["\u7F51\u7EA2\u8D26\u53F7:",(t==null?void 0:t.code)||"-"]})]}):(0,n.jsx)(pe,{record:t})}},{title:"\u8BA2\u5355\u72B6\u6001",width:160,dataIndex:"status",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:F},{title:"\u6570\u91CF",width:80,dataIndex:"number",key:"number",hideInSearch:!0,onCell:F},{title:"\u5546\u54C1\u603B\u4EF7",width:120,dataIndex:"price",hideInSearch:!0,onCell:F},{title:"\u7F51\u7EA2\u4F63\u91D1",width:120,dataIndex:"IAmount",hideInSearch:!0,onCell:F},{title:"\u5165\u8D26\u91D1\u989D",width:120,dataIndex:"SAmount",hideInSearch:!0,onCell:F},{title:"\u6536\u8D27\u4FE1\u606F",width:200,dataIndex:"customerPhone",hideInSearch:!0,onCell:F,render:function(r,t){var f,D,u,A,S,l;return(0,n.jsx)(n.Fragment,{children:"".concat(t==null||(f=t.address)===null||f===void 0?void 0:f.firstName," ").concat(t==null||(D=t.address)===null||D===void 0?void 0:D.lastName," ").concat(t==null||(u=t.address)===null||u===void 0?void 0:u.phone," ").concat(t==null||(A=t.address)===null||A===void 0?void 0:A.state).concat(t==null||(S=t.address)===null||S===void 0?void 0:S.city).concat(t==null||(l=t.address)===null||l===void 0?void 0:l.street)})}},{title:"\u4E70\u5BB6",width:120,dataIndex:"customerPhone",hideInSearch:!0,onCell:F},{title:"\u64CD\u4F5C",width:180,hideInSearch:!0,fixed:"right",onCell:F,render:function(r,t){return(0,n.jsxs)(M.Z,{direction:"vertical",children:[(0,n.jsx)(ge,{onClick:function(){ve.history.push("/order_manage/detail?id=".concat(t==null?void 0:t.orderID))},children:"\u67E5\u770B\u8BE6\u60C5"}),(t==null?void 0:t.status)===2?(0,n.jsx)(ee.Z,{type:"primary",onClick:function(){y(t),je(!0)},children:"\u53D1\u8D27"}):null]})}}],We=function(r){E(r.current),j(r.pageSize),console.log(r);var t=r.page,f=r.page_size,D=z()(r,Se);return oe(D),_.gp.request(I()({},r)).then(function(u){var A,S,l,U,K;return p((u==null||(A=u.data)===null||A===void 0?void 0:A.list)||[]),P(u==null||(S=u.data)===null||S===void 0?void 0:S.total),console.log(Oe(u==null||(l=u.data)===null||l===void 0?void 0:l.list)),{success:!0,data:Oe(u==null||(U=u.data)===null||U===void 0?void 0:U.list)||[],total:(u==null||(K=u.data)===null||K===void 0?void 0:K.total)*2}})},Ue=function(){var x=G()(L()().mark(function r(){var t,f,D,u;return L()().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(!Ge){S.next=2;break}return S.abrupt("return");case 2:return $e(!0),t=[{label:"\u5546\u54C1\u6807\u9898",value:"title"},{label:"\u8BA2\u5355\u53F7",value:"orderID"},{label:"\u8BA2\u5355\u72B6\u6001",value:"status"},{label:"\u5546\u54C1\u6570\u91CF",value:"number"},{label:"\u652F\u4ED8\u65F6\u95F4",value:"payTime"},{label:"\u53D1\u8D27\u65F6\u95F4",value:"sendTime"},{label:"\u786E\u8BA4\u6536\u8D27\u65F6\u95F4",value:"confirmTime"},{label:"\u5546\u54C1ID",value:"commodID"},{label:"\u5546\u54C1\u89C4\u683C",value:"specs"},{label:"\u5546\u5BB6\u7F16\u7801-\u89C4\u683C\u7EF4\u5EA6",value:"sku_no"},{label:"\u5546\u54C1\u603B\u4EF7(\u5143)",value:"price"},{label:"\u6536\u8D27\u4EBA",value:"recievePeople"},{label:"\u6536\u8D27\u7535\u8BDD",value:"phone"},{label:"\u5FEB\u9012\u5355\u53F7",value:"courierNumber"},{label:"\u67E5\u8BE2\u5730\u5740",value:"courierLink"},{label:"\u7701",value:"state"},{label:"\u5E02",value:"city"},{label:"\u8857\u9053/\u9547",value:"street"},{label:"\u8BE6\u7EC6\u5730\u5740",value:"addressDetail"}],S.prev=4,S.next=7,_.gp.request(I()(I()({page:b,page_size:$},i),Te));case 7:f=S.sent,(f==null?void 0:f.code)===0&&((0,he.P9)({header:t,dataSet:f==null||(D=f.data)===null||D===void 0||(u=D.list)===null||u===void 0?void 0:u.map(function(l){var U,K,ye,Be,De,He,Ze,Ee,Le,ze,Fe;return I()(I()(I()(I()(I()({},l.address),l.commod),l.deliver),l),{},{addressDetail:"".concat(l==null||(U=l.address)===null||U===void 0?void 0:U.state," ").concat(l==null||(K=l.address)===null||K===void 0?void 0:K.city," ").concat(l==null||(ye=l.address)===null||ye===void 0?void 0:ye.street," ").concat(l==null||(Be=l.address)===null||Be===void 0?void 0:Be.zipCode),recievePeople:"".concat(l==null||(De=l.address)===null||De===void 0?void 0:De.firstName," ").concat(l==null||(He=l.address)===null||He===void 0?void 0:He.lastName),status:(Ze=[{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}].find(function(Ae){return Ae.value===l.status}))===null||Ze===void 0?void 0:Ze.label,specs:l!=null&&(Ee=l.commod)!==null&&Ee!==void 0&&Ee.specs?(Le=JSON.parse(l==null||(Fe=l.commod)===null||Fe===void 0?void 0:Fe.specs))===null||Le===void 0||(ze=Le.map(function(Ae){return Ae.value}))===null||ze===void 0?void 0:ze.join(","):""})}),fileName:"\u8BA2\u5355\u6570\u636E\u5BFC\u51FA"}),$e(!1)),S.next=14;break;case 11:S.prev=11,S.t0=S.catch(4),$e(!1);case 14:case"end":return S.stop()}},r,null,[[4,11]])}));return function(){return x.apply(this,arguments)}}();return(0,n.jsxs)("div",{className:ce.orderList,id:"table",children:[(0,n.jsx)(ue.QVr,{scroll:{x:"max-content"},beforeSearchSubmit:function(r){return B.current=1,C({status:r.status}),E(1),j(20),console.log(r),I()({},r)},defaultSize:"small",onReset:function(){C({status:""}),E(1),j(20)},pagination:!1,options:{reload:!1},params:I()(I()({},i),{},{page:b,page_size:$}),actionRef:h,request:We,dataSource:Oe(m),columns:Je,headerTitle:(0,n.jsx)(Pe,{value:i,onChange:function(r){C({status:r})}}),toolBarRender:function(){return[(0,n.jsx)(ee.Z,{type:"primary",loading:Ge,onClick:Ue,children:"\u5BFC\u51FA\u8BA2\u5355"},"add")]}}),(0,n.jsx)(Ne,{current:B.current,pageSize:20,total:ne,onChange:function(r,t){E(r),B.current=r,j(t)},pageHandler:E}),(0,n.jsx)(a,{record:d,visible:Ce,onOk:function(r){return Ie(r,h)},onCancel:function(){le(h)}},d==null?void 0:d.orderID)]})}}}]);
|
|
|