diff --git a/config/index.js b/config/index.js
index bf9f0ac..a70400a 100644
--- a/config/index.js
+++ b/config/index.js
@@ -5,11 +5,11 @@ const versions =
encoding: 'utf8',
}) != 'HEAD\n'
? childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
- encoding: 'utf8',
- })
+ encoding: 'utf8',
+ })
: childProcess.execSync('git describe --tags --abbrev=0', {
- encoding: 'utf8',
- })
+ encoding: 'utf8',
+ })
const CURRENT_GITHASH = childProcess.execSync('git rev-parse --short HEAD', {
encoding: 'utf8',
})
@@ -18,19 +18,6 @@ const CURRENT_VERSION = `Version: ${JSON.stringify(process.env.CODE_BRANCH || ve
'',
)
-const CIPluginOpt = {
- // 微信小程序
- weapp: {
- appid: 'wx64fe67f111d52457',
- privateKeyPath: 'key/private.wx64fe67f111d52457.key',
- // devToolsInstallPath: 'D:/weixin/微信web开发者工具',
- },
- // 版本号
- version: versions,
- // 版本发布描述
- desc: versions,
-}
-
const config = {
projectName: 'EShop',
date: '2022-4-6',
@@ -42,7 +29,6 @@ const config = {
},
sourceRoot: 'src',
outputRoot: 'dist',
- plugins: [['@tarojs/plugin-mini-ci', CIPluginOpt]],
defineConstants: {
CURRENT_VERSION: JSON.stringify(CURRENT_VERSION),
CURRENT_GITHASH: JSON.stringify(CURRENT_GITHASH),
diff --git a/package.json b/package.json
index f42e7d4..1503ff7 100644
--- a/package.json
+++ b/package.json
@@ -28,10 +28,7 @@
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"build:weapp:pre": "cross-env NODE_ENV=pre taro build --type weapp",
- "dev:weapp:pre": "cross-env NODE_ENV=pre npm run build:weapp -- --watch",
- "buildo:weapp:open": "taro build --type weapp --open",
- "build:weapp:upload": "taro build --type weapp --upload",
- "build:weapp:preview": "taro build --type weapp --preview"
+ "dev:weapp:pre": "cross-env NODE_ENV=pre npm run build:weapp -- --watch"
},
"browserslist": [
"last 3 versions",
@@ -78,4 +75,4 @@
"stylelint": "9.3.0",
"typescript": "^4.1.0"
}
-}
+}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index e796931..bb243d2 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,8 +1,8 @@
{
"miniprogramRoot": "dist/",
- "projectname": "EShop",
+ "projectname": "Mall-lymarket",
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
- "appid": "wx68d92d7cbf0b6963",
+ "appid": "wxa41b2eda1c6b557a",
"setting": {
"urlCheck": true,
"es6": false,
diff --git a/src/app.config.ts b/src/app.config.ts
index eee2dca..c3a8af3 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -1,6 +1,7 @@
export default {
pages: [
'pages/index/index',
+ 'pages/order/index',
'pages/user/index',
],
window: {
@@ -15,14 +16,20 @@ export default {
{
pagePath: 'pages/index/index',
text: '首页',
- iconPath: './styles/tabbar/home.png',
- selectedIconPath: './styles/tabbar/home_selected.png',
+ iconPath: './styles/tabbar/list.png',
+ selectedIconPath: './styles/tabbar/list_on.png',
+ },
+ {
+ pagePath: 'pages/order/index',
+ text: '订单',
+ iconPath: './styles/tabbar/order.png',
+ selectedIconPath: './styles/tabbar/order_on.png',
},
{
pagePath: 'pages/user/index',
text: '我的',
iconPath: './styles/tabbar/my.png',
- selectedIconPath: './styles/tabbar/my_selected.png',
+ selectedIconPath: './styles/tabbar/my_on.png',
}
],
'color': '#707070',
@@ -31,156 +38,7 @@ export default {
'borderStyle': 'white'
},
subPackages: [
- {
- root: "pages/search",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/classList",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/details",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/searchList",
- pages: [
- "searchList",
- "hightSearchList",
- "search"
- ]
- },
- {
- root: "pages/userEdit",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/addressManager",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/addressAdd",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/company",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/weightList",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/weightListAdd",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/order",
- pages: [
- "index",
- "comfirm",
- "orderList/index"
- ]
- },
- {
- root: "pages/editOrder",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/subjectList",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/creditLine",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/creditUsed",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/depositBeforehandDetail",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/depositBeforehand",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/depositList",
- pages: [
- "index"
- ]
- },
- {
- root: "pages/salesAfter",
- pages: [
- "index",
- "salesAfterList/index"
- ]
- },
- {
- root: "pages/certification",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/applyAfterSales",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/collection",
- pages: [
- "index",
- "collectionClass/index"
- ]
- },
- {
- root: "pages/sampleComparison",
- pages: [
- "index",
- ]
- },
- {
- root: "pages/bindSalesman",
- pages: [
- "index",
- ]
- },
+
]
}
diff --git a/src/pages/addressAdd/index.config.ts b/src/pages/addressAdd/index.config.ts
deleted file mode 100644
index 8e50c58..0000000
--- a/src/pages/addressAdd/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/addressAdd/index.scss b/src/pages/addressAdd/index.scss
deleted file mode 100644
index 8443556..0000000
--- a/src/pages/addressAdd/index.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-.add-address{
- display: flex;
- flex-direction: column;
- .add-address-default{
- display: flex;align-items: center;justify-content: space-between;
- margin: 70px 30px 0;
- font-size: 26px;
- font-weight: 700;
- color: #000000;
- }
- .add-address-default-active{
- width: 50px;
- height: 50px;
- background: #007aff;
- border-radius: 50%;
- display: flex;align-items: center;
- justify-content: center;
- font-size: 45px;
- color: white;
- box-sizing: border-box;
- }
- .add-address-default-active text{
- font-size: 35px;
- }
- .add-address-default-noactive{
- width: 50px;
- height: 50px;
- border: 2px solid #707070;
- border-radius: 50%;
- box-sizing: border-box;
- display: flex;align-items: center;justify-content: center;
- }
-
- .add-address-save{
- width: 668px;
- height: 82px;
- background: #68b4ff;
- border-radius: 40px;
- font-size: 32px;
- font-weight: 400;
- color: #ffffff;
- display: flex;align-items: center;justify-content: center;
- // margin: 620px auto 0;
- position: fixed;left: 50%;bottom: 50px;
- transform: translateX(-50%);
- }
-}
\ No newline at end of file
diff --git a/src/pages/addressAdd/index.tsx b/src/pages/addressAdd/index.tsx
deleted file mode 100644
index 59b1de6..0000000
--- a/src/pages/addressAdd/index.tsx
+++ /dev/null
@@ -1,144 +0,0 @@
-
-import { alert, retrieval } from "@/common/common"
-import Address from "@/components/address"
-import FromList from "@/components/FromList"
-import { Button, Input, Text, Textarea, View } from "@tarojs/components"
-import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
-import { useEffect, useState } from "react"
-import "./index.scss"
-import {addressAddApi, addressDetailApi,addressEditApi} from "@/api/addressManager"
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- const [showSiteModal, setShowSiteModal] = useState(false);
- const {type,id} = useRouter().params;
- useEffect(()=>{
- if(type=="add"){
- setNavigationBarTitle({title:"新增收货地址"})
- }else{
- initalFormData();
- setNavigationBarTitle({title:"编辑收货地址"})
- }
- },[])
- // 获取编辑地址信息
- const {fetchData: getFromData} = addressDetailApi()
- const initalFormData = async ()=>{
- const detail = await getFromData({id});
- const { province_id,province_name,city_id,city_name,district_id,district_name } = detail.data;
- const siteArray = [{id: province_id, name: province_name}];
- city_id&&siteArray.push({id: city_id, name: city_name});
- district_id&&siteArray.push({id: district_id, name: district_name});
- setFormData({
- name: detail.data.name,
- phone: detail.data.phone,
- site: siteArray.map(item=>item.name).join(" "),
- siteArray: siteArray as any,
- district_id: detail.data.district_id,
- address_detail: detail.data.address_detail,
- is_default: detail.data.is_default,
- id: detail.data.id,
- })
- }
-
- const {fetchData} = addressAddApi()
- const {fetchData: editFetch} = addressEditApi()
- // 保存
- const [formData, setFormData] = useState({
- name: "",
- phone:"",
- site:"",
- siteArray: [],
- district_id:"",
- address_detail: "",
- is_default: false,
- id: 0
- })
- const rules = {
- name: [{
- message: "请输入正确收货人姓名",
- // validator: (value:any, rule:any)=>{ // 自定义验证,返回true表示匹配到了(错误)
- // return value.length>5;
- // }
- }],
- phone: [{
- message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
- }],
- district_id: [{
- message: "请选择地址"
- }],
- address_detail: [{
- message: "请输入详细地址"
- }],
- }
- const handleSave = ()=>{
- retrieval(formData, rules).then(async ()=>{
- const result = type=="add"?await fetchData({
- name: formData.name,
- phone:formData.phone,
- district_id:formData.district_id,
- address_detail: formData.address_detail,
- is_default: formData.is_default
- }):await editFetch({
- name: formData.name,
- phone:formData.phone,
- district_id:formData.district_id,
- address_detail: formData.address_detail,
- is_default: formData.is_default,
- id: formData.id
- });
- if(result.success){
- Taro.eventCenter.trigger("addressList:refresh");
- Taro.navigateBack();
- alert.success("保存成功");
- }else{
- alert.error(result.msg);
- }
- }).catch((message)=>{
- alert.none(message)
- })
- }
- // 监听表单完善
- const [hozon, setHozon] = useState(false);
- useEffect(()=>{
- if(retrieval){
- retrieval(formData).then(()=>setHozon(true)).catch(()=>setHozon(false))
- }
- },[formData])
- // 设置选择地址
- const handleSetSite = (ev:any)=>{
- if(ev.length > 0){
- setFormData({
- ...formData,
- siteArray: ev,
- site: ev.map(item=>item.name+" "),
- district_id: ev[ev.length-1]?.id
- })
- }else{
- alert.error("请选择地址");
- }
- }
-
- return (
-
- setFormData({...formData,name:ev.detail.value})} value={formData["name"]} label="联系人" placeholder="请输入收货人姓名"/>
- setFormData({...formData,phone:ev.detail.value})} value={formData["phone"]} label="联系方式" placeholder="请输入联系方式"/>
- setShowSiteModal(true)} label="收货地址" type="select" placeholder="请选择/省/市/区"/>
- setFormData({...formData,address_detail:ev.detail.value})} value={formData["address_detail"]} label="详细地址" type="textarea" placeholder="请输入详细地址(街道、门牌号等)"/>
-
- 设为默认地址
- setFormData({...formData ,is_default: !formData.is_default})}>
- {
- formData.is_default?
- :
- }
-
-
-
-
- setShowSiteModal(false)} show={showSiteModal}/>
-
- )
-}
diff --git a/src/pages/addressManager/index.config.ts b/src/pages/addressManager/index.config.ts
deleted file mode 100644
index 9d26929..0000000
--- a/src/pages/addressManager/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '地址管理',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/addressManager/index.scss b/src/pages/addressManager/index.scss
deleted file mode 100644
index 61d7ccd..0000000
--- a/src/pages/addressManager/index.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.address-manager{
- height: 100vh;
-}
\ No newline at end of file
diff --git a/src/pages/addressManager/index.tsx b/src/pages/addressManager/index.tsx
deleted file mode 100644
index 427553e..0000000
--- a/src/pages/addressManager/index.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-
-import AddressList from "@/components/AddressList"
-import useLogin from "@/use/useLogin"
-import { Button, ScrollView, Text, View } from "@tarojs/components"
-import { stopPullDownRefresh, usePullDownRefresh } from "@tarojs/taro"
-import { useState } from "react"
-import "./index.scss"
-
-export default ()=>{
- useLogin()
- return (
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/cutKindList/index.module.scss b/src/pages/applyAfterSales/components/cutKindList/index.module.scss
deleted file mode 100644
index bc49015..0000000
--- a/src/pages/applyAfterSales/components/cutKindList/index.module.scss
+++ /dev/null
@@ -1,64 +0,0 @@
-.apply_after_sales_list{
- padding: 0 20px;
- .apply_after_sales_item{
- margin-bottom: 50px;
- .apply_after_sales_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- }
- }
- .color_list {
- .color_item{
- display: flex;
- align-items: center;
- margin: 30px 0;
- }
- .image{
- width: 70px;
- height: 70px;
- image{
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
- .name_and_number{
- padding-left: 30px;
- flex:1;
- text{
- &:nth-child(1) {
- font-weight: 700;
- font-size: $font_size;
- }
- &:nth-child(2) {
- color: $color_font_two;
- font-size: $font_size;
- margin-left: 20px;
- }
- }
- }
- .btn_count{
- width: 216px;
- height: 64px;
- background-color: #ECF5FF;
- border-radius: 40px 0px 16px 0px;
- padding: 0 20px;
- display: flex;
- align-items: center;
- }
- }
- }
-
-}
diff --git a/src/pages/applyAfterSales/components/cutKindList/index.tsx b/src/pages/applyAfterSales/components/cutKindList/index.tsx
deleted file mode 100644
index aea397b..0000000
--- a/src/pages/applyAfterSales/components/cutKindList/index.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { formatHashTag, formatImgUrl } from "@/common/fotmat";
-import Counter from "@/components/counter";
-import MCheckbox from "@/components/checkbox";
-import { Image, Text, View } from "@tarojs/components";
-import { FC, memo, useCallback } from "react";
-import styles from './index.module.scss'
-
-type OrderParam = {
- list?: any[],
- sale_mode?: number,
- sale_mode_name?: string,
- unit?: string,
- total_colors?: number,
- total_fabrics?: number,
- total_number?: number,
- status?: number, //订单状态
- av_return_product?: any[] //申请售后列表
-}
-
-type Param = {
- order: OrderParam,
- onSelectChange?: (val: {color_id:number, length: number, status: true|false, sale_order_detail_id:number}) => void
-}
-
-const kindeList:FC = memo(({order, onSelectChange}) => {
-
- //checkbox选中回调
- const selectCallBack = (colorItem) => {
- onSelectChange?.({color_id:colorItem.product_color_id, length:colorItem.length, sale_order_detail_id:colorItem.sale_order_detail_id, status: true})
- }
-
- //checkbox关闭回调
- const colseCallBack = (colorItem) => {
- onSelectChange?.({color_id:colorItem.product_color_id, length:colorItem.length, status: false, sale_order_detail_id:colorItem.sale_order_detail_id,})
- }
-
- return (
-
- {order?.av_return_product?.map(item =>
-
- {order.sale_mode_name}
- {formatHashTag(item.product_code, item.product_name)}
-
-
- {item?.av_product_color?.map(colorItem =>
-
- {colorItem.product_color_code + ' ' + colorItem.product_color_name}x {colorItem.length/100} m
- selectCallBack(colorItem)} onClose={() => colseCallBack(colorItem)}/>
- )}
-
- )}
-
- )
-})
-
-export default kindeList
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/kindList/index.module.scss b/src/pages/applyAfterSales/components/kindList/index.module.scss
deleted file mode 100644
index bc49015..0000000
--- a/src/pages/applyAfterSales/components/kindList/index.module.scss
+++ /dev/null
@@ -1,64 +0,0 @@
-.apply_after_sales_list{
- padding: 0 20px;
- .apply_after_sales_item{
- margin-bottom: 50px;
- .apply_after_sales_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- }
- }
- .color_list {
- .color_item{
- display: flex;
- align-items: center;
- margin: 30px 0;
- }
- .image{
- width: 70px;
- height: 70px;
- image{
- width: 100%;
- height: 100%;
- border-radius: 50%;
- }
- }
- .name_and_number{
- padding-left: 30px;
- flex:1;
- text{
- &:nth-child(1) {
- font-weight: 700;
- font-size: $font_size;
- }
- &:nth-child(2) {
- color: $color_font_two;
- font-size: $font_size;
- margin-left: 20px;
- }
- }
- }
- .btn_count{
- width: 216px;
- height: 64px;
- background-color: #ECF5FF;
- border-radius: 40px 0px 16px 0px;
- padding: 0 20px;
- display: flex;
- align-items: center;
- }
- }
- }
-
-}
diff --git a/src/pages/applyAfterSales/components/kindList/index.tsx b/src/pages/applyAfterSales/components/kindList/index.tsx
deleted file mode 100644
index c5cecd2..0000000
--- a/src/pages/applyAfterSales/components/kindList/index.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import { formatHashTag, formatImgUrl } from "@/common/fotmat";
-import Counter from "@/components/counter";
-import MCheckbox from "@/components/checkbox";
-import { Image, Text, View } from "@tarojs/components";
-import { FC, memo, useCallback } from "react";
-import styles from './index.module.scss'
-
-type OrderParam = {
- list?: any[],
- sale_mode?: number,
- sale_mode_name?: string,
- unit?: string,
- total_colors?: number,
- total_fabrics?: number,
- total_number?: number,
- status?: number, //订单状态
- av_return_product?: any[] //申请售后列表
-}
-
-type Param = {
- order: OrderParam,
- onNumChange?: (val:any) => void
-}
-
-const kindeList:FC = memo(({order, onNumChange}) => {
-
- //计步器返回值
- const getCounterChange = useCallback((colorItem) => {
- return (number) => {
- onNumChange?.({number, color_id: colorItem.product_color_id, sale_order_detail_id:colorItem.sale_order_detail_id})
- }
- }, [order])
-
- return (
-
- {order?.av_return_product?.map(item =>
-
- {order.sale_mode_name}
- {formatHashTag(item.product_code, item.product_name)}
-
-
- {item?.av_product_color?.map(colorItem =>
-
- {colorItem.product_color_code + ' ' + colorItem.product_color_name}x {colorItem.roll}
-
-
-
- )}
-
- )}
-
- )
-})
-
-export default kindeList
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/otherReason/index.module.scss b/src/pages/applyAfterSales/components/otherReason/index.module.scss
deleted file mode 100644
index e2d1b1b..0000000
--- a/src/pages/applyAfterSales/components/otherReason/index.module.scss
+++ /dev/null
@@ -1,36 +0,0 @@
-.other_desc{
- padding: 0 20px;
- box-sizing: border-box;
- .title{
- font-size: $font_size;
- font-weight: 700;
- }
- .textarea{
- position: relative;
- height: 165.4px;
- .descDataNum{
- position: absolute;
- right: 10px;
- bottom: 10px;
- font-size: 22px;
- color: #ABABAB;
- }
- }
- .textarea_con, .textarea_con_pretend{
- background-color: #f3f3f3;
- border: 2px solid #e6e6e6;
- border-radius: 10px;
- width: 100%;
- font-size: 25px;
- height: 165.4px;
- padding: 20px 20px 30px 20px;
- box-sizing: border-box;
- margin-top: 20px;
- }
- .textarea_con_pretend{
- color: $color_font_two;
- }
- .textarea_con_pretend_ed{
- color: #000;
- }
-}
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/otherReason/index.tsx b/src/pages/applyAfterSales/components/otherReason/index.tsx
deleted file mode 100644
index 5059f75..0000000
--- a/src/pages/applyAfterSales/components/otherReason/index.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import {Textarea, View } from "@tarojs/components";
-import { memo, useMemo, useState } from "react";
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-//其他说明
-type Param = {
- onChange: (val: string) => void
-}
-export default memo(({onChange}:Param) => {
- const [descData, setDescData] = useState({
- number: 0,
- value: '',
- count: 200,
- show: false
- })
- const getDesc = (e) => {
- let value = e.detail.value
- let res = value
- if(value.length > descData.count) {
- res = value.slice(0, descData.count)
- }
- setDescData({...descData, number:res.length, value: res})
- onChange?.(res)
- }
-
- const toggleShowRealTextarea = (show) => {
- setDescData({...descData, show:show})
- }
- return (
-
- 其他说明
-
- {descData.show&&||
- toggleShowRealTextarea(true)}>{descData.value||'一般情况下选填,当退货说明=“其它问题”时,必填'}
- }
- {descData.number +'/'+ descData.count}
-
-
- )
-})
diff --git a/src/pages/applyAfterSales/components/reasonPopup/index copy 2.tsx b/src/pages/applyAfterSales/components/reasonPopup/index copy 2.tsx
deleted file mode 100644
index 1cecb2a..0000000
--- a/src/pages/applyAfterSales/components/reasonPopup/index copy 2.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import Popup from "@/components/popup";
-import { ScrollView, Text, View } from "@tarojs/components";
-import { memo, useEffect, useMemo, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-//原因选择
-type Param = {id:number, name:string, typle?:number}
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- title?: string, //标题
- list?: {id:number, name:string, typle?:number, children?:Param[]}[], //数据列表
- onSelect?: (val: object) => void, //选择
- defaultValue?: number, //默认选中
-}
-export default memo(({show = false, onClose, title = '', list = [], onSelect, defaultValue}: ReasonInfoParam) => {
- const [hasNextData, setHasNextData] = useState(true) //是否有下一级数据
- const [selectData, setSelectData] = useState()
- const [headerList, setHeaderList] = useState<{id: number, name: string}[]>([])
- const onSelectData = (item) => {
- setHeaderList((e) => [...e, {id:item.id, name:item.name}])
- }
- useEffect(() => {
- console.log('headerList::', headerList)
- }, [headerList])
- return (
-
-
-
- {headerList.map(item => {
- return {item.name}
- })}
- {hasNextData&&请选择}
-
-
-
- {list.map(item => onSelectData(item)} key={item.id} className={classnames(styles.reason_item, item.id == defaultValue&&styles.select_item)}>{item.name} )}
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/reasonPopup/index copy.tsx b/src/pages/applyAfterSales/components/reasonPopup/index copy.tsx
deleted file mode 100644
index 0ed990c..0000000
--- a/src/pages/applyAfterSales/components/reasonPopup/index copy.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import Popup from "@/components/popup";
-import { ScrollView, Text, View } from "@tarojs/components";
-import { memo, useMemo } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-//原因选择
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- title?: string, //标题
- list?: {id:number, name:string, typle?:number}[], //数据列表
- onSelect?: (val: object) => void, //选择
- defaultValue?: number, //默认选中
-}
-export default memo(({show = false, onClose, title = '', list= [], onSelect, defaultValue}: ReasonInfoParam) => {
-
- return (
-
-
- {title}
-
-
- {list.map(item => onSelect?.(item)} key={item.id} className={classnames(styles.reason_item, item.id == defaultValue&&styles.select_item)}>{item.name} )}
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/reasonPopup/index.module.scss b/src/pages/applyAfterSales/components/reasonPopup/index.module.scss
deleted file mode 100644
index a988394..0000000
--- a/src/pages/applyAfterSales/components/reasonPopup/index.module.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-.reason_return_con{
- height: 50vh;
- .reason_title{
- padding: 10px 20px 0 20px;
- border-bottom: 1PX solid #F3F3F3;
- box-sizing: border-box;
- text{
- margin-right: 15px;
- font-size: 27px;
- display: inline-block;
- }
- .selectName{
- font-size: 26px;
- padding: 20px 10px;
- font-weight: 400;
- color: #ABABAB;
- }
- .tips{
- color: #ABABAB;
- border-bottom: 0;
- padding: 20px 10px;
- }
- .select_bottom {
- border-bottom: 3px solid #007AFF;
- color: #000;
- }
-
- }
- .reason_scroll{
- height: calc(100% - 70px);
- .reason_list{
- font-size: 26px;
- padding: 30px 20px 0 20px;
- color: #707070;
- .reason_item{
- margin-bottom: 36px;
- }
- .select_item {
- color: #007AFF;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/components/reasonPopup/index.tsx b/src/pages/applyAfterSales/components/reasonPopup/index.tsx
deleted file mode 100644
index ec631c4..0000000
--- a/src/pages/applyAfterSales/components/reasonPopup/index.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import Popup from "@/components/popup";
-import { ScrollView, Text, View } from "@tarojs/components";
-import { Children, memo, useEffect, useMemo, useRef, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import { ReturnExplainApi, ReturnReasonApi } from "@/api/salesAfterOrder";
-
-//原因选择
-type Param = {id:number, name:string, typle?:number}
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- title?: string, //标题
- list?: {id:number, name:string, typle?:number}[], //数据列表
- onSelect?: (val: object) => void, //选择
- onHeaderSelect?: (val: object) => void, //点击头部标题
- defaultValue?: number, //默认选中
- dataLength?: number, //可显示的数据列数
-}
-export default memo(({show = false, onClose, title = '', list = [], onSelect, onHeaderSelect, defaultValue, dataLength = 1}: ReasonInfoParam) => {
-
- const [initList, setInitList] = useState([])
-
- useEffect(() => {
- setInitList(list)
- }, [list])
- const [selectIndex, setSelectIndex] = useState(1)
- const [headerList, setHeaderList] = useState<{id: number, name: string}[]>([])
- const onSelectData = (item) => {
- if(selectIndex <= dataLength) {
- headerList[selectIndex - 1] = {id:item.id, name:item.name}
- onSelect?.({data:headerList, index:selectIndex})
- setSelectIndex(selectIndex == dataLength?dataLength:selectIndex + 1)
- setHeaderList((e) => [...e])
- if(selectIndex == dataLength) onClose?.()
- }
- }
-
- const onHeaderClick = ({val, index}) => {
- let list = headerList.slice(0, index + 1)
- setSelectIndex(index + 1)
- setHeaderList(list)
- onHeaderSelect?.({data:val, index: index + 1})
- }
-
- return (
-
-
-
- {headerList.map((item, index) => {
- return onHeaderClick({val:item, index})} className={classnames(styles.selectName, (headerList.length == index + 1)&&styles.select_bottom)}>{item.name}
- })}
- {dataLength > headerList.length&&请选择}
-
-
-
- {initList.map(item => onSelectData(item)} key={item.id} className={classnames(styles.reason_item, item.id == defaultValue&&styles.select_item)}>{item.name} )}
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/applyAfterSales/index.config.ts b/src/pages/applyAfterSales/index.config.ts
deleted file mode 100644
index a7a7e32..0000000
--- a/src/pages/applyAfterSales/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '申请售后',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/applyAfterSales/index.module.scss b/src/pages/applyAfterSales/index.module.scss
deleted file mode 100644
index b8d2820..0000000
--- a/src/pages/applyAfterSales/index.module.scss
+++ /dev/null
@@ -1,110 +0,0 @@
-
-.apply_after_sales_main{
- .apply_after_sales_head{
- font-size: 30px;
- text-align: center;
- padding: 20px 0;
- font-weight: 700;
- }
- .kind_number{
- width: 100%;
- padding: 20px;
- box-sizing: border-box;
- border-bottom: 1PX solid #f3f3f3;
- text{
- background-color: #F6F6F6;
- border-radius: 10px;
- font-size: $font_size_medium;
- padding: 5px 0;
- text-align: center;
- width: 100%;
- display: block;
- color: $color_font_three;
- }
- }
- .apply_after_sales_con{
- .scroll{
- height: calc(100% - 170px);
- }
- .scroll_con{
- padding: 20px 0 150px 0;
- }
- .returnSaleInput{
- margin: 0 20px;
- padding-top: 30px;
- border-top: 1px solid #F6F6F6;
- .returnSaleInput_item{
- display: flex;
- align-items: center;
- padding-bottom: 30px;
- flex-wrap: wrap;
- .title{
- font-size: $font_size;
- font-weight: 700;
- width: 119px;
- }
- .select{
- flex:1;
- height: 60px;
- border: 2px solid #e6e6e6;
- border-radius: 10px;
- margin-left: 20px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 20px;
- font-size: 26px;
- color: $color_font_two;
- .miconfont{
- font-size: 30px;
- }
- .selected{
- color: #000;
- }
- }
- .upload_image{
- flex:1;
- }
- }
- }
-
- }
-
-
- .btns_con{
- width: 100%;
- position: fixed;
- bottom:0;
- padding: 0 20px;
- box-sizing: border-box;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .btns_two{
- display: flex;
- height: 82px;
- // border: 1PX solid #007aff;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-bottom: 20px;
- .rest_btn{
- flex:1;
- border: 1PX solid #007aff;
- border-radius: 40px 0 0 40px;
- text-align: center;
- line-height: 82px;
- color: $color_main;
- background-color: #fff;
-
- }
- .verify_btn{
- flex:1;
- border-radius: 0 40px 40px 0;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
- }
-}
-
diff --git a/src/pages/applyAfterSales/index.tsx b/src/pages/applyAfterSales/index.tsx
deleted file mode 100644
index bd40d95..0000000
--- a/src/pages/applyAfterSales/index.tsx
+++ /dev/null
@@ -1,260 +0,0 @@
-import { Image, ScrollView, Text, View } from "@tarojs/components";
-import { FC, memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import ReasonPopup from "./components/reasonPopup";
-import Taro, { useDidShow, useRouter } from "@tarojs/taro";
-import { GetSaleOrderDetailApi } from "@/api/order";
-import KindList from "./components/kindList"
-import CutKindList from "./components/cutkindList"
-import { ReturnApplyOrderApi, ReturnExplainApi, ReturnGoodsStatusApi, ReturnReasonApi } from "@/api/salesAfterOrder";
-import { alert, goLink } from "@/common/common";
-import UploadImage from "@/components/uploadImage"
-import TextareaEnhance from "@/components/textareaEnhance";
-import useLogin from "@/use/useLogin";
-import { throttle } from "@/common/util";
-
-enum returnStatus {
- return_reason = 1, //原因
- goods_status = 2, //状况
- return_explain = 3, //说明
-
-}
-export default () => {
- useLogin()
- useDidShow(() => {
- getSaleOrderPreView()
- })
-
- const router = useRouter()
- const orderId = useRef(Number(router.params.id))
-
- //需要提交的数据
- const [submitData, setSubmitData] = useState({
- fabric_piece_accessory_url: [],
- goods_status: '', //货物状况
- reason_describe: '', //其他说明
- return_explain: '', //退货说明
- return_reason: '', //退货原因
- roll: 0,
- roll_list: [],
- sale_order_id: orderId.current
- })
-
- //获取订单数据
- const [orderDetail, setOrderDetail] = useState() //获取到的原始数据
- const {fetchData: getOrderFetchData} = GetSaleOrderDetailApi()
- const getSaleOrderPreView = async () => {
- if(orderId.current) {
- let res = await getOrderFetchData({id: orderId.current})
- setOrderDetail(res.data)
- }
- }
-
- //监听获取到的数据
- useEffect(() => {
- if(orderDetail) {
- formatData()
- }
- }, [orderDetail])
-
- //格式化数据格式
- const [formatDetailOrder, setFormatDetailOrder] = useState() //格式化后的数据
- const formatData = () => {
- setFormatDetailOrder({
- ...orderDetail,
- unit: orderDetail.sale_mode == 0?'条':'m', //单位
- list: orderDetail.product_list,
-
- })
- }
-
- //数据总量
- const dataCount = useMemo(() => {
- if(formatDetailOrder) {
- let total_number = formatDetailOrder.sale_mode == 0?formatDetailOrder.av_total_number + '条':(formatDetailOrder.av_total_number/100) + '米'
- return `${formatDetailOrder.av_total_fabrics}种面料,${formatDetailOrder.av_total_colors}种颜色,共${total_number}`
- }
- }, [formatDetailOrder])
-
-
-
- //面料数据
- let roll_list = useRef({})
-
- //大货时获取计步器数据
- const getNumChange = useCallback((val) => {
- if(parseInt(val.number) > 0) {
- roll_list.current[val.color_id] = {product_roll: val.number, sale_order_detail_id: val.sale_order_detail_id}
- } else {
- delete roll_list.current[val.color_id]
- }
- setSubmitData((e) => ({...e, roll_list:Object.values(roll_list.current)}))
- }, [])
-
- //散剪和剪板
- const getSelectChange = useCallback((val) => {
- if(val.status) {
- roll_list.current[val.color_id] = {product_roll: val.length, sale_order_detail_id: val.sale_order_detail_id}
- } else {
- delete roll_list.current[val.color_id]
- }
- setSubmitData((e) => ({...e, roll_list:Object.values(roll_list.current)}))
- }, [])
-
- //获取图片列表
- const getImageList = useCallback((list) => {
- setSubmitData((e) => ({...e, fabric_piece_accessory_url:list}))
- }, [])
-
- //其他说明
- const getOtherReason = useCallback((val) => {
- setSubmitData((e) => ({...e, reason_describe: val}))
- }, [])
-
- //提交数据
- const {fetchData: fetchDataReturnApply} = ReturnApplyOrderApi()
- const onSubmitData = async () => {
- if(submitData.roll_list.length <= 0) return alert.none('请选择或输入退货颜色')
- console.log('submitData::',submitData)
- let res = await fetchDataReturnApply(submitData)
- if(res.success) {
- alert.success('申请成功')
- goLink('/pages/salesAfter/salesAfterList/index',{}, 'reLaunch')
- } else {
- alert.error(res.msg)
- }
- }
-
- //底部按钮
- const onSubmit = throttle((val) => {
- if(val == 2) {
- if(submitData.goods_status === '') return alert.error('请选择货物状况')
- if(submitData.return_explain === '') return alert.error('请选择退货原因')
- if(!submitData.return_explain && !submitData.reason_describe) return alert.error('请填写其他说明')
- onSubmitData()
- } else {
- Taro.navigateBack()
- }
- }, 600)
-
- //退货原因选择弹窗
- const [showReason, setShowReason] = useState(false)
- const closeReason = useCallback(() => setShowReason(false), [])
- const onShowReason = () => {
- setShowReason(true)
- }
- useEffect(() => {
- getReturnReason()
- }, [])
-
- //请求获取到的数据
- const [returnGoodsInfo, setReturnGoodsInfo] = useState([])
-
- //退货原因
- const {fetchData: fetchDataReturnReason} = ReturnReasonApi()
- const getReturnReason = async () => {
- let res = await fetchDataReturnReason()
- setReturnGoodsInfo((e) => (res.data?.list))
- }
- //售后退货说明
- const {fetchData: fetchDataReturnExplain} = ReturnExplainApi()
- const getReturnExplain = async (id) => {
- let res = await fetchDataReturnExplain({return_reason: id})
- setReturnGoodsInfo((e) => (res.data?.list))
- }
- //退货原因选择列表返回的数据
- const [returnObj, setReturnObj] = useState([])
- const onReturnSelect = useCallback((val) => {
- let res = val.data[val.data.length - 1]
- if(val.index == 1) {
- getReturnExplain(res.id)
- setReturnGoodsInfo(() => [])
- }
- if(val.index == 2) setReturnObj(val.data)
- }, [])
- const onHeaderSelect = useCallback((val) => {
- setReturnGoodsInfo((e) => [])
- if(val.index == 1) getReturnReason()
- }, [])
-
- //选择货物状况
- const [showStatus, setShowStatus] = useState(false)
- const [statusInfo, setStatusInfo] = useState()
- const [statusGoodsInfo, setStatusGoodsInfo] = useState([])
- const {fetchData: fetchDataGoodsStatus} = ReturnGoodsStatusApi()
- const getReturnGoodsStatus = async () => {
- let res = await fetchDataGoodsStatus()
- setStatusGoodsInfo((e) => (res.data?.list))
- }
- const onShowStatus = () => {
- setShowStatus(() => true)
- getReturnGoodsStatus()
- }
- const closeStatus = useCallback(() => {
- setShowStatus(() => false)
- }, [])
- const onStatusSelect = useCallback((val) => {
- let res = val.data[val.data.length - 1]
- setStatusInfo(res)
- }, [])
-
- useEffect(() => {
- if(returnObj.length > 0) {
- submitData.return_reason = returnObj[0].id
- submitData.return_explain = returnObj[1].id
- }
- if(statusInfo) {
- submitData.goods_status = statusInfo.id
- }
- setSubmitData(() => ({...submitData}))
- }, [returnObj, statusInfo])
-
-
- return (
-
-
- {dataCount}
-
-
- {(orderDetail?.sale_mode == 0)&&||
- }
-
-
- 退货原因
-
- 0&&styles.selected}>{returnObj?.length > 0?(returnObj[0]?.name + '/' +returnObj[1]?.name):'请选择'}
-
-
-
-
- 货物状况
-
- {statusInfo?.name||'请选择'}
-
-
-
-
- 拍照上传
-
-
-
-
-
-
-
-
-
-
-
-
-
- onSubmit(1)}>取消
- onSubmit(2)}>确认
-
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/bindSalesman/component/successBind/index.module.scss b/src/pages/bindSalesman/component/successBind/index.module.scss
deleted file mode 100644
index 2d3c1c6..0000000
--- a/src/pages/bindSalesman/component/successBind/index.module.scss
+++ /dev/null
@@ -1,62 +0,0 @@
-.bindSalesman_main{
- width: 100%;
- height: 100vh;
- position: fixed;
- left:0;
- top:0;
- .bindSalesman_pop{
- width: 654px;
- height: 560px;
- border-radius: 40px;
- display: flex;
- flex-direction: column;
- align-items: center;
- position:absolute;
- margin:auto;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- bottom: 0;
- z-index: 1999;
- .bindSalesman_header{
- width: 654px;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 40px 40px 0 0;
- }
- .sale_man{
- color: #fff;
- text-align: center;
- font-size: 26px;
- position: absolute;
- margin: auto;
- left: 0;
- right: 0;
- bottom: 60px;
- height: 100px;
- line-height: 100px;
- }
- }
- .btns{
- width: 488px;
- height: 104px;
- margin: 50px;
- image{
- width: 100%;
- }
- }
- }
- .bindSalesman_mask{
- z-index: 99;
- position: absolute;
- left:0;
- top:0;
- width: 100%;
- height: 100%;
- opacity: 0.8;
- background: #000000;
- }
-}
\ No newline at end of file
diff --git a/src/pages/bindSalesman/component/successBind/index.tsx b/src/pages/bindSalesman/component/successBind/index.tsx
deleted file mode 100644
index 35beb6b..0000000
--- a/src/pages/bindSalesman/component/successBind/index.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Image, Swiper, SwiperItem, Text, View } from "@tarojs/components"
-import styles from './index.module.scss'
-import { formatImgUrl } from "@/common/fotmat"
-import Taro from "@tarojs/taro";
-import { goLink } from "@/common/common";
-import CloseBtn from "@/components/closeBtn";
-import { useEffect, useState } from "react";
-
-type params = {
- show?: true|false,
- onClose?: () => void,
- saleMan?: string
-}
-export default ({show = false, saleMan = '', onClose}:params) => {
- const onClick = async () => {
- onClose?.()
- goLink('/pages/index/index', {}, 'switchTab')
-
- }
- const onCloseEven = () => {
- onClose?.()
- }
- return (
- <>
- {show&&
-
- onClick()}>
-
- 邀请人: {saleMan}
-
-
- onClick()}/>
-
-
-
-
- }
- >
- )
-
-}
\ No newline at end of file
diff --git a/src/pages/bindSalesman/index.config.ts b/src/pages/bindSalesman/index.config.ts
deleted file mode 100644
index 3f25181..0000000
--- a/src/pages/bindSalesman/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '邀请码',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/bindSalesman/index.module.scss b/src/pages/bindSalesman/index.module.scss
deleted file mode 100644
index 9d930a3..0000000
--- a/src/pages/bindSalesman/index.module.scss
+++ /dev/null
@@ -1,83 +0,0 @@
-.bindSalesmanPage_main{
- display: flex;
- flex-direction: column;
- align-items: center;
- .header_image{
- width: 240px;
- height: 188px;
- padding: 50px 0;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .salesman_name{
- font-size: 30px;
- color: #007AFF;
- box-sizing: border-box;
- padding-top: 50px;
- text{
- &:nth-child(2) {
- margin-left: 20px;
- }
- }
- }
- .inputCode{
- width: 670px;
- height: 106px;
- background: #f6f6f6;
- border: 2px solid #f0f0f0;
- border-radius: 20px;
- display: flex;
- align-items: center;
- padding: 20px 0 20px 30px;
- box-sizing: border-box;
- position: relative;
- input{
- flex:1;
- z-index: 0;
- }
- .scan_code{
- width: 101px;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- border-left: 1PX solid #ccc;
- .miconfont{
- font-size: 50px;
- color: #007AFF;
- }
- }
- .close_btn{
- padding: 0 20px;
- }
- }
- .btns{
- width: 670px;
- height: 90px;
- opacity: 0.6;
- background: linear-gradient(41deg,#007aff, #3a9bfd 86%, #4ba2fa 100%);
- border-radius: 46px;
- text-align: center;
- line-height: 90px;
- color: #fff;
- margin-top: 50px;
- }
- .select_btns{
- opacity: 1;
- }
- .message{
- padding: 150px 30px 20px 30px;
- color: #ABABAB;
- font-size: 28px;
- text{
- display: block;
- margin-bottom: 30px;
- &:nth-child(1) {
- text-align: center;
- font-weight: 700;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/bindSalesman/index.tsx b/src/pages/bindSalesman/index.tsx
deleted file mode 100644
index 79caa6a..0000000
--- a/src/pages/bindSalesman/index.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import { Image, Input, Text, View } from '@tarojs/components'
-import styles from './index.module.scss'
-import useLogin from '@/use/useLogin'
-import classnames from "classnames";
-import { formatImgUrl } from '@/common/fotmat'
-import { useEffect, useMemo, useRef, useState } from 'react';
-import { alert } from '@/common/common';
-import CloseBtn from '@/components/closeBtn';
-import SuccessBind from './component/successBind';
-import Taro, { useDidShow } from "@tarojs/taro";
-import { BindInvitationInfoApi, GetInvitationInfoApi } from '@/api/user';
-import { debounce, getFilterData, throttle } from '@/common/util';
-export default () => {
- useLogin()
-
- useEffect(() => {
- onClipboardData()
- }, [])
-
- const [submitData, setSubmitData] = useState({
- invitation_code: '',
- })
-
- //获取业务员信息
- type Param = {invitation_code: string, name: string, phone: string}
- const [salesMan, setSalesMan] = useState(null)
- const {fetchData: GetInvitationInfoFetchData} = GetInvitationInfoApi()
- const getInvitationInfo = async () => {
- let res = await GetInvitationInfoFetchData(getFilterData({...submitData}))
- res.success?setSalesMan(res.data):setSalesMan(null)
- }
- useEffect(() => {
- if(submitData.invitation_code.length === 4)
- getInvitationInfo()
- }, [submitData])
-
- const onInputCode = (e) => {
- const value = e.detail.value.replace(/[\W]/g, "")
- setSubmitData((val) => ({...val, invitation_code:value}))
- }
-
- const oncloseEven = () => {
- setSubmitData((val) => ({...val, invitation_code:''}))
- setSalesMan(null)
- }
-
- //绑定业务员
- const [bindShow, setBindShow] = useState(false)
- const {fetchData: bindInvitationInfoFetchData} = BindInvitationInfoApi()
- const onSubmit = async () => {
- if(!submitData.invitation_code) return alert.error('请输入邀请码')
- let res = await bindInvitationInfoFetchData({...submitData})
- if(res.success) setBindShow(() => true)
- }
-
- const onScanCode = () => {
- Taro.scanCode({
- success: (res) => {
- setSubmitData(() => ({invitation_code: res.result}))
- }
- })
- }
-
- //获取粘贴版内容
- const onClipboardData = () => {
- Taro.getClipboardData({
- success: function (res){
- let val = res.data.match(/InviteCode:([a-zA-Z0-9]{4})/)
- if(val) setSubmitData((e) => ({...e, invitation_code: val?val[1]:''}))
- }
- })
- }
-
- return (
-
-
-
-
-
-
-
- {submitData.invitation_code&&}
-
- onScanCode()}>
-
-
-
- {salesMan&&邀请人:{`${salesMan.name} (${salesMan.phone})`}}
- 提交
-
- 温馨提示
- 1. 新用户授权手机号码后,7天内可以输入邀请码,超过时间不能输入。
- 2. 一个手机只能输入一次邀请码。输入邀请码。
-
-
- setBindShow(false)} saleMan={salesMan?.name}/>
-
- )
-}
-
diff --git a/src/pages/certification/components/SelectEnterpriseType.scss b/src/pages/certification/components/SelectEnterpriseType.scss
deleted file mode 100644
index f18cf81..0000000
--- a/src/pages/certification/components/SelectEnterpriseType.scss
+++ /dev/null
@@ -1,22 +0,0 @@
-.select-enterprise-type{
- .select-enterprise-type-btn{
- color: #ABABAB;
- font-size: 28px;
- padding: 20px;
- display: flex;justify-content: space-between;
- border-bottom: 1rpx solid #eaeaea;
- }
- .select-enterprise-type-content{
- padding: 0 20px;
- padding-bottom: 120px;
- }
- .select-enterprise-type-content view{
- padding: 20px 0;
- font-size: 28px;
- display: flex;justify-content: space-between;
- }
- .select-enterprise-type-content view text:last-child{
- color: #007AFF;
- font-size: 35px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/certification/components/SelectEnterpriseType.tsx b/src/pages/certification/components/SelectEnterpriseType.tsx
deleted file mode 100644
index acf9598..0000000
--- a/src/pages/certification/components/SelectEnterpriseType.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import Popup from "@/components/popup";
-import "./SelectEnterpriseType.scss"
-import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
-import {certificationTypeListApi} from "@/api/certification"
-
-interface Params{
- confirm?: (selected:any)=>void, // 确定
-}
-
-export default forwardRef((props: Params, ref)=>{
- const [modalShow, setModalShow] = useState(false)
- // 获取认证信息
- const {fetchData, state} = certificationTypeListApi();
- useEffect(()=>{
- fetchData();
- }, [])
- const [selected, setSelected] = useState({});
- // 确定
- const handleSelect = (item)=>{
- setSelected(item);
- }
- // 设置弹窗是否显示
- const setShow = (ev)=>{
- setModalShow(ev);
- }
- useImperativeHandle(ref,()=>({
- setShow
- }))
- // 确定
- const handleConfirm = ()=>{
- props.confirm&&props.confirm(selected);
- setModalShow(false);
- }
-
- return (
-
- setModalShow(false)}>
-
- setModalShow(false)}>取消
- 确定
-
-
- {
- state.data?.list?.map((item,index)=>{
- return handleSelect(item)} key={index}>
- {item.name}
- {item.id==(selected as any).id?:}
-
- })
- }
-
-
-
- )
-})
diff --git a/src/pages/certification/index.config.ts b/src/pages/certification/index.config.ts
deleted file mode 100644
index b645668..0000000
--- a/src/pages/certification/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '认证信息',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/certification/index.scss b/src/pages/certification/index.scss
deleted file mode 100644
index a6c7bcf..0000000
--- a/src/pages/certification/index.scss
+++ /dev/null
@@ -1,115 +0,0 @@
-.certification{
- display: flex;
- flex-direction: column;
- background-color: #F0F0F0;
- padding-bottom: 300px;
- .certification-content{
- background-color: white;
- padding-bottom: 50px;
- }
- .certification-content:nth-of-type(3){
- margin-top: 18px;
- }
- .certification-title{
- font-size: 26px;
- font-weight: 700;
- margin-left: 30px;
- padding-top: 40px;
- color: #000000;
- padding-bottom: 20px;
- // border-top: 18px solid #F0F0F0;
- }
- .certification-upload{
- width: 642px;
- height: 316px;
- border: 10px solid #cde5ff;
- border-radius: 30px;
- margin: 0 auto;
- display: flex;align-items: center;justify-content: center;
- font-size: 34px;
- font-weight: 700;
- color: #68b4ff;
- background-color: #ECF5FF;
- position: relative;
- margin-top: 60px;
- }
- .certification-upload text{
- margin-bottom: 60px;
- }
- .certification-upload-no{
- display: flex;flex-direction: column;align-items: center;
- }
- .certification-upload image{
- position: absolute;width: 100%;height: 100%;
- object-fit: cover;border-radius: 30px;
- }
- .certification-upload-no-icon{
- width: 104px;
- height: 104px;
- background: #68b4ff;
- box-shadow: 0px 0px 12px 0px #68b4ff;
- display: flex;align-items: center;justify-content: center;
- border-radius: 50%;
- color: white;
- }
- .certification-upload-no-tips{
- margin-top: 30px;
- border-radius: 30px;
- font-size: 24px;
- font-weight: 400;
- color: #000000;
- }
- .certification-button{
- position: absolute;bottom: -10px;left: -10px;right: -10px;
- background-color: rgba(0,0,0,0.65);
- display: flex;
- height: 86px;
- border-radius: 0 0 30px 30px;
- z-index: 1;
- }
- .certification-button view{
- flex: 1;
- display: flex;align-items: center;justify-content: center;
- font-size: 24px;
- font-weight: 400;
- color: #ffffff;
- }
- .certification-button view:first-child{
- border-right: 1px solid #CCCCCC;
- }
- .certification-footer{
- width: 750px;
- height: 174px;
- background: #ffffff;
- box-shadow: 6px 0px 12px 0px rgba(0,0,0,0.16);
- position: fixed;bottom: 0;left: 0;right: 0;
- width: 100%;
- display: flex;align-items: center;justify-content: center;
- z-index: 2;
- }
- .certification-footer-button{
- width: 696px;
- height: 82px;
- background: #ffffff;
- border: 2px solid #cde5ff;
- display: flex;
- border-radius: 40px;
- box-sizing: border-box;
- overflow: hidden;
- }
- .certification-footer-button view,.certification-footer-button navigator{
- flex: 1;
- display: flex;align-items: center;justify-content: center;
- font-size: 32px;
- font-weight: 400;
- color: #007aff;
- border: 0;border-radius: none;
- }
- .certification-footer-button navigator::after{
- border: 0;border-radius: none;
- }
- .certification-footer-button view:last-child{
- color: white;
- background-color: #007AFF;
- }
-}
\ No newline at end of file
diff --git a/src/pages/certification/index.tsx b/src/pages/certification/index.tsx
deleted file mode 100644
index bc53251..0000000
--- a/src/pages/certification/index.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-
-import FromListCertification from "@/components/FromListCertification"
-import { Button, Image, Input, NavigationBar, Navigator, Text, Textarea, View } from "@tarojs/components"
-import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
-import { certificationSaveApi, certificationDetailApi } from "@/api/certification"
-import { useEffect, useRef, useState } from "react"
-import { alert, retrieval } from "@/common/common"
-import "./index.scss"
-import useUploadCDNImg from "@/use/useUploadImage";
-import Message from "@/components/Message"
-import { IMG_CND_Prefix } from "@/common/constant";
-import SelectEnterpriseType from "./components/SelectEnterpriseType"
-import { useSelector } from "@/reducers/hooks";
-import useLogin from "@/use/useLogin";
-
-export default () => {
- const { getAdminUserInfo } = useLogin();
- const { adminUserInfo } = useSelector(state => state.userInfo);
- useEffect(() => {
- initalFormData();
- }, []);
- // 获取认证信息
- const { fetchData: getFromData } = certificationDetailApi()
- const initalFormData = async () => {
- const detail = await getFromData();
- setFormData({
- ...detail.data ?? {},
- legal_person_identity_url: detail?.data?.legal_person_identity_url ?? [],
- // business_license_url: "https://test.cdn.zzfzyc.com/mall/827082e888860dd9da10f0fbb0ac3cf023081456.png"
- } as any)
- }
- // 保存
- const [formData, setFormData] = useState({
- authentication_type: 0,
- authentication_type_name: "",
- business_license_url: "",
- legal_person: "",
- legal_person_identity: "",
- business_license: '',
- legal_person_identity_url: [],
- name: ""
- });
- const rules = {
- // authentication_type: [{
- // message: "请选择认证类型"
- // }],
- name: [{
- message: "请输入企业名称"
- }],
- business_license: [{
- message: "请输入企业营业执照"
- }],
- business_license_url: [{
- message: "请上传营业执照"
- }],
- legal_person: [{
- message: "请输入法人名称"
- }],
- legal_person_identity: [{
- message: "请输入正确法人身份证",
- regex: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
- }],
- legal_person_identity_url: [{
- message: "请上传法人身份证",
- validator: (value: any, rule: any) => {
- if (!value[0] || !value[1]) {
- return true;
- }
- return false;
- }
- }],
- }
- const { fetchData } = certificationSaveApi()
- const handleSave = () => {
- retrieval(formData, rules).then(async () => {
- const result = await fetchData({ ...formData, authentication_type: 2 })
- if (result.success) {
- // Taro.eventCenter.trigger("weightList:refresh");
- getAdminUserInfo();
- Taro.navigateBack();
- alert.success("保存成功");
- } else {
- alert.error(result.msg);
- }
- }).catch((message) => {
- alert.none(message)
- })
- }
- // 监听表单完善
- const [hozon, setHozon] = useState(false);
- useEffect(() => {
- if (retrieval) {
- retrieval(formData).then(() => setHozon(true)).catch(() => setHozon(false))
- }
- }, [formData])
- // 选择类型弹窗显示
- const selectTypeRef = useRef(null)
- const handleSelectTypeModalShow = () => {
- (selectTypeRef.current as any).setShow(true)
- }
- // 选择类型确定
- const handleSelectTypeConfirm = (item) => {
- setFormData({
- ...formData,
- authentication_type: item.id,
- authentication_type_name: item.name
- });
- }
- // 上传图片
- const { getWxPhoto } = useUploadCDNImg();
- const handleUploadImage = async (text: any) => {
- let result = await getWxPhoto('mall');
- if (text == "business_license_url") {
- formData.business_license_url = IMG_CND_Prefix + (result as any).url;
- } else {
- formData.legal_person_identity_url[text] = IMG_CND_Prefix + (result as any).url as never;
- }
- setFormData({ ...formData });
- }
- // 查看图片
- const handleViewImage = (event, url) => {
- event.stopPropagation();
- Taro.previewImage({
- current: url,
- urls: [url]
- })
- }
-
- return (
-
- {(adminUserInfo as any)?.authentication_status == 3 && }
-
- 企业认证
- {/* */}
-
- setFormData({ ...formData, name: ev.detail.value })} value={formData["name"]} label="企业名称" placeholder="请输入营业执照上的企业名称" required />
- {/* */}
- setFormData({ ...formData, business_license: ev.detail.value })} value={formData["business_license"]} style={{ border: "0" }} label="企业营业执照" placeholder="注册号、统一社会信用代码、组织机构代码" required />
- handleUploadImage("business_license_url")} className="certification-upload">
- {(formData as any)?.business_license_url ?
- <>
- 营业执照正面
-
- handleViewImage(e, (formData as any)?.business_license_url)}>查看证件
- 重新上传
-
-
- > :
-
- +
- 上传营业执照正面
-
- }
-
-
-
- 法人认证
- setFormData({ ...formData, legal_person: ev.detail.value })} value={formData["legal_person"]} label="法人代表" placeholder="填写法人名称" required />
- setFormData({ ...formData, legal_person_identity: ev.detail.value })} value={formData["legal_person_identity"]} label="法人身份" placeholder="填写法人代表身份证号" required />
- handleUploadImage(0)} className="certification-upload">
- {(formData as any)?.legal_person_identity_url[0] ?
- <>
- 营业执照正面
-
- handleViewImage(e, (formData as any)?.legal_person_identity_url[0])}>查看证件
- 重新上传
-
-
- > :
-
- +
- 上传身份证正面
-
- }
-
- handleUploadImage(1)} className="certification-upload">
- {(formData as any)?.legal_person_identity_url[1] ?
- <>
- 营业执照正面
-
- handleViewImage(e, (formData as any)?.legal_person_identity_url[1])}>查看证件
- 重新上传
-
-
- > :
-
- +
- 上传身份证正面
-
- }
-
-
-
-
- 取消
- {[3, 4].includes((adminUserInfo as any)?.authentication_status) ? "重新认证" : "提交"}
-
-
-
- )
-}
diff --git a/src/pages/classList/components/filter/index.module.scss b/src/pages/classList/components/filter/index.module.scss
deleted file mode 100644
index 599cdd0..0000000
--- a/src/pages/classList/components/filter/index.module.scss
+++ /dev/null
@@ -1,126 +0,0 @@
-.popup_main{
- width: 608px;
- height: 100vh;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .popup_title{
- font-size: $font_size;
- font-weight: 700;
- text-align: center;
- padding: 20px 0;
- }
- .scroll{
- flex:1;
- height: 0;
- }
- .popup_filter{
- padding-bottom: 100px;
- }
- .popup_filter_item{
- margin-bottom: 20px;
- .title{
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- padding: 20px 0;
- }
- .btn_list{
- display: grid;
- grid-template-columns: repeat(3, 165.75px);
- justify-content: space-between;
- .btn_item{
- width: 165.75px;
- height: 69.2px;
- background: #f0f0f0;
- border-radius: 34px;
- text-align: center;
- line-height: 69.2px;
- font-size: $font_size_medium;
- color: $color_font_one;
- margin-bottom: 20px;
- }
- .select_btn_item{
- color: $color_main;
- background: #ecf5ff;
- border: 2px solid #007aff;
- width: 161.75px;
- height: 65.2px;
- }
- }
- .btn_list_input{
- display: flex;
- // justify-content: space-between;
- align-items: center;
- .btn_width {
- width: 220px;
- height: 70px;
- background: #f0f0f0;
- border-radius: 50px;
- padding: 10px 20px;
- box-sizing: border-box;
- input{
- width: 100%;
- height: 100%;
- font-size: $font_size_medium;
- }
- }
- .unit{
- color: $color_font_one;
- font-size: $font_size;
- margin-left: 20px;
- }
- text{
- color: #ccc;
- padding: 0 20px;
- }
- .width_main{
-
- }
- }
- .btn_list_element{
- background-color: #F0F0F0;
- border-radius: 30px;
- padding: 20px;
- box-sizing: border-box;
- textarea{
- width: 100%;
- height: 126px;
- font-size: $font_size_medium;
- }
- }
- }
- .btns_con{
- width: 100%;
- position: fixed;
- bottom:0;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .btns_two{
- display: flex;
- width: 552px;
- height: 82px;
- border: 2px solid #cde5ff;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-bottom: 20px;
- .rest_btn{
- flex:1;
- border-radius: 0px 40px 40px 0px;
- text-align: center;
- line-height: 82px;
- color: $color_main;
-
- }
- .verify_btn{
- flex:1;
- border-radius: 0px 40px 40px 0px;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/classList/components/filter/index.tsx b/src/pages/classList/components/filter/index.tsx
deleted file mode 100644
index d64ab87..0000000
--- a/src/pages/classList/components/filter/index.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import Popup, {Params as PopuParams} from "@/components/popup"
-import { Input, ScrollView, Text, Textarea, View } from "@tarojs/components"
-import classnames from "classnames";
-import { useEffect, useState } from "react";
-import styles from './index.module.scss'
-
-type params = {
- onFiltr?: (val:object) => void
-} & PopuParams
-export default ({onClose, onFiltr, show = false}:params) => {
- const [filterObj, setFilterObj] = useState({
- series: '',
- minWidth: '',
- maxWidth: '',
- minWeight: '',
- maxWeight: '',
- element: ''
-
- })
- const onCloseEven = () => {
- onClose?.()
- }
- const onRest = () => {
- console.log('12123')
- setFilterObj({
- series: '',
- minWidth: '',
- maxWidth: '',
- minWeight: '',
- maxWeight: '',
- element: ''
- })
- }
- useEffect(() => {
- console.log(filterObj)
- }, [filterObj])
-
- const onVerify = () => {
- console.log(filterObj)
- onFiltr?.(filterObj)
- }
-
- const setNumber = (e, field) => {
- console.log(e)
- let num = parseFloat(e.detail.value)
- if(isNaN(num)) {
- filterObj[field] = null
- } else {
- filterObj[field] = parseFloat(num.toFixed(2))
- }
- setFilterObj({...filterObj})
- }
-
- const setElement = (e) => {
- let res = e.detail.value
- setFilterObj({...filterObj, element:res})
- }
- return (
-
- onCloseEven()} showIconButton={true}>
-
- 全部筛选
-
-
-
-
- 系列
-
- 不限
- 不限
- 不限
- 不限
- 不限
- 不限
-
-
-
- 幅宽
-
- setNumber(e,'minWidth')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx"/>
- —
- setNumber(e,'maxWidth')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx"/>
- cm
-
-
-
- 克重
-
- setNumber(e,'minWeight')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx"/>
- —
- setNumber(e,'maxWeight')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx"/>
- g
-
-
-
- 成分
-
-
-
-
-
-
-
-
-
- onRest()}>重置
- onVerify()}>确认
-
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/classList/index.config.ts b/src/pages/classList/index.config.ts
deleted file mode 100644
index 2cd10d3..0000000
--- a/src/pages/classList/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '分类标题'
-}
diff --git a/src/pages/classList/index.module.scss b/src/pages/classList/index.module.scss
deleted file mode 100644
index 7b62533..0000000
--- a/src/pages/classList/index.module.scss
+++ /dev/null
@@ -1,150 +0,0 @@
-.main{
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: $color_bg_one;
- .search{
- padding: 20px;
- }
- .filter{
- .filter_all {
- display: flex;
- justify-content: space-between;
- padding: 20px 50px;
- font-size: $font_size_medium;
- color: $color_font_three;
- .text_one{
- color: $color_main;
- display: flex;
- align-items: center;
- }
- .text_two{
- position: relative;
- .miconfont{
- font-size: 20px;
- margin-left: 10px;
- }
- &::before{
- content: '';
- width: 2px;
- height: 32px;
- background-color: #C2C2C2;
- position: absolute;
- top: 0;
- left: -50px;
- }
- }
- }
- .filter_btns{
- display: flex;
- justify-content: space-between;
- padding: 20px;
-
- .selected{
- background-color: #ecf5ff;
- border: 2px solid #cde5ff;
- color: $color_main;
- width: 122px;
- height: 42.93px;
- }
- }
- }
- .list{
- flex:1;
- height: 0;
- }
- .popup_main{
- width: 608px;
- height: 100vh;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .popup_title{
- font-size: $font_size;
- font-weight: 700;
- text-align: center;
- padding: 20px 0;
- }
- .scroll{
- flex:1;
- height: 0;
- }
- .popup_filter{
-
- }
- .popup_filter_item{
- margin-bottom: 20px;
- .title{
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- padding: 20px 0;
- }
- .btn_list{
- display: grid;
- grid-template-columns: repeat(3, 165.75px);
- justify-content: space-between;
- .btn_item{
- width: 165.75px;
- height: 69.2px;
- background: #f0f0f0;
- border-radius: 34px;
- text-align: center;
- line-height: 69.2px;
- font-size: $font_size_medium;
- color: $color_font_one;
- margin-bottom: 20px;
- }
- .select_btn_item{
- color: $color_main;
- background: #ecf5ff;
- border: 2px solid #007aff;
- width: 161.75px;
- height: 65.2px;
- }
- }
- .btn_list_input{
- display: flex;
- // justify-content: space-between;
- align-items: center;
- .btn_width {
- width: 220px;
- height: 70px;
- background: #f0f0f0;
- border-radius: 50px;
- padding: 10px 20px;
- box-sizing: border-box;
- input{
- width: 100%;
- height: 100%;
- font-size: $font_size_medium;
- }
- }
- .unit{
- color: $color_font_one;
- font-size: $font_size;
- margin-left: 20px;
- }
- text{
- color: #ccc;
- padding: 0 20px;
- }
- .width_main{
-
- }
- }
- .btn_list_element{
- background-color: #F0F0F0;
- border-radius: 30px;
- padding: 20px;
- box-sizing: border-box;
- textarea{
- width: 100%;
- height: 126px;
- font-size: $font_size_medium;
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/classList/index.tsx b/src/pages/classList/index.tsx
deleted file mode 100644
index 702c500..0000000
--- a/src/pages/classList/index.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-import { Input, ScrollView, Text, Textarea, View } from '@tarojs/components'
-import classnames from 'classnames'
-import Search from '@/components/search'
-import Product from '@/components/product'
-import InfiniteScroll from '@/components/infiniteScroll'
-import styles from './index.module.scss'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import Filter from '@/components/filter'
-import SortBtn from '@/components/sortBtn'
-import SelectData, { ListProps } from '../searchList/components/selectData'
-import { GetProductListApi } from '@/api/material'
-import { useRouter } from '@tarojs/taro'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import LoadingCard from '@/components/loadingCard'
-import Taro from '@tarojs/taro'
-import useLogin from '@/use/useLogin'
-
-export default () => {
- useLogin()
- const [showPopup, setShowPopup] = useState(false)
-
- const router = useRouter()
-
- useEffect(() => {
- Taro.setNavigationBarTitle({
- title: router.params.title || '分类页面',
- })
- }, [router])
-
- //搜索参数
- const [searchField, setSearchField] = useState({
- code_or_name: '',
- product_category_id: router.params.id,
- page: 1,
- size: 10,
- width: '',
- weight_density: '',
- product_kind_id: '',
- component: '',
- })
-
- //获取列表
- const [categoryList, setCategoryList] = useState<{ list: any[]; total: number }>({
- list: [],
- total: 0,
- })
- const { fetchData, state } = GetProductListApi()
- const getSubjectList = async () => {
- let res = await fetchData(getFilterData(searchField))
- setCategoryList({ ...categoryList, list: res.data.list, total: res.data.total })
- }
-
- //监听筛选数据变化
- useEffect(() => {
- getSubjectList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = () => {
- if (categoryList.list.length < categoryList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({ ...searchField, size })
- }
- }
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: categoryList.list, total: categoryList.total, status: state.loading })
- }, [categoryList, state])
-
- //获取筛选条件
- const getFiltr = (e) => {
- pageNum.current.page = 1
- setCategoryList(() => ({ list: [], total: 0 }))
- const { data } = e
- setSearchField({
- ...searchField,
- width: data?.width,
- weight_density: data?.weight,
- size: 10,
- component: data?.element,
- product_kind_id: data?.seriesId,
- })
- formatSelectList(e)
- }
-
- //筛选条件格式化
- const [selectList, setSelectList] = useState()
- const formatSelectList = (val = { data: {}, field: {} }) => {
- let data: ListProps[] = []
- for (let key in val.data) {
- if (key !== 'seriesId' && val.data[key] != '') {
- data.push({ title: val.field[key], value: val.data[key] })
- }
- }
- setSelectList([...data])
- }
-
- //输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setCategoryList(() => ({ list: [], total: 0 }))
- setSearchField((val) => ({ ...val, code_or_name: e, size: 10 }))
- }, [])
-
- //排序
- type sortParam = 'none' | 'top' | 'bottom'
- const sortComprehensiveRef = useRef(null)
- const [sortStatus, setSortStatus] = useState<{ comprehensive: sortParam }>({
- comprehensive: 'none',
- })
- const changeSort = () => {
- setCategoryList(() => ({ list: [], total: 0 }))
- const { status, value } = sortComprehensiveRef.current.changeSort()
- setSortStatus((e) => ({ ...e, comprehensive: status, collection: 'none' }))
- setSearchField((e) => ({ ...e, abstract_sort_key: value, size: 10, page: 1 }))
- pageNum.current = { size: 10, page: 1 }
- }
-
- return (
-
-
-
-
-
-
- changeSort()}>
- 综合
-
-
- setShowPopup(true)}>
- 筛选
-
-
-
-
-
-
-
-
- getScrolltolower()} statusMore={statusMore}>
-
-
-
- setShowPopup(false)} onFiltr={getFiltr} />
-
- )
-}
diff --git a/src/pages/collection/collectionClass/index.config.ts b/src/pages/collection/collectionClass/index.config.ts
deleted file mode 100644
index 321fc78..0000000
--- a/src/pages/collection/collectionClass/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '收藏详情',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/collection/collectionClass/index.module.scss b/src/pages/collection/collectionClass/index.module.scss
deleted file mode 100644
index 8430731..0000000
--- a/src/pages/collection/collectionClass/index.module.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-
-.collection_main {
- padding: 0 20px;
- min-height: 100%;
- background-color: #F8F8F8;
- .search {
- display: flex;
- align-items: center;
- .miconfont_con{
- padding: 0 20px;
- }
- .miconfont{
- font-size: 30px;
- color: #007AFF;
- border: 1px solid #007AFF;
- border-radius: 50%;
- }
- }
- .operation{
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20px 30px 0 30px;
- font-size: 26px;
- color: #707070;
- .operation_check{
- display: flex;
- align-items: center;
- position: relative;
- &::after{
- content: '';
- height: 45px;
- width: 1PX;
- background-color: #ccc;
- position: absolute;
- right: -30px;
- }
- Text{
- margin-left: 15px;
- height: 100%;
- display: inline-block;
-
- }
- }
- }
- .operation_check_right{
- .operation_check_move{
- color: #707070;
- margin-right: 30px;
- }
- .operation_check_cancel{
- color: #007AFF;
- }
- }
- .class_list{
- margin-top: 30px;
-
- }
-}
\ No newline at end of file
diff --git a/src/pages/collection/collectionClass/index.tsx b/src/pages/collection/collectionClass/index.tsx
deleted file mode 100644
index 0908427..0000000
--- a/src/pages/collection/collectionClass/index.tsx
+++ /dev/null
@@ -1,145 +0,0 @@
-import { DelFavoriteProductApi, DetailFavoriteProductApi, MoveFavoriteProductApi } from '@/api/favorite'
-import { alert } from '@/common/common'
-import { getFilterData } from '@/common/util'
-import Product from '../components/product'
-import Search from '@/components/search'
-import { Text, View } from '@tarojs/components'
-import Taro, { useRouter } from '@tarojs/taro'
-import classnames from 'classnames'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import styles from './index.module.scss'
-import MCheckbox from '@/components/checkbox'
-import AddCollection from '@/components/addCollection'
-
-export default () => {
- const router = useRouter()
-
- //获取收藏夹面料
- const { fetchData: fetchDataDetailFavoriteProduct } = DetailFavoriteProductApi()
- const [colorInfo, setColorInfo] = useState({})
- const getFavoriteInfo = async () => {
- let res = await fetchDataDetailFavoriteProduct(searchData)
- if (res.success) {
- Taro.setNavigationBarTitle({
- title: res.data.name,
- })
- setColorInfo(res.data)
- }
- }
-
- //获取搜索数据
- const [searchData, setSearchData] = useState({ id: 0, code_or_name: '' })
- const onSearch = useCallback((e) => {
- setSearchData((val) => ({ ...val, code_or_name: e }))
- }, [])
- useEffect(() => {
- let id = router.params.id || 0
- if (id) setSearchData((e) => ({ ...e, id: parseInt(id as string) }))
- }, [])
-
- useEffect(() => {
- if (searchData.id) getFavoriteInfo()
- }, [searchData])
-
- const productList = useMemo(() => {
- return colorInfo.product_color_list
- }, [colorInfo])
-
- //获取选中的id
- const [ids, setIds] = useState([])
- const getSelectIds = useCallback((val) => {
- setIds(() => val)
- }, [])
-
- //全选反选
- const [allSelectStatus, setAllSelectStatus] = useState(false)
- const selectCallBack = useCallback(() => {
- setAllSelectStatus(() => true)
- setSelectStatus(1)
- }, [])
- const colseCallBack = useCallback(() => {
- setAllSelectStatus(() => false)
- setSelectStatus(3)
- }, [])
-
- const [selectStatus, setSelectStatus] = useState<1 | 2 | 3>(3)
- useEffect(() => {
- if (colorInfo.product_color_list?.length) {
- if (ids.length == colorInfo.product_color_list.length) {
- setSelectStatus(1)
- setAllSelectStatus(true)
- } else if (0 < ids.length && ids.length < colorInfo.product_color_list.length) {
- setSelectStatus(2)
- setAllSelectStatus(false)
- } else {
- setSelectStatus(3)
- setAllSelectStatus(false)
- }
- }
- }, [ids, colorInfo])
-
- const [collectionShow, setCollectionShow] = useState(false)
- const closeCollection = useCallback(() => {
- setCollectionShow(false)
- }, [])
-
- //移动面料
- const { fetchData: fetchDataMoveFavoriteProduct } = MoveFavoriteProductApi()
- const onAdd = async (val) => {
- if (ids.length == 0) return alert.none('请选择要移动面料')
- 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('修改成功')
- }
- }
-
- //取消收藏
- const { fetchData: delFavoriteProductFetchData } = DelFavoriteProductApi()
- const delCollectioin = async () => {
- if (ids.length == 0) return 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 (
-
-
-
-
-
-
- selectCallBack()} onClose={() => colseCallBack()} />
- 全选
-
-
- setCollectionShow(true)}>
- 移动到
-
-
- 取消收藏
-
-
-
-
-
-
-
-
- )
-}
diff --git a/src/pages/collection/components/createPopup/index.module.scss b/src/pages/collection/components/createPopup/index.module.scss
deleted file mode 100644
index e69c52d..0000000
--- a/src/pages/collection/components/createPopup/index.module.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-
-.collection_con{
- padding: 20px;
- .title_item{
- display: flex;
- align-items: center;
- padding-bottom: 20px;
- flex-wrap: wrap;
- .title{
- font-size: $font_size;
- font-weight: 700;
- width: 60px;
- }
- .select{
- flex:1;
- height: 60px;
- border: 2px solid #e6e6e6;
- border-radius: 10px;
- margin-left: 20px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 20px;
- font-size: 26px;
- color: #000;
- .input{
- width: 100%;
- height: 100%;
- }
- }
- }
- .desc_item{
- display: flex;
- .title{
- font-size: $font_size;
- font-weight: 700;
- width: 60px;
- padding-top: 20px;
- }
- .desc{
- margin-left: 20px;
- flex:1;
- }
- }
- .btns_con{
- width: 100%;
- bottom:0;
- box-sizing: border-box;
- margin-top: 50px;
- .btns_two{
- display: flex;
- height: 82px;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-bottom: 20px;
- .verify_btn{
- flex:1;
- border-radius: 40px;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/collection/components/createPopup/index.tsx b/src/pages/collection/components/createPopup/index.tsx
deleted file mode 100644
index 245643b..0000000
--- a/src/pages/collection/components/createPopup/index.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import Popup from "@/components/popup";
-import { Input, ScrollView, Text, View } from "@tarojs/components";
-import { memo, useCallback, useEffect, useMemo, useRef } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import TextareaEnhance from "@/components/textareaEnhance";
-import { CreateFavoriteApi } from "@/api/favorite";
-import { alert } from "@/common/common";
-
-//原因选择
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- onSuccess?: (val:any) => void, //成功
- defaultValue?: {
- remark: string,
- name: string
- }, //默认数据
-}
-export default memo(({show = false, onClose, onSuccess, defaultValue}: ReasonInfoParam) => {
-
- const submitData = useRef({
- "name": '',
- "remark": ''
- })
-
- const getOtherReason = (val) => {
- submitData.current.remark = val
- }
-
- const changeInput = (val) => {
- submitData.current.name = val.detail.value
- }
-
- const onSubmit = () => {
- onSuccess?.(submitData.current)
- }
-
- useEffect(() => {
- submitData.current = {name: defaultValue?.name!, remark: defaultValue?.remark!}
- }, [defaultValue])
- return (
-
-
-
- 名称
-
-
-
-
-
- 简介
-
-
-
-
-
-
-
- onSubmit()}>确认
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/collection/components/product/index.module.scss b/src/pages/collection/components/product/index.module.scss
deleted file mode 100644
index 691077d..0000000
--- a/src/pages/collection/components/product/index.module.scss
+++ /dev/null
@@ -1,89 +0,0 @@
-
-.products_list{
- padding: 0 20px 20px 20px;
- box-sizing: border-box;
- height: 100%;
-}
-.products_item{
- width: 100%;
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- position: relative;
- &:nth-child(n+2){
- margin-top: 16px;
- }
- .checkbox{
- position: absolute;
- left: 10px;
- top: 10px;
- z-index: 999;
- }
- .item_img{
- width: 198px;
- height: 198px;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 10px;
- }
- .num{
- padding: 5px 10px 5px 20px;
- font-size: $font_size_min;
- position: absolute;
- right:0;
- bottom: 0;
- background: rgba($color: #000, $alpha: 0.3);
- border-radius: 36px 0px 10px 0px;
- color: #fff;
- text-align: center;
- }
- }
- .item_con{
- padding-left: 20px;
- font-size: $font_size;
- flex:1;
- .title{
- font-size: $font_size;
- color: #707070;
- text{
- color: $color_font_one;
- font-weight: bold;
- }
- }
- .tag_list{
- display: flex;
- margin-top: 16px;
- flex-wrap: wrap;
- .tag, .tag_g{
- max-width: 260rpx;
- padding: 3px 10px;
- background-color: #CDE5FF;
- font-size: $font_size_min;
- border-radius: 5px;
- color: $color_main;
- margin-right: 10px;
- margin-bottom: 10px;
- }
- .tag_g{
- background-color: #FFE6CE;
- color: #EE7500;
- }
- }
- .introduce{
- font-size: $font_size_medium;
- color: $color_font_two;
-
- }
- .des{
- font-size:$font_size_medium;
- color: #707070;
- margin-top: 16px;
- @include common_ellipsis($params:2);
- }
- }
-}
diff --git a/src/pages/collection/components/product/index.tsx b/src/pages/collection/components/product/index.tsx
deleted file mode 100644
index 1af96e5..0000000
--- a/src/pages/collection/components/product/index.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { Image, View } from "@tarojs/components"
-import Taro from "@tarojs/taro"
-import { goLink } from "@/common/common"
-import styles from './index.module.scss'
-import { formatHashTag, formatImgUrl } from "@/common/fotmat"
-import LabAndImg from "@/components/LabAndImg"
-import MCheckbox from "@/components/checkbox";
-import { useCallback, useEffect, useRef, useState } from "react"
-
-type Params = {
- productList?: any[],
- onSelectIds?: (val: number[]) => void,
- selectStatus?: 1|2|3, //1全选,2不做处理,3全清空
- openCheckBox?: true|false //是否开启选择
-}
-export default ({productList, onSelectIds, selectStatus = 2, openCheckBox = false}:Params) => {
- const [list, setList] = useState([])
- useEffect(() => {
- setList(() => productList||[])
- },[productList])
-
-
- useEffect(() => {
- if(list.length && selectStatus != 2) {
- list.map(item => {
- item.check = (selectStatus == 1)
- })
- setList(() => [...list])
- }
-
- }, [selectStatus])
-
- const onChangeSelect = (item) => {
- if(item.check) {
- onClose(item)
- } else {
- onSelect(item)
- }
- }
-
- //选中和取消选中
- const onSelect = (item) => {
- item.check = true
- setList(() => ([...list]))
- }
- const onClose = (item) => {
- item.check = false
- setList(() => ([...list]))
- }
-
- //监听数据变化
- useEffect(() => {
- let ids: number[] = []
- list.map(item => {
- if(item.check) ids.push(item.product_id)
- })
- onSelectIds?.(ids)
- }, [list])
-
- return (
-
- {list?.map(item => {
- return openCheckBox?onChangeSelect(item):goLink(`/pages/details/index?id=${item.product_id}`)}>
- {openCheckBox&& e.stopPropagation()}>
- onSelect(item)} onClose={() => onClose(item)}/>
- }
-
-
- {item.enable_product_color_count}色
-
-
- {formatHashTag(item.product_code, '')} {item.product_name}
-
- {item.width}
- {item.weight_density}
-
- {item.component}
-
-
- })}
-
-
- )
-}
diff --git a/src/pages/collection/components/updatePopup/index.module.scss b/src/pages/collection/components/updatePopup/index.module.scss
deleted file mode 100644
index b362e19..0000000
--- a/src/pages/collection/components/updatePopup/index.module.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-
-.collection_con{
- padding: 20px ;
- .collection_item{
- display: flex;
- font-size: 26px;
- padding: 30px 10px;
- border-bottom: 1PX solid #F3F3F3;
- align-items: center;
- .miconfont{
- font-size: 36px;
- color: #007AFF;
- }
- .text{
- margin-left: 10px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/collection/components/updatePopup/index.tsx b/src/pages/collection/components/updatePopup/index.tsx
deleted file mode 100644
index ea4b8b1..0000000
--- a/src/pages/collection/components/updatePopup/index.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import Popup from "@/components/popup";
-import { Input, ScrollView, Text, View } from "@tarojs/components";
-import { memo, useCallback, useMemo, useRef } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import TextareaEnhance from "@/components/textareaEnhance";
-import { CreateFavoriteApi } from "@/api/favorite";
-import { alert } from "@/common/common";
-
-//原因选择
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- onUpdate?: () => void, //编辑
- onBatchManagement?: () => void, //批量管理
- onDelete?: () => void, //删除
-
-}
-export default memo(({show = false, onClose, onUpdate, onBatchManagement, onDelete}: ReasonInfoParam) => {
- const onClickEven = (val) => {
- if (val == 1) {
- onUpdate?.()
- } else if (val == 2) {
- onBatchManagement?.()
- } else {
- onDelete?.()
- }
- }
- return (
-
-
- onClickEven(1)}>
-
- 编辑收藏夹
-
- onClickEven(2)}>
-
- 批量管理
-
- onClickEven(3)}>
-
- 删除该收藏夹
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/collection/index.config.ts b/src/pages/collection/index.config.ts
deleted file mode 100644
index a316ea6..0000000
--- a/src/pages/collection/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '我的收藏',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/collection/index.module.scss b/src/pages/collection/index.module.scss
deleted file mode 100644
index 5b3acd8..0000000
--- a/src/pages/collection/index.module.scss
+++ /dev/null
@@ -1,61 +0,0 @@
-
-.collection_main {
- padding: 0 20px;
- min-height: 100%;
- background-color: #F8F8F8;
- .search {
- display: flex;
- align-items: center;
- .miconfont_con{
- padding: 0 20px;
- }
- .miconfont{
- font-size: 30px;
- color: #007AFF;
- border: 1px solid #007AFF;
- border-radius: 50%;
- }
- }
- .class_list{
- margin-top: 30px;
- .class_item{
- margin: 20px 0;
- }
- .class_title{
- display: flex;
- margin-bottom: 20px;
- .title{
- flex: 1;
- color: #000;
- font-weight: 700;
- font-size: 28px;
- padding: 0 20px;
- @include common_ellipsis();
- }
- .fg{
- padding: 0 10px;
- }
- .num, .fg{
- color: #707070;
- font-weight: normal;
- }
- .miconfont_left{
- font-size: 30px;
- color: #707070;
- }
- .miconfont_open{
- transform: rotate(-90deg);
- }
- .miconfont_close {
- transform: rotate(90deg);
- }
- .more{font-size: 26px;}
-
- }
- .class_con{
- overflow: hidden;
- transition: all 0.5s ease-in-out;
- }
-
- }
-}
\ No newline at end of file
diff --git a/src/pages/collection/index.tsx b/src/pages/collection/index.tsx
deleted file mode 100644
index fc7155e..0000000
--- a/src/pages/collection/index.tsx
+++ /dev/null
@@ -1,164 +0,0 @@
-import { CreateFavoriteApi, DelFavoriteApi, FavoriteListApi, UpdateFavoriteApi } from "@/api/favorite";
-import { alert, goLink } from "@/common/common";
-import { getFilterData } from "@/common/util";
-import Product from "./components/product";
-import Search from "@/components/search"
-import { Text, View } from "@tarojs/components"
-import Taro, { useDidHide, useDidShow } from "@tarojs/taro";
-import classnames from "classnames";
-import { useCallback, useEffect, useRef, useState } from "react";
-import CreatePopup from "./components/createPopup";
-import UpdatePopup from "./components/updatePopup";
-import styles from './index.module.scss'
-import useLogin from "@/use/useLogin";
-export default () => {
- useLogin()
- const changeOpenCon = (item) => {
- item.openStatus = !item.openStatus
- setList((e) => [...e])
- }
- useDidShow(() => {
- getFavoriteList()
- })
- //获取搜索数据
- const [searchData, setSearchData] = useState('')
- const onSearch = useCallback((e) => {
- setSearchData(() => e)
- }, [])
- useEffect(() => {
- getFavoriteList()
- }, [searchData])
-
- //获取列表
- const [list, setList] = useState([])
- const {fetchData: fetchDataList} = FavoriteListApi()
- const getFavoriteList = async () => {
- let res = await fetchDataList(getFilterData({name: searchData}))
- setList(() => res.data.list)
- }
-
- //创建收藏夹
- const [collectioinShow, setCollectioinShow] = useState(false)
- const closeCollection = useCallback(() => {
- setCollectioinShow(false)
- }, [])
-
- const creatShow = () => {
- setCollectioinShow(true)
- setInitData(() => ({ remark: '',name: '', id:0}))
- }
-
-
- //新增
- const {fetchData} = CreateFavoriteApi()
- const onCreate = async (submitData) => {
- if(!submitData.name) return alert.none('请输入收藏夹名称!')
- let res = await fetchData({...submitData})
- if(res.success) {
- alert.success('创建成功')
- getFavoriteList()
- } else {
- alert.error('创建失败')
- }
- }
-
- //更多编辑
- const [initData, setInitData] = useState({
- remark: '',
- name: '',
- id:0
- })
- const selectInfo = useRef(null)
- const [updateShow, setUpdateShow] = useState(false)
- const closeUpdate = useCallback(() => {
- setUpdateShow(false)
- }, [])
- const moreUpdate = (item,e) => {
- e.stopPropagation()
- selectInfo.current = item
- console.log('item:::', item)
- setInitData((e) =>({ ...e, remark:item.remark , name: item.name, id: item.id}))
- setUpdateShow(true)
- }
-
- //删除改收藏夹
- const {fetchData: delFetchData} = DelFavoriteApi()
- const onDeleteCollect = useCallback(() => {
- if(!selectInfo.current.id) return alert.error('参数不正确!')
- if(selectInfo.current.id == 1) return alert.none('删除失败,该文件夹不能删除!')
- Taro.showModal({
- content: '确认删除该文件夹?',
- success: async function (res) {
- if (res.confirm) {
- let res = await delFetchData({id: selectInfo.current.id})
- if(res.success) {
- alert.success('删除成功')
- getFavoriteList()
- } else {
- alert.error('删除失败')
- }
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- closeUpdate()
- }, [])
-
- //编辑
- const {fetchData: updateFavoriteFetchData} = UpdateFavoriteApi()
- const onUpdateShow = useCallback(() => {
- setCollectioinShow(true)
- }, [])
- const onUpdate = async (submitData) => {
- if(!submitData.name) return alert.none('请输入收藏夹名称!')
- let res = await updateFavoriteFetchData({...submitData})
- if(res.success) {
- alert.success('编辑成功')
- getFavoriteList()
- closeUpdate()
- } else {
- alert.error('编辑失败')
- }
- }
-
- const onBatchManagement = useCallback(() => {
- goLink('/pages/collection/collectionClass/index', {id: initData.id})
- closeUpdate()
- }, [initData])
-
- //操作文件夹
- const onCreatSuccess = (submitData) => {
- if (!initData.id) {
- onCreate(submitData)
- } else {
- onUpdate({...submitData, id: initData.id})
- }
- setCollectioinShow(false)
- }
-
- return (
-
-
-
-
-
-
- {list?.map((item:any) =>
- changeOpenCon(item)}>
-
- {item.name}
- {item.product_color_list&&<>·{item.product_color_list.length}>}
-
- moreUpdate(item,e)}>更多
-
-
-
-
- )}
-
-
-
-
- )
- }
\ No newline at end of file
diff --git a/src/pages/company/index.config.ts b/src/pages/company/index.config.ts
deleted file mode 100644
index e35cac0..0000000
--- a/src/pages/company/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '公司资料',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/company/index.scss b/src/pages/company/index.scss
deleted file mode 100644
index 17d4e67..0000000
--- a/src/pages/company/index.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-.company{
- display: flex;
- flex-direction: column;
- .save-button{
- width: 668px;
- height: 82px;
- background: #007aff;
- border-radius: 40px;
- font-size: 32px;
- font-weight: 400;
- color: #ffffff;
- display: flex;align-items: center;justify-content: center;
- margin: 320px auto 0;
- }
-
- .form-radio{
- display: flex;
- flex-wrap: wrap;align-items: center;
- }
- .form-radio view{
- height: 54px;
- background: #f0f0f0;
- border-radius: 28px;
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- padding: 10px 28px;
- box-sizing: border-box;
- display: flex;align-items: center;justify-content: center;
- margin: 10px;
- border: 2px solid #f0f0f0;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- }
- .form-radio .form-radio-active{
- background: #ecf5ff;
- border: 2px solid #cde5ff;
- }
-}
\ No newline at end of file
diff --git a/src/pages/company/index.tsx b/src/pages/company/index.tsx
deleted file mode 100644
index e2b9845..0000000
--- a/src/pages/company/index.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-
-import Address from "@/components/address"
-import FromList from "@/components/FromList"
-import { Button, Input, Text, Textarea, View } from "@tarojs/components"
-import Taro, { getCurrentPages, useRouter } from "@tarojs/taro"
-import { useEffect, useState } from "react"
-import { alert, retrieval } from "@/common/common";
-import { companyDetailApi, companyUpdateApi } from "@/api/company"
-import "./index.scss"
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- const [showSiteModal, setShowSiteModal] = useState(false);
- const handleSelectSite = ()=>{
- setShowSiteModal(true);
- }
- // 获取公司信息
- const {fetchData: getFromData} = companyDetailApi();
- const getData = async ()=>{
- const result = await getFromData();
- console.log(result.data,"===");
-
- setFormData({
- ...result.data,
-
- });
- }
- useEffect(()=>{
- getData();
- },[])
- // 保存
- const [formData, setFormData] = useState({
- address_detail: "",
- city_id: 0,
- company_id: 0,
- company_long_name: "",
- company_name: "",
- company_type: [
- 0
- ],
- director: "",
- district_id: 0,
- phone: "",
- province_id: 0,
- site:"",
- siteArray: []
- })
- const rules = {
- company_name: [{
- message: "请输入公司名称"
- }],
- company_long_name: [{
- message: "请输入公司全称"
- }],
- director: [{
- message: "请输入联系人"
- }],
- phone: [{
- message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
- }],
- district_id: [{
- message: "请选择地址"
- }],
- address_detail: [{
- message: "请输入详细地址"
- }],
- }
- const {fetchData: saveFetch} = companyUpdateApi();
- const handleSave = ()=>{
- retrieval(formData, rules).then(async ()=>{
- const result = await saveFetch({
- address_detail: formData.address_detail,
- city_id: formData.city_id,
- company_id: formData.company_id,
- company_long_name: formData.company_long_name,
- company_name: formData.company_name,
- company_type: formData.company_type,
- director: formData.director,
- district_id: formData.district_id,
- phone: formData.phone,
- province_id: formData.province_id
- });
- if(result.success){
- Taro.eventCenter.trigger('company:detail')
- Taro.navigateBack();
- alert.success("保存成功");
- }else{
- alert.error(result.msg);
- }
- }).catch(message=>{
- alert.none(message)
- })
-
- Taro.navigateBack();
- }
- // 单选
- const radioData = ['布行','二批','制衣厂'];
- const [radioActive, setRadioActive] = useState(0);
- const handleActiveRadio = (index:number)=>{
- setRadioActive(index);
- }
- // 设置选择地址
- const handleSetSite = (ev:any)=>{
- if(ev.length>=3){
- setFormData({
- ...formData,
- siteArray: ev,
- site: ev.map(item=>item.name+" "),
- province_id: ev[0]?.id,
- city_id: ev[1]?.id,
- district_id: ev[ev.length-1]?.id,
- })
- }else{
- alert.error("请选择完整地址");
- }
- }
- // 监听表单完善
- const [hozon, setHozon] = useState(false);
- useEffect(()=>{
- if(retrieval){
- retrieval(formData).then(()=>setHozon(true)).catch(()=>setHozon(false))
- }
- },[formData])
-
- return (
-
- setFormData({...formData,company_name:ev.detail.value})} value={formData["company_name"]} label="公司名称" placeholder="请输入公司名称"/>
- setFormData({...formData,company_long_name:ev.detail.value})} value={formData["company_long_name"]} label="公司全称" placeholder="请输入公司全称"/>
-
-
- {
- radioData.map((item,index)=>{
- return handleActiveRadio(index)} className={radioActive==index?'form-radio-active':''} key={index}>{item}
- })
- }
-
-
- setFormData({...formData,director:ev.detail.value})} value={formData["director"]} label="联系人" placeholder="请输入联系人"/>
- setFormData({...formData,phone:ev.detail.value})} value={formData["phone"]} label="联系方式" placeholder="请输入联系方式"/>
-
- setFormData({...formData,address_detail:ev.detail.value})} value={formData["address_detail"]} label="详细地址" type="textarea" placeholder="请输入详细地址(街道、门牌号等)"/>
-
-
-
- {/* setShowSiteModal(false)} show={showSiteModal}/> */}
- setShowSiteModal(false)} show={showSiteModal}/>
-
- )
-}
diff --git a/src/pages/creditLine/index.config.ts b/src/pages/creditLine/index.config.ts
deleted file mode 100644
index 7b71ba1..0000000
--- a/src/pages/creditLine/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '授信额度',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/creditLine/index.scss b/src/pages/creditLine/index.scss
deleted file mode 100644
index 21f24ab..0000000
--- a/src/pages/creditLine/index.scss
+++ /dev/null
@@ -1,92 +0,0 @@
-.credit-line{
- height: 100vh;
- background-color: #f3f3f3;
- canvas{
- width: 238px;
- height: 238px;
- }
- .credit-line-card{
- width: 702px;
- background: #ffffff;
- border-radius: 20px;
- margin: 20px auto 0;
- padding: 0 30px;
- box-sizing: border-box;
- }
- .credit-line-card-top{
- display: flex;align-items: flex-end;
- padding: 30px 20px;
- border-bottom: 1px solid #f6f6f6;
- position: relative;
- }
- .credit-line-card-top-info{
- text-align: center;
- flex: 1;
- }
- .credit-line-card-top-info-title{
- font-size: 24px;
- font-weight: 700;
- color: #000000;
- margin-bottom: 16px;
- }
- .credit-line-card-top-info-price{
- font-size: 44px;
- font-weight: 700;
- color: #007aff;
- margin-bottom: 48px;
- }
- .credit-line-card-top-info-price text{
- font-size: 20px;
- }
- .credit-line-card-top-info-date{
- font-size: 22px;
- font-weight: 400;
- color: #ababab;
- }
- .credit-line-card-top-status{
- padding: 0 20px;
- height: 38px;
- background: #ebfaea;
- font-size: 22px;
- font-weight: 400;
- color: #07c160;
- display: flex;align-items: center;justify-content: center;
- border-top-right-radius: 20px;
- border-bottom-left-radius: 20px;
- position: absolute;right: 0;top: 30px;
- }
- .credit-line-card-bottom{
- padding: 30px 0;
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- text-align: center;
- }
- .credit-line-card-bottom-item-title{
- font-size: 24px;
- font-weight: 700;
- color: #000000;
- display: flex;
- align-items: center;justify-content: center;
- margin-bottom: 15px;
- line-height: 38px;
- }
- .credit-line-card-bottom-item-title text{
- font-size: 40px;
- margin-right: 10px;
- color: #007AFF;
- }
- .credit-line-card-bottom-item-title .miconfont{
- color: #ccc;
- }
- .credit-line-card-bottom-item:nth-child(2) .credit-line-card-bottom-item-title text{
- font-size: 28px;
- }
- .credit-line-card-bottom-item-price{
- font-size: 40px;
- font-weight: 400;
- color: #ababab;
- }
- .credit-line-card-bottom-item-price text{
- font-size: 20px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/creditLine/index.tsx b/src/pages/creditLine/index.tsx
deleted file mode 100644
index 52b1d67..0000000
--- a/src/pages/creditLine/index.tsx
+++ /dev/null
@@ -1,252 +0,0 @@
-
-import AddressList from "@/components/AddressList"
-import { Button, Canvas, Navigator, ScrollView, Text, View } from "@tarojs/components"
-import Taro, { useReady } from "@tarojs/taro"
-import { useEffect, useState } from "react"
-import {creditInfoApi} from "@/api/creditLine"
-import "./index.scss"
-import { useSelector } from "@/reducers/hooks";
-import { formatDateTime, formatPriceDiv } from "@/common/fotmat"
-import Message from "@/components/Message"
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- const userInfo = useSelector(state => state.userInfo);
- useEffect(()=>{
- getData()
- }, [])
- const {fetchData, state} = creditInfoApi();
- const [data, setData] = useState({
- credit_quota_used_line: [0,"00"],
- credit_quota_line: [0,"00"],
- credit_quota_available_line: [0,"00"],
- progress: 0,
- create_time: "",
- quota_status_name: "",
- quota_status: "",
- credit_quota_start_time: "",
- credit_quota_end_time: ""
- });
- const [style, setStyle]= useState({
- type: {},
- cir: {
- color: "",
- background: {start: [], end: []}
- },
- available: {},
- bottomTitle: {}
- });
- // 获取数据
- const getData = async ()=>{
- const result = await fetchData();
- const credit_quota_used_line = convertPrice(formatPriceDiv(result.data.credit_quota_used_line));
- const credit_quota_line = convertPrice(formatPriceDiv(result.data.credit_quota_line));
- const credit_quota_available_line = convertPrice(formatPriceDiv(result.data.credit_quota_available_line));
- const progress = credit_quota_available_line[0]==0&&credit_quota_line[0]==0?100:((credit_quota_available_line[0]??0) / (credit_quota_line[0]??0) * 100).toFixed(0);
-
-
- switch(Number(result.data.quota_status)){
- case 0://暂未开通
- setStyle({
- type: {background: "#e4e4ff",color: "#1818B4" },
- cir: {
- color: "#707070",
- background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
- },
- available: {color: "#707070", textDecoration: "line-through"},
- bottomTitle: {color: "#cccccc"}
- })
- break;
- case 1://申请中
- setStyle({
- type: {background: "#cde5ff",color: "#007AFF" },
- cir: {
- color: "#707070",
- background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
- },
- available: {color: "#707070", textDecoration: "line-through"},
- bottomTitle: {color: "#cccccc"}
- })
- break;
- case 2://生效中
- setStyle({
- type: {background: "#cde5ff",color: "#007AFF" },
- cir: {
- color: "#007aff",
- background: {start: ["#047CFF", "#51A4FF"] as any, end: ["#87C0FF", "#57A8FF"] as any}
- },
- available: {color: "#007aff"},
- bottomTitle: {color: "#007AFF"}
- })
- break;
- case 3://已失效
- setStyle({
- type: {background: "#f6f6f6",color: "#ABABAB" },
- cir: {
- color: "#707070",
- background: {start: ["#727272", "#CDCDCD"] as any, end: ["#CDCDCD", "#EEEEEE"] as any}
- },
- available: {color: "#707070", textDecoration: "line-through"},
- bottomTitle: {color: "#cccccc"}
- })
- break;
- case 4://失效待还款
- setStyle({
- type: {background: "#FFE6CE",color: "#EE7500" },
- cir: {
- color: "#707070",
- background: {start: ["#EF7907", "#FAC897"] as any, end: ["#FAC897", "#FFE6CE"] as any}
- },
- available: {color: "#EE7500"},
- bottomTitle: {color: "#007AFF"}
- })
- break;
- }
-
- setData({
- ...result.data,
- progress,
- credit_quota_used_line,
- credit_quota_line,
- credit_quota_available_line,
- credit_quota_start_time: formatDateTime(result.data?.credit_quota_start_time, "YYYY-MM-DD"),
- credit_quota_end_time: formatDateTime(result.data?.credit_quota_end_time, "YYYY-MM-DD"),
- })
- }
- const convertPrice = (data)=>{
- var t = data.toString().split(".");
- t[1] = t[1]?t[1].padEnd(2,0):"00";
- return t;
- }
-
-
- return (
-
-
-
-
-
-
- 可用额度
- ¥{Number(data.credit_quota_available_line[0])?.toLocaleString()}.{data.credit_quota_available_line[1]}
- 有效期: {data?.credit_quota_start_time} 至{data?.credit_quota_end_time}
-
- {data.quota_status_name}
-
-
-
-
-
- 总额度
-
- ¥{Number(data.credit_quota_line[0])?.toLocaleString()}.{data.credit_quota_line[1]}
-
-
-
-
- 已用额度
-
-
- ¥{Number(data?.credit_quota_used_line[0])?.toLocaleString()}.{data.credit_quota_used_line[1]}
-
-
-
-
- )
-}
-
-const Progress = (props)=>{
- useEffect(()=>{
- if(props.progress!=0){
- getCanvas();
- }
- },[props.progress])
- const getCanvas = ()=>{
- // const percentage = props.progress??0;
- const percentage = props.progress||0;
- const query = Taro.createSelectorQuery();
- query.select("#myCanvas").fields({ node: true, size: true }).exec((res) => {
- const canvas = res[0]?.node;
- if(canvas){
- const ctx = canvas.getContext('2d');
- const { windowHeight, windowWidth } = Taro.getSystemInfoSync();
- const dpr = 750 / windowWidth;
- canvas.width = res[0].width * dpr;
- canvas.height = res[0].height * dpr;
- const r = canvas.width / 2;
- ctx.translate(r,r);
-
- // 白色大圆
- ctx.beginPath();
- ctx.fillStyle = "white";
- ctx.shadowBlur = 20;
- ctx.shadowColor = "#cde5ff";
- ctx.arc(0,0,100,0,2*Math.PI, false);
- ctx.fill();
-
- // 刻度
- const my_minute = Math.PI*2/60;
- const my_second = Math.PI*2/60;
- ctx.strokeStyle="#F59F5D";
- ctx.lineWidth=2;
- ctx.beginPath();
- for(let i=0;i<15;i++){
- ctx.save();
- ctx.rotate(i*4*my_minute);
- ctx.moveTo(r-45,0);
- ctx.lineTo(r-40,0);
- ctx.stroke();
- ctx.restore();
- }
-
- // 白色小圆
- ctx.beginPath();
- ctx.fillStyle = "white";
- ctx.shadowBlur = 20;
- ctx.shadowColor = "rgba(204,204,204,0.50)";
- ctx.arc(0,0,74,0,2*Math.PI, false);
- ctx.fill();
-
- // 文字
- ctx.beginPath();
- ctx.restore();
-
- ctx.fillStyle = props.style?.cir?.color// "#007aff";
- ctx.font="42px Cambria, Cambria-Bold";
- ctx.textAlign="center";
- ctx.textBaseline="middle";
- ctx.fillText(percentage+"%", 0,0);
-
- // 蓝色的圆
- if(percentage>0){
- ctx.beginPath();
- ctx.lineWidth = 25;
- ctx.lineCap = "round";
- const gad = ctx.createLinearGradient(100,0,0,100);
- gad.addColorStop(0, props.style?.cir?.background?.start[0]);
- gad.addColorStop(1, props.style?.cir?.background?.start[1]);
- ctx.strokeStyle = gad;
- ctx.arc(0,0,104,-Math.PI*0.5,2*Math.PI/100*((percentage<50?percentage:50)-25), false);
- ctx.stroke();
- }
-
- if(percentage>50){
- ctx.beginPath();
- const gad2 = ctx.createLinearGradient(0,-100,0,0);
- gad2.addColorStop(0, props.style?.cir?.background?.end[0]);
- gad2.addColorStop(1, props.style?.cir?.background?.start[1]);
- ctx.strokeStyle = gad2;
- ctx.arc(0,0,104,Math.PI*0.4,2*Math.PI/100*(percentage-25), false);
- ctx.stroke();
- }
- }else{
- getCanvas();
- }
- });
- }
- useReady(()=>{
- getCanvas();
- })
- return
-}
\ No newline at end of file
diff --git a/src/pages/creditUsed/index.config.ts b/src/pages/creditUsed/index.config.ts
deleted file mode 100644
index 386d82b..0000000
--- a/src/pages/creditUsed/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '已用额度',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/creditUsed/index.scss b/src/pages/creditUsed/index.scss
deleted file mode 100644
index 9a1db48..0000000
--- a/src/pages/creditUsed/index.scss
+++ /dev/null
@@ -1,44 +0,0 @@
-.credit-used{
- height: 100vh;
- background-color: #f3f3f3;
- .credit-used-list{
- background-color: white;
- padding: 30px 25px;
- border-bottom: 1px solid #f6f6f6;
- }
- .credit-used-list-top{
- display: flex;justify-content: space-between;
- margin-bottom: 20px;
- }
- .credit-used-list-type{
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- }
- .credit-used-list-price{
- font-size: 28px;
- font-weight: 400;
- }
- .credit-used-list-price-add{
- color: red;
- }
- .credit-used-list-bottom{
- display: flex;justify-content: space-between;
- }
- .credit-used-list-date{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- }
- .credit-used-list-orderno{
- font-size: 20px;
- font-weight: 400;
- color: #ababab;
- }
- .green{
- color: #07C160;
- }
- .red{
- color: #FF0000;
- }
-}
\ No newline at end of file
diff --git a/src/pages/creditUsed/index.tsx b/src/pages/creditUsed/index.tsx
deleted file mode 100644
index 5a3949e..0000000
--- a/src/pages/creditUsed/index.tsx
+++ /dev/null
@@ -1,175 +0,0 @@
-import InfiniteScrollPaging from "@/components/InfiniteScrollPaging"
-import { Button, Canvas, ScrollView, Text, View } from "@tarojs/components"
-import Taro, { useReady } from "@tarojs/taro"
-import { useCallback, useEffect, useMemo, useRef, useState } from "react"
-import {creditListApi} from "@/api/creditLine"
-import "./index.scss"
-import classnames from "classnames";
-import { formatDateTime, formatPriceDiv, toDecimal2 } from "@/common/fotmat"
-import { dataLoadingStatus, getFilterData } from "@/common/util";
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- const {fetchData, state} = creditListApi();
- // 渲染(数据)
- const [data, setData] = useState({
- list: [],
- total: 0
- });
- const handleChange = useCallback((result)=>{
- setData({
- list: result.data.list,
- total: result.data.total
- })
- }, [])
-
- return (
-
-
- {
- (data as any)?.list?.map((item,index)=>{
- return (
-
-
- {item.quota_order_status_name}
-
- {item.trans_type==2?"-":"+"}{toDecimal2(formatPriceDiv(item.amount)).toLocaleString()}
-
-
-
- {formatDateTime(item.order_pay_time)}
- 订单号:{item.order_no}
-
-
- )
- })
- }
- {/* {data.length>0&&} */}
-
-
-
- )
-}
-
-// export default ()=>{
-// useEffect(()=>{
-// refreshDataRef.current = refreshData;
-// dataRef.current = data;
-// getData({
-// moreStatus: true
-// },{
-// moreStatus: true
-// });
-// }, [])
-// const {fetchData, state} = creditListApi();
-// const getData = async (startStatus, endStatus)=>{
-// const tRefreshDataRef = refreshDataRef.current as any;
-// setRefreshData({
-// ...tRefreshDataRef,
-// ...startStatus
-// })
-// const result = await fetchData({
-// page: tRefreshDataRef.page,
-// size: tRefreshDataRef.size,
-// });
-// if(result.success){
-// if(result.data.total<=0){
-// setRefreshData({
-// ...tRefreshDataRef,
-// ...endStatus
-// })
-// }else{
-// setData({
-// list: result.data.list,
-// // list: tRefreshDataRef.page>1?(dataRef.current as any).list.concat(result.data.list):result.data.list,
-// total: result.data.total
-// })
-// setRefreshData({
-// ...tRefreshDataRef,
-// refreshStatus: false,
-// moreStatus: false
-// })
-// }
-// }
-// }
-// // 加载刷新数据
-// const [refreshData, setRefreshData] = useState({
-// refreshStatus: false,
-// moreStatus: false,
-// page: 1,
-// size: 10
-// })
-// const refreshDataRef = useRef({});
-// // 渲染(数据)
-// const [data, setData] = useState({
-// list: [],
-// total: 0
-// });
-// const dataRef = useRef({});
-// // 下拉刷新
-// const handleRefresh = async ()=>{
-// let tRefreshData = refreshDataRef.current as any;
-// setRefreshData({
-// ...tRefreshData,
-// page: 1,
-// size: 10,
-// })
-// getData({
-// refreshStatus: true,
-// moreStatus: false
-// },{
-// refreshStatus: false,
-// moreStatus: true
-// });
-// }
-// // 加载更多
-// const handleMoreLoad = async ()=>{
-// let t = (dataRef.current as any);
-// let tRefreshData = refreshDataRef.current as any;
-// if(t.list.length {
-
-// return dataLoadingStatus({list:data.list, total: data.total, status: refreshData.moreStatus})
-// }, [data])
-
-
-// return (
-//
-//
-// {
-// (data as any)?.list?.map((item,index)=>{
-// return (
-//
-//
-// 下单
-// 0?'green':item.amount<0?'red':''}`}>{item.amount.toLocaleString()}
-//
-//
-// {formatDateTime(item.order_pay_time)}
-// 订单号:{item.order_no}
-//
-//
-// )
-// })
-// }
-// {/* {data.length>0&&} */}
-//
-//
-//
-// )
-// }
diff --git a/src/pages/depositBeforehand/index.config.ts b/src/pages/depositBeforehand/index.config.ts
deleted file mode 100644
index 67281be..0000000
--- a/src/pages/depositBeforehand/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '预存款',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/depositBeforehand/index.scss b/src/pages/depositBeforehand/index.scss
deleted file mode 100644
index 157ea4f..0000000
--- a/src/pages/depositBeforehand/index.scss
+++ /dev/null
@@ -1,88 +0,0 @@
-.deposit-beforehand{
- height: 100vh;
- background-color: #f3f3f3;
- display: flex;
- flex-direction: column;
-
- .deposit-beforehand-card{
- width: 702px;
- background: #ffffff;
- border-radius: 20px;
- margin: 30px auto;
- padding: 30px;
- box-sizing: border-box;
- }
- .deposit-beforehand-balance{
- display: flex;flex-direction: column;align-items: center;
- }
- .deposit-beforehand-balance-title{
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- margin-bottom: 35px;
- }
- .deposit-beforehand-balance-price{
- font-size: 40px;
- font-weight: 700;
- color: #000000;
- margin-bottom: 70px;
- }
- .deposit-beforehand-balance-button{
- width: 276px;
- height: 74px;
- background: #007aff;
- border-radius: 38px;
- display: flex;align-items: center;justify-content: center;
- color: white;
- margin-bottom: 10px;
- }
-
- .deposit-beforehand-info-title{
- display: flex;justify-content: space-between;
- margin-bottom: 50px;
- }
- .deposit-beforehand-info-title-left{
- font-size: 28px;
- font-weight: 700;
- color: #000000;
- }
- .deposit-beforehand-info-title-copy{
- font-size: 24px;
- font-weight: 400;
- color: #007aff;
- }
- .deposit-beforehand-info-list{
- display: flex;align-items: center;
- margin-bottom: 38px;
- }
- .deposit-beforehand-info-list-left{
- width: 160px;
- font-size: 24px;
- font-weight: 400;
- color: #3c3c3c;
- border-right: 1px solid #dddddd;
- margin-right: 25px;
- }
- .deposit-beforehand-info-list-right{
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- }
-
- .deposit-beforehand-particulars{
- display: flex;align-items: center;justify-content: space-between;
- }
- .deposit-beforehand-particulars-left{
- font-size: 28px;
- font-weight: 700;
- color: #000000;
- }
- .deposit-beforehand-particulars-right{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- }
- .deposit-beforehand-particulars-right text{
- font-size: 28px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/depositBeforehand/index.tsx b/src/pages/depositBeforehand/index.tsx
deleted file mode 100644
index 6232afc..0000000
--- a/src/pages/depositBeforehand/index.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-import { Button, Canvas, Navigator, ScrollView, Text, View } from "@tarojs/components"
-import "./index.scss"
-import { depositInfoApi } from "@/api/deposit"
-import { useEffect } from "react";
-import { formatPriceDiv, toDecimal2 } from "@/common/fotmat";
-import { setClipboardData } from "@tarojs/taro";
-import Message from "@/components/Message";
-import useLogin from "@/use/useLogin";
-
-export default ()=>{
- useLogin()
- const {fetchData, state} = depositInfoApi();
- const getData = async ()=>{
- fetchData();
- }
- useEffect(() => {
- getData();
- }, []);
- // 复制
- const handleCopy = ()=>{
- setClipboardData({data: state.data?.transfer_remittance_account})
- }
-
-
- return (
-
-
-
-
- 余额 (元)
- {toDecimal2(formatPriceDiv(state.data?.amount)).toLocaleString()}
- 转出
-
-
-
-
-
- 预存款充值
- 复制
-
-
-
- 开户名称
- {state.data?.account_name}
-
-
- 开户银行
- {state.data?.bank_of_deposit}
-
-
- 专属汇款账号
- {state.data?.transfer_remittance_account}
-
-
-
-
-
-
- 收支明细
-
- 全部
-
-
-
-
- )
-}
diff --git a/src/pages/depositBeforehandDetail/index.config.ts b/src/pages/depositBeforehandDetail/index.config.ts
deleted file mode 100644
index 602fd5e..0000000
--- a/src/pages/depositBeforehandDetail/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '交易详情',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/depositBeforehandDetail/index.scss b/src/pages/depositBeforehandDetail/index.scss
deleted file mode 100644
index 662f147..0000000
--- a/src/pages/depositBeforehandDetail/index.scss
+++ /dev/null
@@ -1,156 +0,0 @@
-.deposit-detail{
- // height: 100vh;
- // background-color: #f3f3f3;
- .deposit-detail-tips{
- width: 100%;
- height: 66px;
- background: #FFE6CE;
- border: 2px solid #ffe6ce;
- padding: 0 30px;
- display: flex;align-items: center;
- font-size: 24px;
- font-weight: 400;
- color: #EE7500;
- margin: 0;
- }
- .deposit-detail-tips text{
- margin-right: 10px;
- font-size: 30px;
- }
- &>view{
- padding: 30px 0;
- margin: 0 25px;
- border-bottom: 1px solid #F6F6F6;
- }
- &>view:last-child{
- border-bottom: 0;
- }
- .deposit-amount{
- text-align: center;
- }
- .deposit-type{
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- margin-bottom: 35px;
- }
- .deposit-price{
- font-size: 40px;
- font-weight: 700;
- color: #000000;
- }
- .deposit-status{
- display: flex;
- }
- .deposit-status-title{
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- margin-right: 105px;
- }
- .deposit-voucher-title{
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- margin-bottom: 28px;
- }
- .deposit-voucher-title::before{
- content: "*";
- color: #007AFF;
- }
- .deposit-voucher-content{
- display: grid;
- grid-template-columns: repeat(5, 1fr);
- gap: 30px;
- height: 98px;
- }
- .deposit-voucher-content image{
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .deposit-info-list{
- display: flex;
- margin-bottom: 20px;
- }
- .deposit-info-list-title{
- width: 140px;
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- border-right: 1px solid #F0F0F0;
- }
- .deposit-info-list-content{
- width: 468px;
- font-size: 24px;
- font-weight: 400;
- color: #000000;
- padding-left: 25px;
- box-sizing: border-box;
- }
- .deposit-info-list-copy{
- font-size: 20px;
- font-weight: 400;
- color: #ababab;
- padding-left: 18px;
- border-left: 1px solid #F0F0F0;
- }
-
- .deposit-timeline{
-
- }
- .deposit-timeline-item{
- display: flex;
- margin-left: 50px;
- height: 100px;
- }
- .deposit-timeline-item-title{
- font-size: 24px;
- font-weight: 400;
- color: #3c3c3c;
- }
- .deposit-timeline-item-date{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- }
- .deposit-timeline-item-left{
- position: relative;
- margin-right: 55px;
- width: 12px;
- }
- .deposit-timeline-item-left::before{
- content: " ";
- width: 12px;
- height: 12px;
- background: #007aff;
- border-radius: 50%;
- display: block;
- margin-top: 10px;
- }
- .deposit-timeline-item-left::after{
- content: " ";
- border-right: 1px dashed #007aff;
- position: absolute;top: 25px;bottom: -8px;
- left: 50%;transform: translateX(-50%);
- }
- .deposit-timeline-item-success,.deposit-timeline-item-error{
- position: relative;
- margin-right: 55px;
- width: 12px;
- }
- .deposit-timeline-item-error Text,.deposit-timeline-item-success Text{
- display: inline-block;
- width: 38px;
- height: 38px;
- background: #007aff;
- border-radius: 50%;
- position: absolute;left: 50%;transform: translateX(-50%);
- color: white;
- font-size: 30px;
- display: flex;align-items: center;justify-content: center;
- }
- .deposit-timeline-item-error Text{
- background: #cccccc;
- }
-}
\ No newline at end of file
diff --git a/src/pages/depositBeforehandDetail/index.tsx b/src/pages/depositBeforehandDetail/index.tsx
deleted file mode 100644
index 11abfb0..0000000
--- a/src/pages/depositBeforehandDetail/index.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-
-import AddressList from "@/components/AddressList"
-import InfiniteScroll from "@/components/infiniteScroll"
-import { Button, Canvas, Image, ScrollView, Text, View } from "@tarojs/components"
-import Taro, { useReady } from "@tarojs/taro"
-import { useEffect, useState } from "react"
-import {creditListApi} from "@/api/creditLine"
-import "./index.scss"
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- return (
-
-
- 转入失败原因:付款凭证与实际转入信息不符,请重新上传。
-
-
- 转入 (元)
- 999,999.20
-
-
- 状态
-
-
-
- 付款凭证
-
-
-
-
-
-
-
- 银行流水号
- 2278204399678121212121288
- 复制
-
-
- 付款人
- 带生
-
-
- 付款账号
- 带生
- 复制
-
-
- 联系方式
- 带生
-
-
- 备注信息
- 带生
-
-
-
- )
-}
-
-const TimeLine = ()=>{
- return(
-
-
-
-
- 申请提交
- 2022-04-24 16:10:11
-
-
-
-
-
- 申请提交
-
-
-
-
-
-
-
- 申请提交
- 2022-04-24 16:10:11
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/depositList/index.config.ts b/src/pages/depositList/index.config.ts
deleted file mode 100644
index 861e10c..0000000
--- a/src/pages/depositList/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '收支明细',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/depositList/index.scss b/src/pages/depositList/index.scss
deleted file mode 100644
index f58398d..0000000
--- a/src/pages/depositList/index.scss
+++ /dev/null
@@ -1,49 +0,0 @@
-.credit-used{
- height: 100vh;
- background-color: #f3f3f3;
- .credit-used-list{
- background-color: white;
- padding: 30px 25px;
- border-bottom: 1px solid #f6f6f6;
- display: flex;justify-content: space-between;
- }
- .credit-used-list-left{
- }
- .credit-used-list-type{
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- margin-bottom: 20px;
- }
- .credit-used-list-price{
- font-size: 28px;
- font-weight: 400;
- }
- .credit-used-list-right{
- display: flex;align-items: center;
- }
- .credit-used-list-right-price view{
- display: flex;align-items: center;
- }
- .credit-used-list-right text{
- font-size: 30px;
- margin-left: 10px;
- }
- .credit-used-list-date{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- }
- .credit-used-list-orderno{
- font-size: 20px;
- font-weight: 400;
- margin-top: 20px;
- color: #ababab;
- }
- .green{
- color: #07C160;
- }
- .red{
- color: #FF0000;
- }
-}
\ No newline at end of file
diff --git a/src/pages/depositList/index.tsx b/src/pages/depositList/index.tsx
deleted file mode 100644
index 4173f14..0000000
--- a/src/pages/depositList/index.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import AddressList from '@/components/AddressList'
-import InfiniteScrollPaging from '@/components/InfiniteScrollPaging'
-import { Button, Canvas, ScrollView, Text, View } from '@tarojs/components'
-import Taro, { useReady } from '@tarojs/taro'
-import { useCallback, useEffect, useState } from 'react'
-import { depositListApi } from '@/api/deposit'
-import './index.scss'
-import { formatDateTime, formatPriceDiv } from '@/common/fotmat'
-import useLogin from '@/use/useLogin'
-
-export default () => {
- useLogin()
- const { fetchData, state } = depositListApi()
- // 渲染(数据)
- const [data, setData] = useState({
- list: [],
- total: 0,
- })
- // 数据更新
- const handleChange = useCallback((result) => {
- setData({
- list: result.data.list,
- total: result.data.total,
- })
- }, [])
-
- return (
-
-
- {data.list?.map((item, index) => {
- let res: any = item
- return (
- res.amount_received_this_time != 0 && (
-
-
- {res.type_name}
- {formatDateTime(res.create_time)}
-
-
-
-
- {[1, 2, 3].includes(res.type as never) ? '+' : '-'}
- {formatPriceDiv(res.amount_received_this_time)}
-
- {/* 处理中 */}
-
-
-
-
- )
- )
- })}
- {/* {data.length>0&&} */}
-
-
-
- )
-}
diff --git a/src/pages/details/components/counter/index.module.scss b/src/pages/details/components/counter/index.module.scss
deleted file mode 100644
index 2748cef..0000000
--- a/src/pages/details/components/counter/index.module.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-
-.main{
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- .plus{
- color: $color_main;
- width: 46px;
- height: 46px;
- text-align: center;
- line-height: 43px;
- font-size: 50px;
- background-color: $color_main;
- color: #fff;
- border-radius: 8px;
- }
- .reduce {
- font-size: 50px;
- width: 46px;
- height: 46px;
- text-align: center;
- line-height: 43px;
- color:#007AFF;
- }
- .input{
- display: flex;
- align-items: flex-end;
- background-color: #fff;
- padding: 5px 10px;
- box-sizing: border-box;
- width: 106px;
- border-radius: 10px;
- input{
- font-size: $font_size_medium;
- text-align: right;
- padding-right: 10px;
- }
- }
-
- .unit{
- font-size: $font_size_min;
- color: $color_font_two;
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/details/components/counter/index.tsx b/src/pages/details/components/counter/index.tsx
deleted file mode 100644
index 3bc52fe..0000000
--- a/src/pages/details/components/counter/index.tsx
+++ /dev/null
@@ -1,113 +0,0 @@
-import { Input, View } from "@tarojs/components"
-import { useEffect, useMemo, useRef, useState } from "react"
-import Big from 'big.js'
-import styles from "./index.module.scss"
-type params = {
- minNum?: number, //最小值
- maxNum?: number, //最大值
- step?: number, //步长
- defaultNum?: number, //默认值
- digits?: number //多少位小数
- onChange?:(val: number, obj?: any) => void,
- onBlue?:(val:number, obj?: any) => void, //失去焦点触发
- onClickBtn?:(val:number, obj?: any) => void,
- unit?: string,
- otherData?: any
-}
-export default ({minNum = 0, maxNum = 100, step=1, digits = 0, defaultNum = 0, onChange, onBlue, onClickBtn, unit = '', otherData}: params) => {
- const [value, setValue] = useState({count:defaultNum})
-
-
- const onPlus = () => {
- let {count} = value
- let num_res = Big(count).add(step).toNumber()
- num_res = num_res >= maxNum?maxNum:num_res
- num_res = formatDigits(num_res)
- setValue({...value, count:num_res})
- onChange?.(parseFloat(num_res), otherData)
- onClickBtn?.(parseFloat(num_res), otherData)
- }
- const minus = () => {
- let {count} = value
- let num_res = Big(count).minus(step).toNumber()
- num_res = num_res < minNum?0:num_res
- setValue({...value, count:num_res})
- onChange?.(parseFloat(num_res), otherData)
- onClickBtn?.(parseFloat(num_res), otherData)
- }
-
- //保留小数
- const formatDigits = (num) => {
- num = num + ''
- if(num.includes('.')&&digits > 0) {
- console.log('num::',num.includes('.'))
- let res = num.split('.')
- let last_num = res[1].substr(0, digits)
- return res[0] + '.' + last_num
- }
- return parseFloat(num)
- }
-
- //检查数据
- const checkData = (val) => {
- let num = parseFloat(val)
- if(num > maxNum) return maxNum
- if(num < minNum) return minNum
- return val
- }
-
-
- const onInputEven = (e) => {
- let res = e.detail.value
- if(res === '') {
- setValue({...value, count:minNum})
- onChange?.(minNum, otherData)
- }
- else if(!isNaN(Number(res))) {
- let count = formatDigits(res)
- count = checkData(count)
- setValue({...value, count})
- onChange?.(parseFloat(count as string), otherData)
- } else {
- let num = parseFloat(res)
- if(!isNaN(num)) {
- let count = formatDigits(num)
- count = checkData(count)
- setValue({...value, count})
- onChange?.(count as number, otherData)
- } else {
- setValue({...value, count:defaultNum})
- onChange?.(defaultNum, otherData)
- }
-
- }
- }
-
- const onBluerEven = () => {
- let num = parseFloat(value.count)
- if(!isNaN(num)) {
- let count = formatDigits(num)
- count = checkData(count)
- setValue({...value, count})
- onBlue?.(count as number, otherData)
- } else {
- setValue({...value, count:defaultNum})
- onBlue?.(defaultNum, otherData)
- }
- }
- return (
-
- minus()}>-
-
-
- {unit}
-
- onPlus()}>+
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/details/components/orderCount/index.module.scss b/src/pages/details/components/orderCount/index.module.scss
deleted file mode 100644
index 705cf29..0000000
--- a/src/pages/details/components/orderCount/index.module.scss
+++ /dev/null
@@ -1,176 +0,0 @@
-.shop_cart_main{
- .popup_con{
- height: 80vh;
- display: flex;
- flex-direction: column;
- }
- .header{
- color: $color_font_one;
- font-size: 32px;
- font-weight: 700;
- padding: 20px;
- }
- .colorFind{
- padding: 10px 20px;
- display: flex;
- align-items: center;
- .search{
- flex:1;
- }
- .text{
- font-size: $font_size_medium;
- color: $color_main;
- }
- }
- .search{
- display: flex;
- align-items: center;
- padding: 20px;
- .search_title{
- font-size: $font_size;
- color: #000;
- width: 160px;
- }
- .search_list{
- display: flex;
- justify-content: space-between;
- flex:1;
- }
- .search_item{
- width: 148px;
- height: 55px;
- text-align: center;
- line-height: 55px;
- color: $color_font_two;
- font-size: $font_size_medium;
- background-color: #f0f0f0;
- border-radius: 50px;
- }
- .search_item_select{
- border: 2px solid $color_main;
- background-color: #ecf5ff;
- color: $color_main;
- width: 144px;
- height: 51px;
- }
- }
- .colorNum{
- display: flex;
- justify-content: space-between;
- padding: 20px;
- .title{
- font-size: 26px;
- }
- .miconfont{
- font-size: 36px;
- color: $color_font_two;
- }
- }
- .product_color_con{
- flex:1;
- height: 0;
- padding-bottom:151px;
- }
- .color_con{
- .virtual_list{
- padding-bottom: 300px;
- }
- .item {
- display: flex;
- justify-content: space-between;
- padding: 0 20px;
- margin-bottom: 40px;
- .item_color{
- width: 156.5px;
- height: 156.5px;
- border-radius: 20px;
-
- }
- .item_con{
- flex:1;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- padding: 20px 0 20px 20px;
- .title{
- font-size: $font_size_big;
- font-weight: 700;
- }
- .num{
- font-size: $font_size;
- color: $color_main;
- }
- .priceText{
- font-size: $font_size_big;
- Text{
- font-size: $font_size_min;
- }
- }
- }
- .btn_con{
- display: flex;
- align-items: flex-end;
- .btn{
- width: 116px;
- height: 64px;
- background-color: $color_main;
- border-radius: 40px 0px 16px 0px;
- font-size: $font_size_medium;
- text-align: center;
- line-height: 64px;
- color: #fff;
- }
- .btn_count{
- width: 235px;
- height: 64px;
- background-color: #ECF5FF;
- border-radius: 40px 0px 16px 0px;
- padding: 0 20px;
- display: flex;
- align-items: center;
- }
- }
- }
- }
- .noData{
- width:100%;
- height: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- color: $color_font_three;
- font-size: $font_size_medium;
- }
- .buy_btn{
- width: 100%;
- padding: 0 40px;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- box-sizing: border-box;
- position: fixed;
- bottom:0;
- font-size: $font_size_medium;
- color: $color_font_two;
- background-color: #fff;
- box-shadow: 6px 0px 12px 0px rgba(0,0,0,0.16);
- .buy_btn_con{
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 151px;
- }
- .add_cart{
- width: 260px;
- height: 90px;
- font-size: $font_size_big;
- text-align: center;
- line-height: 90px;
- border-radius: 50px;
- color: #fff;
- background: linear-gradient(38deg,#5cabff, #7cbcfc 100%, #99ccff 100%);
- }
- .select_add_cart{
- background: linear-gradient(38deg,#007aff, #4fa6ff 100%, #68b4ff 100%);
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/details/components/orderCount/index.tsx b/src/pages/details/components/orderCount/index.tsx
deleted file mode 100644
index 444c9c1..0000000
--- a/src/pages/details/components/orderCount/index.tsx
+++ /dev/null
@@ -1,333 +0,0 @@
-import { View, Text } from '@tarojs/components'
-import Popup from '@/components/popup'
-import LoadingCard from '@/components/loadingCard'
-import Search from '@/components/search'
-import Counter from '../counter'
-import Big from 'big.js'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import { memo, useCallback, useEffect, useRef, useState } from 'react'
-import { useSelector } from '@/reducers/hooks'
-import { GetColorList } from '@/api/materialColor'
-import { AddShoppingCartApi } from '@/api/shopCart'
-import Taro, { useRouter } from '@tarojs/taro'
-import UseLogin from '@/use/useLogin'
-import { formatHashTag, formatPriceDiv } from '@/common/fotmat'
-import { getFilterData } from '@/common/util'
-import LabAndImg from '@/components/LabAndImg'
-import VirtualList from '@tarojs/components/virtual-list'
-import useCommonData from '@/use/useCommonData'
-import LabAndImgShow from '@/components/LabAndImgShow'
-
-type param = {
- show?: true | false
- onClose?: () => void
- title?: string
- productId?: number
-}
-export default memo(({ show = false, onClose, title = '', productId = 0 }: param) => {
- const { adminUserInfo } = useSelector((state) => state.userInfo)
-
- const [selectList, _] = useState([
- { id: 0, step: 1, digits: 0, maxNum: 100000, defaultNum: 1, title: '大货', unit: '条', eunit: 'kg', priceField: 'bulk_price' },
- { id: 1, step: 1, digits: 2, maxNum: 9.99, defaultNum: 1, title: '剪板', unit: '米', eunit: 'm', priceField: 'length_cut_price' },
- { id: 2, step: 1, digits: 2, minNum: 3, maxNum: 100000, defaultNum: 3, title: '散剪', unit: '米', eunit: 'kg', priceField: 'weight_cut_price' },
- ])
- const [selectIndex, setSelectIndex] = useState(0)
- const selectProduct = (index: number) => {
- setSelectIndex(() => index)
- }
-
- //重置数据
- useEffect(() => {
- const newList = initList(list)
- setList([...newList])
- condition.current.code_or_name = null
- setSearchShow(false)
- }, [selectIndex])
-
- //获取面料颜色列表
- const { fetchData: colorFetchData, state: colorState } = GetColorList()
- const [list, setList] = useState([])
- const condition = useRef({ physical_warehouse: adminUserInfo?.physical_warehouse, sale_mode: selectIndex, product_id: 0, code_or_name: null })
- const getColorList = async () => {
- let { data } = await colorFetchData(getFilterData(condition.current))
- let lists = initList(data.list)
- setList(() => [...lists])
- }
- const [showPopup, setShowPopup] = useState(false)
-
- //显示获取
- useEffect(() => {
- if (show) {
- setSelectIndex(0)
- condition.current.code_or_name = null
- setSearchShow(false)
- condition.current.product_id = productId
- getColorList()
- }
- setShowPopup(show)
- }, [show])
-
- //初始化列表数据
- const initList = useCallback((list) => {
- const newList = list.map((item) => {
- item.count = 0
- item.show = false
- return item
- })
- return newList
- }, [])
-
- //卸载数据
- useEffect(() => {
- return () => {
- setList([])
- }
- }, [])
-
- //popup关闭
- const closePopup = () => {
- onClose?.()
- setShowPopup(false)
- setList([])
- }
-
- //计算总数量和总米/件数
- const [selectCount, setSelectCount] = useState<{ sumCount: number; kindCount: number; color_list: any[] }>({
- sumCount: 0,
- kindCount: 0,
- color_list: [],
- })
- useEffect(() => {
- let sumCount = 0,
- kindCount = 0,
- color_list: any[] = []
- let color_list_info = {}
- list.map((item) => {
- if (item.count > 0) {
- sumCount = Big(sumCount).add(item.count).toNumber()
- kindCount++
- color_list_info = selectIndex == 0 ? { product_color_id: item.id, roll: item.count } : { product_color_id: item.id, length: item.count * 100 }
- color_list.push(color_list_info)
- }
- })
- setSelectCount({ ...selectCount, sumCount, kindCount, color_list })
- }, [list])
-
- //计数组件
- const getInputValue = useCallback(
- (num, item) => {
- item.count = parseFloat(num)
- if (num == 0) item.show = false
- setList(() => [...list])
- },
- [list],
- )
-
- const onAdd = (item) => {
- item.show = true
- item.count = selectList[selectIndex].defaultNum
- setList((list) => [...list])
- }
-
- //搜索显示与隐藏
- const [searchShow, setSearchShow] = useState(false)
- const changeSearchShow = () => {
- setSearchShow(true)
- }
-
- //添加购物车
- const { getShopCount } = useCommonData()
- const { getSelfUserInfo } = UseLogin()
- const { fetchData: addFetchData } = AddShoppingCartApi()
- const addShopCart = async () => {
- try {
- await getSelfUserInfo()
- } catch (msg) {
- Taro.showToast({
- icon: 'none',
- title: '授权失败,请求完善授权',
- })
- return false
- }
- if (selectCount.sumCount == 0) {
- Taro.showToast({
- icon: 'none',
- title: '请选择面料颜色!',
- })
- return false
- }
-
- const state = await addFetchData({
- sale_mode: selectIndex,
- color_list: selectCount.color_list,
- })
- if (state.success) {
- Taro.showToast({
- title: '添加成功',
- })
- getShopCount()
- onClose?.()
- } else {
- Taro.showToast({
- icon: 'none',
- title: state.msg,
- })
- }
- }
-
- //筛选数据
- const searchInput = useCallback((e) => {
- condition.current.code_or_name = e
- getColorList()
- }, [])
-
- //清空搜索内容
- const searchRef = useRef(null)
- const clearSearch = () => {
- searchRef.current.clearInput()
- setSearchShow(false)
- }
-
- //格式化金额
- const formatPrice = useCallback(
- (item) => {
- const price = Number(formatPriceDiv(item[selectList[selectIndex].priceField]))
- return (
-
- ¥
- {price}
- /{selectList[selectIndex].eunit}
-
- )
- },
- [selectIndex],
- )
-
- //显示图片弹窗
- const [showLabImage, setShowLabImage] = useState(false)
- const [labImageValue, setLabImageValue] = useState()
- const getLabAndImg = useCallback((val) => {
- setShowLabImage(() => true)
- setLabImageValue(val)
- }, [])
- const closeLabImgShow = useCallback(() => {
- setShowLabImage(() => false)
- }, [])
-
- //虚拟滚动
- const Rows = memo(({ id, index, style, data }: any) => {
- let item = data[index]
- return (
- <>
- {(item && (
-
-
-
-
-
- {formatHashTag(item.code, item.name)}
- {formatPrice(item)}
-
-
- {(!item.show && (
- onAdd(item)}>
- 添加
-
- )) || (
-
-
-
- )}
-
-
- )) || }
- >
- )
- })
-
- return (
-
- closePopup()}>
-
- {title}
-
- 下单类型:
-
- {selectList.map((item, index) => {
- return (
- selectProduct(index)}
- className={classnames(styles.search_item, selectIndex == index && styles.search_item_select)}>
- {item.title}
-
- )
- })}
-
-
- {searchShow && (
-
-
-
-
- clearSearch()}>
- 取消
-
-
- )}
-
- 颜色分类 ({list.length})
- {!searchShow && changeSearchShow()}>}
-
-
-
- {list.length <= 0 && colorState.loading && }
- {list.length > 0 && !colorState.loading && (
-
-
- {Rows}
-
-
-
- )}
- {list.length <= 0 && !colorState.loading && 暂无此商品}
-
-
-
-
- 当前已选{selectCount.kindCount}种,共{selectCount.sumCount}
- {selectList[selectIndex].unit}
-
- addShopCart()}>
- 加入购物车
-
-
-
-
-
-
-
-
-
-
- )
-})
diff --git a/src/pages/details/components/preview/index.module.scss b/src/pages/details/components/preview/index.module.scss
deleted file mode 100644
index aaf98b0..0000000
--- a/src/pages/details/components/preview/index.module.scss
+++ /dev/null
@@ -1,45 +0,0 @@
-.main{
- position: fixed;
- width: 100vw;
- height: 100vh;
- top: 0;
- left: 0;
- background-color: rgba(0,0,0, 0.8);
- display: flex;
- justify-content: center;
- align-items: flex-start;
- z-index: 999;
- .con{
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- width: 100%;
- height: 60vh;
- margin-top: 100px;
- padding: 20px;
- box-sizing: border-box;
- .rgb{
- width: 600px;
- height: 600px;
- border-radius: 20px;
- }
- image{
- width:100%;
- border-radius: 10px;
- }
- .name {
- width: 488px;
- height: 72px;
- color: #fff;
- text-align: center;
- font-size: 26px;
- border-radius: 20px;
- line-height: 72px;
- margin-top: 10px;
- background-color: rgba(0,0,0, 0.5);
- padding: 0 10px;
- @include common_ellipsis(1);
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/details/components/preview/index.tsx b/src/pages/details/components/preview/index.tsx
deleted file mode 100644
index 3cbb31a..0000000
--- a/src/pages/details/components/preview/index.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { View } from "@tarojs/components"
-import { useMemo } from "react"
-import styles from './index.module.scss'
-
-
-export type colorParams = {
- value?: { backgroundColor: string; }|null,
- show?: false|true
- onClose?: () => void
-}
-export default ({value, show = false, onClose}: colorParams) => {
-
- return (
- <>
- {show&& onClose?.()}>
-
-
- {'颜色'}
-
- }
- >
- )
-}
\ No newline at end of file
diff --git a/src/pages/details/components/swiper/index.module.scss b/src/pages/details/components/swiper/index.module.scss
deleted file mode 100644
index f65584e..0000000
--- a/src/pages/details/components/swiper/index.module.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-.swiper{
- height: 450px;
- width: 100%;
- position: relative;
- .swiper_item{
- height: 100%;
- width: 100%;
- }
- .image_item{
- width: 100%;
- height: 100%;
- image{
- width: 100%;
- height: 100%;
- display: block;
- }
- }
- .page{
- font-size: $font_size_min;
- padding: 5px 20px;
- background-color: rgba(0,0,0,0.3);
- color: #fff;
- border-radius: 50px;
- position: absolute;
- bottom: 20px;
- right: 20px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/details/components/swiper/index.tsx b/src/pages/details/components/swiper/index.tsx
deleted file mode 100644
index 431b6e0..0000000
--- a/src/pages/details/components/swiper/index.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import { formatImgUrl } from "@/common/fotmat"
-import { Image, Swiper, SwiperItem, View } from "@tarojs/components"
-import { useMemo, useRef, useState } from "react"
-import Taro from '@tarojs/taro'
-import styles from './index.module.scss'
-
-type item = {title:string, img:string, url:string, id:number}
-type params = {
- list?: item[]
-}
-
-export default ({list = []}: params) => {
- const [pageIndex, setPageIndex] = useState(1)
- const pageRef = useRef(null)
-
- const pageCount = useMemo(() => {
- return list.length
- },[list])
-
- const formatImages = useMemo(() => {
- return list?.map(item => formatImgUrl(item, '!w800'))
- }, [list])
-
- const swiperChange = (e) => {
- setPageIndex(e.detail.current + 1)
- }
-
- const onShowImage = () => {
- Taro.previewImage({
- current: formatImages[0],
- urls: formatImages
- })
- }
-
- return (
-
- {list.length > 0 && swiperChange(e)}>
- {list?.map((item) => {
- return
-
-
-
-
- })}
- }
- {(list.length > 0)&&{pageIndex+'/'+pageCount}}
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/details/index.config.ts b/src/pages/details/index.config.ts
deleted file mode 100644
index 20c0853..0000000
--- a/src/pages/details/index.config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
- navigationBarTitleText: '详情',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark',
- enableShareAppMessage: true
-}
diff --git a/src/pages/details/index.module.scss b/src/pages/details/index.module.scss
deleted file mode 100644
index ec682c6..0000000
--- a/src/pages/details/index.module.scss
+++ /dev/null
@@ -1,174 +0,0 @@
-.main{
- min-height: 100%;
- background-color: $color_bg_one;
- padding-bottom: 100px;
- .product_header{
- padding: 0 20px;
- display: flex;
- align-items: center;
- height: 163.57px;
- background-color: #fff;
- .title{
- flex:1;
- .name{
- font-size: 32px;
- font-weight: 700;
- color: $color_font_one;
- @include common_ellipsis(1);
- }
- .des{
- font-size: $font_size_medium;
- color: $color_font_three;
- @include common_ellipsis(1);
- margin-top: 20px;
- }
- }
- .share, .collect {
- width: 76px;
- font-size: $font_size_min;
- text-align: center;
- color: $color_font_three;
- position: relative;
- .text{
- margin-top: 10px;
- font-size: $font_size_medium;
- }
- }
- .shareBtn {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- opacity: 0;
- }
- .miconfont{
- font-size: 45px;
- }
- .collected{
- color: #FFC300;
- }
- }
- .des_data{
- background-color: #fff;
- padding: 20px;
- margin-top: 16px;
- .title{
- font-size: $font_size;
- font-weight: 700;
- color: $color_font_one;
- margin-bottom: 20px;
- }
- .con{
- display: grid;
- grid-template-columns: 260px auto;
- font-size: $font_size_medium;
- color: $color_font_three;
- .des_text{
- display: flex;
- margin-bottom: 16px;
- text{
- flex:1;
- @include common_ellipsis(1);
- }
- }
- }
- }
- .product_color{
- background-color: #fff;
- margin-top: 16px;
- padding: 30px 20px 0;
- color: $color_font_one;
- font-size: $font_size_medium;
- .title{
-
- }
- .list{
- margin-top: 30px;
- display: grid;
- grid-template-columns: 210px 210px 210px ;
- justify-content: space-between;
- .item {
- width:210px;
- margin-bottom: 20px;
- .item_color{
- width:210px;
- height: 210px;
- border-radius: 20px;
- image{
- width: 100%;
- height: 100%;
- border-radius: 20px;
- }
- }
- .item_name{
- text-align: center;
- margin-top: 10px;
- }
- }
- }
- }
- .product_detail{
- // padding: 20px;
- background-color: #fff;
- margin-top: 16px;
- }
- .product_buy{
- display: flex;
- justify-content: space-between;
- align-items: center;
- height:95px;
- width: 100vw;
- position: fixed;
- bottom: 0;
- left: 0;
- background-color: #fff;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
-
-
- .buy_cart{
- width: 150px;
- color: $color_font_three;
- text-align: center;
- position: relative;
- .text{
- font-size: $font_size_min;
- }
- .miconfont{
- font-size: 36px;
- }
- .product_num{
- position: absolute;
- font-size: 23px;
- background-color: red;
- color: #fff;
- height: 36px;
- line-height: 36px;
- padding: 0 6px;
- border-radius: 72px;
- min-width: 25px;
- text-align: center;
- top: 0;
- right: 20px;
- }
- }
- .buy_btn{
- display: flex;
- justify-content: center;
- align-items: center;
- width: 297px;
- height: 100%;
- background-color: $color_main;
- font-size: $font_size;
- color: #fff;
- position: relative;
- .phoneBtn{
- background-color: rgba(0, 0, 0, 0);
- position: absolute;
- width: 100%;
- height: 100%;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/details/index.tsx b/src/pages/details/index.tsx
deleted file mode 100644
index e801c00..0000000
--- a/src/pages/details/index.tsx
+++ /dev/null
@@ -1,253 +0,0 @@
-import { Button, RichText, Text, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import classnames from 'classnames'
-import DesSwiper from './components/swiper'
-import OrderCount from './components/orderCount'
-import ShopCart from '@/components/shopCart'
-import styles from './index.module.scss'
-import { useCallback, useEffect, useMemo, useState } from 'react'
-import { formatHashTag, formatImgUrl } from '@/common/fotmat'
-import { GetProductDetailApi } from '@/api/material'
-import useLogin from '@/use/useLogin'
-import { AnalysisShortCodeApi, GetShortCodeApi } from '@/api/share'
-import { SHARE_SCENE } from '@/common/enum'
-import useUserInfo from '@/use/useUserInfo'
-import LabAndImg from '@/components/LabAndImg'
-import { alert } from '@/common/common'
-import AddCollection from '@/components/addCollection'
-import { AddFavoriteApi, DelFavoriteProductApi } from '@/api/favorite'
-import useCommonData from '@/use/useCommonData'
-import { IMG_CND_Prefix } from '@/common/constant'
-
-type item = { title: string; img: string; url: string; id: number }
-
-type Params = {
- list?: item[]
- swiperOnClick?: (val: item) => void
- style?: Object
-}
-export default (props: Params) => {
- const { getPhoneNumber, userInfo } = useLogin()
-
- //获取参数(有两种参数:1.商品id, 2.页面分享)
- const router = useRouter()
- const [params, setParams] = useState({ id: '', share: null })
-
- //判断是否是分享过来的参数
- const judgeParam = async () => {
- if (router.params.id) {
- setParams({ ...params, id: router.params.id })
- } else if (router.params.share) {
- analysisShortCode()
- }
- }
-
- //解析短码参数
- const { fetchData: fetchDataAnalysisShortCode } = AnalysisShortCodeApi()
- const analysisShortCode = async () => {
- let res = await fetchDataAnalysisShortCode({ md5_key: router.params.share })
- setParams({ id: res.data.product_id, share: res.data })
- }
-
- //获取购物车数据数量
- const { getShopCount, commonData } = useCommonData()
-
- useDidShow(() => {
- judgeParam()
- setShowCart(false)
- getShopCount()
- })
-
- useEffect(() => {
- if (params.id) {
- getProductDetail()
- }
- }, [params])
-
- //获取数据
- const [productInfo, setProductInfo] = useState({})
- const { fetchData } = GetProductDetailApi()
- const getProductDetail = async () => {
- let { data } = await fetchData({ id: params.id })
- setProductInfo(data)
- Taro.stopPullDownRefresh()
- }
-
- useEffect(() => {
- if (productInfo.code) {
- getShortCode()
- setCollectStatus(() => productInfo.is_favorite)
- }
- }, [productInfo])
-
- //面料名称
- const productName = useMemo(() => {
- return formatHashTag(productInfo.code, productInfo.name)
- }, [productInfo])
-
- const [showCart, setShowCart] = useState(false)
- const [showOrderCount, setShowOrderCount] = useState(false)
- // const html = `
- //
- // `
- const html = ``
-
- const { setSortCode, userInfo: userObj } = useUserInfo()
- //详情页获取分享短码
- const { ShareDetail } = SHARE_SCENE
- const { fetchData: fetchDataShortCode } = GetShortCodeApi()
- const getShortCode = async () => {
- const { data: resDetail } = await fetchDataShortCode({
- share_user_id: userObj.adminUserInfo.user_id,
- type: ShareDetail.value,
- product_id: parseInt(params.id),
- })
- const img = formatImgUrl(productInfo.texture_url || '/mall/share_img_01.png', '!w400')
- setSortCode({ ...userObj.sort_code, shareShortDetail: { title: productName as string, code: resDetail.md5_key, img: img } })
- }
-
- //授权手机号和下单
- const placeOrder = async (status = 'to_phone', e: any = {}) => {
- if (!productInfo.id) return false
- if (status == 'to_phone') {
- if (!e.detail.code) return alert.error('请授权手机号')
- try {
- await getPhoneNumber(e.detail.code)
- } catch (msg) {
- Taro.showToast({
- icon: 'none',
- title: msg,
- })
- return false
- }
- }
- setShowOrderCount(true)
- }
-
- //收藏功能
- const [collectStatus, setCollectStatus] = useState(false)
- const [collectionShow, setCollectionShow] = useState(false)
- const { fetchData: addFavoritefetchData } = AddFavoriteApi()
- const openCollection = () => {
- if (productInfo.is_favorite) {
- delFavoriteProduct()
- } else {
- setCollectionShow(true)
- }
- }
- const onAdd = useCallback(
- async (val) => {
- let res = await addFavoritefetchData({ favorite_id: val.id, product_id: Number(params.id) })
- if (res.success) {
- alert.success('添加成功')
- setCollectStatus(true)
- getProductDetail()
- } else {
- alert.none(res.msg)
- }
-
- setCollectionShow(false)
- },
- [params],
- )
- const closeCollection = useCallback(() => {
- setCollectionShow(false)
- }, [])
- //取消收藏
- const { fetchData: delFavoriteProductFetchData } = DelFavoriteProductApi()
- const delFavoriteProduct = async () => {
- let res = await delFavoriteProductFetchData({ favorite_id: productInfo.favorite_id, product_id: [productInfo.id] })
- if (res.success) {
- setCollectStatus(false)
- getProductDetail()
- alert.none('已取消收藏')
- }
- }
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- getProductDetail()
- })
-
- return (
-
-
-
-
- {productInfo.code && {productName}}
- {productInfo.describe}
-
-
-
- 分享
-
-
-
-
- 收藏
-
-
-
- 详情参数
-
-
- 编号:{productInfo.code}
-
-
- 幅宽:{productInfo.width}
-
-
- 克重:{productInfo.weight_density}
-
-
- 成分:{productInfo.component}
-
-
-
-
- 色号 ({productInfo?.product_color_list?.length})
-
- {productInfo?.product_color_list?.map((item) => {
- return (
-
-
-
-
- {item.code}
-
- )
- })}
-
-
-
-
-
-
- setShowCart(true)}>
-
- 购物车
- {commonData.shopCount > 0 && {commonData.shopCount > 99 ? '99+' : commonData.shopCount}}
-
- {(!userInfo.adminUserInfo?.is_authorize_phone && (
-
-
- 选购商品
-
- )) || (
- placeOrder('to_order')}>
- 选购商品
-
- )}
-
- setShowOrderCount(false)} title={productName} productId={productInfo.id} />
- setShowCart(false)} />
-
-
-
- )
-}
diff --git a/src/pages/editOrder/components/shipmentMode/index.module.scss b/src/pages/editOrder/components/shipmentMode/index.module.scss
deleted file mode 100644
index 5f818f9..0000000
--- a/src/pages/editOrder/components/shipmentMode/index.module.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-
- .order_title{
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status{
- background-color: #F0F0F0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- .order_status_selected{
- color: $color_main;
- border: 1px solid $color_main;
- }
- }
\ No newline at end of file
diff --git a/src/pages/editOrder/components/shipmentMode/index.tsx b/src/pages/editOrder/components/shipmentMode/index.tsx
deleted file mode 100644
index 9ee03ae..0000000
--- a/src/pages/editOrder/components/shipmentMode/index.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { memo, useEffect, useRef, useState } from "react";
-
-type Param = {
- onSelect?:(val:number) => void
- defaultValue?: 0|1|2
-}
-export default memo(({onSelect, defaultValue = 0}: Param) => {
- //收货方法 0:没选择, 1:自提,2:物流
- const shipmentMode = useRef([
- {value:1, label:'上门自提', selected:false},
- {value:2, label:'物流', selected:false}
- ])
- const [selectValue, setSelectValue] = useState()
- useEffect(() => {
- setSelectValue(defaultValue)
- }, [defaultValue])
- const selectShipmentMode = (value) => {
- setSelectValue(() => value)
- onSelect?.(value)
- }
- return (
-
- 收货方式
- {shipmentMode.current.map(item => {
- return selectShipmentMode(item.value)}>{item.label}
- })}
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/editOrder/index.config.ts b/src/pages/editOrder/index.config.ts
deleted file mode 100644
index 52979d7..0000000
--- a/src/pages/editOrder/index.config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
- navigationBarTitleText: '修改地址',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/editOrder/index.module.scss b/src/pages/editOrder/index.module.scss
deleted file mode 100644
index 043d149..0000000
--- a/src/pages/editOrder/index.module.scss
+++ /dev/null
@@ -1,120 +0,0 @@
-.order_edit_main{
- min-height: 100%;
- background-color:$color_bg_one;
- padding-top: 20px;
- display: flex;
- flex-direction: column;
- box-sizing: border-box;
- .title_msg{
- display: flex;
- align-items: center;
- padding: 20px;
- background-color: #fff;
- margin: 0 20px;
- border-radius: 20px;
- .miconfont{
- font-size: 50px;
- color: $color_main;
- }
- .title_msg_con{
- font-size: 23px;
- display: flex;
- flex-direction: column;
- margin-left: 30px;
- text{
- &:nth-child(1) {
- color: $color_main;
- }
- &:nth-child(2) {
- color: $color_font_three;
- }
- }
- }
- }
-
- .shipmentMode_con{
- margin: 0 20px;
- }
- .old_address{
- display: flex;
- flex-direction: column;
- padding: 30px 20px 60px 20px;
- box-sizing: border-box;
- .old_address_text{
- font-weight: 700;
- &:nth-of-type(1) {
- padding-bottom: 30px;
- font-size: $font_size_big;
- }
- &:nth-of-type(2) {
- padding-bottom: 30px;
- font-size: $font_size;
- }
- }
- .userInfo{
- display: flex;
- font-size: $font_size;
- color: $color_font_three;
- align-items: center;
- .userInfo_text{
- font-size: $font_size;
- &:nth-child(2) {
- padding-left: 20px;
- }
- }
-
- }
- }
- .select_address_con{
- flex:1;
- display: flex;
- flex-direction: column;
- align-items: center;
- background-color: #fff;
- border-radius: 30px 30px 0px 0px;
- position: relative;
- .title{
- font-size: $font_size;
- font-weight: 700;
- margin-top: 30px;
- }
- .address_list{
- flex:1;
- height: 0;
- margin-top: 50px;
- }
- .submitBtn{
- display: flex;
- font-size: $font_size_big ;
- justify-content: center;
- height: 82px;
- margin-bottom: 20px;
- position: absolute;
- bottom:0;
- .addressBtn{
- flex:1;
- text-align: center;
- height: 100%;
- border: 3px solid #cde5ff;
- width: 348px;
- justify-content: center;
- align-items: center;
- }
- .addAddress{
- border-right: 0;
- display: flex;
- border-radius: 50px 0px 0px 50px;
- color: $color_main;
- background-color: #fff;
- }
- .submitUpdate{
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: 0px 50px 50px 0px;
- background-color: $color_main;
- color: #fff;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/editOrder/index.tsx b/src/pages/editOrder/index.tsx
deleted file mode 100644
index 1ce0acf..0000000
--- a/src/pages/editOrder/index.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { useCallback, useMemo, useRef, useState } from "react";
-import ShipmentMode from "./components/shipmentMode";
-import AddressList from "@/components/AddressList";
-import { alert, goLink } from "@/common/common";
-import { getParam } from "@/common/system";
-import {EditSaleOrderAddressApi, EditSaleOrderShipmentModeApi} from "@/api/order";
-import Taro from "@tarojs/taro";
-import useLogin from "@/use/useLogin";
-
-export default () => {
- useLogin()
- //获取临时传递的数据
- const params = getParam()
- const [paramsData, setParamsData] = useState(params)
-
- //提交的数据
- const [submitData, setSubmitData] = useState({
- address_id:0,
- id:params.id,
- shipment_mode: params.shipment_mode
- })
-
-
- //格式化地址
- const address = useMemo(() => {
- return paramsData.province_name+' '+paramsData.city_name+' '+paramsData.district_name+' '+paramsData.address_detail
- }, [paramsData])
-
- //获取收货方法
- const getShipmentMode = useCallback((num) => {
- setSubmitData((val) => ({...val, shipment_mode:num}))
- }, [])
-
- //获取地址
- const getSelectAddress = useCallback((e) => {
- setSubmitData((val) => ({...val, address_id:e.id}))
- }, [])
-
- //修改请求
- const {fetchData: addressFetchData} = EditSaleOrderAddressApi()
- const {fetchData: shipmentFetchData} = EditSaleOrderShipmentModeApi()
- const editData = async () => {
- if(submitData.address_id) {
- let res = await addressFetchData(submitData)
- if(!res.success) {
- alert.error(res.msg)
- return false
- }
- }
- let res = await shipmentFetchData(submitData)
- if(!res.success) {
- alert.error(res.msg)
- return false
- }
- Taro.navigateBack()
- }
-
- return (
-
-
-
-
- 修改收货地址可能会影响发货时效
- 若商品已发货,则不能修改
-
-
-
-
-
-
- 原地址:
- {address}
-
- {paramsData.name}
- {paramsData.phone}
-
-
-
- 重新选择收货地址
-
-
-
-
- goLink('/pages/addressAdd/index', {type:'add'})} className={classnames(styles.addAddress, styles.addressBtn)}>添加新地址
- editData()}>提交修改
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/index/components/product/index.module.scss b/src/pages/index/components/product/index.module.scss
deleted file mode 100644
index 865b112..0000000
--- a/src/pages/index/components/product/index.module.scss
+++ /dev/null
@@ -1,79 +0,0 @@
-
-.products_list{
- padding: 0 20px 20px 20px;
- box-sizing: border-box;
- height: 100%;
-}
-.products_item{
- width: 100%;
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- &:nth-child(n+2){
- margin-top: 16px;
- }
- .item_img{
- width: 198px;
- height: 198px;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 10px;
- }
- .num{
- width: 100px;
- height: 36px;
- font-size: $font_size_min;
- position: absolute;
- right:0;
- bottom: 0;
- background: rgba($color: #fff, $alpha: 0.3);
- border-radius: 36px 0px 10px 0px;
- color: #fff;
- text-align: center;
- line-height: 36px;
- }
- }
- .item_con{
- padding-left: 15px;
- font-size: $font_size;
- flex:1;
- .title{
- font-size: $font_size;
- color: #707070;
- text{
- color: $color_font_one;
- font-weight: bold;
- }
- }
- .tag_list{
- display: flex;
- margin-top: 16px;
- .tag{
- padding: 3px 10px;
- background-color: #CDE5FF;
- font-size: $font_size_min;
- border-radius: 5px;
- color: $color_main;
- &:nth-child(2) {
- margin-left: 10px;
- }
- }
- }
- .introduce{
- font-size: $font_size_medium;
- color: $color_font_two;
- margin-top: 16px;
- }
- .des{
- font-size:$font_size_medium;
- color: #707070;
- margin-top: 16px;
- @include common_ellipsis($params:2);
- }
- }
-}
diff --git a/src/pages/index/components/product/index.tsx b/src/pages/index/components/product/index.tsx
deleted file mode 100644
index ced2691..0000000
--- a/src/pages/index/components/product/index.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Image, View } from "@tarojs/components"
-import styles from './index.module.scss'
-
-export default () => {
-
- return (
-
- {new Array(10).fill('').map(item => {
- return
-
-
- 230色
-
-
- 0770#21S单面平纹(食毛)
-
- 160cm
- 110g
-
- 67.6%棉24%涤纶6.4%氨纶
- 产品描述产品描述产品描述产品描述产品描述
-
-
- })}
-
- )
-}
diff --git a/src/pages/index/context.ts b/src/pages/index/context.ts
deleted file mode 100644
index f7db244..0000000
--- a/src/pages/index/context.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import React from "react";
-
-export const ParamsContext = React.createContext(null)
\ No newline at end of file
diff --git a/src/pages/index/index.cofig.ts b/src/pages/index/index.cofig.ts
new file mode 100644
index 0000000..2aa6160
--- /dev/null
+++ b/src/pages/index/index.cofig.ts
@@ -0,0 +1,3 @@
+export default {
+ navigationBarTitleText: '首页',
+}
diff --git a/src/pages/index/index.config.ts b/src/pages/index/index.config.ts
deleted file mode 100644
index c0922b9..0000000
--- a/src/pages/index/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '首页',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/index/index.module.scss b/src/pages/index/index.module.scss
deleted file mode 100644
index 7a5fd68..0000000
--- a/src/pages/index/index.module.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-.main{
- background-color: $color_bg_one;
- height: 100vh;
- display: flex;
- flex-direction: column;
- .search{
- width: 100%;
- display: flex;
- justify-content: space-between;
- padding: 20px 20px 30px 20px;
- box-sizing: border-box;
- align-items: center;
- .search_collect{
- font-size: 26px;
- border: 2px solid #007AFF;
- color: #007AFF;
- border-radius: 50px;
- width: 132px;
- height: 44px;
- text-align: center;
- line-height: 44px;
- }
- .search_input{
- flex:1;
- margin-left: 20px;
- }
- }
- .products{
- flex:1;
- height: 0;
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/index/index.ts b/src/pages/index/index.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
deleted file mode 100644
index 00aa5ca..0000000
--- a/src/pages/index/index.tsx
+++ /dev/null
@@ -1,116 +0,0 @@
-import { View } from '@tarojs/components'
-import Banner from '@/components/banner'
-import Search from '@/components/search'
-import SideBar from '@/components/sideBar'
-import Product from '@/components/product'
-import MoveBtn from '@/components/moveBtn'
-import ShopCart from '@/components/shopCart'
-import { goLink } from '@/common/common'
-import styles from './index.module.scss'
-import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import Taro, { Events, useDidShow, usePullDownRefresh } from '@tarojs/taro'
-import { GetProductKindListApi, GetProductListApi } from '@/api/material'
-import useLogin from '@/use/useLogin'
-import { dataLoadingStatus } from '@/common/util'
-
-export default () => {
- useLogin()
- useEffect(() => {
- categoryList()
- }, [])
-
- //获取面料种类
- const [kindData, setKindData] = useState({ list: [], defaultId: 0 })
- const { fetchData } = GetProductKindListApi()
- const categoryList = async () => {
- const res = await fetchData()
- if (res.data?.list) {
- setKindData({ ...kindData, list: res.data.list, defaultId: res.data.list[0].id })
- setFiltrate({ ...filtrate, product_kind_id: res.data.list[0].id })
- }
- }
-
- //获取面料列表
- const [productData, setProductData] = useState({ list: [], total: 0 })
- const [hasMore, setHasMore] = useState(true)
- const [filtrate, setFiltrate] = useState({ product_kind_id: 0, size: 5, page: 1 })
- const pageNum = useRef({ size: filtrate.size, page: filtrate.page })
- const { fetchData: productFetchData, state: productState } = GetProductListApi()
- //获取数据方法
- const getProductList = async () => {
- const { data, total } = await productFetchData(filtrate)
- setProductData({ ...productData, list: data.list, total })
- setRefresherTriggeredStatus(() => false)
- }
- //监听查询条件
- useEffect(() => {
- if (filtrate.product_kind_id) getProductList()
- }, [filtrate])
-
- //点击面料类型
- const getProductKindId = useCallback((e) => {
- pageNum.current.page = 1
- setProductData({ list: [], total: 0 })
- setFiltrate((list) => ({ ...list, size: 5, product_kind_id: e.id }))
- }, [])
-
- //上拉加载数据
- const getScrolltolower = useCallback(() => {
- if (productData.list.length >= productData.total) {
- setHasMore(false)
- } else {
- pageNum.current.page++
- const newSize = pageNum.current.size * pageNum.current.page
- setFiltrate((e) => ({ ...e, size: newSize }))
- }
- }, [productData])
-
- const [showShopCart, setShowShopCart] = useState(false)
-
- //列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
- const getRefresherRefresh = async () => {
- pageNum.current.page = 1
- setFiltrate({ ...filtrate, size: 5 })
- setHasMore(true)
- setRefresherTriggeredStatus(true)
- }
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: productData.list, total: productData.total, status: productState.loading })
- }, [productData, productState.loading])
-
- return (
- setShowShopCart(!showShopCart)}>
-
-
-
- goLink('/pages/collection/index')}>
- 我的收藏
-
- goLink('/pages/searchList/search')}>
-
-
-
-
- getRefresherRefresh()}>
-
-
-
-
- setShowShopCart(false)} />
-
-
- )
-}
diff --git a/src/pages/order/comfirm.config.ts b/src/pages/order/comfirm.config.ts
deleted file mode 100644
index 67ce23e..0000000
--- a/src/pages/order/comfirm.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '确认订单',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/order/comfirm.module.scss b/src/pages/order/comfirm.module.scss
deleted file mode 100644
index b43e26c..0000000
--- a/src/pages/order/comfirm.module.scss
+++ /dev/null
@@ -1,132 +0,0 @@
-.order_main {
- min-height: 100%;
- background-color: $color_bg_one;
- padding: 20px;
- padding-bottom: 190px;
- box-sizing: border-box;
-
- .order_title {
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text {
- flex: 1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status {
- background-color: #f0f0f0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- .order_status_selected {
- color: $color_main;
- border: 1px solid $color_main;
- }
- }
- .order_desc {
- display: flex;
- align-items: center;
- background-color: #fff;
- padding: 20px;
- min-height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- box-sizing: border-box;
- .order_desc_con {
- width: 150px;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_desc_text,
- .order_desc_text_hint {
- font-size: $font_size_medium;
- margin-right: 10px;
- flex: 1;
- }
- .order_desc_text_hint {
- text-align: right;
- color: $color_font_two;
- }
- .miconfont {
- font-size: 20px;
- color: $color_font_two;
- }
- }
- .submit_order {
- display: flex;
- position: fixed;
- bottom: 0;
- left: 0;
- justify-content: space-between;
- width: 100%;
- height: 175px;
- align-items: center;
- background-color: #fff;
- box-shadow: 6px 0px 12px 0px rgba(0, 0, 0, 0.16);
- padding: 20px 50px;
- box-sizing: border-box;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .submit_order_number {
- padding: 20px 0;
- }
- .order_btn {
- width: 250px;
- height: 90px;
- opacity: 0.6;
- background: linear-gradient(38deg, #007aff, #4fa6ff 100%, #68b4ff 100%);
- border-radius: 46px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #fff;
- }
- .ok_order_btn {
- opacity: 1;
- }
- .order_number_desc {
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
- .order_info {
- background-color: #fff;
- margin-top: 20px;
- border-radius: 20px;
- padding: 20px;
- .order_info_title {
- font-size: $font_size;
- font-weight: 700;
- margin-bottom: 20px;
- }
- .order_num {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .order_num_btn {
- font-size: $font_size_medium;
- padding: 5px 10px;
- border: 2px solid #007cf7;
- border-radius: 10px;
- color: $color_main;
- }
- }
- text {
- font-size: $font_size;
- }
- }
-}
diff --git a/src/pages/order/comfirm.tsx b/src/pages/order/comfirm.tsx
deleted file mode 100644
index 7e2a243..0000000
--- a/src/pages/order/comfirm.tsx
+++ /dev/null
@@ -1,209 +0,0 @@
-import { SaleOrderPreViewApi, SaleOrderApi } from '@/api/order'
-import { formatPriceDiv } from '@/common/fotmat'
-import Popup from '@/components/popup'
-import { View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh } from '@tarojs/taro'
-import classnames from 'classnames'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import KindList from './components/kindList'
-import Remark from './components/remark'
-import styles from './comfirm.module.scss'
-import { getParam } from '@/common/system'
-import { alert, goLink } from '@/common/common'
-import SubmitOrderBtn from './components/submitOrderBtn'
-import AddressInfoDetail from './components/addressInfoDetail'
-import { SubscriptionMessageApi } from '@/api/user'
-import { SUBSCRIPTION_MESSAGE_SCENE } from '@/common/enum'
-import { UseSubscriptionMessage } from '@/use/useCommon'
-import { throttle } from '@/common/util'
-
-export default () => {
- const [showDesc, setShowDesc] = useState(false)
- //下单信息
- type OrderParams = { address_id?: number; remark?: string; sale_mode?: number; shipment_mode?: number; list?: any[] }
- const [submitOrderData, setSubmitOrderData] = useState()
-
- //获取购物车传过来的id
- type orderPreParam = {
- shopping_cart_product_color_list: { shopping_cart_product_color_id: number }[]
- sale_mode: number
- }
- const param = getParam()
- const idsAndSaleModel = useRef({ shopping_cart_product_color_list: [], sale_mode: 0 })
- useDidShow(async () => {
- idsAndSaleModel.current = { shopping_cart_product_color_list: [], sale_mode: 0 } //初始化
- idsAndSaleModel.current.sale_mode = Number(param?.sale_mode)
- param?.ids?.split('-')?.map((item) => {
- return idsAndSaleModel.current.shopping_cart_product_color_list?.push({
- shopping_cart_product_color_id: Number(item),
- })
- })
- getSaleOrderPreView()
- setSubmitOrderData((val) => ({ ...val, sale_mode: param?.sale_mode }))
- })
-
- //获取销售预览订单
- const [preViewOrder, setPreViewOrder] = useState() //获取到的原始数据
- const { fetchData } = SaleOrderPreViewApi()
- const getSaleOrderPreView = async () => {
- if (idsAndSaleModel.current.shopping_cart_product_color_list?.length > 0) {
- let res = await fetchData(idsAndSaleModel.current)
- setPreViewOrder(res.data)
- }
- }
-
- //监听获取到的数据
- useEffect(() => {
- if (preViewOrder) {
- formatData()
- getDataList()
- setSubmitOrderData((val) => ({
- ...val,
- address_id: preViewOrder.default_address.id,
- shipment_mode: preViewOrder.shipment_mode || 2,
- }))
- }
- }, [preViewOrder])
-
- //格式化数据格式
- const [formatPreViewOrder, setFormatPreViewOrder] = useState() //格式化后的数据
- const formatData = () => {
- setFormatPreViewOrder({
- estimate_amount: preViewOrder.estimate_amount, //预估金额
- sale_mode: preViewOrder.sale_mode,
- sale_mode_name: preViewOrder.sale_mode_name,
- total_colors: preViewOrder.total_colors, //总颜色数量
- total_number: preViewOrder.total_number, //总数量
- total_fabrics: preViewOrder.total_fabrics, //面料数量
- unit: preViewOrder.sale_mode == 0 ? '条' : 'm', //单位
- list: preViewOrder.product_list,
- total_should_collect_money: preViewOrder.total_should_collect_money, //应收金额
- total_sale_price: preViewOrder.total_sale_price, //合计金额
- })
- }
- const formatPreViewOrderMemo = useMemo(() => {
- return formatPreViewOrder
- }, [formatPreViewOrder])
-
- //格式化初始地址
- const defaultAddress = useMemo(() => {
- const address = preViewOrder?.default_address
- return {
- province_name: address?.province_name,
- city_name: address?.city_name,
- district_name: address?.district_name,
- address_detail: address?.address_detail,
- id: address?.id,
- 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,
- }
- }, [preViewOrder])
-
- //获取提交格式数据列表
- const getDataList = () => {
- let list: { shopping_cart_product_color_id: number }[] = []
- preViewOrder.product_list?.map((item) => {
- item.product_colors?.map((colorItem) => {
- list.push({ shopping_cart_product_color_id: colorItem.id })
- })
- })
- setSubmitOrderData((val) => ({ ...val, list }))
- }
-
- //获取地址
- const getAddress = (e) => {
- setSubmitOrderData((val) => ({ ...val, address_id: e.id }))
- }
-
- const selectShipmentMode = useCallback((value) => {
- setSubmitOrderData((val) => ({ ...val, shipment_mode: value }))
- }, [])
-
- //获取备注
- const getRemark = useCallback((e) => {
- setSubmitOrderData((val) => ({ ...val, remark: e }))
- setShowDesc(() => false)
- }, [])
-
- //提交按钮是否可用
- const btnStatus = useMemo(() => {
- return submitOrderData?.shipment_mode == 1 || (submitOrderData?.shipment_mode == 2 && submitOrderData?.address_id)
- }, [submitOrderData])
-
- //数量格式
- const numText = useMemo(() => {
- if (formatPreViewOrder) {
- let total_number = formatPreViewOrder?.sale_mode == 0 ? formatPreViewOrder?.total_number : formatPreViewOrder?.total_number / 100
- return `${formatPreViewOrder?.total_fabrics} 种面料,${formatPreViewOrder?.total_colors} 种颜色,共 ${total_number} ${formatPreViewOrder?.unit}`
- }
- }, [formatPreViewOrder])
-
- //订阅消息
- const { SubmitOrder } = SUBSCRIPTION_MESSAGE_SCENE
- const { openSubscriptionMessage } = UseSubscriptionMessage()
-
- //提交订单
- const { fetchData: saleOrderFetchData } = SaleOrderApi()
- const submitOrderEven = throttle(async () => {
- if (!submitOrderData?.shipment_mode) {
- alert.error('请选择收货方式')
- return false
- }
- if (!submitOrderData?.address_id && submitOrderData?.shipment_mode == 2) {
- alert.error('请选择地址')
- return false
- }
- let showModalRes = await Taro.showModal({
- title: '确定提交订单?',
- content: `发货方式为${submitOrderData?.shipment_mode == 1 ? '自提' : '物流'}`,
- confirmText: '确定',
- cancelText: '取消',
- })
- if (showModalRes.confirm) {
- await openSubscriptionMessage({ scenes: SubmitOrder.value })
- const res = await saleOrderFetchData(submitOrderData)
- if (res.success) {
- goLink('/pages/order/index', { id: res.data.id }, 'redirectTo')
- } else {
- alert.none(res.msg)
- }
- }
- }, 800)
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- getSaleOrderPreView()
- })
-
- return (
-
-
-
- setShowDesc(true)}>
- 订单备注
- {(submitOrderData?.remark && {submitOrderData?.remark}) || 填写备注}
-
-
-
-
-
- {numText}
-
- submitOrderEven()}>
- 提交订单
-
-
- setShowDesc(false)}>
- getRemark(e)} />
-
-
-
- )
-}
diff --git a/src/pages/order/components/addressInfo/index.module.scss b/src/pages/order/components/addressInfo/index.module.scss
deleted file mode 100644
index 4e9ea21..0000000
--- a/src/pages/order/components/addressInfo/index.module.scss
+++ /dev/null
@@ -1,71 +0,0 @@
-.order_address{
- height: 178px;
- background: #ffffff;
- border-radius: 20px;
- display: flex;
- align-items: center;
- padding: 30px;
- box-sizing: border-box;
- margin-top: 20px;
- .order_address_icon{
- font-size: 76px;
- color: $color_main;
- }
- .order_address_text_con{
- flex:1;
- padding: 0 30px;
- box-sizing: border-box;
- .order_address_text_title{
- font-size: $font_size_medium;
- margin-top: 10px;
- @include common_ellipsis;
- }
- .order_address_text_name{
-
- align-items: center;
- text{
- &:nth-child(1) {
- color: #000;
- font-weight: 700;
- font-size: $color_font_one;
- margin-right: 40px;
- }
- &:nth-child(2) {
- color: $color_font_one;
- font-size: $font_size_medium;
- }
- }
- }
- }
- .updateBtn{
- font-size: $font_size_medium;
- color: $color_font_three;
- width: 96px;
- height: 52px;
- border: 2px solid #dddddd;
- border-radius: 28px;
- text-align: center;
- line-height: 52px;
- }
- .order_address_text_no{
- flex: 1;
- font-size: $font_size;
- font-weight: 700;
- margin-left: 30px;
- }
- .order_address_more_icon{
- color: $color_font_three;
- font-size: $font_size;
- }
-
-}
-.order_address_list {
- height: 900px;
- .order_address_title{
- font-size: $font_size;
- font-weight: 700;
- width: 100%;
- text-align: center;
- padding: 20px 0 30px 0;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/addressInfo/index.tsx b/src/pages/order/components/addressInfo/index.tsx
deleted file mode 100644
index 4225fea..0000000
--- a/src/pages/order/components/addressInfo/index.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import AddressList from "@/components/AddressList";
-import Popup from "@/components/popup";
-import { Text, View } from "@tarojs/components"
-import classnames from "classnames";
-import { memo, useCallback, useEffect, useMemo, useState } from "react";
-import styles from './index.module.scss'
-
-export type AddressInfoParam = {
- province_name: string,
- city_name: string,
- district_name: string,
- address_detail: string,
- id?: number,
- name: string,
- phone: string
-}
-type Param = {
- onSelect?: (val:any) => void, //选择
- defaultValue?: AddressInfoParam|null //默认值
- disabled?: false|true //true禁用后只用于展示
-}
-
-export default memo(({onSelect, defaultValue = null, disabled = false}: Param) => {
- const [showAddressList, setShowAddressList] = useState(false)
-
- useEffect(() => {
- setUserInfo(() => defaultValue)
- }, [defaultValue])
-
- //选择地址
- const [userInfo, setUserInfo] = useState()
- const getAddress = useCallback((val) => {
- setShowAddressList(() => false)
- setUserInfo(() => val)
- onSelect?.(val)
- }, [])
-
- //地址格式
- const formatAddress = useMemo(() => {
- if(userInfo)
- return userInfo.province_name + userInfo.city_name + userInfo.district_name + userInfo.address_detail
- }, [userInfo])
-
- const changeShow = () => {
- if(!disabled)
- setShowAddressList(() => true)
- }
- return (
-
- changeShow()}>
-
- {!userInfo&&
- <>
- 请选择收货地址及信息
-
- >
- ||<>
-
-
- {userInfo?.name}
- {userInfo?.phone}
-
- {formatAddress}
-
- 修改
- >}
-
- {!disabled&& setShowAddressList(false)}>
-
- 请选择收货地址
- getAddress(item)}/>
-
- }
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/addressInfoDetail/index.module.scss b/src/pages/order/components/addressInfoDetail/index.module.scss
deleted file mode 100644
index c2587f7..0000000
--- a/src/pages/order/components/addressInfoDetail/index.module.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-.order_address{
- background: #ffffff;
- border-radius: 20px;
- display: flex;
- align-items: center;
- padding: 30px;
- box-sizing: border-box;
- margin-top: 20px;
- position: relative;
- .order_address_icon{
- font-size: 50px;
- color: $color_main;
- position: absolute;
- top: 35px;
- left: 20px;
- }
- .order_address_text_con{
- flex:1;
- padding-left: 50px;
- box-sizing: border-box;
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .order_address_text_title{
- font-size: $font_size_medium;
- margin-top: 10px;
- display: flex;
- justify-content: space-between;
- .moreIconfont{
- font-size: 20px;
- padding-top: 10px;
- }
- .address_text{
- word-break:break-all;
-
- }
- .address_text_no{
- font-weight: 700;
- padding-left: 20px;
- }
- }
- .order_address_text_name{
- margin-top: 30px;
- align-items: center;
- text{
- &:nth-child(1) {
- color: #000;
- font-weight: 700;
- font-size: $color_font_one;
- margin-right: 40px;
- }
- &:nth-child(2) {
- color: $color_font_one;
- font-size: $font_size_medium;
- }
- }
- }
- }
- .updateBtn{
- width:200px;
- font-size: $font_size_min;
- background-color: #F0F0F0;
- height: 64px;
- border-radius: 24px;
- color: $color_font_two;
- position: absolute;
- bottom: 10px;
- right: 10px;
- z-index: 999;
- .updateBtn_list{
- position: absolute;
- display: flex;
- z-index: 5;
- width: 100%;
- .updateBtn_item_select{
- color: #fff;
- }
- }
- .updateBtn_item{
- flex:1;
- text-align: center;
- line-height: 64px;
- }
- .updateBtn_select{
- color: #fff;
- background-color: $color_main;
- border-radius: 24px;
- position: absolute;
- width: 100px;
- height: 61px;
- z-index: 1;
- transition: all 0.3s ease-in-out;
- }
-
- }
- .logisticsBtn{
- width: 152px;
- height: 72px;
- background: #ffffff;
- border: 2px solid #007AFF;
- border-radius: 38px;
- position: absolute;
- bottom: 10px;
- right: 10px;
- z-index: 999;
- font-size: 28px;
- color: #007AFF;
- text-align: center;
- line-height: 72px;
-
- }
- .order_address_text_no{
- flex: 1;
- font-size: $font_size;
- font-weight: 700;
- margin-left: 30px;
- }
- .order_address_more_icon{
- color: $color_font_three;
- font-size: $font_size;
- }
-
-}
-.order_address_list {
- height:80vh;
- .order_address_title{
- font-size: $font_size;
- font-weight: 700;
- width: 100%;
- text-align: center;
- padding: 20px 0 30px 0;
- height: 100px;
- }
- .addressList_con{
- padding-bottom: 20px;
- height: calc(100% - 160px);
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/addressInfoDetail/index.tsx b/src/pages/order/components/addressInfoDetail/index.tsx
deleted file mode 100644
index 4a880ce..0000000
--- a/src/pages/order/components/addressInfoDetail/index.tsx
+++ /dev/null
@@ -1,219 +0,0 @@
-import { GetAddressListApi } from '@/api/addressList'
-import { addressListApi } from '@/api/addressManager'
-import { EditSaleOrderAddressApi, EditSaleOrderShipmentModeApi } from '@/api/order'
-import { alert, goLink } from '@/common/common'
-import { ORDER_STATUS } from '@/common/enum'
-import { debounce, throttle } from '@/common/util'
-import AddressList from '@/components/AddressList'
-import Popup from '@/components/popup'
-import { Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
-import Taro from '@tarojs/taro'
-import styles from './index.module.scss'
-
-type Param = {
- onSelect?: (val: any) => void //选择地址
- disabled?: false | true //true禁用后只用于展示
- onChangeShipmentMode?: (val: number) => void //返回收货方式
- onLogistics?: () => void //查看物流
- status?: 1 | 2 //1确认订单时使用, 2订单流程
- orderInfo?: {
- id?: number //订单id
- shipment_mode?: 1 | 2 //1自提 2物流
- status?: number //订单状态
- province_name: string
- city_name: string
- district_name: string
- address_detail: string
- take_goods_address: string
- take_goods_phone: string
- target_user_name: string
- target_user_phone: string
- }
-}
-
-//订单状态
-const {
- SaleorderstatusWaitingPrePayment,
- SaleOrderStatusBooking,
- SaleOrderStatusArranging,
- SaleOrderStatusArranged,
- SaleOrderStatusWaitingPayment,
- SaleOrderStatusWaitingReceipt,
- SaleOrderStatusAlreadyReceipt,
- SaleOrderStatusComplete,
- SaleOrderStatusRefund,
- SaleOrderStatusCancel,
-} = ORDER_STATUS
-
-export default memo(
- forwardRef(({ onSelect, onChangeShipmentMode, orderInfo, status = 2, disabled = false, onLogistics }: Param, ref) => {
- const [addressInfo, setAddressInfo] = useState()
- useEffect(() => {
- if (orderInfo) {
- setReceivingStatus(() => orderInfo.shipment_mode || 2)
- setAddressInfo(() => orderInfo)
- }
- }, [orderInfo])
-
- //打开地址列表
- const [showAddressList, setShowAddressList] = useState(false)
- const changeShow = () => {
- if (receivingStatus == 2 && !logisticsShow && limitEdit()) setShowAddressList(() => true)
- }
-
- //把内部方法提供给外部
- useImperativeHandle(ref, () => ({
- changeShow,
- }))
-
- //收货方法,1:自提,2物流
- const [receivingStatus, setReceivingStatus] = useState(2)
- const { fetchData: shipmentModeFetchData } = EditSaleOrderShipmentModeApi()
- const onReceivingStatus = async (value, e) => {
- e.stopPropagation()
- if (limitEdit()) changeReceivingStatus(value)
- }
-
- //当没有地址时获取地址列表中的第一个数据
- const { fetchData: addressListFetchData } = addressListApi()
- const getAddressListOne = async () => {
- if (orderInfo?.address_detail) return true
- let res = await addressListFetchData()
- if (res.data.list && res.data.list?.length > 0) {
- let info = res.data.list[0]
- await addressFetchData({ id: orderInfo?.id, address_id: info.id })
- setAddressInfo((e) => ({ ...e, ...info, target_user_name: info.name, target_user_phone: info.phone }))
- return true
- } else {
- Taro.showModal({
- content: '您还没有地址,请前去新增地址',
- success: function (res) {
- if (res.confirm) {
- goLink('/pages/addressManager/index')
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- },
- })
- return false
- }
- }
-
- const changeReceivingStatus = debounce(async (value) => {
- if (!orderInfo || value == receivingStatus) return false
- if (status == 1) {
- onChangeShipmentMode?.(value)
- setReceivingStatus(value)
- return false
- }
- if (value == 2) {
- let res = await getAddressListOne()
- if (!res) return false
- }
- alert.loading('正在修改')
- const res = await shipmentModeFetchData({ id: orderInfo.id, shipment_mode: value })
- if (res.success) {
- alert.success('收货方式修改成功')
- onChangeShipmentMode?.(value)
- setReceivingStatus(() => value)
- } else {
- alert.none(res.msg)
- }
- }, 300)
-
- //修改地址
- const [addressId, setAddressId] = useState(0)
- const { fetchData: addressFetchData } = EditSaleOrderAddressApi()
- const getAddress = async (value) => {
- if (!orderInfo) return false
- if (status == 1) {
- setShowAddressList(() => false)
- setAddressId(value.id)
- setAddressInfo((e) => ({ ...e, ...value, target_user_name: value.name, target_user_phone: value.phone }))
- onSelect?.(value)
- return false
- }
- alert.loading('正在修改')
- const res = await addressFetchData({ id: orderInfo.id, address_id: value.id })
- if (res.success) {
- alert.success('地址修改成功')
- onSelect?.(value)
- setShowAddressList(() => false)
- setAddressId(value.id)
- setAddressInfo((e) => ({ ...e, ...value, target_user_name: value.name, target_user_phone: value.phone }))
- } else {
- alert.none(res.msg)
- }
- }
-
- //根据订单状态判断是否可修改
- const limitEdit = () => {
- let res = [SaleorderstatusWaitingPrePayment.value, SaleOrderStatusBooking.value, SaleOrderStatusArranging.value, SaleOrderStatusArranged.value, SaleOrderStatusWaitingPayment.value].includes(
- orderInfo?.status as number,
- )
- if (!res && status != 1) alert.none('该订单状态不能修改地址!')
- return status == 1 ? true : res
- }
-
- //根据订单状态判断是否显示物流
- const logisticsShowList = [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value]
- const logisticsShow = useMemo(() => {
- return logisticsShowList.includes(orderInfo?.status as number)
- }, [orderInfo])
-
- //地址格式
- const formatAddress = useMemo(() => {
- if (receivingStatus == 2) {
- return addressInfo?.address_detail ? addressInfo.province_name + addressInfo.city_name + addressInfo.district_name + addressInfo.address_detail : ''
- } else {
- return addressInfo?.take_goods_address
- }
- }, [receivingStatus, addressInfo])
-
- return (
-
- changeShow()}>
-
-
-
- {formatAddress || '请选择收货地址及信息'}
- {receivingStatus == 2 && !logisticsShow && }
-
-
- {receivingStatus == 1 ? '谭先生' : addressInfo?.target_user_name}
- {receivingStatus == 1 ? addressInfo?.take_goods_phone : addressInfo?.target_user_phone}
-
-
- {(!logisticsShow && (
-
-
- onReceivingStatus(1, e)}>
- 自提
-
- onReceivingStatus(2, e)}>
- 物流
-
-
-
-
- )) ||
- (orderInfo?.status != SaleOrderStatusRefund.value && (
-
- 查看物流
-
- ))}
-
- setShowAddressList(false)}>
-
- 请选择收货地址
-
-
-
-
-
-
- )
- }),
-)
diff --git a/src/pages/order/components/advanceOrderState/index.module.scss b/src/pages/order/components/advanceOrderState/index.module.scss
deleted file mode 100644
index 9f2a56a..0000000
--- a/src/pages/order/components/advanceOrderState/index.module.scss
+++ /dev/null
@@ -1,64 +0,0 @@
-
-.advance_main{
- width:100%;
- height: 238px;
- background-color: #007AFF;
- border-radius: 20px;
- display: flex;
- align-items: center;
- font-size: 24px;
- color: #dddddd;
- position: relative;
- .time_con{
- padding-left: 30px;
- .times{
- margin-bottom: 25px;
- display: flex;
- align-items: center;
- .text{
- margin-right: 15px;
- }
- .num{
- width: 46px;
- height: 50px;
- background: #0063ce;
- border-radius: 10px;
- line-height: 50px;
- text-align: center;
- font-weight: 700;
- color: #fff;
- }
- .separate{
- padding: 0 10px;
- }
- }
-
- }
- .cardIcon{
- width: 238px;
- height: 178px;
- position: absolute;
- right: 0;
- bottom: 0;
- .image{
- width:100%;
- height: 100%;
- }
- }
- .refresh{
- position: absolute;
- top: 23px;
- right: 20px;
- display: flex;
- color: #dddddd;
- display: flex;
- align-items: center;
-
- .mconfont{
- font-size: 36px;
- }
- .refresh_text{
- font-size: 25px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/advanceOrderState/index.tsx b/src/pages/order/components/advanceOrderState/index.tsx
deleted file mode 100644
index cdf9845..0000000
--- a/src/pages/order/components/advanceOrderState/index.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import { formatImgUrl } from "@/common/fotmat";
-import { Image, Text, View } from "@tarojs/components";
-import { memo, useEffect, useMemo, useRef, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import dayjs from "dayjs";
-import { useTimeCountDown } from "@/use/useCommon";
-import { ORDER_STATUS, PAYMENT_METHOD } from "@/common/enum";
-
-type List = {
- status: string,
- time: string,
- tag: string,
- desc: string,
- expire_time: string
-}
-
-type Param = {
- onRefresh?: () => void,
- orderInfo?: {
- logistics_details:List[], //订单状态列表
- payment_method: number, //支付方式
- status: number, //订单状态
- }
-}
-
-
-export default memo(({orderInfo, onRefresh}:Param) => {
-
- const {showTime, onStart, timeStatus} = useTimeCountDown()
-
- //订单状态枚举
- const {SaleorderstatusWaitingPrePayment} = ORDER_STATUS
-
- //获取预付款最后时间
- const endTime = useMemo(() => {
- if(orderInfo?.status == SaleorderstatusWaitingPrePayment.value && orderInfo.logistics_details.length > 0) {
- return orderInfo.logistics_details[0].expire_time
- }
- return ''
- }, [orderInfo])
-
- useEffect(() => {
- if(endTime) onStart(endTime)
- }, [endTime])
-
- useEffect(() => {
- if(timeStatus == 2) onRefresh?.()
- }, [timeStatus])
-
-
- return (
-
-
-
- 剩
- {showTime.HH}
- :
- {showTime.MM}
- :
- {showTime.SS}
-
- 支付关闭,订单自动取消
-
-
-
-
- onRefresh?.()}>
-
- 刷新
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/amountShow/index.module.scss b/src/pages/order/components/amountShow/index.module.scss
deleted file mode 100644
index 647e203..0000000
--- a/src/pages/order/components/amountShow/index.module.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-.order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: $font_size;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
-}
-.emphasis_num{
- .price_text{
- &:nth-child(2) {
- font-size: $font_size_big;
- }
- }
-}
-.emphasis_num_big{
- .price_text{
- &:nth-child(1) {
- font-size: $font_size_big;
- }
- &:nth-child(2) {
- font-size: 60px;
- }
- &:nth-child(1) {
- font-size: $font_size_big;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/amountShow/index.tsx b/src/pages/order/components/amountShow/index.tsx
deleted file mode 100644
index 877f7df..0000000
--- a/src/pages/order/components/amountShow/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo, useCallback } from "react";
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-type Param = {
- number: number, //数字
- status: 0|1|2 //0 小型,1中型,2大
-}
-export default memo(({number = 0, status = 1}:Param) => {
- const priceDom = useCallback(() => {
- let res = number.toFixed(2).split('.')
- let int_num = parseInt(res[0]) + ''
- let decimals_num = res[1]
- return (
- <>
- ¥
- {Number(int_num).toLocaleString()}
- .{decimals_num}
- >
- )
- }, [number])
- return (
-
- {priceDom()}
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/applyRefund/index.module.scss b/src/pages/order/components/applyRefund/index.module.scss
deleted file mode 100644
index dc7e177..0000000
--- a/src/pages/order/components/applyRefund/index.module.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-.apply_after_sales_con {
- padding: 20px;
- .returnSaleInput_item {
- display: flex;
- align-items: center;
- padding-bottom: 50px;
- flex-wrap: wrap;
- .title {
- font-size: $font_size;
- font-weight: 700;
- width: 119px;
- }
- .select {
- flex: 1;
- height: 60px;
- border: 2px solid #e6e6e6;
- border-radius: 10px;
- margin-left: 20px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 20px;
- font-size: 26px;
- color: $color_font_two;
- .miconfont {
- font-size: 30px;
- }
- .selected {
- color: #000;
- }
- }
- .upload_image {
- flex: 1;
- }
- }
- .btns_con {
- width: 100%;
- bottom: 0;
- box-sizing: border-box;
- margin-top: 50px;
- .btns_two {
- display: flex;
- height: 82px;
- // border: 1PX solid #007aff;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-bottom: 20px;
- .rest_btn {
- flex: 1;
- border: 1px solid #007aff;
- border-radius: 40px 0 0 40px;
- text-align: center;
- line-height: 82px;
- color: $color_main;
- background-color: #fff;
- }
- .verify_btn {
- flex: 1;
- border-radius: 0 40px 40px 0;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
- }
-}
diff --git a/src/pages/order/components/applyRefund/index.tsx b/src/pages/order/components/applyRefund/index.tsx
deleted file mode 100644
index 5dc3ed3..0000000
--- a/src/pages/order/components/applyRefund/index.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import Popup from '@/components/popup'
-import TextareaEnhance from '@/components/textareaEnhance'
-import { ScrollView, Text, View } from '@tarojs/components'
-import { memo, useCallback, useEffect, useRef, useState } from 'react'
-import ReasonPopup from '../reasonPopup'
-import styles from './index.module.scss'
-import classnames from 'classnames'
-import { ApplyRefundApi, RefundExplainApi } from '@/api/salesAfterOrder'
-import { alert } from '@/common/common'
-
-type Param = {
- show?: true | false
- onClose?: () => void
- orderId?: number
- onSuccess?: () => void
-}
-export default memo(({ show, onClose, orderId, onSuccess }: Param) => {
- //提交的数据
- const submitData = useRef({
- return_explain: 0,
- sale_order_id: 0,
- reason_describe: '',
- })
-
- useEffect(() => {
- if (show && orderId) {
- submitData.current.sale_order_id = orderId
- refundExplain()
- }
- }, [orderId, show])
-
- //申请退款
- const { fetchData } = ApplyRefundApi()
- const getApplyRefund = async () => {
- if (!submitData.current.return_explain) return alert.error('请选择说明原因')
- let res = await fetchData(submitData.current)
- if (res.success) {
- alert.success('申请成功')
- onSuccess?.()
- } else {
- alert.error('申请失败')
- }
- onClose?.()
- }
-
- //获取说明数据
- const [list, setList] = useState([])
- const { fetchData: refundExplainFetchdata } = RefundExplainApi()
- const refundExplain = async () => {
- let res = await refundExplainFetchdata()
- setList(() => res.data.list)
- }
- const [reason, setReason] = useState({ id: 0, name: '' })
- const reasonSelect = useCallback((e) => {
- setReason({ ...reason, name: e.name, id: e.id })
- submitData.current.return_explain = e.id
- closeReason()
- }, [])
-
- //备注
- const getOtherReason = useCallback((val) => {
- submitData.current.reason_describe = val
- }, [])
-
- //显示说明
- const [showReason, setShowReason] = useState(false)
- const closeReason = useCallback(() => {
- setShowReason(false)
- }, [])
-
- //提交
- const onSubmit = (val) => {
- if (val == 2) {
- getApplyRefund()
- } else {
- onClose?.()
- submitData.current = {
- return_explain: 0,
- sale_order_id: 0,
- reason_describe: '',
- }
- }
- }
-
- return (
- <>
-
-
-
- 退款说明
- setShowReason(true)}>
- {reason.name || '请选择'}
-
-
-
-
-
-
- onSubmit(1)}>
- 取消
-
- onSubmit(2)}>
- 确认
-
-
-
-
-
-
- >
- )
-})
diff --git a/src/pages/order/components/estimatedAmount/index.module.scss b/src/pages/order/components/estimatedAmount/index.module.scss
deleted file mode 100644
index b61ef6e..0000000
--- a/src/pages/order/components/estimatedAmount/index.module.scss
+++ /dev/null
@@ -1,85 +0,0 @@
-.order_price{
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- .close{
- width: 100vw;
- height: 100vh;
- position: fixed;
- z-index: 999;
- top: 0;
- left: 0;
-
- }
- &:nth-last-child(n+2) {
- margin-bottom: 30px;
- }
- .order_price_text{
- font-size: $font_size_medium;
- // margin-right: 10px;
- display: flex;
- .iconfont_msg{
- position: relative;
-
- }
- .miconfont{
- font-size: 26px;
- font-weight: normal;
- margin-left: 5px;
- }
- .message{
- position: absolute;
- top: 0;
- background: rgba(168, 179, 189, 0.8);
- z-index: 9;
- min-height: 0;
- padding: 20px;
- box-sizing: border-box;
- border-radius: 10px;
- box-sizing: border-box;
- word-break: break-all;
- color: #fff;
- // transition: top 0.2s ease-in-out;
- transition: opacity 0.5s ease-in-out;
- opacity: 0;
- &::after{
- z-index: 99;
- position: absolute;
- width: 0;
- height: 0;
- content: " ";
- left: 10px;
- bottom: -28px;
- border: 15px solid transparent;
- border-top-color: rgba(168, 179, 189, 0.8);
- }
- }
- }
- .emphasis{
- font-weight: 700;
- }
- .order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: 26px;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
- }
- .emphasis_num{
- text{
- &:nth-child(2) {
- font-size: $font_size_big;
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/order/components/estimatedAmount/index.tsx b/src/pages/order/components/estimatedAmount/index.tsx
deleted file mode 100644
index 7a6e06a..0000000
--- a/src/pages/order/components/estimatedAmount/index.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from "react"
-import {formatKbPrice} from '@/common/common'
-import classnames from "classnames";
-import styles from './index.module.scss'
-import AmountShow from "../amountShow";
-import Taro from "@tarojs/taro";
-
-type Param = {
- style?: Object,
- number?: number,
- title?: string,
- titleStatus?: true|false, //true 标题加大加深
- numberStatus?: 0|1|2, //数字尺寸
- messageTitle?: string,
- messageHeight?: number,
- messageWidth?: number,
- messageShow?: true|false,
-}
-export default memo(({number = 0, titleStatus = true, title = '', messageTitle = '', numberStatus = 1, messageHeight = 70, messageWidth = 430, messageShow = false}:Param) => {
- const [show, setShow] = useState(messageShow)
- const onClose = () => {
- setShow(false)
- }
- const openShow = () => [
- setShow(true)
- ]
-
- const [style, setStyle] = useState<{top: string}>()
-
- useEffect(() => {
- if(show) {
- getDomDes('#message')
- } else {
- setStyle(() => ({top: '0'}))
- }
- }, [show])
- //设置弹出层高度
- const getDomDes = (id) => {
- setTimeout(() => {
- let query = Taro.createSelectorQuery();
- query.select(id).boundingClientRect(rect=>{
- let height = rect.height * 2 + 15;
- setStyle((e) => ({...e, top: `-${height}rpx`, opacity: 1}))
- }).exec();
- }, 0)
- }
- return (
- <>
-
- openShow()}>
- {title}
-
- {show&&{messageTitle}}
-
-
-
-
- {show&&}
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/kindList/index copy.tsx b/src/pages/order/components/kindList/index copy.tsx
deleted file mode 100644
index dff1a9c..0000000
--- a/src/pages/order/components/kindList/index copy.tsx
+++ /dev/null
@@ -1,208 +0,0 @@
-import { ORDER_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, useState } from "react"
-import styles from './index.module.scss'
-
-type OrderParam = {
- estimate_amount: number, //预估金额
- list: any[],
- sale_mode: number,
- sale_mode_name: string,
- unit: string,
- total_colors: number,
- total_fabrics: number,
- total_number: number,
- status: number, //订单状态
- total_sale_price: number, //合计金额
- total_weight_error_discount: number, //空差优惠
- the_previous_status: number, //取消订单时的订单状态
- actual_amount: number, //实付金额
- wait_pay_amount: number //待付金额
-}
-
-type Param = {
- order: OrderParam,
- comfirm?: boolean //是否是确认订单页面使用
-}
-
-export default memo(({order, comfirm = false}:Param) => {
-
- const {
- SaleOrderStatusBooking, // 待接单
- SaleOrderStatusArranging, // 配布中
- SaleOrderStatusArranged, // 已配布
- SaleOrderStatusWaitingPayment, // 待付款
- SaleOrderStatusWaitingDelivery, // 待发货
- SaleOrderStatusWaitingReceipt, // 待收货
- SaleOrderStatusAlreadyReceipt, // 已收货
- SaleOrderStatusComplete, // 已完成
- SaleOrderStatusRefund, // 已退款
- SaleOrderStatusCancel, // 已取消
- SaleorderstatusWaitingPrePayment, // 预付款
- SaleOrderStatusTaking //提货
- } = ORDER_STATUS
-
- //注册金额
- type orderPriceListParams = {id: number, label: string, field: string, message: string, validatarFunc: (val: typeof order) => any}
- const priceList:orderPriceListParams[] = [
- {
- id:1,
- label:'预估金额',
- field: 'estimate_amount',
- message: '预估金额按生产商定义的标准匹重计算,仅供参考。详细交易金额以出单为准!',
- validatarFunc: (order) => {
- return order['estimate_amount'] > 0 && order['total_sale_price'] <= 0
- }
-
- },
- {
- id:2,
- label:'合计金额',
- field: 'total_sale_price',
- message: '包含空差的货款金额',
- validatarFunc: (order) => {
- return order['total_sale_price'] > 0
- }
- },
- {
- id:3,
- label:'空差优惠',
- field: 'total_weight_error_discount',
- message: '扣除空差金额',
- validatarFunc: (order) => {
- return order['total_weight_error_discount'] > 0
- }
- },
- {
- id:5,
- label:'实付金额',
- field: 'actual_amount',
- message: '本单实付总金额',
- validatarFunc: (order) => {
- let value = [SaleOrderStatusWaitingPayment.value, SaleOrderStatusTaking.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value]
- return value.includes(order.status)
- }
- },
- {
- id:4,
- label:'待付金额',
- field: 'wait_pay_amount',
- message: '扣除空差后的货款金额',
- validatarFunc: (order) => {
- let value = [SaleOrderStatusWaitingPayment.value, SaleOrderStatusTaking.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value]
- return value.includes(order.status)
- }
- },
-
- ]
-
- //订单流程金额展示
- const priceConDom = useMemo(() => {
- if(!order) return
- return (
- <>
- {
- priceList.map(item => {
- return <>{item.validatarFunc(order)&&}>
- })
- }
- >
- )
- }, [order])
-
- //对应数量
- const formatCount = useCallback((item) => {
- return order?.sale_mode == 0? item.roll : Number(item.length / 100)
- }, [order])
- //对应单价
- const standardPrice = useCallback(price => {
- return formatPriceDiv(price, 100, true) + '/' + (order?.sale_mode == 1?'m':'kg')
- }, [order])
-
- //数量格式
- const numText = useMemo(() => {
- if(order) {
- 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}`
- }
- }, [order])
-
- //确认订单金额展示
- const comfirmPriceConDom = useMemo(() => {
- if(!order) return
- let item = order.sale_mode == 1?priceList[1]:priceList[0]
- return
- }, [order])
-
- //确认金额展示
- const showPriceConDom = useMemo(() => {
- return comfirm?comfirmPriceConDom:priceConDom
- }, [order])
-
- //颜色金额小计
- const colorPrice = useCallback((item) => {
- let res = item.total_sale_price||item.estimate_amount
- return formatPriceDiv(res, 100, true)
- },[order])
-
-
- //散剪大约重量
- const aboutWeight = useCallback((weight) => {
- if(order.sale_mode == 2 ) {
- let showWeight = [SaleorderstatusWaitingPrePayment.value, SaleOrderStatusBooking.value, SaleOrderStatusArranging.value].includes(order.status)
- return showWeight?; ≈{formatWeightDiv(weight)}kg:<>>
- }
- return <>>
- }, [order])
-
- return (
- <>
- {numText}
-
- {
- order?.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}
- {(colorItem?.return_roll > 0)&&{`已退${colorItem?.return_roll}条`}}
- {(colorItem?.apply_return_roll > 0)&&{`待退${colorItem?.apply_return_roll}条`}}
-
-
- ¥{standardPrice(colorItem.sale_price)}
- {aboutWeight(colorItem.estimate_weight)}
-
-
-
- ×{formatCount(colorItem)}{order.unit}
- ¥{colorPrice(colorItem)}
-
-
-
- })}
-
-
- })
- }
-
- {showPriceConDom}
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/kindList/index.module.scss b/src/pages/order/components/kindList/index.module.scss
deleted file mode 100644
index 052a8b5..0000000
--- a/src/pages/order/components/kindList/index.module.scss
+++ /dev/null
@@ -1,123 +0,0 @@
-
-.orders_list_title{
- padding: 20px 20px 10px 20px;
- color: $color_font_two;
- font-size: $font_size_medium;
-}
-.orders_list_con{
-
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- .order_list{
- &:nth-child(n+2) {
- margin-top: 30px;
- }
- .order_list_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- }
- .num{
- color: $color_font_two;
- font-size: $font_size_min;
- }
- }
- }
- .order_list_scroll{
- margin-top: 30px;
-
- .order_list_item {
- display: flex;
- &:nth-child(n + 2) {
- margin-top: 30px;
- }
- .order_list_item_img{
- width: 126px;
- height: 126px;
- border-radius: 20px;
- }
- .order_list_item_con{
- display: flex;
- width: 100%;
- flex:1;
- border-bottom: 1px solid #f0f0f0;
- height: 150px;
- padding-top: 20px;
- box-sizing: border-box;
- }
- .order_list_item_des{
- flex:1;
- box-sizing: border-box;
- padding-left: 30px;
- .order_list_item_title{
- font-weight: 700;
- font-size: $font_size;
- margin-bottom: 15px;
- text{
- height: 30px;
- background: #f0f0f0;
- border-radius: 6px;
- color: #ABABAB;
- font-size: 24px;
- padding: 0 10px;
- margin-left: 20px;
- font-weight: normal;
- line-height: 30px;
- }
- }
- .order_list_item_price, .order_list_item_price_dg{
- font-size: 26px;
- color: $color_font_three;
- display: flex;
- align-items: center;
- Text{
- padding-left: 13px;
- }
- }
- }
- .order_list_item_count{
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- .count_num{
- color: $color_main;
- font-size: $font_size;
- margin-bottom: 15px;
- font-weight: 400;
- text{
- font-size: $font_size_min;
- }
- }
- .count_price {
- font-size: $font_size;
- font-weight: 700;
- text{
- font-size: $font_size_min;
- }
- }
- }
- }
- }
- .order_estimated_amount{
- display: flex;
- align-items: flex-end;
- flex-direction: column;
- padding: 30px 0;
- .order_price_des{
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
-}
diff --git a/src/pages/order/components/kindList/index.tsx b/src/pages/order/components/kindList/index.tsx
deleted file mode 100644
index c4e5617..0000000
--- a/src/pages/order/components/kindList/index.tsx
+++ /dev/null
@@ -1,240 +0,0 @@
-import { ORDER_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, useState } from 'react'
-import styles from './index.module.scss'
-
-type OrderParam = {
- estimate_amount: number //预估金额
- list: any[]
- sale_mode: number
- sale_mode_name: string
- unit: string
- total_colors: number
- total_fabrics: number
- total_number: number
- status: number //订单状态
- total_sale_price: number //合计金额
- total_weight_error_discount: number //空差优惠
- the_previous_status: number //取消订单时的订单状态
- actual_amount: number //实付金额
- wait_pay_amount: number //待付金额
- refund_amount: number //退款金额
-}
-
-type Param = {
- order: OrderParam
- comfirm?: boolean //是否是确认订单页面使用
-}
-
-export default memo(({ order, comfirm = false }: Param) => {
- const {
- SaleOrderStatusBooking, // 待接单
- SaleOrderStatusArranging, // 配布中
- SaleOrderStatusArranged, // 已配布
- SaleOrderStatusWaitingPayment, // 待付款
- SaleOrderStatusWaitingDelivery, // 待发货
- SaleOrderStatusWaitingReceipt, // 待收货
- SaleOrderStatusAlreadyReceipt, // 已收货
- SaleOrderStatusComplete, // 已完成
- SaleOrderStatusRefund, // 已退款
- SaleOrderStatusCancel, // 已取消
- SaleorderstatusWaitingPrePayment, // 预付款
- SaleOrderStatusTaking, //提货
- } = ORDER_STATUS
-
- //注册金额
- type orderPriceListParams = {
- id: number
- label: string
- field: string
- message: string
- validatarFunc: (val: typeof order) => any
- }
- const priceList: orderPriceListParams[] = [
- {
- id: 1,
- label: '预估金额',
- field: 'estimate_amount',
- message: '预估金额按生产商定义的标准匹重计算,仅供参考。详细交易金额以出单为准!',
- validatarFunc: (order) => {
- return order['estimate_amount'] > 0 && order['total_sale_price'] <= 0
- },
- },
- {
- id: 2,
- label: '合计金额',
- field: 'total_sale_price',
- message: '包含空差的货款金额',
- validatarFunc: (order) => {
- return order['total_sale_price'] > 0
- },
- },
- {
- id: 3,
- label: '空差优惠',
- field: 'total_weight_error_discount',
- message: '扣除空差金额',
- validatarFunc: (order) => {
- return order['total_weight_error_discount'] > 0
- },
- },
- {
- id: 5,
- label: '实付金额',
- field: 'actual_amount',
- message: '本单实付总金额',
- validatarFunc: (order) => {
- return order['actual_amount'] > 0
- },
- },
- {
- id: 4,
- label: '待付金额',
- field: 'wait_pay_amount',
- message: '扣除空差后的货款金额',
- validatarFunc: (order) => {
- return order['wait_pay_amount'] > 0
- },
- },
- {
- id: 6,
- label: '退款金额',
- field: 'refund_amount',
- message: '已退款金额',
- validatarFunc: (order) => {
- return order['refund_amount'] > 0
- },
- },
- ]
-
- //订单流程金额展示
- const priceConDom = useMemo(() => {
- if (!order) return
- return (
- <>
- {priceList.map((item) => {
- return <>{item.validatarFunc(order) && }>
- })}
- >
- )
- }, [order])
-
- //对应数量
- const formatCount = useCallback(
- (item) => {
- return order?.sale_mode == 0 ? item.roll : Number(item.length / 100)
- },
- [order],
- )
- //对应单价
- const standardPrice = useCallback(
- (price) => {
- return formatPriceDiv(price) + '/' + (order?.sale_mode == 1 ? 'm' : 'kg')
- },
- [order],
- )
-
- //数量格式
- const numText = useMemo(() => {
- if (order) {
- 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}`
- }
- }, [order])
-
- //确认订单金额展示
- const comfirmPriceConDom = useMemo(() => {
- if (!order) return
- let item = order.sale_mode == 1 ? priceList[1] : priceList[0]
- return
- }, [order])
-
- //确认金额展示
- const showPriceConDom = useMemo(() => {
- return comfirm ? comfirmPriceConDom : priceConDom
- }, [order])
-
- //颜色金额小计
- const colorPrice = useCallback(
- (item) => {
- let res = item.total_sale_price || item.estimate_amount
- return formatPriceDiv(res, 100, true)
- },
- [order],
- )
-
- //散剪大约重量
- const aboutWeight = useCallback(
- (weight) => {
- if (order.sale_mode == 2) {
- let showWeight = [SaleorderstatusWaitingPrePayment.value, SaleOrderStatusBooking.value, SaleOrderStatusArranging.value].includes(order.status)
- return showWeight ? (
-
- ; ≈{formatWeightDiv(weight)}kg
-
- ) : (
- <>>
- )
- }
- return <>>
- },
- [order],
- )
-
- return (
- <>
- {numText}
-
- {order?.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}
- {colorItem?.return_roll > 0 && {`已退${colorItem?.return_roll}条`}}
- {colorItem?.apply_return_roll > 0 && {`待退${colorItem?.apply_return_roll}条`}}
-
-
- ¥{standardPrice(colorItem.sale_price)}
- {aboutWeight(colorItem.estimate_weight)}
-
-
-
-
- ×{formatCount(colorItem)}
- {order.unit}
-
-
- ¥
- {colorPrice(colorItem)}
-
-
-
-
- )
- })}
-
-
- )
- })}
- {showPriceConDom}
-
- >
- )
-})
diff --git a/src/pages/order/components/offlinePay/index.module.scss b/src/pages/order/components/offlinePay/index.module.scss
deleted file mode 100644
index f84e995..0000000
--- a/src/pages/order/components/offlinePay/index.module.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-$top:170px;
-.offlinePay_main{
- .offlinePay_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
- }
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
-
- }
-
- .offlinePay_list{
- border-radius: 10px;
- padding: 60px 0;
- .offlinePay_con_text{
- font-size: $font_size;
- font-weight: 700;
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/offlinePay/index.tsx b/src/pages/order/components/offlinePay/index.tsx
deleted file mode 100644
index 87f1d25..0000000
--- a/src/pages/order/components/offlinePay/index.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo } from "react";
-import AmountShow from "../amountShow";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-import MCheckbox from "@/components/checkbox";
-import Popup from "@/components/popup";
-import SearchInput from "@/components/searchInput";
-import Taro from "@tarojs/taro";
-
-type Param = {
- show?: true|false,
- onClose?: () => void,
- offlineInfo?: {
- account_name: string,
- bank_of_deposit: string,
- transfer_remittance_account: string
- }
-}
-export default memo(({show = true, onClose, offlineInfo}:Param) => {
- //复制功能
- const clipboardData = () => {
- Taro.setClipboardData({
- data: `开户名称:${offlineInfo?.account_name};\n\r 开户银行:${offlineInfo?.bank_of_deposit};\n\r 转账汇款账号:${offlineInfo?.transfer_remittance_account};`,
- success: function (res) {
- Taro.showToast({
- icon: 'none',
- title: '复制成功'
- })
- }
- })
- }
- return (
-
-
-
-
- 线下汇款
-
-
- {offlineInfo?.account_name}
-
-
- {offlineInfo?.bank_of_deposit}
-
-
- {offlineInfo?.transfer_remittance_account}
-
-
- 复制信息
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/orderState/index.module.scss b/src/pages/order/components/orderState/index.module.scss
deleted file mode 100644
index 536417e..0000000
--- a/src/pages/order/components/orderState/index.module.scss
+++ /dev/null
@@ -1,155 +0,0 @@
-.order_flow_state{
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing:border-box;
- position: relative;
- overflow: hidden;
- .order_status_list{
- max-height: 250px;
- overflow: hidden;
- transition: all 0.3s ease-in-out;
- }
- .order_status_list_show {
- max-height: 1000px !important;
- }
- .order_status_item{
- position: relative;
- &:nth-last-child(n+2) {
- padding-bottom: 30px;
- }
- .order_status_tail_end, .order_status_tail{
- width: 15px;
- height: 15px;
- border: 2px solid $color_main;
- background-color: #fff;
- border-radius: 50%;
- position:absolute;
- left: 0;
- top: 10px;
- z-index: 10;
- }
- .order_status_tail_end{
- background-color: $color_main;
- }
- .order_status_line{
- border-left: 2px solid $color_main;
- height: 100%;
- top: 10px;
- left: 9px;
- position: absolute;
- z-index: 1;
- }
- .order_status_content{
- display: flex;
- align-items: center;
- padding: 0 30px;
- .order_status_title{
- color: $color_font_two;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status_time{
- color: $color_font_two;
- font-size: $font_size_medium;
- padding: 0 20px;
- }
- .order_status_tag{
- font-size: $font_size_min;
- background: #F0F0F0;
- border-radius: 6px;
- padding: 5px 10px;
- color: $color_font_two;
- }
- .order_status_select{
- color: $color_main;
- }
- .order_status_tag_select{
- color: $color_main;
- }
- }
- .order_status_des{
- color: $color_font_two;
- font-size: $font_size_medium;
- }
- .order_status_des_select{
- color: $color_font_one;
- }
- .pay_time{
- height: 56px;
- background: #f6f6f6;
- border-radius: 20px;
- color: #3C3C3C;
- font-size: 24px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 700;
- margin-top: 20px;
- text{
- font-size: 28px;
- color: $color_main;
- padding: 0 10px;
-
- }
- }
- }
- .more{
- width: 100%;
- text-align: center;
- font-size: $font_size_min;
- color: $color_font_one;
- padding-top: 20px;
- .miconfonts{
- display: inline-block;
- font-size: 25px;
- transform:rotate(90deg);
- }
- .open_miconfonts{
- transform:rotate(-90deg);
- }
- }
- .image_tag{
- width: 140px;
- height: 144px;
- .image{
- width: 140px;
- height: 144px;
- }
- position: absolute;
- top: -10px;
- right: -10px;
- }
- .refresh{
- position: absolute;
- top: 23px;
- right: 20px;
- display: flex;
- color: #707070;
- display: flex;
- align-items: center;
-
- .mconfont{
- font-size: 30px;
- }
- .refresh_text{
- font-size: 23px;
- }
- }
-}
-.pay_title_tag{
- margin-top: 10px;
- font-size: 24px;
- color: #EE7500;
- background: rgba(255,230,206,0.36);
- border-radius: 10px;
- height: 56px;
- display: flex;
- align-items: center;
- position: relative;
- z-index: 999;
- .miconfont {
- font-size: 30px;
- padding: 0 20px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/orderState/index.tsx b/src/pages/order/components/orderState/index.tsx
deleted file mode 100644
index f45fdb9..0000000
--- a/src/pages/order/components/orderState/index.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { Image, Text, View } from "@tarojs/components"
-import { memo, useEffect, useMemo, useRef, useState } from "react"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { formatDateTime, formatImgUrl } from "@/common/fotmat";
-import { ORDER_STATUS, PAYMENT_METHOD } from "@/common/enum";
-import * as dayjs from 'dayjs'
-
-type List = {
- status: string,
- time: string,
- tag: string,
- desc: string,
- expire_time: string
-}
-
-type Param = {
- onRefresh?: () => void,
- orderInfo?: {
- logistics_details:List[], //订单状态列表
- payment_method: number, //支付方式
- status: number, //订单状态
- account_period?: number, //账期
- account_period_time?: string //还款日期
- }
-}
-
-export default memo(({orderInfo = {logistics_details: [],payment_method: 0, status: 0}, onRefresh}:Param) => {
- useEffect(() => {
- console.log('orderInfo33::',orderInfo)
- }, [orderInfo])
-
- const [showMore, setShowMore] = useState(false)
- const changeMore = () => {
- setShowMore(() => !showMore)
- }
- const dataList = useMemo(() => {
- return orderInfo.logistics_details?orderInfo?.logistics_details.reverse():[]
- }, [orderInfo.logistics_details])
-
- //订单状态枚举
- const {SaleorderstatusWaitingPrePayment} = ORDER_STATUS
-
- //支付方式枚举
- const {
- PaymentMethodAccountPeriod,
- PaymentMethodCashOnDelivery,
- } = PAYMENT_METHOD
-
- return (
- <>
- {(dataList?.length > 0)&&
-
- {dataList.map((item, index) =>
- {(dataList.length > 1)&&}
- {(dataList.length != (index + 1))&&}
-
- {item.status}
- {formatDateTime(item.time)}
-
- {item.desc}
- )}
-
- {(dataList.length > 2) && changeMore()}>
- {showMore&&'收起详情'||'点击查看详情'}
-
- }
-
- {(orderInfo.payment_method == PaymentMethodCashOnDelivery.value)&&}
- {(orderInfo.payment_method == PaymentMethodAccountPeriod.value)&&}
-
- }
- {(orderInfo.payment_method == PaymentMethodAccountPeriod.value)&&
-
- 您使用了{orderInfo.account_period}天账期支付,还款日期为{formatDateTime(orderInfo.account_period_time)}
- }
- >
- )
-})
diff --git a/src/pages/order/components/orderStatusTag/index.module.scss b/src/pages/order/components/orderStatusTag/index.module.scss
deleted file mode 100644
index df84721..0000000
--- a/src/pages/order/components/orderStatusTag/index.module.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-.tag{
- font-size: $font_size_min;
- padding: 5px 15px;
- background-color: $color_main;
- color: #fff;
- border-radius: 0px 20px 0px 20px;
- display: flex;
- align-items: center;
- .miconfont{
- font-size: 30px;
- }
-
-}
-.saleReturn_tag{
- background-color: #E4E4FF;
- color: #1818B4;
-}
-.refund_tag {
- background-color: #FFE6CE;
- color: #EE7500;
-}
\ No newline at end of file
diff --git a/src/pages/order/components/orderStatusTag/index.tsx b/src/pages/order/components/orderStatusTag/index.tsx
deleted file mode 100644
index 968fe99..0000000
--- a/src/pages/order/components/orderStatusTag/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo } from "react"
-import classnames from "classnames";
-import styles from './index.module.scss'
-import { REFUND_STATUS_ORDER } from "@/common/enum";
-
-
-type Param = {
- status?: number
-}
-export default memo(({status = 0}:Param) => {
- const {
- ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款
- ReturnApplyOrderTypeReturnForRefund, // 退货退款
- ReturnApplyOrderTypeSalesRefund // 销售退款
- } = REFUND_STATUS_ORDER
- return (
- <>
- {(status !== 0)&&
-
- { status == ReturnApplyOrderTypeReturnForRefund.value?'退货':'退款'}
- }
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/payment/index.module.scss b/src/pages/order/components/payment/index.module.scss
deleted file mode 100644
index f2828c7..0000000
--- a/src/pages/order/components/payment/index.module.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-$top:190px;
-.payment_main{
- .payment_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
- }
-
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
-
- }
- .amount{
- text-align: center;
- padding: 25px 0;
- }
- .playMode{
- width: 100%;
- padding-bottom: 20px;
- font-size: 26px;
- text-align: center;
- color: #707070;
- }
-
- .payment_list{
- background-color: #fff;
- // box-shadow: 2px 2px 6px 0px rgba(0,0,0,0.16);
- min-height: 300px;
- border-radius: 10px;
- padding-bottom: 100px;
- position: relative;
- // background: radial-gradient(circle 20px at left $top, transparent 20px, #fff 20px + 3px) left 0px/60% no-repeat ,
- // radial-gradient(circle 20px at right $top, transparent 20px, #fff 20px + 3px) right 0px/60% no-repeat;
- // filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, .16));
- position: relative;
- &::before{
- content: '';
- position: absolute;
- border-bottom: 3px dashed #ccc;
- top: $top;
- width: calc(100% - 50px);
- left:0;
- right: 0;
- margin: auto;
-
- }
- .payment_list_top_border{
- height: 32px;
- width: 100%;
- background: linear-gradient(215deg,#cde5ff 2%, #cde5ff 2%, #68b4ff 72%);
- border-radius: 10px 10px 0px 0px;
- }
- .payment_list_title{
- text-align: center;
- padding: 30px 0 50px 0;
- font-size: $font_size;
- color: $color_font_three;
- .payment_list_title_price_item{
- display: flex;
- justify-content: space-between;
- padding: 0 90px;
- &:nth-child(1) {
- margin-bottom: 15px;
- }
- }
- text{
- &:nth-child(2) {
- color: $color_main;
- }
- }
- }
- .payment_list_con{
- padding: 20px 30px 0 30px;
- .payment_list_item{
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 123px;
- &:nth-last-child(n+2) {
- border-bottom: 2px solid #F3F3F3;
- }
- }
- .payment_list_item_left{
- display: flex;
- flex-direction: column;
- font-size: $font_size;
- .payment_list_item_left_name{
- display: flex;
- align-items: center;
- }
- .miconfont{
- font-size: 30px;
- color: #007AFF;
- padding-right: 10px;
- }
- .advance_payment{
- color: #FFC300;
- }
- .account_period{
- color: #07C160;
- }
- .payment_list_item_left_price{
- font-size: $font_size_min;
- color: $color_font_two;
- padding-left: 35px;
- padding-top: 5px;
- }
- }
- .miconfont_more{
- font-size: 20px;
- }
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/payment/index.tsx b/src/pages/order/components/payment/index.tsx
deleted file mode 100644
index 29fd465..0000000
--- a/src/pages/order/components/payment/index.tsx
+++ /dev/null
@@ -1,247 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
-import AmountShow from "../amountShow";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-import MCheckbox from "@/components/checkbox";
-import Popup from "@/components/popup";
-import OfflinePay from "../offlinePay";
-import ScanPay from "../scanPay";
-import { GetOrderPayApi, SubmitOrderPayApi, GetPrepayOrderPayApi, SubmitPrepayOrderPayApi } from "@/api/orderPay";
-import { formatPriceDiv } from "@/common/fotmat";
-import {alert} from "@/common/common"
-import { ORDER_STATUS, PAYMENT_METHOD, SUBSCRIPTION_MESSAGE_SCENE } from "@/common/enum";
-import { UseSubscriptionMessage } from "@/use/useCommon";
-import { throttle } from "@/common/util";
-
-type Param = {
- show?: true|false,
- onClose?: () => void,
- onSubmitSuccess?: () => void, //支付成功
- orderInfo?: OrderInfo,
-}
-
-type OrderInfo = {
- id?: number, //销售单id
- should_collect_order_id?: number, //应付单id
- pre_collect_order_id?: number, //预付单id
- status?: number, //订单状态
- payment_method?: number, //支付方式
- sale_mode?: number, //订单类型 0:大货 1剪板 2散剪
- actual_weight?: number, //实际重量
- estimate_weight?: number, //预估重量
- [val: string]: any
-}
-
-type PayStatus = 1|2|3|4|5|null //1:预存款, 2:账期,3:线下汇款, 4:扫码支付, 5:货到付款
-export default memo(({show = false, onClose, orderInfo, onSubmitSuccess}:Param) => {
-
- //支付方式枚举
- const {PaymentMethodPreDeposit, PaymentMethodAccountPeriod, PaymentMethodCashOnDelivery} = PAYMENT_METHOD
- //订单状态枚举
- const {SaleorderstatusWaitingPrePayment} = ORDER_STATUS
-
- //提交参数
- const [submitData, setSubmitData] = useState<{id:number, payment_method: PayStatus}>({
- id:0,
- payment_method: null
- })
-
- //线下付款
- const [offlinePayShow, setofflinePayShow] = useState(false)
- const onShowOfflinePay = () => {
- setofflinePayShow(true)
- // onClose?.()
- }
-
- //扫码支付
- const [scanPayShow, setScanPayShow] = useState(false)
- const onShowScanPay = () => {
- setScanPayShow(true)
- onClose?.()
- }
-
- //获取支付方式数据
- const [payInfo, setPayInfo] = useState()
- const {fetchData: orderFetchData} = GetOrderPayApi()
- const {fetchData: prepayOrderFetchData} = GetPrepayOrderPayApi()
- const getOrderPay = async () => {
- if(orderInfo&&orderInfo.should_collect_order_id) {
- //有应收单id时用应收单获取数据
- let {data} = await orderFetchData({id: orderInfo?.should_collect_order_id})
- setPayInfo(() => data)
- } else {
- //用预付单id获取支付信息
- let {data} = await prepayOrderFetchData({id: orderInfo?.pre_collect_order_id})
- setPayInfo(() => data)
- }
- }
- useEffect(() => {
- if(show&&orderInfo&&(orderInfo?.should_collect_order_id||orderInfo?.pre_collect_order_id)) {
- let id = orderInfo.should_collect_order_id||orderInfo.pre_collect_order_id
- setSubmitData((val) => ({...val, id:id as number}))
- getOrderPay()
- }
- }, [show, orderInfo])
-
- //预存款选择
- const advanceRef = useRef(null)
- const advanceSelectData = useCallback((val) => {
- setSubmitData((e) => ({...e, payment_method:val}))
- }, [])
- const changeSelect = () => {
- advanceRef.current.onSelectEven()
- }
-
- //账期选择
- const accountPeriodRef = useRef(null)
- const periodSelectData = (val) => {
- setSubmitData((e) => ({...e, payment_method:val}))
- }
- const accountPeriodSelect = () => {
- accountPeriodRef.current.onSelectEven()
- }
-
- //订阅消息
- const {ToPay} = SUBSCRIPTION_MESSAGE_SCENE
- const {openSubscriptionMessage} = UseSubscriptionMessage()
-
- //提交支付
- const {fetchData: submitFetchData} = SubmitOrderPayApi() //应收单提交
- const {fetchData: submitPrepayOrderFetchData} = SubmitPrepayOrderPayApi() //预付单提交
- const submitPay = throttle(async () => {
- if(submitData.payment_method === null) {
- alert.error('请选择支付方式')
- return false
- }
- //账期支付,或预付款并且不是剪板才会订阅
- if((submitData.payment_method == PaymentMethodAccountPeriod.value || orderInfo?.status == SaleorderstatusWaitingPrePayment.value)&& orderInfo?.sale_mode != 1) {
- await openSubscriptionMessage({orderId: orderInfo?.id, scenes: ToPay.value})
- }
- alert.showLoading('正在支付')
- let res:any = null
- if(orderInfo?.should_collect_order_id) {
- res = await submitFetchData(submitData)
- } else {
- res = await submitPrepayOrderFetchData(submitData)
- }
- if(res.success) {
- alert.success('支付成功')
- onSubmitSuccess?.()
- } else {
- alert.none(res.msg)
- }
- alert.hideLoading()
- }, 800)
-
- //预付款
- const advance_payment = useMemo(() => {
- const price = payInfo?.should_collect_money - payInfo?.amount_paid
- return (
- {(payInfo?.advance_deposit_balance < price)&&'余额不足,' }剩余 ¥{formatPriceDiv(payInfo?.advance_deposit_balance)}
- )
- }, [payInfo])
-
- //是否显示七天账期
- const show_account_payment = useMemo(() => {
- //剪板和散剪不显示
- if(orderInfo?.sale_mode != 0) return false
- //支付方式是账期支付,不显示
- if(orderInfo?.payment_method == PaymentMethodAccountPeriod.value) return false
- //支付方式是货到付款,不显示
- if(orderInfo?.payment_method == PaymentMethodCashOnDelivery.value) return false
- //订单状态是预付款,不显示
- if(orderInfo?.status == SaleorderstatusWaitingPrePayment.value) return false
- return true
- }, [orderInfo])
-
- //账期
- const account_peyment = useMemo(() => {
- const price = payInfo?.should_collect_money - payInfo?.amount_paid
- return (
- {(payInfo?.account_period_credit_available_line < price)&&'额度不足, '}剩余 ¥{formatPriceDiv(payInfo?.account_period_credit_available_line)}
- )
- }, [payInfo])
-
- //在线支付所需数据
- const onlinePayData = useMemo(() => {
- return {...orderInfo, offline_remittance_information: payInfo?.offline_remittance_information}
-
- }, [orderInfo, payInfo])
-
- return (
-
-
-
-
- 待支付款项
-
-
-
- {(payInfo?.delivery_payment_name)&&已使用{payInfo?.delivery_payment_name}方式付款}
-
-
-
- {/* 向商家发起支付 */}
-
-
- 订单金额
- ¥{formatPriceDiv(payInfo?.should_collect_money)}
-
-
- 已付金额
- ¥{formatPriceDiv(payInfo?.amount_paid)}
-
-
-
-
-
-
-
-
- 预存款
-
- {advance_payment}
-
- advanceSelectData(PaymentMethodPreDeposit.value)} onClose={() => advanceSelectData(null)}/>
-
- {show_account_payment&&
-
-
-
- {payInfo?.account_period}天账期
-
- {account_peyment}
-
- periodSelectData(PaymentMethodAccountPeriod.value)} onClose={() => periodSelectData(null)}/>
- }
-
-
-
-
- 线下汇款
-
-
-
-
-
-
-
-
- 扫码支付
-
-
-
-
-
-
- 确认交易
-
-
- setofflinePayShow(false)} offlineInfo={payInfo?.offline_remittance_information}/>
- setScanPayShow(false)} />
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/reasonPopup/index.module.scss b/src/pages/order/components/reasonPopup/index.module.scss
deleted file mode 100644
index 2d0f899..0000000
--- a/src/pages/order/components/reasonPopup/index.module.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-.reason_return_con{
- height: 50vh;
- .reason_title{
- padding: 10px 20px 0 20px;
- height: 60px;
- border-bottom: 1PX solid #F3F3F3;
- box-sizing: border-box;
- Text{
- font-size: 26px;
- border-bottom: 3px solid #000;
- padding: 10px;
- font-weight: 400;
- }
-
- }
- .reason_scroll{
- height: calc(100% - 70px);
- .reason_list{
- font-size: 26px;
- padding: 30px 20px 0 20px;
- color: #707070;
- .reason_item{
- margin-bottom: 36px;
- }
- .select_item {
- color: #007AFF;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/reasonPopup/index.tsx b/src/pages/order/components/reasonPopup/index.tsx
deleted file mode 100644
index 0ed990c..0000000
--- a/src/pages/order/components/reasonPopup/index.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import Popup from "@/components/popup";
-import { ScrollView, Text, View } from "@tarojs/components";
-import { memo, useMemo } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-//原因选择
-type ReasonInfoParam = {
- show?: boolean, //显示
- onClose?: () => void, //关闭
- title?: string, //标题
- list?: {id:number, name:string, typle?:number}[], //数据列表
- onSelect?: (val: object) => void, //选择
- defaultValue?: number, //默认选中
-}
-export default memo(({show = false, onClose, title = '', list= [], onSelect, defaultValue}: ReasonInfoParam) => {
-
- return (
-
-
- {title}
-
-
- {list.map(item => onSelect?.(item)} key={item.id} className={classnames(styles.reason_item, item.id == defaultValue&&styles.select_item)}>{item.name} )}
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/remark/index.module.scss b/src/pages/order/components/remark/index.module.scss
deleted file mode 100644
index d624050..0000000
--- a/src/pages/order/components/remark/index.module.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-.order_popup{
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20px 0;
- .order_popup_title{
- color: $font_size_big;
- font-weight: 700;
- color: #000000;
- padding-bottom: 20px;
- }
- .order_popup_input{
- width: 100%;
- padding: 0 25px;
- box-sizing: border-box;
- margin-top: 43px;
- position: relative;
- .descDataNum{
- position: absolute;
- right: 40px;
- bottom: 10px;
- height: 39px;
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- textarea{
- background-color: #f3f3f3;
- border-radius: 10px;
- width: 100%;
- height: 313px;
- padding: 20px;
- padding-bottom: 50px;
- box-sizing: border-box;
- font-size: $font_size;
- border: 2px solid #e6e6e6;
- }
- }
- .order_save_address{
- height: 82px;
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- text-align: center;
- line-height: 82px;
- color: #fff;
- margin-top: 60px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/remark/index.tsx b/src/pages/order/components/remark/index.tsx
deleted file mode 100644
index 8fdd21a..0000000
--- a/src/pages/order/components/remark/index.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import Popup from "@/components/popup"
-import { Textarea, View } from "@tarojs/components"
-import { useCallback, useEffect, useState } from "react"
-import styles from './index.module.scss'
-
-type Param = {
- onBlur?: (val:any) => void
- onSave?: (val: string) => void
- defaultValue?: string
-}
-export default ({onBlur, onSave, defaultValue = ''}:Param) => {
- const [descData, setDescData] = useState({
- number: 0,
- value: '',
- count: 200
- })
-
- useEffect(() => {
- getDesc(defaultValue)
- }, [defaultValue])
-
- const getDesc = (value) => {
- let res = value
- if(value.length > descData.count) {
- res = value.slice(0, descData.count)
- }
- setDescData({...descData, number:res.length, value: res})
- }
-
- const setSave = () => {
- onSave?.(descData.value)
- }
- return (
-
- 编辑备注
-
-
- {descData.number}/{descData.count}
-
- setSave()}>保存
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/order/components/returnRecord/index.module.scss b/src/pages/order/components/returnRecord/index.module.scss
deleted file mode 100644
index 4ef3d47..0000000
--- a/src/pages/order/components/returnRecord/index.module.scss
+++ /dev/null
@@ -1,165 +0,0 @@
-.returnRecord_main{
- height: 70vh;
- .returnRecord_con{
- padding: 20px;
- }
- .order_item{
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing: border-box;
- box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.16);
- margin-bottom: 20px;
- .header{
- display: flex;
- align-items: center;
- .user{
- display: flex;
- align-items: center;
- .name {
- color: #000;
- font-weight: 700;
- margin-left: 15px;
- font-size: $font_size;
- width: 100px;
- @include common_ellipsis();
- }
- image{
- width: 70px;
- height: 70px;
- border-radius: 50%;
- }
- }
- .order_con {
- padding-left: 15px;
- width: 100%;
- .name {
- color: #000;
- font-weight: 700;
- font-size: $font_size;
- }
- .order_num {
- flex: 1;
- font-size: $font_size_medium;
- color: $color_font_one;
- padding-right: 10px;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .order_num_con{
- flex:1;
- }
- .miconfont {
- font-size: 20px;
- }
- }
- }
- .tag{
- font-size: $font_size_min;
- padding: 5px 15px;
- background-color: $color_main;
- color: #fff;
- border-radius: 0px 20px 0px 20px;
- }
- }
- .product_title{
- display: flex;
- align-items: center;
- padding: 35px 0;
- .product_tag{
- background-color: #CDE5FF;
- font-size: $font_size_min;
- padding: 5px 10px;
- color: $color_main;
- border-radius: 6px;
- }
- .product_name{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- padding: 0 20px;
- @include common_ellipsis()
- }
- .product_status{
- font-size: $font_size;
- color: $color_main;
- }
- }
- .product_list{
- display: flex;
- .image{
- width: 126px;
- height: 126px;
- border-radius: 20px ;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 20px ;
- }
- .color_num {
- background: rgba(0,0,0, 0.5);
- border-radius: 36px 0px 20px 0px;
- font-size: $font_size_min;
- color: #fff;
- position: absolute;
- right:0;
- bottom:0;
- padding: 5px 10px 5px 15px;
- box-sizing: border-box;
- }
- }
- .color_list{
- flex:1;
- padding-left: 30px;
- .color_item{
- display: flex;
- justify-content: space-between;
- font-size: $font_size_min;
- color: $color_font_three;
- align-items: center;
- margin-bottom: 20px;
- .color_title{
- font-weight: 700;
- font-size: $font_size;
- color: #000;
- }
- .color_more{
- color: $color_font_three;
- }
- }
- }
-
- }
- .color_count_num{
- font-size: $font_size_min;
- color: $color_font_two;
- background-color: #F6F6F6;
- border-radius: 10px;
- padding: 10px 22px;
- margin-top: 20px;
- }
- .order_number{
- display: flex;
- background-color: #F6F6F6;
- padding: 20px;
- margin: 20px 0;
- align-items: center;
- font-size: $font_size_medium;
- border-radius: 10px;
- text{
- &:nth-child(1) {
-
- font-weight: 700;
- color: $color_font_three;
- border-right: 2px solid #CCCCCC;
- padding-right: 20px;
- }
- &:nth-child(2) {
- padding-left: 20px;
- color: $color_font_one;
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/returnRecord/index.tsx b/src/pages/order/components/returnRecord/index.tsx
deleted file mode 100644
index 30a5ac9..0000000
--- a/src/pages/order/components/returnRecord/index.tsx
+++ /dev/null
@@ -1,164 +0,0 @@
-import { GetSaleOrderListApi, ReturnRecordApi } from "@/api/salesAfterOrder";
-import { goLink } from "@/common/common";
-import { formatHashTag, formatPriceDiv } from "@/common/fotmat";
-import { dataLoadingStatus, getFilterData } from "@/common/util";
-import InfiniteScroll from "@/components/infiniteScroll";
-import LabAndImg from "@/components/LabAndImg";
-import Popup from "@/components/popup";
-import { useSelector } from "@/reducers/hooks";
-import { Image, Text, View } from "@tarojs/components";
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import { REFUND_STATUS_ORDER } from "@/common/enum";
-import OrderStatusTag from "../orderStatusTag";
-
-type Param = {
- show?: true|false,
- onClose?: () => void,
- onSubmit?: () => void,
- id?: number
-}
-export default memo(({show, onClose, onSubmit, id}:Param) => {
- //搜索参数
- const searchField = useRef({
- page : 1,
- size : 10,
- sale_order_id: 0
- })
-
- useEffect(() => {
- if(show && id) {
- searchField.current.sale_order_id = id
- getOrderList()
- }
- }, [show, id])
-
- const userInfo = useSelector(state => state.userInfo)
-
- //获取售后订单列表
- const {fetchData: listFetchData, state:orderState} = ReturnRecordApi()
- const [orderData, setOrderData] = useState<{list:any[], total:number}>({list:[], total:0})
- const getOrderList = async () => {
- let res = await listFetchData(getFilterData(searchField.current))
- setOrderData({list: res.data.list, total: res.data.total})
- }
-
- //整理颜色
- const labAndRgbAndUrl = useCallback((item) => {
- return {lab:{...item?.lab}, rgb:{...item?.rgb}, texturl_url: item?.texturl_url}
- }, [orderData])
-
- const {
- ReturnApplyOrderTypeReturnForRefund, // 退货退款
- } = REFUND_STATUS_ORDER
-
- //对应单价
- const standardPrice = useCallback((price, sale_mode) => {
- return formatPriceDiv(price).toLocaleString() + '/' + (sale_mode == 1?'m':'kg')
- }, [orderData])
-
- //对应数量
- const formatCount = useCallback((item, sale_mode) => {
- return sale_mode == 0? item.roll + '条' : Number(item.length / 100) + '米'
- }, [orderData])
-
- //上拉加载数据
- const pageNum = useRef({size: searchField.current.size, page: searchField.current.page})
- const getScrolltolower = () => {
- if(orderData.list.length < orderData.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- searchField.current.size = size
- }
- }
-
- const numText = useCallback((value) => {
- let total_number_new = value?.sale_mode == 0? value?.total_number:(value?.total_number/100)
- return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${total_number_new}${value?.sale_mode == 0? '条':'米'}`
- }, [orderData])
-
- //监听滚动
- const [scrollStatus, setScrollStatus] = useState(false)
- const onscroll = useCallback((e) => {
- if(e.detail.scrollTop > 20) {
- setScrollStatus(true)
- } else {
- setScrollStatus(false)
- }
- },[])
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({list:orderData.list, total: orderData.total, status: orderState.loading})
- }, [orderData, orderState])
-
- return (
- <>
-
-
-
-
- {orderData?.list?.map(item =>
- goLink('/pages/salesAfter/index', {id: item?.id})}>
-
-
-
-
- {userInfo?.adminUserInfo?.user_name}
-
-
- 售后单号:{item?.return_order_no}
-
-
-
-
-
-
- goLink('/pages/salesAfter/index', {id: item?.id})}>
-
- {item?.sale_mode_name}
- {formatHashTag(item?.product_list?.[0].code, item?.product_list?.[0].name)}
- {item?.stage_name}
-
-
-
-
- {item?.product_list?.[0].product_colors?.[0].code}
-
-
- {item?.product_list?.[0].product_colors?.map((itemColor, index) => {
- return (
- (index <= 1)&&
- {formatHashTag(itemColor.code, itemColor.name)}
- {standardPrice(itemColor.sale_price, item.sale_mode)}
- ×{formatCount(itemColor, item.sale_mode)}
-
- )
- })
- }
- {(item?.product_list?.[0].product_colors.length > 2) &&
- ……
- ……
- ……
- }
-
-
- {numText(item)}
-
- {item?.type == ReturnApplyOrderTypeReturnForRefund?.value?'已申请退货':'已申请退款'}
- 订单号:{item?.order_no}
-
-
- )}
-
-
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/scanPay/index.module.scss b/src/pages/order/components/scanPay/index.module.scss
deleted file mode 100644
index dcb356d..0000000
--- a/src/pages/order/components/scanPay/index.module.scss
+++ /dev/null
@@ -1,54 +0,0 @@
-$top:170px;
-.scanPay_main{
- .scanPay_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
-
- }
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
- }
- .desc{
- font-size: $font_size_min;
- color: $color_main;
- text-align: center;
- padding: 10px 0;
- .miconfont{
- font-size: 25px;
- }
- }
-
- .scanPay_list{
- border-radius: 10px;
- height: 900px;
- image{
- width: 100%;
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/scanPay/index.tsx b/src/pages/order/components/scanPay/index.tsx
deleted file mode 100644
index 0e84828..0000000
--- a/src/pages/order/components/scanPay/index.tsx
+++ /dev/null
@@ -1,198 +0,0 @@
-import { Image, ScrollView, Text, View } from '@tarojs/components'
-import { memo, useEffect, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Popup from '@/components/popup'
-import Taro from '@tarojs/taro'
-import { alert } from '@/common/common'
-import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/fotmat'
-import useCheckAuthorize from '@/use/useCheckAuthorize'
-import { GetPayCode } from '@/api/onlinePay'
-import LoadingCard from '@/components/loadingCard'
-
-type Param = {
- show?: true | false
- onClose?: () => void
- company?: string
- qrcode?: string
- orderInfo?: any
-}
-type ListParam = {
- product_code: string
- product_name: string
- product_color_code: string
- product_color_name: string
- num: string
- weight: string
- length: string
- sale_price: string
- total_price: string
- weight_error: string
-}
-export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
- const [detail, setDetail] = useState()
-
- useEffect(() => {
- if (orderInfo) {
- let lists: ListParam[] = []
- orderInfo.product_list?.map((pitem) => {
- pitem?.product_colors?.map((citem) => {
- lists.push({
- product_code: formatHashTag(pitem.code, '', 'name')!,
- product_name: pitem.name,
- product_color_code: formatHashTag(citem.code)!,
- product_color_name: citem.name,
- num: citem.roll.toString(),
- length: (citem.length / 100).toString(),
- weight: formatWeightDiv(citem.actual_weight || citem.estimate_weight).toString(),
- sale_price: formatPriceDiv(citem.sale_price).toString(),
- total_price: formatPriceDiv(citem.total_sale_price || citem.estimate_amount).toString(), //小计
- weight_error: formatWeightDiv(citem.weight_error).toString(),
- })
- })
- })
- setDetail(() => ({
- title: '面料销售电子确认单',
- company: orderInfo.company_name, //后端公司
- order_type: orderInfo.sale_mode_name, //类型:大货
- sale_user: orderInfo.sale_user_name, //业务员
- order_created_time: formatDateTime(orderInfo.create_time),
- order_no: orderInfo.order_no,
- shipment_mode: orderInfo.shipment_mode_name, //发货方式
- target_user_name: userName(orderInfo), //收件人
- target_address: address(orderInfo), //收货地址
- target_description: orderInfo.remark, //发货备注
- pay_account: orderInfo.offline_remittance_information?.transfer_remittance_account, //专属收款账号
- bank_account_name: orderInfo.offline_remittance_information?.account_name, //账户名称
- bank_name: orderInfo.offline_remittance_information?.bank_of_deposit, //开户银行
- pay_type: '', //支付方式, 可不传
- client: orderInfo.purchaser_name, //客户名称
- phone: userPhone(orderInfo), //收货手机号码
- order_total_length: (orderInfo.total_number / 100).toString(), //订单布匹长度
- order_total_price: formatPriceDiv(orderInfo.bill_total_sale_price).toString(), //订单价格
- order_total_num: orderInfo.total_number + '',
- qrcode: '', //跳转链接
- order_total_weight: formatWeightDiv(orderInfo.total_weight || orderInfo.total_estimate_weight).toString(), //订单布匹重量
- list: lists,
- show_qrcode: true, //是否显示码单
- estimate_amount: formatPriceDiv(orderInfo.estimate_amount).toString(),
- show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0,
- total_sale_price: formatPriceDiv(orderInfo.total_sale_price).toString(),
- show_total_sale_price: orderInfo.total_sale_price > 0,
- total_weight_error_discount: formatPriceDiv(orderInfo.total_weight_error_discount).toString(),
- show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0,
- 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_barcode: true,
- order_total_weight_error: formatWeightDiv(orderInfo.total_weight_error).toString(), //总空差重量
- }))
- }
- }, [orderInfo])
-
- //收货地址
- const address = (addressInfo) => {
- if (addressInfo?.shipment_mode == 2) {
- return addressInfo?.province_name ? addressInfo.province_name + addressInfo.city_name + addressInfo.district_name + addressInfo.address_detail : ''
- } else {
- return addressInfo?.take_goods_address
- }
- }
-
- //收件人
- const userName = (addressInfo) => {
- return addressInfo?.shipment_mode == 2 ? orderInfo.target_user_name : ''
- }
-
- //手机号
- const userPhone = (addressInfo) => {
- return addressInfo?.shipment_mode == 2 ? orderInfo.target_user_phone : orderInfo.take_goods_phone
- }
-
- //获取支付二维码
- const [payCodeImage, setPayCodeImage] = useState('')
- const fileData = useRef({
- filePath: '',
- base64: '',
- })
- const { fetchData, state } = GetPayCode()
- const getCore = async () => {
- let res = await fetchData(detail)
- const base64 = res.data.base64
- setPayCodeImage(() => base64)
- const time = new Date().valueOf()
- const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || []
- let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format
- fileData.current.filePath = filePath
- fileData.current.base64 = bodyData
- const save = Taro.getFileSystemManager()
- save.writeFile({
- filePath: fileData.current.filePath,
- data: fileData.current.base64,
- encoding: 'base64',
- })
- }
- useEffect(() => {
- if (show) getCore()
- }, [show])
-
- //检查是否开启保存图片权限
- const { check } = useCheckAuthorize({
- scope: 'scope.writePhotosAlbum',
- msg: '您没授权,无法保存图片',
- })
- const saveImageCheck = async () => {
- const res = await check()
- res && saveImage()
- }
-
- //保存图片
- const saveImage = () => {
- alert.loading('正在保存图片')
- Taro.saveImageToPhotosAlbum({
- filePath: fileData.current.filePath,
- success: function (res) {
- alert.success('图片保存成功')
- },
- fail: function (err) {
- console.log('err::', err)
- },
- })
- }
-
- //预览图片
- const showImage = () => {
- console.log('fileData.current.filePath::', fileData.current.filePath)
- Taro.previewImage({
- current: fileData.current.filePath, // 当前显示
- urls: [fileData.current.filePath], // 需要预览的图片http链接列表
- })
- }
-
- //复制功能
- return (
-
-
-
-
- 扫码支付
-
-
- 扫码支付成功后,自动更新状态
-
-
- {(state.loading && ) || (
-
-
-
- )}
-
-
- 保存电子确认单
-
-
-
-
- )
-})
diff --git a/src/pages/order/components/scanPayCheck/index.module.scss b/src/pages/order/components/scanPayCheck/index.module.scss
deleted file mode 100644
index 1aa0537..0000000
--- a/src/pages/order/components/scanPayCheck/index.module.scss
+++ /dev/null
@@ -1,55 +0,0 @@
-$top:170px;
-.scanPay_main{
- .scanPay_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
-
- }
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
- padding: 10px 0;
- }
- .desc{
- font-size: $font_size_min;
- color: $color_main;
- text-align: center;
- padding: 10px 0;
- .miconfont{
- font-size: 25px;
- }
- }
-
- .scanPay_list{
- border-radius: 10px;
- height: 900px;
- image{
- width: 100%;
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/scanPayCheck/index.tsx b/src/pages/order/components/scanPayCheck/index.tsx
deleted file mode 100644
index 35b4835..0000000
--- a/src/pages/order/components/scanPayCheck/index.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-import { Image, ScrollView, Text, View } from '@tarojs/components'
-import { memo, useEffect, useRef, useState } from 'react'
-import classnames from 'classnames'
-import styles from './index.module.scss'
-import Popup from '@/components/popup'
-import Taro from '@tarojs/taro'
-import { alert } from '@/common/common'
-import { formatDateTime, formatPriceDiv, formatRemoveHashTag, formatWeightDiv } from '@/common/fotmat'
-import useCheckAuthorize from '@/use/useCheckAuthorize'
-import { GetPayCode } from '@/api/onlinePay'
-import LoadingCard from '@/components/loadingCard'
-
-type Param = {
- show?: true | false
- onClose?: () => void
- company?: string
- qrcode?: string
- orderInfo?: any
-}
-type ListParam = {
- product_code: string
- product_name: string
- product_color_code: string
- product_color_name: string
- num: string
- weight: string
- length: string
- sale_price: string
- total_price: string
- weight_error: string
-}
-export default memo(({ show = true, onClose, company, orderInfo }: Param) => {
- const [detail, setDetail] = useState()
-
- useEffect(() => {
- if (show) {
- getCore()
- }
- }, [show])
-
- useEffect(() => {
- if (orderInfo) {
- let lists: ListParam[] = []
- orderInfo.product_list?.map((pitem) => {
- pitem?.product_colors?.map((citem) => {
- lists.push({
- product_code: formatRemoveHashTag(pitem.code),
- product_name: pitem.name,
- product_color_code: formatRemoveHashTag(citem.code),
- product_color_name: citem.name,
- num: citem.roll.toString(),
- length: (citem.length / 100).toString(),
- weight: formatWeightDiv(citem.actual_weight || citem.estimate_weight).toString(),
- sale_price: formatPriceDiv(citem.sale_price).toString(),
- total_price: formatPriceDiv(citem.total_sale_price || citem.estimate_amount).toString(), //小计
- weight_error: formatWeightDiv(citem.weight_error).toString(),
- })
- })
- })
- setDetail(() => ({
- title: '面料销售电子确认单',
- company: orderInfo.company_name, //后端公司
- order_type: orderInfo.sale_mode_name, //类型:大货
- sale_user: orderInfo.sale_user_name, //业务员
- order_created_time: formatDateTime(orderInfo.create_time),
- order_no: orderInfo.order_no,
- shipment_mode: orderInfo.shipment_mode_name, //发货方式
- target_user_name: userName(orderInfo), //收件人
- target_address: address(orderInfo), //收货地址
- target_description: orderInfo.remark, //发货备注
- pay_account: orderInfo.account, //专属收款账号
- bank_account_name: orderInfo.account_name, //账户名称
- bank_name: orderInfo.bank_of_deposit, //开户银行
- pay_type: '', //支付方式, 可不传
- client: orderInfo.purchaser_name, //客户名称
- phone: userPhone(orderInfo), //收货手机号码
- order_total_length: (orderInfo.total_number / 100).toString(), //订单布匹长度
- order_total_price: formatPriceDiv(orderInfo.bill_total_sale_price).toString(), //订单价格
- order_total_num: orderInfo.total_number.toString(),
- qrcode: '', //跳转链接
- order_total_weight: formatWeightDiv(orderInfo.total_weight || orderInfo.total_estimate_weight).toString(), //订单布匹重量
- list: lists,
-
- estimate_amount: formatPriceDiv(orderInfo.estimate_amount).toString(),
- show_estimate_amount: orderInfo.estimate_amount > 0 && orderInfo.total_sale_price <= 0,
- total_sale_price: formatPriceDiv(orderInfo.total_sale_price).toString(),
- show_total_sale_price: orderInfo.total_sale_price > 0,
- total_weight_error_discount: formatPriceDiv(orderInfo.total_weight_error_discount).toString(),
- show_total_weight_error_discount: orderInfo.total_weight_error_discount > 0,
- 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_barcode: true,
- order_total_weight_error: formatWeightDiv(orderInfo.total_weight_error).toString(), //总空差重量
- }))
- }
- }, [orderInfo])
-
- //收货地址
- const address = (addressInfo) => {
- if (addressInfo?.shipment_mode == 2) {
- return addressInfo?.province_name ? addressInfo.province_name + addressInfo.city_name + addressInfo.district_name + addressInfo.address_detail : ''
- } else {
- return addressInfo?.take_goods_address
- }
- }
-
- //收件人
- const userName = (addressInfo) => {
- return addressInfo?.shipment_mode == 2 ? orderInfo.target_user_name : ''
- }
-
- //手机号
- const userPhone = (addressInfo) => {
- return addressInfo?.shipment_mode == 2 ? orderInfo.target_user_phone : orderInfo.take_goods_phone
- }
-
- //获取支付二维码
- const [payCodeImage, setPayCodeImage] = useState('')
- const fileData = useRef({
- filePath: '',
- base64: '',
- })
- const { fetchData, state } = GetPayCode()
- const getCore = async () => {
- let res = await fetchData(detail)
- const base64 = res.data.base64
- setPayCodeImage(() => base64)
- const time = new Date().valueOf()
- const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || []
- let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format
- fileData.current.filePath = filePath
- fileData.current.base64 = bodyData
- const save = Taro.getFileSystemManager()
- save.writeFile({
- filePath: fileData.current.filePath,
- data: fileData.current.base64,
- encoding: 'base64',
- })
- }
-
- //检查是否开启保存图片权限
- const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' })
- const saveImageCheck = async () => {
- const res = await check()
- res && saveImage()
- }
-
- //保存图片
- const saveImage = () => {
- alert.loading('正在保存图片')
- Taro.saveImageToPhotosAlbum({
- filePath: fileData.current.filePath,
- success: function () {
- alert.success('图片保存成功')
- },
- fail: function (err) {
- console.log('err::', err)
- },
- })
- }
-
- //预览图片
- const showImage = () => {
- console.log('fileData.current.filePath::', fileData.current.filePath)
- Taro.previewImage({
- current: fileData.current.filePath, // 当前显示
- urls: [fileData.current.filePath], // 需要预览的图片http链接列表
- })
- }
-
- //复制功能
- return (
-
-
-
-
- 查看销售码单
-
- {(state.loading && ) || (
-
-
-
- )}
-
-
- 保存电子确认单
-
-
-
-
- )
-})
diff --git a/src/pages/order/components/shipmentMode/index.module.scss b/src/pages/order/components/shipmentMode/index.module.scss
deleted file mode 100644
index 5f818f9..0000000
--- a/src/pages/order/components/shipmentMode/index.module.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-
- .order_title{
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status{
- background-color: #F0F0F0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- .order_status_selected{
- color: $color_main;
- border: 1px solid $color_main;
- }
- }
\ No newline at end of file
diff --git a/src/pages/order/components/shipmentMode/index.tsx b/src/pages/order/components/shipmentMode/index.tsx
deleted file mode 100644
index 235591c..0000000
--- a/src/pages/order/components/shipmentMode/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { memo, useRef, useState } from "react";
-
-type Param = {
- onSelect?:(val:number) => void
-}
-export default memo(({onSelect}: Param) => {
- //收货方法 1:自提,2:物流
- const shipmentMode = useRef([
- {value:1, label:'上门自提', selected:false},
- {value:2, label:'物流', selected:false}
- ])
- const [selectValue, setSelectValue] = useState()
- const selectShipmentMode = (value) => {
- setSelectValue(() => value)
- onSelect?.(value)
- }
- return (
-
- 收货方式
- {shipmentMode.current.map(item => {
- return selectShipmentMode(item.value)}>{item.label}
- })}
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/submitOrderBtn/index.module.scss b/src/pages/order/components/submitOrderBtn/index.module.scss
deleted file mode 100644
index 7330951..0000000
--- a/src/pages/order/components/submitOrderBtn/index.module.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-.order_price{
- display: flex;
- align-items: center;
- // justify-content: space-between;
- width: 100%;
-
- .order_price_text{
- font-size: $font_size_medium;
- // margin-right: 10px;
- display: flex;
- .iconfont_msg{
- position: relative;
- }
- .miconfont{
- font-size: 30px;
- font-weight: normal;
- }
- .message{
- position: absolute;
- top: -50px;
- background: #A8B3BD;
- z-index: 9;
- min-height: 50px;
- border-radius: 10px;
- padding: 10px;
- box-sizing: border-box;
- &::before{
- z-index: 1;
- position: absolute;
- bottom: -7px;
- left: 10px;
- width: 15px;
- height: 15px;
- content: " ";
- transform: rotate(45deg);
- background: #A8B3BD;
- box-sizing: border-box;
- }
- }
- }
- .emphasis{
- // font-weight: 700;
- }
- .order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: 44px;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
- }
- .emphasis_num{
- text{
- &:nth-child(2) {
- font-size: 44px;
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/order/components/submitOrderBtn/index.tsx b/src/pages/order/components/submitOrderBtn/index.tsx
deleted file mode 100644
index 5e083c3..0000000
--- a/src/pages/order/components/submitOrderBtn/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo, useCallback, useEffect, useMemo } from "react"
-import {formatKbPrice} from '@/common/common'
-import classnames from "classnames";
-import styles from './index.module.scss'
-type Param = {
- style?: Object,
- number?: number, //数量
- priceTitle: string //描述
-
-}
-export default memo(({style, number = 0, priceTitle = ''}:Param) => {
- const priceDom = useCallback(() => {
- let res = number.toFixed(2).split('.')
- let int_num = parseInt(res[0]) + ''
- let decimals_num = res[1]
- return (
- <>
- ¥
- {Number(int_num).toLocaleString()}
- .{decimals_num}
- >
- )
- }, [number])
- return (
- <>
-
-
- {priceTitle}:
-
-
- {priceDom()}
-
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/components/weightMemo/index.module.scss b/src/pages/order/components/weightMemo/index.module.scss
deleted file mode 100644
index 3c74511..0000000
--- a/src/pages/order/components/weightMemo/index.module.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-
-.weight_memo{
- background-color: #fff;
- border-radius: 20px;
- padding: 0 20px;
- .weight_memo_item{
- display: flex;
- justify-content: space-between;
- height: 130px;
- &:nth-child(1) {
- border-bottom: 1px solid #f3f3f3;
- }
- .title, .desc{
- display: flex;
- align-items: center;
- }
- .title {
- font-size: $font_size;
- font-weight: 700;
- }
- .desc{
- color: $color_font_two;
- font-size: $font_size_medium;
- }
- .miconfont_check, .miconfont_custom{
- font-size: 37px;
- color: $color_main;
- font-weight: normal;
- padding-right: 10px;
- }
- .miconfont_custom{
- color:#FFC300;
- }
- .miconfont_more{
- font-size: 30px;
- padding-left: 10px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/components/weightMemo/index.tsx b/src/pages/order/components/weightMemo/index.tsx
deleted file mode 100644
index 7cbfd13..0000000
--- a/src/pages/order/components/weightMemo/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import Popup from "@/components/popup"
-import { Text, Textarea, View } from "@tarojs/components"
-import { memo, useCallback, useState } from "react"
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-type Param = {
- onCheck?: () => void
- onCustom?: () => void
-}
-export default memo(({onCheck, onCustom}:Param) => {
- return (
-
- onCheck?.()}>
-
-
- 陆盈纺织
-
-
- 查看原码单
-
-
-
- onCustom?.()}>
-
-
- 我的码单
-
-
- 自定义
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/order/index.cofig.ts b/src/pages/order/index.cofig.ts
new file mode 100644
index 0000000..2e9c6fa
--- /dev/null
+++ b/src/pages/order/index.cofig.ts
@@ -0,0 +1,3 @@
+export default {
+ navigationBarTitleText: '订单',
+}
diff --git a/src/pages/order/index.config.ts b/src/pages/order/index.config.ts
deleted file mode 100644
index 030cb10..0000000
--- a/src/pages/order/index.config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
- navigationBarTitleText: '订单详情',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/order/index.module.scss b/src/pages/order/index.module.scss
deleted file mode 100644
index 9220587..0000000
--- a/src/pages/order/index.module.scss
+++ /dev/null
@@ -1,128 +0,0 @@
-.order_main {
- min-height: 100%;
- background-color: $color_bg_one;
- padding: 20px;
- padding-bottom: 190px;
- box-sizing: border-box;
-
- .order_title {
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text {
- flex: 1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status {
- background-color: #f0f0f0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- }
- .order_desc {
- display: flex;
- align-items: center;
- background-color: #fff;
- padding: 20px;
- min-height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- box-sizing: border-box;
- .order_desc_con {
- width: 150px;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_desc_text,
- .order_desc_text_hint {
- font-size: $font_size_medium;
-
- margin-right: 10px;
- flex: 1;
- word-break: break-all;
- }
- .order_desc_text_hint {
- text-align: right;
- color: $color_font_two;
- }
- .miconfont {
- font-size: 20px;
- color: $color_font_two;
- }
- }
- .submit_order_con {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- background-color: #fff;
- box-shadow: 6px 0px 12px 0px rgba(0, 0, 0, 0.16);
- padding: 20px 20px;
- box-sizing: border-box;
- .order_btn {
- width: 152px;
- height: 72px;
- border: 2px solid #dddddd;
- border-radius: 46px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: $color_font_three;
- &:nth-child(n + 2) {
- margin-left: 34px;
- }
- }
- .order_btn_select {
- color: $color_main;
- border: 2px solid $color_main;
- }
- .order_number_desc {
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
- .order_info {
- background-color: #fff;
- margin-top: 20px;
- border-radius: 20px;
- padding: 20px;
- .order_info_title {
- font-size: $font_size;
- font-weight: 700;
- margin-bottom: 20px;
- }
- .order_num {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- .order_num_btn {
- font-size: $font_size_medium;
- padding: 5px 10px;
- border: 2px solid #007cf7;
- border-radius: 10px;
- color: $color_main;
- }
- }
- text {
- font-size: $font_size;
- }
- }
- .weight_memo_con {
- margin-bottom: 20px;
- }
-}
diff --git a/src/pages/order/index.ts b/src/pages/order/index.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx
deleted file mode 100644
index 348cec5..0000000
--- a/src/pages/order/index.tsx
+++ /dev/null
@@ -1,343 +0,0 @@
-import { GetSaleOrderDetailApi, EditSaleOrderRemarkApi } from '@/api/order'
-import { AddShoppingCartApi } from '@/api/shopCart'
-import { SubscriptionMessageApi } from '@/api/user'
-import { alert, goLink } from '@/common/common'
-import { ORDER_STATUS } from '@/common/enum'
-import { formatDateTime, formatImgUrl } from '@/common/fotmat'
-import OrderBtns from '@/components/orderBtns'
-import Popup from '@/components/popup'
-import SearchInput from '@/components/searchInput'
-import ShopCart from '@/components/shopCart'
-import useLogin from '@/use/useLogin'
-import { Text, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import classnames from 'classnames'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import AddressInfoDetail from './components/addressInfoDetail'
-import AdvanceOrderState from './components/advanceOrderState'
-import ApplyRefund from './components/applyRefund'
-import KindList from './components/kindList'
-import OrderState from './components/orderState'
-import Payment from './components/payment'
-import Remark from './components/remark'
-import ReturnRecord from './components/returnRecord'
-import ScanPayCheck from './components/scanPayCheck'
-import styles from './index.module.scss'
-
-export default () => {
- useLogin()
- const [showDesc, setShowDesc] = useState(false)
- const router = useRouter()
- const orderId = useRef(Number(router.params.id))
- useDidShow(() => {
- getSaleOrderPreView()
- })
-
- //订单状态枚举
- const {
- SaleOrderStatusTaking,
- SaleOrderStatusWaitingDelivery,
- SaleOrderStatusWaitingReceipt, // 待收货
- SaleOrderStatusAlreadyReceipt, // 已收货
- SaleOrderStatusComplete, // 已完成
- SaleOrderStatusRefund, // 已退款
- SaleOrderStatusCancel, // 已取消
- SaleorderstatusWaitingPrePayment, // 预付款
- } = ORDER_STATUS
-
- //获取订单详情
- const firstOpen = useRef(true)
- const [orderDetail, setOrderDetail] = useState() //获取到的原始数据
- const { fetchData: getOrderFetchData } = GetSaleOrderDetailApi()
- const getSaleOrderPreView = async () => {
- if (orderId.current) {
- let res = await getOrderFetchData({ id: orderId.current })
- setOrderDetail(res.data)
- setOrderRemark(res.data.remark)
- //预付款自动打开支付
- if (firstOpen.current && SaleorderstatusWaitingPrePayment.value == res.data.status) {
- firstOpen.current = false
- toPay()
- }
- }
- Taro.stopPullDownRefresh()
- // Taro.hideToast()
- }
-
- //监听获取到的数据
- useEffect(() => {
- if (orderDetail) formatData()
- }, [orderDetail])
-
- //格式化数据格式
- const [formatDetailOrder, setFormatDetailOrder] = useState() //格式化后的数据
- const formatData = () => {
- setFormatDetailOrder({
- ...orderDetail,
- unit: orderDetail.sale_mode == 0 ? '条' : 'm', //单位
- list: orderDetail.product_list,
- })
- }
- const formatPreViewOrderMemo = useMemo(() => {
- return formatDetailOrder
- }, [formatDetailOrder])
-
- //复制功能
- const clipboardData = () => {
- Taro.setClipboardData({
- data: orderDetail?.order_no || '',
- success: function (res) {
- Taro.showToast({
- icon: 'none',
- title: '复制成功',
- })
- },
- })
- }
-
- //初始地址数据
- const defaultAddress = useMemo(() => {
- return {
- province_name: orderDetail?.province_name,
- city_name: orderDetail?.city_name,
- district_name: orderDetail?.district_name,
- address_detail: orderDetail?.address_detail,
- target_user_name: orderDetail?.target_user_name,
- target_user_phone: orderDetail?.target_user_phone,
- shipment_mode: orderDetail?.shipment_mode,
- id: orderDetail?.id,
- sale_mode: orderDetail?.sale_mode,
- status: orderDetail?.status,
- take_goods_address: orderDetail?.take_goods_address,
- take_goods_phone: orderDetail?.take_goods_phone,
- }
- }, [orderDetail])
-
- //订单备注
- const { fetchData: remarkFetchData } = EditSaleOrderRemarkApi()
- const [orderRemark, setOrderRemark] = useState('')
- const getRemark = useCallback(async (e) => {
- setOrderRemark(() => e)
- let res = await remarkFetchData({ remark: e, id: orderId.current })
- if (res.success) {
- getSaleOrderPreView()
- alert.success('提交成功')
- } else {
- alert.error(res.msg)
- }
- setShowDesc(() => false)
- }, [])
- const noCanOpenDescList = useRef([
- SaleOrderStatusTaking.value, //提货中
- SaleOrderStatusWaitingDelivery.value, //待发货
- SaleOrderStatusWaitingReceipt.value, // 待收货
- SaleOrderStatusAlreadyReceipt.value, // 已收货
- SaleOrderStatusComplete.value, // 已完成
- SaleOrderStatusRefund.value, // 已退款
- SaleOrderStatusCancel.value, // 已取消
- ])
- const descOpen = () => {
- if (noCanOpenDescList.current.includes(orderDetail?.status)) return alert.none('该订单状态不能修改备注')
- setShowDesc(() => true)
- }
-
- //去付款
- const [payMentShow, setPayMentShow] = useState(false)
- const toPay = () => {
- setPayMentShow(true)
- }
-
- //打开地址修改
- const addressRef = useRef(null)
-
- //修改收货方式
- const getShipmentMode = useCallback(() => {
- getSaleOrderPreView()
- }, [orderDetail])
-
- //修改地址
- const getAddress = useCallback(() => {
- getSaleOrderPreView()
- }, [orderDetail])
-
- //获取底部按钮点击, 获取按钮状态
- const orderStateClick = useCallback(
- (val) => {
- if (val == 1 || val == 6 || val == 8) {
- getSaleOrderPreView()
- } else if (val == 2) {
- //待付款
- toPay()
- } else if (val == 3) {
- //申请退款
- if (!orderDetail?.av_return_roll) return alert.none('该订单已申请过退款')
- setRefundShow(true)
- } else if (val == 7) {
- //再购
- addShopCart()
- } else if (val == 9) {
- //售后记录
- onReturnRecordShow()
- } else if (val == 10) {
- setShowScanPayCheck(true)
- }
- },
- [orderDetail],
- )
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- getSaleOrderPreView()
- })
-
- //支付成功
- const onPaySuccess = useCallback(() => {
- alert.success('支付成功')
- getSaleOrderPreView()
- closePayShow()
- }, [orderDetail])
-
- //关闭支付弹窗
- const closePayShow = useCallback(() => {
- setPayMentShow(() => false)
- }, [orderDetail])
-
- //按钮所需数据
- const orderInfo = useMemo(() => {
- return {
- orderId: orderDetail?.id,
- ...orderDetail,
- }
- }, [orderDetail])
-
- //刷新页面
- const refresh = useCallback(() => {
- alert.loading('刷新中')
- getSaleOrderPreView()
- }, [orderDetail])
-
- //退款申请
- const [refundShow, setRefundShow] = useState(false)
- const applyRefundClose = useCallback(() => {
- setRefundShow(false)
- }, [])
- const applyRefundSuccess = useCallback(() => {
- getSaleOrderPreView()
- }, [])
-
- //查看物流
- const getLogistics = useCallback(() => {
- if (orderDetail?.delivery_appendix_url) {
- const list = orderDetail?.delivery_appendix_url?.map((item) => {
- return formatImgUrl(item, '!w800')
- })
- if (list?.length <= 0) return alert.error('暂无图片')
- Taro.previewImage({
- current: list[0], // 当前显示
- urls: list, // 需要预览的图片http链接列表
- })
- }
- }, [orderDetail])
-
- //添加购物车
- const [showCart, setShowCart] = useState(false)
- const { fetchData: addFetchData } = AddShoppingCartApi()
- const addShopCart = async () => {
- let color_list: { product_color_id: number; roll?: number; length?: number }[] = []
- orderDetail?.product_list.map((pitem) => {
- pitem?.product_colors.map((citem) => {
- if (orderDetail?.sale_mode == 0) {
- return color_list.push({ product_color_id: citem.id, roll: citem.roll })
- } else {
- return color_list.push({ product_color_id: citem.id, length: citem.length })
- }
- })
- })
- const state = await addFetchData({
- sale_mode: orderDetail?.sale_mode,
- color_list,
- })
- if (state.success) {
- Taro.showToast({
- title: '已加入购物车',
- })
- setShowCart(true)
- } else {
- Taro.showToast({
- icon: 'none',
- title: state.msg,
- })
- }
- }
-
- //显示售后记录
- const [returnRecordShow, setReturnRecordShow] = useState(false)
- const onReturnRecordShow = useCallback(() => {
- setReturnRecordShow(true)
- }, [])
- const closeReturnRecord = useCallback(() => {
- setReturnRecordShow(false)
- }, [])
-
- //显示
- const [showScanPayCheck, setShowScanPayCheck] = useState(false)
-
- return (
-
- {(orderDetail?.status != SaleorderstatusWaitingPrePayment.value && ) || (
-
- )}
-
-
-
-
-
- 订单信息
-
-
- {orderDetail?.order_no}
- clipboardData()}>
- 复制
-
-
-
-
- {formatDateTime(orderDetail?.create_time)}
-
- {orderDetail?.payment_time && (
-
- {formatDateTime(orderDetail?.payment_time)}
-
- )}
-
-
- 订单备注
- {(orderRemark && {orderDetail?.remark}) || (
- 填写备注
- )}
-
-
- {orderDetail?.status != SaleOrderStatusCancel.value && (
-
-
-
-
- )}
- setShowDesc(false)}>
- getRemark(e)} defaultValue={orderDetail?.remark} />
-
-
- setShowScanPayCheck(false)} orderInfo={orderDetail} />
-
- setShowCart(false)} />
-
-
-
- )
-}
diff --git a/src/pages/order/orderList/components/order/index.module.scss b/src/pages/order/orderList/components/order/index.module.scss
deleted file mode 100644
index 1d21036..0000000
--- a/src/pages/order/orderList/components/order/index.module.scss
+++ /dev/null
@@ -1,149 +0,0 @@
-.order_item{
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing: border-box;
- .header{
- display: flex;
- align-items: center;
- .user{
- display: flex;
- align-items: center;
-
- image{
- width: 70px;
- height: 70px;
- border-radius: 50%;
- }
- }
- .order_con {
- padding-left: 15px;
- width: 100%;
- .name {
- color: #000;
- font-weight: 700;
- font-size: $font_size;
- }
- .order_num {
- font-size: $font_size_medium;
- padding-right: 30px;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- width: 100%;
- .order_num_con{
- flex:1;
- }
- .miconfont {
- font-size: 20px;
- }
- .order_no{
-
- }
-
- }
- }
- .product_status{
- font-size: $font_size;
- color: $color_main;
- font-weight: 700;
- }
-
- }
- .product_con{
- margin-bottom: 20px;
- }
- .product_title{
- display: flex;
- align-items: center;
- padding: 35px 0;
- .product_tag{
- background-color: #CDE5FF;
- font-size: $font_size_min;
- padding: 5px 10px;
- color: $color_main;
- border-radius: 6px;
- }
- .product_name{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- padding: 0 20px;
- @include common_ellipsis()
- }
-
- .tag{
- font-size: $font_size_min;
- padding: 5px 15px;
- background-color: $color_main;
- color: #fff;
- border-radius: 0px 20px 0px 20px;
- position:relative;
- right: 0;
- }
- }
- .product_list{
- display: flex;
- .image{
- width: 126px;
- height: 126px;
- border-radius: 20px;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 20px 20px 0px 0px;
- }
- .color_num {
- background: rgba(0,0,0, 0.5);
- border-radius: 50px 0px 20px 0px;
- font-size: $font_size_min;
- color: #fff;
- position: absolute;
- right:0;
- bottom:0;
- padding: 5px 10px 5px 20px;
- box-sizing: border-box;
- }
- }
- .color_list{
- flex:1;
- padding-left: 30px;
- .color_item{
- display: flex;
- justify-content: space-between;
- font-size: $font_size_min;
- color: $color_font_three;
- align-items: center;
- margin-bottom: 20px;
- .color_title{
- font-weight: 700;
- font-size: $font_size;
- color: #000;
- }
- .color_more{
- color: $color_font_three;
- }
- }
- }
-
- }
- .color_count_num{
- font-size: $font_size_min;
- color: $color_font_two;
- background-color: #F6F6F6;
- border-radius: 10px;
- padding: 10px 22px;
- margin-top: 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .price{
- font-size: 30px;
- color: #007AFF;
- text{
- font-size: 23px;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/orderList/components/order/index.tsx b/src/pages/order/orderList/components/order/index.tsx
deleted file mode 100644
index b52f925..0000000
--- a/src/pages/order/orderList/components/order/index.tsx
+++ /dev/null
@@ -1,163 +0,0 @@
-import { goLink } from '@/common/common'
-import { ORDER_STATUS } from '@/common/enum'
-import { formatHashTag, formatImgUrl, formatPriceDiv } from '@/common/fotmat'
-import LabAndImg from '@/components/LabAndImg'
-import OrderBtns from '@/components/orderBtns'
-import Payment from '@/pages/order/components/payment'
-import { useSelector } from '@/reducers/hooks'
-import { Image, Text, View } from '@tarojs/components'
-import { useRouter } from '@tarojs/taro'
-import classnames from 'classnames'
-import { memo, useCallback, useMemo, useRef, useState } from 'react'
-import styles from './index.module.scss'
-
-type Param = {
- value: {
- order_no: string
- sale_mode: number
- sale_mode_name: string
- status_name: string
- shipment_mode: number
- shipment_mode_name: string
- product_list: any[]
- total_fabrics: number
- total_colors: number
- total_number: number
- status: 0
- id: number
- lab: any
- rgb: any
- texture_url: string
- payment_method: number //支付方式
- actual_amount: number //实付金额
- wait_pay_amount: number //待付金额
- should_collect_order_id: number //应付单id
- av_return_roll: number
- total_sale_price: number
- estimate_amount: number
- is_return: true | false
- }
- onClickBtn?: (val: { status: number; orderInfo: Param['value'] }) => void
-}
-export default memo(({ value, onClickBtn }: Param) => {
- const userInfo = useSelector((state) => state.userInfo)
- //对应数量
- const formatCount = useCallback(
- (item, sale_mode) => {
- return sale_mode == 0 ? item.roll : Number(item.length / 100)
- },
- [value],
- )
- //对应单价
- const standardPrice = useCallback(
- (price, sale_mode) => {
- return '¥' + formatPriceDiv(price).toLocaleString() + '/' + (sale_mode == 1 ? 'm' : 'kg')
- },
- [value],
- )
-
- //点击订单按钮
- const orderBtnsClick = useCallback(
- (status) => {
- onClickBtn?.({ status, orderInfo: value })
- },
- [value],
- )
-
- let { SaleOrderStatusTaking, SaleOrderStatusWaitingReceipt } = ORDER_STATUS
-
- //订单状态
- // const orderStatus = useCallback((item) => {
- // return item.status == SaleOrderStatusTaking.value?'装车中':item.status_name
- // }, [value])
-
- //按钮所需数据
- const orderInfo = useMemo(() => {
- return {
- orderId: value?.id,
- ...value,
- }
- }, [value])
-
- //总条数
- const numText = useMemo(() => {
- let total_number_new = value?.sale_mode == 0 ? value?.total_number : value?.total_number / 100
- return `${value?.total_fabrics} 种面料,${value?.total_colors} 种颜色,共 ${total_number_new}${value?.sale_mode == 0 ? ' 条' : ' 米'}`
- }, [value])
-
- //订单状态
- const orderStatus = useMemo(() => {
- if (value.status == SaleOrderStatusWaitingReceipt.value && value.shipment_mode == 1) {
- return '待提货'
- } else {
- return value?.status_name
- }
- }, [value])
-
- return (
-
- goLink('/pages/order/index', { id: value?.id })}>
-
-
-
-
- {userInfo?.adminUserInfo?.user_name}
-
-
- 订单号:{value?.order_no}
-
-
- {orderStatus}
-
-
-
- goLink('/pages/order/index', { id: value?.id })}>
-
- {value?.sale_mode_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.map((itemColor, index) => {
- return (
- index <= 1 && (
-
- {formatHashTag(itemColor.code, itemColor.name)}
- {standardPrice(itemColor.sale_price, value.sale_mode)}
- ×{formatCount(itemColor, value.sale_mode) + (value.sale_mode == 0 ? ' 条' : ' 米')}
-
- )
- )
- })}
- {value?.product_list?.[0].length > 2 && (
-
- ……
- ……
- ……
-
- )}
-
-
-
- {numText}
-
- ¥
- {value.total_sale_price ? formatPriceDiv(value.total_sale_price, 100, true) : formatPriceDiv(value.estimate_amount, 100, true)}
-
-
-
-
-
- )
-})
diff --git a/src/pages/order/orderList/components/orderStatusList/index.module.scss b/src/pages/order/orderList/components/orderStatusList/index.module.scss
deleted file mode 100644
index 47de83d..0000000
--- a/src/pages/order/orderList/components/orderStatusList/index.module.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-.order_status_list{
- font-size: $font_size;
- color: #9E9E9E;
- margin-top: 20px;
- .order_status_item{
- padding: 20px;
- box-sizing: border-box;
- }
- .selected{
- font-weight: 700;
- color: #000;
- border-bottom: 4px solid #707070;
- }
- .order_list_scroll{
- white-space: nowrap;
- display: flex;
- }
-}
\ No newline at end of file
diff --git a/src/pages/order/orderList/components/orderStatusList/index.tsx b/src/pages/order/orderList/components/orderStatusList/index.tsx
deleted file mode 100644
index b2e1e89..0000000
--- a/src/pages/order/orderList/components/orderStatusList/index.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { ScrollView, View } from '@tarojs/components'
-import { memo, useEffect, useState } from 'react'
-import styles from './index.module.scss'
-import classnames from 'classnames'
-
-type Param = {
- list: { id: number; name: string }[]
- defaultId?: number | null
- onSelect?: (val: number) => void
-}
-export default memo(({ list = [], defaultId = null, onSelect }: Param) => {
- const [selectInfo, setSelectInfo] = useState({
- selected: -1, //当前选中的id
- tabId: '', //需要滚动到的id
- })
- useEffect(() => {
- if (defaultId) {
- console.log('defaultId:::', defaultId)
- const index = list?.findIndex((item) => {
- return item.id == defaultId
- })
- if (index !== -1) {
- const num = index > 0 ? index - 1 : 0
- setSelectInfo((e) => ({ ...e, tabId: list[num].id.toString() }))
- }
- }
- setSelectInfo((e) => ({ ...e, selected: defaultId || -1 }))
- }, [defaultId])
- const clickEvent = ({ item, index }: { item: any; index: number }) => {
- const num = index > 0 ? index - 1 : 0
- setSelectInfo((e) => ({ ...e, tabId: list[num].id.toString(), selected: item.id }))
- onSelect?.(item.id)
- }
-
- return (
-
-
-
- {list.map((item, index) => {
- return (
- clickEvent({ item, index })}
- className={classnames(styles.order_status_item, selectInfo.selected == item.id && styles.selected)}>
- {item.name}
-
- )
- })}
-
-
-
- )
-})
diff --git a/src/pages/order/orderList/index.config.ts b/src/pages/order/orderList/index.config.ts
deleted file mode 100644
index 7a9457b..0000000
--- a/src/pages/order/orderList/index.config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
- navigationBarTitleText: '订单列表',
- enableShareAppMessage: true,
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark',
-}
diff --git a/src/pages/order/orderList/index.module.scss b/src/pages/order/orderList/index.module.scss
deleted file mode 100644
index a106442..0000000
--- a/src/pages/order/orderList/index.module.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-.order_list_main {
- height: 100vh;
- background-color: $color_bg_one;
- display: flex;
- flex-direction: column;
- .title {
- padding: 0 20px;
- background-color: #fff;
- box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.16);
- border-bottom: 2px solid #e2e2e2;
- height: 160px;
- .order_status_list {
- font-size: $font_size;
- color: #9e9e9e;
- margin-top: 20px;
- .order_status_item {
- padding: 20px;
- box-sizing: border-box;
- }
- .selected {
- font-weight: 700;
- color: #000;
- border-bottom: 4px solid #707070;
- }
- .order_list_scroll {
- white-space: nowrap;
- display: flex;
- }
- }
- }
- .order_list {
- height: calc(100vh - 160px);
- .order_item_con {
- margin-top: 20px;
- padding: 0 20px;
- }
- }
-}
diff --git a/src/pages/order/orderList/index.tsx b/src/pages/order/orderList/index.tsx
deleted file mode 100644
index c9f3c02..0000000
--- a/src/pages/order/orderList/index.tsx
+++ /dev/null
@@ -1,228 +0,0 @@
-import Search from '@/components/search'
-import useLogin from '@/use/useLogin'
-import { View } from '@tarojs/components'
-import Taro, { useDidShow } from '@tarojs/taro'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import styles from './index.module.scss'
-import Order from './components/order'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { GetOrderListApi, OrderStatusListApi } from '@/api/order'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import OrderStatusList from './components/orderStatusList'
-import { AddShoppingCartApi } from '@/api/shopCart'
-import ShopCart from '@/components/shopCart'
-import { alert } from '@/common/common'
-import { useRouter } from '@tarojs/runtime'
-import Payment from '../components/payment'
-import ApplyRefund from '../components/applyRefund'
-import ReturnRecord from '../components/returnRecord'
-
-export default () => {
- const { checkLogin } = useLogin()
- useDidShow(async () => {
- await checkLogin()
- })
-
- //传递过来的参数
- const router = useRouter()
- useEffect(() => {
- if (router?.params.status != undefined && router?.params.status !== '') {
- setSearchField((e) => ({ ...e, status: router?.params.status as number }))
- } else {
- setSearchField((e) => ({ ...e, status: -1 }))
- }
- }, [router])
-
- //搜索参数
- const [searchField, setSearchField] = useState<{ status: number | null; page: number; size: number; name: string }>({
- status: null,
- page: 1,
- size: 10,
- name: '',
- })
-
- //获取订单状态
- const { fetchData: orderStatusListFetchData } = OrderStatusListApi()
- const [statusList, setStatusList] = useState([{ id: -1, name: '全部' }])
- const getOrderStatusList = async () => {
- let res = await orderStatusListFetchData()
- setStatusList((e) => [...e, ...res.data.list])
- }
- useEffect(() => {
- getOrderStatusList()
- }, [])
-
- //获取订单列表
- const { fetchData: listFetchData, state: orderState } = GetOrderListApi()
- const [orderData, setOrderData] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- const getOrderList = async () => {
- let res = await listFetchData(getFilterData(searchField))
- setOrderData((e) => ({ ...e, list: res.data?.list, total: res.data?.total }))
- setRefresherTriggeredStatus(() => false)
- }
-
- //监听筛选条件变化
- useEffect(() => {
- if (searchField.status != null) getOrderList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = useCallback(() => {
- if (orderData.list.length < orderData.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({ ...searchField, size })
- }
- }, [orderData])
-
- //状态改变
- const changeStatus = useCallback((e) => {
- pageNum.current.page = 1
- setSearchField((value) => ({ ...value, status: e, size: 10 }))
- setOrderData(() => ({ list: [], total: 0 }))
- }, [])
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading })
- }, [orderData, orderState])
-
- //输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setOrderData(() => ({ list: [], total: 0 }))
- setSearchField((val) => ({ ...val, name: e, size: 10 }))
- }, [])
-
- //列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
- const getRefresherRefresh = async () => {
- pageNum.current.size = 1
- setRefresherTriggeredStatus(true)
- setSearchField((val) => ({ ...val, size: 10 }))
- }
-
- //监听点击的按钮
- const clickOrderBtn = useCallback(
- ({ status, orderInfo }) => {
- setCallBackPayOrderInfo(() => orderInfo)
- if (status == 1 || status == 6 || status == 8) {
- getOrderList()
- } else if (status == 2) {
- //去支付
- toPay()
- } else if (status == 3) {
- //申请退款
- if (!orderInfo?.av_return_roll) return alert.none('该订单已申请过退款')
- setRefundShow(true)
- } else if (status == 7) {
- //购买
- addShopCart(orderInfo)
- } else if (status == 9) {
- onReturnRecordShow()
- } else if (status == 10) {
- setShowScanPayCheck(true)
- }
- },
- [orderData],
- )
-
- const [callBackOrderInfo, setCallBackPayOrderInfo] = useState()
-
- //去付款
- const [payMentShow, setPayMentShow] = useState(false)
- const toPay = () => {
- setPayMentShow(true)
- }
- //关闭支付弹窗
- const closePayShow = useCallback(() => {
- setPayMentShow(() => false)
- }, [])
- //支付成功
- const onPaySuccess = useCallback(() => {
- getOrderList()
- closePayShow()
- }, [])
-
- //添加购物车
- const [showCart, setShowCart] = useState(false)
- const { fetchData: addFetchData } = AddShoppingCartApi()
- const addShopCart = async (item) => {
- let color_list: { product_color_id: number; roll?: number; length?: number }[] = []
- item?.product_list.map((pitem) => {
- pitem?.product_colors.map((citem) => {
- if (item?.sale_mode == 0) {
- return color_list.push({ product_color_id: citem.id, roll: citem.roll })
- } else {
- return color_list.push({ product_color_id: citem.id, length: citem.length })
- }
- })
- })
- const state = await addFetchData({
- sale_mode: item?.sale_mode,
- color_list,
- })
- if (state.success) {
- Taro.showToast({
- title: '已加入购物车',
- })
- setShowCart(true)
- } else {
- Taro.showToast({
- icon: 'none',
- title: state.msg,
- })
- }
- }
-
- //申请退款
- const [refundShow, setRefundShow] = useState(false)
- const applyRefundClose = useCallback(() => {
- setRefundShow(false)
- }, [])
- const applyRefundSuccess = useCallback(() => {
- getOrderList()
- }, [])
-
- //显示售后记录
- const [returnRecordShow, setReturnRecordShow] = useState(false)
- const onReturnRecordShow = useCallback(() => {
- setReturnRecordShow(true)
- }, [])
- const closeReturnRecord = useCallback(() => {
- setReturnRecordShow(false)
- }, [])
-
- //显示
- const [showScanPayCheck, setShowScanPayCheck] = useState(false)
-
- return (
-
-
-
-
-
-
-
- {orderData?.list?.map((item) => {
- return (
-
-
-
- )
- })}
-
-
-
- setShowCart(false)} default_sale_mode={callBackOrderInfo?.sale_mode} />
-
-
-
- )
-}
diff --git a/src/pages/salesAfter/components/addressInfo/index.module.scss b/src/pages/salesAfter/components/addressInfo/index.module.scss
deleted file mode 100644
index 4e9ea21..0000000
--- a/src/pages/salesAfter/components/addressInfo/index.module.scss
+++ /dev/null
@@ -1,71 +0,0 @@
-.order_address{
- height: 178px;
- background: #ffffff;
- border-radius: 20px;
- display: flex;
- align-items: center;
- padding: 30px;
- box-sizing: border-box;
- margin-top: 20px;
- .order_address_icon{
- font-size: 76px;
- color: $color_main;
- }
- .order_address_text_con{
- flex:1;
- padding: 0 30px;
- box-sizing: border-box;
- .order_address_text_title{
- font-size: $font_size_medium;
- margin-top: 10px;
- @include common_ellipsis;
- }
- .order_address_text_name{
-
- align-items: center;
- text{
- &:nth-child(1) {
- color: #000;
- font-weight: 700;
- font-size: $color_font_one;
- margin-right: 40px;
- }
- &:nth-child(2) {
- color: $color_font_one;
- font-size: $font_size_medium;
- }
- }
- }
- }
- .updateBtn{
- font-size: $font_size_medium;
- color: $color_font_three;
- width: 96px;
- height: 52px;
- border: 2px solid #dddddd;
- border-radius: 28px;
- text-align: center;
- line-height: 52px;
- }
- .order_address_text_no{
- flex: 1;
- font-size: $font_size;
- font-weight: 700;
- margin-left: 30px;
- }
- .order_address_more_icon{
- color: $color_font_three;
- font-size: $font_size;
- }
-
-}
-.order_address_list {
- height: 900px;
- .order_address_title{
- font-size: $font_size;
- font-weight: 700;
- width: 100%;
- text-align: center;
- padding: 20px 0 30px 0;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/addressInfo/index.tsx b/src/pages/salesAfter/components/addressInfo/index.tsx
deleted file mode 100644
index 4225fea..0000000
--- a/src/pages/salesAfter/components/addressInfo/index.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import AddressList from "@/components/AddressList";
-import Popup from "@/components/popup";
-import { Text, View } from "@tarojs/components"
-import classnames from "classnames";
-import { memo, useCallback, useEffect, useMemo, useState } from "react";
-import styles from './index.module.scss'
-
-export type AddressInfoParam = {
- province_name: string,
- city_name: string,
- district_name: string,
- address_detail: string,
- id?: number,
- name: string,
- phone: string
-}
-type Param = {
- onSelect?: (val:any) => void, //选择
- defaultValue?: AddressInfoParam|null //默认值
- disabled?: false|true //true禁用后只用于展示
-}
-
-export default memo(({onSelect, defaultValue = null, disabled = false}: Param) => {
- const [showAddressList, setShowAddressList] = useState(false)
-
- useEffect(() => {
- setUserInfo(() => defaultValue)
- }, [defaultValue])
-
- //选择地址
- const [userInfo, setUserInfo] = useState()
- const getAddress = useCallback((val) => {
- setShowAddressList(() => false)
- setUserInfo(() => val)
- onSelect?.(val)
- }, [])
-
- //地址格式
- const formatAddress = useMemo(() => {
- if(userInfo)
- return userInfo.province_name + userInfo.city_name + userInfo.district_name + userInfo.address_detail
- }, [userInfo])
-
- const changeShow = () => {
- if(!disabled)
- setShowAddressList(() => true)
- }
- return (
-
- changeShow()}>
-
- {!userInfo&&
- <>
- 请选择收货地址及信息
-
- >
- ||<>
-
-
- {userInfo?.name}
- {userInfo?.phone}
-
- {formatAddress}
-
- 修改
- >}
-
- {!disabled&& setShowAddressList(false)}>
-
- 请选择收货地址
- getAddress(item)}/>
-
- }
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/addressInfoDetail/index.module.scss b/src/pages/salesAfter/components/addressInfoDetail/index.module.scss
deleted file mode 100644
index 95a6490..0000000
--- a/src/pages/salesAfter/components/addressInfoDetail/index.module.scss
+++ /dev/null
@@ -1,88 +0,0 @@
-.address_main {
- margin-top: 20px;
-}
-
-.address_title_tag {
- font-size: 24px;
- color: #ee7500;
- background: rgba(255, 230, 206, 0.36);
- border-radius: 20px 20px 0px 0px;
- height: 56px;
- display: flex;
- align-items: center;
- position: relative;
- z-index: 999;
- .miconfont {
- font-size: 30px;
- padding: 0 20px;
- }
-}
-
-.order_address {
- min-height: 178px;
- background: #ffffff;
- border-radius: 0 0 20px 20px;
- display: flex;
- align-items: center;
- padding: 30px;
- box-sizing: border-box;
- position: relative;
- .order_address_icon {
- font-size: 50px;
- color: $color_main;
- position: absolute;
- top: 35px;
- left: 20px;
- }
- .order_address_text_con {
- flex: 1;
- padding-left: 50px;
- box-sizing: border-box;
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .order_address_text_title {
- font-size: $font_size_medium;
- margin-top: 10px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .moreIconfont {
- font-size: 20px;
- }
- .address_text {
- word-break: break-all;
- font-size: 28px;
- font-weight: 700;
- }
- }
- .order_address_text_name {
- color: #707070;
- align-items: center;
- display: flex;
- margin-top: 20px;
- text {
- &:nth-child(1) {
- font-size: $font_size_medium;
- margin-right: 40px;
- }
- &:nth-child(2) {
- flex: 1;
- font-size: $font_size_medium;
- }
- }
- }
- }
- .updateBtn {
- width: 152px;
- font-size: 28px;
- height: 60px;
- color: #007aff;
- z-index: 999;
- border: 2px solid #007aff;
- border-radius: 36px;
- text-align: center;
- line-height: 60px;
- }
-}
diff --git a/src/pages/salesAfter/components/addressInfoDetail/index.tsx b/src/pages/salesAfter/components/addressInfoDetail/index.tsx
deleted file mode 100644
index fb99242..0000000
--- a/src/pages/salesAfter/components/addressInfoDetail/index.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import { AFTER_ORDER_STATUS, REFUND_STATUS_ORDER } from '@/common/enum'
-import { Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import { memo, useMemo } from 'react'
-import styles from './index.module.scss'
-
-type Param = {
- onLogistics?: (val: 1 | 2) => void //1 上传物流 2 查看物流
- orderInfo: {
- return_user_name?: string
- return_user_phone?: string
- stage?: number
- sale_mode?: 0 | 1 | 2 //0 大货 1剪板 2散剪
- type?: number //申请单退款状态
- return_address?: string
- }
-}
-export default memo(({ orderInfo, onLogistics }: Param) => {
- const {
- ReturnStageApplying,
- ReturnStageWaitCheck,
- ReturnStageChecked,
- ReturnStageReturned,
- ReturnStageCancel,
- ReturnStageQualityCheckPendingRefund,
- ReturnStageServiceOrderPendingRefund,
- ReturnStageRejected,
- } = AFTER_ORDER_STATUS
-
- const {
- ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款
- ReturnApplyOrderTypeReturnForRefund, // 退货退款
- ReturnApplyOrderTypeSalesRefund, // 销售退款
- } = REFUND_STATUS_ORDER
-
- //是否显示地址
- const showAddress = useMemo(() => {
- let after_list = [ReturnStageApplying.value, ReturnStageCancel.value, ReturnStageRejected.value]
- let refurn_list = [ReturnApplyOrderTypeSalesRefund.value, ReturnApplyOrderTypeAdvanceReceiptRefund.value]
- return !after_list.includes(orderInfo?.stage!) && orderInfo?.sale_mode != 1 && !refurn_list.includes(orderInfo?.type!)
- }, [orderInfo])
-
- //上传物流
- const upLogistics = useMemo(() => {
- return orderInfo?.stage == ReturnStageWaitCheck.value
- }, [orderInfo])
-
- return (
- <>
- {showAddress && (
-
-
-
- 请按以下退货地址寄回货物并提供退货物流信息
-
-
-
-
-
- {orderInfo?.return_address}
-
-
- 谭先生
- {orderInfo?.return_user_phone}
- {(upLogistics && (
- onLogistics?.(1)}>
- 上传物流
-
- )) || (
- onLogistics?.(2)}>
- 查看物流
-
- )}
-
-
-
-
- )}
- >
- )
-})
diff --git a/src/pages/salesAfter/components/amountShow/index.module.scss b/src/pages/salesAfter/components/amountShow/index.module.scss
deleted file mode 100644
index 647e203..0000000
--- a/src/pages/salesAfter/components/amountShow/index.module.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-.order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: $font_size;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
-}
-.emphasis_num{
- .price_text{
- &:nth-child(2) {
- font-size: $font_size_big;
- }
- }
-}
-.emphasis_num_big{
- .price_text{
- &:nth-child(1) {
- font-size: $font_size_big;
- }
- &:nth-child(2) {
- font-size: 60px;
- }
- &:nth-child(1) {
- font-size: $font_size_big;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/amountShow/index.tsx b/src/pages/salesAfter/components/amountShow/index.tsx
deleted file mode 100644
index 877f7df..0000000
--- a/src/pages/salesAfter/components/amountShow/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo, useCallback } from "react";
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-type Param = {
- number: number, //数字
- status: 0|1|2 //0 小型,1中型,2大
-}
-export default memo(({number = 0, status = 1}:Param) => {
- const priceDom = useCallback(() => {
- let res = number.toFixed(2).split('.')
- let int_num = parseInt(res[0]) + ''
- let decimals_num = res[1]
- return (
- <>
- ¥
- {Number(int_num).toLocaleString()}
- .{decimals_num}
- >
- )
- }, [number])
- return (
-
- {priceDom()}
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/applyRecord/index.module.scss b/src/pages/salesAfter/components/applyRecord/index.module.scss
deleted file mode 100644
index 7cf80e1..0000000
--- a/src/pages/salesAfter/components/applyRecord/index.module.scss
+++ /dev/null
@@ -1,153 +0,0 @@
-
-.apply_record_main{
- margin-top: 20px;
- padding: 0 30px;
- height: 70vh;
- .apply_record_scroll{
- height: 100%;
- }
- .kind_number{
- width: 100%;
- padding: 20px;
- box-sizing: border-box;
- text{
- background-color: #F6F6F6;
- border-radius: 10px;
- font-size: $font_size_medium;
- padding: 5px 0;
- text-align: center;
- width: 100%;
- display: block;
- color: $color_font_three;
- }
- }
- .orders_list_con{
-
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- .orders_return_title{
- font-size: 28px;
- font-weight: 700;
- padding-bottom: 20px;
- }
- .order_list{
- &:nth-child(n+2) {
- margin-top: 45px;
- }
- .order_list_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- @include common_ellipsis(1);
- }
- .num{
- color: $color_font_two;
- font-size: $font_size_min;
- }
- }
- }
- .order_list_scroll{
- margin-top: 30px;
-
- .order_list_item {
- display: flex;
- &:nth-child(n+2) {
- margin-top: 30px;
- }
- .order_list_item_img{
- width: 126px;
- height: 126px;
- border-radius: 20px;
- }
- .order_list_item_con{
- display: flex;
- width: 100%;
- flex:1;
- border-bottom: 1px solid #f0f0f0;
- height: 150px;
- padding-top: 20px;
- box-sizing: border-box;
- }
- .order_list_item_des{
- flex:1;
- box-sizing: border-box;
- padding-left: 30px;
- .order_list_item_title{
- font-weight: 700;
- font-size: $font_size;
- margin-bottom: 15px;
- }
- .order_list_item_price{
- font-size: 26px;
- color: $color_font_three;
- text{
- &:nth-child(1) {
- margin-right: 10px;
- }
- }
- }
- }
- .order_list_item_count{
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- .count_num{
- color: $color_main;
- font-size: $font_size;
- margin-bottom: 15px;
- font-weight: 400;
- text{
- font-size: $font_size_min;
- }
- }
- .count_price {
- font-size: $font_size;
- font-weight: 700;
- text{
- font-size: $font_size_min;
- }
- }
- }
- }
- }
- .order_total{
- padding-top: 30px;
- display: flex;
- justify-content: space-between;
- text{
- &:nth-child(1) {
- font-size: 28px;
- font-weight: 700;
- }
- &:nth-child(2) {
- font-size: 32px;
- font-weight: 700;
- color: #007AFF;
- }
- }
- }
- .order_estimated_amount{
- display: flex;
- align-items: flex-end;
- flex-direction: column;
- padding: 30px 0;
- .order_price_des{
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
- }
-}
-
diff --git a/src/pages/salesAfter/components/applyRecord/index.tsx b/src/pages/salesAfter/components/applyRecord/index.tsx
deleted file mode 100644
index d704020..0000000
--- a/src/pages/salesAfter/components/applyRecord/index.tsx
+++ /dev/null
@@ -1,148 +0,0 @@
-import { SaleOrderOrderDetailApi } from '@/api/salesAfterOrder'
-import { formatHashTag, formatPriceDiv, formatWeightDiv } from '@/common/fotmat'
-import LabAndImg from '@/components/LabAndImg'
-import Popup from '@/components/popup'
-import { ScrollView, Text, View } from '@tarojs/components'
-import { memo, useCallback, useEffect, useMemo, useState } from 'react'
-import Taro from '@tarojs/taro'
-import styles from './index.module.scss'
-
-type Param = {
- show?: true | false
- onClose?: () => void
- onSubmit?: () => void
- id?: number
-}
-export default memo(({ show, onClose, onSubmit, id }: Param) => {
- useEffect(() => {
- if (show && id) getSaleOrderPreView()
- if (!show) setFormatDetailOrder(() => null)
- }, [show, id])
-
- //获取订单详情
- const [orderDetail, setOrderDetail] = useState(null) //获取到的原始数据
- const { fetchData: saleOrderOrderDetailData } = SaleOrderOrderDetailApi()
- const getSaleOrderPreView = async () => {
- if (id) {
- let res = await saleOrderOrderDetailData({ id: id })
- setOrderDetail(res.data)
- }
- Taro.stopPullDownRefresh()
- }
- //格式化数据格式
- const [formatDetailOrder, setFormatDetailOrder] = useState() //格式化后的数据
- const formatData = () => {
- setFormatDetailOrder({
- estimate_amount: orderDetail.estimate_amount, //预估金额
- sale_mode: orderDetail.sale_mode,
- sale_mode_name: orderDetail.sale_mode_name,
- total_colors: orderDetail.total_colors, //总颜色数量
- total_number: orderDetail.total_number, //总数量
- total_fabrics: orderDetail.total_fabrics, //面料数量
- unit: orderDetail.sale_mode == 0 ? '条' : 'm', //单位
- list: orderDetail.product_list,
- stage: orderDetail.stage, //订单状态
- type: orderDetail.type, //退货or退款
- total_sale_price: orderDetail.total_sale_price, //销售金额
- total_should_collect_money: orderDetail.total_should_collect_money, //应收金额
- total_weight_error_discount: orderDetail.total_weight_error_discount, //空差优惠
- actual_amount: orderDetail.actual_amount, //实付金额
- the_previous_status: orderDetail.the_previous_status, //取消订单时的订单状态
- })
- }
-
- //监听获取到的数据
- useEffect(() => {
- if (orderDetail) formatData()
- }, [orderDetail])
-
- //对应数量
- const formatCount = useCallback(
- (item) => {
- return formatDetailOrder?.sale_mode == 0 ? item.roll : Number(item.length / 100)
- },
- [formatDetailOrder],
- )
-
- //对应单价
- const standardPrice = useCallback(
- (price) => {
- return formatPriceDiv(price).toLocaleString() + '/' + (formatDetailOrder?.sale_mode == 1 ? 'm' : 'kg')
- },
- [formatDetailOrder],
- )
-
- //数量格式
- const numText = useMemo(() => {
- if (formatDetailOrder) {
- let tatal_number = formatDetailOrder?.sale_mode == 0 ? formatDetailOrder?.total_number : formatDetailOrder?.total_number / 100
- return `${formatDetailOrder?.total_fabrics} 种面料,${formatDetailOrder?.total_colors} 种颜色,共 ${tatal_number} ${formatDetailOrder?.unit}`
- }
- }, [formatDetailOrder])
-
- //整理颜色
- const labAndRgbAndUrl = useCallback((item) => {
- return { lab: { ...item?.lab }, rgb: { ...item?.rgb }, texturl_url: item?.texturl_url }
- }, [])
-
- return (
- <>
-
-
- {formatDetailOrder && (
- <>
-
- {numText}
-
-
-
- {formatDetailOrder?.list?.map((item) => {
- return (
-
-
- {formatDetailOrder.sale_mode_name}
- {formatHashTag(item.code, item.name)}
- 共{item?.product_colors.length}种
-
-
- {item?.product_colors?.map((colorItem) => {
- return (
-
-
-
-
-
-
- {colorItem.code + ' ' + colorItem.name}
-
- ¥{standardPrice(colorItem.sale_price)}
- 总重{formatWeightDiv(colorItem.estimate_weight)}kg
-
-
-
-
- ×{formatCount(colorItem)}
- {formatDetailOrder.unit}
-
-
- ¥
- {formatPriceDiv(colorItem.estimate_amount, 100, true)}
-
-
-
-
- )
- })}
-
-
- )
- })}
-
-
- >
- )}
-
-
- >
- )
-})
diff --git a/src/pages/salesAfter/components/contentBox/index.module.scss b/src/pages/salesAfter/components/contentBox/index.module.scss
deleted file mode 100644
index a5a2fc0..0000000
--- a/src/pages/salesAfter/components/contentBox/index.module.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-.content_box {
- background-color: #fff;
- margin-top: 20px;
- border-radius: 20px;
- padding: 20px;
- .content_box_title{
- font-size: $font_size;
- font-weight: 700;
- margin-bottom: 20px;
- }
- .content_box_con {
-
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/contentBox/index.tsx b/src/pages/salesAfter/components/contentBox/index.tsx
deleted file mode 100644
index 8a81420..0000000
--- a/src/pages/salesAfter/components/contentBox/index.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import {View } from "@tarojs/components";
-import { memo, ReactDOM, ReactNode } from "react";
-import styles from './index.module.scss'
-
-type Param = {
- children?: ReactNode,
- title?: string
-}
-export default memo(({children, title=''}: Param) => {
- return (
- <>
-
- {title}
-
- {children}
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/estimatedAmount/index.module.scss b/src/pages/salesAfter/components/estimatedAmount/index.module.scss
deleted file mode 100644
index 4b4a958..0000000
--- a/src/pages/salesAfter/components/estimatedAmount/index.module.scss
+++ /dev/null
@@ -1,70 +0,0 @@
-.order_price{
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- &:nth-last-child(n+2) {
- margin-bottom: 30px;
- }
- .order_price_text{
- font-size: $font_size_medium;
- // margin-right: 10px;
- display: flex;
- .iconfont_msg{
- position: relative;
- }
- .miconfont{
- font-size: 26px;
- font-weight: normal;
- margin-left: 5px;
- }
- .message{
- position: absolute;
- top: -50px;
- background: #A8B3BD;
- z-index: 9;
- min-height: 50px;
- border-radius: 10px;
- padding: 10px;
- box-sizing: border-box;
- &::before{
- z-index: 1;
- position: absolute;
- bottom: -7px;
- left: 10px;
- width: 15px;
- height: 15px;
- content: " ";
- transform: rotate(45deg);
- background: #A8B3BD;
- box-sizing: border-box;
- }
- }
- }
- .emphasis{
- font-weight: 700;
- }
- .order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: 26px;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
- }
- .emphasis_num{
- text{
- &:nth-child(2) {
- font-size: $font_size_big;
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/estimatedAmount/index.tsx b/src/pages/salesAfter/components/estimatedAmount/index.tsx
deleted file mode 100644
index 04bc49a..0000000
--- a/src/pages/salesAfter/components/estimatedAmount/index.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo, useCallback, useEffect, useMemo } from "react"
-import {formatKbPrice} from '@/common/common'
-import classnames from "classnames";
-import styles from './index.module.scss'
-import AmountShow from "../amountShow";
-type Param = {
- style?: Object,
- number?: number,
- title?: string,
- titleStatus?: true|false, //true 标题加大加深
- numberStatus?: 0|1|2, //数字尺寸
-}
-export default memo(({style, number = 0, titleStatus = true, title = '', numberStatus = 1}:Param) => {
- return (
- <>
-
-
- {title}
-
-
- {/* 123123123121212312312312312 */}
-
-
-
-
- >
- )
-})
\ 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
deleted file mode 100644
index 0b99988..0000000
--- a/src/pages/salesAfter/components/kindList/index.module.scss
+++ /dev/null
@@ -1,150 +0,0 @@
-
-.kindsList_main{
- margin-top: 20px;
-}
-.orders_list_con{
-
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- .orders_return_title{
- font-size: 28px;
- font-weight: 700;
- padding-bottom: 20px;
- }
- .order_list{
- &:nth-child(n+2) {
- margin-top: 30px;
- }
- .order_list_title{
- display: flex;
- align-items: center;
- .tag{
- font-size: $font_size_min;
- background-color: #CDE5FF;
- padding: 5px 10px;
- border-radius: 6px;
- color: $color_main;
- }
- .title{
- font-weight: 700;
- font-size: $font_size;
- margin-left: 20px;
- flex:1;
- }
- .num{
- color: $color_font_two;
- font-size: $font_size_min;
- }
- }
- }
- .order_list_scroll{
- margin-top: 30px;
- .order_list_item {
- display: flex;
- &:nth-child(n + 2) {
- margin-top: 30px;
- }
- .order_list_item_img{
- width: 126px;
- height: 126px;
- border-radius: 20px;
- }
- .order_list_item_con{
- display: flex;
- width: 100%;
- flex:1;
- border-bottom: 1px solid #f0f0f0;
- height: 150px;
- padding-top: 20px;
- box-sizing: border-box;
- }
- .order_list_item_des{
- flex:1;
- box-sizing: border-box;
- padding-left: 30px;
- .order_list_item_title{
- font-weight: 700;
- font-size: $font_size;
- margin-bottom: 15px;
- }
- .order_list_item_price{
- font-size: 26px;
- color: $color_font_three;
- text{
- &:nth-child(n+1) {
- margin-right: 20px;
- }
- }
- }
- }
- .order_list_item_count{
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- .count_num{
- color: $color_main;
- font-size: $font_size;
- margin-bottom: 15px;
- font-weight: 400;
- text{
- font-size: $font_size_min;
- }
- }
- .count_price {
- font-size: $font_size;
- font-weight: 700;
- text{
- font-size: $font_size_min;
- }
- }
- }
- }
- }
- .order_total{
- padding-top: 20px;
- display: flex;
- justify-content: space-between;
- text{
- &:nth-child(1) {
- font-size: 28px;
- font-weight: 700;
- }
- &:nth-child(2) {
- font-size: 24px;
- font-weight: 700;
- }
- }
- }
- .order_estimated_amount{
- display: flex;
- align-items: flex-end;
- flex-direction: column;
- padding: 30px 0;
- .order_price_des{
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
-}
-.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
deleted file mode 100644
index 9f9d2de..0000000
--- a/src/pages/salesAfter/components/kindList/index.tsx
+++ /dev/null
@@ -1,202 +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 classnames from "classnames";
-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, //验布后的总数量
- is_quality_check: true|false, //是否质检过
-}
-
-type Param = {
- order: OrderParam,
- comfirm?: boolean //是否是确认订单页面使用
-}
-
-export default memo(({order, comfirm = false}:Param) => {
-
- //售后单状态枚举
- const {
- ReturnStageApplying, // 申请中
- ReturnStageWaitCheck, // 退货中
- ReturnStageChecked, // 待验布
- ReturnStageReturned, // 已退款
- ReturnStageCancel, // 已取消
- ReturnStageQualityCheckPendingRefund, // 已验布
- ReturnStageServiceOrderPendingRefund, // 待退款
- ReturnStageRejected, // 已拒绝
- } = AFTER_ORDER_STATUS
-
- //金额列表枚举
- const priceList = [
- {
- id:5,
- value: [ReturnStageReturned.value],
- label:'合计金额',
- field: 'total_refund_amount',
- message: '按原单价*退货重量的金额',
-
- },
- {
- id:1,
- value: [ReturnStageReturned.value],
- label:'扣款金额',
- field: 'other_deduction_amount',
- message: '本次售后扣款金额'
- },
- {
- id:3,
- value: [ReturnStageReturned.value],
- label:'退款金额',
- field: 'refund_amount',
- message: '本次售后应退款金额'
- },
- {
- id:4,
- value: [ReturnStageReturned.value],
- label:'退款去向',
- field: 'refund_flow_name',
- message: '本次售后退款金额去向'
- },
- ]
-
- //是否显示价格
- const showPrice = useCallback((priceInfo) => {
- return priceInfo.value.includes(order?.stage)
- }, [order])
-
- const priceConDom = useMemo(() => {
- if(!order) return
- return (
- <>
- {
- priceList.map(item => {
- return <>{showPrice(item)&&}>
- })
- }
- >
- )
- }, [order])
-
- //对应数量
- 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?.is_quality_check) {
- 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?.is_quality_check?order?.quality_check_pass_product:order?.product_list
- }, [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])
-
- //销售价格
- const formatPrice = useCallback((colorItem) => {
- return (ReturnStageReturned.value == order?.stage) && ¥{formatPriceDiv(colorItem.estimate_amount, 100 , true)}
- }, [order])
-
- return (
-
- {list?.length > 0 &&
- {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}
- {formatPrice(colorItem)}
-
-
-
- })}
-
-
- })
- }
- 合计{numText}
-
- {priceConDom}
-
-
- }
- {
- (list?.length <=0 && order?.is_quality_check) &&
- 质检情况
-
-
- 没有质检通过的商品,无法退款
-
-
- }
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/offlinePay/index.module.scss b/src/pages/salesAfter/components/offlinePay/index.module.scss
deleted file mode 100644
index f84e995..0000000
--- a/src/pages/salesAfter/components/offlinePay/index.module.scss
+++ /dev/null
@@ -1,46 +0,0 @@
-$top:170px;
-.offlinePay_main{
- .offlinePay_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
- }
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
-
- }
-
- .offlinePay_list{
- border-radius: 10px;
- padding: 60px 0;
- .offlinePay_con_text{
- font-size: $font_size;
- font-weight: 700;
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/offlinePay/index.tsx b/src/pages/salesAfter/components/offlinePay/index.tsx
deleted file mode 100644
index 4022374..0000000
--- a/src/pages/salesAfter/components/offlinePay/index.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo } from "react";
-import AmountShow from "../amountShow";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-import MCheckbox from "@/components/checkbox";
-import Popup from "@/components/popup";
-import SearchInput from "@/components/searchInput";
-import Taro from "@tarojs/taro";
-
-type Param = {
- show?: true|false,
- onClose?: () => void
-}
-export default memo(({show = true, onClose}:Param) => {
- //复制功能
- const clipboardData = () => {
- Taro.setClipboardData({
- data: '开户名称:佛山市浩川盛世科技有限公司; 开户银行:招商银行汾江支行; 转账汇款账号:62062342120001221231212',
- success: function (res) {
- Taro.showToast({
- icon: 'none',
- title: '复制成功'
- })
- }
- })
- }
- return (
-
-
-
-
- 线下汇款
-
-
- 佛山市浩川盛世科技有限公司
-
-
- 招商银行汾江支行
-
-
- 62062342120001221231212
-
-
- 复制信息
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/orderState/index.module.scss b/src/pages/salesAfter/components/orderState/index.module.scss
deleted file mode 100644
index 0cc33d6..0000000
--- a/src/pages/salesAfter/components/orderState/index.module.scss
+++ /dev/null
@@ -1,139 +0,0 @@
-.order_flow_state{
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing:border-box;
- position: relative;
- overflow: hidden;
- .order_status_list{
- max-height: 250px;
- overflow: hidden;
- transition: all 0.3s ease-in-out;
- }
- .order_status_list_show {
- max-height: 1000px !important;
- }
- .order_status_item{
- position: relative;
- &:nth-last-child(n+2) {
- padding-bottom: 30px;
- }
- .order_status_tail_end, .order_status_tail{
- width: 15px;
- height: 15px;
- border: 2px solid $color_main;
- background-color: #fff;
- border-radius: 50%;
- position:absolute;
- left: 0;
- top: 10px;
- z-index: 10;
- }
- .order_status_tail_end{
- background-color: $color_main;
- }
- .order_status_line{
- border-left: 2px solid $color_main;
- height: 100%;
- top: 10px;
- left: 9px;
- position: absolute;
- z-index: 1;
- }
- .order_status_content{
- display: flex;
- align-items: center;
- padding: 0 30px;
- .order_status_title{
- color: $color_font_two;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status_time{
- color: $color_font_two;
- font-size: $font_size_medium;
- padding: 0 20px;
- }
- .order_status_tag{
- font-size: $font_size_min;
- background: #F0F0F0;
- border-radius: 6px;
- padding: 5px 10px;
- color: $color_font_two;
- }
- .order_status_select{
- color: $color_main;
- }
- .order_status_tag_select{
- color: $color_main;
- }
- }
- .order_status_des{
- color: $color_font_two;
- font-size: $font_size_medium;
- }
- .order_status_des_select{
- color: $color_font_one;
- }
- .pay_time{
- height: 56px;
- background: #f6f6f6;
- border-radius: 20px;
- color: #3C3C3C;
- font-size: 24px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 700;
- margin-top: 20px;
- text{
- font-size: 28px;
- color: $color_main;
- padding: 0 10px;
-
- }
- }
- }
- .more{
- width: 100%;
- text-align: center;
- font-size: $font_size_min;
- color: $color_font_one;
- padding-top: 20px;
- .miconfonts{
- display: inline-block;
- font-size: 25px;
- transform:rotate(90deg);
- }
- .open_miconfonts{
- transform:rotate(-90deg);
- }
- }
- .image_tag{
- width: 140px;
- height: 144px;
- .image{
- width: 140px;
- height: 144px;
- }
- position: absolute;
- top: -10px;
- right: -10px;
- }
- .refresh{
- position: absolute;
- top: 23px;
- right: 20px;
- display: flex;
- color: #707070;
- display: flex;
- align-items: center;
-
- .mconfont{
- font-size: 30px;
- }
- .refresh_text{
- font-size: 23px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/orderState/index.tsx b/src/pages/salesAfter/components/orderState/index.tsx
deleted file mode 100644
index f5b5d84..0000000
--- a/src/pages/salesAfter/components/orderState/index.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo, useMemo, useState } from "react"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { formatDateTime } from "@/common/fotmat";
-import { ORDER_STATUS } from "@/common/enum";
-
-type List = {
- status: string,
- time: string,
- tag: string,
- desc: string,
- expire_time: string
-}
-
-type Param = {
- onRefresh?: () => void,
- orderInfo?: {
- logistics_details:List[], //订单状态列表
- payment_method: number, //支付方式
- status: number, //订单状态
- }
-}
-
-export default memo(({orderInfo = {logistics_details: [],payment_method: 0, status: 0}, onRefresh}:Param) => {
-
- const [showMore, setShowMore] = useState(false)
- const changeMore = () => {
- setShowMore(() => !showMore)
- }
- const dataList = useMemo(() => {
- return orderInfo.logistics_details?orderInfo?.logistics_details.reverse():[]
- }, [orderInfo.logistics_details])
-
- //订单状态枚举
- const {SaleorderstatusWaitingPrePayment} = ORDER_STATUS
-
-
- return (
- <>
- {(dataList?.length > 0)&&
-
- {dataList.map((item, index) =>
- {(dataList.length > 1)&&}
- {(dataList.length != (index + 1))&&}
-
- {item.status}
- {formatDateTime(item.time)}
-
- {item.desc}
- )}
-
- {(dataList.length > 2) && changeMore()}>
- {showMore&&'收起详情'||'点击查看详情'}
-
- }
- }
- >
- )
-})
diff --git a/src/pages/salesAfter/components/payment/index.module.scss b/src/pages/salesAfter/components/payment/index.module.scss
deleted file mode 100644
index 340b0ed..0000000
--- a/src/pages/salesAfter/components/payment/index.module.scss
+++ /dev/null
@@ -1,126 +0,0 @@
-$top:190px;
-.payment_main{
- .payment_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
- }
-
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
-
- }
- .amount{
- text-align: center;
- padding: 25px 0;
- }
-
- .payment_list{
- background-color: #fff;
- // box-shadow: 2px 2px 6px 0px rgba(0,0,0,0.16);
- min-height: 300px;
- border-radius: 10px;
- padding-bottom: 100px;
- position: relative;
- background: radial-gradient(circle 20px at left $top, transparent 20px, #fff 20px + 3px) left 0px/60% no-repeat ,
- radial-gradient(circle 20px at right $top, transparent 20px, #fff 20px + 3px) right 0px/60% no-repeat;
- filter: drop-shadow(2px 2px 6px rgba(0, 0, 0, .16));
- position: relative;
- &::before{
- content: '';
- position: absolute;
- border-bottom: 3px dashed #ccc;
- top: $top;
- width: calc(100% - 100px);
- left:0;
- right: 0;
- margin: auto;
-
- }
- .payment_list_top_border{
- height: 32px;
- width: 100%;
- background: linear-gradient(215deg,#cde5ff 2%, #cde5ff 2%, #68b4ff 72%);
- border-radius: 10px 10px 0px 0px;
- }
- .payment_list_title{
- text-align: center;
- padding: 30px 0 50px 0;
- font-size: $font_size;
- color: $color_font_three;
- .payment_list_title_price_item{
- display: flex;
- justify-content: space-between;
- padding: 0 90px;
- &:nth-child(1) {
- margin-bottom: 15px;
- }
- }
- text{
- &:nth-child(2) {
- color: $color_main;
- }
- }
- }
- .payment_list_con{
- padding: 20px 30px 0 30px;
- .payment_list_item{
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 123px;
- &:nth-last-child(n+2) {
- border-bottom: 2px solid #F3F3F3;
- }
- }
- .payment_list_item_left{
- display: flex;
- flex-direction: column;
- font-size: $font_size;
- .payment_list_item_left_name{
- display: flex;
- align-items: center;
- }
- .miconfont{
- font-size: 30px;
- color: #FFC300;
- padding-right: 10px;
- }
- .payment_list_item_left_price{
- font-size: $font_size_min;
- color: $color_font_two;
- padding-left: 35px;
- padding-top: 5px;
- }
- }
- .miconfont_more{
- font-size: 20px;
- }
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/payment/index.tsx b/src/pages/salesAfter/components/payment/index.tsx
deleted file mode 100644
index 8af70dc..0000000
--- a/src/pages/salesAfter/components/payment/index.tsx
+++ /dev/null
@@ -1,185 +0,0 @@
-import { Text, View } from "@tarojs/components";
-import { memo, useCallback, useEffect, useMemo, useState } from "react";
-import AmountShow from "../amountShow";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-import MCheckbox from "@/components/checkbox";
-import Popup from "@/components/popup";
-import OfflinePay from "../offlinePay";
-import ScanPay from "../scanPay";
-import { GetOrderPayApi, SubmitOrderPayApi } from "@/api/orderPay";
-import { formatPriceDiv } from "@/common/fotmat";
-import {alert} from "@/common/common"
-import { PAYMENT_METHOD, PAYMENT_METHOD_PARAM } from "@/common/enum";
-
-type Param = {
- show?: true|false,
- onClose?: () => void,
- onSubmitSuccess?: () => void, //支付成功
- orderInfo?: OrderInfo
-}
-
-type OrderInfo = {
- orderId: number, //应付单id
- payment_method: 0|PAYMENT_METHOD_PARAM //支付方式
-}
-
-type PayStatus = 1|2|3|4|5|null //1:预存款, 2:账期,3:线下汇款, 4:扫码支付, 5:货到付款
-export default memo(({show = false, onClose, orderInfo, onSubmitSuccess}:Param) => {
-
- //提交参数
- const [submitData, setSubmitData] = useState<{id:number, payment_method: PayStatus}>({
- id:0,
- payment_method: null
- })
-
- //线下付款
- const [offlinePayShow, setofflinePayShow] = useState(false)
- const onShowOfflinePay = () => {
- setofflinePayShow(true)
- onClose?.()
- }
-
- //扫码支付
- const [scanPayShow, setScanPayShow] = useState(false)
- const onShowScanPay = () => {
- setScanPayShow(true)
- onClose?.()
- }
-
- //获取支付方式数据
- const [payInfo, setPayInfo] = useState()
- const {fetchData: orderFetchData} = GetOrderPayApi()
- const getOrderPay = async () => {
- let {data} = await orderFetchData({id: orderInfo?.orderId})
- setPayInfo(() => data)
- }
- useEffect(() => {
- if(show&&orderInfo?.orderId) {
- setSubmitData((val) => ({...val, id:orderInfo.orderId}))
- getOrderPay()
- }
- }, [show, orderInfo])
-
- //预存款选择
- const advanceSelectData = useCallback((val) => {
- setSubmitData((e) => ({...e, payment_method:val}))
- }, [])
-
- //账期选择
- const periodSelectData = (val) => {
- setSubmitData((e) => ({...e, payment_method:val}))
- }
-
- //提交支付
- const {fetchData: submitFetchData} = SubmitOrderPayApi()
- const submitPay = async () => {
- if(submitData.payment_method === null) {
- alert.error('请选择支付方式')
- return false
- }
- alert.loading('正在支付')
- let res = await submitFetchData(submitData)
- if(res.success) {
- alert.success('支付成功')
- onSubmitSuccess?.()
- } else {
- alert.none(res.msg)
- }
- }
-
- //预付款
- const advance_payment = useMemo(() => {
- const price = payInfo?.should_collect_money - payInfo?.amount_paid
- return (
- {(payInfo?.advance_deposit_balance < price)&&'余额不足,' }剩余 ¥{formatPriceDiv(payInfo?.advance_deposit_balance)}
- )
- }, [payInfo])
-
- //账期
- const account_peyment = useMemo(() => {
- const price = payInfo?.should_collect_money - payInfo?.amount_paid
- return (
- {(payInfo?.account_period < price)&&'额度不足, '}剩余 ¥{formatPriceDiv(payInfo?.account_period_credit_available_line)}
- )
- }, [payInfo])
-
- //支付方式枚举
- const {PaymentMethodPreDeposit, PaymentMethodAccountPeriod} = PAYMENT_METHOD
-
- return (
-
-
-
-
- 订单支付
-
-
-
-
-
-
- {/* 向商家发起支付 */}
-
-
- 订单金额
- ¥{formatPriceDiv(payInfo?.should_collect_money)}
-
-
- 已付金额
- ¥{formatPriceDiv(payInfo?.amount_paid)}
-
-
-
-
-
-
-
-
- 预存款
-
- {advance_payment}
-
- advanceSelectData(PaymentMethodPreDeposit.value)} onClose={() => advanceSelectData(null)}/>
-
- {(orderInfo?.payment_method != PaymentMethodAccountPeriod.value)&&
-
-
-
- {payInfo?.account_period}天账期
-
- {/* 可用额度 ¥{formatPriceDiv(payInfo?.account_period_credit_available_line)} */}
- {account_peyment}
-
- periodSelectData(PaymentMethodAccountPeriod.value)} onClose={() => periodSelectData(null)}/>
- }
-
-
-
-
- 线下汇款
-
-
-
-
-
-
-
-
- 扫码支付
-
-
-
-
-
-
- 确认交易
-
-
- setofflinePayShow(false)}/>
- setScanPayShow(false)}/>
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/remark/index.module.scss b/src/pages/salesAfter/components/remark/index.module.scss
deleted file mode 100644
index d624050..0000000
--- a/src/pages/salesAfter/components/remark/index.module.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-.order_popup{
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 20px 0;
- .order_popup_title{
- color: $font_size_big;
- font-weight: 700;
- color: #000000;
- padding-bottom: 20px;
- }
- .order_popup_input{
- width: 100%;
- padding: 0 25px;
- box-sizing: border-box;
- margin-top: 43px;
- position: relative;
- .descDataNum{
- position: absolute;
- right: 40px;
- bottom: 10px;
- height: 39px;
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- textarea{
- background-color: #f3f3f3;
- border-radius: 10px;
- width: 100%;
- height: 313px;
- padding: 20px;
- padding-bottom: 50px;
- box-sizing: border-box;
- font-size: $font_size;
- border: 2px solid #e6e6e6;
- }
- }
- .order_save_address{
- height: 82px;
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- text-align: center;
- line-height: 82px;
- color: #fff;
- margin-top: 60px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/remark/index.tsx b/src/pages/salesAfter/components/remark/index.tsx
deleted file mode 100644
index 14d981b..0000000
--- a/src/pages/salesAfter/components/remark/index.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import Popup from "@/components/popup"
-import { Textarea, View } from "@tarojs/components"
-import { useCallback, useState } from "react"
-import styles from './index.module.scss'
-
-type Param = {
- onBlur?: (val:any) => void
- onSave?: (val: string) => void
-}
-export default ({onBlur, onSave}:Param) => {
- const [descData, setDescData] = useState({
- number: 0,
- value: '',
- count: 200
- })
- const getDesc = useCallback((e) => {
- let value = e.detail.value
- let res = value
- if(value.length > descData.count) {
- res = value.slice(0, descData.count)
- }
- setDescData({...descData, number:res.length, value: res})
- },[])
-
- const setSave = () => {
- onSave?.(descData.value)
- }
- return (
-
- 编辑备注
-
-
- {descData.number}/{descData.count}
-
- setSave()}>保存
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/returnLogistics/index.module.scss b/src/pages/salesAfter/components/returnLogistics/index.module.scss
deleted file mode 100644
index 1a22287..0000000
--- a/src/pages/salesAfter/components/returnLogistics/index.module.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-
-.logistics_main{
- padding: 20px 30px;
- box-sizing: border-box;
- .logistics_image{
- display: flex;
- .title_desc{
- font-size: 28px;
- font-weight: 700;
- padding-top: 50px;
- box-sizing: border-box;
- }
- .upload_image{
- flex:1;
- }
- }
- .logistics_desc{
- margin-top: 50px;
- }
- .btns_two{
- display: flex;
- height: 82px;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-top: 50px;
- .verify_btn{
- flex:1;
- border-radius: 40px;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
-}
diff --git a/src/pages/salesAfter/components/returnLogistics/index.tsx b/src/pages/salesAfter/components/returnLogistics/index.tsx
deleted file mode 100644
index c51c38e..0000000
--- a/src/pages/salesAfter/components/returnLogistics/index.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import Popup from '@/components/popup'
-import { Text, View } from '@tarojs/components'
-import { memo, useCallback, useEffect, useRef, useState } from 'react'
-import UploadImage from '@/components/uploadImage'
-import styles from './index.module.scss'
-import TextareaEnhance from '@/components/textareaEnhance'
-import { ReturnApplyLogisticsApi } from '@/api/salesAfterOrder'
-import { alert } from '@/common/common'
-
-type Param = {
- show?: true | false
- onClose?: () => void
- onSubmit?: () => void
- id?: number //订单id
- images: string[] //图片列表
- descValue?: string //描述
- onlyRead?: false | true //true 只读
-}
-export default memo(({ show = false, onClose, onSubmit, id = 0, images = [], descValue = '', onlyRead = false }: Param) => {
- //需要提交的数据
- const submitData = useRef({
- accessory_url: [],
- remark: '',
- id: 0,
- })
- useEffect(() => {
- if (id) submitData.current.id = id
- }, [id])
-
- //获取图片列表
- const getImageList = useCallback((list) => {
- submitData.current.accessory_url = list
- }, [])
-
- //备注
- const getOtherReason = useCallback((val) => {
- submitData.current.remark = val
- }, [])
-
- //确定
- const { fetchData } = ReturnApplyLogisticsApi()
- const onSubmitEven = async () => {
- if (!id) return alert.error('参数有误')
- if (submitData.current.accessory_url.length <= 0) return alert.error('请上传附件')
- let res = await fetchData(submitData.current)
- if (res.success) {
- alert.success('上传成功')
- } else {
- alert.error('上传失败')
- }
- onSubmit?.()
- }
-
- return (
- <>
-
-
-
- 上传附件:
-
-
-
-
-
-
-
- {!onlyRead && (
-
- onSubmitEven()}>
- 保存
-
-
- )}
-
-
- >
- )
-})
diff --git a/src/pages/salesAfter/components/scanPay/index.module.scss b/src/pages/salesAfter/components/scanPay/index.module.scss
deleted file mode 100644
index dcb356d..0000000
--- a/src/pages/salesAfter/components/scanPay/index.module.scss
+++ /dev/null
@@ -1,54 +0,0 @@
-$top:170px;
-.scanPay_main{
- .scanPay_con{
- padding: 20px;
- background-color: #F6F6F6;
- border-radius: 20px;
- .miconfont_title{
- transform: rotate(-180deg);
- position: absolute;
- left: 20px;
- top: 27px;
- font-size: 37px;
- color: $color_font_three;
- z-index: 99;
-
- }
- }
- .title{
- font-size: $font_size_big;
- color: #000000;
- text-align: center;
- font-weight: 700;
- position: relative;
- }
- .desc{
- font-size: $font_size_min;
- color: $color_main;
- text-align: center;
- padding: 10px 0;
- .miconfont{
- font-size: 25px;
- }
- }
-
- .scanPay_list{
- border-radius: 10px;
- height: 900px;
- image{
- width: 100%;
- }
- }
- .btns{
- background: #007aff;
- border-radius: 40px;
- width: 668px;
- height: 82px;
- text-align: center;
- line-height: 80px;
- width: 100%;
- color: #fff;
- font-size: 32px;
- margin-top: 30px;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/scanPay/index.tsx b/src/pages/salesAfter/components/scanPay/index.tsx
deleted file mode 100644
index d6fb06e..0000000
--- a/src/pages/salesAfter/components/scanPay/index.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-import { Image, ScrollView, Text, View } from "@tarojs/components";
-import { memo, useEffect, useRef, useState } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-import Popup from "@/components/popup";
-import Taro from "@tarojs/taro";
-import { alert } from "@/common/common";
-import { formatImgUrl } from "@/common/fotmat";
-import useCheckAuthorize from "@/use/useCheckAuthorize";
-import { GetPayCode } from "@/api/onlinePay";
-import LoadingCard from "@/components/loadingCard";
-
-
-type Param = {
- show?: true|false,
- onClose?: () => void
-}
-
-
-type Item = {
- product_code: string,
- product_name: string,
- product_color_code: string,
- product_color_name: string,
- num: string,
- weight: string,
- sale_price: string,
- total_price: string
-}
-type CodeParam = {
- title: string,
- company: string,
- order_type: string,
- sale_user: string,
- order_created_time: string,
- order_no: string,
- department: string,
- shipment_mode: string,
- target_user_name: string,
- target_address: string,
- target_description: string,
- pay_account: string,
- bank_account_name: string,
- bank_name: string,
- pay_type: string,
- client: string,
- phone: string,
- order_total_length: string,
- order_total_price: string,
- qrcode: string,
- order_total_weight: string,
- list: Item[]
-}
-export default memo(({show = true, onClose}:Param) => {
-
- //获取支付二维码
- const [payCodeImage, setPayCodeImage] = useState('')
- const fileData = useRef({
- filePath: '',
- base64: ''
- })
- const {fetchData, state} = GetPayCode()
- const getCore = async () => {
- let res = await fetchData({
- title: "面料销售电子确认单",
- company: "什么什么公司123",
- order_type: "散剪",
- sale_user: "小崔",
- order_created_time:"2022/02/01 12:32:13",
- order_no:"XS-211005888",
- department:"嘻嘻嘻",
- shipment_mode:"自提",
- target_user_name:"大崔",
- target_address:"阿斯顿发斯蒂芬",
- target_description:"无",
- pay_account:"1234567890123450001",
- bank_account_name:"佛山市浩川长盛科技有限公司",
- bank_name:"招商银行佛山分行禅城支行",
- pay_type:"现结",
- client:"客户名称",
- phone:"15818085802",
- order_total_length:"12",
- order_total_price:"63000",
- qrcode:"https://www.zzfzyc.com/checkorder/XS-211005888",
- order_total_weight:"300.00",
- list: [{product_code:'5215',product_name:'26S双纱亲水滑爽棉',product_color_code:'053',product_color_name:'洋红',num:'4',weight:'123.23',sale_price:'43',total_price:'4510.7'}]
- })
- const base64 = res.data.base64
- setPayCodeImage(() => base64)
- const time = new Date().valueOf()
- const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || [];
- let filePath = Taro.env.USER_DATA_PATH + '/img' + time +'.'+ format
- fileData.current.filePath = filePath
- fileData.current.base64 = bodyData
- const save = Taro.getFileSystemManager()
- save.writeFile({
- filePath: fileData.current.filePath,
- data: fileData.current.base64,
- encoding: 'base64',
- })
-
- }
- useEffect(() => {
- if(show)
- getCore()
- }, [show])
-
- //检查是否开启保存图片权限
- const {check} = useCheckAuthorize({scope:'scope.writePhotosAlbum', msg:'您没授权,无法保存图片'})
- const saveImageCheck = async () => {
- const res = await check()
- res&&saveImage()
- }
-
- //保存图片
- const saveImage = () => {
- alert.loading('正在保存图片')
- Taro.saveImageToPhotosAlbum({
- filePath: fileData.current.filePath,
- success: function (res) {
- alert.success('图片保存成功')
- },
- fail: function (err) {
- console.log('err::', err)
- }
- })
- }
-
- //预览图片
- const showImage = () => {
- console.log('fileData.current.filePath::', fileData.current.filePath)
- Taro.previewImage({
- current: fileData.current.filePath, // 当前显示
- urls: [fileData.current.filePath] // 需要预览的图片http链接列表
- })
- }
-
- //复制功能
- return (
-
-
-
-
- 扫码支付
-
-
- 扫码支付成功后,自动更新状态
-
-
- {(state.loading)&&||
-
-
- }
-
- 保存电子确认单
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/shipmentMode/index.module.scss b/src/pages/salesAfter/components/shipmentMode/index.module.scss
deleted file mode 100644
index 5f818f9..0000000
--- a/src/pages/salesAfter/components/shipmentMode/index.module.scss
+++ /dev/null
@@ -1,33 +0,0 @@
-
- .order_title{
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status{
- background-color: #F0F0F0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- .order_status_selected{
- color: $color_main;
- border: 1px solid $color_main;
- }
- }
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/shipmentMode/index.tsx b/src/pages/salesAfter/components/shipmentMode/index.tsx
deleted file mode 100644
index 235591c..0000000
--- a/src/pages/salesAfter/components/shipmentMode/index.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import styles from './index.module.scss'
-import classnames from "classnames";
-import { memo, useRef, useState } from "react";
-
-type Param = {
- onSelect?:(val:number) => void
-}
-export default memo(({onSelect}: Param) => {
- //收货方法 1:自提,2:物流
- const shipmentMode = useRef([
- {value:1, label:'上门自提', selected:false},
- {value:2, label:'物流', selected:false}
- ])
- const [selectValue, setSelectValue] = useState()
- const selectShipmentMode = (value) => {
- setSelectValue(() => value)
- onSelect?.(value)
- }
- return (
-
- 收货方式
- {shipmentMode.current.map(item => {
- return selectShipmentMode(item.value)}>{item.label}
- })}
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/submitOrderBtn/index.module.scss b/src/pages/salesAfter/components/submitOrderBtn/index.module.scss
deleted file mode 100644
index c5ac9ed..0000000
--- a/src/pages/salesAfter/components/submitOrderBtn/index.module.scss
+++ /dev/null
@@ -1,69 +0,0 @@
-.order_price{
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- &:nth-last-child(n+2) {
- margin-bottom: 30px;
- }
- .order_price_text{
- font-size: $font_size_medium;
- // margin-right: 10px;
- display: flex;
- .iconfont_msg{
- position: relative;
- }
- .miconfont{
- font-size: 30px;
- font-weight: normal;
- }
- .message{
- position: absolute;
- top: -50px;
- background: #A8B3BD;
- z-index: 9;
- min-height: 50px;
- border-radius: 10px;
- padding: 10px;
- box-sizing: border-box;
- &::before{
- z-index: 1;
- position: absolute;
- bottom: -7px;
- left: 10px;
- width: 15px;
- height: 15px;
- content: " ";
- transform: rotate(45deg);
- background: #A8B3BD;
- box-sizing: border-box;
- }
- }
- }
- .emphasis{
- font-weight: 700;
- }
- .order_price_num{
- color: $color_main;
- font-weight: 700;
- text{
- &:nth-child(1) {
- font-size: $font_size_min;
- }
- &:nth-child(2) {
- font-size: 26px;
- }
- &:nth-child(3) {
- font-size: $font_size_medium;
- }
- }
- }
- .emphasis_num{
- text{
- &:nth-child(2) {
- font-size: $font_size_big;
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/submitOrderBtn/index.tsx b/src/pages/salesAfter/components/submitOrderBtn/index.tsx
deleted file mode 100644
index db9b432..0000000
--- a/src/pages/salesAfter/components/submitOrderBtn/index.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo, useCallback, useEffect, useMemo } from "react"
-import {formatKbPrice} from '@/common/common'
-import classnames from "classnames";
-import styles from './index.module.scss'
-type Param = {
- style?: Object,
- number?: number
-}
-export default memo(({style, number = 0}:Param) => {
- const priceDom = useCallback(() => {
- let res = number.toFixed(2).split('.')
- let int_num = parseInt(res[0]) + ''
- let decimals_num = res[1]
- return (
- <>
- ¥
- {Number(int_num).toLocaleString()}
- .{decimals_num}
- >
- )
- }, [number])
- return (
- <>
-
-
- 应付金额
-
-
- {/* 123123123121212312312312312 */}
-
-
-
- {priceDom()}
-
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/weightMemo/index.module.scss b/src/pages/salesAfter/components/weightMemo/index.module.scss
deleted file mode 100644
index 3c74511..0000000
--- a/src/pages/salesAfter/components/weightMemo/index.module.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-
-.weight_memo{
- background-color: #fff;
- border-radius: 20px;
- padding: 0 20px;
- .weight_memo_item{
- display: flex;
- justify-content: space-between;
- height: 130px;
- &:nth-child(1) {
- border-bottom: 1px solid #f3f3f3;
- }
- .title, .desc{
- display: flex;
- align-items: center;
- }
- .title {
- font-size: $font_size;
- font-weight: 700;
- }
- .desc{
- color: $color_font_two;
- font-size: $font_size_medium;
- }
- .miconfont_check, .miconfont_custom{
- font-size: 37px;
- color: $color_main;
- font-weight: normal;
- padding-right: 10px;
- }
- .miconfont_custom{
- color:#FFC300;
- }
- .miconfont_more{
- font-size: 30px;
- padding-left: 10px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/components/weightMemo/index.tsx b/src/pages/salesAfter/components/weightMemo/index.tsx
deleted file mode 100644
index 7cbfd13..0000000
--- a/src/pages/salesAfter/components/weightMemo/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import Popup from "@/components/popup"
-import { Text, Textarea, View } from "@tarojs/components"
-import { memo, useCallback, useState } from "react"
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-type Param = {
- onCheck?: () => void
- onCustom?: () => void
-}
-export default memo(({onCheck, onCustom}:Param) => {
- return (
-
- onCheck?.()}>
-
-
- 陆盈纺织
-
-
- 查看原码单
-
-
-
- onCustom?.()}>
-
-
- 我的码单
-
-
- 自定义
-
-
-
-
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/index.config.ts b/src/pages/salesAfter/index.config.ts
deleted file mode 100644
index 5000759..0000000
--- a/src/pages/salesAfter/index.config.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export default {
- navigationBarTitleText: '售后详情',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/salesAfter/index.module.scss b/src/pages/salesAfter/index.module.scss
deleted file mode 100644
index 635ee29..0000000
--- a/src/pages/salesAfter/index.module.scss
+++ /dev/null
@@ -1,155 +0,0 @@
-.order_main{
- min-height: 100%;
- background-color:$color_bg_one;
- padding: 20px;
- padding-bottom: 190px;
- box-sizing: border-box;
-
- .order_title{
- display: flex;
- align-items: center;
- padding: 20px 30px;
- box-sizing: border-box;
- background-color: #fff;
- height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- text{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_status{
- background-color: #F0F0F0;
- width: 148px;
- height: 55px;
- color: $color_font_three;
- text-align: center;
- line-height: 55px;
- font-size: $font_size_medium;
- border-radius: 30px;
- &:nth-last-child(1) {
- margin-left: 20px;
- }
- }
- }
- .order_desc{
- display: flex;
- align-items: center;
- background-color: #fff;
- padding: 20px;
- min-height: 116px;
- border-radius: 20px;
- margin-top: 20px;
- box-sizing: border-box;
- .order_desc_con{
- width: 150px;
- font-size: $font_size;
- font-weight: 700;
- }
- .order_desc_text, .order_desc_text_hint{
- font-size: $font_size_medium;
- color: $color_font_two;
- margin-right: 10px;
- flex:1;
- word-break:break-all;
- }
- .order_desc_text_hint{
- text-align: right;
- }
- .miconfont{
- font-size: 20px;
- color: $color_font_two;
- }
- }
- .submit_order{
- display: flex;
- position: fixed;
- bottom: 0;
- left: 0;
- justify-content: flex-end;
- width: 100%;
- height: 175px;
- align-items: center;
- background-color: #fff;
- box-shadow: 6px 0px 12px 0px rgba(0,0,0,0.16);
- padding: 20px 20px;
- box-sizing: border-box;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .order_btn {
- width: 152px;
- height: 72px;
- border: 2px solid #dddddd;
- border-radius: 46px;
- display: flex;
- justify-content: center;
- align-items: center;
- color: $color_font_three;
- &:nth-child(n+2) {
- margin-left: 34px;
- }
- }
- .order_btn_select{
- color: $color_main;
- border: 2px solid $color_main;
- }
- .order_number_desc{
- font-size: $font_size_medium;
- color: $color_font_two;
- }
- }
- .order_info{
- background-color: #fff;
- margin-top: 20px;
- border-radius: 20px;
- padding: 20px;
- .order_info_title{
- font-size: $font_size;
- font-weight: 700;
- margin-bottom: 20px;
-
- }
- .order_num{
- display: flex;
- width: 100%;
- justify-content: space-between;
- align-items: center;
- .order_num_btn{
- font-size: $font_size_medium;
- padding: 5px;
- border: 2px solid #007cf7;
- border-radius: 10px;
- color: $color_main;
- }
- }
- text{
- font-size: $font_size;
- word-break: break-all;
- }
-
- }
-
- .after_sale_picture_list{
- display: grid;
- grid-template-columns: repeat(5, 102px);
- justify-items: center;
- grid-row-gap:20px;
- grid-column-gap: calc((100% - 102px*5)/4);
- .after_sale_picture_item{
- width: 102px;
- height: 102px;
- image{
- width:100%;
- height: 100%;
- border-radius: 10px;
- }
- }
- }
-
-
- .weight_memo_con{
- margin-bottom: 20px;
- }
-
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/index.tsx b/src/pages/salesAfter/index.tsx
deleted file mode 100644
index a4f75bc..0000000
--- a/src/pages/salesAfter/index.tsx
+++ /dev/null
@@ -1,204 +0,0 @@
-import { SaleOrderOrderDetailApi } from '@/api/salesAfterOrder'
-import { AFTER_ORDER_STATUS, ORDER_STATUS } from '@/common/enum'
-import { formatDateTime, formatImgUrl, formatPriceDiv } from '@/common/fotmat'
-import AfterOrderBtns from '@/components/afterOrderBtns'
-import SearchInput from '@/components/searchInput'
-import useLogin from '@/use/useLogin'
-import { Image, Text, Textarea, View } from '@tarojs/components'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import classnames from 'classnames'
-import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react'
-import AddressInfoDetail from './components/addressInfoDetail'
-import ApplyRecord from './components/applyRecord'
-import ContentBox from './components/contentBox'
-import KindList from './components/kindList'
-import OrderState from './components/orderState'
-import ReturnLogistics from './components/returnLogistics'
-import styles from './index.module.scss'
-
-export default () => {
- useLogin()
- const router = useRouter()
- const orderId = useRef(Number(router.params.id))
- useDidShow(() => {
- getSaleOrderPreView()
- })
-
- //获取订单详情
- const [orderDetail, setOrderDetail] = useState() //获取到的原始数据
- const { fetchData: saleOrderOrderDetailData } = SaleOrderOrderDetailApi()
- const getSaleOrderPreView = async () => {
- if (orderId.current) {
- let res = await saleOrderOrderDetailData({ id: orderId.current })
- setOrderDetail(res.data)
- }
- Taro.stopPullDownRefresh()
- }
-
- //监听获取到的数据
- useEffect(() => {
- if (orderDetail) formatData()
- }, [orderDetail])
-
- //格式化数据格式
- const [formatDetailOrder, setFormatDetailOrder] = useState() //格式化后的数据
- const formatData = () => {
- setFormatDetailOrder({
- ...orderDetail,
- unit: orderDetail.sale_mode == 0 ? '条' : 'm', //单位
- })
- }
- const formatPreViewOrderMemo = useMemo(() => {
- return formatDetailOrder
- }, [formatDetailOrder])
-
- //获取底部按钮点击, 获取按钮状态
- const orderStateClick = useCallback(
- (val) => {
- if (val == 1 || val == 6) {
- getSaleOrderPreView()
- } else if (val == 8) {
- //申请记录
- setApplyRecord(true)
- } else if (val == 5) {
- onShowLogistics(1)
- }
- },
- [orderDetail],
- )
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- getSaleOrderPreView()
- })
-
- //按钮所需数据
- const orderInfo = useMemo(() => {
- return {
- ...orderDetail,
- }
- }, [orderDetail])
-
- //售后订单状态枚举
- const {} = AFTER_ORDER_STATUS
-
- //物流显示
- const [logisticsShow, setLogisticsShow] = useState(false)
- const [logistics, setLogistics] = useState(false)
- const onShowLogistics = useCallback((val) => {
- setLogisticsShow(true)
- if (val != 1) setLogistics(true)
- }, [])
- const onCloseLogistics = useCallback(() => {
- setLogisticsShow(false)
- }, [])
- //物流成功上传
- const logisticsSuccess = useCallback(() => {
- setLogisticsShow(false)
- getSaleOrderPreView()
- }, [])
-
- //显示记录
- const [applyRecord, setApplyRecord] = useState(false)
-
- return (
-
-
-
-
-
-
-
-
- setApplyRecord(false)} />
-
-
- )
-}
-
-const OrderDes = memo(({ orderInfo }: { orderInfo?: any }) => {
- //复制功能
- const clipboardData = (val) => {
- Taro.setClipboardData({
- data: val,
- success: function (res) {
- Taro.showToast({
- icon: 'none',
- title: '复制成功',
- })
- },
- })
- }
- return (
-
- 订单信息
-
-
- {orderInfo?.return_order_no}
- clipboardData(orderInfo?.return_order_no)}>
- 复制
-
-
-
-
-
- {orderInfo?.order_no}
- clipboardData(orderInfo?.order_no)}>
- 复制
-
-
-
-
- {orderInfo?.return_reason_name}
-
-
- {orderInfo?.return_explain_name}
-
-
- {orderInfo?.goods_status_name}
-
-
- {formatDateTime(orderInfo?.apply_time)}
-
-
- {orderInfo?.reason_describe}
-
-
- )
-})
-
-const AfterSalePricture = memo(({ urls = [] }: { urls: string[] }) => {
- const showList = useMemo(() => {
- let res = urls.map((item) => {
- return formatImgUrl(item, '!w800')
- })
- return res
- }, [urls])
-
- //预览图片
- const showImage = () => {
- Taro.previewImage({
- current: showList[0], // 当前显示
- urls: showList, // 需要预览的图片http链接列表
- })
- }
- return (
-
-
- {urls?.map((item) => (
-
-
-
- ))}
-
-
- )
-})
diff --git a/src/pages/salesAfter/salesAfterList/components/order/index.module.scss b/src/pages/salesAfter/salesAfterList/components/order/index.module.scss
deleted file mode 100644
index be8d9a6..0000000
--- a/src/pages/salesAfter/salesAfterList/components/order/index.module.scss
+++ /dev/null
@@ -1,184 +0,0 @@
-.order_item{
- background-color: #fff;
- border-radius: 20px;
- padding: 20px;
- box-sizing: border-box;
- .header{
- display: flex;
- align-items: center;
- .user{
- display: flex;
- align-items: center;
- .name {
- color: #000;
- font-weight: 700;
- margin-left: 15px;
- font-size: $font_size;
- width: 100px;
- @include common_ellipsis();
- }
- image{
- width: 70px;
- height: 70px;
- border-radius: 50%;
- }
- }
- .order_con {
- padding-left: 15px;
- width: 100%;
- .name {
- color: #000;
- font-weight: 700;
- font-size: $font_size;
- }
- .order_num {
- flex: 1;
- font-size: $font_size_medium;
- color: $color_font_one;
- padding-right: 10px;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .order_num_con{
- flex:1;
- }
- .miconfont {
- font-size: 20px;
- }
- }
- }
- .tag{
- font-size: $font_size_min;
- padding: 5px 15px;
- background-color: $color_main;
- color: #fff;
- border-radius: 0px 20px 0px 20px;
- }
- }
- .product_title{
- display: flex;
- align-items: center;
- padding: 35px 0;
- .product_tag{
- background-color: #CDE5FF;
- font-size: $font_size_min;
- padding: 5px 10px;
- color: $color_main;
- border-radius: 6px;
- }
- .product_name{
- flex:1;
- font-size: $font_size;
- font-weight: 700;
- padding: 0 20px;
- @include common_ellipsis()
- }
- .product_status{
- font-size: $font_size;
- color: $color_main;
- }
- }
- .product_list{
- display: flex;
- .image{
- width: 126px;
- height: 126px;
- border-radius: 20px ;
- position: relative;
- image{
- width: 100%;
- height: 100%;
- border-radius: 20px ;
- }
- .color_num {
- background: rgba(0,0,0, 0.5);
- border-radius: 36px 0px 20px 0px;
- font-size: $font_size_min;
- color: #fff;
- position: absolute;
- right:0;
- bottom:0;
- padding: 5px 10px 5px 15px;
- box-sizing: border-box;
- }
- }
- .color_list{
- flex:1;
- padding-left: 30px;
- .color_item{
- display: flex;
- justify-content: space-between;
- font-size: $font_size_min;
- color: $color_font_three;
- align-items: center;
- margin-bottom: 20px;
- .color_title{
- font-weight: 700;
- font-size: $font_size;
- color: #000;
- }
- .color_more{
- color: $color_font_three;
- }
- }
- }
-
- }
- .color_count_num{
- font-size: $font_size_min;
- color: $color_font_two;
- background-color: #F6F6F6;
- border-radius: 10px;
- padding: 10px 22px;
- margin-top: 20px;
- display: flex;
- justify-content: space-between;
- .refund_amount{
- font-size: 30rpx;
- color: #007AFF;
- text{
- &:nth-child(1) {
- font-size: 23px;
- }
- }
- }
- }
- .order_number{
- display: flex;
- background-color: #F6F6F6;
- padding: 20px;
- margin: 20px 0;
- align-items: center;
- font-size: $font_size_medium;
- border-radius: 10px;
- text{
- &:nth-child(1) {
-
- font-weight: 700;
- color: $color_font_three;
- border-right: 2px solid #CCCCCC;
- padding-right: 20px;
- }
- &:nth-child(2) {
- padding-left: 20px;
- color: $color_font_one;
- }
- }
- }
- .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
deleted file mode 100644
index d85beeb..0000000
--- a/src/pages/salesAfter/salesAfterList/components/order/index.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-import { goLink } from "@/common/common";
-import { AFTER_ORDER_STATUS, REFUND_STATUS_ORDER } from "@/common/enum";
-import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
-import AfterOrderBtns from "@/components/afterOrderBtns";
-import LabAndImg from "@/components/LabAndImg";
-import { useSelector } from "@/reducers/hooks";
-import { Image, Text, View } from "@tarojs/components"
-import classnames from "classnames";
-import { memo, useCallback, useMemo, useRef, useState } from "react";
-import OrderStatusTag from "../orderStatusTag";
-import styles from './index.module.scss'
-
-type Param = {
- value: {
- order_no: string,
- return_order_no: string,
- sale_mode: number,
- sale_mode_name: string,
- stage_name: string,
- shipment_mode_name: string,
- product_list: any[],
- total_fabrics: number,
- total_colors: number,
- total_number: number,
- stage: 0,
- id: number,
- lab: {l:number, a:number, b:number},
- rgb: {r:number, g:number, b:number},
- texturl_url: string,
- type: number //2 退货 1 预收退款 3 销售
- return_apply_order_id: number //退款申请单
- refund_amount: number // 退款金额
- 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
-}
-export default memo(({value, onClickBtn}: Param) => {
- const userInfo = useSelector(state => state.userInfo)
- //对应数量
- const formatCount = useCallback((item, sale_mode) => {
- return sale_mode == 0? item.roll + '条' : Number(item.length / 100) + '米'
- }, [value])
- //对应单价
- const standardPrice = useCallback((price, sale_mode) => {
- return formatPriceDiv(price).toLocaleString() + '/' + (sale_mode == 1?'m':'kg')
- }, [value])
-
- //点击订单按钮
- const orderBtnsClick = useCallback((status) => {
- onClickBtn?.({status, orderInfo:value})
- }, [value])
-
- //按钮所需数据
- const orderInfo = useMemo(() => {
- return value
- }, [value])
-
- //整理颜色
- const labAndRgbAndUrl = useMemo(() => {
- return {lab:{...value?.lab}, rgb:{...value?.rgb}, texturl_url: value?.texturl_url}
- }, [value])
-
- const {
- ReturnApplyOrderTypeReturnForRefund, // 退货退款
- } = REFUND_STATUS_ORDER
-
- const numText = useMemo(() => {
- let total_number_new = value?.sale_mode == 0? value?.total_number:(value?.total_number/100)
- return `${value?.total_fabrics} 种面料,${value?.total_colors} 种颜色,共 ${total_number_new}${value?.sale_mode == 0? ' 条':' 米'}`
- }, [value])
-
- //售后单状态
- const {ReturnStageQualityCheckPendingRefund, ReturnStageServiceOrderPendingRefund, ReturnStageReturned} = AFTER_ORDER_STATUS
- const stage_name = useMemo(() => {
- return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value].includes(value?.stage)?'待退款':value?.stage_name
- }, [value])
-
- //获取面料数组
- const list = useMemo(() => {
- let res = value?.is_quality_check? value?.quality_check_pass_product : value?.product_list
- return res || []
- }, [value])
-
-
- return (
-
- goLink('/pages/salesAfter/index', {id: value?.id})}>
-
-
-
-
- {userInfo?.adminUserInfo?.user_name}
-
-
- 售后单号:{value?.return_order_no}
-
-
-
-
-
-
- {list?.length > 0 && goLink('/pages/salesAfter/index', {id: value?.id})}>
-
- {value?.sale_mode_name}
- {formatHashTag(list?.[0].code, list?.[0].name)}
- {stage_name}
-
-
-
-
- {list?.[0].product_colors?.[0].code}
-
-
- {list?.[0].product_colors?.map((itemColor, index) => {
- return (
- (index <= 1)&&
- {formatHashTag(itemColor.code, itemColor.name)}
- ¥{standardPrice(itemColor.sale_price, value.sale_mode)}
- ×{formatCount(itemColor, value.sale_mode)}
-
- )
- })
- }
- {list?.[0].product_colors?.length > 2 &&
- ……
- ……
- ……
- }
-
-
-
- {numText}
- {/* {ReturnStageReturned.value == value?.stage && ¥{formatPriceDiv(value?.refund_amount, 100, true)}} */}
-
-
- {value?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'}
- 订单号:{value?.order_no}
-
- }
- {(list?.length <= 0 && value?.is_quality_check) && goLink('/pages/salesAfter/index', {id: value?.id})}>
-
- 没有质检通过的商品,无法退款
- }
-
-
-
- )
-})
-
diff --git a/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.module.scss b/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.module.scss
deleted file mode 100644
index 47de83d..0000000
--- a/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.module.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-.order_status_list{
- font-size: $font_size;
- color: #9E9E9E;
- margin-top: 20px;
- .order_status_item{
- padding: 20px;
- box-sizing: border-box;
- }
- .selected{
- font-weight: 700;
- color: #000;
- border-bottom: 4px solid #707070;
- }
- .order_list_scroll{
- white-space: nowrap;
- display: flex;
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.tsx b/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.tsx
deleted file mode 100644
index 3e12f6f..0000000
--- a/src/pages/salesAfter/salesAfterList/components/orderStatusList/index.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { ScrollView, View } from "@tarojs/components"
-import { memo, useEffect, useState } from "react"
-import styles from './index.module.scss'
-import classnames from "classnames";
-
-type Param = {
- list: {id: number, name: string}[],
- defaultId?: number|null,
- onSelect?: (val: number) => void
-}
-export default memo(({list = [], defaultId = null, onSelect}: Param) => {
- const [selectInfo, setSelectInfo] = useState({
- selected: -1, //当前选中的id
- tabId: '', //需要滚动到的id
- })
- useEffect(() => {
- if(defaultId) {
- const index = list?.findIndex(item => {
- console.log(item.id, defaultId)
- return item.id == defaultId
- })
- if(index !== -1) {
- const num = index > 0?( index - 1) : 0
- setSelectInfo((e) => ({...e, tabId:list[num].id.toString()}))
- }
- }
- }, [defaultId])
- const clickEvent = ({item, index}: {item:any, index:number}) => {
- const num = index > 0?( index - 1) : 0
- setSelectInfo((e) => ({...e, tabId:list[num].id.toString(), selected: item.id}))
- onSelect?.(item.id)
- }
-
- return (
-
-
-
- {list.map((item, index) => {
- return clickEvent({item, index})} className={classnames(styles.order_status_item, (selectInfo.selected==item.id)&&styles.selected)}>{item.name}
- })}
-
-
-
- )
-})
-
diff --git a/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.module.scss b/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.module.scss
deleted file mode 100644
index df84721..0000000
--- a/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.module.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-.tag{
- font-size: $font_size_min;
- padding: 5px 15px;
- background-color: $color_main;
- color: #fff;
- border-radius: 0px 20px 0px 20px;
- display: flex;
- align-items: center;
- .miconfont{
- font-size: 30px;
- }
-
-}
-.saleReturn_tag{
- background-color: #E4E4FF;
- color: #1818B4;
-}
-.refund_tag {
- background-color: #FFE6CE;
- color: #EE7500;
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.tsx b/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.tsx
deleted file mode 100644
index 968fe99..0000000
--- a/src/pages/salesAfter/salesAfterList/components/orderStatusTag/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Text, View } from "@tarojs/components"
-import { memo } from "react"
-import classnames from "classnames";
-import styles from './index.module.scss'
-import { REFUND_STATUS_ORDER } from "@/common/enum";
-
-
-type Param = {
- status?: number
-}
-export default memo(({status = 0}:Param) => {
- const {
- ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款
- ReturnApplyOrderTypeReturnForRefund, // 退货退款
- ReturnApplyOrderTypeSalesRefund // 销售退款
- } = REFUND_STATUS_ORDER
- return (
- <>
- {(status !== 0)&&
-
- { status == ReturnApplyOrderTypeReturnForRefund.value?'退货':'退款'}
- }
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.module.scss b/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.module.scss
deleted file mode 100644
index 1a22287..0000000
--- a/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.module.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-
-.logistics_main{
- padding: 20px 30px;
- box-sizing: border-box;
- .logistics_image{
- display: flex;
- .title_desc{
- font-size: 28px;
- font-weight: 700;
- padding-top: 50px;
- box-sizing: border-box;
- }
- .upload_image{
- flex:1;
- }
- }
- .logistics_desc{
- margin-top: 50px;
- }
- .btns_two{
- display: flex;
- height: 82px;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-top: 50px;
- .verify_btn{
- flex:1;
- border-radius: 40px;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
-}
diff --git a/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.tsx b/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.tsx
deleted file mode 100644
index 3d6b19f..0000000
--- a/src/pages/salesAfter/salesAfterList/components/returnLogistics/index.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import Popup from "@/components/popup";
-import { Text, View } from "@tarojs/components";
-import { memo, useCallback, useEffect, useRef, useState } from "react";
-import UploadImage from "@/components/uploadImage"
-import styles from './index.module.scss'
-import TextareaEnhance from "@/components/textareaEnhance";
-import { ReturnApplyLogisticsApi } from "@/api/salesAfterOrder";
-import { alert } from "@/common/common";
-
-type Param = {
- show?: true|false,
- onClose?: () => void,
- onSubmit?: () => void,
- id?: number //订单id
-}
-export default memo(({show = false, onClose, onSubmit, id = 0}: Param) => {
- //需要提交的数据
- const submitData = useRef({
- accessory_url: [],
- remark: '',
- id: 0
- })
- useEffect(() => {
- if(id) submitData.current.id = id
- }, [id])
-
- //获取图片列表
- const getImageList = useCallback((list) => {
- submitData.current.accessory_url = list
- }, [])
-
- //备注
- const getOtherReason = useCallback((val) => {
- submitData.current.remark = val
- }, [])
-
- //确定
- const {fetchData} = ReturnApplyLogisticsApi()
- const onSubmitEven = async () => {
- if(!id) return alert.error('参数有误')
- if(submitData.current.accessory_url.length <= 0) return alert.error('请上传附件')
- let res = await fetchData(submitData.current)
- if(res.success) {
- alert.success('上传成功')
- } else {
- alert.error('上传失败')
- }
- }
-
- return (
- <>
-
-
-
- 上传附件:
-
-
-
-
-
-
-
-
- onSubmitEven()}>保存
-
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/index.config.ts b/src/pages/salesAfter/salesAfterList/index.config.ts
deleted file mode 100644
index d4c9fc3..0000000
--- a/src/pages/salesAfter/salesAfterList/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '退货/售后',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/salesAfter/salesAfterList/index.module.scss b/src/pages/salesAfter/salesAfterList/index.module.scss
deleted file mode 100644
index e8f528a..0000000
--- a/src/pages/salesAfter/salesAfterList/index.module.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-.order_list_main{
- height: 100vh;
- background-color: $color_bg_one;
- display: flex;
- flex-direction: column;
- .title{
- padding: 0 20px;
- background-color: #fff;
- box-shadow: 0px 0px 4px 0px rgba(0,0,0,0.16);
- border-bottom: 2px solid #e2e2e2;
- height: 160px;
- .order_status_list{
- font-size: $font_size;
- color: #9E9E9E;
- margin-top: 20px;
- .order_status_item{
- padding: 20px;
- box-sizing: border-box;
- }
- .selected{
- font-weight: 700;
- color: #000;
- border-bottom: 4px solid #707070;
- }
- .order_list_scroll{
- white-space: nowrap;
- display: flex;
- }
- }
- }
- .order_list{
- height: calc(100vh - 160px);
- .order_item_con{
- margin-top: 20px;
- padding: 0 20px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/salesAfter/salesAfterList/index.tsx b/src/pages/salesAfter/salesAfterList/index.tsx
deleted file mode 100644
index 5797e62..0000000
--- a/src/pages/salesAfter/salesAfterList/index.tsx
+++ /dev/null
@@ -1,160 +0,0 @@
-import Search from '@/components/search'
-import useLogin from '@/use/useLogin'
-import { View } from '@tarojs/components'
-import Taro, { useDidShow } from '@tarojs/taro'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import styles from './index.module.scss'
-import classnames from 'classnames'
-import Order from './components/order'
-import InfiniteScroll from '@/components/infiniteScroll'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import OrderStatusList from './components/orderStatusList'
-import { GetSaleOrderListApi, RefundOrderSatausApi } from '@/api/salesAfterOrder'
-import ApplyRecord from '../components/applyRecord'
-import ReturnLogistics from '../components/returnLogistics'
-
-export default () => {
- useLogin()
-
- //搜索参数
- const [searchField, setSearchField] = useState<{ status: number | null; page: number; size: number; name: string }>({
- status: null,
- page: 1,
- size: 10,
- name: '',
- })
-
- //获取订单状态
- const [statusList, setStatusList] = useState([{ id: -1, name: '全部' }])
- const { fetchData: fetchDataStatus } = RefundOrderSatausApi()
- const getOrderStatusList = async () => {
- let res = await fetchDataStatus()
- setStatusList((e) => [...e, ...res.data.list])
- }
- useEffect(() => {
- getOrderStatusList()
- setSearchField((e) => ({ ...e, status: -1 }))
- }, [])
-
- //获取订单列表
- const { fetchData: listFetchData, state: orderState } = GetSaleOrderListApi()
- const [orderData, setOrderData] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- const getOrderList = async () => {
- let res = await listFetchData(getFilterData(searchField))
- setOrderData({ list: res.data.list, total: res.data.total })
- setRefresherTriggeredStatus(() => false)
- }
-
- useDidShow(() => {
- if (searchField.status != null) getOrderList()
- })
-
- //监听筛选条件变化
- useEffect(() => {
- if (searchField.status != null) getOrderList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = useCallback(() => {
- if (orderData.list.length < orderData.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField((e) => ({ ...e, size }))
- }
- }, [orderData])
-
- //状态改变
- const changeStatus = useCallback((e) => {
- pageNum.current.page = 1
- setSearchField((value) => ({ ...value, status: e, size: 10 }))
- setOrderData(() => ({ list: [], total: 0 }))
- }, [])
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: orderData.list, total: orderData.total, status: orderState.loading })
- }, [orderData, orderState])
-
- //输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setOrderData(() => ({ list: [], total: 0 }))
- setSearchField((val) => ({ ...val, name: e, size: 10 }))
- }, [])
-
- //列表下拉刷新
- const [refresherTriggeredStatus, setRefresherTriggeredStatus] = useState(false)
- const getRefresherRefresh = async () => {
- pageNum.current.size = 1
- setRefresherTriggeredStatus(true)
- setSearchField((val) => ({ ...val, size: 10 }))
- }
-
- //监听点击的按钮
- const [callBackOrderInfo, setCallBackPayOrderInfo] = useState()
- const clickOrderBtn = useCallback(
- ({ status, orderInfo }) => {
- if (status == 1 || status == 6) {
- getOrderList()
- } else if (status == 8) {
- setApplyRecord(true)
- } else if (status == 5) {
- onShowLogistics(() => true)
- }
- setCallBackPayOrderInfo(orderInfo)
- },
- [orderData],
- )
-
- //显示记录
- const [applyRecord, setApplyRecord] = useState(false)
-
- //物流显示
- const [logisticsShow, setLogisticsShow] = useState(false)
- const onShowLogistics = useCallback((val) => {
- setLogisticsShow(true)
- }, [])
- const onCloseLogistics = useCallback(() => {
- setLogisticsShow(false)
- }, [])
- //物流成功上传
- const logisticsSuccess = useCallback(() => {
- setLogisticsShow(false)
- getOrderList()
- }, [orderData])
-
- return (
-
-
-
-
-
-
-
- {orderData?.list.map((item) => {
- return (
-
-
-
- )
- })}
-
-
- setApplyRecord(false)} />
-
-
- )
-}
diff --git a/src/pages/sampleComparison/compoents/bluetooth/LinkBlueTooth.tsx b/src/pages/sampleComparison/compoents/bluetooth/LinkBlueTooth.tsx
deleted file mode 100644
index 4be6b33..0000000
--- a/src/pages/sampleComparison/compoents/bluetooth/LinkBlueTooth.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { View } from "@tarojs/components";
-import { memo, useEffect, useMemo, useState } from "react";
-import Taro from "@tarojs/taro";
-import { useBluetooth } from "@/use/contextBlueTooth"
-import SearchInput from "@/components/searchInput";
-import Popup from "./Popup"
-import classnames from "classnames";
-import styles from "../../css/linkBlueTooth.module.scss"
-
-export default memo(() => {
- const { state, init, startScan, connect, disconnect } = useBluetooth()
-
- useEffect(() => {
- init()
- }, [])
-
- const [linkStatus, setLinkStatus] = useState(1)
- useEffect(() => {
- if (!state.available) {
- setLinkStatus(1)
- } else if (state.available && state.connected?.name) {
- setLinkStatus(3)
- } else {
- setLinkStatus(2)
- }
- }, [state.available, state.connected])
-
- const linkName = useMemo(() => {
- return state.connected?.localName || ''
- }, [state.connected])
-
- //链接设备
- const onLinkListen = (item) => {
- if (!state.connected && !state.connecting)
- connect(item)
- }
-
- const [popupShow, setPopupShow] = useState(false)
- //显示设备列表
- const onFindDevice = () => {
- if (linkStatus == 1) {
- Taro.showToast({
- title: '请打开蓝牙',
- icon: 'none'
- })
- } else {
- setPopupShow(true)
- onFindEven()
- }
-
- }
- const onFindEven = () => {
- if (!state.discovering && !state.connected && !state.connecting)
- startScan()
- }
-
- //断开链接
- const onDisconnect = () => {
- disconnect()
- setPopupShow(false)
- }
-
- return (
- <>
-
-
-
-
- {
- linkStatus == 1 && 请开启蓝牙 ||
- linkStatus == 2 && 未连接设备 ||
- linkStatus == 3 && {linkName}
- }
-
-
- setPopupShow(false)}
- onLink={item => onLinkListen(item)}
- onOff={onDisconnect}
- onFind={onFindEven}
- />
-
- >
-
- );
-
-})
diff --git a/src/pages/sampleComparison/compoents/bluetooth/Popup.tsx b/src/pages/sampleComparison/compoents/bluetooth/Popup.tsx
deleted file mode 100644
index d8a9464..0000000
--- a/src/pages/sampleComparison/compoents/bluetooth/Popup.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { ScrollView, View } from "@tarojs/components"
-import { memo, useEffect, useState } from "react"
-import Loading from "@/components/loading"
-import style from "../../css/popup.module.scss"
-
-interface params {
- state: any,
- show: Boolean,
- onClose: (Boolean) => void,
- onLink: (any) => void,
- children?: React.ReactNode
- onOff: () => void,
- onFind: () => void,
-}
-
-export default memo(({state, show=false, onClose, onLink, onOff, onFind}:params) => {
- const [popupShow, setPopupShow] = useState(show)
- useEffect(() => {
- setPopupShow(show)
- }, [show])
- const onCloseListener = () => {
- onClose(false)
- }
-
- return (
- <>
- {
- popupShow&&
-
- 搜索设备
-
-
- {
- (state.devices&&state.devices.length > 0)&&state?.devices.map(item => {
- return (
- onLink(item)}>
- {item.name}
- {
- (!state.connecting&&!state.connected)&&链接||
- (state.connecting&&item.deviceId == state.connecting.deviceId)&&正在链接...||
- (state.connected&&item.deviceId == state.connected.deviceId)&&链接成功
- }
-
- )
- })||
-
- {
- (!state.discovering)&& <>
- 暂无设备,请按以下条件检查
- 1.请确保取色仪处于激活状态
- 2.请确保取色仪没有链接其他设备
- 3.请打开手机定位
- >||
- 设备搜索中
- }
-
-
-
- }
-
-
- {
- state.connected&&断开链接||
- (!state.connected&&state.discovering)&&搜索中||
- 重新搜索
- }
-
-
-
- }
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/sampleComparison/css/linkBlueTooth.module.scss b/src/pages/sampleComparison/css/linkBlueTooth.module.scss
deleted file mode 100644
index 0714b46..0000000
--- a/src/pages/sampleComparison/css/linkBlueTooth.module.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-.main {
- width: 690px;
- height: 86px;
- background: #ffffff;
- border-radius: 10px;
- margin-top: 24px;
- margin-left: 30px;
-
- .bluetooth_link {
- display: flex;
- align-items: center;
-
- .link_status {
- width: 12px;
- height: 12px;
- background: #f02409;
- border-radius: 50%;
- }
-
- .link_statused {
- background: #07C160;
- }
-
- .link_statused_no {
- background: #f0ec09;
- }
-
- .link_name {
- font-size: $font_size;
- margin-left: 20px;
-
- }
-
- .link_name_no {
- color: #f02409;
- }
-
- .link_name_no_link {
- color: #f0ec09;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/sampleComparison/css/popup.module.scss b/src/pages/sampleComparison/css/popup.module.scss
deleted file mode 100644
index d6c273f..0000000
--- a/src/pages/sampleComparison/css/popup.module.scss
+++ /dev/null
@@ -1,90 +0,0 @@
-.popup{
- width: 100vw;
- height: 100vh;
- position: absolute;
- top: 0;
- left: 0;
- .mask{
- width: 100%;
- height: 100%;
- background-color: rgba(0,0,0,0.5);
- position: fixed;
- top:0;
- left:0;
- z-index: 9;
- }
- .content{
- z-index: 99;
- background-color: #fff;
- width: 75vw;
- height: 600px;
- position: fixed;
- top: 50%;
- left: 50%;
- border-radius: 20px;
- transform: translateX(-50%) translateY(-50%);
- display: flex;
- flex-direction: column;
- font-size: 28px;
- .title{
- text-align: center;
- margin: 20px;
- }
- .list{
- height: 480px;
- padding: 0 20px;
- .scroll{
- height: 100%;
- }
- .item{
- margin-bottom: 20px;
- display: flex;
- justify-content: space-between;
- border-bottom: 1px dashed #ccc;
- padding: 15px 0;
- color: #3b3b3b;
- @mixin link{
- font-size: 25px;
- }
- .link_success{
- @include link;
- color: green;
- }
- .link_ing {
- color: orange;
- }
- }
- .noDevice{
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #a8a8a8;
- .n_item{
- width: 100%;
- text-align: left;
- margin-top: 20px;
- padding: 0 30px;
- box-sizing: border-box;
- }
- }
-
- }
- .footer{
- text-align: center;
- padding: 20px 0;
- background-color: #f1f1f1;
- border-radius: 0 0 10px 10px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .finding{
- color: orange;
- }
- .footer_off{
- color: red;
- }
- }
-}
diff --git a/src/pages/sampleComparison/index.config.ts b/src/pages/sampleComparison/index.config.ts
deleted file mode 100644
index cfc4a8a..0000000
--- a/src/pages/sampleComparison/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '样品对比',
- enableShareAppMessage: false,
-}
diff --git a/src/pages/sampleComparison/index.module.scss b/src/pages/sampleComparison/index.module.scss
deleted file mode 100644
index e46e9fe..0000000
--- a/src/pages/sampleComparison/index.module.scss
+++ /dev/null
@@ -1,253 +0,0 @@
-page {
- background: #f3f3f3;
- overflow: hidden;
-}
-
-.body {
- overflow: hidden;
-
- .topBox {
- margin-top: 24px;
- margin-left: 30px;
- width: 690px;
- height: 86px;
- background: #ffffff;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .leftBox {
- display: flex;
- align-items: center;
- padding-left: 19px;
-
- .leftFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: left;
- color: #707070;
- margin-right: 14px;
- }
-
- .borderBox {
- width: 0px;
- height: 62px;
- border: 2px solid #f3f3f3;
- margin-right: 39px;
- }
-
- .cricleBox {
- width: 12px;
- height: 12px;
- background: #cccccc;
- border-radius: 50%;
- margin-right: 12px;
- }
-
- .notNet {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #aaaaaa;
- }
- }
-
- .iconMore {
- margin-right: 30px;
- font-size: 30px;
- }
- }
-
- .contBox {
- margin-top: 53px;
- display: flex;
- padding-left: 56px;
-
- .firstBox {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .firstLeftName {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- }
-
- .firstLeftbox {
- width: 290px;
- height: 290px;
- background: #dddddd;
- margin-top: 13px;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- border-radius: 50%;
-
- .clickFont {
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
-
- }
-
- }
-
- .color_bock {
- width: 290px;
- height: 290px;
- border-radius: 50%;
- }
-
- .color_bocktwo {
- width: 290px;
- height: 290px;
- border-radius: 50%;
- }
-
- .nameColor {
- font-size: 24px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-top: 30px;
- }
- }
- }
-
- .reslutBox {
- width: 692px;
- height: 180px;
- background: #ffffff;
- margin-top: 30px;
- margin-left: 29px;
- border-radius: 20px;
- overflow: hidden;
- }
-
- .reslutTitle {
- overflow: hidden;
- width: 100%;
- margin-top: 41px;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .titleLeft {
- margin-left: 48px;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- color: #707070;
- }
-
- .titleRiht {
- margin-right: 37px;
- width: 136px;
- height: 46px;
- background: #ffd9d9;
- border-radius: 10px;
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #ff4a4a;
- line-height: 46px;
- }
-
- .titleRiht1 {
- background: #cdf3df;
- margin-right: 37px;
- width: 136px;
- height: 46px;
- border-radius: 10px;
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- line-height: 46px;
- color: #07C160;
- }
- }
-
- .notResult {
- width: 100%;
- text-align: center;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #ababab;
- margin-top: 14px;
- }
-
- .notBox {
- margin-top: 32px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- overflow: hidden;
-
- .notLeft {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-left: 40px;
- }
-
- .notright {
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #707070;
- margin-right: 37px;
- }
- }
-
- .bottomBox {
- position: fixed;
- bottom: 0;
- width: 750px;
- height: 182px;
- background: #f3f3f3;
- box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.16);
- overflow: hidden;
- display: flex;
-
- .leftBtn {
- width: 264px;
- height: 82px;
- background: #ffffff;
- border-radius: 42px;
- font-size: 32px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #007aff;
- line-height: 82px;
- margin-top: 34px;
- margin-left: 67px;
- }
-
- .rightBtn {
- width: 264px;
- height: 82px;
- background: #007aff;
- border-radius: 42px;
- font-size: 32px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #ffffff;
- line-height: 82px;
- margin-top: 34px;
- margin-left: 88px;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/sampleComparison/index.tsx b/src/pages/sampleComparison/index.tsx
deleted file mode 100644
index f91c0bd..0000000
--- a/src/pages/sampleComparison/index.tsx
+++ /dev/null
@@ -1,212 +0,0 @@
-
-import { Image, Text, Textarea, View } from "@tarojs/components"
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
-import { useBluetooth } from "../../use/contextBlueTooth"
-import classnames from "classnames";
-import LinkBlueTooth from "./compoents/bluetooth/LinkBlueTooth";
-import { toRgb } from '../../common/bluetooth/color/colorSpace'
-import styles from './index.module.scss'
-import { productabsorbcontrast } from "@/api/mine"
-export default () => {
- //搜索参数
- const [searchField, setSearchField] = useState({
- l1: '',
- a1: '',
- b1: '',
- l2: '',
- a2: '',
- b2: '',
- })
- type ColorList = {
- one?: any,
- two?: any
- }
- const [colorList, setColorList] = useState({
- one: null,
- two: null
- })
- const { state: colorState, measureAndGetLab } = useBluetooth()
-
- const getLab = async (val) => {
- if (colorState.connected) {
- let res = await measureAndGetLab()
- if (val === 1) {
- setColorList({ ...colorList, one: res })
- } else {
- setColorList({ ...colorList, two: res })
- }
- } else {
- Taro.showToast({
- title: '请链接设备',
- icon: 'none'
- })
- }
- }
- const getNowTime = () => {
- const yy = new Date().getFullYear()
- const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1)
- const dd = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
- const HH = new Date().getHours() < 10 ? '0' + new Date().getHours() : new Date().getHours()
- const mm = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes() : new Date().getMinutes()
- const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
- return yy + '-' + MM + '-' + dd + ' ' + HH + ':' + mm + ':' + ss
- }
- //监听lab数据变化
- const [blueToothColor, setBlueToothColor] = useState('')
- const [blueToothColorTwo, setBlueToothColorTwo] = useState('')
- const [time, setTime] = useState('')
- const [timeTwo, setTimeTwo] = useState('')
- useEffect(() => {
- if (colorState.deviceLab) {
-
- if ((colorList as any).one?.constructor === Object) {
- const rgb = toRgb([(colorList as any).one?.L, (colorList as any).one?.a, (colorList as any).one?.b])
- setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
- setTime(getNowTime())
- setSearchField({ ...searchField, l1: rgb[0], a1: rgb[1], b1: rgb[2] })
- }
- if ((colorList as any).two?.constructor === Object) {
-
- const rgb = toRgb([(colorList as any).two?.L, (colorList as any).two?.a, (colorList as any).two?.b])
- setBlueToothColorTwo(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
- setTimeTwo(getNowTime())
- setSearchField({ ...searchField, l2: rgb[0], a2: rgb[1], b2: rgb[2] })
-
- }
- }
- }, [colorList])
- const reset = () => {
- setColorList({})
- setBlueToothColor('')
- setBlueToothColorTwo('')
- setTime('')
- setTimeTwo('')
- setData('')
- setResult('')
- }
- const [data, setData] = useState('')
- const [result, setResult] = useState('')
- const { fetchData } = productabsorbcontrast()
- const handTake = async () => {
- if (searchField.l1 === '') {
- Taro.showToast({
- title: '请填充基础样品',
- icon: 'none'
- })
- return
- }
- if (searchField.l2 === '') {
- Taro.showToast({
- title: '请填充对比样品',
- icon: 'none'
- })
- return
- }
- const query = {
- ...searchField
- }
- const res = await fetchData(query)
- if (res.data) {
- setData(res.data)
- let diffarray = [
- res.data.reddish && "偏红",
- res.data.yellowish && "偏黄",
- res.data.greenish && "偏绿",
- res.data.bluish && "偏蓝",
- res.data.whitish && "偏亮",
- res.data.darker && "偏暗",
- ];
- let resCont = diffarray.filter(item => item).join(",");
- setResult(resCont)
- }
- }
- return (
-
- {/*
-
- 蓝牙设备
-
-
-
-
-
- */}
-
-
-
- 基础样品
- {
- blueToothColor === '' &&
- getLab(1)}>
- 点击取色
-
- }
- {blueToothColor && getLab(1)} style={{ background: blueToothColor }}>
-
- }
- {
- time === '' && --
- }
- {
- time && {time}
- }
-
-
- 对比样品
- {
- blueToothColorTwo === '' &&
- getLab(2)}>
- 点击取色
-
- }
- {blueToothColorTwo && getLab(2)} style={{ background: blueToothColorTwo }}>
-
- }
- {
- timeTwo === '' && --
- }
- {
- timeTwo && {timeTwo}
- }
-
-
-
-
- 测量结果
- {
- (data as any).ciede_2000 >= 1 &&
- 不合格
- }
- {
- (data as any).ciede_2000 <= 1 &&
- 合格
- }
-
-
- {
- data === '' &&
- 暂无数据
- }
- {
- data &&
-
- 色差值: {(data as any).ciede_2000}
- {
- !(data as any).reddish && !(data as any).yellowish && !(data as any).greenish && !(data as any).bluish && !(data as any).whitish && !(data as any).darker &&
- 无明显色差
- }
- {
- result &&
- {result}
- }
-
- }
-
-
- reset()}>重置
- handTake()}>提交
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/search/index.config.ts b/src/pages/search/index.config.ts
deleted file mode 100644
index eac2247..0000000
--- a/src/pages/search/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '搜索',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/search/index.module.scss b/src/pages/search/index.module.scss
deleted file mode 100644
index 2e4ede6..0000000
--- a/src/pages/search/index.module.scss
+++ /dev/null
@@ -1,72 +0,0 @@
-.main{
- .search{
- display: flex;
- justify-content: space-between;
- padding: 20px;
- padding-bottom: 50px;
- }
-
- .hot {
- padding: 0 20px;
- .hot_header {
- width:100%;
- display: flex;
- justify-content: space-between;
- font-size: $font_size_medium;
- .hot_header_title {
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- }
- .hot_header_up{
- color: $color_main;
- }
- }
- .list{
- display: flex;
- font-size: $font_size_medium;
- flex-wrap: wrap;
- padding: 20px 0;
- .item{
- margin-right: 20px;
- margin-bottom: 20px;
- padding: 10px 20px;
- background-color: #F0F0F0;
- color: $color_font_three;
- border-radius: 50px;
- }
- }
- }
- .history {
- padding: 0 20px;
- .history_header {
- width:100%;
- display: flex;
- justify-content: space-between;
- font-size: $font_size_medium;
- .history_header_title {
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- }
- .miconfont{
- font-size: 30px;
- color: $color_font_three;
- }
- }
- .list{
- display: flex;
- font-size: $font_size_medium;
- flex-wrap: wrap;
- padding: 20px 0;
- .item{
- margin-right: 20px;
- margin-bottom: 20px;
- padding: 10px 20px;
- background-color: #F0F0F0;
- color: $color_font_three;
- border-radius: 50px;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/search/index.tsx b/src/pages/search/index.tsx
deleted file mode 100644
index dbdc018..0000000
--- a/src/pages/search/index.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-
-import { View } from '@tarojs/components'
-import Search from '@/components/search'
-import { goLink } from '@/common/common';
-import classnames from "classnames";
-import styles from './index.module.scss'
-import { useEffect } from 'react';
-import useLogin from '@/use/useLogin';
-
-export default () => {
- useLogin()
- return (
-
-
- console.log(e)} placeholder="请输入面料关键词" placeIcon="out" showBtn={true} />
-
-
-
- 热门面料
- 高级搜索
-
-
- 9265
- 全棉双卫衣
- 全棉双卫衣
- 全棉双卫衣
- 全棉双卫衣
- 26s
-
-
-
-
- 历史搜索
-
-
-
- 9265
- 全棉双卫衣
- 全棉双卫衣
- 全棉双卫衣
- 全棉双卫衣
- 26s
-
-
-
- )
-}
diff --git a/src/pages/searchList/components/selectData/index.module.scss b/src/pages/searchList/components/selectData/index.module.scss
deleted file mode 100644
index f7f3ea5..0000000
--- a/src/pages/searchList/components/selectData/index.module.scss
+++ /dev/null
@@ -1,51 +0,0 @@
-.tabs_main{
- display: flex;
- width: 100%;
- .tabs_scroll{
- width: 100%;
- // display: flex;
- white-space: nowrap;
- ::-webkit-scrollbar {
- display:none;
- width:0;
- height:0;
- color:transparent;
- }
- .tabs_item{
- min-width: 130px;
- padding: 0 10px;
- display: inline-block;
- font-size: 24px;
- background-color: #ecf5ff;
- border-radius: 24rpx;
- height: 46.93rpx;
- text-align: center;
- line-height: 46.93rpx;
- color: #707070;
- margin-right: 20px;
- border: 2px solid #cde5ff;
- .tabs_item_con{
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: $font_size_medium;
- @include common_ellipsis();
- }
- .tabs_index{
- height: 5px;
- width: 100%;
- background-color:$color_main;
- position:absolute;
- bottom: 0;
- left:0;
- border-radius: 50px;
- }
- .tabs_item_select{
- color: $color_main;
- }
- }
-
-
- }
-}
\ No newline at end of file
diff --git a/src/pages/searchList/components/selectData/index.tsx b/src/pages/searchList/components/selectData/index.tsx
deleted file mode 100644
index e82b2d2..0000000
--- a/src/pages/searchList/components/selectData/index.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { ScrollView, View } from "@tarojs/components";
-import { memo, useState, ReactNode, useEffect } from "react";
-import classnames from "classnames";
-import styles from './index.module.scss'
-
-
-export type ListProps = {
- title: string,
- value: number
-}
-
-type Params = {
- list?: ListProps[],
- defaultValue?: number|string,
- children?: ReactNode,
- tabsOnClick?: (ListProps) => void,
-
-}
-
-export default memo(({list = [], defaultValue = 0, tabsOnClick}: Params) => {
-
- const [tabId, setTabId] = useState('')
-
- useEffect(() => {
- const index = list?.findIndex(item => {
- return item.value == defaultValue
- })
- if(index !== -1) {
- const num = index > 0?( index - 1) : 0
- setTabId(list[num].value.toString())
- }
- }, [])
-
- const clickEvent = ({item, index}: {item:ListProps, index:number}) => {
- tabsOnClick?.(item)
- setTabId(index.toString())
- }
- return (
- <>
-
-
-
- {
- list.map((item, index) => {
- return (
- clickEvent({item,index})}>
- {`${item.title}: ${item.value}`}
-
- )
- })
- }
-
-
-
- >
- )
-})
\ No newline at end of file
diff --git a/src/pages/searchList/hightSearchList.config.ts b/src/pages/searchList/hightSearchList.config.ts
deleted file mode 100644
index 34c8c61..0000000
--- a/src/pages/searchList/hightSearchList.config.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export default {
- navigationBarTitleText: '搜索',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark'
-}
diff --git a/src/pages/searchList/hightSearchList.module.scss b/src/pages/searchList/hightSearchList.module.scss
deleted file mode 100644
index da2d667..0000000
--- a/src/pages/searchList/hightSearchList.module.scss
+++ /dev/null
@@ -1,214 +0,0 @@
-.main {
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: $color_bg_one;
- .search {
- padding: 20px;
- .SearchInput {
- background-color: #fff;
- padding: 10px 20px;
- box-sizing: border-box;
- border-radius: 10px;
- }
-
- .bluetooth_color {
- .color_bock {
- width: 100px;
- height: 46px;
- }
- .color_bock_no {
- font-size: $font_size_medium;
- color: $color_font_three;
- }
- }
- }
- .filter {
- .filter_all {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20px 130px;
- font-size: $font_size_medium;
- color: $color_font_three;
- .text_zh,
- .text_sc {
- color: $color_main;
- display: flex;
- align-items: center;
- .sortIcon {
- display: flex;
- flex-direction: column;
- position: relative;
- .icon_one {
- font-size: $font_size_medium;
- position: absolute;
- margin: auto;
- top: 0;
- }
- }
- }
- .text_ss {
- position: relative;
- .miconfont {
- font-size: 20px;
- margin-left: 5px;
- }
- &::before {
- content: '';
- width: 2px;
- height: 32px;
- background-color: #c2c2c2;
- position: absolute;
- top: 0;
- left: -30px;
- }
- }
- }
- .filter_btn_con {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 86px;
- }
- .filter_scroll {
- flex: 1;
- width: 0;
- padding-left: 20px;
- ::-webkit-scrollbar {
- display: none;
- width: 0;
- height: 0;
- color: transparent;
- }
- }
- .filter_btn {
- display: flex;
- justify-content: space-between;
- padding: 20px;
- margin-right: 20px;
- flex: 1;
- view {
- font-size: $font_size_medium;
- background-color: #f0f0f0;
- border-radius: 24px;
- min-width: 126px;
- height: 46.93px;
- text-align: center;
- line-height: 46.93px;
- color: $color_font_three;
- &:nth-last-child(n + 2) {
- margin-right: 10px;
- }
- &:nth-last-child(1) {
- margin-right: 30px;
- }
- }
- .selected {
- background-color: #ecf5ff;
- border: 2px solid #cde5ff;
- color: $color_main;
- width: 122px;
- height: 42.93px;
- }
- }
- .filter_more {
- font-size: $font_size_medium;
- color: $color_font_three;
- padding: 0 30px 0 20px;
- position: relative;
- height: 100%;
- line-height: 86px;
- &::before {
- content: '';
- opacity: 1;
- width: 30px;
- height: 100%;
- position: absolute;
- left: -15px;
- background-image: linear-gradient(to right, rgba(248, 248, 248, 0.3), rgba(248, 248, 248, 1) 60%);
- // z-index: 99;
- }
- .miconfont {
- font-size: 27px;
- }
- }
- }
- .list {
- height: calc(100vh - 440px);
- .list_num {
- font-size: $font_size_min;
- color: $color_font_two;
- padding: 10px 38px;
- border-bottom: 1px solid rgb(233, 233, 233);
- }
-
- .scroll {
- height: 100%;
- padding-top: 3px;
- }
- .product_list {
- padding: 38px;
- display: grid;
- grid-template-columns: 321px 321px;
- justify-content: space-between;
- .product_item {
- width: 321px;
- background-color: #fff;
- border-radius: 20px;
- margin-bottom: 20px;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
- .product_img {
- width: 100%;
- height: 224px;
- border-radius: 20px 20px 0px 0px;
- position: relative;
- image {
- width: 100%;
- height: 100%;
- border-radius: 20px 20px 0px 0px;
- }
- .color_num {
- background: rgba(0, 0, 0, 0.5);
- border-radius: 0px 50px 0px 30px;
- font-size: $font_size_min;
- color: #fff;
- position: absolute;
- left: 0;
- bottom: 0;
- padding: 5px 20px;
- box-sizing: border-box;
- }
- }
- }
- .product_info {
- padding: 20px;
- .title {
- font-size: $font_size;
- color: $color_font_three;
- @include common_ellipsis();
- }
- .tag_list {
- display: flex;
- margin-top: 16px;
- .tag {
- padding: 3px 10px;
- background-color: #cde5ff;
- font-size: $font_size_min;
- border-radius: 5px;
- color: $color_main;
- &:nth-child(2) {
- margin-left: 10px;
- }
- }
- }
- .introduce {
- font-size: $font_size_medium;
- color: $color_font_two;
- margin-top: 16px;
- @include common_ellipsis();
- }
- }
- }
- }
-}
diff --git a/src/pages/searchList/hightSearchList.tsx b/src/pages/searchList/hightSearchList.tsx
deleted file mode 100644
index 0ba64ce..0000000
--- a/src/pages/searchList/hightSearchList.tsx
+++ /dev/null
@@ -1,221 +0,0 @@
-import { Image, ScrollView, Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import Filter from '@/components/filter'
-import InfiniteScroll from '@/components/infiniteScroll'
-import SortBtn from '@/components/sortBtn'
-import SearchInput from '@/components/searchInput'
-import LinkBlueTooth from '@/components/bluetooth/LinkBlueTooth'
-import { useBluetooth } from '@/use/contextBlueTooth'
-import { toRgb } from '@/common/bluetooth/color/colorSpace'
-import styles from './hightSearchList.module.scss'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import Taro, { useDidShow, usePullDownRefresh, useReady } from '@tarojs/taro'
-import { GetLabProductApi } from '@/api/material'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import { formatHashTag, formatImgUrl } from '@/common/fotmat'
-import useLogin from '@/use/useLogin'
-import { goLink } from '@/common/common'
-import SelectData, { ListProps } from './components/selectData'
-import LabAndImg from '@/components/LabAndImg'
-
-export default () => {
- useLogin()
-
- const firstOpen = useRef(true)
- const [showFilter, setShowFilter] = useState(false)
- //搜索参数
- const [searchField, setSearchField] = useState({
- l: '',
- a: '',
- b: '',
- page: 1,
- size: 10,
- width: '',
- weight_density: '',
- product_kind_id: '',
- component: '',
- abstract_sort_key: '',
- })
-
- //获取面料列表
- const [materialList, setMaterialList] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- const { fetchData: materialFetchData, state: materialState } = GetLabProductApi()
- const getProductList = async () => {
- let { data } = await materialFetchData(getFilterData(searchField))
- setMaterialList({ list: data.list, total: data.total })
- Taro.stopPullDownRefresh()
- firstOpen.current = false
- }
-
- //监听筛选条件变化
- useEffect(() => {
- getProductList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = () => {
- if (materialList.list.length < materialList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({ ...searchField, size })
- }
- }
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: materialList.list, total: materialList.total, status: materialState.loading })
- }, [materialList, materialState])
-
- const { state: colorState, measureAndGetLab } = useBluetooth()
- const getLab = () => {
- if (colorState.connected) {
- measureAndGetLab()
- } else {
- Taro.showToast({
- title: '请链接设备',
- icon: 'none',
- })
- }
- }
-
- //监听lab数据变化
- const [blueToothColor, setBlueToothColor] = useState('')
- useEffect(() => {
- if (colorState.deviceLab && !firstOpen.current) {
- const rgb = toRgb([colorState.deviceLab.L, colorState.deviceLab.a, colorState.deviceLab.b])
- setBlueToothColor(`rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`)
- setSearchField({ ...searchField, l: rgb[0], a: rgb[1], b: rgb[2], size: 10, page: 1 })
- setMaterialList(() => ({ list: [], total: 0 }))
- pageNum.current = { size: 10, page: 1 }
- }
- }, [colorState.deviceLab])
-
- const goLinkPage = (item) => {
- goLink('/pages/details/index', { id: item.product_id })
- }
-
- //获取筛选条件
- const getFiltr = (e) => {
- pageNum.current.page = 1
- setMaterialList(() => ({ list: [], total: 0 }))
- const { data } = e
- setSearchField({
- ...searchField,
- width: data?.width,
- weight_density: data?.weight,
- size: 10,
- component: data?.element,
- product_kind_id: data?.seriesId,
- })
- formatSelectList(e)
- }
-
- //筛选条件格式化
- const [selectList, setSelectList] = useState()
- const formatSelectList = (val = { data: {}, field: {} }) => {
- let data: ListProps[] = []
- for (let key in val.data) {
- if (key !== 'seriesId' && val.data[key] != '') {
- data.push({ title: val.field[key], value: val.data[key] })
- }
- }
- setSelectList([...data])
- }
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- setSearchField({ ...searchField, size: 10 })
- })
-
- //排序
- type sortParam = 'none' | 'top' | 'bottom'
- const sortComprehensiveRef = useRef(null)
- const sortCollectionRef = useRef(null)
- const [sortStatus, setSortStatus] = useState<{ comprehensive: sortParam; collection: sortParam }>({
- comprehensive: 'none',
- collection: 'none',
- })
- const changeSort = (val) => {
- setMaterialList(() => ({ list: [], total: 0 }))
- if (val == 1) {
- const { status, value } = sortComprehensiveRef.current.changeSort()
- setSortStatus((e) => ({ ...e, comprehensive: status, collection: 'none' }))
- setSearchField((e) => ({ ...e, abstract_sort_key: value, size: 10, page: 1 }))
- } else {
- const { status, value } = sortCollectionRef.current.changeSort()
- setSortStatus((e) => ({ ...e, collection: status, comprehensive: 'none' }))
- setSearchField((e) => ({ ...e, abstract_sort_key: value, size: 10, page: 1 }))
- }
- pageNum.current = { size: 10, page: 1 }
- }
-
- const labAndImgObj = useCallback(
- (item) => {
- const img = item ? item.texture_url.split(',')[0] : ''
- return { lab: item.lab, rgb: item.rgb, texture_url: img }
- },
- [materialList],
- )
- return (
-
-
-
-
-
- getLab()}>
- {(blueToothColor && ) || (
- 请取色
- )}
-
-
-
-
-
-
- changeSort(1)}>
- 综合
-
-
- changeSort(2)}>
- 收藏
-
-
-
-
-
-
-
- setShowFilter(true)}>
- 筛选
-
-
-
-
-
- 搜索结果 ({materialList.total}条记录)
-
-
-
- {materialList.list.map((item) => {
- return (
- goLinkPage(item)}>
-
-
- {item.product_color_code}
-
-
- {formatHashTag(item.product_code, item.product_name)}
- {item.product_kind_name}
-
-
- )
- })}
-
-
-
-
- getFiltr(e)} onClose={() => setShowFilter(false)} />
-
- )
-}
diff --git a/src/pages/searchList/search.config.ts b/src/pages/searchList/search.config.ts
deleted file mode 100644
index eac2247..0000000
--- a/src/pages/searchList/search.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '搜索',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/searchList/search.module.scss b/src/pages/searchList/search.module.scss
deleted file mode 100644
index b539403..0000000
--- a/src/pages/searchList/search.module.scss
+++ /dev/null
@@ -1,78 +0,0 @@
-.main{
- position: relative;
- .search{
- display: flex;
- justify-content: space-between;
- padding: 20px;
- padding-bottom: 50px;
- }
- .up_search{
- color: $color_main;
- font-size: $font_size;
- position: absolute;
- right: 20px;
- }
- .hot {
- padding: 0 20px;
- .hot_header {
- width:100%;
- display: flex;
- justify-content: space-between;
- font-size: $font_size_medium;
- .hot_header_title {
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- }
-
- }
-
- .list{
- display: flex;
- font-size: $font_size_medium;
- flex-wrap: wrap;
- padding: 20px 0;
- .item{
- margin-right: 20px;
- margin-bottom: 20px;
- padding: 10px 20px;
- background-color: #F0F0F0;
- color: $color_font_three;
- border-radius: 50px;
- }
- }
- }
- .history {
- padding: 0 20px;
- .history_header {
- width:100%;
- display: flex;
- // justify-content: space-between;
- font-size: $font_size_medium;
- .history_header_title {
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- }
- .miconfont{
- font-size: 40px;
- color: $color_font_three;
- margin-left: 20px;
- }
- }
- .list{
- display: flex;
- font-size: $font_size_medium;
- flex-wrap: wrap;
- padding: 20px 0;
- .item{
- margin-right: 20px;
- margin-bottom: 20px;
- padding: 10px 20px;
- background-color: #F0F0F0;
- color: $color_font_three;
- border-radius: 50px;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/searchList/search.tsx b/src/pages/searchList/search.tsx
deleted file mode 100644
index a37cbbc..0000000
--- a/src/pages/searchList/search.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import Search from '@/components/search'
-import { alert, goLink } from '@/common/common'
-import classnames from 'classnames'
-import styles from './search.module.scss'
-import { useEffect, useRef, useState } from 'react'
-import { GetHotSearchApi, GetSearchHistoryApi, AddSearchHistoryApi } from '@/api/search'
-import { SCENE } from '@/common/constant'
-import useLogin from '@/use/useLogin'
-import Taro, { useDidShow, useShareAppMessage } from '@tarojs/taro'
-
-type searchDataParam = { search_key: '' }
-export default () => {
- useLogin()
-
- const [searchData, setSearchData] = useState<{ hotField: searchDataParam[]; historyField: searchDataParam[] }>({
- hotField: [],
- historyField: [],
- })
-
- //获取热门搜索数据
- const { fetchData: hotFetchData } = GetHotSearchApi()
- const getHotSearch = async () => {
- let { data } = await hotFetchData({ page: 1, size: 10 })
- setSearchData((val) => ({ ...val, hotField: data.list }))
- }
-
- //获取历史搜索数据
- const { fetchData: HistoryFetchData } = GetSearchHistoryApi()
- const getSearchHistory = async () => {
- let { data } = await HistoryFetchData({ page: 1, size: 10 })
- setSearchData((val) => ({ ...val, historyField: data.list }))
- }
-
- useDidShow(() => {
- getHotSearch()
- getSearchHistory()
- })
-
- //添加搜索关键字
- const addSearchField = useRef({ key: '', screen: SCENE.SearchScene })
- const { fetchData: addFetchData } = AddSearchHistoryApi()
- const addSearchHistory = async () => {
- await addFetchData(addSearchField.current)
- // goLink('/pages/searchList/searchList', {key: addSearchField.current.key})
- }
-
- //搜索事件, status = true 添加搜索, status = false 直接跳转
- const searchEvent = (e, status = true) => {
- if (e == '') {
- alert.error('请输入关键词')
- return false
- }
- addSearchField.current.key = e
- status && addSearchHistory()
- Taro.navigateTo({
- url: `/pages/searchList/searchList?key=${addSearchField.current.key}`,
- })
- }
-
- return (
-
-
- searchEvent(e)} />
-
- goLink('/pages/searchList/hightSearchList')}>
- 高级搜索
-
- {searchData?.hotField.length > 0 && (
-
-
- 热门面料
-
-
- {searchData.hotField.map((item) => {
- return (
- searchEvent(item.search_key, false)}>
- {item.search_key}
-
- )
- })}
-
-
- )}
- {searchData?.historyField.length > 0 && (
-
-
- 历史搜索
- {/* */}
-
-
- {searchData?.historyField?.map((item) => (
- searchEvent(item.search_key, false)}>
- {item.search_key}
-
- ))}
-
-
- )}
-
- )
-}
diff --git a/src/pages/searchList/searchList.config.ts b/src/pages/searchList/searchList.config.ts
deleted file mode 100644
index 34c8c61..0000000
--- a/src/pages/searchList/searchList.config.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export default {
- navigationBarTitleText: '搜索',
- enablePullDownRefresh: true,
- backgroundTextStyle: 'dark'
-}
diff --git a/src/pages/searchList/searchList.module.scss b/src/pages/searchList/searchList.module.scss
deleted file mode 100644
index 1a82944..0000000
--- a/src/pages/searchList/searchList.module.scss
+++ /dev/null
@@ -1,198 +0,0 @@
-.main {
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: #f8f8f8;
- .search {
- padding: 20px;
- }
- .filter {
- .filter_all {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20px 50px;
- font-size: $font_size_medium;
- color: $color_font_three;
- .text_zh,
- .text_sc {
- color: $color_main;
- display: flex;
- align-items: center;
- .sortIcon {
- display: flex;
- flex-direction: column;
- position: relative;
- .icon_one {
- font-size: $font_size_medium;
- position: absolute;
- margin: auto;
- top: 0;
- }
- }
- }
- .text_ss {
- position: relative;
- .miconfont {
- font-size: 30px;
- margin-left: 5px;
- }
- &::before {
- content: '';
- width: 2px;
- height: 32px;
- background-color: #c2c2c2;
- position: absolute;
- top: 0;
- left: -30px;
- }
- }
- }
- .filter_btn_con {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 86px;
- }
- .filter_scroll {
- flex: 1;
- width: 0;
- padding-left: 20px;
- ::-webkit-scrollbar {
- display: none;
- width: 0;
- height: 0;
- color: transparent;
- }
- }
- .filter_btn {
- display: flex;
- justify-content: space-between;
- padding: 20px;
- margin-right: 20px;
- flex: 1;
- view {
- font-size: $font_size_medium;
- background-color: #f0f0f0;
- border-radius: 24px;
- min-width: 126px;
- height: 46.93px;
- text-align: center;
- line-height: 46.93px;
- color: $color_font_three;
- &:nth-last-child(n + 2) {
- margin-right: 10px;
- }
- &:nth-last-child(1) {
- margin-right: 30px;
- }
- }
- .selected {
- background-color: #ecf5ff;
- border: 2px solid #cde5ff;
- color: $color_main;
- width: 122px;
- height: 42.93px;
- }
- }
- .filter_more {
- font-size: $font_size_medium;
- color: $color_font_three;
- padding: 0 30px 0 20px;
- position: relative;
- height: 100%;
- line-height: 86px;
- &::before {
- content: '';
- opacity: 1;
- width: 30px;
- height: 100%;
- position: absolute;
- left: -15px;
- background-image: linear-gradient(to right, rgba(248, 248, 248, 0.3), rgba(248, 248, 248, 1) 60%);
- // z-index: 99;
- }
- .miconfont {
- font-size: 27px;
- }
- }
- }
- .list {
- height: calc(100vh - 330px);
- .list_num {
- font-size: $font_size_min;
- color: $color_font_two;
- padding: 10px 38px;
- border-bottom: 1px solid #e9e9e9;
- }
-
- .scroll {
- height: 100%;
- padding-top: 3px;
- }
- .product_list {
- padding: 38px;
- display: grid;
- grid-template-columns: 321px 321px;
- justify-content: space-between;
- .product_item {
- width: 321px;
- background-color: #fff;
- border-radius: 20px;
- margin-bottom: 20px;
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
- .product_img {
- width: 100%;
- height: 224px;
- border-radius: 20px 20px 0px 0px;
- position: relative;
- image {
- width: 100%;
- height: 100%;
- border-radius: 20px;
- }
- .color_num {
- background: rgba(0, 0, 0, 0.5);
- border-radius: 50px 0px 0px 0px;
- font-size: $font_size_min;
- color: #fff;
- position: absolute;
- right: 0;
- bottom: 0;
- padding: 5px 20px;
- box-sizing: border-box;
- }
- }
- }
- .product_info {
- padding: 20px;
- .title {
- font-size: $font_size;
- color: $color_font_three;
- @include common_ellipsis();
- }
- .tag_list {
- display: flex;
- margin-top: 16px;
- .tag {
- padding: 3px 10px;
- background-color: #cde5ff;
- font-size: $font_size_min;
- border-radius: 5px;
- color: $color_main;
- @include common_ellipsis();
- &:nth-child(2) {
- margin-left: 10px;
- }
- }
- }
- .introduce {
- font-size: $font_size_medium;
- color: $color_font_two;
- margin-top: 16px;
- @include common_ellipsis();
- }
- }
- }
- }
-}
diff --git a/src/pages/searchList/searchList.tsx b/src/pages/searchList/searchList.tsx
deleted file mode 100644
index d9c39f6..0000000
--- a/src/pages/searchList/searchList.tsx
+++ /dev/null
@@ -1,199 +0,0 @@
-import { Image, ScrollView, Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import Search from '@/components/search'
-import Filter from '@/components/filter'
-import InfiniteScroll from '@/components/infiniteScroll'
-import SortBtn from '@/components/sortBtn'
-import SelectData, { ListProps } from './components/selectData'
-import { goLink } from '@/common/common'
-import styles from './searchList.module.scss'
-import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
-import { GetProductListApi } from '@/api/material'
-import Taro, { useDidShow, usePullDownRefresh, useRouter } from '@tarojs/taro'
-import { formatHashTag, formatImgUrl } from '@/common/fotmat'
-import { dataLoadingStatus, getFilterData } from '@/common/util'
-import useLogin from '@/use/useLogin'
-import LabAndImg from '@/components/LabAndImg'
-
-export default () => {
- useLogin()
-
- const [showFilter, setShowFilter] = useState(false)
- const router = useRouter()
-
- //搜索参数
- const [searchField, setSearchField] = useState({
- code_or_name: router.params.key,
- page: 1,
- size: 10,
- width: '',
- weight_density: '',
- product_kind_id: '',
- component: '',
- abstract_sort_key: '',
- })
-
- //获取面料列表
- const [materialList, setMaterialList] = useState<{ list: any[]; total: number }>({ list: [], total: 0 })
- const { fetchData: materialFetchData, state: materialState } = GetProductListApi()
- const getProductList = async () => {
- let { data } = await materialFetchData(getFilterData(searchField))
- setMaterialList({ list: data.list, total: data.total })
- Taro.stopPullDownRefresh()
- }
-
- //监听筛选条件变化
- useEffect(() => {
- getProductList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({ size: searchField.size, page: searchField.page })
- const getScrolltolower = () => {
- if (materialList.list.length < materialList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({ ...searchField, size })
- }
- }
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({ list: materialList.list, total: materialList.total, status: materialState.loading })
- }, [materialList, materialState])
-
- //输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setMaterialList(() => ({ list: [], total: 0 }))
- setSearchField((val) => ({ ...val, code_or_name: e, size: 10 }))
- pageNum.current = { size: 10, page: 1 }
- }, [])
-
- const goLinkPage = (item) => {
- goLink('/pages/details/index', { id: item.id })
- }
-
- //页面下拉刷新
- usePullDownRefresh(() => {
- setSearchField({ ...searchField, size: 10 })
- })
-
- //获取筛选条件
- const getFiltr = (e) => {
- pageNum.current.page = 1
- setMaterialList(() => ({ list: [], total: 0 }))
- const { data } = e
- setSearchField({
- ...searchField,
- width: data?.width,
- weight_density: data?.weight,
- size: 10,
- component: data?.element,
- product_kind_id: data?.seriesId,
- })
- formatSelectList(e)
- }
-
- //筛选条件格式化
- const [selectList, setSelectList] = useState()
- const formatSelectList = (val = { data: {}, field: {} }) => {
- let data: ListProps[] = []
- for (let key in val.data) {
- if (key !== 'seriesId' && val.data[key] != '') {
- data.push({ title: val.field[key], value: val.data[key] })
- }
- }
- setSelectList([...data])
- }
-
- //排序
- type sortParam = 'none' | 'top' | 'bottom'
- const sortComprehensiveRef = useRef(null)
- const sortCollectionRef = useRef(null)
- const [sortStatus, setSortStatus] = useState<{ comprehensive: sortParam; collection: sortParam }>({
- comprehensive: 'none',
- collection: 'none',
- })
- const changeSort = (val) => {
- if (val == 1) {
- const { status, value } = sortComprehensiveRef.current.changeSort()
- setSortStatus((e) => ({ ...e, comprehensive: status, collection: 'none' }))
- setSearchField((e) => ({ ...e, abstract_sort_key: value, size: 10, page: 1 }))
- } else {
- const { status, value } = sortCollectionRef.current.changeSort()
- setSortStatus((e) => ({ ...e, collection: status, comprehensive: 'none' }))
- setSearchField((e) => ({ ...e, abstract_sort_key: value, size: 10, page: 1 }))
- }
- pageNum.current = { size: 10, page: 1 }
- }
-
- const labAndImgObj = useCallback(
- (item) => {
- const img = item ? item.texture_url.split(',')[0] : ''
- return { lab: item.lab, rgb: item.rgb, texture_url: img }
- },
- [materialList],
- )
- return (
-
-
-
-
-
-
- changeSort(1)}>
- 综合
-
-
- changeSort(2)}>
- 收藏
-
-
- goLink('/pages/searchList/hightSearchList')}>
- 高级搜索
-
-
-
-
-
-
-
-
- setShowFilter(true)}>
- 筛选
-
-
-
-
-
- 搜索结果 ({materialList.total}条记录)
-
-
-
- {materialList.list.map((item) => {
- return (
- goLinkPage(item)}>
-
-
- {item.product_color_count}色
-
-
- {formatHashTag(item.code, item.name)}
-
- {item.width}
- {item.weight_density}
-
- {item.component}
-
-
- )
- })}
-
-
-
-
- setShowFilter(false)} onFiltr={(e) => getFiltr(e)} />
-
- )
-}
diff --git a/src/pages/subjectList/components/filter/index.module.scss b/src/pages/subjectList/components/filter/index.module.scss
deleted file mode 100644
index 599cdd0..0000000
--- a/src/pages/subjectList/components/filter/index.module.scss
+++ /dev/null
@@ -1,126 +0,0 @@
-.popup_main{
- width: 608px;
- height: 100vh;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .popup_title{
- font-size: $font_size;
- font-weight: 700;
- text-align: center;
- padding: 20px 0;
- }
- .scroll{
- flex:1;
- height: 0;
- }
- .popup_filter{
- padding-bottom: 100px;
- }
- .popup_filter_item{
- margin-bottom: 20px;
- .title{
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- padding: 20px 0;
- }
- .btn_list{
- display: grid;
- grid-template-columns: repeat(3, 165.75px);
- justify-content: space-between;
- .btn_item{
- width: 165.75px;
- height: 69.2px;
- background: #f0f0f0;
- border-radius: 34px;
- text-align: center;
- line-height: 69.2px;
- font-size: $font_size_medium;
- color: $color_font_one;
- margin-bottom: 20px;
- }
- .select_btn_item{
- color: $color_main;
- background: #ecf5ff;
- border: 2px solid #007aff;
- width: 161.75px;
- height: 65.2px;
- }
- }
- .btn_list_input{
- display: flex;
- // justify-content: space-between;
- align-items: center;
- .btn_width {
- width: 220px;
- height: 70px;
- background: #f0f0f0;
- border-radius: 50px;
- padding: 10px 20px;
- box-sizing: border-box;
- input{
- width: 100%;
- height: 100%;
- font-size: $font_size_medium;
- }
- }
- .unit{
- color: $color_font_one;
- font-size: $font_size;
- margin-left: 20px;
- }
- text{
- color: #ccc;
- padding: 0 20px;
- }
- .width_main{
-
- }
- }
- .btn_list_element{
- background-color: #F0F0F0;
- border-radius: 30px;
- padding: 20px;
- box-sizing: border-box;
- textarea{
- width: 100%;
- height: 126px;
- font-size: $font_size_medium;
- }
- }
- }
- .btns_con{
- width: 100%;
- position: fixed;
- bottom:0;
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- .btns_two{
- display: flex;
- width: 552px;
- height: 82px;
- border: 2px solid #cde5ff;
- font-size: $font_size_big;
- border-radius: 40px;
- margin-bottom: 20px;
- .rest_btn{
- flex:1;
- border-radius: 0px 40px 40px 0px;
- text-align: center;
- line-height: 82px;
- color: $color_main;
-
- }
- .verify_btn{
- flex:1;
- border-radius: 0px 40px 40px 0px;
- background: #007aff;
- text-align: center;
- line-height: 82px;
- color: #fff;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/subjectList/components/filter/index.tsx b/src/pages/subjectList/components/filter/index.tsx
deleted file mode 100644
index d64ab87..0000000
--- a/src/pages/subjectList/components/filter/index.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import Popup, {Params as PopuParams} from "@/components/popup"
-import { Input, ScrollView, Text, Textarea, View } from "@tarojs/components"
-import classnames from "classnames";
-import { useEffect, useState } from "react";
-import styles from './index.module.scss'
-
-type params = {
- onFiltr?: (val:object) => void
-} & PopuParams
-export default ({onClose, onFiltr, show = false}:params) => {
- const [filterObj, setFilterObj] = useState({
- series: '',
- minWidth: '',
- maxWidth: '',
- minWeight: '',
- maxWeight: '',
- element: ''
-
- })
- const onCloseEven = () => {
- onClose?.()
- }
- const onRest = () => {
- console.log('12123')
- setFilterObj({
- series: '',
- minWidth: '',
- maxWidth: '',
- minWeight: '',
- maxWeight: '',
- element: ''
- })
- }
- useEffect(() => {
- console.log(filterObj)
- }, [filterObj])
-
- const onVerify = () => {
- console.log(filterObj)
- onFiltr?.(filterObj)
- }
-
- const setNumber = (e, field) => {
- console.log(e)
- let num = parseFloat(e.detail.value)
- if(isNaN(num)) {
- filterObj[field] = null
- } else {
- filterObj[field] = parseFloat(num.toFixed(2))
- }
- setFilterObj({...filterObj})
- }
-
- const setElement = (e) => {
- let res = e.detail.value
- setFilterObj({...filterObj, element:res})
- }
- return (
-
- onCloseEven()} showIconButton={true}>
-
- 全部筛选
-
-
-
-
- 系列
-
- 不限
- 不限
- 不限
- 不限
- 不限
- 不限
-
-
-
- 幅宽
-
- setNumber(e,'minWidth')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx"/>
- —
- setNumber(e,'maxWidth')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx"/>
- cm
-
-
-
- 克重
-
- setNumber(e,'minWeight')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx"/>
- —
- setNumber(e,'maxWeight')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx"/>
- g
-
-
-
- 成分
-
-
-
-
-
-
-
-
-
- onRest()}>重置
- onVerify()}>确认
-
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/subjectList/index.config.ts b/src/pages/subjectList/index.config.ts
deleted file mode 100644
index 98df741..0000000
--- a/src/pages/subjectList/index.config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- navigationBarTitleText: '专题页面'
-}
diff --git a/src/pages/subjectList/index.module.scss b/src/pages/subjectList/index.module.scss
deleted file mode 100644
index 7b62533..0000000
--- a/src/pages/subjectList/index.module.scss
+++ /dev/null
@@ -1,150 +0,0 @@
-.main{
- display: flex;
- flex-direction: column;
- height: 100vh;
- background-color: $color_bg_one;
- .search{
- padding: 20px;
- }
- .filter{
- .filter_all {
- display: flex;
- justify-content: space-between;
- padding: 20px 50px;
- font-size: $font_size_medium;
- color: $color_font_three;
- .text_one{
- color: $color_main;
- display: flex;
- align-items: center;
- }
- .text_two{
- position: relative;
- .miconfont{
- font-size: 20px;
- margin-left: 10px;
- }
- &::before{
- content: '';
- width: 2px;
- height: 32px;
- background-color: #C2C2C2;
- position: absolute;
- top: 0;
- left: -50px;
- }
- }
- }
- .filter_btns{
- display: flex;
- justify-content: space-between;
- padding: 20px;
-
- .selected{
- background-color: #ecf5ff;
- border: 2px solid #cde5ff;
- color: $color_main;
- width: 122px;
- height: 42.93px;
- }
- }
- }
- .list{
- flex:1;
- height: 0;
- }
- .popup_main{
- width: 608px;
- height: 100vh;
- padding: 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- .popup_title{
- font-size: $font_size;
- font-weight: 700;
- text-align: center;
- padding: 20px 0;
- }
- .scroll{
- flex:1;
- height: 0;
- }
- .popup_filter{
-
- }
- .popup_filter_item{
- margin-bottom: 20px;
- .title{
- font-size: $font_size;
- color: $color_font_one;
- font-weight: 700;
- padding: 20px 0;
- }
- .btn_list{
- display: grid;
- grid-template-columns: repeat(3, 165.75px);
- justify-content: space-between;
- .btn_item{
- width: 165.75px;
- height: 69.2px;
- background: #f0f0f0;
- border-radius: 34px;
- text-align: center;
- line-height: 69.2px;
- font-size: $font_size_medium;
- color: $color_font_one;
- margin-bottom: 20px;
- }
- .select_btn_item{
- color: $color_main;
- background: #ecf5ff;
- border: 2px solid #007aff;
- width: 161.75px;
- height: 65.2px;
- }
- }
- .btn_list_input{
- display: flex;
- // justify-content: space-between;
- align-items: center;
- .btn_width {
- width: 220px;
- height: 70px;
- background: #f0f0f0;
- border-radius: 50px;
- padding: 10px 20px;
- box-sizing: border-box;
- input{
- width: 100%;
- height: 100%;
- font-size: $font_size_medium;
- }
- }
- .unit{
- color: $color_font_one;
- font-size: $font_size;
- margin-left: 20px;
- }
- text{
- color: #ccc;
- padding: 0 20px;
- }
- .width_main{
-
- }
- }
- .btn_list_element{
- background-color: #F0F0F0;
- border-radius: 30px;
- padding: 20px;
- box-sizing: border-box;
- textarea{
- width: 100%;
- height: 126px;
- font-size: $font_size_medium;
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/subjectList/index.tsx b/src/pages/subjectList/index.tsx
deleted file mode 100644
index 5752c7a..0000000
--- a/src/pages/subjectList/index.tsx
+++ /dev/null
@@ -1,135 +0,0 @@
-import { Input, ScrollView, Text, Textarea, View } from "@tarojs/components"
-import classnames from "classnames";
-import Search from '@/components/search'
-import Product from '@/components/product'
-import InfiniteScroll from '@/components/infiniteScroll'
-import styles from './index.module.scss'
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
-import Filter from "@/components/filter";
-import SortBtn from "@/components/sortBtn";
-import SelectData, {ListProps} from "../searchList/components/selectData";
-import {GetProductListApi} from '@/api/material'
-import { useRouter } from "@tarojs/taro";
-import { dataLoadingStatus, getFilterData } from "@/common/util";
-import LoadingCard from "@/components/loadingCard";
-import Taro from '@tarojs/taro'
-
-export default () => {
- const [showPopup, setShowPopup] = useState(false)
-
- const router = useRouter()
-
- useEffect(() => {
- Taro.setNavigationBarTitle({
- title: router.params.title||'专题页面'
- })
- }, [router])
-
- //搜索参数
- const [searchField, setSearchField] = useState({
- code_or_name: '',
- product_subject_id: router.params.id,
- page : 1,
- size : 10,
- width: '',
- weight_density: '',
- product_kind_id: '',
- component: ''
- })
-
- //获取专题
- const [subjectList, setSubjectList] = useState<{list:any[], total:number}>({
- list:[],
- total:0
- })
- const {fetchData, state} = GetProductListApi()
- const getSubjectList = async () => {
- let res = await fetchData(getFilterData(searchField))
- setSubjectList({...subjectList, list:res.data.list, total: res.data.total})
- }
-
- //监听筛选数据变化
- useEffect(() => {
- getSubjectList()
- }, [searchField])
-
- //上拉加载数据
- const pageNum = useRef({size: searchField.size, page: searchField.page})
- const getScrolltolower = () => {
- if(subjectList.list.length < subjectList.total) {
- pageNum.current.page++
- const size = pageNum.current.size * pageNum.current.page
- setSearchField({...searchField, size })
- }
- }
-
- //数据加载状态
- const statusMore = useMemo(() => {
- return dataLoadingStatus({list:subjectList.list, total: subjectList.total, status: state.loading})
- }, [subjectList])
-
- //获取筛选条件
- const getFiltr = (e) => {
- pageNum.current.page = 1
- const {data} = e
- setSearchField({
- ...searchField,
- width: data?.width,
- weight_density: data?.weight,
- size: 10,
- component: data?.element,
- product_kind_id: data?.seriesId
- })
- formatSelectList(e)
- }
-
- //筛选条件格式化
- const [selectList , setSelectList] = useState()
- const formatSelectList = (val = {data:{}, field:{}}) => {
- let data:ListProps[] = []
- for(let key in val.data) {
- if(key !== 'seriesId'&& val.data[key] != '') {
- data.push({title:val.field[key], value:val.data[key]})
- }
- }
- setSelectList([...data])
- }
-
- //输入了搜索关键字
- const getSearchData = useCallback((e) => {
- pageNum.current.page = 1
- setSubjectList(() => ({list:[], total:0}))
- setSearchField((val) => ({...val, code_or_name:e, size:10}))
- }, [])
-
-
-
- return (
-
-
-
-
-
-
-
- 综合
-
-
- setShowPopup(true)}>
- 筛选
-
-
-
-
-
-
-
-
- getScrolltolower()} statusMore={statusMore}>
-
-
-
- setShowPopup(false)} onFiltr={getFiltr}/>
-
- )
-}
\ No newline at end of file
diff --git a/src/pages/user/index.config.ts b/src/pages/user/index.config.ts
index 96b0f9a..a4e5a9b 100644
--- a/src/pages/user/index.config.ts
+++ b/src/pages/user/index.config.ts
@@ -1,5 +1,3 @@
export default {
- navigationBarTitleText: '我的',
- navigationStyle: 'custom',
- enableShareAppMessage: true,
+ navigationBarTitleText: '我的',
}
diff --git a/src/pages/user/index.module.scss b/src/pages/user/index.module.scss
deleted file mode 100644
index ffe17de..0000000
--- a/src/pages/user/index.module.scss
+++ /dev/null
@@ -1,565 +0,0 @@
-.main {
- background-color: #f8f8f8;
- min-height: 100vh;
- display: flex;
- flex-direction: column;
- position: relative;
-
- .header {
- background: #68b4ff;
- background-size: cover;
- height: 560px;
- position: relative;
-
- .card-main {
- margin-top: 10px;
- }
- }
-
- .auth-suspension {
- position: fixed;
- left: 0;
- top: 0;
- z-index: 1;
- width: 100vw;
- height: 100vh;
- inset: 0;
- }
-
- .header-card {
- position: absolute;
- left: 50%;
- bottom: -18%;
- transform: translateX(-50%);
- }
-
- .crad {
- width: 702px;
- background: rgba(255, 255, 255, 0.95);
- border-radius: 20px;
- padding: 30px;
- box-sizing: border-box;
- box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.05);
- }
-
- .card-info {
- display: flex;
- justify-content: space-between;
- position: absolute;
- top: -15%;
- left: 0;
- right: 0;
- width: 702px;
- padding: 0 30px;
- box-sizing: border-box;
- }
-
- .arcd-info-left {
- display: flex;
- align-items: flex-end;
- }
-
- .arcd-info-left-portrait {
- width: 170px;
- height: 170px;
- background: rgba(0, 0, 0, 0);
- border: 4px solid #ffffff;
- border-radius: 50%;
- overflow: hidden;
- }
-
- .arcd-info-left-portrait image {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-
- .arcd-info-left-desc {
- margin-left: 24px;
- }
-
- .arcd-info-left-nickname {
- font-size: 44px;
- font-weight: 700;
- color: #000000;
- display: flex;
- align-items: center;
- }
-
- .arcd-info-left-phone {
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- }
-
- .arcd-info-left-phone button {
- padding: 0 10px;
- height: 42px;
- background: #ffffff;
- border: 2px solid #cde5ff;
- border-radius: 20px;
- font-size: 22px;
- font-weight: 400;
- color: #007aff;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .card-info-right {
- font-size: 26px;
- display: flex;
- align-items: flex-end;
- }
-
- .setup-icon {
- position: relative;
- padding-bottom: 10px;
- }
-
- .icon-wrapper {
- font-size: 60px;
- }
-
- .icon-point {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: #ff0000;
- position: absolute;
- right: 0;
- top: 0;
- }
-
- .card-main {
- margin: 20px auto 0;
- }
-
- .card-main-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 2px solid #dddddd;
- padding: 0 5px 15px;
- box-sizing: border-box;
- .card_main_title_order {
- flex: 1;
- font-size: 28px;
- font-weight: 700;
- }
- .order_more {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- font-size: 25px;
- color: #707070;
- text {
- width: auto;
- }
- }
- }
-
- .card-main-title text {
- font-size: 22px;
- font-weight: 400;
- color: #ababab;
- display: inline-block;
- text-align: right;
- width: 150px;
- }
-
- .card-main-title-content {
- display: grid;
- grid-template-columns: repeat(5, 1fr);
- }
-
- .card-main-title-content-item {
- font-size: 24px;
- font-weight: 400;
- color: #3c3c3c;
- text-align: center;
- margin-top: 30px;
- position: relative;
- }
-
- .card-main-title-content-item Text {
- font-size: 56px;
- color: #3c3c3c;
- }
-
- .card-main-title-content-item-badge {
- padding: 0 10px;
- height: 32px;
- background: #007aff;
- border: 2px solid #ffffff;
- border-radius: 32px;
- box-sizing: border-box;
- overflow: hidden;
- font-size: 18px;
- font-weight: 700;
- color: #ffffff;
- display: flex;
- align-items: center;
- justify-content: center;
- position: absolute;
- top: -10px;
- right: 0;
- }
-
- .assets-title {
- font-size: 28px;
- font-weight: 700;
- color: #3c3c3c;
- margin-bottom: 20px;
- }
-
- .assets-content {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- }
-
- .assets-content > view,
- .assets-content > navigator {
- text-align: center;
- }
-
- .assets-content-item-top {
- color: #007aff;
- font-weight: 400;
- }
-
- .assets-content-item-top-before {
- font-size: 20px;
- }
-
- .assets-content-item-top-content {
- font-size: 36px;
- }
-
- .assets-content-item-top-after {
- font-size: 20px;
- }
-
- .assets-content-item-tips {
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- }
-
- .main-card {
- margin: 131px auto 0;
- }
-
- .card-feature {
- margin-bottom: 50px;
- }
-
- .card-main-list-content-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 90px;
- position: relative;
- }
-
- .card-main-list-content-item-left {
- font-size: 26px;
- font-weight: 400;
- text-align: left;
- color: #707070;
- display: flex;
- align-items: center;
- min-width: 260px;
- }
- .card-main-list-content-item .label {
- width: 100%;
- text-align: right;
- padding-right: 10px;
- font-size: 26px;
- }
- .card-main-list-content-item-left text {
- margin-right: 35px;
- font-size: 56px;
- color: #707070;
- }
-
- .card-main-list-content-item-right text {
- font-size: 30px;
- }
- .card-main-list-content-item .customer {
- position: absolute;
- opacity: 0;
- width: 100%;
- height: 100%;
- }
-
- .auth {
- margin-top: 115px;
- }
-
- .auth-top {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .auth-status {
- padding: 0 10px;
- height: 30px;
- background: #dddddd;
- border-radius: 10px 4px 0px 0px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 18px;
- font-weight: 400;
- color: #707070;
- }
-
- .auth-status,
- .auth-status-ongoing {
- color: #ee7500;
- background-color: #ffe6ce;
- }
-
- .auth-status,
- .auth-status-adopt {
- color: #007aff;
- background-color: #cde5ff;
- }
-
- .auth-tips {
- font-size: 18px;
- font-weight: 400;
- color: #007aff;
- text-align: right;
- }
-
- .auth-tips,
- .auth-tips-adopt {
- color: #ababab;
- }
-
- .auth-tips text {
- font-size: 17px;
- }
-
- .auth-company {
- height: 70px;
- width: 100%;
- background: #f6f6f6;
- border: 2px solid #f0f0f0;
- border-radius: 0px 10px 10px 10px;
- font-size: 26px;
- font-weight: 700;
- color: #707070;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .auth-company,
- .auth-company-adopt {
- background: #ecf5ff;
- border: 2px solid #cde5ff;
- }
-
- .tips-modal {
- background: rgba(0, 0, 0, 0.6);
- position: fixed;
- inset: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 2;
- }
-
- .tips-modal-content {
- width: 598px;
- background: #ffffff;
- border-radius: 10px;
- animation: enlargeK 0.2s linear;
- overflow: hidden;
- }
-
- @keyframes enlargeK {
- 0% {
- transform: scale(0);
- }
-
- 100% {
- transform: scale(1);
- }
- }
-
- .tips-modal-title {
- font-size: 32px;
- font-weight: 700;
- text-align: center;
- color: #000000;
- margin-bottom: 58px;
- padding-top: 48px;
- }
-
- .tips-modal-letter {
- font-size: 26px;
- font-weight: 400;
- color: #707070;
- padding: 0 30px;
- line-height: 50px;
- }
-
- .tips-modal-letter-text {
- text-indent: 60px;
- }
-
- .tips-modal-letter-beginn {
- font-size: 28px;
- font-weight: 400;
- color: #000000;
- margin-bottom: 25px;
- }
-
- .tips-modal-letter-end {
- font-size: 26px;
- font-weight: 400;
- text-align: right;
- margin-top: 61px;
- }
-
- .tips-modal-button {
- display: flex;
- border-top: 1px solid #dddddd;
- margin-top: 45px;
- }
-
- .tips-modal-button button,
- .tips-modal-button view {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 50%;
- height: 90px;
- background-color: white;
- }
-
- .tips-modal-button button {
- font-size: 26px;
- font-weight: 400;
- color: #707070;
- border-radius: 0;
- border-right: 1px solid #dddddd;
- }
-
- .tips-modal-button button::after {
- border: 0;
- border-radius: 0;
- }
-
- .tips-modal-button view {
- font-size: 26px;
- font-weight: 400;
- color: #007aff;
- }
-
- .auth-box {
- width: 614px;
- height: 70px;
- background: #f6f6f6;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-left: 18px;
- padding-right: 16px;
-
- .auth-left-box {
- display: flex;
- align-items: center;
-
- .auth-tag {
- width: 86px;
- height: 34px;
- background: #dddddd;
- border-radius: 10px;
- font-size: 22px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #707070;
- text-align: center;
- line-height: 34px;
- margin-right: 28px;
- }
-
- .auth-tagone {
- width: 86px;
- height: 34px;
- background: #ffe6ce;
- border-radius: 10px;
- font-size: 22px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- text-align: center;
- color: #707070;
- text-align: center;
- line-height: 34px;
- margin-right: 28px;
- }
-
- .auth-tagtwo {
- display: flex;
- align-items: center;
- overflow: hidden;
- padding-left: 10px;
- width: 100px;
- height: 32px;
- background: #cde5ff;
- border-radius: 10px;
-
- .iconFont-color {
- display: flex;
- align-items: center;
- font-size: 30px;
- margin-right: 3px;
- color: #007aff;
- }
-
- .auth-font {
- font-size: 20px;
- font-family: Microsoft YaHei, Microsoft YaHei-Regular;
- font-weight: 400;
- color: #007aff;
- }
- }
-
- .tagthree {
- display: flex;
- align-items: center;
- overflow: hidden;
- padding-left: 10px;
- width: 100px;
- height: 32px;
- background: rgba(255, 0, 0, 0.1);
- border-radius: 10px;
- color: #ff0000;
- }
-
- .auth-cont {
- margin-left: 16px;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- color: #ababab;
- }
-
- .auth-contone {
- margin-left: 16px;
- font-size: 26px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- color: #3c3c3c;
- }
- }
- }
-}
diff --git a/src/pages/user/index.ts b/src/pages/user/index.ts
new file mode 100644
index 0000000..e69de29
diff --git a/src/pages/user/index.tsx b/src/pages/user/index.tsx
deleted file mode 100644
index 3ceaa50..0000000
--- a/src/pages/user/index.tsx
+++ /dev/null
@@ -1,351 +0,0 @@
-import { View, Image, Text, Navigator, Button } from '@tarojs/components'
-import { memo, useEffect, useState } from 'react'
-import styles from './index.module.scss'
-import classnames from 'classnames'
-import { useSelector } from '@/reducers/hooks'
-import { alert, goLink } from '@/common/common'
-import useLogin from '@/use/useLogin'
-import { BASE_URL } from '@/common/constant'
-import Taro, { useShareAppMessage } from '@tarojs/taro'
-import { userassets, userorderStatistics } from '@/api/mine'
-import { formatPriceDiv } from '@/common/fotmat'
-import { useDidShow } from '@tarojs/taro'
-import { GetAdminUserInfoApi } from '@/api/user'
-
-export default () => {
- // 用户信息
- const { getSelfUserInfo, getAdminUserInfo } = useLogin()
- const { adminUserInfo } = useSelector((state) => state.userInfo)
-
- const [current_version, setCurrent_version] = useState(CURRENT_VERSION)
- const [current_githash, setCurrent_githash] = useState(CURRENT_GITHASH)
- const [current_env, setCurrent_env] = useState(CURRENT_ENV)
-
- const handleAuth = async () => {
- console.log('授权面版')
- if (adminUserInfo?.is_authorize_name) return false
- getSelfUserInfo()
- .then()
- .catch(() => {
- alert.none('授权失败,请授权后再使用')
- })
- }
- const { fetchData: Apiassets, state } = userassets()
- const { fetchData: ApigetTotal, state: stateData } = userorderStatistics()
-
- useDidShow(() => {
- ApigetTotal()
- getAdminUserInfo()
- Apiassets()
- })
- const checkGo = async () => {
- if (adminUserInfo?.authentication_status !== 4) {
- let res = await Taro.showModal({
- title: '提示',
- content: '你暂未开通授信,目前仅支持线下申请,开通后可使用账期采购。',
- cancelText: '稍后认证',
- confirmText: '联系客服',
- })
- if (res.confirm) {
- Taro.showModal({
- content: '联系电话:0757-8270 6695',
- cancelText: '取消',
- confirmText: '拨打',
- success: function (res) {
- if (res.confirm) {
- Taro.makePhoneCall({
- phoneNumber: '(0757)82706695',
- })
- }
- },
- })
- }
- } else {
- Taro.navigateTo({
- url: '/pages/creditLine/index',
- })
- }
- }
- return (
-
-
- checkGo()} userInfo={adminUserInfo} />
-
- {/* {(adminUserInfo as any)?.authentication_status==1&&} */}
- {/* 测试暂时添加 */}
- {current_version}
- {current_env === 'development' && {BASE_URL}}
- {!adminUserInfo?.is_authorize_name && }
-
- )
-}
-// 提示弹窗
-const Modal = memo((props: any) => {
- const { data } = props
- const [modalShow, setModalShow] = useState(true)
- const handleouter = () => {}
- return (
- <>
- {modalShow && (
-
- e.stopPropagation()}>
- 首次登录提醒
-
- To: 万丰园纺织科技
-
- 尊敬的老朋友,欢迎你使用小程序商城;由于您是我们长期合作的伙伴,你的组织已自动为你生成,关联后可查看历史订单哟。
-
- 信息错误请联系客服
-
-
-
- setModalShow(false)}>我知道
-
-
-
- )}
- >
- )
-})
-
-// 头部 | 订单
-const Header = memo((props: any) => {
- const { data } = props
- console.log(props, 'propsprops')
- let menu = [
- { text: '待配布', icon: 'icon-daipeibu', url: '/pages/order/orderList/index?status=0' },
- { text: '待付款', icon: 'icon-daifukuan', url: '/pages/order/orderList/index?status=1' },
- { text: '待发货', icon: 'icon-daifahuo', url: '/pages/order/orderList/index?status=2' },
- { text: '待收货', icon: 'icon-yifahuo', url: '/pages/order/orderList/index?status=3' },
- { text: '退款/售后', icon: 'icon-a-tuikuanshouhou', url: '/pages/salesAfter/salesAfterList/index' },
- ]
- const { getPhoneNumber } = useLogin()
- const mGetPhoneNumber = (ev) => {
- if (ev.detail?.code) {
- getPhoneNumber(ev.detail.code)
- } else {
- alert.none('绑定失败!')
- }
- }
- const navTo = () => {
- Taro.navigateTo({
- // url: '/pages/certification/index',
- url: '/pages/userEdit/index',
- })
- }
- return (
-
-
-
-
-
-
-
-
-
- {/* {state.data.user_name} */}
- {data?.user_name}
-
-
- {data?.phone ? (
- data?.phone?.replace(data?.phone?.substring(3, 7), '****')
- ) : (
-
- )}
-
-
-
-
-
-
-
-
-
-
-
- {(data?.authentication_status == 0 || data?.authentication_status == 1) && data?.order_access_status == 3 && (
- navTo()}>
-
- 未认证
- {data?.company_name || '暂未加入或注册组织'}
-
-
-
- )}
- {data?.authentication_status == 3 && data?.order_access_status == 3 && (
- navTo()}>
-
- 认证失败
- {data?.company_name || '暂未加入或注册组织'}
-
-
-
- )}
- {data?.authentication_status == 2 && data?.order_access_status == 3 && (
- navTo()}>
-
- 认证中
- {data?.company_name || '暂未加入或注册组织'}
-
-
-
- )}
- {data?.authentication_status == 4 && data?.order_access_status == 3 && (
- navTo()}>
-
-
-
-
-
- 已认证
-
- {data?.company_name}
-
-
-
- )}
- {/*
-
- 1
- {data?.authentication_status==1&&"未认证"}
- {data?.authentication_status==2&&"认证中"}
- {data?.authentication_status==3&&"认证不通过"}
- {data?.authentication_status==4&&"已认证"}
-
- {data?.authentication_status==1&&认证通过后,解锁更多权限 }
- {data?.authentication_status==2&&1-3个工作日,审核完成 }
- {data?.authentication_status==3&&重新认证 }
- {data?.authentication_status==4&&认证通过,可以下单啦 }
- */}
- {/*
- {data?.authentication_status==1&&"暂未加入或注册组织"}
- {data?.authentication_status==2&&data?.company_name}
- {data?.authentication_status==3&&data?.company_name}
- {data?.authentication_status==4&&data?.company_name}
- */}
-
-
-
- 订单
- goLink('/pages/order/orderList/index')}>
- 全部
-
-
-
- {menu.map((item, index) => {
- return (
-
-
- {item.text}
- {index == 0 && props.MenuData.data.wait_match !== 0 && (
-
- {props.MenuData.data.wait_match > 99 ? '99+' : props.MenuData.data.wait_match}
-
- )}
- {index == 1 && props.MenuData.data.wait_pay !== 0 && (
-
- {props.MenuData.data.wait_pay > 99 ? '99+' : props.MenuData.data.wait_pay}
-
- )}
- {index == 2 && props.MenuData.data.wait_shipped !== 0 && (
-
- {props.MenuData.data.wait_shipped > 99 ? '99+' : props.MenuData.data.wait_shipped}
-
- )}
- {index == 3 && props.MenuData.data.already_shipped !== 0 && (
-
- {props.MenuData.data.already_shipped > 99 ? '99+' : props.MenuData.data.already_shipped}
-
- )}
- {index == 4 && props.MenuData.data.after_return !== 0 && (
-
- {props.MenuData.data.after_return > 99 ? '99+' : props.MenuData.data.after_return}
-
- )}
-
- )
- })}
-
-
-
-
- )
-})
-// 我的资产
-const Assets = (props: any) => {
- return (
- <>
- {(props?.userInfo?.order_access_status == 3 && (
-
- 我的资产
-
-
-
- ¥
- {formatPriceDiv(props.data.data.wallet_money || 0, 100, true)}
- {/* {props.wallet_money || 0} */}
-
- 预存款
-
- {/*
-
- {props.data.data.coupon_count || 0}
- 张
-
- 优惠券
- */}
- props.checkShow()}>
-
- ¥
- {formatPriceDiv(props.data.data.credit_line || 0, 100, true)}
- {/* .-00 */}
-
- 授信额度
-
-
-
- )) || }
- >
- )
-}
-
-// 功能
-const Main = memo(() => {
- let menu = [
- { text: '我的客服', icon: 'icon-wodekefu', type: 'customer', label: '(0757) 8270 6695' },
- { text: '地址管理', icon: 'icon-daohang', url: '/pages/addressManager/index', type: 'url' },
- { text: '码单管理', icon: 'icon-a-yuanmadanmadanguanli', url: '/pages/weightList/index', type: 'url' },
- { text: '我的收藏', icon: 'icon-shoucang', url: '/pages/collection/index', type: 'url' },
- { text: '颜色对比', icon: 'icon-yanseduibi', url: '/pages/sampleComparison/index', type: 'url' },
- // { text: "分享推广", icon: "icon-fenxiang" },
- { text: '邀请码', icon: 'icon-yaoqingma', url: '/pages/bindSalesman/index', type: 'url' },
- ]
- const navigation = (item) => {
- if (item.type === 'url') goLink(item.url)
- }
- return (
-
-
- {menu.map((item, index) => {
- return (
- navigation(item)} key={index} className={styles['card-main-list-content-item']}>
-
-
- {item.text}
-
- {item.label}
-
-
-
- {item.type === 'customer' && }
-
- )
- })}
-
-
- )
-})
diff --git a/src/pages/userEdit/components/ModifyModal.scss b/src/pages/userEdit/components/ModifyModal.scss
deleted file mode 100644
index fe370e9..0000000
--- a/src/pages/userEdit/components/ModifyModal.scss
+++ /dev/null
@@ -1,76 +0,0 @@
- .modify-ickname-content {
- margin: 0 auto;
- width: 658px;
- padding-bottom: 50px;
-
- .modify-ickname-input {
- width: 658px;
- height: 182px;
- background: #f3f3f3;
- border: 2px solid #e6e6e6;
- border-radius: 10px;
- padding: 15px;
- box-sizing: border-box;
- font-size: 22px;
- font-weight: 400;
- color: #ababab;
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- }
-
- .modify-ickname-input textarea {
- width: 100%;
- height: 80%;
- font-size: 26px;
- font-weight: 400;
- color: #3c3c3c;
- }
-
- .modify-ickname-tips {
- font-size: 22px;
- font-weight: 400;
- color: #ababab;
- margin-top: 30px;
- }
-
- .modify-ickname-operation {
- width: 658px;
- height: 82px;
- background: #ffffff;
- border: 2px solid #cde5ff;
- border-radius: 40px;
- display: flex;
- overflow: hidden;
- margin-top: 105px;
- display: flex;
- }
-
- .modify-ickname-operation button {
- height: 100%;
- width: 50%;
- font-size: 32px;
- font-weight: 400;
- color: #007aff;
- background-color: white;
- border: none;
- outline: none;
- padding: 0;
- border-radius: 0;
- }
-
- .modify-ickname-operation button::after,
- .user-edit-logout::after {
- border-radius: 0;
- border: none;
- }
-
- .modify-ickname-operation .modify-ickname-operation-save {
- background: #007aff;
- color: #ffffff;
- }
-
- .modify-ickname-operation button::after {
- border-radius: 0;
- }
- }
\ No newline at end of file
diff --git a/src/pages/userEdit/components/ModifyModal.tsx b/src/pages/userEdit/components/ModifyModal.tsx
deleted file mode 100644
index 22c9db5..0000000
--- a/src/pages/userEdit/components/ModifyModal.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-
-import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useState } from "react"
-import Popup from "@/components/popup";
-import { Button, Image, Text, Textarea, View } from "@tarojs/components"
-import "./ModifyModal.scss"
-
-interface Params{
- title?: string,
- save: (value: any)=>void, // 确定保存
-}
-export default memo(forwardRef((props:any,ref)=>{
- const {title="修改昵称"} = props;
- const [value, setValue] = useState("");
- useEffect(()=>{
- setValue(props.value);
- },[props.value])
- // popup输入长度
- const handleTextareaInput = (ev:any)=>{
- setValue(ev.detail.value.slice(0,20));
- }
- // 重置
- const handleTextareaReset = ()=>{
- setValue("");
- }
- const [textareaBottom, setTextareaBottom] = useState(0);
- const handleBlur = ()=>{
- setTextareaBottom(0);
- }
- const handleFocus = (ev)=>{
- setTextareaBottom(ev.detail.height);
- }
- const [modalShow,setModalShow] = useState(false);
- useImperativeHandle(ref, ()=>({setModalShow}))
- return (
- setModalShow(false)} title={title} show={modalShow}>
-
-
-
- 请设置2-20个字符,可由中文、英文、数字组成
-
-
-
-
-
-
- )
-}))
\ No newline at end of file
diff --git a/src/pages/userEdit/index.config.ts b/src/pages/userEdit/index.config.ts
deleted file mode 100644
index 3c669f3..0000000
--- a/src/pages/userEdit/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '编辑个人资料',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/userEdit/index.scss b/src/pages/userEdit/index.scss
deleted file mode 100644
index 2899aa8..0000000
--- a/src/pages/userEdit/index.scss
+++ /dev/null
@@ -1,126 +0,0 @@
-.user-edit{
- height: 100vh;
- background: #f3f3f3;
- .user-edit-portrait{
- font-size: 22px;
- font-weight: 400;
- color: #ababab;
- display: flex;flex-direction: column;
- align-items: center;justify-content: center;
- background-color: white;
- height: 300px;
- }
- .user-edit-portrait image{
- width: 170px;
- height: 170px;
- border-radius: 50%;
- overflow: hidden;
- object-fit: cover;
- margin-bottom: 15px;
- }
-
- .user-edit-content{
- background-color: white;
- margin-top: 24px;
- padding: 0 30px;
- }
- .user-edit-content-title{
- font-size: 26px;
- font-weight: 700;
- color: #000000;
- padding: 40px;
- }
- .user-edit-content-title text{
- margin-right: 10px;
- }
- .user-edit-content-phone{
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- display: flex;justify-content: space-between;
- }
- .user-edit-content-phone text{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- }
- .user-edit-content-bindphone{
- padding: 0;width: auto;height: auto;
- margin: 0;background: none;border: 0;
- text-align: left;
- font-size: 26px;
- font-weight: 400;
- color: #ababab;
- }
- .user-edit-content-bindphone::after{
- border: 0;
- }
- .user-edit-content-company{
- width: 118px;
- height: 40px;
- background: #dddddd;
- border-radius: 6px;
- display: flex;align-items: center;justify-content: center;
- font-size: 24px;
- font-weight: 400;
- color: #707070;
- }
- .user-edit-content-company,.user-edit-content-company-adopt{
- background: #CDF3DF;
- color: #07C160;
- }
- .user-edit-content-company text{
- margin-left: 5px;
- }
- .user-edit-content-company.user-edit-content-company-auth{
- background-color: #CDF3DF;
- color: #07C160;
- }
- .user-edit-list{
- height: 90px;
- display: flex;align-items: center;
- border-bottom: 2px solid #f0f0f0;
- }
- .user-edit-list:last-of-type{
- border: none;
- }
- .user-edit-list-left{
- width: 120px;
- border-right: 2px solid #f3f3f3;
- margin-right: 30px;
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- }
- .user-edit-list-right{
- display: flex;justify-content: space-between;align-items: center;
- flex: auto;
- font-size: 26px;
- font-weight: 400;
- color: #000000;
- }
- .user-edit-list-right>view{
- flex: 1;
- }
- .user-edit-list-right-placeholder{
- color: #cccccc;
- }
- .user-edit-list-right .icon-a-moreback{
- font-size: 30px;
- }
-
- .user-edit-logout{
- width: 668px;
- height: 82px;
- background: #ffffff;
- border: 2px solid #cde5ff;
- border-radius: 40px;
- // margin: 359px auto 0;
- position: fixed;left: 50%;bottom: 50px;
- transform: translateX(-50%);
- font-size: 32px;
- font-weight: 400;
- text-align: center;
- color: #007aff;
- }
-}
\ No newline at end of file
diff --git a/src/pages/userEdit/index.tsx b/src/pages/userEdit/index.tsx
deleted file mode 100644
index 55a84d5..0000000
--- a/src/pages/userEdit/index.tsx
+++ /dev/null
@@ -1,226 +0,0 @@
-
-import { alert, goLink, isEmptyObject, retrieval } from "@/common/common";
-import Popup from "@/components/popup";
-import { Button, Image, Picker, Text, Textarea, View } from "@tarojs/components"
-import Taro, { chooseMedia } from "@tarojs/taro";
-import { realNameUpdateApi, companyTypeApi, portraitUpdateApi } from "@/api/user";
-import { companyDetailApi, companyUpdateApi } from "@/api/company"
-import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react"
-import "./index.scss"
-import ModifyModal from "./components/ModifyModal";
-import useLogin from "@/use/useLogin";
-import { useSelector } from "@/reducers/hooks";
-import useUploadCDNImg from "@/use/useUploadImage";
-import { IMG_CND_Prefix } from "@/common/constant";
-import useUserInfo from "@/use/useUserInfo";
-
-export default () => {
- const { getPhoneNumber, getAdminUserInfo } = useLogin();
- const { adminUserInfo } = useSelector(state => state.userInfo);
- // 用户信息
- useEffect(() => {
- setFormData({
- ...formData,
- ...adminUserInfo as any,
- });
- }, [adminUserInfo]);
- useEffect(() => {
- setFormData({
- ...adminUserInfo as any,
- company_type_index: 0
- });
- getCompanyTypeData();
- }, [])
- // 表单数据
- const [formData, setFormData] = useState(adminUserInfo);
- // 昵称修改保存
- const { fetchData: realNameUpdateFetch } = realNameUpdateApi();
- const rules = {
- text: [{
- message: "请输入"
- }]
- }
- const { fetchData: saveFetch } = companyUpdateApi();
- const { fetchData: getCompanyFetch } = companyDetailApi();
- const handleTextareaSave = async (text, type) => {
- retrieval({ text }, rules).then(async () => {
- let result;
- if (type == "Ickname") {
- result = await realNameUpdateFetch({ real_name: text });
- } else {
- const params = await getCompanyFetch();
- result = await saveFetch({
- ...params.data,
- company_name: text
- });
- }
- if (result.success) {
- getAdminUserInfo();
- (ModifyIcknameEl.current as any).setModalShow(false);
- (ModifyCompanyNameEl.current as any).setModalShow(false)
- alert.success("保存成功");
- } else {
- alert.none(result.msg);
- }
- }).catch(message => {
- alert.none(message);
- })
- }
- // Taro.eventCenter.on('message:detail', (message) => console.log(message))
- // 面面跳转
- const onNavigate = (url: string) => {
- goLink(url);
- }
- // 肖像编辑
- const { fetchData: portraitUpdateFetch } = portraitUpdateApi();
- const { getWxPhoto } = useUploadCDNImg();
- const handleSelectRortrait = () => {
- Taro.showModal({
- title: "提示",
- content: "是否确定更改头像?",
- showCancel: true,
- async success(ev) {
- if (ev.confirm) {
- let result = await getWxPhoto('mall');
- const portraitUpdateResult = await portraitUpdateFetch({
- avatar_url: IMG_CND_Prefix + (result as any).url
- });
- if (portraitUpdateResult.success) {
- getAdminUserInfo();
- alert.success("保存成功");
- } else {
- alert.none(portraitUpdateResult.msg);
- }
- }
- }
- })
- }
- const mGetPhoneNumber = (ev) => {
- if (ev.detail?.code) {
- getPhoneNumber(ev.detail.code);
- } else {
- alert.none("绑定失败!");
- }
- }
- const ModifyIcknameEl = useRef(null);
- const ModifyCompanyNameEl = useRef(null);
- // 获取企业类型
- const { fetchData: companyTypeFetch, state: companyTypeData } = companyTypeApi();
- const getCompanyTypeData = async () => {
- const reuslt = await companyTypeFetch();
- if (reuslt.success) {
- reuslt.data?.list?.every((item, index) => {
- if (item.id == (adminUserInfo as any).purchaser_type) {
- setFormData({
- ...adminUserInfo as any,
- company_type_index: index
- });
- return false;
- }
- return true;
- })
- }
- }
- // 修改企业类型
- const handleCompanyType = async (ev) => {
- const { value } = ev.detail;
- const item = companyTypeData.data.list && companyTypeData.data.list[value];
- if (item) {
- if(item.id == 0) return alert.error('请选择类型')
- const params = await getCompanyFetch();
- const result = await saveFetch({
- ...params.data,
- purchaser_type: item.id
- });
- if (result.success) {
- getAdminUserInfo();
- alert.success("保存成功")
- } else {
- alert.none(result.msg);
- }
- }
- }
-
- const {removeToken, removeSessionKey, removeUserInfo} = useUserInfo()
- const outLogin = () => {
- removeToken()
- removeSessionKey()
- removeUserInfo()
- goLink('/pages/index/index',{}, 'switchTab')
- }
-
- const comanyTypeDataFormat = useMemo(() => {
- if(companyTypeData.data.list) {
- return companyTypeData.data.list?.map(item => {
- if(item.id == 0) item.name = '--请选择类型--'
- return item
- })
- } else {
- return []
- }
- }, [companyTypeData])
-
- return (
-
-
-
- 点击编辑头像
-
-
- 个人资料
- (ModifyIcknameEl.current as any).setModalShow(true)} data={(formData as any)?.user_name} label="昵称" placeholder="请输入" icon="" />
-
- {((formData as any)?.phone) ?
- {(formData as any)?.phone}
- 已绑定
- :
-
- }
-
-
-
- 组织资料
- (ModifyCompanyNameEl.current as any).setModalShow(true)} data={(formData as any)?.company_name} label="组织名称" placeholder="待绑定" icon="" />
-
-
- {formData?.purchaser_type_name}
-
-
-
-
- {(formData as any)?.authentication_status == 4 ? "已认证" : "未认证"}
-
-
-
-
-
-
- handleTextareaSave(value, "Ickname")} />
- handleTextareaSave(value, "companyName")} />
-
- )
-}
-
-// 列表
-const UserEditList = memo((props: any) => {
- return (
-
-
- {props.label}
-
-
-
- {
- props.children ? props.children :
- props.data ? props.data :
- {props.placeholder}
- }
-
- {
- !props.useIcon &&
-
- }
-
-
- )
-})
diff --git a/src/pages/weightList/index.config.ts b/src/pages/weightList/index.config.ts
deleted file mode 100644
index 935bd6e..0000000
--- a/src/pages/weightList/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '码单管理',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/weightList/index.scss b/src/pages/weightList/index.scss
deleted file mode 100644
index cc6af58..0000000
--- a/src/pages/weightList/index.scss
+++ /dev/null
@@ -1,95 +0,0 @@
-.weight-list-manager{
- height: 100vh;
-
- .weight-list-scroll-view{
- height: 100%;
- box-sizing: border-box;
- position: relative;
- scroll-view{
- height: 100%;
- box-sizing: border-box;
- }
-
- .weight-list-list{
- width: 704px;
- height: 156px;
- background: #ffffff;
- border-radius: 20px;
- box-shadow: 2px 4px 12px 0px rgba(0,0,0,0.16);
- padding: 30px;
- box-sizing: border-box;
- margin: 18px auto 0;
- border: 1px solid #ffffff;
- }
- .weight-list-list:first-child{
- margin-top: 0;
- }
- .address-active{
- border: 1px solid #68b4ff;
- box-shadow: 0px 0px 10px 0px rgba(0,122,255,0.27);
- }
- .weight-list-list:last-child{
- margin-bottom: 300px;
- }
- .weight-list-user{
- font-size: 28px;
- font-family: Microsoft YaHei, Microsoft YaHei-Bold;
- font-weight: 700;
- text-align: left;
- color: #000000;
- display: flex;align-items: center;
- }
- .weight-list-list-default{
- width: 58px;
- height: 28px;
- background: #cde5ff;
- border-radius: 6px;
- font-size: 20px;
- font-weight: 400;
- text-align: center;
- color: #007aff;
- margin-left: 30px;
-
- }
- .weight-list-list-phone{
- font-size: 24px;
- font-weight: 400;
- color: #ababab;
- margin-left: 30px;
- }
- .weight-list-edit .icon-bianji{
- font-size: 40px;
- }
-
- .weight-list-list-info{
- font-size: 24px;
- font-weight: 400;
- color: #3c3c3c;
- }
- .weight-list-list-bottom{
- display: flex;justify-content: space-between;
- margin-top: 18px;
- }
- .add-weight-list{
- width: 668px;
- height: 82px;
- background: #007aff;
- border-radius: 40px;
- font-size: 32px;
- font-weight: 400;
- color: #ffffff;
- display: flex;align-items: center;justify-content: center;
- position: absolute;bottom: 8%;left: 50%;
- transform: translateX(-50%);
- }
- .weight-list-no-data{
- font-size: 24px;
- font-weight: 400;
- text-align: center;
- color: #707070;
- height: 100%;
- padding-top: 40%;
- box-sizing: border-box;
- }
- }
-}
\ No newline at end of file
diff --git a/src/pages/weightList/index.tsx b/src/pages/weightList/index.tsx
deleted file mode 100644
index 00a8a69..0000000
--- a/src/pages/weightList/index.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-
-import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components"
-import { memo, useEffect, useState } from "react"
-import {weightListApi,weightDeleteApi} from "@/api/weightList"
-import "./index.scss"
-import Taro, { showModal } from "@tarojs/taro"
-import { alert } from "@/common/common"
-import useLogin from "@/use/useLogin"
-const weightListManager = ()=>{
- useLogin()
- return(
-
-
-
- )
-}
-interface Params{
- refresherEnabled?: boolean,//是否开启刷新
- onSelect?: (item:any,index:number)=>void,//列表选择
-
-}
-// 码单列表
-const WeightList = (props:Params)=>{
- const {fetchData, state} = weightListApi();
- const getData = ()=>{
- fetchData();
- }
- useEffect(()=>{
- Taro.eventCenter.on("weightList:refresh", getData);
- getData();
- return ()=>{
- Taro.eventCenter.off("weightList:refresh", getData);
- }
- },[]);
- // 处理刷新
- const [refreshState, setRefreshState] = useState(false);
- const handleRefresh = async ()=>{
- setRefreshState(true);
- await fetchData();
- setRefreshState(false);
- }
- const data = Array.from({length:0});
- // 删除码单
- const {fetchData: deleteFetch} = weightDeleteApi()
- const handleDelete = (item:any)=>{
- showModal(({
- title: "提示",
- content: "是否删除码单?",
- async success(ev){
- if(ev.confirm){
- const result = await deleteFetch({id:item.id});
- if(result.success){
- alert.success("删除成功");
- getData();
- }else{
- alert.success(result.msg);
- }
- }
- }
- }))
- }
-
- return (
-
-
- {
- // data.length>0?
- state?.data?.list?.length>0?
- state?.data?.list?.map((item,index)=>{
- return(
- props.onSelect&&props.onSelect(item,index)} onLongPress={()=>handleDelete(item)} className={`weight-list-list ${item.is_default&&'address-active'}`}>
-
- {item.title}
- {
- item.is_default&&默认
- }
-
-
-
- {item.purchaser_name}
- {item.phone.replace(item.phone.substring(3,7), "****")}
-
-
-
-
-
-
- );
- }):
-
- 您末添加任何码单信息
- 正在使用平台默认码单信息
-
- }
-
- 添加新码单信息
-
- )
-}
-
-export default weightListManager;
\ No newline at end of file
diff --git a/src/pages/weightListAdd/index.config.ts b/src/pages/weightListAdd/index.config.ts
deleted file mode 100644
index 8e50c58..0000000
--- a/src/pages/weightListAdd/index.config.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export default {
- navigationBarTitleText: '',
- enableShareAppMessage: true,
-}
diff --git a/src/pages/weightListAdd/index.scss b/src/pages/weightListAdd/index.scss
deleted file mode 100644
index 3dbacf0..0000000
--- a/src/pages/weightListAdd/index.scss
+++ /dev/null
@@ -1,47 +0,0 @@
-.add-address{
- display: flex;
- flex-direction: column;
- .add-address-default{
- display: flex;align-items: center;justify-content: space-between;
- margin: 70px 30px 0;
- font-size: 26px;
- font-weight: 700;
- color: #000000;
- padding-right: 20px;
- box-sizing: border-box;
- }
- .add-address-default-active{
- width: 50px;
- height: 50px;
- background: #007aff;
- border-radius: 50%;
- display: flex;align-items: center;
- justify-content: center;
- font-size: 45px;
- color: white;
- box-sizing: border-box;
- }
- .add-address-default-active text{
- font-size: 35px;
- }
- .add-address-default-noactive{
- width: 50px;
- height: 50px;
- border: 2px solid #707070;
- border-radius: 50%;
- box-sizing: border-box;
- display: flex;align-items: center;justify-content: center;
- }
-
- .add-address-save{
- width: 668px;
- height: 82px;
- background: #68b4ff;
- border-radius: 40px;
- font-size: 32px;
- font-weight: 400;
- color: #ffffff;
- display: flex;align-items: center;justify-content: center;
- margin: 620px auto 0;
- }
-}
\ No newline at end of file
diff --git a/src/pages/weightListAdd/index.tsx b/src/pages/weightListAdd/index.tsx
deleted file mode 100644
index ecd060e..0000000
--- a/src/pages/weightListAdd/index.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-
-import FromList from "@/components/FromList"
-import { Button, Input, Text, Textarea, View } from "@tarojs/components"
-import Taro, { setNavigationBarTitle, useRouter } from "@tarojs/taro"
-import {weightAddApi, weightDetailApi,weightEditApi} from "@/api/weightList"
-import { useEffect, useState } from "react"
-import { alert, retrieval } from "@/common/common"
-import "./index.scss"
-import useLogin from "@/use/useLogin"
-
-export default ()=>{
- useLogin()
- const {type,id} = useRouter().params;
- useEffect(()=>{
- if(type=="add"){
- setNavigationBarTitle({title:"添加码单信息"})
- }else{
- initalFormData();
- setNavigationBarTitle({title:"修改码单信息"})
- }
- },[]);
- // 获取编辑码单信息
- const {fetchData: getFromData} = weightDetailApi()
- const initalFormData = async ()=>{
- const detail = await getFromData({id});
- setFormData({
- title: detail.data.title,
- purchaser_name: detail.data.purchaser_name,
- phone: detail.data.phone,
- is_default: detail.data.is_default,
- id: detail.data.id,
- })
- }
- // 保存
- const [formData, setFormData] = useState({
- title: "",
- purchaser_name: "",
- phone: "",
- is_default: false,
- id: 0
- })
- const rules = {
- title: [{
- message: "请输入抬头"
- }],
- purchaser_name: [{
- message: "请输入客户名称"
- }],
- phone: [{
- message: "请输入正确的电话号码", regex: /^1[3|5|6|9|2|8|7]\d{9}$/
- }]
- }
- const {fetchData} = weightAddApi()
- const {fetchData: editFetch} = weightEditApi()
- const handleSave = ()=>{
- retrieval(formData, rules).then(async ()=>{
- const result = type=="add"?await fetchData({
- title: formData.title,
- purchaser_name: formData.purchaser_name,
- phone: formData.phone,
- is_default: formData.is_default,
- }):await editFetch({
- title: formData.title,
- purchaser_name: formData.purchaser_name,
- phone: formData.phone,
- is_default: formData.is_default,
- id: formData.id
- });
- if(result.success){
- Taro.eventCenter.trigger("weightList:refresh");
- Taro.navigateBack();
- alert.success("保存成功");
- }else{
- alert.error(result.msg);
- }
- }).catch((message)=>{
- alert.none(message)
- })
- }
- // 监听表单完善
- const [hozon, setHozon] = useState(false);
- useEffect(()=>{
- if(retrieval){
- retrieval(formData).then(()=>setHozon(true)).catch(()=>setHozon(false))
- }
- },[formData])
-
- return (
-
- setFormData({...formData,title:ev.detail.value})} value={formData["title"]} label="抬头" placeholder="请输入码单显示抬头信息"/>
- setFormData({...formData,purchaser_name:ev.detail.value})} value={formData["purchaser_name"]} label="客户" placeholder="请输入码单显示客户名称"/>
- setFormData({...formData,phone:ev.detail.value})} value={formData["phone"]} label="联系方式" placeholder="请输入码单显示联系号码"/>
-
- 设为默认地址
- setFormData({...formData ,is_default: !formData.is_default})}>
- {
- formData.is_default?
- :
- }
-
-
-
-
-
- )
-}
diff --git a/src/styles/tabbar/home.png b/src/styles/tabbar/home.png
deleted file mode 100644
index fc8b7d9..0000000
Binary files a/src/styles/tabbar/home.png and /dev/null differ
diff --git a/src/styles/tabbar/home_selected.png b/src/styles/tabbar/home_selected.png
deleted file mode 100644
index 6729b9e..0000000
Binary files a/src/styles/tabbar/home_selected.png and /dev/null differ
diff --git a/src/styles/tabbar/list.png b/src/styles/tabbar/list.png
new file mode 100644
index 0000000..4f29b95
Binary files /dev/null and b/src/styles/tabbar/list.png differ
diff --git a/src/styles/tabbar/list_on.png b/src/styles/tabbar/list_on.png
new file mode 100644
index 0000000..5d116c8
Binary files /dev/null and b/src/styles/tabbar/list_on.png differ
diff --git a/src/styles/tabbar/my.png b/src/styles/tabbar/my.png
index 225e22b..cff9c48 100644
Binary files a/src/styles/tabbar/my.png and b/src/styles/tabbar/my.png differ
diff --git a/src/styles/tabbar/my_on.png b/src/styles/tabbar/my_on.png
new file mode 100644
index 0000000..f987eb6
Binary files /dev/null and b/src/styles/tabbar/my_on.png differ
diff --git a/src/styles/tabbar/my_selected.png b/src/styles/tabbar/my_selected.png
deleted file mode 100644
index 1432d1e..0000000
Binary files a/src/styles/tabbar/my_selected.png and /dev/null differ
diff --git a/src/styles/tabbar/order.png b/src/styles/tabbar/order.png
new file mode 100644
index 0000000..72ea1c9
Binary files /dev/null and b/src/styles/tabbar/order.png differ
diff --git a/src/styles/tabbar/order_on.png b/src/styles/tabbar/order_on.png
new file mode 100644
index 0000000..9a32e1f
Binary files /dev/null and b/src/styles/tabbar/order_on.png differ