2 lines
30 KiB
JavaScript
2 lines
30 KiB
JavaScript
"use strict";require("./sub-common/dde3895fab754ea605d2697ad6817a2a.js");require("./sub-common/c72852a5454e8568977bc06e1e0e4ee9.js");require("./sub-common/554304a60565dcd42c478a76f25c75ef.js");require("./sub-common/55110922109abd85095b2f3bf30f4a4f.js");require("./sub-common/0faae082e61997f12841426745de246a.js");require("./sub-common/b636e942651e29772c7a776b65f107ba.js");require("./sub-common/8b6394965b01a3482fded67e2b94c0e4.js");/*! For license information please see index.js.LICENSE.txt */
|
|
(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([["pages/submitOrder/index"],{"./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/submitOrder/index.tsx":function(e,o,i){var n=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");var a=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");var d=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");var t=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");var l=i("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");var u=i("./node_modules/@tarojs/taro/index.js");var r=i.n(u);var _=i("./node_modules/big.js/big.mjs");var s=i("./node_modules/react/cjs/react.production.min.js");var c=i("./node_modules/classnames/index.js");var m=i.n(c);var f=i("./src/pages/orderDetails/components/addressDetailBox/index.tsx");var x=i("./src/pages/orderDetails/components/remark/index.tsx");var h=i("./src/pages/submitOrder/index.module.scss");var v=i("./src/components/popup/index.tsx");var p=i("./src/common/util.ts");var g=i("./src/use/useCommon.ts");var b=i("./src/api/order.ts");var j=i("./src/common/common.ts");var w=i("./src/common/format.js");var N=i("./src/components/iconfont/iconfont.tsx");var k=i("./src/api/addressList.ts");var y=i("./src/components/LabAndImg/index.tsx");var B=i("./src/common/Enumerate/index.ts");var V=i("./src/components/Divider/index.tsx");var P=i("./src/components/layoutBlock/index.tsx");var S=i("./src/components/iconText/index.tsx");var z=i("./src/components/Dialog/index.tsx");var M=i("./src/components/InputX/index.tsx");var O=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js");var D=function DefaultBox(e){var o=e.title,i=o===void 0?"标题":o,n=e.modeName,a=n===void 0?"大货":n,d=e.showMode,t=d===void 0?false:d,u=e.children,r=e.clickNode;return(0,O.jsxs)(P["default"],{circle:true,customStyle:{marginTop:"24rpx"},children:[(0,O.jsxs)(l.View,{className:h["default"].titleBox,children:[(0,O.jsx)(l.View,{className:h["default"].title,children:i}),t&&(0,O.jsx)(l.View,{className:h["default"].modeName,onClick:function onClick(){return r===null||r===void 0?void 0:r()},children:a})]}),(0,O.jsx)(l.View,{className:h["default"].modeLine}),u]})};var T=(0,s.memo)(D);var C=function GoodsItem(e){var o=e.list,i=o===void 0?[]:o,n=e.obj,a=n===void 0?{}:n,d=e.updateData;var u=(0,s.useState)(i),r=(0,t["default"])(u,2),c=r[0],f=r[1];(0,s.useEffect)((function(){f(i)}),[i]);var x=(0,s.useCallback)((function(e){return{lab:e.lab,rgb:e.rgb,texture_url:e.texture_url}}),[]);var v=(0,s.useRef)([]);var p=function handleClickBulkEdit(e){v.current=[e];D(true)};var g=function handleEdit(e,o){v.current=[e,o];E(true)};var b=(0,s.useState)(false),j=(0,t["default"])(b,2),k=j[0],D=j[1];var T=function handleBulkPopupChange(e){D(e)};var C=(0,s.useState)(false),q=(0,t["default"])(C,2),R=q[0],E=q[1];var I=function handleChange(e){E(e)};var F=function handleCancel(){E(false);D(false)};var L=function handleConfirm(){if(W){return}var e=i.map((function(e){if(e.id===v.current[1]){e.product_colors=e.product_colors.map((function(e){if(e.id===v.current[0]){e.sale_price=(0,_["default"])(e.origin_price).add((0,w.formatPriceMul)(J));if((a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Bulk){e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatWeightDiv)(e.estimate_weight)*e.roll)}else if((a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Plate){e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatMeterDiv)(e.length))}else{e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatMeterDiv)(e.length)/(0,w.formatMeterDiv)(e.length_to_weight_rate)).toFixed(0);console.log("estimate_amount",e.estimate_amount,(0,w.formatPriceDiv)(e.estimate_amount,100,true))}}return e}))}return e}));f(e);F();d({product_list:e,estimate_amount:e.reduce((function(e,o){return e+o.product_colors.reduce((function(e,o){return e+o.estimate_amount}),0)}),0)})};var Y=function handleBulkConfirm(){if(W){return}var e=i.map((function(e){if(e.id===v.current[0]){e.product_colors=e.product_colors.map((function(e){e.sale_price=(0,_["default"])(e.origin_price).add((0,w.formatPriceMul)(J));if((a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Bulk){e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatWeightDiv)(e.estimate_weight)*e.roll)}else if((a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Plate){e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatMeterDiv)(e.length))}else{e.estimate_amount=(0,w.formatPriceMul)(Number((0,w.formatPriceDiv)(e.sale_price))*(0,w.formatMeterDiv)(e.length)/(0,w.formatMeterDiv)(e.length_to_weight_rate))}return e}))}return e}));f(e);F();d({product_list:e,estimate_amount:e.reduce((function(e,o){return e+o.product_colors.reduce((function(e,o){return e+o.estimate_amount}),0)}),0)})};var G="-1.5";var Z=(0,s.useState)(G),A=(0,t["default"])(Z,2),J=A[0],H=A[1];var Q=function handleInput(e){var o=e.detail.value;H(o);return o};var W=(0,s.useMemo)((function(){var e="";console.log("errorMsg",J);if(/[a-zA-Z]/.test(J)||Number.isNaN(Number(J))){e="请填写数字"}else if(Number(J)<-3){e="不能小于-3"}else{e=""}return e}),[J]);return(0,O.jsxs)(l.View,{children:[c.map((function(e,o){return(0,O.jsxs)(P["default"],{circle:true,customClassName:o===i.length-1?h["default"].layoutBlock:"",children:[(0,O.jsxs)(l.View,{className:h["default"].goodsProduct,children:[(0,O.jsxs)(l.View,{className:h["default"].goodsTitle,children:[(0,w.formatRemoveHashTag)(e.code),"# ",e.name]}),(0,O.jsx)(l.View,{className:h["default"].goodsEditIcon,onClick:function onClick(){return p(e.id)},children:(0,O.jsx)(S["default"],{iconName:"icon-bianji1",iconSize:30,svg:true,color:"#3d85ff",text:"批量修改",textCustomStyle:{color:"#3d85ff"}})})]}),(0,O.jsx)(V["default"],{direction:"horizontal",customStyles:{marginTop:"24rpx",marginBottom:"32rpx"}}),e.product_colors.map((function(o,i){return(0,O.jsxs)(l.View,{className:h["default"].itemGoods,children:[(0,O.jsx)(l.View,{className:h["default"].itemPic,children:(0,O.jsx)(y["default"],{value:x(o)})}),(0,O.jsxs)(l.View,{className:h["default"].itemRight,children:[(0,O.jsxs)(l.View,{children:[(0,O.jsxs)(l.View,{className:h["default"].item_right_top,children:[(0,O.jsxs)(l.View,{className:h["default"].itemName,children:[(0,w.formatRemoveHashTag)(o.code),"# ",o.name]}),(0,O.jsxs)(l.View,{className:h["default"].itemNums,children:["x",(a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Bulk?o.roll:(0,w.formatMeterDiv)(o.length),(a===null||a===void 0?void 0:a.sale_mode)===0?"条":"米"]})]}),(0,O.jsxs)(l.View,{className:h["default"].item_right_Bottom,children:[(0,O.jsxs)(l.View,{className:h["default"].flexBox,children:[(0,O.jsxs)(l.View,{className:h["default"].itemMoney,children:["¥",(0,w.formatPriceDiv)(o.sale_price,100,true),"/",(a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Plate?"m":"kg"]}),(a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Bulk&&(o===null||o===void 0?void 0:o.sale_price)!==(o===null||o===void 0?void 0:o.standard_price)?(0,O.jsxs)(l.View,{className:h["default"].lastBox,children:["¥",(0,w.formatPriceDiv)(o===null||o===void 0?void 0:o.standard_price,100,true),"/kg"]}):null,(a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.Plate&&(o===null||o===void 0?void 0:o.sale_price)!==(o===null||o===void 0?void 0:o.standard_price)?(0,O.jsxs)(l.View,{className:h["default"].lastBox,children:["¥",(0,w.formatPriceDiv)(o===null||o===void 0?void 0:o.standard_price,100,true),"/m"]}):null,(a===null||a===void 0?void 0:a.sale_mode)===B.EnumSaleMode.BulkCut&&(o===null||o===void 0?void 0:o.sale_price)!==(o===null||o===void 0?void 0:o.standard_price)?(0,O.jsxs)(l.View,{className:h["default"].lastBox,children:["¥",(0,w.formatPriceDiv)(o===null||o===void 0?void 0:o.standard_price,100,true),"/kg"]}):null,(0,O.jsx)(l.View,{onClick:function onClick(){return g(o.id,e.id)},children:(0,O.jsx)(N["default"],{name:"icon-bianji1",color:"#3d85ff"})})]}),(0,O.jsxs)(l.View,{className:h["default"].itemMoneyOne,children:["¥",(0,w.formatPriceDiv)(o.estimate_amount)]})]})]}),(0,O.jsx)(V["default"],{direction:"horizontal",customStyles:{marginTop:"20rpx",marginBottom:"0"}})]})]},i)}))]},o)})),(0,O.jsx)(z["default"],{zIndex:999,show:k,onChange:T,children:(0,O.jsxs)(l.View,{className:h["default"].modal,children:[(0,O.jsx)(l.View,{className:h["default"].modalTitle,children:"批量调整"}),(0,O.jsxs)(l.View,{className:h["default"].modalContainer,children:[(0,O.jsx)(l.View,{className:h["default"].inputBar,children:(0,O.jsx)(M["default"],{customInputClassName:h["default"].input,value:J,onInput:Q,placeholder:"请输入调价价格"})}),W&&(0,O.jsx)(l.Text,{className:h["default"].errorMsg,children:W}),(0,O.jsx)(l.View,{className:h["default"].tips,children:"批量调价是在标准报价基础上调整,增加价格则输入正数,减少则输入负数"})]}),(0,O.jsx)(V["default"],{direction:"horizontal",customStyles:{margin:"0",opacity:"0.7",transform:"translateY(1px) scaleY(0.6)"}}),(0,O.jsxs)(l.View,{className:h["default"].modalButton,children:[(0,O.jsx)(l.View,{className:h["default"]["modalButton--cancel"],onClick:F,children:"取消"}),(0,O.jsx)(V["default"],{direction:"vertical",customStyles:{margin:"0",height:"100rpx",opacity:"0.7",transform:"scaleX(0.6)"}}),(0,O.jsx)(l.View,{className:m()(h["default"]["modalButton--confirm"],W&&h["default"].disabled),onClick:Y,children:"确认"})]})]})}),(0,O.jsx)(z["default"],{zIndex:999,show:R,onChange:I,children:(0,O.jsxs)(l.View,{className:h["default"].modal,children:[(0,O.jsx)(l.View,{className:h["default"].modalTitle,children:"单价调整"}),(0,O.jsxs)(l.View,{className:h["default"].modalContainer,children:[(0,O.jsx)(l.View,{className:h["default"].inputBar,children:(0,O.jsx)(M["default"],{customInputClassName:h["default"].input,value:J,onInput:Q,placeholder:"请输入调价价格"})}),W&&(0,O.jsx)(l.Text,{className:h["default"].errorMsg,children:W}),(0,O.jsx)(l.View,{className:h["default"].tips,children:"调价是在标准报价基础上调整,增加价格则输入正数,减少则输入负数"})]}),(0,O.jsx)(V["default"],{direction:"horizontal",customStyles:{margin:"0",opacity:"0.7",transform:"translateY(1px) scaleY(0.6)"}}),(0,O.jsxs)(l.View,{className:h["default"].modalButton,children:[(0,O.jsx)(l.View,{className:h["default"]["modalButton--cancel"],onClick:F,children:"取消"}),(0,O.jsx)(V["default"],{direction:"vertical",customStyles:{margin:"0",height:"100rpx",opacity:"0.7",transform:"scaleX(0.6)"}}),(0,O.jsx)(l.View,{className:m()(h["default"]["modalButton--confirm"],W&&h["default"].disabled),onClick:L,children:"确认"})]})]})})]})};var q=(0,s.memo)(C);var R=function SubmitOrder(){var e;var o=(0,s.useRef)([]);var i=r().getCurrentPages();var _=i[i.length-1];var c=(0,k.MpPurchaserAddressList)(),m=c.fetchData;var y=(0,u.useRouter)();var V=(0,s.useState)({}),P=(0,t["default"])(V,2),S=P[0],z=P[1];var M=-1;var D=(0,s.useRef)(false);var C=(0,s.useState)(null),R=(0,t["default"])(C,2),E=R[0],I=R[1];var F=(0,p.debounce)(function(){var e=(0,d["default"])((0,n["default"])().mark((function _callee(e,i){var d;return(0,n["default"])().wrap((function _callee$(n){while(1)switch(n.prev=n.next){case 0:e.stopPropagation();if(!(E==i)){n.next=4;break}j.alert.error("不能选择相同的方式");return n.abrupt("return",false);case 4:r().showLoading({title:"请稍等...",mask:true});if(i===2&&o.current.length>0&&!((d=_.data)!==null&&d!==void 0&&d.addressObj)){z((function(e){var i,n,d,t,l,u,r;return(0,a["default"])((0,a["default"])({},e),{},{province_name:(i=o.current[0])===null||i===void 0?void 0:i.province_name,address_id:(n=o.current[0])===null||n===void 0?void 0:n.id,city_name:(d=o.current[0])===null||d===void 0?void 0:d.city_name,address_detail:(t=o.current[0])===null||t===void 0?void 0:t.address_detail,district_name:(l=o.current[0])===null||l===void 0?void 0:l.district_name,target_user_name:(u=o.current[0])===null||u===void 0?void 0:u.name,purchaser_phone:(r=o.current[0])===null||r===void 0?void 0:r.phone})}))}if(i===2&&!o.current.length&&!(S!==null&&S!==void 0&&S.province_name)){j.alert.error("请选择地址")}I(i);r().hideLoading();case 9:case"end":return n.stop()}}),_callee)})));return function(o,i){return e.apply(this,arguments)}}(),300);var L=(0,b.MpSaleOrderPreview)(),Y=L.fetchData;var G=(0,s.useState)(""),Z=(0,t["default"])(G,2),A=Z[0],J=Z[1];var H=function(){var e=(0,d["default"])((0,n["default"])().mark((function _callee2(){var e;var o,i,d,t;return(0,n["default"])().wrap((function _callee2$(n){while(1)switch(n.prev=n.next){case 0:o=[];console.log("purchaser_name",y.params.purchaser_name);o=JSON.parse(decodeURIComponent(y.params.shopping_cart_product_color_list));i=[];(e=o)===null||e===void 0?void 0:e.forEach((function(e){i.push({shopping_cart_product_color_id:parseInt(e),sale_price:0})}));d={purchaser_id:Number(y.params.purchaser_id),sale_mode:Number(y.params.sale_mode),shopping_cart_product_color_list:i};n.next=8;return Y(d);case 8:t=n.sent;z((0,a["default"])((0,a["default"])({},t.data),{},{product_list:t.data.product_list.map((function(e){e.product_colors=e.product_colors.map((function(e){e.origin_price=e.standard_price;return e}));return e}))}));case 10:case"end":return n.stop()}}),_callee2)})));return function getDetail(){return e.apply(this,arguments)}}();var Q=(0,b.SaleOrderPreViewBuyNow)(),W=Q.fetchData;var U=function(){var e=(0,d["default"])((0,n["default"])().mark((function _callee3(){var e;var o,i,d,t,l;return(0,n["default"])().wrap((function _callee3$(n){while(1)switch(n.prev=n.next){case 0:o=JSON.parse(y===null||y===void 0?void 0:(e=y.params)===null||e===void 0?void 0:e.sale_order_product_color_list)||[];if(!((o===null||o===void 0?void 0:o.length)>0)){n.next=9;break}d=[];t=Number(y===null||y===void 0?void 0:y.params.sale_mode);o.forEach((function(e){d.push({length:(e===null||e===void 0?void 0:e.length)||0,roll:e.roll,product_color_id:e.id,sale_price:t===B.EnumSaleMode.Bulk?e.bulk_price:t===B.EnumSaleMode.Plate?e.length_cut_price:e.weight_cut_price})}));n.next=7;return W({sale_mode:t,sale_order_product_color_list:d,purchaser_id:Number(y===null||y===void 0?void 0:y.params.purchaser_id)});case 7:l=n.sent;z((0,a["default"])((0,a["default"])({},l.data),{},{product_list:(i=l.data.product_list)===null||i===void 0?void 0:i.map((function(e){e.product_colors=e.product_colors.map((function(e){e.origin_price=e.standard_price;return e}));return e}))}));case 9:case"end":return n.stop()}}),_callee3)})));return function getOnceDetail(){return e.apply(this,arguments)}}();var X=(0,s.useState)(false),K=(0,t["default"])(X,2),$=K[0],ee=K[1];var oe=(0,s.useCallback)(function(){var e=(0,d["default"])((0,n["default"])().mark((function _callee4(e){return(0,n["default"])().wrap((function _callee4$(o){while(1)switch(o.prev=o.next){case 0:ee(false);z((function(o){return(0,a["default"])((0,a["default"])({},o),{},{remark:e})}));case 2:case"end":return o.stop()}}),_callee4)})));return function(o){return e.apply(this,arguments)}}(),[]);var ie=function handSelect(e){if(E==1){return false}r().navigateTo({url:"/pages/addressManager/index?orderId="+"-100"+"&purchaser_id=".concat(y.params.purchaser_id)})};var ne=(0,g.UseSubscriptionMessage)(),ae=ne.openSubscriptionMessage;var de=(0,b.MpSaleOrderPost)(),te=de.fetchData;var le=(0,b.SaleOrderSubmitBuyNow)(),ue=le.fetchData;var re=function handSure(){if(E==2&&!S.address_id){return j.alert.error("请选择地址")}var e=[];if(!D.current){S.product_list.forEach((function(o){o.product_colors.forEach((function(o){e.push({sale_price:Number(o.sale_price),shopping_cart_product_color_id:Number(o.id)})}))}))}else{S.product_list.forEach((function(o){o.product_colors.forEach((function(o){e.push({length:o.length,roll:o.roll,sale_price:Number(o.sale_price),product_color_id:Number(o.id)})}))}))}var o={address_id:Number(S.address_id)?Number(S.address_id):0,list:e,physical_warehouse:S.physical_warehouse,purchaser_id:Number(y.params.purchaser_id),remark:S.remark,sale_mode:S.sale_mode,shipment_mode:E};r().showModal({content:"确认提交吗?",confirmText:"确认",cancelText:"取消",success:function success(e){return(0,d["default"])((0,n["default"])().mark((function _callee5(){var i,a,d;return(0,n["default"])().wrap((function _callee5$(n){while(1)switch(n.prev=n.next){case 0:if(!e.confirm){n.next=14;break}n.next=3;return ae({scenes:5});case 3:r().showLoading({title:"请稍等...",mask:true});if(!D.current){n.next=10;break}n.next=7;return ue(o);case 7:a=n.sent;n.next=13;break;case 10:n.next=12;return te(o);case 12:a=n.sent;case 13:if(((i=a)===null||i===void 0?void 0:i.msg)==="success"){r().showToast({title:"成功"});r().hideLoading();r().redirectTo({url:"/pages/orderDetails/index?id=".concat(a.data.id)})}else{r().hideLoading();r().showToast({title:(d=a)===null||d===void 0?void 0:d.msg,icon:"error"})}case 14:case"end":return n.stop()}}),_callee5)})))()}})};var _e=function(){var e=(0,d["default"])((0,n["default"])().mark((function _callee6(){var e;var i;return(0,n["default"])().wrap((function _callee6$(n){while(1)switch(n.prev=n.next){case 0:n.next=2;return m({purchaser_id:y.params.purchaser_id});case 2:i=n.sent;o.current=i===null||i===void 0?void 0:(e=i.data)===null||e===void 0?void 0:e.list.filter((function(e){return e.is_default}));case 4:case"end":return n.stop()}}),_callee6)})));return function getAddress(){return e.apply(this,arguments)}}();(0,s.useEffect)((function(){z(S)}),[S]);(0,u.useDidShow)((function(){var e,o,i,n,d,t;z((function(e){var o,i,n,d,t,l,u,r,s,c,m,f,x,h,v,p,g,b,j,w,N,k,B,V,P,S,z,M;return(0,a["default"])((0,a["default"])({},e),{},{sale_mode:Number(y.params.sale_mode),province_name:(o=_.data)!==null&&o!==void 0&&(i=o.addressObj)!==null&&i!==void 0&&i.province_name?(n=_.data)===null||n===void 0?void 0:(d=n.addressObj)===null||d===void 0?void 0:d.province_name:"",address_id:(t=_.data)!==null&&t!==void 0&&(l=t.addressObj)!==null&&l!==void 0&&l.id?(u=_.data)===null||u===void 0?void 0:(r=u.addressObj)===null||r===void 0?void 0:r.id:"",city_name:(s=_.data)!==null&&s!==void 0&&(c=s.addressObj)!==null&&c!==void 0&&c.city_name?(m=_.data)===null||m===void 0?void 0:(f=m.addressObj)===null||f===void 0?void 0:f.city_name:"",address_detail:(x=_.data)!==null&&x!==void 0&&(h=x.addressObj)!==null&&h!==void 0&&h.address_detail?(v=_.data)===null||v===void 0?void 0:(p=v.addressObj)===null||p===void 0?void 0:p.address_detail:"",district_name:(g=_.data)!==null&&g!==void 0&&(b=g.addressObj)!==null&&b!==void 0&&b.district_name?(j=_.data)===null||j===void 0?void 0:(w=j.addressObj)===null||w===void 0?void 0:w.district_name:"",target_user_name:(N=_.data)!==null&&N!==void 0&&(k=N.addressObj)!==null&&k!==void 0&&k.name?(B=_.data)===null||B===void 0?void 0:(V=B.addressObj)===null||V===void 0?void 0:V.name:"",purchaser_phone:(P=_.data)!==null&&P!==void 0&&(S=P.addressObj)!==null&&S!==void 0&&S.phone?(z=_.data)===null||z===void 0?void 0:(M=z.addressObj)===null||M===void 0?void 0:M.phone:""})}));M=(e=_.data)===null||e===void 0?void 0:(o=e.addressObj)===null||o===void 0?void 0:o.id;var l=_===null||_===void 0?void 0:(i=_.data)===null||i===void 0?void 0:(n=i.ids)===null||n===void 0?void 0:n.filter((function(e){return e==M}));if(_!==null&&_!==void 0&&(d=_.data)!==null&&d!==void 0&&d.ids&&l.length===0){z((function(e){return(0,a["default"])((0,a["default"])({},e),{},{sale_mode:Number(y.params.sale_mode),province_name:"",address_id:"",city_name:"",address_detail:"",district_name:"",target_user_name:"",purchaser_phone:""})}))}if(!((t=_.data)!==null&&t!==void 0&&t.addressObj)){I(1)}else{I(2)}}));(0,s.useEffect)((function(){_e();console.log("isBuyNew",y.params.isBuyNew);J(decodeURIComponent(y.params.purchaser_name));D.current=JSON.parse(y.params.isBuyNew);if(D.current){U()}else{H()}}),[]);var se=function updateData(e){z((function(o){return(0,a["default"])((0,a["default"])({},o),e)}))};return(0,O.jsxs)(l.View,{className:h["default"].mainBox,children:[(0,O.jsxs)(l.View,{className:h["default"].content,children:[(0,O.jsx)(f["default"],{navSelect:function navSelect(e){return ie(e)},obj:S,receivingStatus:E,onReceivingStatus:function onReceivingStatus(e,o){return F(e,o)}}),(0,O.jsx)(T,{showMode:true,title:"客户信息",modeName:S.sale_mode_name,children:(0,O.jsx)(l.View,{className:h["default"].pussBox,children:(0,O.jsx)(l.View,{className:h["default"].pussName,children:A})})}),(0,O.jsxs)(l.View,{className:h["default"].productBox,children:[(0,O.jsx)(q,{list:S===null||S===void 0?void 0:S.product_list,obj:S,updateData:se}),(0,O.jsxs)(l.View,{className:h["default"].flexMoney,children:[(0,O.jsxs)(l.View,{className:h["default"].flexTotalBox,children:[(0,O.jsx)(l.View,{className:h["default"].totalFont,children:"合计金额"}),(0,O.jsx)(N["default"],{name:"icon-tishi",size:28})]}),(0,O.jsxs)(l.View,{className:h["default"].shoudPay,children:["¥",(0,w.formatPriceDiv)(S.estimate_amount,100,true)]})]})]}),(0,O.jsx)(T,{title:"备注信息",showMode:true,modeName:"填写/修改备注".concat(" >"),clickNode:function clickNode(){return ee(true)},children:(0,O.jsx)(l.View,{className:h["default"].remarkFont,children:!S.remark?"暂无":S.remark})})]}),(0,O.jsxs)(l.View,{className:h["default"].bottomBox,children:[(0,O.jsxs)(l.View,{className:h["default"].leftBottom,children:[(0,O.jsxs)(l.View,{className:h["default"].topFlex,children:[(0,O.jsx)(l.View,{className:h["default"].topFont,children:"预估金额:"}),(0,O.jsxs)(l.View,{className:h["default"].topTotal,children:["¥",(0,w.formatPriceDiv)(S.estimate_amount,100,true)]})]}),(0,O.jsxs)(l.View,{className:h["default"].bottomFlex,children:[(e=S.product_list)===null||e===void 0?void 0:e.length," 种面料,",S.total_colors," 种颜色,共 ",S.sale_mode===0?S.total_number:S.total_number/100," ",S.sale_mode===0?"条":"m"]})]}),(0,O.jsx)(l.View,{className:h["default"].rightBottom,onClick:re,children:"提交订单"})]}),(0,O.jsx)(v["default"],{show:$,showTitle:false,onClose:function onClose(){return ee(false)},children:$&&(0,O.jsx)(x["default"],{onSave:function onSave(e){return oe(e)},defaultValue:S.remark})})]})};o["default"]=R},"./src/pages/submitOrder/index.tsx":function(e,o,i){var n=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js");var a=i("./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/submitOrder/index.tsx");var d={navigationBarTitleText:"确认订单"};var t=Page((0,n.createPageConfig)(a["default"],"pages/submitOrder/index",{root:{cn:[]}},d||{}));var l=a["default"]},"./src/pages/submitOrder/index.module.scss":function(e,o){o["default"]={common_safe_area_y:"index-module__common_safe_area_y___qg86h","flex-col":"index-module__flex-col___yBU0T","flex-row":"index-module__flex-row___OIYZf","justify-between":"index-module__justify-between___YIbNh","justify-center":"index-module__justify-center___HrzP1","items-center":"index-module__items-center___pZEh6","flex-item":"index-module__flex-item___sMLkF","full-100":"index-module__full-100___XzM6s","color-blue":"index-module__color-blue___f24k1","color-yellow":"index-module__color-yellow___Gu_fg","color-green":"index-module__color-green___fvR5x","color-grey":"index-module__color-grey___GBKid","color-white":"index-module__color-white___ySy_O","s-w":"index-module__s-w___OM4CT","s-e":"index-module__s-e___Bg6O9",filter:"index-module__filter___PEosm",iconfont:"index-module__iconfont___tJlYk","icon-shouhou1":"index-module__icon-shouhou1___ymbJU","icon-cangku1":"index-module__icon-cangku1___j5cPV","icon-saoma":"index-module__icon-saoma___sTvrI","icon-dizhi1":"index-module__icon-dizhi1___wzUPc","icon-huodaofukuan":"index-module__icon-huodaofukuan___pczqN","icon-yufukuan1":"index-module__icon-yufukuan1___zOSBr","icon-yue":"index-module__icon-yue___klcHl","icon-zidingyi":"index-module__icon-zidingyi___mKxT7","icon-jinetiaozheng":"index-module__icon-jinetiaozheng___np9YJ","icon-tuikuan1":"index-module__icon-tuikuan1___mV7qF","icon-zhankai":"index-module__icon-zhankai___dRBWX","icon-shouqi":"index-module__icon-shouqi___rngj3","icon-lujing":"index-module__icon-lujing___jsD9Q","icon-jizhumima":"index-module__icon-jizhumima___thuwr","icon-a-jizhumima":"index-module__icon-a-jizhumima___c78Lq","icon-weixindenglu":"index-module__icon-weixindenglu___xrcQn","icon-kehuxinxi":"index-module__icon-kehuxinxi___pmtx4","icon-yewuyuanqizi":"index-module__icon-yewuyuanqizi___OtRzI","icon-chakanquanbukehu":"index-module__icon-chakanquanbukehu___jZ4i7","icon-biyan":"index-module__icon-biyan___yqWNI","icon-bianji":"index-module__icon-bianji___QT5Lp","icon-daikuan":"index-module__icon-daikuan___YiPLx","icon-cangku":"index-module__icon-cangku___ahZB0","icon-guanlidingdan":"index-module__icon-guanlidingdan___rWdDF","icon-mima":"index-module__icon-mima___DVEVP","icon-guanbi":"index-module__icon-guanbi___H9S6O","icon-jianshao":"index-module__icon-jianshao___zRUe2","icon-dingwei":"index-module__icon-dingwei___YxASQ","icon-saomiao":"index-module__icon-saomiao___aRGNN","icon-peihuo":"index-module__icon-peihuo___uaQZD","icon-shaixuan":"index-module__icon-shaixuan___in6Rq","icon-paiming":"index-module__icon-paiming___s3uiB","icon-shanchusousuoxinxi":"index-module__icon-shanchusousuoxinxi___qN8og","icon-shijian":"index-module__icon-shijian___sWRIr","icon-sousuo":"index-module__icon-sousuo___aHiPv","icon-shouhou":"index-module__icon-shouhou___VZg34","icon-sousuofanhui":"index-module__icon-sousuofanhui___dVNp7","icon-sousuoshanchu":"index-module__icon-sousuoshanchu___dWclx","icon-tuikuan":"index-module__icon-tuikuan___MucNX","icon-tishi":"index-module__icon-tishi___b90Na","icon-xianxiahuizong":"index-module__icon-xianxiahuizong___P9gfS","icon-xinzeng":"index-module__icon-xinzeng___q6OWQ","icon-yonghuming":"index-module__icon-yonghuming___IACs_","icon-yanjing":"index-module__icon-yanjing___mejWV","icon-yufukuan":"index-module__icon-yufukuan___RzqXl","icon-wodekefu":"index-module__icon-wodekefu___qUnh0","icon-dizhi":"index-module__icon-dizhi___yupcd","icon-shouhouzhongxin":"index-module__icon-shouhouzhongxin___o7Ppf","icon-wodeshoucang":"index-module__icon-wodeshoucang___BoC2I","icon-shoukuanliebiao":"index-module__icon-shoukuanliebiao___04Ih0","icon-madanguanli":"index-module__icon-madanguanli___pYMO5","icon-qusechazhao":"index-module__icon-qusechazhao___f3pgl","icon-pandiansaoma":"index-module__icon-pandiansaoma___jYFSj","icon-yaoqingma":"index-module__icon-yaoqingma___qyFKu","icon-duizhang":"index-module__icon-duizhang___jaGxO","icon-tihuoliebiao":"index-module__icon-tihuoliebiao___LYvQT","icon-yangpinduibi":"index-module__icon-yangpinduibi___TQtUR","icon-yansequyang":"index-module__icon-yansequyang___hnBQQ","icon-fahuoliebiao":"index-module__icon-fahuoliebiao___jH7oU","icon-yuncangkucun":"index-module__icon-yuncangkucun___Buxzn","icon-xiaoshou":"index-module__icon-xiaoshou___L3cQE","icon-qianzhicangkucun":"index-module__icon-qianzhicangkucun___SYzSX","icon-lingquseka":"index-module__icon-lingquseka___lHqkP","icon-gouwu1":"index-module__icon-gouwu1___A5RIs","icon-dingdan1":"index-module__icon-dingdan1___eqPqK","icon-gerenzhongxin1":"index-module__icon-gerenzhongxin1___PAl5l","icon-shouye1":"index-module__icon-shouye1___fPTkO","icon-gerenzhongxin":"index-module__icon-gerenzhongxin___B3o9W","icon-dingdan":"index-module__icon-dingdan___mHwAu","icon-shouye":"index-module__icon-shouye___HyZDK","icon-gouwu":"index-module__icon-gouwu___ZPJbR",mainBox:"index-module__mainBox___mQLrM",content:"index-module__content___tdDBE",pussBox:"index-module__pussBox___tLZKt",pussName:"index-module__pussName___iBIBo",pussPhone:"index-module__pussPhone___OivXr",total:"index-module__total___uGnog",productBox:"index-module__productBox___R04Zl",flexMoney:"index-module__flexMoney___s_H6n",flexTotalBox:"index-module__flexTotalBox___wAhiq",totalFont:"index-module__totalFont___jSkLR",tishi:"index-module__tishi___dLero",shoudPay:"index-module__shoudPay___MJpPU",titleBox:"index-module__titleBox___dkGGI",title:"index-module__title___EakYU",modeName:"index-module__modeName___dnaYp",modeLine:"index-module__modeLine___Fbuuo",goodsProduct:"index-module__goodsProduct___a3gz3",goodsTitle:"index-module__goodsTitle___rIaoA",goodsEditIcon:"index-module__goodsEditIcon___hmzYu",goodsLine:"index-module__goodsLine___Gn0sq",itemGoods:"index-module__itemGoods___ToL6u",itemPic:"index-module__itemPic___XAeEt",itemRight:"index-module__itemRight___YcZAz",item_right_top:"index-module__item_right_top___oaSzC",itemName:"index-module__itemName___x6xRO",itemNums:"index-module__itemNums___J_SyR",item_right_Bottom:"index-module__item_right_Bottom___vT1hw",flexBox:"index-module__flexBox___Rkh9T",itemMoney:"index-module__itemMoney___O5qmx",lastBox:"index-module__lastBox___ozfTM",itemMoneyOne:"index-module__itemMoneyOne___Gz0gg",goodsBox:"index-module__goodsBox___qe5RQ",detailBox:"index-module__detailBox___YLO1G",detailRightFlex:"index-module__detailRightFlex___Q2PfC",detailRight:"index-module__detailRight___p8gsd",detailBtn:"index-module__detailBtn___wBWTX",detailFont:"index-module__detailFont___CWn4Z",remarkFont:"index-module__remarkFont___gX_FH",layoutBlock:"index-module__layoutBlock___WYsqF",bottomBox:"index-module__bottomBox___zkEdG",leftBottom:"index-module__leftBottom___HQr6J",topFlex:"index-module__topFlex___Z6FD0",topFont:"index-module__topFont___grB9f",topTotal:"index-module__topTotal___fZHPJ",bottomFlex:"index-module__bottomFlex___raRz2",rightBottom:"index-module__rightBottom___Zb7vs",modal:"index-module__modal___OKGY4",modalTitle:"index-module__modalTitle___V8Aqk",modalContainer:"index-module__modalContainer___CPqmw",inputBar:"index-module__inputBar___JS4lv",input:"index-module__input___KokVA",tips:"index-module__tips___b9mHc",modalButton:"index-module__modalButton___K5nPc","modalButton--cancel":"index-module__modalButton--cancel___VJtRq","modalButton--confirm":"index-module__modalButton--confirm___oqrVk",disabled:"index-module__disabled___q7sRJ",errorMsg:"index-module__errorMsg___dZVyB"}}},function(e){var __webpack_exec__=function(o){return e(e.s=o)};e.O(0,["sub-common/dde3895fab754ea605d2697ad6817a2a","sub-common/f42d325a5a38b035d04d71cef196aff3","sub-common/fa0fc8c72b47a92e38cfb23763c68ed5","sub-common/422991da318d53143200bc6e62467b62","sub-common/c72852a5454e8568977bc06e1e0e4ee9","sub-common/554304a60565dcd42c478a76f25c75ef","sub-common/55110922109abd85095b2f3bf30f4a4f","sub-common/0faae082e61997f12841426745de246a","sub-common/b636e942651e29772c7a776b65f107ba","sub-common/8b6394965b01a3482fded67e2b94c0e4","taro","vendors","common"],(function(){return __webpack_exec__("./src/pages/submitOrder/index.tsx")}));var o=e.O()}]); |