...
|
...
|
@@ -74,7 +74,7 @@ export function deliveryGoodsFailure(error) { |
|
|
|
|
|
export function deliveryGoods() {
|
|
|
return (dispatch,getState) => {
|
|
|
let {deliverGoods,home} = getState();
|
|
|
let {deliverGoods,home, user} = getState();
|
|
|
let deliverData = deliverGoods&&deliverGoods.get('deliverData')?deliverGoods.get('deliverData'):null;
|
|
|
|
|
|
let expressValue = deliverGoods&&deliverGoods.get('expressValue')?deliverGoods.get('expressValue'):null;
|
...
|
...
|
@@ -93,8 +93,11 @@ export function deliveryGoods() { |
|
|
})
|
|
|
expressGoodsMap[proRequisitionFormId] = expressList;
|
|
|
})
|
|
|
|
|
|
let pid = user.profile.pid;
|
|
|
|
|
|
dispatch(deliveryGoodsRequest())
|
|
|
return new DeliverGoodsService().deliveryGoods(expressId,expressNumber,shopId,expressGoodsMap)
|
|
|
return new DeliverGoodsService().deliveryGoods(expressId,expressNumber,shopId,expressGoodsMap, pid)
|
|
|
.then((json) => {
|
|
|
Alert.alert(
|
|
|
'提交成功!',
|
...
|
...
|
@@ -142,10 +145,12 @@ export function getExpressListFailure(error) { |
|
|
|
|
|
export function getExpressList() {
|
|
|
return (dispatch,getState) => {
|
|
|
let {home} = getState();
|
|
|
let {home, user} = getState();
|
|
|
|
|
|
let pid = user.profile.pid;
|
|
|
|
|
|
dispatch(getExpressListRequest())
|
|
|
return new DeliverGoodsService().getExpressList()
|
|
|
return new DeliverGoodsService().getExpressList(pid)
|
|
|
.then((json) => {
|
|
|
dispatch(getExpressListSuccess(json))
|
|
|
})
|
...
|
...
|
@@ -178,11 +183,13 @@ export function queryBySupplierIdFailure(error) { |
|
|
|
|
|
export function queryBySupplierId() {
|
|
|
return (dispatch,getState) => {
|
|
|
let {home} = getState();
|
|
|
let {home, user} = getState();
|
|
|
let supplierId = home.supplierId;
|
|
|
|
|
|
let pid = user.profile.pid;
|
|
|
|
|
|
dispatch(queryBySupplierIdRequest())
|
|
|
return new DeliverGoodsService().queryBySupplierId(supplierId)
|
|
|
return new DeliverGoodsService().queryBySupplierId(supplierId, pid)
|
|
|
.then((json) => {
|
|
|
let res = exposePruductListData(json);
|
|
|
dispatch(queryBySupplierIdSuccess(res))
|
...
|
...
|
|