diff --git a/src/api/order.ts b/src/api/order.ts
index 08a5071..3c2caa9 100644
--- a/src/api/order.ts
+++ b/src/api/order.ts
@@ -39,7 +39,7 @@ export const mpproductcolorlist = () => {
//购物车提交
export const mpsaleOrderpreView = () => {
return useRequest({
- url: `/v1/mp/saleOrder/preView`,
+ url: `/v2/mp/saleOrder/preView`,
method: "put"
})
}
diff --git a/src/common/constant.js b/src/common/constant.js
index 57a4306..c7f5b9b 100644
--- a/src/common/constant.js
+++ b/src/common/constant.js
@@ -1,4 +1,4 @@
-// export const BASE_URL = CURRENT_BASE_URL
+export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
@@ -14,7 +14,7 @@
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
// export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
-export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
+// export const BASE_URL = `http://192.168.1.95:40001/lymarket` // 华
// CDN
// 生成密钥
diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx
index e4bcfea..6c5c8a0 100644
--- a/src/components/search/index.tsx
+++ b/src/components/search/index.tsx
@@ -21,7 +21,9 @@ type Params = {
defaultValue?: string
children?: ReactNode
customRightSlot?: ReactNode
- adjustPosition?: boolean
+ adjustPosition?: boolean,
+ showScan?: boolean
+ handScan?: () => void
}
export default memo(
@@ -30,7 +32,7 @@ export default memo(
{
clickOnSearch, //点击筛选按钮触发
changeOnSearch, //输入文字触发
- adjustPosition=false,
+ adjustPosition = false,
disabled = false, //是否禁用
placeholder = '输入搜索内容',
showIcon = true, //是否显示关闭图标
@@ -42,6 +44,8 @@ export default memo(
defaultValue = '', //默认值
children,
customRightSlot,
+ showScan = false,
+ handScan
}: Params,
ref,
) => {
@@ -102,6 +106,16 @@ export default memo(
{!!inputCon && clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
+ {
+ showScan && {
+ handScan?.()
+ }}>
+
+
+ }
+
{customRightSlot}
diff --git a/src/pages/order/index.tsx b/src/pages/order/index.tsx
index 9420491..2e64946 100644
--- a/src/pages/order/index.tsx
+++ b/src/pages/order/index.tsx
@@ -22,14 +22,24 @@ import {
} from '@/api/order'
import PayPopup from './components/PayPopup'
import { formatDateTime, formatHashTag, formatImgUrl, formatPriceDiv, formatWeightDiv } from '@/common/format'
+interface filterObj {
+ purchaser_id?: string | number,
+ clientName?: string,
+ sale_user_id?: string | number,
+ saleuserName?: string,
+ order_no?: string | undefined,
+ sale_mode?: Number | undefined,
+ shipment_mode?: Number | undefined
+}
+
export default () => {
//页码和页数
- const [searchField, setSearchField] = useState<{ status: number | unknown; page: number; size: number; name: string }>({
+ const [searchField, setSearchField] = useState<{ status: number | unknown; page: number; size: number; order_no: string }>({
status: -1,
page: 1,
size: 10,
- name: '',
+ order_no: '',
})
//获取订单列表
@@ -88,8 +98,6 @@ export default () => {
const changeStatus = useCallback((e) => {
pageNum.current.page = 1
setSearchField((value) => ({ ...value, status: e, size: 10 }))
-
- console.log(e, '123123')
setOrderData(() => ({ list: [], total: 0 }))
}, [])
@@ -97,7 +105,7 @@ export default () => {
const getSearchData = useCallback((e) => {
pageNum.current.page = 1
setOrderData(() => ({ list: [], total: 0 }))
- setSearchField((val) => ({ ...val, name: e, size: 10 }))
+ setSearchField((val) => ({ ...val, order_no: e, size: 10 }))
}, [])
//筛选内容展示
const [showPopup, setshowPopup] = useState(false)
@@ -126,15 +134,7 @@ export default () => {
}))
})
- interface filterObj {
- purchaser_id?: string | number,
- clientName?: string,
- sale_user_id?: string | number,
- saleuserName?: string,
- orderNo?: string | undefined,
- sale_mode?: Number | undefined,
- shipment_mode?: Number | undefined
- }
+
//筛选参数
const [searchObj, setsearchObj] = useState({
@@ -142,7 +142,7 @@ export default () => {
clientName: '',
sale_user_id: '',
saleuserName: '',
- orderNo: '',
+ // order_no: '',
sale_mode: undefined,
shipment_mode: undefined
})
@@ -158,10 +158,10 @@ export default () => {
})
}
}
- //订单号输入框
- const handInput = (eq) => {
- setsearchObj((e) => ({ ...e, orderNo: eq.detail.value }))
- }
+ // //订单号输入框
+ // const handInput = (eq) => {
+ // setsearchObj((e) => ({ ...e, order_no: eq.detail.value }))
+ // }
//订单类型
const [modeList, setModeList] = useState([{ id: -1, name: '不限' }, { id: 0, name: '大货' }, { id: 1, name: '剪版' }, { id: 2, name: '散剪' }])
@@ -197,7 +197,6 @@ export default () => {
//是否不允许确认筛选
const isDisabled = useMemo(() => {
if (searchObj.clientName !== '' ||
- searchObj.orderNo !== '' ||
searchObj.saleuserName !== '' ||
searchObj.sale_mode !== undefined ||
searchObj.shipment_mode !== undefined
@@ -210,15 +209,16 @@ export default () => {
//重置
const handReset = () => {
+ pageNum.current.page = 1
setsearchObj({
purchaser_id: '',
clientName: '',
sale_user_id: '',
saleuserName: '',
- orderNo: '',
sale_mode: undefined,
- shipment_mode: undefined
+ shipment_mode: undefined,
})
+ setSearchField({ ...searchField, size: 10 })
const arrOne = resetArr(modeList)
setModeList([...arrOne])
const arrTwo = resetArr(deliveryList)
@@ -242,7 +242,8 @@ export default () => {
const handScan = () => {
Taro.scanCode({
success(res) {
- setsearchObj((e) => ({ ...e, orderNo: res.result }))
+ // setsearchObj((e) => ({ ...e, order_no: res.result }))
+ setSearchField({ ...searchField, order_no: res.result })
},
fail(res) {
console.log(res);
@@ -594,7 +595,7 @@ export default () => {
return (
-
+ handScan()} showScan placeholder='搜索商品/名称/颜色/订单号' showBtn={false} changeOnSearch={getSearchData} debounceTime={300}>
showSelctPopup()}>
筛选
@@ -644,24 +645,6 @@ export default () => {
-
- 订单单号
-
- {
- handInput(e)
- }}
- placeholderStyle='color:#000000; font-size:26rpx'
- className={styles.orderInput}
- value={searchObj.orderNo}
- placeholder={'请输入或扫描条形码'}>
- {
- handScan()
- }}>
-
-
订单类型
diff --git a/src/pages/orderDetails/index.tsx b/src/pages/orderDetails/index.tsx
index 0ada023..f7c2b1a 100644
--- a/src/pages/orderDetails/index.tsx
+++ b/src/pages/orderDetails/index.tsx
@@ -82,6 +82,10 @@ export default () => {
const [infoObj, setInfoObj] = useState({})
//获取订单详情
const getDetail = async () => {
+ Taro.showLoading({
+ title: '加载中...',
+ mask: true
+ })
const res = await infoFetch({ id: router.params.id })
setInfoObj(res.data)
orderMsg.map(it => {
@@ -100,6 +104,7 @@ export default () => {
})
setOrderMsg([...orderMsg])
setReceivingStatus(res.data.shipment_mode)
+ Taro.hideLoading()
}
//复制功能
const clipboardData = () => {
diff --git a/src/pages/searchPage/index.tsx b/src/pages/searchPage/index.tsx
index a4afdd4..0207be9 100644
--- a/src/pages/searchPage/index.tsx
+++ b/src/pages/searchPage/index.tsx
@@ -310,7 +310,7 @@ export default memo(() => {
}
{
- !histroyList.length &&
+ !histroyList.length &&
}
>
}
@@ -330,7 +330,7 @@ export default memo(() => {
})
}
{
- !searchList.length &&
+ !searchList.length &&
}
>
}
diff --git a/src/pages/submitOrder/index.tsx b/src/pages/submitOrder/index.tsx
index 19963a0..168e48f 100644
--- a/src/pages/submitOrder/index.tsx
+++ b/src/pages/submitOrder/index.tsx
@@ -8,7 +8,7 @@ import Remark from '../orderDetails/components//remark'
import Popup from '@/components/popup'
import { debounce } from '@/common/util'
import {
- mpsaleOrder,
+ mpsaleOrderpreView,
mpsaleOrderput,
mpsaleOrderaddress
} from '@/api/order'
@@ -16,7 +16,7 @@ import { alert } from '@/common/common'
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
export default () => {
- const router = useRouter()
+ const router: any = useRouter()
useDidShow(() => {
getDetail()
@@ -62,11 +62,23 @@ export default () => {
}
}, 300)
- const { fetchData: infoFetch } = mpsaleOrder()
+ const { fetchData: infoFetch } = mpsaleOrderpreView()
const [infoObj, setInfoObj] = useState({})
//获取订单详情
const getDetail = async () => {
- const res = await infoFetch({ id: 27708 })
+ let list: any[] = []
+ router.params?.shopping_cart_product_color_list?.forEach(item => {
+ list.push({
+ shopping_cart_product_color_id: item.shopping_cart_product_color_id,
+ sale_price: 0
+ })
+ })
+ const query = {
+ purchaser_id: router.params.purchaser_id,
+ sale_mode: router.params.sale_mode,
+ shopping_cart_product_color_list: list
+ }
+ const res = await infoFetch(query)
setInfoObj(res.data)
setReceivingStatus(res.data.shipment_mode)
}
diff --git a/src/styles/iconfont.scss b/src/styles/iconfont.scss
index b109443..b150c60 100644
--- a/src/styles/iconfont.scss
+++ b/src/styles/iconfont.scss
@@ -3,7 +3,7 @@
/* Project id 3619513 */
// url('/src/styles/iconfont.ttf') format('truetype');
src:
- url('/src/styles/iconfont.ttf?t=1663556335905') format('truetype');
+ url('iconfont.ttf?t=1663556335905') format('truetype');
}
.iconfont {
@@ -296,4 +296,4 @@
.icon-gouwu:before {
content: "\e607";
-}
+}
\ No newline at end of file