From 43b5bb7ee0262fbaa5ba4d16958f3007338c5f7a Mon Sep 17 00:00:00 2001
From: czm <2192718639@qq.com>
Date: Tue, 20 Dec 2022 17:26:34 +0800
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(=E7=A0=81=E5=8D=95=E6=8A=AC?=
=?UTF-8?q?=E5=A4=B4=E5=88=97=E8=A1=A8=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?=
=?UTF-8?q?):?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app.config.ts | 8 +-
src/common/constant.ts | 4 +-
src/components/search/index.tsx | 2 +-
.../selectList/index.module.scss | 0
src/components/selectList/index.tsx | 30 ++++++
.../components/codeModel/index.module.scss | 30 ++++++
.../codeList/components/codeModel/index.tsx | 22 ++++
.../components/colorItem/index.module.scss | 84 +++++++++++++++
.../codeList/components/colorItem/index.tsx | 36 +++++++
.../components/companyItem/index.module.scss | 38 +++++++
.../codeList/components/companyItem/index.tsx | 14 +++
.../components/companyModel/index.module.scss | 43 ++++++++
.../components/companyModel/index.tsx | 18 ++++
.../components/payeeHead/selectList/index.tsx | 26 -----
src/pages/codeList/index.config.ts | 2 +-
src/pages/codeList/index.module.scss | 57 +++++-----
src/pages/codeList/index.tsx | 74 +++----------
.../codeColorList/index.config.ts | 0
.../codeColorList/index.module.scss | 0
.../codeColorList/index.tsx | 0
.../components/bottomBtn/index.module.scss | 0
.../components/bottomBtn/index.tsx | 0
.../colorItemSetting/index.module.scss | 0
.../components/colorItemSetting/index.tsx | 0
.../components/colorSetting/index.module.scss | 0
.../components/colorSetting/index.tsx | 0
.../components/counter/index.module.scss | 0
.../components/counter/index.tsx | 0
.../components/payeeHead/index.module.scss | 0
.../components/payeeHead/index.tsx | 0
.../components/productItem/index.module.scss | 0
.../components/productItem/index.tsx | 0
.../productSetting/index.module.scss | 0
.../components/productSetting/index.tsx | 0
.../settingNumber/index.module.scss | 0
.../components/settingNumber/index.tsx | 0
.../wholeOrderSetting/index.module.scss | 0
.../components/wholeOrderSetting/index.tsx | 0
src/pages/codeSetting/index.config.ts | 3 +
src/pages/codeSetting/index.module.scss | 41 +++++++
src/pages/codeSetting/index.tsx | 70 ++++++++++++
.../components/companyItem/index.module.scss | 38 +++++++
.../components/companyItem/index.tsx | 19 ++++
src/pages/weightList/index copy.tsx | 101 ++++++++++++++++++
src/pages/weightList/index.config.ts | 1 +
src/pages/weightList/index.scss | 5 +
src/pages/weightList/index.tsx | 23 +---
src/use/usePayBank.ts | 6 +-
48 files changed, 649 insertions(+), 146 deletions(-)
rename src/{pages/codeList/components/payeeHead => components}/selectList/index.module.scss (100%)
create mode 100644 src/components/selectList/index.tsx
create mode 100644 src/pages/codeList/components/codeModel/index.module.scss
create mode 100644 src/pages/codeList/components/codeModel/index.tsx
create mode 100644 src/pages/codeList/components/colorItem/index.module.scss
create mode 100644 src/pages/codeList/components/colorItem/index.tsx
create mode 100644 src/pages/codeList/components/companyItem/index.module.scss
create mode 100644 src/pages/codeList/components/companyItem/index.tsx
create mode 100644 src/pages/codeList/components/companyModel/index.module.scss
create mode 100644 src/pages/codeList/components/companyModel/index.tsx
delete mode 100644 src/pages/codeList/components/payeeHead/selectList/index.tsx
rename src/pages/{codeList => codeSetting}/codeColorList/index.config.ts (100%)
rename src/pages/{codeList => codeSetting}/codeColorList/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/codeColorList/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/bottomBtn/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/bottomBtn/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/colorItemSetting/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/colorItemSetting/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/colorSetting/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/colorSetting/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/counter/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/counter/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/payeeHead/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/payeeHead/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/productItem/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/productItem/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/productSetting/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/productSetting/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/settingNumber/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/settingNumber/index.tsx (100%)
rename src/pages/{codeList => codeSetting}/components/wholeOrderSetting/index.module.scss (100%)
rename src/pages/{codeList => codeSetting}/components/wholeOrderSetting/index.tsx (100%)
create mode 100644 src/pages/codeSetting/index.config.ts
create mode 100644 src/pages/codeSetting/index.module.scss
create mode 100644 src/pages/codeSetting/index.tsx
create mode 100644 src/pages/weightList/components/companyItem/index.module.scss
create mode 100644 src/pages/weightList/components/companyItem/index.tsx
create mode 100644 src/pages/weightList/index copy.tsx
diff --git a/src/app.config.ts b/src/app.config.ts
index cb02763..e83d6ce 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -185,11 +185,17 @@ export default {
],
},
{
- root: 'pages/codeList',
+ root: 'pages/codeSetting',
pages: [
'index',
'codeColorList/index',
],
},
+ {
+ root: 'pages/codeList',
+ pages: [
+ 'index',
+ ],
+ },
],
}
diff --git a/src/common/constant.ts b/src/common/constant.ts
index 670a626..5126f35 100644
--- a/src/common/constant.ts
+++ b/src/common/constant.ts
@@ -5,12 +5,12 @@
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
// export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境
-// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
+export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
-export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境
+// export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
// export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添
// export const BASE_URL = 'http://192.168.1.28:50002/lymarket' // 婷
diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx
index 37183ee..44846cb 100644
--- a/src/components/search/index.tsx
+++ b/src/components/search/index.tsx
@@ -94,7 +94,7 @@ const Search = (
>
{!!inputCon && (
- clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />
+ clearInput()} styleObj={{ width: '20rpx', height: '20rpx', border: '0' }} />
)}
diff --git a/src/pages/codeList/components/payeeHead/selectList/index.module.scss b/src/components/selectList/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/payeeHead/selectList/index.module.scss
rename to src/components/selectList/index.module.scss
diff --git a/src/components/selectList/index.tsx b/src/components/selectList/index.tsx
new file mode 100644
index 0000000..f69a3d8
--- /dev/null
+++ b/src/components/selectList/index.tsx
@@ -0,0 +1,30 @@
+import { Text, View } from '@tarojs/components'
+import classNames from 'classnames'
+import { memo, useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+
+interface ItemIndex {
+ value: number
+ label: string
+}
+interface Param {
+ defaultIndex?: number
+ onSelect?: (val: number) => void
+ list: ItemIndex[]
+}
+export default memo((props: Param) => {
+ const { defaultIndex = 1, onSelect, list = [] } = props
+ const [selectIndex, setSelectIndex] = useState(0)
+ useEffect(() => {
+ if (defaultIndex != selectIndex) { setSelectIndex(() => defaultIndex) }
+ }, [defaultIndex])
+ const getSelect = useCallback((index) => {
+ setSelectIndex(() => index)
+ onSelect?.(index)
+ }, [])
+ return
+ {list?.map((item) => {
+ return getSelect(item.value)} className={classNames(styles.select_list_item, selectIndex === item.value && styles.select_list_ed)}>{item.label}
+ })}
+
+})
diff --git a/src/pages/codeList/components/codeModel/index.module.scss b/src/pages/codeList/components/codeModel/index.module.scss
new file mode 100644
index 0000000..60d267b
--- /dev/null
+++ b/src/pages/codeList/components/codeModel/index.module.scss
@@ -0,0 +1,30 @@
+.code_list_search {
+ width: 750px;
+ height: 104px;
+ background: #ffffff;
+ display: flex;
+ padding: 0 24px;
+ box-sizing: border-box;
+ align-items: center;
+ margin-top: 1px;
+ .code_list_search--code {
+ width: 558px;
+ height: 72px;
+ background: #f7f7f7;
+ border-radius: 36px;
+ margin-right: 32px;
+ }
+ .code_list_search--data {
+ display: flex;
+ align-items: center;
+ text {
+ font-size: 28px;
+ color: rgba(0, 0, 0, 0.8);
+ margin-right: 8px;
+ }
+ }
+}
+.code_list_con {
+ padding: 24px;
+ box-sizing: border-box;
+}
diff --git a/src/pages/codeList/components/codeModel/index.tsx b/src/pages/codeList/components/codeModel/index.tsx
new file mode 100644
index 0000000..3c23449
--- /dev/null
+++ b/src/pages/codeList/components/codeModel/index.tsx
@@ -0,0 +1,22 @@
+import { Text, View } from '@tarojs/components'
+import { useState } from 'react'
+import ColorItem from '../colorItem'
+import styles from './index.module.scss'
+import IconFont from '@/components/iconfont/iconfont'
+import SelectList from '@/components/selectList'
+import Search from '@/components/search'
+
+export default () => {
+ return
+
+
+
+
+ 日期
+
+
+
+
+
+
+}
diff --git a/src/pages/codeList/components/colorItem/index.module.scss b/src/pages/codeList/components/colorItem/index.module.scss
new file mode 100644
index 0000000..38df22e
--- /dev/null
+++ b/src/pages/codeList/components/colorItem/index.module.scss
@@ -0,0 +1,84 @@
+.code_list_item {
+ background-color: #fff;
+ border-radius: 16px;
+ padding: 0 32px;
+ .code_list_con__title {
+ display: flex;
+ font-size: 28px;
+ color: rgba(0, 0, 0, 0.8);
+ align-items: center;
+ height: 74px;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+ .code_list_con__title_mode {
+ width: 60px;
+ height: 28px;
+ background: #337fff;
+ border-radius: 8px;
+ font-size: 20px;
+ color: #fff;
+ text-align: center;
+ line-height: 28px;
+ margin-left: 26px;
+ }
+ }
+ .code_list_desc {
+ margin-top: 24px;
+ display: flex;
+ .image {
+ width: 134px;
+ height: 134px;
+ }
+ .company {
+ margin-left: 24px;
+ font-size: 28px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ flex: 1;
+ .company_item {
+ display: flex;
+ justify-content: space-between;
+
+ text {
+ &:nth-child(1) {
+ font-size: 28px;
+ color: rgba(0, 0, 0, 0.6);
+ }
+ }
+ }
+ }
+ }
+ .code_list_number {
+ width: 638px;
+ height: 54px;
+ background: #fef9f4;
+ border-radius: 8px;
+ font-size: 24px;
+ font-weight: 500;
+ color: #f79b31;
+ text-align: center;
+ line-height: 54px;
+ margin-top: 24px;
+ border-radius: 8px;
+ }
+}
+.code_list_bottom {
+ display: flex;
+ padding: 24px 0;
+ justify-content: flex-end;
+ .code_list_bottom_item {
+ width: 160px;
+ height: 72px;
+ border-radius: 40px;
+ border: 1px solid #000000;
+ font-size: 28px;
+ color: rgba(0, 0, 0, 0.8);
+ text-align: center;
+ line-height: 72px;
+ &:nth-child(2) {
+ border: 1px solid #337fff;
+ color: #337fff;
+ margin-left: 32px;
+ }
+ }
+}
diff --git a/src/pages/codeList/components/colorItem/index.tsx b/src/pages/codeList/components/colorItem/index.tsx
new file mode 100644
index 0000000..6cb2833
--- /dev/null
+++ b/src/pages/codeList/components/colorItem/index.tsx
@@ -0,0 +1,36 @@
+import { Text, View } from '@tarojs/components'
+import styles from './index.module.scss'
+import LabAndImg from '@/components/LabAndImg'
+
+export default () => {
+ return
+
+ 订单号:XS-LY-2208220092
+ 大货
+
+
+
+
+
+
+
+ 公司抬头:
+ XL纺织公司
+
+
+ 客户名称:
+ 上生企业制衣厂
+
+
+ 商品信息:
+ 106.60kg|¥1,332.00
+
+
+
+ 共 2 种面料,3 种颜色,共 4 条
+
+ 码单浏览
+ 码单编辑
+
+
+}
diff --git a/src/pages/codeList/components/companyItem/index.module.scss b/src/pages/codeList/components/companyItem/index.module.scss
new file mode 100644
index 0000000..aed10d4
--- /dev/null
+++ b/src/pages/codeList/components/companyItem/index.module.scss
@@ -0,0 +1,38 @@
+.company_item {
+ width: 702px;
+ height: 148px;
+ background: #ffffff;
+ border-radius: 16px;
+ margin-top: 24px;
+ display: flex;
+ padding: 0 24px;
+ align-items: center;
+ box-sizing: border-box;
+ .name {
+ width: 78px;
+ height: 78px;
+ background: linear-gradient(337deg, #7bb7ff 0%, #4581ff 100%);
+ border-radius: 50%;
+ color: #fff;
+ text-align: center;
+ line-height: 78px;
+ }
+ .desc {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ margin-left: 30px;
+ font-size: 28px;
+ text {
+ &:nth-child(1) {
+ margin-bottom: 16px;
+ }
+ &:nth-child(2) {
+ color: rgba(0, 0, 0, 0.6);
+ }
+ }
+ }
+ .company_icon {
+ transform: rotate(-90deg);
+ }
+}
diff --git a/src/pages/codeList/components/companyItem/index.tsx b/src/pages/codeList/components/companyItem/index.tsx
new file mode 100644
index 0000000..d62d39e
--- /dev/null
+++ b/src/pages/codeList/components/companyItem/index.tsx
@@ -0,0 +1,14 @@
+import { Text, View } from '@tarojs/components'
+import styles from './index.module.scss'
+import IconFont from '@/components/iconfont/iconfont'
+
+export default () => {
+ return
+ 欧
+
+ 布郡纺织有限公司
+ 杨翰俊 131****4873
+
+
+
+}
diff --git a/src/pages/codeList/components/companyModel/index.module.scss b/src/pages/codeList/components/companyModel/index.module.scss
new file mode 100644
index 0000000..854a539
--- /dev/null
+++ b/src/pages/codeList/components/companyModel/index.module.scss
@@ -0,0 +1,43 @@
+.company_main {
+ padding-bottom: 200px;
+ .company_search {
+ width: 750px;
+ height: 104px;
+ background: #ffffff;
+ display: flex;
+ padding: 0 24px;
+ box-sizing: border-box;
+ align-items: center;
+ margin-top: 1px;
+ .code_list_search--code {
+ width: 100%;
+ height: 72px;
+ background: #f7f7f7;
+ border-radius: 36px;
+ margin-right: 32px;
+ }
+ }
+ .company_con {
+ padding: 0 24px;
+ }
+ .company_create {
+ width: 750px;
+ height: 160px;
+ background: #ffffff;
+ display: flex;
+ justify-content: center;
+ font-size: 28px;
+ padding-top: 16px;
+ color: #fff;
+ position: fixed;
+ bottom: 0;
+ .company_create_btn {
+ text-align: center;
+ line-height: 80px;
+ width: 702px;
+ height: 80px;
+ background: #337fff;
+ border-radius: 44px;
+ }
+ }
+}
diff --git a/src/pages/codeList/components/companyModel/index.tsx b/src/pages/codeList/components/companyModel/index.tsx
new file mode 100644
index 0000000..3fb7abe
--- /dev/null
+++ b/src/pages/codeList/components/companyModel/index.tsx
@@ -0,0 +1,18 @@
+import { Text, View } from '@tarojs/components'
+import CompanyItem from '../companyItem'
+import styles from './index.module.scss'
+import Search from '@/components/search'
+
+export default () => {
+ return
+
+
+
+
+
+
+
+ 新建抬头
+
+
+}
diff --git a/src/pages/codeList/components/payeeHead/selectList/index.tsx b/src/pages/codeList/components/payeeHead/selectList/index.tsx
deleted file mode 100644
index 16f08ef..0000000
--- a/src/pages/codeList/components/payeeHead/selectList/index.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Text, View } from '@tarojs/components'
-import classNames from 'classnames'
-import { memo, useCallback, useEffect, useState } from 'react'
-import styles from './index.module.scss'
-
-export type SelectStatus = 1|2|3
-interface Param {
- defaultIndex?: SelectStatus
- onSelect?: (val: number) => void
-}
-export default memo((props: Param) => {
- const { defaultIndex = 1, onSelect } = props
- const [selectIndex, setSelectIndex] = useState(1)
- useEffect(() => {
- if (defaultIndex != selectIndex) { setSelectIndex(() => defaultIndex) }
- }, [defaultIndex])
- const getSelect = useCallback((index) => {
- setSelectIndex(() => index)
- onSelect?.(index)
- }, [])
- return
- getSelect(1)} className={classNames(styles.select_list_item, selectIndex == 1 && styles.select_list_ed)}>按整单
- getSelect(2)} className={classNames(styles.select_list_item, selectIndex == 2 && styles.select_list_ed)}>按面料
- getSelect(3)} className={classNames(styles.select_list_item, selectIndex == 3 && styles.select_list_ed)}>按颜色
-
-})
diff --git a/src/pages/codeList/index.config.ts b/src/pages/codeList/index.config.ts
index dc90e72..9ba4799 100644
--- a/src/pages/codeList/index.config.ts
+++ b/src/pages/codeList/index.config.ts
@@ -1,3 +1,3 @@
export default {
- navigationBarTitleText: '码单详情',
+ navigationBarTitleText: '码单管理',
}
diff --git a/src/pages/codeList/index.module.scss b/src/pages/codeList/index.module.scss
index a3260de..af21442 100644
--- a/src/pages/codeList/index.module.scss
+++ b/src/pages/codeList/index.module.scss
@@ -1,41 +1,34 @@
.code_list__main {
- background-color: #f7f7f7;
min-height: 100vh;
- padding-bottom: 150px;
- .code_list__head {
- background-color: #fff;
- padding: 24px;
- box-sizing: border-box;
- }
- .code_list_con {
+ background-color: #f7f7f7ff;
+ .code_list_search {
+ width: 750px;
+ height: 104px;
+ background: #ffffff;
+ display: flex;
padding: 0 24px;
- margin-top: 24px;
- .code_des {
- padding: 0 32px 32px 32px;
- background-color: #fff;
- border-radius: 16px;
- margin-top: 24px;
- .code_des_title {
- height: 82px;
- line-height: 82px;
- font-size: 28px;
- color: #000000;
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
- }
- .code_des_item {
- display: flex;
- justify-content: space-between;
+ box-sizing: border-box;
+ align-items: center;
+ margin-top: 1px;
+ .code_list_search--code {
+ width: 558px;
+ height: 72px;
+ background: #f7f7f7;
+ border-radius: 36px;
+ margin-right: 32px;
+ }
+ .code_list_search--data {
+ display: flex;
+ align-items: center;
+ text {
font-size: 28px;
color: rgba(0, 0, 0, 0.8);
- margin-top: 24px;
- .code_des_weight {
- font-weight: 500;
- }
- .code_des_price {
- color: #f64861;
- font-weight: 500;
- }
+ margin-right: 8px;
}
}
}
+ .code_list_con {
+ padding: 24px;
+ box-sizing: border-box;
+ }
}
diff --git a/src/pages/codeList/index.tsx b/src/pages/codeList/index.tsx
index c6e4c4b..7c81830 100644
--- a/src/pages/codeList/index.tsx
+++ b/src/pages/codeList/index.tsx
@@ -1,67 +1,19 @@
-import { Text, View } from '@tarojs/components'
-import classnames from 'classnames'
-import { useCallback, useState } from 'react'
+import { View } from '@tarojs/components'
+import { useState } from 'react'
import styles from './index.module.scss'
-import PayeeHead from './components/payeeHead'
-import type { SelectStatus } from './components/payeeHead/selectList'
-import SelectList from './components/payeeHead/selectList'
-import Counter from './components/counter'
-import SettingNumber from './components/settingNumber'
-import WholeOrderSetting from './components/wholeOrderSetting'
-import BottomBtn from './components/bottomBtn'
-import ProductSetting from './components/productSetting'
-import ColorSetting from './components/colorSetting'
-import useLogin from '@/use/useLogin'
-import IconFont from '@/components/iconfont/iconfont'
-import LabAndImg from '@/components/LabAndImg'
+import CodeModel from './components/codeModel'
+import CompanyModel from './components/companyModel'
+import SelectList from '@/components/selectList'
export default () => {
- const [modeIndex, setModeIndex] = useState(1)
- const getTypeSelect = useCallback((index) => {
- console.log('index::', index)
- setModeIndex(index)
- }, [])
+ const selectList = [
+ { value: 1, label: '码单列表' },
+ { value: 2, label: '抬头列表' },
+ ]
+ const [selectIndex, setSelectIndex] = useState(1)
return
-
-
-
-
-
- {modeIndex == 1 && }
- {modeIndex == 2 && }
- {modeIndex == 3 && }
-
- 自定义单据信息
-
- 合计空差
- 60kg
-
-
- 合计重量
- 230.2kg
-
-
- 合计金额
- ¥22,332.00
-
-
-
- 原始单据信息
-
- 合计空差
- 60kg
-
-
- 合计重量
- 230.2kg
-
-
- 合计金额
- ¥22,332.00
-
-
-
-
-
+ setSelectIndex(index)} />
+ {selectIndex == 1 && }
+ {selectIndex == 2 && }
}
diff --git a/src/pages/codeList/codeColorList/index.config.ts b/src/pages/codeSetting/codeColorList/index.config.ts
similarity index 100%
rename from src/pages/codeList/codeColorList/index.config.ts
rename to src/pages/codeSetting/codeColorList/index.config.ts
diff --git a/src/pages/codeList/codeColorList/index.module.scss b/src/pages/codeSetting/codeColorList/index.module.scss
similarity index 100%
rename from src/pages/codeList/codeColorList/index.module.scss
rename to src/pages/codeSetting/codeColorList/index.module.scss
diff --git a/src/pages/codeList/codeColorList/index.tsx b/src/pages/codeSetting/codeColorList/index.tsx
similarity index 100%
rename from src/pages/codeList/codeColorList/index.tsx
rename to src/pages/codeSetting/codeColorList/index.tsx
diff --git a/src/pages/codeList/components/bottomBtn/index.module.scss b/src/pages/codeSetting/components/bottomBtn/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/bottomBtn/index.module.scss
rename to src/pages/codeSetting/components/bottomBtn/index.module.scss
diff --git a/src/pages/codeList/components/bottomBtn/index.tsx b/src/pages/codeSetting/components/bottomBtn/index.tsx
similarity index 100%
rename from src/pages/codeList/components/bottomBtn/index.tsx
rename to src/pages/codeSetting/components/bottomBtn/index.tsx
diff --git a/src/pages/codeList/components/colorItemSetting/index.module.scss b/src/pages/codeSetting/components/colorItemSetting/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/colorItemSetting/index.module.scss
rename to src/pages/codeSetting/components/colorItemSetting/index.module.scss
diff --git a/src/pages/codeList/components/colorItemSetting/index.tsx b/src/pages/codeSetting/components/colorItemSetting/index.tsx
similarity index 100%
rename from src/pages/codeList/components/colorItemSetting/index.tsx
rename to src/pages/codeSetting/components/colorItemSetting/index.tsx
diff --git a/src/pages/codeList/components/colorSetting/index.module.scss b/src/pages/codeSetting/components/colorSetting/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/colorSetting/index.module.scss
rename to src/pages/codeSetting/components/colorSetting/index.module.scss
diff --git a/src/pages/codeList/components/colorSetting/index.tsx b/src/pages/codeSetting/components/colorSetting/index.tsx
similarity index 100%
rename from src/pages/codeList/components/colorSetting/index.tsx
rename to src/pages/codeSetting/components/colorSetting/index.tsx
diff --git a/src/pages/codeList/components/counter/index.module.scss b/src/pages/codeSetting/components/counter/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/counter/index.module.scss
rename to src/pages/codeSetting/components/counter/index.module.scss
diff --git a/src/pages/codeList/components/counter/index.tsx b/src/pages/codeSetting/components/counter/index.tsx
similarity index 100%
rename from src/pages/codeList/components/counter/index.tsx
rename to src/pages/codeSetting/components/counter/index.tsx
diff --git a/src/pages/codeList/components/payeeHead/index.module.scss b/src/pages/codeSetting/components/payeeHead/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/payeeHead/index.module.scss
rename to src/pages/codeSetting/components/payeeHead/index.module.scss
diff --git a/src/pages/codeList/components/payeeHead/index.tsx b/src/pages/codeSetting/components/payeeHead/index.tsx
similarity index 100%
rename from src/pages/codeList/components/payeeHead/index.tsx
rename to src/pages/codeSetting/components/payeeHead/index.tsx
diff --git a/src/pages/codeList/components/productItem/index.module.scss b/src/pages/codeSetting/components/productItem/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/productItem/index.module.scss
rename to src/pages/codeSetting/components/productItem/index.module.scss
diff --git a/src/pages/codeList/components/productItem/index.tsx b/src/pages/codeSetting/components/productItem/index.tsx
similarity index 100%
rename from src/pages/codeList/components/productItem/index.tsx
rename to src/pages/codeSetting/components/productItem/index.tsx
diff --git a/src/pages/codeList/components/productSetting/index.module.scss b/src/pages/codeSetting/components/productSetting/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/productSetting/index.module.scss
rename to src/pages/codeSetting/components/productSetting/index.module.scss
diff --git a/src/pages/codeList/components/productSetting/index.tsx b/src/pages/codeSetting/components/productSetting/index.tsx
similarity index 100%
rename from src/pages/codeList/components/productSetting/index.tsx
rename to src/pages/codeSetting/components/productSetting/index.tsx
diff --git a/src/pages/codeList/components/settingNumber/index.module.scss b/src/pages/codeSetting/components/settingNumber/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/settingNumber/index.module.scss
rename to src/pages/codeSetting/components/settingNumber/index.module.scss
diff --git a/src/pages/codeList/components/settingNumber/index.tsx b/src/pages/codeSetting/components/settingNumber/index.tsx
similarity index 100%
rename from src/pages/codeList/components/settingNumber/index.tsx
rename to src/pages/codeSetting/components/settingNumber/index.tsx
diff --git a/src/pages/codeList/components/wholeOrderSetting/index.module.scss b/src/pages/codeSetting/components/wholeOrderSetting/index.module.scss
similarity index 100%
rename from src/pages/codeList/components/wholeOrderSetting/index.module.scss
rename to src/pages/codeSetting/components/wholeOrderSetting/index.module.scss
diff --git a/src/pages/codeList/components/wholeOrderSetting/index.tsx b/src/pages/codeSetting/components/wholeOrderSetting/index.tsx
similarity index 100%
rename from src/pages/codeList/components/wholeOrderSetting/index.tsx
rename to src/pages/codeSetting/components/wholeOrderSetting/index.tsx
diff --git a/src/pages/codeSetting/index.config.ts b/src/pages/codeSetting/index.config.ts
new file mode 100644
index 0000000..dc90e72
--- /dev/null
+++ b/src/pages/codeSetting/index.config.ts
@@ -0,0 +1,3 @@
+export default {
+ navigationBarTitleText: '码单详情',
+}
diff --git a/src/pages/codeSetting/index.module.scss b/src/pages/codeSetting/index.module.scss
new file mode 100644
index 0000000..a3260de
--- /dev/null
+++ b/src/pages/codeSetting/index.module.scss
@@ -0,0 +1,41 @@
+.code_list__main {
+ background-color: #f7f7f7;
+ min-height: 100vh;
+ padding-bottom: 150px;
+ .code_list__head {
+ background-color: #fff;
+ padding: 24px;
+ box-sizing: border-box;
+ }
+ .code_list_con {
+ padding: 0 24px;
+ margin-top: 24px;
+ .code_des {
+ padding: 0 32px 32px 32px;
+ background-color: #fff;
+ border-radius: 16px;
+ margin-top: 24px;
+ .code_des_title {
+ height: 82px;
+ line-height: 82px;
+ font-size: 28px;
+ color: #000000;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+ }
+ .code_des_item {
+ display: flex;
+ justify-content: space-between;
+ font-size: 28px;
+ color: rgba(0, 0, 0, 0.8);
+ margin-top: 24px;
+ .code_des_weight {
+ font-weight: 500;
+ }
+ .code_des_price {
+ color: #f64861;
+ font-weight: 500;
+ }
+ }
+ }
+ }
+}
diff --git a/src/pages/codeSetting/index.tsx b/src/pages/codeSetting/index.tsx
new file mode 100644
index 0000000..05195b9
--- /dev/null
+++ b/src/pages/codeSetting/index.tsx
@@ -0,0 +1,70 @@
+import { Text, View } from '@tarojs/components'
+import classnames from 'classnames'
+import { useCallback, useState } from 'react'
+import styles from './index.module.scss'
+import PayeeHead from './components/payeeHead'
+import Counter from './components/counter'
+import SettingNumber from './components/settingNumber'
+import WholeOrderSetting from './components/wholeOrderSetting'
+import BottomBtn from './components/bottomBtn'
+import ProductSetting from './components/productSetting'
+import ColorSetting from './components/colorSetting'
+import SelectList from '@/components/selectList'
+import useLogin from '@/use/useLogin'
+import IconFont from '@/components/iconfont/iconfont'
+import LabAndImg from '@/components/LabAndImg'
+
+export default () => {
+ const selectList = [
+ { value: 1, label: '按整单' },
+ { value: 2, label: '按面料' },
+ { value: 3, label: '按颜色' },
+ ]
+ const [modeIndex, setModeIndex] = useState(1)
+ const getTypeSelect = useCallback((index) => {
+ setModeIndex(index)
+ }, [])
+ return
+
+
+
+
+
+ {modeIndex == 1 && }
+ {modeIndex == 2 && }
+ {modeIndex == 3 && }
+
+ 自定义单据信息
+
+ 合计空差
+ 60kg
+
+
+ 合计重量
+ 230.2kg
+
+
+ 合计金额
+ ¥22,332.00
+
+
+
+ 原始单据信息
+
+ 合计空差
+ 60kg
+
+
+ 合计重量
+ 230.2kg
+
+
+ 合计金额
+ ¥22,332.00
+
+
+
+
+
+
+}
diff --git a/src/pages/weightList/components/companyItem/index.module.scss b/src/pages/weightList/components/companyItem/index.module.scss
new file mode 100644
index 0000000..aed10d4
--- /dev/null
+++ b/src/pages/weightList/components/companyItem/index.module.scss
@@ -0,0 +1,38 @@
+.company_item {
+ width: 702px;
+ height: 148px;
+ background: #ffffff;
+ border-radius: 16px;
+ margin-top: 24px;
+ display: flex;
+ padding: 0 24px;
+ align-items: center;
+ box-sizing: border-box;
+ .name {
+ width: 78px;
+ height: 78px;
+ background: linear-gradient(337deg, #7bb7ff 0%, #4581ff 100%);
+ border-radius: 50%;
+ color: #fff;
+ text-align: center;
+ line-height: 78px;
+ }
+ .desc {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ margin-left: 30px;
+ font-size: 28px;
+ text {
+ &:nth-child(1) {
+ margin-bottom: 16px;
+ }
+ &:nth-child(2) {
+ color: rgba(0, 0, 0, 0.6);
+ }
+ }
+ }
+ .company_icon {
+ transform: rotate(-90deg);
+ }
+}
diff --git a/src/pages/weightList/components/companyItem/index.tsx b/src/pages/weightList/components/companyItem/index.tsx
new file mode 100644
index 0000000..71ec425
--- /dev/null
+++ b/src/pages/weightList/components/companyItem/index.tsx
@@ -0,0 +1,19 @@
+import { Text, View } from '@tarojs/components'
+import styles from './index.module.scss'
+import IconFont from '@/components/iconfont/iconfont'
+import { goLink } from '@/common/common'
+
+interface Param {
+ value: { title: string; purchaser_name: string; id: number; phone: string }
+}
+export default (props: Param) => {
+ const { value } = props
+ return goLink(`/pages/weightListAdd/index?type=edit&id=${value.id}`)}>
+ {value?.title || ''}
+
+ {value?.title }
+ {`${value?.purchaser_name} ${value?.phone}`}
+
+
+
+}
diff --git a/src/pages/weightList/index copy.tsx b/src/pages/weightList/index copy.tsx
new file mode 100644
index 0000000..fdcfaa9
--- /dev/null
+++ b/src/pages/weightList/index copy.tsx
@@ -0,0 +1,101 @@
+
+import { Button, Navigator, ScrollView, Text, View } from '@tarojs/components'
+import { memo, useEffect, useState } from 'react'
+import { weightDeleteApi, weightListApi } from '@/api/weightList'
+import './index.scss'
+import Taro, { showModal } from '@tarojs/taro'
+import { alert } from '@/common/common'
+
+const weightListManager = () => {
+ 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
diff --git a/src/pages/weightList/index.config.ts b/src/pages/weightList/index.config.ts
index 935bd6e..76c7088 100644
--- a/src/pages/weightList/index.config.ts
+++ b/src/pages/weightList/index.config.ts
@@ -1,4 +1,5 @@
export default {
navigationBarTitleText: '码单管理',
enableShareAppMessage: true,
+ backgroundColor: '#F7F7F7FF',
}
diff --git a/src/pages/weightList/index.scss b/src/pages/weightList/index.scss
index 49092d2..22d2ec7 100644
--- a/src/pages/weightList/index.scss
+++ b/src/pages/weightList/index.scss
@@ -1,6 +1,7 @@
.weight-list-manager {
height: 100vh;
+ background-color: #f7f7f7ff;
.weight-list-scroll-view {
height: 100%;
box-sizing: border-box;
@@ -10,6 +11,10 @@
box-sizing: border-box;
}
+ .weight-list-con {
+ display: flex;
+ justify-content: center;
+ }
.weight-list-list {
width: 704px;
height: 156px;
diff --git a/src/pages/weightList/index.tsx b/src/pages/weightList/index.tsx
index 3b70638..17ca569 100644
--- a/src/pages/weightList/index.tsx
+++ b/src/pages/weightList/index.tsx
@@ -1,14 +1,13 @@
import { Button, Navigator, ScrollView, Text, View } from '@tarojs/components'
import { memo, useEffect, useState } from 'react'
+import CompanyItem from './components/companyItem'
import { weightDeleteApi, weightListApi } 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 (
@@ -70,22 +69,8 @@ const WeightList = (props: Params) => {
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), '****')}
-
-
-
-
-
+
+
)
})
@@ -95,7 +80,7 @@ const WeightList = (props: Params) => {
}
- 添加新码单信息
+ 新建抬头
)
}
diff --git a/src/use/usePayBank.ts b/src/use/usePayBank.ts
index aaf3e87..49aeecb 100644
--- a/src/use/usePayBank.ts
+++ b/src/use/usePayBank.ts
@@ -16,13 +16,12 @@ export default (props: Param) => {
console.log('openstatus::', openStatus)
useEffect(() => {
Taro.onAppShow((res) => {
- if (res?.referrerInfo?.appId == BANk_WX_APPID && props.custMerchId) {
- console.log('onAppShow::', res)
+ if (res?.referrerInfo?.appId == BANk_WX_APPID && !openStatus.current && props.custMerchId) {
callBack?.(res)
const tf = res?.referrerInfo?.extraData?.payStatus == 'success'
setPayStatus(() => tf)
- openStatus.current = true
}
+ openStatus.current = true
})
}, [props])
@@ -39,6 +38,7 @@ export default (props: Param) => {
},
success(res) { // 打开成功的回调函数
console.log('打开成功::', res)
+ openStatus.current = false
},
fail(res) {
console.log('打开失败::', res)