| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import {
- get,
- put,
- putJ,
- postJ,
- deleteApi
- } from "@/utils/request";
- import Vue from "vue";
- // 列表
- export async function getList(data) {
- const res = await postJ(Vue.prototype.apiUrl + '/qms/quality_work_order/page', 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/quality_work_order/getById/${id}`);
- if (res.code == 0) {
- return res.data;
- }
- return Promise.reject(new Error(res.message));
- }
- // 编辑
- export async function update(data) {
- const res = await postJ(Vue.prototype.apiUrl + `/qms/quality_work_order/update`, data);
- if (res.code == 0) {
- return res.message;
- }
- return Promise.reject(new Error(res.message));
- }
|