1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
"use strict";require("../sub-vendors.js");require("../sub-common/f97e90c355a4ac0e7c8adaf0d0cd2639.js");require("../sub-common/cec1d189f23439aac313e907e3419e4b.js");require("../sub-common/77c6c00ee9ac4bfa87e3885cb3a9f4ce.js");require("../sub-common/13c349ec6fe97c02f07716d358f66d11.js");require("../sub-common/b14021f24a99c16a41f3ddce1a2c0358.js");require("../sub-common/a2adaa4f70b80326c7400ed443cd7103.js");require("../sub-common/a35e50ecd5be1a1566408ae68d2f572d.js");require("../sub-common/0da2e47b0ac8052320324b1014f8364f.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[8043],{9721:function(e,r,t){var n=t(2180),o=t(9439),s=t(4165),l=t(5861),_=t(1515),a=t(2954),i=t.n(a),c=t(7294),d=t(4184),u=t.n(d),m={common_safe_area_y:"index-module__common_safe_area_y___bjksh","flex-col":"index-module__flex-col___mB1aR","flex-row":"index-module__flex-row___tEi9t","justify-between":"index-module__justify-between___MHEmF","justify-center":"index-module__justify-center___OysoR","items-center":"index-module__items-center___LKPmd","flex-item":"index-module__flex-item___sfo6i","full-100":"index-module__full-100___HCg0O","color-blue":"index-module__color-blue___hbyYj","color-yellow":"index-module__color-yellow___PQnk6","color-green":"index-module__color-green___oZnJB","color-grey":"index-module__color-grey___vUIOs","color-white":"index-module__color-white___fC1ta","s-w":"index-module__s-w___k20Id","s-e":"index-module__s-e___nn4ak",filter:"index-module__filter___vlPEt",main:"index-module__main___ZJgo0",context:"index-module__context____SBg1",orderProcess:"index-module__orderProcess___HPOGt",orderInfoTop:"index-module__orderInfoTop___PRowF",customerTop:"index-module__customerTop___U0hYK",customerBottom:"index-module__customerBottom___Fgzmv",colorCardTop:"index-module__colorCardTop___Mi3bQ",colorCardBottom:"index-module__colorCardBottom___T9dy7",colorCardImage:"index-module__colorCardImage___XrNUt",leftCont:"index-module__leftCont___dj8iC",rightCont:"index-module__rightCont___zYspj",rightCont__top:"index-module__rightCont__top___gDPgp",rightCont__bottom:"index-module__rightCont__bottom___eUBYQ",rightCont__container:"index-module__rightCont__container___dEPuL",rightCont__left:"index-module__rightCont__left___A_fAz",rightCont__right:"index-module__rightCont__right___nKqrZ",paymentMethod:"index-module__paymentMethod___PvSqE",address_box:"index-module__address_box___sU_PC",address_box_left:"index-module__address_box_left___mvApr",cirle:"index-module__cirle___ArdK3",address_box_right:"index-module__address_box_right___PWFHK",address:"index-module__address___V8STg",bottom:"index-module__bottom___hsJPY",reatName:"index-module__reatName___CXqt8",leftbottom:"index-module__leftbottom___bkAME",name:"index-module__name___rJlpj",phone:"index-module__phone___wifJD",bottomBar:"index-module__bottomBar___O7h2L",bottomBar__button:"index-module__bottomBar__button___daO6w",remark:"index-module__remark___BGFKe","step-title":"index-module__step-title___rczeP","step-status":"index-module__step-status___ltLj8","current-status":"index-module__current-status___eLeuT",attachment:"index-module__attachment___fwnpq","step-url-container":"index-module__step-url-container___VxQ_r","step-url":"index-module__step-url___mGNXi",popup:"index-module__popup___p4GAV",title:"index-module__title___xTCwf",textarea:"index-module__textarea___MVJyx",picBtn:"index-module__picBtn___xw26n",button:"index-module__button___HgmlW"},x=t(8260),p=t(2128),h=t(3407),f=t(9579),g=t(4356),j=t(4812),v=t(9742),C=t(8657),b=t(4924),N=t(1115),Z=t(6028),y=t(146),G=t(5989),k=t(3416),w=t(5893),B=function SampleCuttingDetail(){var e,r,t,n,d=(0,y.Up)().fetchData,B=(0,a.useRouter)(),S=function(){var e=(0,l.Z)((0,s.Z)().mark((function _callee(){var e;return(0,s.Z)().wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return console.log("id",B.params.id),r.next=3,d({id:Number(B.params.id)});case 3:if((e=r.sent).success){r.next=6;break}return r.abrupt("return",N.Z9.error(e.msg));case 6:z(e.data),i().stopPullDownRefresh();case 8:case"end":return r.stop()}}),_callee)})));return function getData(){return e.apply(this,arguments)}}();(0,a.usePullDownRefresh)((function(){S()}));var T=(0,c.useState)({}),P=(0,o.Z)(T,2),D=P[0],z=P[1],I=(0,c.useCallback)((function(e){return{lab:null==e?void 0:e.lab,rgb:null==e?void 0:e.rgb,texture_url:null==e?void 0:e.texture_url}}),[]),R=(0,y.Fp)().fetchData,F=function(){var e=(0,l.Z)((0,s.Z)().mark((function _callee2(e){var r;return(0,s.Z)().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,R({id:e});case 2:(r=t.sent).success?(S(),N.Z9.success("取消成功")):N.Z9.error(r.msg);case 4:case"end":return t.stop()}}),_callee2)})));return function cancelOrder(r){return e.apply(this,arguments)}}();(0,c.useEffect)((function(){S()}),[]);var O=(0,c.useState)(!1),A=(0,o.Z)(O,2),E=A[0],J=A[1],L=(0,c.useState)([]),M=(0,o.Z)(L,2),K=M[0],U=(M[1],(0,c.useRef)([])),H=(0,c.useCallback)((function(e){console.log("list",e),U.current=e}),[]),Y=(0,c.useState)(""),q=(0,o.Z)(Y,2),Q=q[0],V=q[1],$=function(){var e=(0,l.Z)((0,s.Z)().mark((function _callee3(){var e;return(0,s.Z)().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:if(Q){r.next=2;break}return r.abrupt("return",N.Z9.error("请输入拒绝原因"));case 2:return r.next=4,ee({cut_sample_order_id:Number(B.params.id),order_remark:null==D?void 0:D.order_remark,audit_remark:Q,delivery_appendix_url:U.current});case 4:(e=r.sent).success?(S(),N.Z9.success("拒绝成功"),J(!1)):N.Z9.error(e.msg);case 6:case"end":return r.stop()}}),_callee3)})));return function handleRefuseSubmit(){return e.apply(this,arguments)}}(),W=function(){var e=(0,l.Z)((0,s.Z)().mark((function _callee4(){var e;return(0,s.Z)().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:if(0!==U.current.length){r.next=2;break}return r.abrupt("return",N.Z9.error("请上传图片"));case 2:return r.next=4,X({cut_sample_order_id:Number(B.params.id),order_remark:null==D?void 0:D.order_remark,audit_remark:Q,delivery_appendix_url:U.current});case 4:(e=r.sent).success?(S(),N.Z9.success("审核成功"),J(!1)):N.Z9.error(e.msg);case 6:case"end":return r.stop()}}),_callee4)})));return function handleAuditSubmit(){return e.apply(this,arguments)}}(),X=(0,y.R5)().fetchData,ee=(0,y.LR)().fetchData;return(0,w.jsxs)(_.G7,{className:m.main,children:[(0,w.jsxs)(_.G7,{className:m.context,children:[(0,w.jsxs)(x.Z,{circle:!0,customStyle:{padding:"24rpx",marginTop:"24rpx"},children:[(0,w.jsx)(_.G7,{className:m.orderProcess,children:"订单进程"}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,w.jsx)(_.G7,{className:m.orderProcessBottom,children:(0,w.jsx)(C.Z,{current:1===(null===(e=D.order_form)||void 0===e?void 0:e[0].order_status)?1:0,direction:"vertical",customStyle:{padding:"0"},children:null===(r=D.order_form)||void 0===r?void 0:r.map((function(e,r){var t,n;return(0,w.jsx)(b.Z,{status:4===e.order_status?"error":void 0,title:(0,w.jsxs)(_.G7,{className:u()(m["step-title"],e.order_status===(null===(t=D.order_form)||void 0===t?void 0:t[0].order_status)?m["current-status"]:null),children:[(0,w.jsx)(_.xv,{className:m["step-status"],children:e.order_status_name}),(0,w.jsx)(_.xv,{children:(0,j.o0)(e.order_time)})]}),description:(0,w.jsxs)(w.Fragment,{children:[e.audit_remark&&(0,w.jsx)(_.G7,{children:e.audit_remark}),e.delivery_appendix_url&&(0,w.jsx)(_.G7,{className:m.attachment,children:null===(n=e.delivery_appendix_url)||void 0===n?void 0:n.map((function(r,t){return(0,w.jsx)(_.G7,{className:m["step-url-container"],onClick:function onClick(){return function handleClickImagePreview(e,r){i().previewImage({current:(0,j.CN)(e[r]),urls:e.map((function(e){return(0,j.CN)(e)}))})}(e.delivery_appendix_url,t)},children:(0,w.jsx)(_.Ee,{className:m["step-url"],src:(0,j.CN)(r),lazyLoad:!0,mode:"aspectFill"})},t)}))})]})},r)}))})})]}),(0,w.jsxs)(x.Z,{circle:!0,customStyle:{padding:"24rpx"},children:[(0,w.jsx)(_.G7,{className:m.customerTop,children:"客户信息"}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,w.jsxs)(_.G7,{className:m.customerBottom,children:[(0,w.jsx)(_.xv,{children:null==D?void 0:D.purchaser_name}),(0,w.jsx)(_.xv,{children:null==D?void 0:D.phone}),(0,w.jsx)(_.xv,{})]})]}),(0,w.jsx)(x.Z,{circle:!0,children:(0,w.jsxs)(_.G7,{className:m.address_box,children:[(0,w.jsx)(_.G7,{className:m.address_box_left,children:(0,w.jsx)(_.G7,{className:m.cirle,children:(0,w.jsx)(Z.Z,{name:"icon-dizhi1",size:60})})}),(0,w.jsxs)(_.G7,{className:m.address_box_right,children:[(0,w.jsxs)(_.G7,{className:m.address,children:[null==D?void 0:D.province_name,null==D?void 0:D.city_name,null==D?void 0:D.district_name,null==D?void 0:D.address_detail]}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0",marginTop:"6px"}}),(0,w.jsxs)(_.G7,{className:m.bottom,children:[(0,w.jsxs)(_.G7,{className:m.leftbottom,children:[(0,w.jsx)(_.G7,{className:m.name,children:D.target_user_name}),(0,w.jsx)(_.G7,{className:m.phone,children:D.target_user_phone})]}),(0,w.jsx)(_.G7,{className:m.reatName,children:D.shipment_mode_name})]})]})]})}),null===(t=D.cut_sample_order_product_list)||void 0===t?void 0:t.map((function(e,r){var t;return(0,w.jsxs)(x.Z,{customStyle:{padding:"24rpx",marginTop:"24rpx"},circle:!0,customClassName:m.layoutBlock,children:[(0,w.jsx)(_.G7,{className:m.colorCardTop,children:(0,j.W7)(e.code,e.name)}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),null===(t=e.product_colors)||void 0===t?void 0:t.map((function(e){return(0,w.jsxs)(_.G7,{className:m.colorCardBottom,children:[(0,w.jsx)(_.G7,{className:m.colorCardImage,children:(0,w.jsx)(_.G7,{className:m.leftCont,children:(0,w.jsx)(h.Z,{value:I(e)})})}),(0,w.jsxs)(_.G7,{className:m.rightCont,children:[(0,w.jsxs)(_.G7,{className:m.rightCont__container,children:[(0,w.jsxs)(_.G7,{className:m.rightCont__left,children:[(0,w.jsx)(_.G7,{className:m.rightCont__top,children:"#".concat((0,j.ZK)(e.code)," ").concat(e.name)}),(0,w.jsx)(_.G7,{className:m.rightCont__bottom})]}),(0,w.jsxs)(_.G7,{className:m.rightCont__right,children:["x",e.color_num,"份"]})]}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"0"}})]})]},e.product_color_id)})),(0,w.jsx)(_.G7,{className:m.paymentMethod,children:"快递到付"})]},r)})),(0,w.jsxs)(x.Z,{circle:!0,customStyle:{padding:"24rpx"},children:[(0,w.jsx)(_.G7,{className:m.orderInfoTop,children:"订单信息"}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,w.jsxs)(_.G7,{className:m.orderInfoDetail,children:[(0,w.jsx)(g.Z,{title:"订单编号:",desc:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_.xv,{className:m.orderInfoDetail__desc,children:null==D?void 0:D.order_no}),(0,w.jsx)(f.Z,{type:"primary",size:"small",plain:!0,circle:!0,onClick:function onClick(){return function handleCopy(e){i().setClipboardData({data:e,success:function success(){i().showToast({title:"复制成功"})}})}(null==D?void 0:D.order_no)},children:"复制"})]})}),(0,w.jsx)(g.Z,{title:"创建时间:",desc:(0,j.o0)(null==D?void 0:D.create_time)||"暂无创建时间"}),(0,w.jsx)(g.Z,{title:"业务员:",desc:null==D?void 0:D.sale_user_name})]})]}),(0,w.jsxs)(x.Z,{circle:!0,customStyle:{padding:"24rpx"},children:[(0,w.jsx)(_.G7,{className:m.orderInfoTop,children:"备注信息"}),(0,w.jsx)(p.Z,{direction:"horizontal",customStyles:{margin:"12px 0"}}),(0,w.jsx)(_.G7,{className:m.remark,children:(null==D?void 0:D.order_remark)||"暂无备注信息"})]})]}),(0,w.jsx)(_.G7,{className:m.bottomBar,children:1===(null===(n=D.order_form)||void 0===n?void 0:n[0].order_status)?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(v.Z,{customClassName:m.bottomBar__button,type:"info",plain:!0,round:!0,onClick:function handleCancel(){i().showModal({content:"确定取消该订单?",confirmColor:"#337fff",confirmText:"确认",success:function success(e){e.confirm&&(F(Number(B.params.id)),console.log("用户点击确定"))}})},children:"取消订单"}),(0,N.hn)("receive_sample_cutting_audit")?(0,w.jsx)(v.Z,{customClassName:m.bottomBar__button,type:"primary",plain:!0,round:!0,onClick:function handleAudit(){J(!0)},children:"剪样审批"}):null]}):null}),(0,w.jsx)(G.Z,{title:"剪样审批",show:E,onClose:function onClose(){return J(!1)},children:(0,w.jsxs)(_.G7,{className:m.popup,children:[(0,w.jsx)(_.G7,{className:m.title,children:"发货物流凭证"}),(0,w.jsx)(k.Z,{onChange:H,defaultList:K}),(0,w.jsx)(_.G7,{className:m.title,children:"审核备注"}),(0,w.jsx)(_.G7,{style:{marginTop:"24rpx"},children:(0,w.jsx)(_.gx,{className:m.textarea,placeholder:"请输入审核备注信息",value:Q,cursorSpacing:100,onInput:function getDesc(e){console.log("getDesc",e.detail.value),V(e.detail.value)},onBlur:function onBlur(e){console.log("onBlur",e.detail.value),V(e.detail.value)}})}),(0,w.jsxs)(_.G7,{className:m.picBtn,children:[(0,w.jsx)(v.Z,{type:"danger",customClassName:m.button,plain:!0,round:!0,onClick:$,children:"拒绝"}),(0,w.jsx)(v.Z,{type:"primary",customClassName:m.button,round:!0,onClick:W,children:"同意"})]})]})})]})};Page((0,n.createPageConfig)(B,"pages/sampleCutting/sampleCuttingDetail/index",{root:{cn:[]}},{navigationBarTitleText:"剪样订单详情",enablePullDownRefresh:!0,backgroundTextStyle:"dark"}||{}))}},function(e){e.O(0,[7843,6570,4199,9886,3338,3927,750,5508,9652,5904,2662,773,2107,1216,8592],(function(){return r=9721,e(e.s=r);var r}));e.O()}]); |