/** * 集采需求数据请求 */ export default class ProcurementService { constructor(AjaxService) { Object.assign(this, { AjaxService }) this.name = 'ProcurementService' } /** * 所有集采 * @param pageNo 页数 * @param pageSize 长度 */ procurementAllList(data = {}) { return this.AjaxService.get({ url:'/commodity/procurement/findList', data, isLoading: false, }) } /** * 集采详情 * @param {number} id 集采id */ procurementDetail(data={}) { return this.AjaxService.get({ url: '/commodity/procurement/detail', data, isLoading: false, }) } /** * 集采tab 我参与的 我创建的 * @param {number} userId 用户id * @param {number} procurementType = [0, 1] 0 我参与的 1 我发起的 */ procurementTabChange(data={}) { return this.AjaxService.get({ url: '/commodity/procurement/procurement', data, isLoading: true, }) } /** * 发布集采 | 修改集采 * @param id id * @param userId 发布人id * @param userName 用户名 * @param productImage 商品图片 * @param productName 商品名称 * @param price 期望单价 * @param number 购买数量 */ procurementSave(data={}) { return this.AjaxService.post({ url: '/commodity/procurement/saveProcurement', data, isLoading: true, }) } /** * 参与集采 * @param userId 发布人id * @param productImage 商品图片 * @param productName 商品名称 * @param price 期望单价 * @param number 购买数量 */ procurementParticipate(data={}) { return this.AjaxService.post({ url: '/commodity/procurement/pateProcurement', data, isLoading: true, }) } /** * 删除集采 | 退出集采 * @param id 集采id * @param {number} userId 用户id * @param {number} procurementType = [0, 1] 0 删除集采 1 退出集采 */ procurementUpdate(data={}) { return this.AjaxService.get({ url: '/commodity/procurement/updateProcurement', data, isLoading: true, }) } /** * 修改集采信息回显 * @param id 集采id * @param {number} userId 用户id * @param {number} procurementType = [0, 1] 0 我参与的 1 我发起的 */ procurementEditData(data={}) { return this.AjaxService.get({ url: '/commodity/procurement/editData', data, isLoading: true, }) } }