Commit 19c6ae6b authored by XieZhiXiong's avatar XieZhiXiong

Merge branch 'v2-220418' of…

Merge branch 'v2-220418' of ssh://gitlab.shushangyun.com:8122/linkseeks-design/pro-platform into fix-v2-220418
parents e6e2ab7a a49715dd
......@@ -27,7 +27,7 @@ import MaterialRoute from './materialRoute';
// import contracRoute from './contracRoute';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const isDev = false;
const isDev = process.env.NODE_ENV === "development";
const homeRoute = {
path: `/memberCenter/home`,
name: 'home',
......
......@@ -10,6 +10,7 @@ import {
interface RoleSelectProps {
request?: (payload: any) => Promise<any>
params?: object
onChange?: (e) => void
}
......@@ -20,7 +21,7 @@ interface RoleSelectProps {
*/
function RoleSelect(props: RoleSelectProps) {
const { onChange } = props
const { request, params, onChange } = props
const [visible, setVisible] = useState(false);
const [form] = Form.useForm()
......@@ -38,7 +39,10 @@ function RoleSelect(props: RoleSelectProps) {
useEffect(() => {
getMemberManageLowerConsumerMemberPage(form.getFieldsValue()).then(res => {
request({
...params,
...form.getFieldsValue()
}).then(res => {
setDataSource(res.data.data)
})
......@@ -48,7 +52,7 @@ function RoleSelect(props: RoleSelectProps) {
<>
<Row gutter={4}>
<Col span={18}>
<Input value={intV?.name} />
<Input value={intV?.name} disabled/>
</Col>
<Col span={6}>
<Button onClick={showDrawer}>选择采购会员</Button>
......@@ -75,16 +79,12 @@ function RoleSelect(props: RoleSelectProps) {
</Form>
<Radio.Group className="block w-full" onChange={(e) => {
const value = e.target.value
let target = {
buyerMemberId: value.memberId,
buyerRoleId: value.roleId,
roleType: 2
}
setIntV(target)
onChange(target)
setIntV(value)
onChange(value)
}}>
<Table
className="w-full"
rowKey={'id'}
columns={TableMemberColumn}
dataSource={dataSource}
/>
......@@ -94,5 +94,9 @@ function RoleSelect(props: RoleSelectProps) {
</>
);
}
RoleSelect.defaultProps = {
request: getMemberManageLowerConsumerMemberPage,
params: {},
onChange: (e) => {}
}
export default RoleSelect;
\ No newline at end of file
......@@ -51,7 +51,8 @@ export const ReceivingAddress = '收货地址';
export const SubmitDeliveryNotice = '提交送货通知单';
export const ConfirmDeliveryNotice = '确认送货通知单';
export const DeliveryPlanText = '送货计划'
export const DeliveryPlanRemark = '最长600个字符,300个汉字'
......
// 公共组装类工具
/**
* 数组转对象 默认赋值 0 (示例:['$04-01','$04-02'] = { '$04-01': {}, '$04-02': {} })
* @param arr
* @returns
*/
const convertArrtoObj = (arr) => {
return arr.reduce((obj,currVal) => {
return{
...obj,
[currVal]: { day: currVal.substr(1), planCount: 0, createNotice: false, createDelivery: false }
}
}, {})
}
export {
convertArrtoObj
}
\ No newline at end of file
// 公共日期类工具
const getDayAll = (starDay: string, endDay: string) => {
let arr = []
let dates = []
......@@ -24,13 +26,46 @@ const getDayAll = (starDay: string, endDay: string) => {
let day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()
// year + '-' +
// let YYMMDD = year + '-' + mouth + '-' + day
let MMDD = mouth + '-' + day
let MMDD = '$' + mouth + '-' + day
dates.push(MMDD)
}
// dates.pop()
return dates
}
// deliveryPlanManagement - deliveryPlanAwaitB2B - details copy.ts 测试使用,上线前需要删除
const getDayAll2 = (starDay: string, endDay: string) => {
let arr = []
let dates = []
// 设置两个日期UTC时间
let db = new Date(starDay)
let de = new Date(endDay)
// 获取两个日期GTM时间
let s = db.getTime() - 24 * 60 * 60 * 1000
let d = de.getTime() - 24 * 60 * 60 * 1000
// 获取到两个日期之间的每一天的毫秒数
for (let i = s; i <= d; ) {
i = i + 24 * 60 * 60 * 1000
arr.push(parseInt(String(i)))
}
// 获取每一天的时间 YY-MM-DD
for (let j in arr) {
let time = new Date(arr[j])
let year = time.getFullYear()
let mouth = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1)
let day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate()
// year + '-' +
let YYMMDD = year + '-' + mouth + '-' + day
dates.push(YYMMDD)
}
dates.pop()
return dates
}
export {
getDayAll
getDayAll,
getDayAll2,
}
\ No newline at end of file
export * from './status'
\ No newline at end of file
export * from './status'
export * from './date'
export * from './assemblyTools'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment