Authored by 孙凯

add 接口 review by hongmo

... ... @@ -18,12 +18,19 @@ import RNRF, {
import configureStore from './store/configureStore';
import {
goDeliverGoods,
} from './reducers/transferShipment/transferShipmentActions';
import {
stockOut,
} from './reducers/outOfStock/outOfStockActions';
import {
setPlatform,
setVersion,
setDot
} from './reducers/device/deviceActions';
import deviceInitialState from './reducers/device/deviceInitialState';
import guideInitialState from './reducers/guide/guideInitialState';
import homeInitialState from './reducers/home/homeInitialState';
... ... @@ -286,7 +293,7 @@ export default function native(platform) {
hideNavBar={false}
rightTitle='发货'
onRight={()=>{
Actions.DeliverGoods();
store.dispatch(goDeliverGoods('deliverGoods'));
}}
initial={false}
navBar={NavBar}
... ... @@ -298,6 +305,10 @@ export default function native(platform) {
key="OutOfStock"
component={OutOfStockContainer}
hideNavBar={false}
rightTitle='提交'
onRight={()=>{
store.dispatch(stockOut());
}}
initial={false}
navBar={NavBar}
title='提示缺货'
... ...
... ... @@ -45,31 +45,41 @@ export default class DeliverGoods extends Component {
}
_picker() {
return (
<View style={styles.pickerContainer}>
<TouchableOpacity onPress={() => {
this.setState({showPicker: false});
}}>
<View style={styles.pickerSpaceContainer}/>
</TouchableOpacity>
<View style={styles.pickerSubContainer}>
<Picker
selectedValue={this.state.express}
onValueChange={(lang) => this.setState({express: lang})}>
<Picker.Item label="Java" value="java" />
<Picker.Item label="1" value="1" />
<Picker.Item label="2" value="2" />
<Picker.Item label="JavaScript" value="js" />
</Picker>
</View>
let {expressList} = this.props.resource;
let list = expressList?expressList.list:[];
return (
<View style={styles.pickerContainer}>
<TouchableOpacity onPress={() => {
this.setState({showPicker: false});
}}>
<View style={styles.pickerSpaceContainer}/>
</TouchableOpacity>
<View style={styles.pickerSubContainer}>
<Picker
selectedValue={this.state.express}
onValueChange={(lang) => this.setState({express: lang})}>
{list.map((value, i) => {
return (<Picker.Item label={value.get('companyName')} value={value.get('companyName')} />);
})
}
</Picker>
</View>
);
</View>
);
}
render() {
let {expressList,storehouse} = this.props.resource;
console.log(expressList?expressList.toJS():'s');
console.log(storehouse?storehouse.toJS():'s');
let {initialRes,resource} = this.props;
let {expressList,storehouse} = resource;
console.log(initialRes?initialRes.toJS():'');
let address = storehouse?storehouse.get('address'):'';
let adminName = storehouse?storehouse.get('adminName'):'';
let storehouseName = storehouse?storehouse.get('storehouseName'):'';
let phone = storehouse?storehouse.get('phone'):'';
return (
<View style={styles.container}>
... ... @@ -106,7 +116,7 @@ export default class DeliverGoods extends Component {
</View>
<View style={styles.cellAddress}>
<Text style={styles.cellAddressText} numberOfLines={3}>
收货地址:南京1号仓库 江苏省南京市江宁区江宁开发经济技术开发区 苏源大道87YOHO!有货物流中心东一楼 曾庆红
收货地址:{storehouseName} {address} {adminName} {phone}
</Text>
</View>
<ListView
... ...
... ... @@ -20,22 +20,68 @@ export default class OutOfStock extends Component {
constructor(props) {
super (props);
this._onChangeText = this._onChangeText.bind(this);
}
_onChangeText(text){
let {resource} = this.props;
let data = resource?resource.toJS():null;
let id = data?data.id:0;
let lackNum = data.lackNum?data.lackNum:0;//缺货数
let shipmentsNums = data.shipmentsNums?data.shipmentsNums:0;//发货数量
let buyingNums = data.buyingNums?data.buyingNums:0;//外采数量 销售数
let lastNum = buyingNums - lackNum - shipmentsNums;//实际应发数
let num = text;
if ((num | 0) === num || num > lastNum) {
num = -1;
}
this.props.setLackNum && this.props.setLackNum(num);
this.props.setInitialRes && this.props.setInitialRes(data);
}
render() {
let {resource,outOfStock} = this.props;
let num = outOfStock?outOfStock.lackNum:0;
let textInputColor = num >= 0 ? 'transparent' : 'red';
let data = resource?resource.toJS():null;
let sku = data.productSku?data.productSku:0;//sku
let factoryGoodsName = data.factoryGoodsName?data.factoryGoodsName:0;//厂家颜色
let sizeName = data.sizeName?data.sizeName:0;//尺码名
let skuFactoryCode = data.skuFactoryCode?data.skuFactoryCode:0;//商品条码
let lackNum = data.lackNum?data.lackNum:0;//缺货数
let shipmentsNums = data.shipmentsNums?data.shipmentsNums:0;//发货数量
let inStoreNum = data.inStoreNum?data.inStoreNum:0;//入库数量 收货数量
let buyingNums = data.buyingNums?data.buyingNums:0;//外采数量 销售数
let lastNum = buyingNums - lackNum - shipmentsNums;//实际应发数
return (
<View style={styles.container}>
<View style={styles.cell}>
<Text style={styles.cellText1} numberOfLines={1}>SKU:2564123</Text>
<Text style={styles.cellText2} numberOfLines={1}>商品条码:KT-2017156 红色/L</Text>
<Text style={styles.cellText3} numberOfLines={1}>当前需发数:5</Text>
<Text style={styles.cellText1} numberOfLines={1}>SKU:{sku}</Text>
<Text style={styles.cellText2} numberOfLines={1}>商品条码:{skuFactoryCode} {factoryGoodsName}/{sizeName}</Text>
<Text style={styles.cellText3} numberOfLines={1}>当前需发数:{lastNum}</Text>
</View>
<View style={styles.textInputCell}>
<Text style={styles.cellText} numberOfLines={1}>缺货:</Text>
<TextInput style={styles.inputText}
<TextInput style={{
width: width - 80,
height: 40,
backgroundColor: textInputColor,
fontSize:15,
marginLeft: 10,
borderWidth: 1,
borderColor: '#CCC',
borderRadius: 4,
marginTop: 5,
}}
ref = 'textInput'
placeholder={'单行输入'}
keyboardType={'numeric'}
onChangeText={this._onChangeText}
/>
</View>
<Text style={styles.tip} numberOfLines={1}>*提货报缺后不可修改,平台将对顾客订单商品进行退单处理</Text>
... ... @@ -68,7 +114,7 @@ const styles = StyleSheet.create({
fontSize:12,
width: Math.ceil((width-20)/3)+60,
textAlign: 'center',
color: 'red',
color: 'black',
},
cellText3: {
fontSize:12,
... ...
... ... @@ -30,19 +30,20 @@ export default class TransferShipment extends Component {
_renderRow(rowData, sectionID, rowID) {
return(
<TransferShipmentCell goToStatsPage={this.props.goToStatsPage}/>
<TransferShipmentCell resource={rowData} setPurchaseNum={this.props.setPurchaseNum} checkUp={this.props.checkUp} goToStatsPage={this.props.goToStatsPage}/>
)
}
render() {
let {resource} = this.props;
console.log(resource?resource.toJS():'');
let dataList = resource?resource.get('records'):null;
return (
<View style={styles.container}>
<ListView
style={styles.listContainer}
dataSource={this.dataSource.cloneWithRows([1,1,1])}
dataSource={this.dataSource.cloneWithRows(dataList?dataList.toArray():[])}
renderRow={this._renderRow}
enableEmptySections={true}
/>
</View>
);
... ...
... ... @@ -19,27 +19,66 @@ export default class TransferShipmentCell extends Component {
constructor(props) {
super (props);
this._onSubmitEditing = this._onSubmitEditing.bind(this);
this._onChangeText = this._onChangeText.bind(this);
this._onCheckBoxChanged = this._onCheckBoxChanged.bind(this);
let {resource} = this.props;
let data = resource?resource.toJS():null;
this.state = {
hasChecked: false,
hasChecked: data.checked?data.checked:false,
};
}
_onSubmitEditing(event){
let value = event.nativeEvent.text;
}
_onChangeText(text){
let {resource} = this.props;
let data = resource?resource.toJS():null;
let id = data?data.id:0;
let lackNum = data.lackNum?data.lackNum:0;//缺货数
let shipmentsNums = data.shipmentsNums?data.shipmentsNums:0;//发货数量
let buyingNums = data.buyingNums?data.buyingNums:0;//外采数量 销售数
let lastNum = buyingNums - lackNum - shipmentsNums;//实际应发数
let num = text;
if ((num | 0) === num || num > lastNum) {
num = -1;
}
this.props.setPurchaseNum && this.props.setPurchaseNum(num,id);
}
_onCheckBoxChanged(checked){
this.setState({hasChecked : !checked});
let {resource} = this.props;
let data = resource?resource.toJS():null;
let id = data?data.id:0;
this.props.checkUp && this.props.checkUp(!checked,id);
}
render() {
let checkedLable = 'SKU: 2541123 下单时间:2017-05-02'
let {resource} = this.props;
let data = resource?resource.toJS():null;
if (!data) {
return null;
}
let sku = data.productSku?data.productSku:0;//sku
let createTime = data.createTime?data.createTime:0;//下单时间
let id = data.id?data.id:0;//单号
let factoryGoodsName = data.factoryGoodsName?data.factoryGoodsName:0;//厂家颜色
let sizeName = data.sizeName?data.sizeName:0;//尺码名
let skuFactoryCode = data.skuFactoryCode?data.skuFactoryCode:0;//商品条码
let lackNum = data.lackNum?data.lackNum:0;//缺货数
let shipmentsNums = data.shipmentsNums?data.shipmentsNums:0;//发货数量
let num = data.num?data.num:0;//输入发货
let inStoreNum = data.inStoreNum?data.inStoreNum:0;//入库数量 收货数量
let buyingNums = data.buyingNums?data.buyingNums:0;//外采数量 销售数
let lastNum = buyingNums - lackNum - shipmentsNums;//实际应发数
let checkedLable = 'SKU: ' + sku + ' ' + '下单时间:' + createTime;
let lackNumTextColor = lackNum > 0 ? 'red' : 'black';
let textInputColor = num >= 0 ? 'transparent' : 'red';
return (
<View style={styles.container}>
<View style={styles.titleBar}>
... ... @@ -55,30 +94,53 @@ export default class TransferShipmentCell extends Component {
onChange={this._onCheckBoxChanged}
/>
<TouchableOpacity onPress={() => {
this.props.goToStatsPage && this.props.goToStatsPage(CONFIG.statsKey.outOfStock);
this.props.goToStatsPage && this.props.goToStatsPage(CONFIG.statsKey.outOfStock,resource);
}}>
<View style={styles.tip}>
</View>
</TouchableOpacity>
</View>
<View style={styles.cell}>
<Text style={styles.cellText} numberOfLines={1}>商品条码:KT-2017156</Text>
<Text style={styles.cellText} numberOfLines={1}>商品条码:{skuFactoryCode}</Text>
</View>
<View style={styles.cell}>
<Text style={styles.cellText} numberOfLines={1}>规格:红色/L 单号:175023</Text>
<Text style={styles.cellText} numberOfLines={1}>规格:{factoryGoodsName}/{sizeName} 单号:{id}</Text>
</View>
<View style={styles.cell}>
<Text style={styles.cellText1} numberOfLines={1}>缺货数:1110</Text>
<Text style={styles.cellText2} numberOfLines={1}>收获数:1111</Text>
<Text style={styles.cellText3} numberOfLines={1}>已发数:1110</Text>
<Text style={styles.cellText4} numberOfLines={1}>当前需发数:5111</Text>
<Text style={{
fontSize:15,
marginLeft: 10,
width: 2 * Math.ceil((width-10)/9),
textAlign: 'left',
color: lackNumTextColor,
}}
numberOfLines={1}>
缺货数:{lackNum}
</Text>
<Text style={styles.cellText2} numberOfLines={1}>收获数:{inStoreNum}</Text>
<Text style={styles.cellText3} numberOfLines={1}>已发数:{shipmentsNums}</Text>
<Text style={styles.cellText4} numberOfLines={1}>当前需发数:{lastNum}</Text>
</View>
<View style={styles.textInputCell}>
<Text style={styles.cellText} numberOfLines={1}>发货:</Text>
<TextInput style={styles.inputText}
<Text style={styles.cellText} numberOfLines={1}>
发货:
</Text>
<TextInput style={{
width: width - 80,
height: 40,
backgroundColor:'transparent',
fontSize:15,
marginLeft: 10,
borderWidth: 1,
borderColor: '#CCC',
borderRadius: 4,
marginTop: 5,
color: 'black',
backgroundColor: textInputColor,
}}
ref = 'textInput'
placeholder={'单行输入'}
onSubmitEditing={this._onSubmitEditing}
keyboardType={'numeric'}
onChangeText={this._onChangeText}
/>
</View>
... ... @@ -103,7 +165,7 @@ const styles = StyleSheet.create({
titleBar: {
width: width,
height: 40,
backgroundColor: 'yellow',
backgroundColor: 'rgb(254,220,220)',
flexDirection: 'row',
alignItems: 'center',
},
... ... @@ -151,7 +213,7 @@ const styles = StyleSheet.create({
fontSize:15,
width: 2 * Math.ceil((width-10)/9),
textAlign: 'left',
color: 'red',
color: 'black',
},
cellText3: {
fontSize:15,
... ...
... ... @@ -74,6 +74,7 @@ export default keyMirror({
GO_TO_ACCOUNT_SETTLEMENT: null,
GO_TO_TRANSFER_SHIPMENT: null,
GO_TO_OUT_STOCK: null,
GO_TO_OUT_DELIVERGOODS: null,
SETUP_DEFAULT_SHOP: null,
... ... @@ -129,7 +130,12 @@ export default keyMirror({
STOCKOUT_REQUEST: null,
STOCKOUT_SUCCESS: null,
STOCKOUT_FAILURE: null,
SET_INITIAL_RES: null,
CHECKUP_REQUEST: null,
SET_PURCHASE_NUM: null,
SET_LACK_NUM: null,
SWITCH_SHOP: null,
LOGOUT: null,
});
... ...
... ... @@ -61,11 +61,11 @@ class DeliverGoodsContainer extends Component {
}
render() {
let {deliverGoods} = this.props;
let {deliverGoods,initialRes} = this.props;
return (
<View style={styles.container}>
<DeliverGoods resource={deliverGoods}/>
<DeliverGoods initialRes={initialRes} resource={deliverGoods}/>
</View>
);
}
... ...
... ... @@ -49,22 +49,24 @@ class OutOfStockContainer extends Component {
constructor(props) {
super(props);
this._setLackNum = this._setLackNum.bind(this);
this._setInitialRes = this._setInitialRes.bind(this);
}
componentDidMount() {
}
componentWillUnmount() {
_setLackNum(num){
this.props.actions.setLackNum(num);
}
_setInitialRes(param){
this.props.actions.setInitialRes(param);
}
render() {
let {outOfStock} = this.props;
let {initialRes,outOfStock} = this.props;
return (
<View style={styles.container}>
<OutOfStock />
<OutOfStock resource={initialRes} outOfStock={outOfStock} setInitialRes={this._setInitialRes} setLackNum={this._setLackNum}/>
</View>
);
}
... ...
... ... @@ -50,6 +50,9 @@ class TransferShipmentContainer extends Component {
constructor(props) {
super(props);
this._goToStatsPage = this._goToStatsPage.bind(this);
this._checkUp = this._checkUp.bind(this);
this._setPurchaseNum = this._setPurchaseNum.bind(this);
}
componentDidMount() {
... ... @@ -61,15 +64,24 @@ class TransferShipmentContainer extends Component {
}
_goToStatsPage(type,params) {
this.props.actions.goToStatsPage(type);
this.props.actions.goToStatsPage(type,params);
}
_checkUp(checked,sku) {
this.props.actions.checkUp(checked,sku);
}
_setPurchaseNum(num,sku) {
this.props.actions.setPurchaseNum(num,sku);
}
render() {
let {transferShipment} = this.props;
let {purchaseList} = transferShipment;
return (
<View style={styles.container}>
<TransferShipment resource={purchaseList} goToStatsPage={this._goToStatsPage}/>
<TransferShipment resource={purchaseList} setPurchaseNum={this._setPurchaseNum} checkUp={this._checkUp} goToStatsPage={this._goToStatsPage}/>
</View>
);
}
... ...
... ... @@ -63,7 +63,7 @@ export default function userReducer(state = initialState, action) {
return state.setIn(['storehouse', 'isFetching'], true)
.setIn(['storehouse', 'error'], null);
}
case QUERYBYSUPPLIER_FAILURE:{
case QUERYBYSUPPLIER_SUCCESS:{
return state.setIn(['storehouse', 'isFetching'], false)
.setIn(['storehouse', 'adminName'], action.payload.adminName)
.setIn(['storehouse', 'address'], action.payload.address)
... ... @@ -73,7 +73,7 @@ export default function userReducer(state = initialState, action) {
.setIn(['storehouse', 'status'], action.payload.status)
.setIn(['storehouse', 'error'], null)
}
case GET_EXPRESS_LIST_FAILURE:{
case QUERYBYSUPPLIER_FAILURE:{
return state.setIn(['storehouse', 'isFetching'], false)
.setIn(['storehouse', 'error'], action.payload);
}
... ...
... ... @@ -15,6 +15,10 @@ const {
STOCKOUT_REQUEST,
STOCKOUT_SUCCESS,
STOCKOUT_FAILURE,
SET_LACK_NUM,
SET_INITIAL_RES,
} = require('../../constants/actionTypes').default;
export function stockOutRequest() {
... ... @@ -39,10 +43,12 @@ export function stockOutFailure(error) {
export function stockOut() {
return (dispatch,getState) => {
let {home} = getState();
let proReqFormId=1;
let productSku=1;
let num=1;
let {outOfStock} = getState();
let {initialRes} = outOfStock;
let productSku = initialRes?initialRes.productSku:0;
let proReqFormId = initialRes?initialRes.proRequisitionFormId:0;
let num = outOfStock.lackNum;
dispatch(stockOutRequest())
return new OutOfStockService().stockOut(proReqFormId,productSku,num)
.then((json) => {
... ... @@ -53,3 +59,17 @@ export function stockOut() {
});
};
}
export function setLackNum(num) {
return {
type: SET_LACK_NUM,
payload: num,
};
}
export function setInitialRes(param) {
return {
type: SET_INITIAL_RES,
payload: param,
};
}
... ...
... ... @@ -7,7 +7,8 @@ import {List, Record} from 'immutable';
let InitialState = Record({
lackNum: 0,
initialRes: null,
});
export default InitialState;
... ...
... ... @@ -15,6 +15,9 @@ const {
STOCKOUT_SUCCESS,
STOCKOUT_FAILURE,
SET_LACK_NUM,
SET_INITIAL_RES,
} = require('../../constants/actionTypes').default;
const initialState = new InitialState;
... ... @@ -37,6 +40,12 @@ export default function userReducer(state = initialState, action) {
case STOCKOUT_FAILURE:{
return state;
}
case SET_LACK_NUM:{
return state.set('lackNum', action.payload);
}
case SET_INITIAL_RES:{
return state.set('initialRes', Immutable.fromJS(action.payload));
}
return state;
}
... ...
... ... @@ -14,23 +14,43 @@ import CONFIG from '../../constants/config';
const {
GO_TO_OUT_STOCK,
GO_TO_OUT_DELIVERGOODS,
GET_PURCHASE_LIST_REQUEST,
GET_PURCHASE_LIST_SUCCESS,
GET_PURCHASE_LIST_FAILURE,
} = require('../../constants/actionTypes').default;
export function goToStatsPage(type) {
CHECKUP_REQUEST,
SET_PURCHASE_NUM,
} = require('../../constants/actionTypes').default;
switch (type) {
export function goToStatsPage(type,params) {
switch (type) {
case CONFIG.statsKey.outOfStock:
Actions.OutOfStock();
return {
type: GO_TO_OUT_STOCK,
};
{
Actions.OutOfStock({initialRes: params});
return {
type: GO_TO_OUT_STOCK,
};
}
case CONFIG.statsKey.deliverGoods:
{
Actions.DeliverGoods({initialRes: params});
return {
type: GO_TO_OUT_DELIVERGOODS,
};
}
}
}
export function goDeliverGoods(type) {
return (dispatch,getState) => {
let {transferShipment,home} = getState();
let {purchaseList} = transferShipment;
dispatch(goToStatsPage(type,purchaseList))
};
}
export function getPurchaseListRequest() {
return {
type: GET_PURCHASE_LIST_REQUEST,
... ... @@ -82,3 +102,49 @@ export function getPurchaseList() {
});
};
}
export function checkUpSuccess(json) {
return {
type: CHECKUP_REQUEST,
payload: json,
};
}
export function checkUp(checked,id) {
return (dispatch,getState) => {
let {transferShipment,home} = getState();
let {purchaseList} = transferShipment;
let list = purchaseList && purchaseList.records && purchaseList.records.toJS();
list.map((item, i) => {
let p_id = item.id;
if (id == p_id) {
item.checked = checked;
}
});
dispatch(checkUpSuccess(list))
};
}
export function setPurchaseNumSuccess(json) {
return {
type: SET_PURCHASE_NUM,
payload: json,
};
}
export function setPurchaseNum(num,id) {
return (dispatch,getState) => {
let {transferShipment,home} = getState();
let {purchaseList} = transferShipment;
let list = purchaseList && purchaseList.records && purchaseList.records.toJS();
list.map((item, i) => {
let p_id = item.id;
if (id == p_id) {
item.num = num;
}
});
dispatch(setPurchaseNumSuccess(list))
};
}
... ...
... ... @@ -12,10 +12,14 @@ import Immutable, {List, Record} from 'immutable';
const {
GO_TO_OUT_STOCK,
GO_TO_OUT_DELIVERGOODS,
GET_PURCHASE_LIST_REQUEST,
GET_PURCHASE_LIST_SUCCESS,
GET_PURCHASE_LIST_FAILURE,
CHECKUP_REQUEST,
SET_PURCHASE_NUM,
} = require('../../constants/actionTypes').default;
const initialState = new InitialState;
... ... @@ -32,6 +36,9 @@ export default function userReducer(state = initialState, action) {
case GO_TO_OUT_STOCK:{
return state;
}
case GO_TO_OUT_DELIVERGOODS:{
return state;
}
case GET_PURCHASE_LIST_REQUEST:{
return state.setIn(['purchaseList', 'isFetching'], true)
.setIn(['purchaseList', 'error'], null)
... ... @@ -61,7 +68,12 @@ export default function userReducer(state = initialState, action) {
return state.setIn(['purchaseList', 'isFetching'], false)
.setIn(['purchaseList', 'error'], action.payload)
}
case CHECKUP_REQUEST:{
return state.setIn(['purchaseList', 'records'], Immutable.fromJS(action.payload));
}
case SET_PURCHASE_NUM:{
return state.setIn(['purchaseList', 'records'], Immutable.fromJS(action.payload));
}
return state;
}
... ...
... ... @@ -12,12 +12,13 @@ export default class DeliverGoodsService {
async deliveryGoods(expressId,expressNumber,shopId,expressGoodsMap) {
return this.api.get({
url: '/purchase/delivery',
url: '',
body: {
expressId: expressId,
expressNumber: expressNumber,
shopId: shopId,
expressGoodsMap: expressGoodsMap,
method:'app.purchase.delivery',
}
})
.then(data => {
... ... @@ -34,36 +35,31 @@ export default class DeliverGoodsService {
async getExpressList() {
return this.api.get({
url: '/express/getExpressList',
body: {}
url: '',
body: {
method:'app.express.getExpressList',
}
})
.then(data => {
console.log(data);
console.log('getExpressList');
return data;
})
.catch(error => {
console.log(error);
console.log('getExpressList error');
throw error;
});
}
async queryBySupplierId(supplierId) {
return this.api.get({
url: '/purchase/queryBySupplierId',
url: '',
body: {
supplierId,
method:'app.purchase.queryBySupplierId',
}
})
.then(data => {
console.log(data);
console.log('queryBySupplierId');
return data;
})
.catch(error => {
console.log(error);
console.log('queryBySupplierId error');
throw error;
});
}
... ...
... ... @@ -12,11 +12,12 @@ export default class OutOfStockService {
async stockOut(proReqFormId,productSku,num) {
return this.api.get({
url: '/purchase/stockOut',
url: '',
body: {
proReqFormId: proReqFormId,
productSku: productSku,
num: num,
method:'app.purchase.stockOut',
}
})
.then(data => {
... ...
... ... @@ -11,21 +11,18 @@ export default class TransferShipmentService {
async getPurchaseList(shopId,pageSize,pageNo) {
return this.api.get({
url: '/purchase/list',
url: '',
body: {
shopId: shopId,
pageSize: pageSize,
pageNo: pageNo,
method:'app.purchase.list',
}
})
.then(data => {
console.log(data);
console.log('data');
return data;
})
.catch(error => {
console.log(error);
console.log('error');
throw error;
});
}
... ...