diff --git a/src/common/constant.js b/src/common/constant.js
index 4512c59..c9a028c 100644
--- a/src/common/constant.js
+++ b/src/common/constant.js
@@ -4,7 +4,7 @@
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
-export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
+// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
@@ -12,7 +12,7 @@ export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
-// export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
+export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
// CDN
// 生成密钥
diff --git a/src/components/banner/index.tsx b/src/components/banner/index.tsx
index fdbf85c..d356f4d 100644
--- a/src/components/banner/index.tsx
+++ b/src/components/banner/index.tsx
@@ -3,6 +3,7 @@ import { goLink } from "@/common/common"
import {GetBannerList} from "@/api/banner"
import styles from './index.module.scss'
import { useEffect, useState } from "react"
+import { formatImgUrl } from "@/common/fotmat"
type item = {title:string, img:string, url:string, id:number}
@@ -47,7 +48,7 @@ export default (props:params) => {
list?.map(item => {
return
skipTo(item)}>
-
+
})
diff --git a/src/components/orderBtns/index.tsx b/src/components/orderBtns/index.tsx
index 343ee90..3542da6 100644
--- a/src/components/orderBtns/index.tsx
+++ b/src/components/orderBtns/index.tsx
@@ -20,6 +20,7 @@ type Param = {
sale_mode: number, //订单类型
av_return_roll?: number, //可退数量
is_return?: true|false, //是否申请了售后
+ is_should_collect_audit?: true|false, //应收单是否审核
},
showStatus?: 'detail'|'list', //订单详情,订单列表
@@ -157,7 +158,7 @@ export default memo(({orderInfo, showStatus = 'detail', onClick}:Param) => {
label: '销售码单',
sort: 9,
validatarFunc: (orderInfo) => {
- return orderInfo.actual_amount > 0 && orderInfo.wait_pay_amount == 0 && showStatus == 'detail'
+ return orderInfo.is_should_collect_audit && showStatus == 'detail'
}
},
])
diff --git a/src/pages/collection/collectionClass/index.tsx b/src/pages/collection/collectionClass/index.tsx
index 227b52b..3d695e4 100644
--- a/src/pages/collection/collectionClass/index.tsx
+++ b/src/pages/collection/collectionClass/index.tsx
@@ -30,9 +30,9 @@ export default () => {
}
//获取搜索数据
- const [searchData, setSearchData] = useState({id:0, key: ''})
+ const [searchData, setSearchData] = useState({id:0, code_or_name: ''})
const onSearch = useCallback((e) => {
- setSearchData(() => e)
+ setSearchData((val) => ({...val, code_or_name: e}))
}, [])
useEffect(() => {
let id = router.params.id || 0
@@ -89,11 +89,12 @@ export default () => {
//移动面料
const {fetchData: fetchDataMoveFavoriteProduct} = MoveFavoriteProductApi()
- const onAdd = async () => {
+ const onAdd = async (val) => {
if(ids.length == 0) return alert.none('请选择要移动面料')
- let res = await fetchDataMoveFavoriteProduct({favorite_id: searchData.id, product_id:ids})
+ let res = await fetchDataMoveFavoriteProduct({source_favorite_id: searchData.id ,target_favorite_id: val.id, product_id:ids})
if(res.success) {
getFavoriteInfo()
+ setCollectionShow(false)
alert.success('修改成功')
}
}
@@ -102,11 +103,19 @@ export default () => {
const {fetchData: delFavoriteProductFetchData} = DelFavoriteProductApi()
const delCollectioin = async () => {
if(ids.length == 0) return alert.none('请选择要取消面料')
- let res = await delFavoriteProductFetchData({favorite_id: searchData.id, product_id:ids})
- if(res.success) {
- getFavoriteInfo()
- alert.none('已取消收藏')
+ let showModalRes = await Taro.showModal({
+ title: '是否要取消收藏',
+ confirmText: '是',
+ cancelText: '否',
+ })
+ if(showModalRes.confirm) {
+ let res = await delFavoriteProductFetchData({favorite_id: searchData.id, product_id:ids})
+ if(res.success) {
+ getFavoriteInfo()
+ alert.none('已取消收藏')
+ }
}
+
}
return (
diff --git a/src/pages/collection/components/createPopup/index.tsx b/src/pages/collection/components/createPopup/index.tsx
index 48ce577..245643b 100644
--- a/src/pages/collection/components/createPopup/index.tsx
+++ b/src/pages/collection/components/createPopup/index.tsx
@@ -45,7 +45,7 @@ export default memo(({show = false, onClose, onSuccess, defaultValue}: ReasonInf
名称
-
+
diff --git a/src/pages/order/comfirm.tsx b/src/pages/order/comfirm.tsx
index d8c0590..b3fa751 100644
--- a/src/pages/order/comfirm.tsx
+++ b/src/pages/order/comfirm.tsx
@@ -88,8 +88,8 @@ import { throttle } from "@/common/util";
district_name: address?.district_name,
address_detail: address?.address_detail,
id: address?.id,
- name: address?.name,
- phone: address?.phone,
+ target_user_name: address?.name,
+ target_user_phone: address?.phone,
shipment_mode: address?.shipment_mode,
take_goods_address: preViewOrder?.take_goods_address,
take_goods_phone: preViewOrder?.take_goods_phone,
diff --git a/src/pages/order/components/addressInfoDetail/index.tsx b/src/pages/order/components/addressInfoDetail/index.tsx
index e1e936f..8173ab8 100644
--- a/src/pages/order/components/addressInfoDetail/index.tsx
+++ b/src/pages/order/components/addressInfoDetail/index.tsx
@@ -28,7 +28,9 @@ type Param = {
district_name: string,
address_detail: string,
take_goods_address: string,
- take_goods_phone: string
+ take_goods_phone: string,
+ target_user_name: string,
+ target_user_phone: string
}
}
@@ -174,10 +176,8 @@ export default memo(forwardRef(({onSelect, onChangeShipmentMode, orderInfo, stat
//地址格式
const formatAddress = useMemo(() => {
if(receivingStatus == 2) {
- console.log('take_goods_addressbb::', addressInfo)
- return addressInfo?.province_name?addressInfo.province_name + addressInfo.city_name + addressInfo.district_name + addressInfo.address_detail:''
+ return addressInfo?.address_detail?addressInfo.province_name + addressInfo.city_name + addressInfo.district_name + addressInfo.address_detail:''
} else {
- console.log('take_goods_address::', addressInfo)
return addressInfo?.take_goods_address
}
}, [receivingStatus, addressInfo])
diff --git a/src/pages/order/components/scanPay/index.tsx b/src/pages/order/components/scanPay/index.tsx
index 2272f85..25af78c 100644
--- a/src/pages/order/components/scanPay/index.tsx
+++ b/src/pages/order/components/scanPay/index.tsx
@@ -85,7 +85,8 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
actual_amount: formatPriceDiv(orderInfo.actual_amount).toString(),
show_actual_amount: orderInfo.actual_amount > 0,
wait_pay_amount: formatPriceDiv(orderInfo.wait_pay_amount).toString(),
- show_wait_pay_amount: orderInfo.wait_pay_amount > 0
+ show_wait_pay_amount: orderInfo.wait_pay_amount > 0,
+ show_barcode: true
}))
}
}, [orderInfo])
diff --git a/src/pages/order/components/scanPayCheck/index.tsx b/src/pages/order/components/scanPayCheck/index.tsx
index 3bd9080..bf869ad 100644
--- a/src/pages/order/components/scanPayCheck/index.tsx
+++ b/src/pages/order/components/scanPayCheck/index.tsx
@@ -89,7 +89,8 @@ export default memo(({show = true, onClose, company, orderInfo}:Param) => {
actual_amount: formatPriceDiv(orderInfo.actual_amount).toString(),
show_actual_amount: orderInfo.actual_amount > 0,
wait_pay_amount: formatPriceDiv(orderInfo.wait_pay_amount).toString(),
- show_wait_pay_amount: orderInfo.wait_pay_amount > 0
+ show_wait_pay_amount: orderInfo.wait_pay_amount > 0,
+ show_barcode: true
}))
}
}, [orderInfo])
diff --git a/src/pages/order/orderList/components/order/index.tsx b/src/pages/order/orderList/components/order/index.tsx
index 6d0d02e..27561d0 100644
--- a/src/pages/order/orderList/components/order/index.tsx
+++ b/src/pages/order/orderList/components/order/index.tsx
@@ -108,16 +108,16 @@ export default memo(({value, onClickBtn}: Param) => {
goLink('/pages/order/index', {id: value?.id})}>
{value?.sale_mode_name}
- {formatHashTag(value?.product_list[0].code, value?.product_list[0].name)}
+ {formatHashTag(value?.product_list?.[0].code, value?.product_list?.[0].name)}
{value?.shipment_mode_name}
- {value?.product_list[0].product_colors[0].code}
+ {value?.product_list?.[0].product_colors?.[0].code}
- {value?.product_list[0].product_colors.map((itemColor, index) => {
+ {value?.product_list?.[0].product_colors.map((itemColor, index) => {
return (
(index <= 1)&&
{formatHashTag(itemColor.code, itemColor.name)}
@@ -127,7 +127,7 @@ export default memo(({value, onClickBtn}: Param) => {
)
})
}
- {value?.product_list[0].length > 2 &&
+ {value?.product_list?.[0].length > 2 &&
……
……
……
diff --git a/src/pages/salesAfter/components/kindList/index copy.tsx b/src/pages/salesAfter/components/kindList/index copy.tsx
deleted file mode 100644
index 2bcf0e2..0000000
--- a/src/pages/salesAfter/components/kindList/index copy.tsx
+++ /dev/null
@@ -1,224 +0,0 @@
-import { AFTER_ORDER_STATUS, ORDER_STATUS, REFUND_STATUS } from "@/common/enum"
-import { formatHashTag, formatPriceDiv, formatWeightDiv } from "@/common/fotmat"
-import EstimatedAmount from "@/components/estimatedAmount"
-import LabAndImg from "@/components/LabAndImg"
-import { Text, View } from "@tarojs/components"
-import { memo, useCallback, useMemo } from "react"
-import styles from './index.module.scss'
-
-type OrderParam = {
- estimate_amount: number, //预估金额
- list: any[],
- product_list: any[],
- quality_check_pass_product: any[],
- sale_mode: number,
- sale_mode_name: string,
- unit: string,
- total_colors: number,
- total_fabrics: number,
- total_number: number,
- stage: number, //订单状态
- type: 1|2, //1退货, 2退款
- refund_type: number, //退款状态
- total_sale_price: number, //销售金额
- total_should_collect_money: number, //应收金额
- total_weight_error_discount: number, //空差优惠
- the_previous_status: number, //取消订单时的订单状态
- actual_amount: number //实付金额
- quality_check_pass_colors: number, //验布后的颜色总数
- quality_check_pass_fabrics: number, //验布后的面料数量
- quality_check_pass_number: number, //验布后的总数量
-}
-
-type Param = {
- order: OrderParam,
- comfirm?: boolean //是否是确认订单页面使用
-}
-
-export default memo(({order, comfirm = false}:Param) => {
- //对应数量
- const formatCount = useCallback((item) => {
- return order?.sale_mode == 0? item.roll : Number(item.length / 100)
- }, [order])
- //对应单价
- const standardPrice = useCallback(price => {
- return formatPriceDiv(price).toLocaleString() + '/' + (order?.sale_mode == 1?'m':'kg')
- }, [order])
- //数量格式
- const numText = useMemo(() => {
- if(order) {
- if(!order?.quality_check_pass_fabrics&&!order?.quality_check_pass_number&&!order?.quality_check_pass_colors) {
- let total_number = order?.sale_mode == 0?order?.total_number:(order?.total_number/100)
- return `${order?.total_fabrics}种面料,${order?.total_colors}种颜色,共${total_number}${order?.unit}`
- } else {
- let total_number = order?.sale_mode == 0?order?.quality_check_pass_number:(order?.quality_check_pass_number/100)
- return `${order?.quality_check_pass_fabrics}种面料,${order?.quality_check_pass_colors}种颜色,共${total_number}${order?.unit}`
- }
- }
- }, [order])
-
- //获取面料数组
- const list = useMemo(() => {
- return order?.quality_check_pass_product?.length > 0?order?.quality_check_pass_product:order?.product_list
- }, [order])
-
- //售后单状态枚举
- const {
- ReturnStageApplying, // 申请中
- ReturnStageWaitCheck, // 退货中
- ReturnStageChecked, // 待验布
- ReturnStageReturned, // 已退款
- ReturnStageCancel, // 已取消
- ReturnStageQualityCheckPendingRefund, // 已验布
- ReturnStageServiceOrderPendingRefund, // 待退款
- ReturnStageRejected, // 已拒绝
- } = AFTER_ORDER_STATUS
-
- //退款状态枚举
- const {
- ShouldCollectOrderRefundTypeUnknown,
- ShouldCollectOrderRefundTypeAdvanceReceiptRefund,
- ShouldCollectOrderRefundTypeReturnForRefund,
- ShouldCollectOrderRefundTypeSalesRefund,
- } = REFUND_STATUS
-
- //金额列表枚举
- const priceList = [
- {
- id:5,
- big_value:[
- ReturnStageQualityCheckPendingRefund.value,
- ReturnStageServiceOrderPendingRefund.value,
- ReturnStageReturned.value,
- ],
- cut_value: [
- ReturnStageRejected.value,
- ReturnStageApplying.value,
- ReturnStageWaitCheck.value,
- ReturnStageChecked.value,
- ReturnStageQualityCheckPendingRefund.value,
- ReturnStageServiceOrderPendingRefund.value,
- ReturnStageReturned.value,
- ReturnStageCancel.value
- ],
- model_value: [
- ReturnStageApplying.value,
- ReturnStageWaitCheck.value,
- ReturnStageChecked.value,
- ReturnStageQualityCheckPendingRefund.value,
- ReturnStageServiceOrderPendingRefund.value,
- ReturnStageReturned.value,
- ReturnStageCancel.value
- ],
- label:'合计金额',
- field: 'total_refund_amount',
- message: '按原单价*退货重量的金额',
-
- },
- {
- id:1,
- big_value:[ReturnStageReturned.value],
- cut_value: [ReturnStageServiceOrderPendingRefund.value, ReturnStageReturned.value],
- model_value: [],
- label:'扣款金额',
- field: 'other_deduction_amount',
- message: '本次售后扣款金额'
- },
- {
- id:3,
- big_value:[ReturnStageReturned.value],
- cut_value: [ReturnStageReturned.value],
- model_value: [ReturnStageReturned.value],
- label:'退款金额',
- field: 'refund_amount',
- message: '本次售后应退款金额'
- },
- {
- id:4,
- big_value:[ReturnStageReturned.value],
- cut_value: [ReturnStageReturned.value],
- model_value: [ReturnStageReturned.value],
- label:'退款去向',
- field: 'refund_flow_name',
- message: '本次售后应退款金额'
- },
- ]
-
- //是否显示价格
- const showPrice = useCallback((priceInfo) => {
- let key = ['big_value', 'model_value', 'cut_value']
- if(priceInfo.id == 5) {
- return priceInfo[key[order?.sale_mode]].includes(order?.stage)||(order.refund_type == ShouldCollectOrderRefundTypeSalesRefund.value)
- } else {
- return priceInfo[key[order?.sale_mode]].includes(order?.stage)
- }
- }, [order])
-
- const priceConDom = useMemo(() => {
- if(!order) return
- return (
- <>
- {
- priceList.map(item => {
- return <>{showPrice(item)&&}>
- })
- }
- >
- )
- }, [order])
-
- //整理颜色
- const labAndRgbAndUrl = useCallback((item) => {
- return {lab:{...item?.lab}, rgb:{...item?.rgb}, texturl_url: item?.texturl_url}
- }, [])
-
- //单价显示判断
- const sale_price_show = useMemo(() => {
- return order?.stage != ReturnStageServiceOrderPendingRefund.value && order?.stage != ReturnStageQualityCheckPendingRefund.value
- }, [order])
-
- return (
-
-
- {order?.type == 1?'退货信息':'退款信息'}
- {
- list?.map(item => {
- return
-
- {order.sale_mode_name}
- {formatHashTag(item.code, item.name)}
- 共{item?.product_colors?.length}种
-
-
- {item?.product_colors?.map(colorItem => {
- return
-
-
-
-
-
- {colorItem.code + ' ' + colorItem.name}
-
- {sale_price_show&&¥{standardPrice(colorItem.sale_price)}}
- {(order?.stage == ReturnStageReturned.value)&&总重{formatWeightDiv(colorItem.estimate_weight)}kg}
-
-
-
- ×{formatCount(colorItem)}{order.unit}
- ¥{formatPriceDiv(colorItem.estimate_amount).toLocaleString()}
-
-
-
- })}
-
-
- })
- }
- 合计{numText}
-
- {priceConDom}
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/kindList/index.module.scss b/src/pages/salesAfter/components/kindList/index.module.scss
index 40fbb04..0b99988 100644
--- a/src/pages/salesAfter/components/kindList/index.module.scss
+++ b/src/pages/salesAfter/components/kindList/index.module.scss
@@ -127,3 +127,24 @@
}
}
}
+.inspection{
+ background: linear-gradient(38deg,#007aff, #4fa6ff 100%, #68b4ff 100%);
+ border-radius: 20px;
+ color: #fff;
+ height: 176px;
+ padding: 30px ;
+ box-sizing: border-box;
+ font-size: 28px;
+ .inspection_title{
+ font-weight: 700;
+ }
+ .inspection_con{
+ margin-top: 20px;
+ display: flex;
+ align-items: center;
+ .miconfont{
+ font-size: 50px;
+ margin-right: 10px;
+ }
+ }
+}
diff --git a/src/pages/salesAfter/components/kindList/index.tsx b/src/pages/salesAfter/components/kindList/index.tsx
index 6804558..9f9d2de 100644
--- a/src/pages/salesAfter/components/kindList/index.tsx
+++ b/src/pages/salesAfter/components/kindList/index.tsx
@@ -4,6 +4,7 @@ import EstimatedAmount from "@/components/estimatedAmount"
import LabAndImg from "@/components/LabAndImg"
import { Text, View } from "@tarojs/components"
import { memo, useCallback, useMemo } from "react"
+import classnames from "classnames";
import styles from './index.module.scss'
type OrderParam = {
@@ -146,7 +147,7 @@ export default memo(({order, comfirm = false}:Param) => {
return (
-
+ {list?.length > 0 &&
{order?.type == 1?'退货信息':'退款信息'}
{
list?.map(item => {
@@ -186,6 +187,16 @@ export default memo(({order, comfirm = false}:Param) => {
{priceConDom}
+ }
+ {
+ (list?.length <=0 && order?.is_quality_check) &&
+ 质检情况
+
+
+ 没有质检通过的商品,无法退款
+
+
+ }
)
})
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/components/order/index.module.scss b/src/pages/salesAfter/salesAfterList/components/order/index.module.scss
index 0116a3c..be8d9a6 100644
--- a/src/pages/salesAfter/salesAfterList/components/order/index.module.scss
+++ b/src/pages/salesAfter/salesAfterList/components/order/index.module.scss
@@ -165,4 +165,20 @@
}
}
}
+ .inspection{
+ height: 82px;
+ background-color: #F6F6F6;
+ border-radius: 10px;
+ padding: 0 20px;
+ box-sizing: border-box;
+ color: #007AFF;
+ display: flex;
+ align-items: center;
+ margin: 20px 0;
+ font-size: 28px;
+ .miconfont{
+ font-size: 50px;
+ margin-right: 20px;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/components/order/index.tsx b/src/pages/salesAfter/salesAfterList/components/order/index.tsx
index 8407146..ec9d909 100644
--- a/src/pages/salesAfter/salesAfterList/components/order/index.tsx
+++ b/src/pages/salesAfter/salesAfterList/components/order/index.tsx
@@ -33,6 +33,7 @@ type Param = {
is_quality_check: true|false,
accessory_url: string[], //物流图片
take_goods_remark: string, //物流备注
+ quality_check_pass_product: any[]
},
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
@@ -78,6 +79,11 @@ export default memo(({value, onClickBtn}: Param) => {
return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value].includes(value?.stage)?'待退款':value?.stage_name
}, [value])
+ //获取面料数组
+ const list = useMemo(() => {
+ return value?.is_quality_check?value?.quality_check_pass_product:value?.product_list
+ }, [value])
+
return (
@@ -96,19 +102,19 @@ export default memo(({value, onClickBtn}: Param) => {
- goLink('/pages/salesAfter/index', {id: value?.id})}>
+ {list?.length > 0 && goLink('/pages/salesAfter/index', {id: value?.id})}>
{value?.sale_mode_name}
- {formatHashTag(value?.product_list?.[0].code, value?.product_list?.[0].name)}
+ {formatHashTag(list?.[0].code, list?.[0].name)}
{stage_name}
- {value?.product_list?.[0].product_colors?.[0].code}
+ {list?.[0].product_colors?.[0].code}
- {value?.product_list?.[0].product_colors?.map((itemColor, index) => {
+ {list?.[0].product_colors?.map((itemColor, index) => {
return (
(index <= 1)&&
{formatHashTag(itemColor.code, itemColor.name)}
@@ -118,7 +124,7 @@ export default memo(({value, onClickBtn}: Param) => {
)
})
}
- {value?.product_list?.[0].product_colors.length > 2 &&
+ {list?.[0].product_colors?.length > 2 &&
……
……
……
@@ -133,7 +139,11 @@ export default memo(({value, onClickBtn}: Param) => {
{value?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'}
订单号:{value?.order_no}
-
+ }
+ {(list?.length <= 0 && value?.is_quality_check) &&
+
+ 没有质检通过的商品,无法退款
+ }
diff --git a/src/pages/user/index.module.scss b/src/pages/user/index.module.scss
index 887386e..e196106 100644
--- a/src/pages/user/index.module.scss
+++ b/src/pages/user/index.module.scss
@@ -210,7 +210,7 @@
.assets-content {
display: grid;
- grid-template-columns: repeat(3, 1fr);
+ grid-template-columns: repeat(2, 1fr);
}
.assets-content>view,
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
index 390f642..7d94a3e 100644
--- a/src/pages/user/index.tsx
+++ b/src/pages/user/index.tsx
@@ -292,7 +292,7 @@ const Assets = (props: any) => {
¥
- {formatPriceDiv(props.data.data.wallet_money || 0)}
+ {formatPriceDiv(props.data.data.wallet_money || 0, 100, true)}
{/* {props.wallet_money || 0} */}
预存款
@@ -307,7 +307,7 @@ const Assets = (props: any) => {
props.checkShow()}>
¥
- {formatPriceDiv(props.data.data.credit_line || 0)}
+ {formatPriceDiv(props.data.data.credit_line || 0, 100, true)}
{/* .-00 */}
授信额度