sf-apple-sdk
Version:
Apple SF SDK for SF WMS
32 lines (31 loc) • 992 B
JavaScript
import { SERVICE_CODE } from '../constants/service.js';
import { post } from '../utils/post.js';
/**
* 商品接口 Service 3.1 ✅
* 通过该接口发送商品信息,该接口必须先于入库单接口、出库单接口调用。
*/
export class ItemService {
constructor(options) {
this.options = options;
}
/**
* 发送商品信息
*/
async sendItems(data) {
const res = await post({
url: this.options.baseURL,
checkword: this.options.checkword,
sysSource: this.options.sysSource,
serviceCode: SERVICE_CODE.ITEM_SERVICE,
specialStr: this.options.specialStr,
body: {
CompanyCode: this.options.sysSource,
AccessCode: this.options.accessCode,
Checkword: this.options.checkword,
ServiceCode: SERVICE_CODE.ITEM_SERVICE,
Items: data.items,
},
});
return res;
}
}