| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // 抽样记录
- import {
- get,
- put,
- postJ,putJ,
- deleteApi
- } from "@/utils/request";
- import Vue from "vue";
- // 分页
- export async function samplingRecordsPage(params) {
- const res = await get(Vue.prototype.apiUrl + `/qms/samplingrecord/page`, params);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 取样新建/修改
- export async function samplingrecordSave(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/qms/samplingrecord/save`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 取样新建/修改
- export async function samplingrecordUpdate(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/qms/samplingrecord/update`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 详情
- export async function getById(id) {
- const res = await get(Vue.prototype.apiUrl + `/qms/samplingrecord/getById/${id}`);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 作废
- export async function listCancel(data) {
- const res = await putJ(Vue.prototype.apiUrl + `/qms/samplingrecord/cancel`, data);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
|