|
|
@@ -15,7 +15,7 @@ export const lockEnum = {
|
|
|
const RoadpricingTabList = props => {
|
|
|
const {
|
|
|
compilationList,
|
|
|
- cloudUser: { online_list = [] },
|
|
|
+ cloudUser: { online_list = [], mobile, username },
|
|
|
projectType,
|
|
|
ssoId
|
|
|
} = props
|
|
|
@@ -37,6 +37,8 @@ const RoadpricingTabList = props => {
|
|
|
compilationId: '',
|
|
|
compilationName: '',
|
|
|
upgradeTypeEnum: '',
|
|
|
+ compilationListName: '',
|
|
|
+ deadline: '',
|
|
|
lockTypeEnum: '',
|
|
|
visible: false,
|
|
|
loading: false
|
|
|
@@ -88,10 +90,31 @@ const RoadpricingTabList = props => {
|
|
|
width: '25%',
|
|
|
render: (_, record) => (
|
|
|
<>
|
|
|
- {record.isUpgrade ? (
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ danger
|
|
|
+ ghost
|
|
|
+ size="small"
|
|
|
+ className="m-2px"
|
|
|
+ onClick={() =>
|
|
|
+ setRoadPricingUpgrade({
|
|
|
+ ...setRoadPricingUpgrade,
|
|
|
+ visible: true,
|
|
|
+ type: titleType.GIVE,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ lockTypeEnum: lockTypeEnum.GIVE,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.UPGRADE
|
|
|
+ })
|
|
|
+ }>
|
|
|
+ 赠送
|
|
|
+ </Button>
|
|
|
+ {record.lock === 1 ? (
|
|
|
<>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ danger
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="m-2px"
|
|
|
@@ -99,18 +122,43 @@ const RoadpricingTabList = props => {
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.GIVE,
|
|
|
+ type: titleType.DEMOTION,
|
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
|
compilationId: record._id,
|
|
|
compilationName: record.name,
|
|
|
- lockTypeEnum: lockTypeEnum.GIVE,
|
|
|
+ compilationListName: record.name,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.DEMOTION
|
|
|
+ })
|
|
|
+ }>
|
|
|
+ 降级
|
|
|
+ </Button>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ danger
|
|
|
+ ghost
|
|
|
+ size="small"
|
|
|
+ className="m-2px"
|
|
|
+ onClick={() =>
|
|
|
+ setRoadPricingUpgrade({
|
|
|
+ ...setRoadPricingUpgrade,
|
|
|
+ visible: true,
|
|
|
+ type: titleType.SALE,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ lockTypeEnum: lockTypeEnum.SALE,
|
|
|
upgradeTypeEnum: upgradeTypeEnum.UPGRADE
|
|
|
})
|
|
|
}>
|
|
|
- 赠送
|
|
|
+ 销售
|
|
|
</Button>
|
|
|
+ </>
|
|
|
+ ) : null}
|
|
|
+ {record.lock === 2 ? (
|
|
|
+ <>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ danger
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="m-2px"
|
|
|
@@ -118,43 +166,70 @@ const RoadpricingTabList = props => {
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.DEMOTION
|
|
|
+ type: titleType.DEMOTION,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ compilationListName: record.name,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.DEMOTION
|
|
|
})
|
|
|
}>
|
|
|
降级
|
|
|
</Button>
|
|
|
+ </>
|
|
|
+ ) : null}
|
|
|
+ {record.lock === 3 ? (
|
|
|
+ <>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ danger
|
|
|
ghost
|
|
|
size="small"
|
|
|
+ className="m-2px"
|
|
|
onClick={() =>
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.DEADLINE
|
|
|
+ type: titleType.DEMOTION,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ compilationListName: record.name,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.DEMOTION
|
|
|
})
|
|
|
}>
|
|
|
- 限期
|
|
|
+ 降级
|
|
|
</Button>
|
|
|
</>
|
|
|
- ) : (
|
|
|
+ ) : null}
|
|
|
+ {record.isUpgrade ? (
|
|
|
<>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
ghost
|
|
|
size="small"
|
|
|
- className="m-2px"
|
|
|
onClick={() =>
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.GIVE
|
|
|
+ type: titleType.DEADLINE,
|
|
|
+ deadline: record.deadline,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ compilationListName: record.name,
|
|
|
+ lockTypeEnum: record.lock,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.DEADLINE
|
|
|
})
|
|
|
}>
|
|
|
- 赠送
|
|
|
+ 限期
|
|
|
</Button>
|
|
|
+ </>
|
|
|
+ ) : (
|
|
|
+ <>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ danger
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="m-2px"
|
|
|
@@ -162,13 +237,19 @@ const RoadpricingTabList = props => {
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.LEND
|
|
|
+ type: titleType.LEND,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ lockTypeEnum: lockTypeEnum.LEND,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.UPGRADE
|
|
|
})
|
|
|
}>
|
|
|
借出
|
|
|
</Button>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
+ danger
|
|
|
ghost
|
|
|
size="small"
|
|
|
className="m-2px"
|
|
|
@@ -176,7 +257,12 @@ const RoadpricingTabList = props => {
|
|
|
setRoadPricingUpgrade({
|
|
|
...setRoadPricingUpgrade,
|
|
|
visible: true,
|
|
|
- type: titleType.SALE
|
|
|
+ type: titleType.SALE,
|
|
|
+ // eslint-disable-next-line no-underscore-dangle
|
|
|
+ compilationId: record._id,
|
|
|
+ compilationName: record.name,
|
|
|
+ lockTypeEnum: lockTypeEnum.SALE,
|
|
|
+ upgradeTypeEnum: upgradeTypeEnum.UPGRADE
|
|
|
})
|
|
|
}>
|
|
|
销售
|
|
|
@@ -241,10 +327,13 @@ const RoadpricingTabList = props => {
|
|
|
onCancel={() => setRoadPricingUpgrade({ ...roadPricingUpgrade, visible: false })}
|
|
|
projectType={projectType}
|
|
|
ssoId={ssoId}
|
|
|
+ cloudUser={{ mobile, username }}
|
|
|
compilationId={roadPricingUpgrade.compilationId}
|
|
|
compilationName={roadPricingUpgrade.compilationName}
|
|
|
lock={roadPricingUpgrade.lockTypeEnum}
|
|
|
upgradeType={roadPricingUpgrade.upgradeTypeEnum}
|
|
|
+ compilationListName={roadPricingUpgrade.compilationListName}
|
|
|
+ deadline={roadPricingUpgrade.deadline}
|
|
|
/>
|
|
|
</div>
|
|
|
)
|