Authored by 孙凯

修改单号的问题 review by hongmo

... ... @@ -23,7 +23,7 @@ export default class DeliverGoodsCell extends Component {
render() {
let {resource} = this.props;
let id = resource?resource.id:0;
let proRequisitionFormId = resource?resource.proRequisitionFormId:0;
let tags = resource?resource.value:[];
let num = tags.length;
... ... @@ -31,7 +31,7 @@ export default class DeliverGoodsCell extends Component {
return (
<View style={{width: width,height: headerH + cellH * num,backgroundColor: 'white',}}>
<View style={styles.header}>
<Text style={styles.title} numberOfLines={1}>单号:{id}</Text>
<Text style={styles.title} numberOfLines={1}>单号:{proRequisitionFormId}</Text>
</View>
{tags.map((value, i) => {
let sku = value.productSku;
... ...
... ... @@ -64,7 +64,7 @@ export default class TransferShipmentCell extends Component {
let sku = data.productSku?data.productSku:0;//sku
let createTime = data.createTime?data.createTime:0;//下单时间
let id = data.id?data.id:0;//单号
let proRequisitionFormId = data.proRequisitionFormId?data.proRequisitionFormId:0;//单号
let factoryGoodsName = data.factoryGoodsName?data.factoryGoodsName:0;//厂家颜色
let sizeName = data.sizeName?data.sizeName:0;//尺码名
let skuFactoryCode = data.skuFactoryCode?data.skuFactoryCode:0;//商品条码
... ... @@ -105,7 +105,7 @@ export default class TransferShipmentCell extends Component {
<Text style={styles.cellText} numberOfLines={1}>商品条码:{skuFactoryCode}</Text>
</View>
<View style={styles.cell}>
<Text style={styles.cellText} numberOfLines={1}>规格:{factoryGoodsName}/{sizeName} 单号:{id}</Text>
<Text style={styles.cellText} numberOfLines={1}>规格:{factoryGoodsName}/{sizeName} 单号:{proRequisitionFormId}</Text>
</View>
<View style={styles.cell}>
<Text style={{
... ...
... ... @@ -83,14 +83,15 @@ export function deliveryGoods() {
let shopId = home.shopId;
let deliverDataJson = deliverData?deliverData.toJS():[];
let expressGoodsMap = {};
deliverDataJson.map((item0, i) => {
let id = item0.id;
let proRequisitionFormId = item0.proRequisitionFormId;
let list = item0.value;
let expressList = [];
list.map((item1, i) => {
expressList.push({sku: item1.productSku,num: item1.num,factoryCode: item1.skuFactoryCode});
expressList.push({sku: item1.productSku,num: parseInt(item1.num),factoryCode: item1.skuFactoryCode});
})
expressGoodsMap[id] = expressList;
expressGoodsMap[proRequisitionFormId] = expressList;
})
dispatch(deliveryGoodsRequest())
return new DeliverGoodsService().deliveryGoods(expressId,expressNumber,shopId,expressGoodsMap)
... ...
... ... @@ -71,18 +71,18 @@ export function goDeliverGoods() {
for (var i = 0; i < records.length; i++) {
let value = records[i];
if (value.checked && value.num > 0) {
let id = value.id;
let proRequisitionFormId = value.proRequisitionFormId;
let hasPush = false;
for (var i = 0; i < list.length; i++) {
let item = list[i];
if (item.id == id) {
if (item.proRequisitionFormId == proRequisitionFormId) {
item.value.push(value);
hasPush = true;
}
}
if (!hasPush) {
let param = {id: value.id,value: [value]};
let param = {proRequisitionFormId: value.proRequisitionFormId,value: [value]};
list.push(param);
}
}
... ...