1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
"use strict";require("./sub-vendors.js");require("./sub-common/522331dc6c01bb5f6017c42de8bffc93.js");require("./sub-common/f53b1679f25c7637ce43fb0068d1509b.js");require("./sub-common/e1c79e1ad289c1ae01d33f05cdc43e98.js");require("./sub-common/7573a601b2e7601c00ed52c4c484ac13.js");(wx.webpackJsonp=wx.webpackJsonp||[]).push([[3322],{1468:function(e,t,n){var o=n(2180),_=n(1413),l=n(4165),a=n(5861),i=n(9439),r=n(1515),s=n(2954),d=n.n(s),c=n(7294),u="index-module__payee_head___ZLxEz",m="index-module__payee_head__desc___JBBY1",p="index-module__payee_head__desc__company___V7UQm",h="index-module__payee_head__desc__name___GZCxJ",x="index-module__more___xNHWb",v=n(6028),f=n(3271),g=n(5893),payeeHead=function(e){var t=e.defaultValue,n=e.onSelect,o=(0,c.useState)(),_=(0,i.Z)(o,2),l=_[0],a=_[1];(0,c.useEffect)((function(){t&&a((function(){return t}))}),[t]);return(0,g.jsxs)(r.G7,{className:u,onClick:function goLink(){d().navigateTo({url:"/pages/weightList/index",events:{getSelectCompanyEvent:function getSelectCompanyEvent(e){console.log("data::",e),a((function(){return e})),null==n||n(e)}}})},children:[(0,g.jsx)(f.Z,{name:(null==l?void 0:l.title)||""}),(0,g.jsxs)(r.G7,{className:m,children:[(0,g.jsx)(r.G7,{className:p,children:(0,g.jsx)(r.xv,{children:null==l?void 0:l.title})}),(0,g.jsxs)(r.G7,{className:h,children:[(0,g.jsx)(r.xv,{children:null==l?void 0:l.purchaser_name}),(0,g.jsx)(r.xv,{children:null==l?void 0:l.phone})]})]}),(0,g.jsx)(r.G7,{className:x,children:(0,g.jsx)(v.Z,{name:"icon-xiala",size:50,color:"#979797"})})]})},j=n(3012),w=n(6247),Z="index-module__product_list___o3Kk9",N=n(4184),C=n.n(N),b=n(2690),G={common_safe_area_y:"index-module__common_safe_area_y___QdbLV",hoverClass:"index-module__hoverClass___JVa5Y","full-100":"index-module__full-100___uU5y4",product_list__item:"index-module__product_list__item___lC_lv","product_list__item--title":"index-module__product_list__item--title___fIEpH",product_title:"index-module__product_title___Lqmis",mode_status:"index-module__mode_status___TMKl7","product_list__item--con":"index-module__product_list__item--con___uO47u","product_list__item--con_close":"index-module__product_list__item--con_close___ULvbZ",open_up_icon:"index-module__open_up_icon___wEqB0",close_up_icon:"index-module__close_up_icon___xR3jW",up_btn:"index-module__up_btn___A69zy"},k=n(2291),y=n(7899),D=(0,c.memo)((function(e){var t=e.productInfo,n=(0,y.fc)(),o=n.dispatch,l=n.productData,a=(0,c.useCallback)((function(e){var n=t.index_str.split("_")[0];l.data.product_details[n]=(0,_.Z)((0,_.Z)({},l.data.product_details[n]),{},{product_name:e}),o({type:"updateData",data:(0,_.Z)({},l.data),update_status:2})}),[t]);return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(S,(0,_.Z)((0,_.Z)({},e),{},{onChange:a}))})})),S=(0,c.memo)((function(e){var t,n=e.productInfo,o=e.sale_mode_name,_=(0,c.useState)(!1),l=(0,i.Z)(_,2),a=l[0],s=l[1],d=(0,c.useState)(!1),u=(0,i.Z)(d,2),m=u[0],p=u[1],h=(0,c.useState)(""),x=(0,i.Z)(h,2),f=x[0],j=x[1];console.log("productInfo内容:::",n);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(r.G7,{className:G.product_list__item,children:[(0,g.jsxs)(r.G7,{className:G["product_list__item--title"],onClick:function onUpdate(){j(n.product_name),s(!0)},children:[(0,g.jsx)(r.xv,{className:G.product_title,children:n.product_name}),(0,g.jsx)(v.Z,{name:"icon-shuru",size:50}),(0,g.jsx)(r.xv,{className:G.mode_status,children:o})]}),(0,g.jsx)(r.G7,{className:C()(G["product_list__item--con"],m&&G["product_list__item--con_close"]),children:(0,g.jsx)(r.G7,{className:"product_list__item__con_".concat(n.product_id),children:null==n||null===(t=n.product_color_details)||void 0===t?void 0:t.map((function(e){return(0,g.jsx)(r.G7,{children:(0,g.jsx)(b.Z,{codeItem:e})},null==e?void 0:e.product_color_id)}))})}),(0,g.jsxs)(r.G7,{className:G.up_btn,onClick:function onClick(){return p(!m)},children:[m?"查看更多":"收起",(0,g.jsx)(r.G7,{className:C()(G.up_icon,m?G.open_up_icon:G.close_up_icon),children:(0,g.jsx)(v.Z,{name:"icon-shangla",size:35})})]})]},n.product_id),(0,g.jsx)(k.Z,{show:a,title:"修改面料名称",defaultValue:f,onClose:function onClose(){return s(!1)},onConfirm:function onConfirm(t){var n;null===(n=e.onChange)||void 0===n||n.call(e,t)}})]})})),I=(0,c.memo)((function(e){var t=(0,y.fc)(),n=t.dispatch,o=t.productData,_=e.orderData,l=void 0===_?{}:_,a=(e.onUpdateData,(0,c.useMemo)((function(){return console.log("productData123:::",l),null!=l&&l.product_details?null==l?void 0:l.product_details:[]}),[l])),i=(0,c.useCallback)((function(e,t){var o={price:null==l?void 0:l.price_admin,weight:null==l?void 0:l.weight_admin,weight_error:null==l?void 0:l.weight_error_admin};"weight"===t?o.weight=1e3*e:"sale_price"===t?o.price=100*e:o.weight_error=1e3*e,console.log("aa".concat(t),e),l.weight_admin=o.weight,l.price_admin=o.price,l.weight_error_admin=o.weight_error,console.log("orderData123::",o.price),null==a||a.map((function(e){var t;null==e||null===(t=e.product_color_details)||void 0===t||t.map((function(e){0===e.sale_mode?(e.weight_setting=(0,j.Z)(o.weight).times(e.roll).add(e.weight).toNumber(),e.weight_error_setting=(0,j.Z)(o.weight_error).times(e.roll).add(e.weight_error).toNumber()):(e.weight_setting=(0,j.Z)(o.weight).add(e.weight).toNumber(),e.weight_error_setting=(0,j.Z)(o.weight_error).add(e.weight_error).toNumber()),e.price_setting=(0,j.Z)(o.price).add(e.price).toNumber()}))})),l.product_details=a,console.log("orderData::",l),n({type:"updateData",data:JSON.parse(JSON.stringify(l)),update_status:1})}),[a]),s=(0,c.useMemo)((function(){return console.log("orderData::默认",o),{weight:(0,j.Z)((null==l?void 0:l.weight_admin)||0).div((0,j.Z)(1e3)).toNumber(),sale_price:(0,j.Z)((null==l?void 0:l.price_admin)||0).div((0,j.Z)(100)).toNumber(),weight_error:(0,j.Z)((null==l?void 0:l.weight_error_admin)||0).div((0,j.Z)(1e3)).toNumber()}}),[l]);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(w.Z,{sale_mode:null==l?void 0:l.sale_mode,onNumber:i,defaultValue:s}),(0,g.jsx)(r.G7,{className:Z,children:null==a?void 0:a.map((function(e){return(0,g.jsx)(D,{productInfo:e,sale_mode_name:null==l?void 0:l.sale_mode_name},e.product_id)}))})]})})),F="index-module__bottom_btn___ZQgvy",U="index-module__bottom_btn_item___SpYgh",E="index-module__del_btn___HWDb6",bottomBtn=function(e){var t=e.onClick,n=e.delStatus;return(0,g.jsxs)(r.G7,{children:[(0,g.jsxs)(r.G7,{className:F,children:[n&&(0,g.jsx)(r.G7,{className:C()(U,E),onClick:function onClick(){return null==t?void 0:t("del")},children:"删除码单"}),(0,g.jsx)(r.G7,{className:U,onClick:function onClick(){return null==t?void 0:t("preview")},children:"预览码单"}),(0,g.jsx)(r.G7,{className:U,onClick:function onClick(){return null==t?void 0:t("save")},children:"保存码单"})]}),(0,g.jsx)(r.G7,{className:"common_safe_area_y"})]})},J="index-module__product_list___fT9DC",z={common_safe_area_y:"index-module__common_safe_area_y___A6BPi",hoverClass:"index-module__hoverClass___WHxNN","full-100":"index-module__full-100___R2s6x",product_list__item:"index-module__product_list__item___Mrqla","product_list__item--title":"index-module__product_list__item--title___DY0PI",product_title:"index-module__product_title___U0iwS",mode_status:"index-module__mode_status___j2DhE","product_list__item--con":"index-module__product_list__item--con___Ctq5e","product_list__item--con_close":"index-module__product_list__item--con_close___UiGtD",open_up_icon:"index-module__open_up_icon___jou71",close_up_icon:"index-module__close_up_icon___L3Yxc",up_btn:"index-module__up_btn___OaJNp"},M=(0,c.memo)((function(e){var t=e.productInfo,n=(0,y.fc)(),o=n.dispatch,l=n.productData,a=t.index_str.split("_")[0],i=(0,c.useCallback)((function(e){l.data.product_details[a]=(0,_.Z)((0,_.Z)({},l.data.product_details[a]),{},{product_name:e}),o({type:"updateData",data:(0,_.Z)({},l.data),update_status:2})}),[t]),r=(0,c.useCallback)((function(e,n){var i,r,s={price:null==t?void 0:t.price_admin,weight:null==t?void 0:t.weight_admin,weight_error:null==t?void 0:t.weight_error_admin};"weight"===n?s.weight=1e3*e:"sale_price"===n?s.price=100*e:s.weight_error=1e3*e,l.data.product_details[a].weight_admin=s.weight,l.data.product_details[a].price_admin=s.price,l.data.product_details[a].weight_error_admin=s.weight_error,null===(i=l.data.product_details[a])||void 0===i||null===(r=i.product_color_details)||void 0===r||r.map((function(e){0===e.sale_mode?(e.weight_setting=(0,j.Z)(s.weight).times(e.roll).add(e.weight).toNumber(),e.weight_error_setting=(0,j.Z)(s.weight_error).times(e.roll).add(e.weight_error).toNumber()):(e.weight_setting=(0,j.Z)(s.weight).add(e.weight).toNumber(),e.weight_error_setting=(0,j.Z)(s.weight_error).add(e.weight_error).toNumber()),e.price_setting=(0,j.Z)(s.price).add(e.price).toNumber()})),l.data.product_details[a]=JSON.parse(JSON.stringify(l.data.product_details[a])),o({type:"updateData",data:(0,_.Z)({},l.data),update_status:1})}),[t]);return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(T,(0,_.Z)((0,_.Z)({},e),{},{onChangeName:i,onChangeNumber:r}))})})),T=(0,c.memo)((function(e){var t,n=e.productInfo,o=e.sale_mode_name,_=(0,c.useState)(!1),l=(0,i.Z)(_,2),a=l[0],s=l[1],d=(0,c.useState)(!1),u=(0,i.Z)(d,2),m=u[0],p=u[1],h=(0,c.useState)(""),x=(0,i.Z)(h,2),f=x[0],Z=x[1],N=(0,c.useMemo)((function(){return{weight:(0,j.Z)(n.weight_admin||0).div((0,j.Z)(1e3)).toNumber(),sale_price:(0,j.Z)(n.price_admin||0).div((0,j.Z)(100)).toNumber(),weight_error:(0,j.Z)(n.weight_error_admin||0).div((0,j.Z)(1e3)).toNumber()}}),[n]);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(r.G7,{className:z.product_list__item,children:[(0,g.jsxs)(r.G7,{className:z["product_list__item--title"],onClick:function onUpdate(){Z(n.product_name),s(!0)},children:[(0,g.jsx)(r.xv,{className:z.product_title,children:n.product_name}),(0,g.jsx)(v.Z,{name:"icon-shuru",size:50}),(0,g.jsx)(r.xv,{className:z.mode_status,children:o})]}),(0,g.jsx)(w.Z,{sale_mode:null==n?void 0:n.sale_mode,onNumber:function getNumber(t,n){var o;null===(o=e.onChangeNumber)||void 0===o||o.call(e,t,n)},defaultValue:N}),(0,g.jsx)(r.G7,{className:C()(z["product_list__item--con"],m&&z["product_list__item--con_close"]),children:null==n||null===(t=n.product_color_details)||void 0===t?void 0:t.map((function(e){return(0,g.jsx)(r.G7,{children:(0,g.jsx)(b.Z,{codeItem:e})},null==e?void 0:e.product_color_id)}))}),(0,g.jsxs)(r.G7,{className:z.up_btn,onClick:function onClick(){return p(!m)},children:[m?"查看更多":"收起",(0,g.jsx)(r.G7,{className:C()(z.up_icon,m?z.open_up_icon:z.close_up_icon),children:(0,g.jsx)(v.Z,{name:"icon-shangla",size:35})})]})]}),(0,g.jsx)(k.Z,{show:a,title:"修改面料名称",defaultValue:f,onClose:function onClose(){return s(!1)},onConfirm:function onConfirm(t){var n;null===(n=e.onChangeName)||void 0===n||n.call(e,t)}})]})})),V=(0,c.memo)((function(e){var t=e.orderData,n=void 0===t?{}:t,o=(0,c.useMemo)((function(){return(null==n?void 0:n.product_details)||[]}),[n]);return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(r.G7,{className:J,children:null==o?void 0:o.map((function(e){return(0,g.jsx)(M,{productInfo:e,sale_mode_name:null==n?void 0:n.sale_mode_name},e.id)}))})})})),O="index-module__product_list___mdvNG",$={common_safe_area_y:"index-module__common_safe_area_y___HfucH",hoverClass:"index-module__hoverClass___z1b87","full-100":"index-module__full-100___Y7Q4q",product_list__item:"index-module__product_list__item___gYEBv","product_list__item--title":"index-module__product_list__item--title___FAgYo",product_title:"index-module__product_title___MiK5M",mode_status:"index-module__mode_status___eT9Do",con:"index-module__con___VlSf3",update:"index-module__update___Ie4Qp","product_list__item--con":"index-module__product_list__item--con___jsERZ","product_list__item--con_close":"index-module__product_list__item--con_close____Q75J",open_up_icon:"index-module__open_up_icon___YJEfF",close_up_icon:"index-module__close_up_icon___UTyVd",up_btn:"index-module__up_btn___hxulD"},B=n(1115),L=(0,c.memo)((function(e){var t=e.productInfo,n=(0,y.fc)(),o=n.dispatch,l=n.productData,a=t.index_str.split("_")[0],i=(0,c.useCallback)((function(e){l.data.product_details[a]=(0,_.Z)((0,_.Z)({},l.data.product_details[a]),{},{product_name:e}),o({type:"updateData",data:(0,_.Z)({},l.data)})}),[t]),r=(0,c.useCallback)((function(){o({type:"setColorData",data:t}),(0,B.jD)("/pages/codeSetting/codeColorList/index")}),[t]);return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(Y,(0,_.Z)((0,_.Z)({},e),{},{onChange:i,onSetColorData:r}))})})),Y=(0,c.memo)((function(e){var t,n=e.productInfo,o=e.sale_mode_name,_=e.onSetColorData,l=(0,c.useState)(!1),a=(0,i.Z)(l,2),s=a[0],d=a[1],u=(0,c.useState)(!1),m=(0,i.Z)(u,2),p=m[0],h=m[1],x=(0,c.useState)(""),f=(0,i.Z)(x,2),j=f[0],w=f[1];console.log("productInfo内容33:::",n);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(r.G7,{className:$.product_list__item,children:[(0,g.jsxs)(r.G7,{className:$["product_list__item--title"],children:[(0,g.jsxs)(r.G7,{className:$.con,onClick:function onUpdate(){w(n.product_name),d(!0)},children:[(0,g.jsx)(r.xv,{className:$.product_title,children:n.product_name}),(0,g.jsx)(v.Z,{name:"icon-shuru",size:50}),(0,g.jsx)(r.xv,{className:$.mode_status,children:o})]}),(0,g.jsxs)(r.G7,{className:$.update,onClick:_,children:[(0,g.jsx)(r.xv,{children:"编辑"}),(0,g.jsx)(v.Z,{name:"icon-rukou",size:35})]})]}),(0,g.jsx)(r.G7,{className:C()($["product_list__item--con"],p&&$["product_list__item--con_close"]),children:null==n||null===(t=n.product_color_details)||void 0===t?void 0:t.map((function(e){return(0,g.jsx)(r.G7,{children:(0,g.jsx)(b.Z,{codeItem:e})},null==e?void 0:e.product_color_id)}))}),(0,g.jsxs)(r.G7,{className:$.up_btn,onClick:function onClick(){return h(!p)},children:[p?"查看更多":"收起",(0,g.jsx)(r.G7,{className:C()($.up_icon,p?$.open_up_icon:$.close_up_icon),children:(0,g.jsx)(v.Z,{name:"icon-shangla",size:35})})]})]}),(0,g.jsx)(k.Z,{show:s,title:"修改面料名称",defaultValue:j,onClose:function onClose(){return d(!1)},onConfirm:function onConfirm(t){var n;null===(n=e.onChange)||void 0===n||n.call(e,t)}})]})})),R=(0,c.memo)((function(e){var t=e.orderData,n=void 0===t?{}:t,o=(0,c.useMemo)((function(){return(null==n?void 0:n.product_details)||[]}),[n]);return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(r.G7,{className:O,children:null==o?void 0:o.map((function(e){return(0,g.jsx)(L,{productInfo:e,sale_mode_name:null==n?void 0:n.sale_mode_name},e.id)}))})})})),q="index-module__code_list__main___xWUm2",H="index-module__code_list__head___RNT19",P="index-module__loading_card___kLxTn",Q="index-module__code_list_con___H5xqi",W="index-module__code_des___UyF7N",A="index-module__code_des_title___tR3tb",K="index-module__code_des_item___ODUhs",X="index-module__code_des_weight___USJcz",ee="index-module__code_des_price___Q937c",te=n(1943),ne=n(4317),oe=n(4158),_e=n(4508),le=n(9576),main=function(){var e,t,n,o=(0,y.fc)(),u=o.productData,m=o.dispatch,p=(0,s.useRouter)().params,h=p.custom_print_id,x=p.sale_order_id,v=(0,c.useRef)({custom_print_id:h,sale_order_id:x}),f=(0,c.useRef)(1),j=(0,c.useCallback)((function(e){f.current=e,O()}),[]),w=(0,c.useState)(!1),Z=(0,i.Z)(w,2),N=Z[0],C=Z[1],b=(0,c.useState)(null),G=(0,i.Z)(b,2),k=G[0],D=G[1],S=(0,c.useTransition)(),F=(0,i.Z)(S,2),U=F[0],E=F[1],J=(0,ne.Z3)().fetchData,z=function(){var e=(0,a.Z)((0,l.Z)().mark((function _callee(){var e;return(0,l.Z)().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,J({id:v.current.sale_order_id});case 2:e=t.sent,D((function(){return null==e?void 0:e.data})),C(!1);case 5:case"end":return t.stop()}}),_callee)})));return function onCustomCodeInit(){return e.apply(this,arguments)}}(),M=(0,ne.I8)().fetchData,T=function(){var e=(0,a.Z)((0,l.Z)().mark((function _callee2(){var e;return(0,l.Z)().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M({id:v.current.custom_print_id});case 2:e=t.sent,D((function(){return null==e?void 0:e.data})),C(!1);case 5:case"end":return t.stop()}}),_callee2)})));return function onGetCustomCodeDetail(){return e.apply(this,arguments)}}(),O=function getDataInit(){C(!0),E((function(){v.current.custom_print_id?T():z()}))};(0,c.useEffect)((function(){O()}),[]);var $=(0,c.useMemo)((function(){return N||U}),[N,U]);(0,c.useEffect)((function(){k&&(k&&m({type:"setInitData",data:k,sale_order_id:v.current.sale_order_id||0,custom_print_id:v.current.custom_print_id||0,adjust_type:f.current}),ce((function(){return{total_weight_error:k.total_weight_error,total_sale_weight:k.total_sale_weight,total_amount:k.total_amount}})),ge({dyelot_number_list:k.dyelot_number_list,total_number:k.roll,title:k.purchaser_name,sale_mode_name:k.sale_mode_name,purchaser_name:k.purchaser_name,purchaser_phone:k.purchaser_phone,create_time:k.create_time,bill_total_sale_price:k.total_amount,total_weight:k.total_sale_weight,total_settle_weight:k.total_settlement_weight,total_weight_error:k.total_weight_error,show_pay_type:!1,show_order_no:!1,show_shipment_mode:!1,show_barcode:!1,show_qrcode:!1}))}),[k]);var L=(0,c.useMemo)((function(){var e,t,n;return{title:null==u||null===(e=u.purchaser_form_title)||void 0===e?void 0:e.title,purchaser_name:null==u||null===(t=u.purchaser_form_title)||void 0===t?void 0:t.purchaser_name,phone:null==u||null===(n=u.purchaser_form_title)||void 0===n?void 0:n.phone}}),[u]),Y=(0,ne.C7)().fetchData,ae=(0,ne.W8)().fetchData,ie=(0,c.useCallback)((function(e){m({type:"setPurchaserFormTitle",data:e})}),[]),re=(0,c.useState)({total_weight_error:0,total_sale_weight:0,total_amount:0}),se=(0,i.Z)(re,2),de=se[0],ce=se[1];(0,c.useEffect)((function(){console.log("productData合计数据:::",u),null!=u&&u.admin_data&&1===(null==u?void 0:u.update_status)&&me(u.admin_data)}),[null==u?void 0:u.admin_data]);var ue=(0,ne.WB)().fetchData,me=function(){var e=(0,a.Z)((0,l.Z)().mark((function _callee4(e){var t;return(0,l.Z)().wrap((function _callee4$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ue(e);case 2:(t=n.sent).success&&(ce((function(){var e,n,o;return{total_weight_error:null==t||null===(e=t.data)||void 0===e?void 0:e.total_weight_error,total_sale_weight:null==t||null===(n=t.data)||void 0===n?void 0:n.total_sale_weight,total_amount:null==t||null===(o=t.data)||void 0===o?void 0:o.total_amount}})),ge((function(e){var n,o,l,a,i;return(0,_.Z)((0,_.Z)({},e),{},{bill_total_sale_price:null==t||null===(n=t.data)||void 0===n?void 0:n.total_amount,total_weight:null==t||null===(o=t.data)||void 0===o?void 0:o.total_sale_weight,total_settle_weight:null==t||null===(l=t.data)||void 0===l?void 0:l.total_settlement_weight,total_weight_error:null==t||null===(a=t.data)||void 0===a?void 0:a.total_weight_error,dyelot_number_list:null==t||null===(i=t.data)||void 0===i?void 0:i.dyelot_number_list})})));case 4:case"end":return n.stop()}}),_callee4)})));return function updateCustomOrderTotal(t){return e.apply(this,arguments)}}(),pe=(0,ne.bA)().fetchData,he=function(){var e=(0,a.Z)((0,l.Z)().mark((function _callee6(){return(0,l.Z)().wrap((function _callee6$(e){for(;;)switch(e.prev=e.next){case 0:d().showModal({title:"确定删除该码单?",success:function success(e){return(0,a.Z)((0,l.Z)().mark((function _callee5(){return(0,l.Z)().wrap((function _callee5$(t){for(;;)switch(t.prev=t.next){case 0:if(!e.confirm){t.next=7;break}return t.next=3,pe({id:v.current.custom_print_id});case 3:t.sent.success&&(B.Z9.success("删除成功"),d().navigateBack()),t.next=8;break;case 7:e.cancel&&console.log("用户点击取消");case 8:case"end":return t.stop()}}),_callee5)})))()}});case 1:case"end":return e.stop()}}),_callee6)})));return function deleteCode(){return e.apply(this,arguments)}}(),xe=(0,c.useState)({}),ve=(0,i.Z)(xe,2),fe=ve[0],ge=ve[1],je=(0,c.useState)(!1),we=(0,i.Z)(je,2),Ze=we[0],Ne=we[1];return(0,g.jsxs)(r.G7,{className:q,children:[(0,g.jsx)(r.G7,{className:H,children:(0,g.jsx)(payeeHead,{defaultValue:L,onSelect:ie})}),(0,g.jsx)(te.Z,{onSelect:j,list:[{value:1,label:"按整单"},{value:2,label:"按面料"},{value:3,label:"按颜色"}],defaultIndex:1}),$?(0,g.jsx)(r.G7,{className:P,children:(0,g.jsx)(_e.Z,{})}):(0,g.jsxs)(r.G7,{className:Q,children:[(0,g.jsx)(r.G7,{children:1==(null==u?void 0:u.adjust_type)&&(0,g.jsx)(I,{orderData:null==u?void 0:u.data})}),(0,g.jsx)(r.G7,{children:2==(null==u?void 0:u.adjust_type)&&(0,g.jsx)(V,{orderData:null==u?void 0:u.data})}),(0,g.jsx)(r.G7,{children:3==(null==u?void 0:u.adjust_type)&&(0,g.jsx)(R,{orderData:null==u?void 0:u.data})}),(0,g.jsxs)(r.G7,{className:W,children:[(0,g.jsx)(r.G7,{className:A,children:"自定义单据信息"}),0===(null==k?void 0:k.sale_mode)&&(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计空差"}),(0,g.jsxs)(r.xv,{children:[(0,oe.$y)(de.total_weight_error),"kg"]})]}),(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计重量"}),(0,g.jsxs)(r.xv,{className:X,children:[(0,oe.$y)(de.total_sale_weight),"kg"]})]}),(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计金额"}),(0,g.jsxs)(r.xv,{className:ee,children:["¥",(0,oe.yb)(de.total_amount)]})]})]}),(0,g.jsxs)(r.G7,{className:W,children:[(0,g.jsx)(r.G7,{className:A,children:"原始单据信息"}),0===(null==k?void 0:k.sale_mode)&&(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计空差"}),(0,g.jsxs)(r.xv,{children:[(0,oe.$y)(null==u||null===(e=u.data)||void 0===e?void 0:e.original_total_weight_error),"kg"]})]}),(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计重量"}),(0,g.jsxs)(r.xv,{className:X,children:[(0,oe.$y)(null==u||null===(t=u.data)||void 0===t?void 0:t.original_total_sale_weight),"kg"]})]}),(0,g.jsxs)(r.G7,{className:K,children:[(0,g.jsx)(r.xv,{children:"合计金额"}),(0,g.jsxs)(r.xv,{className:ee,children:["¥",(0,oe.yb)(null==u||null===(n=u.data)||void 0===n?void 0:n.original_total_amount)]})]})]})]}),(0,g.jsx)(bottomBtn,{delStatus:!!u.custom_print_id,onClick:function onBottomClick(e){(0,a.Z)((0,l.Z)().mark((function _callee3(){var t;return(0,l.Z)().wrap((function _callee3$(n){for(;;)switch(n.prev=n.next){case 0:if("save"!==e){n.next=14;break}if(!h){n.next=7;break}return n.next=4,ae((0,_.Z)({},null==u?void 0:u.admin_data));case 4:n.t0=n.sent,n.next=10;break;case 7:return n.next=9,Y((0,_.Z)({},null==u?void 0:u.admin_data));case 9:n.t0=n.sent;case 10:(t=n.t0).success&&(v.current.custom_print_id=t.data.id,O(),m({type:"changeSaveStatus",data:!0}),B.Z9.success("保存成功!")),n.next=15;break;case 14:"del"===e?he():"preview"===e&&Ne(!0);case 15:case"end":return n.stop()}}),_callee3)})))()}}),(0,g.jsx)(le.Z,{orderObj:fe,showPopup:Ze,handClose:function handClose(){return Ne(!1)}}),(0,g.jsx)(r.G7,{className:"common_safe_area_y"})]})};Page((0,o.createPageConfig)((function(){return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(y.ZP,{children:(0,g.jsx)(main,{})})})}),"pages/codeSetting/index",{root:{cn:[]}},{navigationBarTitleText:"码单详情"}||{}))}},function(e){e.O(0,[693,3568,9717,1376,3786,402,5282,2107,1216,8592],(function(){return t=1468,e(e.s=t);var t}));e.O()}]); |