From 82e27d0cadbddfc73e8b978e778b802dc8e51fa1 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 29 三月 2024 10:51:36 +0800
Subject: [PATCH] 报工入参修改和工序ID修改

---
 src/api/index.ts |  129 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 123 insertions(+), 6 deletions(-)

diff --git a/src/api/index.ts b/src/api/index.ts
index 326f27f..185ed66 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1,5 +1,5 @@
 import { request } from '@/common/utils'
-import type { CraftParamsResponse, TasksGroupByChannel } from './task'
+import type { CraftParamsResponse, TasksGroupByChannel, Task } from './task'
 import type { PLCResponse } from './plc'
 import type { Devices } from './device'
 import type { CraftModel } from './craftModel'
@@ -28,6 +28,8 @@
   offset: number
   /** 鏌ュ灏戞潯 */
   limit: number
+  /** 璁惧id */
+  deviceID: string
 }
 
 /**
@@ -37,6 +39,25 @@
 export function getTaskList(params: TaskListParams) {
   return request<BaseResponse<TasksGroupByChannel>>({
     url: '/api-s/v1/reportWork/taskList',
+    method: 'get',
+    params
+  })
+}
+
+export interface TaskInfoParams {
+  /** 璁惧id */
+  deviceID: string
+  /** 宸ュ簭id */
+  procedureID: number
+}
+
+/**
+ * 鑾峰彇浠诲姟璇︽儏
+ * @param params
+ */
+export function getTaskInfo(params: TaskInfoParams) {
+  return request<BaseResponse<Task>>({
+    url: '/api-s/v1/reportWork/taskInfo',
     method: 'get',
     params
   })
@@ -106,6 +127,24 @@
   })
 }
 
+export interface ProcedureUpdateParams {
+  isFinish: boolean
+  isProcessing: boolean
+  workOrderProcedureID: number
+}
+
+/**
+ * 寮�濮嬩换鍔�/瀹屾垚浠诲姟 (鍘� 鑾峰彇宸ヨ壓鍙傛暟/缁撴潫浠诲姟)
+ * @param params
+ */
+export function procedureUpdate(params: ProcedureUpdateParams) {
+  return request<BaseResponse>({
+    url: `/api-s/v1/reportWork/procedureUpdate`,
+    method: 'post',
+    data: params
+  })
+}
+
 /**
  * 鑾峰彇褰撳墠闈㈡澘缁戝畾鐨勮澶囧垪琛�
  */
@@ -125,7 +164,7 @@
  */
 export function apiSetCurrentDevice(data: SetCurrentDeviceParams) {
   return request<BaseResponse>({
-    url: `/v1/device/setCurrentDeviceId`,
+    url: `/api-s/v1/reportWork/setCurrentDeviceId`,
     method: 'post',
     data
   })
@@ -193,7 +232,7 @@
 export interface ReportingRecordListParams {
   page?: number
   pageSize?: number
-  procedureId: number
+  workOrderProcedureID: number
 }
 
 /**
@@ -201,16 +240,17 @@
  */
 export function apiGetReportingRecordList(params: ReportingRecordListParams) {
   return request<ListResponse<ReportingRecord[]>>({
-    url: '/v1/reportWork/list',
+    url: '/api-s/v1/reportWork/list',
     method: 'get',
     params
   })
 }
 
 export interface ReportWorkParams {
-  procedureId: number
+  workOrderProcedureID: number
   reportAmount: number
   workerID: string
+  workerName: string
 }
 
 /**
@@ -218,7 +258,84 @@
  */
 export function apiReportWork(params: ReportWorkParams) {
   return request<BaseResponse>({
-    url: '/v1/reportWork/report',
+    url: '/api-s/v1/reportWork/report',
+    method: 'post',
+    data: params
+  })
+}
+
+/**
+ * 鑾峰彇楠岃瘉鐮�
+ */
+export function getCaptcha() {
+  return request({
+    url: '/api/base/captcha',
+    method: 'post'
+  })
+}
+
+export interface loginParams {
+  username: string
+  password: string
+  captcha: string
+  captchaId: string
+}
+/**
+ * 鐧诲綍
+ */
+export function login(params: loginParams) {
+  return request({
+    url: '/api/base/login',
+    method: 'post',
+    data: params
+  })
+}
+
+export interface qualityParams {
+  reportAmount: number
+  workOrderProcedureID: number
+  workerID: string
+  workerName: string
+}
+/**
+ * 鐪嬫澘璐ㄦ
+ */
+export function bulletinQualityInspection(params: qualityParams) {
+  return request({
+    url: '/api-s/v1/reportWork/bulletinQualityInspection',
+    method: 'post',
+    data: params
+  })
+}
+
+export interface getQualityParams {
+  workOrderId: string
+  procedureId: string
+}
+/**
+ * 鐪嬫澘鑾峰彇璐ㄦ淇℃伅
+ */
+export function getQualityInspection(params: getQualityParams) {
+  return request({
+    url: '/api-s/v1/reportWork/bulletinGetQualityInspection',
+    method: 'post',
+    data: params
+  })
+}
+
+export interface bulletinReportParams {
+  reportAmount: number
+  workOrderProcedureID: number
+  workerID: string
+  workerName: string
+  ids: any[]
+}
+/**
+ * 鐪嬫澘鎶ュ伐
+ */
+export function bulletinReport(params: bulletinReportParams) {
+  return request({
+    url: '/api-s/v1/reportWork/bulletinReport',
     method: 'post',
     data: params
   })

--
Gitblit v1.8.0