UNPKG

ttk-app-core

Version:
34 lines (30 loc) 1.92 kB
/** * webapi.js 封装app所需的所有web请求 * 供app测试使用,app加入网站后webpai应该由网站通过config,提供给每个app */ import { fetch } from 'edf-utils' let prefix = "/v1/biz/scm/st/rdrecord/" export default { inventoryDoc: { getBussinessType: (option = {}) => fetch.post('/v1/biz/scm/st/rdrecord/bussinesstype', option), initCreate: (option) => fetch.post('/v1/biz/scm/st/rdrecord/initCreate', option), getcode: (option = {}) => fetch.post(`${prefix}getcode`, option), previous: (code) => fetch.post(prefix + 'previous', code), next: (code) => fetch.post(prefix + 'next', code), createApi: (option) => fetch.post(prefix + 'create', option), update: (option) => fetch.post(prefix + 'update', option), del: (option) => fetch.post(prefix + 'delete', option), findById: (option) => fetch.post(prefix + 'queryById', option), getSetting: (option={}) => fetch.post(prefix + 'settings', option), audit: (option) => fetch.post(prefix + 'audit', option), unaudit: (option) => fetch.post(prefix + 'unaudit', option), deleteBatch: (option) => fetch.post(prefix + 'deleteBatch', option), auditBatch: (option) => { throw '请实现批量审核功能' },//fetch.post('v1/arrival/auditBatch', option), updateEnclosure: (option) => fetch.post(prefix + 'attachmentUpdate', option), queryBySupplier: (option) => fetch.post(prefix + 'queryBySupplier', option), updateWithDetail: (option) => fetch.post('v1/edf/voucher/updateWithDetail', option), reInitByUser: (option) => fetch.post('/v1/edf/voucher/reInitByUser', option), queryTime: () => fetch.post('v1/biz/scm/st/rdrecord/queryenabletime', {}), getEnableDate: (option = {}) => fetch.post('/v1/biz/scm/st/rdrecord/queryenabletime', option) } }