feat: 新增包码结算计划
This commit is contained in:
parent
8548013e11
commit
6e6c55e6a8
|
@ -103,19 +103,16 @@ export default class add extends React.Component {
|
|||
}
|
||||
// 设置 是否是包码
|
||||
setTlementType = (type) => {
|
||||
console.log("type =>", type)
|
||||
this.setState({ isSettlement: type })
|
||||
console.log("key list =>", this.state.keys)
|
||||
// return
|
||||
this.setState({ keys: ["step2-0"] })
|
||||
}
|
||||
// 设置 包码数据
|
||||
setTlementData = (data) => {
|
||||
console.log("data =>", data)
|
||||
this.setState({ settlementData: data })
|
||||
}
|
||||
|
||||
async onNextStep() {
|
||||
// 流程1
|
||||
if (this.state.curstep >= 1) {
|
||||
if ((await this.refs.step1.submit()) == true) {
|
||||
this.setState({ curstep: 2, isload: true })
|
||||
|
@ -123,6 +120,7 @@ export default class add extends React.Component {
|
|||
return
|
||||
}
|
||||
}
|
||||
// 流程2
|
||||
if (this.state.curstep >= 2) {
|
||||
let temp = []
|
||||
for (let i = 0; i < this.state.keys.length; i++) {
|
||||
|
@ -145,7 +143,6 @@ export default class add extends React.Component {
|
|||
key: temp
|
||||
}
|
||||
let plan_id = sessionStorage.getItem("plan_id")
|
||||
|
||||
await addPlanStep(plan_id, obj).then((res) => {
|
||||
handelResponse(
|
||||
res,
|
||||
|
@ -160,6 +157,8 @@ export default class add extends React.Component {
|
|||
)
|
||||
})
|
||||
}
|
||||
|
||||
// 流程3
|
||||
if (this.state.curstep == 3) {
|
||||
if (this.state.direct_reseller_id <= 0) {
|
||||
// 老数据不能进行新增商品操作
|
||||
|
@ -182,9 +181,7 @@ export default class add extends React.Component {
|
|||
res,
|
||||
(req, msg) => {
|
||||
//获取电话 邮箱
|
||||
|
||||
let id = obj.info.reseller_id
|
||||
|
||||
getReseller(id).then((res) => {
|
||||
handelResponse(res, (req, msg) => {
|
||||
this.setState({
|
||||
|
|
|
@ -265,6 +265,8 @@ export default class acclist extends React.Component {
|
|||
data.code_batch = dataCopy
|
||||
data.mobile_excel = this.state.mobile_excel
|
||||
data.mobile_repeat = this.state.mobile_repeat
|
||||
data.key_official_price = this.state.model.key_official_price
|
||||
data.key_cost_price = this.state.model.key_cost_price
|
||||
return data
|
||||
}
|
||||
} else {
|
||||
|
@ -576,7 +578,7 @@ export default class acclist extends React.Component {
|
|||
if (validator) {
|
||||
let param = this.refs.addEditExchangeEl.getModel()
|
||||
// 第三步:包码只能选一个
|
||||
if (this.props.isSettlement === 1 && param.product.legal.length >= 1) {
|
||||
if (this.props.isSettlement === 1 && param.product.legal.length > 1) {
|
||||
Notify.error("包码只能创建一个商品")
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue