Files
7-Dongan-MES_Management_View/src/api/BasicData/ShiftManagement.js
2026-05-29 13:58:41 +08:00

89 lines
2.8 KiB
JavaScript

import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
// 查询班次
export function getScheduling(SchedulingType) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '设备管理_基础表_班次表_查询数据',
param: '班次类型=' + SchedulingType
}
})
}
// 查询班次
export function searchProgramme() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '设备管理_基础表_班次表_查询班次'
}
})
}
// 新增班次
export function addShift(starttime, endtime, shifttype, shiftnumber, nightwork, work, temporary, difficult, note) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '设备管理_基础表_班次表_增加数据',
param: '开始工作时间=' + starttime + '&结束工作时间=' + endtime + '&班次类型=' + shifttype + '&班次代码=' + shiftnumber + '&是否夜班=' + nightwork + '&是否工作=' + work + '=int&是否可以安排临时件=' + temporary + '=int&是否可以安排高难度件=' + difficult + '=int&备注=' + note
}
})
}
// 编辑班次
export function editShift(shiftCode, starttime, endtime, shifttype, shiftnumber, nightwork, work, temporary, difficult, note) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '设备管理_基础表_班次表_修改数据',
param: '序号=' + shiftCode + '=int&开始工作时间=' + starttime + '=datetime&结束工作时间=' + endtime + '=datetime&班次类型=' + shifttype + '=int&班次代码=' + shiftnumber + '=int&是否夜班=' + nightwork + '=int&是否工作=' + work + '=int&是否可以安排临时件=' + temporary + '=int&是否可以安排高难度件=' + difficult + '=int&备注=' + note
}
})
}
// 删除班次
export function deleteShift(shiftCode) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '设备管理_基础表_班次表_删除数据',
param: '序号=' + shiftCode
}
})
}
// 班次类型与工作时间增加
export function addShiftType() {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '2',
name: '设备管理_基础表_班次表_班次类型与工作时间_增加'
}
})
}