Files
hht-oulun-uni/utils/getData3.js
2025-07-17 10:19:41 +08:00

452 lines
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import request from './request.js'
// 版本更新测试
export const pdaUpdate = () => request({
url:'api/pda/iosOut/update'
})
// export const pdaUpdate = () => {
// let res = {
// versionName: '1.0.1',
// url: 'https://mp-e979e0eb-882b-42b3-a4a1-923ad08ea194.cdn.bspapp.com/cloudstorage/f72ec59f-7b25-487d-a034-fead1b6654c6.apk'
// }
// return res
// }
// 登录
export const handLogin = (user, password) => request({
url:'mobile/auth/login',
data: {
username: user,
password: password
}
})
// 公共接口
// 仓库列表/区域列表
export const getSect = (scode, page, size) => request({
url:'api/pda/iosIn/getSect',
data: {stor_code: scode, page: page, size: size}
})
// 区域列表
export const getRegion = (region, page, size) => request({
url:'api/pda/iosIn/getRegion',
data: {region: region, page: page, size: size}
})
// 获取物料列表
export const getMaterialList = (search, page, size) => request({
url:'api/pda/iosIn/getMaterialList',
data: {search: search, page: page, size: size}
})
// export const getMaterialList = () => {
// let res = {
// "totalElements": 2067,
// "message": "查询成功",
// "content": null,
// "code": "200",
// "msg": null,
// "data": [
// {
// "cubage": null,
// "material_model": null,
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "塑料托盘",
// "update_time": "2025-07-08 16:32:10",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "空托盘",
// "height": null,
// "create_time": "2025-07-08 16:32:10",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "14",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1",
// "material_code": "KT001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": null,
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "SJD-208E国标3*1.0*2.1m,带漏电保护",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "漏保电源线",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608350371840",
// "material_code": "105030400000055",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "CFZ-8.8S10S-DYX",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "CFZ-8.8S10S-DYX YZ3*2.5+2*1.5线长2.8m/根",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线10S",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608367149056",
// "material_code": "105030300101001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "OL-503-501B",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "欧标烟斗插16A/250V3*1.0mm23.2m黑色TUV;VDE旧图号OL-503-501250旗型插片外露2.5m.",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线OL-503E",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608388120576",
// "material_code": "105010205031001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "OL-503-501C",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "美标插13A/125V3*16AWG3.5m耐温105℃黑色ULSJT旧图号OL-503-501250旗型插片外露2.8m",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608425869312",
// "material_code": "105010250301002",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "G001-501D",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "韩规16A/250V3*0.75mm22.52m灰色KC250旗插带锁外露1.8m",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608438452224",
// "material_code": "105011500101001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "G125-501C",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "美标插15A/125V3*14AWG8.15m耐温105℃黑色ULSJT旧图号OJ-G125E-501A250直插带锁外露7.6m",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线OL-G125E",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608451035136",
// "material_code": "105010201251001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "D080-501C",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "美标插15A/125V3*14AWG8.15m耐温105℃黑色UL15A/125V3*14AWG8.15m耐温105℃黑色ULSJT250旗插带锁外露7.6m",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608459423744",
// "material_code": "105011008001001",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "901-501C",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "美标插15A/125V3*14AWG3.5m耐温105℃黑色UL旧图号901E-501尾部O型圈外露3m",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线SJ-901E",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608467812352",
// "material_code": "105010209011002",
// "create_name": "admin",
// "update_optid": "1"
// },
// {
// "cubage": null,
// "material_model": "D059-210D",
// "is_used_time": null,
// "net_weight": null,
// "english_name": null,
// "weight_unit_id": null,
// "cubage_unit_id": null,
// "material_spec": "韩插16A/250V3*1.5mm22.43m黑色KC外露1.8m蓝色250#直插带锁棕色250#旗插带锁",
// "update_time": "2025-07-10 15:55:55",
// "update_optname": "admin",
// "ext_id": null,
// "len_unit_id": null,
// "create_id": "1",
// "gross_weight": null,
// "material_name": "电源线-韩标",
// "height": null,
// "create_time": "2025-07-10 15:55:55",
// "ass_unit_id": null,
// "print_no": null,
// "length": null,
// "material_type_id": null,
// "base_unit_id": "1",
// "is_used": "1",
// "is_delete": "0",
// "approve_fileno": null,
// "width": null,
// "material_id": "1943217608480395264",
// "material_code": "105010200591005",
// "create_name": "admin",
// "update_optid": "1"
// }
// ]
// }
// return res
// }
// 入库管理
// 物料组盘确认
export const groupPlate = (mid, pcsn, qty, vcode, ecode) => request({
url:'api/pda/iosIn/groupPlate',
data: {material_id: mid, pcsn: pcsn, qty: qty, vehicle_code: vcode, ext_code: ecode}
})
// 组盘入库确认
export const confirmIn = (vcode, sitecode, sid) => request({
url:'api/pda/iosIn/confirmIn',
data: {vehicle_code: vcode, site_code: sitecode, sect_id: sid}
})
// 空载具入库确认
export const emptyconfirmIn = (vcode, sitecode, sid, isempty, type) => request({
url:'api/pda/iosIn/confirmIn',
data: {vehicle_code: vcode, site_code: sitecode, sect_id: sid, is_empty_vehicle: isempty, material_id: type}
})
// 组盘入库获取物料明细
export const getVehicleMaterial = (search) => request({
url:'api/pda/iosIn/getVehicleMaterial',
data: {search: search}
})
// 拣选余料回库查询
export const getReturnMaterial = (search) => request({
url:'api/pda/iosIn/getReturnMaterial',
data: {search: search}
})
// 拣选余料回库确认
export const confirmReturnMaterial = (sid, obj) => request({
url:'api/pda/iosIn/confirmReturnMaterial',
data: {sect_id: sid, obj: obj}
})
// 出库管理
// 线边仓出库获取物料库存
export const getMaterialDtl = (sid, search) => request({
url:'api/pda/iosOut/getMaterialDtl',
data: {sect_id: sid, search: search}
})
// 线边仓出库确认
export const materialConfirm = (sid, siteCode, obj) => request({
url:'api/pda/iosOut/materialConfirm',
data: {sect_id: sid, siteCode: siteCode, obj: obj}
})
// 产线叫料获取物料库存
export const linegetMaterialDtl = (rcode, search) => request({
url:'api/pda/iosOut/getMaterialDtl',
data: {region_code: rcode, search: search}
})
// 产线叫料确认
export const callMaterialConfirm = (rcode, siteCode, obj) => request({
url:'api/pda/iosOut/callMaterialConfirm',
data: {region_code: rcode, siteCode: siteCode, obj: obj}
})
// 出库确认获取物料明细
export const iosOutgetVehicleMaterial = (search) => request({
url:'api/pda/iosOut/getVehicleMaterial',
data: {search: search}
})
// 出库确认
export const confirm = (gid, scode, type) => request({
url:'api/pda/iosOut/confirm',
data: {group_id: gid, storagevehicle_code: scode, type: type}
})
// 货架绑定/解绑
export const bindOrUnbind = (siteCode, shelfCode, mode) => request({
url:'api/pda/iosOut/bindOrUnbind',
data: {siteCode: siteCode, shelfCode: shelfCode, mode: mode}
})
// 转运确认
export const transferConfirm = (scode, siteCode, rcode) => request({
url:'api/pda/iosOut/transferConfirm',
data: {storagevehicle_code: scode, siteCode: siteCode, region_code: rcode}
})
// 空载具/CTU出库确认
export const vehicleOutConfirm = (sid, siteCode, qty) => request({
url:'api/pda/iosOut/vehicleOutConfirm',
data: {sect_id: sid, siteCode: siteCode, qty: qty}
})