Authored by 孙凯

更换 资源 review by hongmo

... ... @@ -299,7 +299,7 @@ export default function native(platform) {
hideNavBar={false}
rightTitle='发货'
onRight={()=>{
store.dispatch(goDeliverGoods('deliverGoods'));
store.dispatch(goDeliverGoods());
}}
initial={false}
navBar={NavBar}
... ...
... ... @@ -123,7 +123,8 @@ export default class DeliverGoods extends Component {
<TouchableOpacity onPress={() => {
this.props.startScanQRCode && this.props.startScanQRCode();
}}>
<View style={styles.camera}>
<View style={styles.cameraView}>
<Image style={styles.camera} source={require('../../images/fahuo/home_qr_new.png')} resizeMode={'contain'} />
</View>
</TouchableOpacity>
</View>
... ... @@ -191,12 +192,17 @@ const styles = StyleSheet.create({
pickerText: {
},
camera: {
cameraView: {
width: 30,
height: 30,
backgroundColor: 'red',
backgroundColor: 'transparent',
marginLeft: 10,
},
camera: {
width: 30,
height: 30,
backgroundColor: 'transparent',
},
cellAddress: {
width: width,
height: 60,
... ...
... ... @@ -53,8 +53,10 @@ export default class TransferShipment extends Component {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
},
listContainer: {
flex: 1,
backgroundColor: 'white',
}
});
... ...
... ... @@ -88,8 +88,8 @@ export default class TransferShipmentCell extends Component {
checkboxStyle={styles.checkboxIconStyle}
labelStyle={styles.labelStyle}
underlayColor={'transparent'}
checkedImage={require('../../images/tabbar/home.png')}
uncheckedImage={require('../../images/tabbar/message_normal.png')}
checkedImage={require('../../images/fahuo/select_icon_20_h.png')}
uncheckedImage={require('../../images/fahuo/select_icon_20_n.png')}
checked={this.state.hasChecked}
onChange={this._onCheckBoxChanged}
/>
... ... @@ -97,6 +97,7 @@ export default class TransferShipmentCell extends Component {
this.props.goToStatsPage && this.props.goToStatsPage(CONFIG.statsKey.outOfStock,resource);
}}>
<View style={styles.tip}>
<Image style={styles.tip} source={require('../../images/fahuo/ring_tip_ic.png')} resizeMode={'contain'} />
</View>
</TouchableOpacity>
</View>
... ... @@ -187,7 +188,7 @@ const styles = StyleSheet.create({
tip: {
width: 30,
height: 30,
backgroundColor: 'red',
backgroundColor: 'transparent',
},
cell: {
width: width,
... ...
... ... @@ -71,10 +71,10 @@ export function deliveryGoodsFailure(error) {
export function deliveryGoods() {
return (dispatch,getState) => {
let {deliverGoods,home} = getState();
let deliverData = deliverGoods.deliverData?deliverGoods.deliverData:[];
let expressValue = deliverGoods.expressValue?deliverGoods.expressValue:null;
let deliverData = deliverGoods.get('deliverData')?deliverGoods.get('deliverData'):[];
let expressValue = deliverGoods.get('expressValue')?deliverGoods.get('expressValue'):null;
let expressId = expressValue?expressValue.get('id'):0;
let expressNumber = deliverGoods.expressNum;
let expressNumber = deliverGoods.get('expressNum');
let shopId = home.shopId;
let deliverDataJson = deliverData?deliverData.toJS():[];
let expressGoodsMap = {};
... ... @@ -87,7 +87,6 @@ export function deliveryGoods() {
})
expressGoodsMap[id] = expressList;
})
dispatch(deliveryGoodsRequest())
return new DeliverGoodsService().deliveryGoods(expressId,expressNumber,shopId,expressGoodsMap)
.then((json) => {
... ...
... ... @@ -45,9 +45,9 @@ export function stockOut() {
return (dispatch,getState) => {
let {outOfStock,home} = getState();
let {initialRes} = outOfStock;
let productSku = initialRes?initialRes.productSku:0;
let proReqFormId = initialRes?initialRes.proRequisitionFormId:0;
let num = outOfStock.lackNum;
let productSku = initialRes?initialRes.get('productSku'):0;
let proReqFormId = initialRes?initialRes.get('proRequisitionFormId'):0;
let num = outOfStock.get('lackNum');
let shopId = home.shopId;
dispatch(stockOutRequest())
... ...
... ... @@ -35,7 +35,15 @@ export function goToStatsPage(type,params) {
}
case CONFIG.statsKey.deliverGoods:
{
Actions.DeliverGoods({initialRes: params});
if (params.length <= 0) {
Alert.alert(
'请选择订单和填写数量!',
'',
[{text: 'OK'},]
);
}else {
Actions.DeliverGoods({initialRes: params});
}
return {
type: GO_TO_OUT_DELIVERGOODS,
};
... ... @@ -43,7 +51,7 @@ export function goToStatsPage(type,params) {
}
}
export function goDeliverGoods(type) {
export function goDeliverGoods() {
return (dispatch,getState) => {
let {transferShipment,home} = getState();
let {purchaseList} = transferShipment;
... ... @@ -70,7 +78,7 @@ export function goDeliverGoods(type) {
}
}
}
dispatch(goToStatsPage(type,list))
dispatch(goToStatsPage(CONFIG.statsKey.deliverGoods,list))
};
}
... ...