更改商品上传字段
This commit is contained in:
parent
c243d9657c
commit
9c3114524c
|
@ -212,10 +212,19 @@ componentDidMount() {
|
|||
Notify.error(`商品总库存量不能小于已使用数量`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
let urls = _.map(this.state.productpic,(o)=>{
|
||||
return o.url
|
||||
})
|
||||
|
||||
if(urls.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
|
||||
let formdata = {
|
||||
"product_type": this.state.model.type,
|
||||
"product_name": this.state.model.name,
|
||||
|
|
|
@ -70,12 +70,14 @@ export default class adduserinfo extends React.Component{
|
|||
let model = this.state.model;
|
||||
model.product_id = model_temp.product_id;
|
||||
model.product_type = model_temp.product_type
|
||||
|
||||
model.contract_price = model_temp.contract_price
|
||||
model.official_price = model_temp.official_price
|
||||
model.cost_price = model_temp.cost_price
|
||||
model.quantity = model_temp.quantity
|
||||
model.product_name = model_temp.product_name
|
||||
model.show_url = model_temp.show_url
|
||||
model.account_type = model_temp.account_type
|
||||
model.detail_url = model_temp.detail_url
|
||||
let defaultPic = []
|
||||
let arr = []
|
||||
|
@ -196,6 +198,13 @@ export default class adduserinfo extends React.Component{
|
|||
let urls = _.map(this.state.productpic,(o)=>{
|
||||
return o.url
|
||||
})
|
||||
if(urls.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
console.log("存储的链接",8888)
|
||||
|
||||
temp[index].describe_url = urls
|
||||
|
@ -214,6 +223,13 @@ export default class adduserinfo extends React.Component{
|
|||
let urls = _.map(this.state.productpic,(o)=>{
|
||||
return o.url
|
||||
})
|
||||
|
||||
if(urls.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
|
||||
model.describe_url = urls
|
||||
|
||||
this.setState({model:model})
|
||||
|
|
|
@ -402,7 +402,6 @@ export default class acclist extends React.Component{
|
|||
sum += parseInt( o.quantity);
|
||||
})
|
||||
|
||||
console.log("sum",sum)
|
||||
if(sum < this.state.codeInfo.issued)
|
||||
{
|
||||
Notify.error("所选商品库存总数小于发放量")
|
||||
|
@ -421,7 +420,6 @@ export default class acclist extends React.Component{
|
|||
return item.text
|
||||
})
|
||||
|
||||
console.log(rank)
|
||||
|
||||
let tableData = this.state.distdata;
|
||||
let temp = {
|
||||
|
@ -453,6 +451,8 @@ export default class acclist extends React.Component{
|
|||
})
|
||||
temp.product = arr;
|
||||
|
||||
console.log("dasdas",temp)
|
||||
|
||||
|
||||
if(this.state.rowIndex > -1)
|
||||
{
|
||||
|
@ -989,8 +989,8 @@ export default class acclist extends React.Component{
|
|||
<RadioGroup onChange={(e)=>{ this.onStyleChange(e)} } value={this.state.model.style} disabled={this.state.isEdit} >
|
||||
<RadioButton value={1}>串码</RadioButton>
|
||||
<RadioButton value={2} >链接</RadioButton>
|
||||
<RadioButton value={4} >二维码</RadioButton>
|
||||
<RadioButton value={6} >白名单</RadioButton>
|
||||
<RadioButton value={4} >二维码</RadioButton>
|
||||
<RadioButton value={6} >白名单</RadioButton>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
|
||||
|
|
|
@ -94,6 +94,11 @@ export default class adduserinfo extends React.Component{
|
|||
Notify.error(`请上传商品Logo`);
|
||||
return
|
||||
}
|
||||
if(this.state.model.describe_url.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let temp = []
|
||||
|
|
|
@ -74,6 +74,7 @@ export default class adduserinfo extends React.Component{
|
|||
model.product_name = model_temp.product_name
|
||||
model.show_url = model_temp.show_url
|
||||
model.detail_url = model_temp.detail_url
|
||||
model.account_type = model_temp.account_type
|
||||
let defaultPic = []
|
||||
let arr = []
|
||||
|
||||
|
@ -210,6 +211,11 @@ export default class adduserinfo extends React.Component{
|
|||
let urls = _.map(this.state.productpic,(o)=>{
|
||||
return o.url
|
||||
})
|
||||
if(urls.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
console.log(8888)
|
||||
temp[index].describe_url = urls
|
||||
temp[index].map_product_name = this.state.model.map_product_name
|
||||
|
@ -226,6 +232,11 @@ export default class adduserinfo extends React.Component{
|
|||
let urls = _.map(this.state.productpic,(o)=>{
|
||||
return o.url
|
||||
})
|
||||
if(urls.length <= 0)
|
||||
{
|
||||
Notify.error(`商品图至少请上传一张`);
|
||||
return;
|
||||
}
|
||||
model.describe_url = urls
|
||||
|
||||
this.setState({model:model})
|
||||
|
|
Loading…
Reference in New Issue