SmartStorage/apis/apis.js

351 lines
7.0 KiB
JavaScript
Raw Normal View History

2023-12-20 15:15:23 +08:00
import Http from'./request'
import HttpConfig from './http'
2023-12-23 11:54:30 +08:00
const login = {
async codeLogin (data = {} , header = {}){
2023-12-20 15:15:23 +08:00
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.code,
data,
header
)
}
}
2023-12-23 11:54:30 +08:00
const user = {
async logOut (data = {} , header = {}){
return await Http.delete(
HttpConfig.authPath,
HttpConfig.serviceUrl.user.logOut,
data,
header
)
}
}
2023-12-20 15:15:23 +08:00
const index = {
async noticeCont (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.noticeCont,
data,
header
)
},
async waitDo (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.waitDo,
data,
header
)
},
async keyData (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.keyData,
data,
header
)
}
}
const fetchMaterial = {
async fetchMaterialList (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.fetchMaterialList,
data,
header
)
},
2023-12-23 11:54:30 +08:00
async getDeptList (data = {} , header = {}){
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fetchMaterial.getDeptList,
data,
header
)
},
async getProjList (data = {} , header = {}){
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fetchMaterial.getProjList,
data,
header
)
},
}
const fetchExam = {
async fetchExamList (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchExamList,
data,
header
)
},
2023-12-20 15:15:23 +08:00
}
2023-12-23 23:21:42 +08:00
const fetchMaterialOutStore = {
async fetchInfoByCode (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByCode,
data,
header
)
},
async subOutStore (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.subOutStore,
data,
header
)
},
2023-12-24 18:44:01 +08:00
async fetchInfoByQrCode(data = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByQrCode,
data
)
}
2023-12-23 23:21:42 +08:00
}
2023-12-20 15:15:23 +08:00
const exitMaterial = {
2023-12-21 11:01:48 +08:00
async exitDeptList (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitDeptList,
data,
header
)
},
2023-12-20 15:15:23 +08:00
async exitMaterialList (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialList,
data,
header
)
},
async exitMaterialDetail (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialDetail,
data,
header
)
},
2023-12-21 11:01:48 +08:00
async subExitMaterial (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.subExitMaterial,
data,
header
)
},
async delMaterial (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.delMaterial,
data,
header
)
},
async newExitList (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.newExitList,
data,
header
)
},
async selectMaterial (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.selectMaterial,
data,
header
)
},
2023-12-23 11:54:30 +08:00
async ifAgreement (data = {} , header = {}){
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.exitMaterial.ifAgreement,
data,
header
)
},
2023-12-21 11:01:48 +08:00
}
const exitExam = {
async exitExamList (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamList,
data,
header
)
},
async exitExamDetail (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamDetail,
data,
header
)
},
async subExitExam (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.subExitExam,
data,
header
)
},
2023-12-20 15:15:23 +08:00
}
2023-12-23 11:54:30 +08:00
const fix = {
async fixList (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixList,
data,
header
)
},
async fixDetail (data = {} , header = {}){
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixDetail,
data,
header
)
},
async fixExam (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixExam,
data,
header
)
},
2024-01-02 13:26:42 +08:00
async completeFix (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.completeFix,
data,
header
)
},
2023-12-23 11:54:30 +08:00
}
const repairTestInStore = {
async repairTestInStoreList (data = {} , header = {}){
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreList,
data,
header
)
},
async repairTestInStoreDetail (data = {} , header = {}){
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreDetail,
data,
header
)
},
async processOrReject (data = {} , header = {}){
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.processOrReject,
data,
header
)
},
}
2023-12-24 02:19:29 +08:00
const backMaterialReceive = {
async backMaterialReceiveList (data = {} , header = {}){
2023-12-24 14:19:53 +08:00
return await Http.get(
2023-12-24 02:19:29 +08:00
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList,
data,
header
)
},
async backMaterialReceiveDetail (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveDetail,
data,
header
)
},
2023-12-24 14:19:53 +08:00
async backMaterialSetNumBack (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetNumBack,
data,
header
)
},
2023-12-24 16:28:36 +08:00
async backMaterialQrcodeQuery (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialQrcodeQuery,
data,
header
)
},
async backMaterialSetCodeBack (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetCodeBack,
data,
header
)
},
2023-12-24 14:19:53 +08:00
2023-12-24 16:28:36 +08:00
async backReceiveCodeQuery (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveCodeQuery,
data,
header
)
},
2023-12-24 16:50:36 +08:00
async backReceiveEndBack (data = {} , header = {}){
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveEndBack,
data,
header
)
},
2023-12-24 16:28:36 +08:00
2023-12-24 14:19:53 +08:00
2023-12-24 16:50:36 +08:00
// fetchMaterialOutStore
2023-12-24 02:19:29 +08:00
}
2024-01-02 13:26:42 +08:00
export default{
2023-12-23 11:54:30 +08:00
login,
2023-12-20 15:15:23 +08:00
index,
2023-12-23 11:54:30 +08:00
user,
2023-12-20 15:15:23 +08:00
fetchMaterial,
2023-12-23 11:54:30 +08:00
fetchExam,
2023-12-23 23:21:42 +08:00
fetchMaterialOutStore,
2023-12-21 11:01:48 +08:00
exitMaterial,
2023-12-23 11:54:30 +08:00
fix,
exitExam,
2023-12-24 02:19:29 +08:00
repairTestInStore,
backMaterialReceive
2023-12-20 15:15:23 +08:00
}