接口
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
import request from './request.js'
|
||||
|
||||
/**
|
||||
* 人工组盘
|
||||
*/
|
||||
// 点位编码
|
||||
export const getPressCode = () => request({
|
||||
url:'api/pda/group/getPressCode',
|
||||
data: {}
|
||||
})
|
||||
// 获取载具类型
|
||||
export const getVehicleType = () => request({
|
||||
url:'api/pda/group/getVehicleType',
|
||||
data: {}
|
||||
})
|
||||
// 人工组盘-确认
|
||||
export const groupmanual = (vcode, vtype, pcode, weight) => request({
|
||||
url:'api/pda/group/manual',
|
||||
data: {
|
||||
vehicle_code: vcode,
|
||||
vehicle_type: vtype,
|
||||
point_code: pcode,
|
||||
material_weight: weight
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 混碾搬运
|
||||
*/
|
||||
// 获取混碾机数据
|
||||
export const getBlendingCode = () => request({
|
||||
url:'api/pda/move/getBlendingCode',
|
||||
data: {}
|
||||
})
|
||||
// 确认
|
||||
export const sendTask = (vcode, spcode) => request({
|
||||
url:'api/pda/move/sendTask',
|
||||
data: {
|
||||
vehicle_code: vcode,
|
||||
start_point_code: spcode,
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 人工分拣
|
||||
*/
|
||||
// 呼叫木盘
|
||||
// 呼叫木盘刷新
|
||||
export const callingWoodenPalletTaskShow = () => request({
|
||||
url:'api/pda/manualSorting/callingWoodenPalletTaskShow',
|
||||
data: {}
|
||||
})
|
||||
// 呼叫木盘任务
|
||||
export const callingWoodenPalletTask = () => request({
|
||||
url:'api/pda/manualSorting/callingWoodenPalletTask',
|
||||
data: {}
|
||||
})
|
||||
|
||||
|
||||
// 呼叫满料
|
||||
// 呼叫满料刷新
|
||||
export const callingMaterialTaskShow = () => request({
|
||||
url:'api/pda/manualSorting/callingMaterialTaskShow',
|
||||
data: {}
|
||||
})
|
||||
// 呼叫满料确认
|
||||
export const callingMaterialTask = () => request({
|
||||
url:'/api/pda/manualSorting/callingMaterialTask',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 空盘入库
|
||||
// 空盘入库刷新
|
||||
export const emptyDiskIntoStorageShow = () => request({
|
||||
url:'api/pda/manualSorting/emptyDiskIntoStorageShow',
|
||||
data: {}
|
||||
})
|
||||
// 空盘入库确认
|
||||
export const emptyDiskIntoStorageTask = () => request({
|
||||
url:'api/pda/manualSorting/emptyDiskIntoStorageTask',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 压机搬运
|
||||
// 压机叫料
|
||||
export const pressTask = (dcode, vcode, qty, id) => request({
|
||||
url:'api/pda/pressSendMaterial/pressTask',
|
||||
data: {
|
||||
device_code: dcode,
|
||||
vehicle_code: vcode,
|
||||
qty: qty,
|
||||
user_id: id
|
||||
}
|
||||
})
|
||||
// 搬运起点
|
||||
export const pressPointList = () => request({
|
||||
url:'api/pda/pressSendMaterial/pressPointList',
|
||||
data: {}
|
||||
})
|
||||
@@ -1,5 +1,4 @@
|
||||
import request from './request.js'
|
||||
import request1 from './request1.js'
|
||||
|
||||
// 版本更新测试
|
||||
export const pdaUpdate = () => request({
|
||||
@@ -23,150 +22,72 @@ export const handLogin = (user, password) => request({
|
||||
})
|
||||
|
||||
/**
|
||||
* 设备点检
|
||||
* 混碾搬运
|
||||
*/
|
||||
// 获取设备下拉框
|
||||
export const deviceInfo = () => request({
|
||||
url:'api/pda/deviceCheck/deviceInfo',
|
||||
// 查询混碾工单
|
||||
export const hnWorkOrder = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/hnWorkOrder',
|
||||
data: {}
|
||||
})
|
||||
// 获取设备状态下拉框
|
||||
export const deviceStatus = () => request({
|
||||
url:'api/pda/deviceCheck/deviceStatus',
|
||||
data: {}
|
||||
// 混碾工单完成
|
||||
export const hnOrderFinish = (code) => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/orderFinish',
|
||||
data: {orderCode: code}
|
||||
})
|
||||
// 设备点检
|
||||
export const deviceCheckVerify = (code, user, remark, status) => request({
|
||||
url:'api/pda/deviceCheck/verify',
|
||||
data: {
|
||||
device_code: code,
|
||||
username: user,
|
||||
remark: remark,
|
||||
check_status: status
|
||||
}
|
||||
// 拆包机料盅入库
|
||||
export const hnmlTask = (code, bcode, time) => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/hnmlTask',
|
||||
data: {orderCode: code,barCode: bcode,createTime: time}
|
||||
})
|
||||
// 拆包机叫空蛊
|
||||
export const hnqkTask = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/hnqkTask',
|
||||
data: {}
|
||||
})
|
||||
|
||||
/**
|
||||
* 强制静置
|
||||
* 压机搬运
|
||||
*/
|
||||
// 显示静置信息
|
||||
export const forcedRestingShow = () => request({
|
||||
url:'api/pda/forcedResting/show',
|
||||
// 压机上料位下拉框
|
||||
export const yjslwPointList = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/yjslwPointList',
|
||||
data: {}
|
||||
})
|
||||
// 强制静置
|
||||
export const forcedRestingSubmit = (stime, id) => request({
|
||||
url:'api/pda/forcedResting/submit',
|
||||
data: {
|
||||
stand_time: stime,
|
||||
group_id: id
|
||||
}
|
||||
// 压机上料位强制回货架
|
||||
export const qzhhjTask = (code) => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/qzhhjTask',
|
||||
data: {deviceCode: code}
|
||||
})
|
||||
|
||||
/**
|
||||
* 分拣排产
|
||||
* 物料报废
|
||||
*/
|
||||
// 显示工单/刷新
|
||||
export const manualSortingOrders = () => request({
|
||||
url:'api/pda/manualSorting/orders',
|
||||
// 物料报废
|
||||
export const materialScrap = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/materialScrap',
|
||||
data: {}
|
||||
})
|
||||
// 开工
|
||||
export const manualSortingProductionScheduling = (code, user) => request({
|
||||
url:'api/pda/manualSorting/productionScheduling',
|
||||
data: {
|
||||
workorder_code: code,
|
||||
username: user
|
||||
}
|
||||
})
|
||||
// 完工
|
||||
export const manualSortingProductionComplete = (code, user) => request({
|
||||
url:'api/pda/manualSorting/productionComplete',
|
||||
data: {
|
||||
workorder_code: code,
|
||||
username: user
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 剩料入库
|
||||
* 人工分拣
|
||||
*/
|
||||
// 刷新
|
||||
export const callingResidueMaterialTaskShow = () => request({
|
||||
url:'api/pda/manualSorting/callingResidueMaterialTaskShow',
|
||||
// 查询人工分拣点位
|
||||
export const rgfjPoint = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/rgfjPoint',
|
||||
data: {}
|
||||
})
|
||||
// 确认
|
||||
export const callingResidueMaterialTask = (code, qty) => request({
|
||||
url:'api/pda/manualSorting/callingResidueMaterialTask',
|
||||
data: {
|
||||
vehicle_code: code,
|
||||
qty: qty
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 托盘绑定
|
||||
*/
|
||||
// 确认
|
||||
export const manualSortingBindingVehicle = (ocode, tcode) => request({
|
||||
url:'api/pda/manualSorting/bindingVehicle',
|
||||
data: {
|
||||
origin_vehicle_code: ocode,
|
||||
target_vehicle_code: tcode
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 包装入库
|
||||
*/
|
||||
// 刷新
|
||||
export const manualSortingPackingTaskShow = () => request({
|
||||
url:'api/pda/manualSorting/packingTaskShow',
|
||||
// 查询缓存货架点位
|
||||
export const hchjPoint = () => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/hchjPoint',
|
||||
data: {}
|
||||
})
|
||||
// 确认
|
||||
export const manualSortingPackingTask = (code, qty, sqty) => request({
|
||||
url:'/api/pda/manualSorting/packingTask',
|
||||
data: {
|
||||
vehicle_code: code,
|
||||
qty: qty,
|
||||
surplus_quantity: sqty
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 货架盘点
|
||||
*/
|
||||
// 物料查询
|
||||
export const shelfMaterialQuery = (code) => request({
|
||||
url:'api/pda/shelf/materialQuery',
|
||||
data: {
|
||||
material_code: code
|
||||
}
|
||||
})
|
||||
// 确认
|
||||
export const shelfUpdateData = (code, status, vcode, qty, id) => request({
|
||||
url:'api/pda/shelf/updateData',
|
||||
data: {
|
||||
point_code: code,
|
||||
point_status: status,
|
||||
vehicle_code: vcode,
|
||||
material_qty: qty,
|
||||
material_id: id
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 混碾操作
|
||||
*/
|
||||
// 获取要料信息
|
||||
export const mixRequestInfo = () => request({
|
||||
url:'api/pda/mix/requestInfo',
|
||||
data: {}
|
||||
})
|
||||
// 删除数据
|
||||
export const mixDeleteInfo = (obj) => request({
|
||||
url:'api/pda/mix/deleteInfo',
|
||||
data: obj
|
||||
// 人工分拣叫料
|
||||
export const rgfjqlTask = (sp, code) => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/rgfjqlTask',
|
||||
data: {startPoint: sp, deviceCode: code}
|
||||
})
|
||||
// 人工分拣送空盘
|
||||
export const rgfjskTask = (code) => request({
|
||||
url:'http://192.168.81.190:8011/api/pda/rgfjskTask',
|
||||
data: {deviceCode: code}
|
||||
})
|
||||
455
utils/mork2.js
Normal file
455
utils/mork2.js
Normal file
@@ -0,0 +1,455 @@
|
||||
// 查询混碾工单
|
||||
export const hnWorkOrder = () => {
|
||||
let res = [
|
||||
{
|
||||
"workorder_id": "1762660775601770496",
|
||||
"workorder_code": "240228003",
|
||||
"plan_qty": 0,
|
||||
"real_qty": 66,
|
||||
"plan_weight": 1000,
|
||||
"real_weight": 33,
|
||||
"real_new_weight": 0,
|
||||
"real_old_weight": 0,
|
||||
"material_ratio": 0,
|
||||
"material_id": "1771048061557149696",
|
||||
"raw_material_code": "111",
|
||||
"produce_order": null,
|
||||
"batch_no": null,
|
||||
"team": null,
|
||||
"produce_date": "20240307",
|
||||
"vehicle_type": "LZ",
|
||||
"planproducestart_date": "2024-02-28 10:07:28",
|
||||
"planproduceend_date": "2024-02-29 00:00:00",
|
||||
"realproducestart_date": "2024-03-22 17:10:37",
|
||||
"realproduceend_date": "2024-03-22 17:40:58",
|
||||
"standing_time": 1,
|
||||
"point_code": "HNJ01",
|
||||
"point_name": "混碾机01",
|
||||
"region_code": "HN",
|
||||
"region_name": "混碾区域",
|
||||
"workorder_status": "5",
|
||||
"is_needmove": true,
|
||||
"workorder_type": "1",
|
||||
"production_order": null,
|
||||
"passback_status": null,
|
||||
"workshop_code": null,
|
||||
"ext_id": null,
|
||||
"ext_data": "0",
|
||||
"is_delete": false,
|
||||
"is_new": true,
|
||||
"create_id": "1",
|
||||
"create_name": "管理员",
|
||||
"create_time": "2024-02-28 10:07:32",
|
||||
"update_id": "1",
|
||||
"update_name": "管理员",
|
||||
"update_time": "2024-03-28 10:09:43",
|
||||
"is_urgent": false,
|
||||
"operator": "管理员",
|
||||
"customer": "",
|
||||
"inspector": null,
|
||||
"qualified_qty": 0,
|
||||
"unqualified_qty": 0,
|
||||
"material_name": null,
|
||||
"material_code": null,
|
||||
"material_spec": null,
|
||||
"half_material_code": null,
|
||||
"order_no": null,
|
||||
"custer_no": null,
|
||||
"order_subnum": 0,
|
||||
"guadansum": 0,
|
||||
"pack_method": null,
|
||||
"order_number": null,
|
||||
"product_code": null,
|
||||
"material_model": null
|
||||
},
|
||||
{
|
||||
"workorder_id": "1762660775601770496",
|
||||
"workorder_code": "2402280031",
|
||||
"plan_qty": 0,
|
||||
"real_qty": 66,
|
||||
"plan_weight": 1000,
|
||||
"real_weight": 33,
|
||||
"real_new_weight": 0,
|
||||
"real_old_weight": 0,
|
||||
"material_ratio": 0,
|
||||
"material_id": "1771048061557149696",
|
||||
"raw_material_code": "111",
|
||||
"produce_order": null,
|
||||
"batch_no": null,
|
||||
"team": null,
|
||||
"produce_date": "20240307",
|
||||
"vehicle_type": "LZ",
|
||||
"planproducestart_date": "2024-02-28 10:07:28",
|
||||
"planproduceend_date": "2024-02-29 00:00:00",
|
||||
"realproducestart_date": "2024-03-22 17:10:37",
|
||||
"realproduceend_date": "2024-03-22 17:40:58",
|
||||
"standing_time": 1,
|
||||
"point_code": "HNJ01",
|
||||
"point_name": "混碾机01",
|
||||
"region_code": "HN",
|
||||
"region_name": "混碾区域",
|
||||
"workorder_status": "5",
|
||||
"is_needmove": true,
|
||||
"workorder_type": "1",
|
||||
"production_order": null,
|
||||
"passback_status": null,
|
||||
"workshop_code": null,
|
||||
"ext_id": null,
|
||||
"ext_data": "0",
|
||||
"is_delete": false,
|
||||
"is_new": true,
|
||||
"create_id": "1",
|
||||
"create_name": "管理员",
|
||||
"create_time": "2024-02-28 10:07:32",
|
||||
"update_id": "1",
|
||||
"update_name": "管理员",
|
||||
"update_time": "2024-03-28 10:09:43",
|
||||
"is_urgent": false,
|
||||
"operator": "管理员",
|
||||
"customer": "",
|
||||
"inspector": null,
|
||||
"qualified_qty": 0,
|
||||
"unqualified_qty": 0,
|
||||
"material_name": null,
|
||||
"material_code": null,
|
||||
"material_spec": null,
|
||||
"half_material_code": null,
|
||||
"order_no": null,
|
||||
"custer_no": null,
|
||||
"order_subnum": 0,
|
||||
"guadansum": 0,
|
||||
"pack_method": null,
|
||||
"order_number": null,
|
||||
"product_code": null,
|
||||
"material_model": null
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
// 混碾工单完成
|
||||
export const hnOrderFinish = () => {
|
||||
let res = {
|
||||
"message": "string"
|
||||
}
|
||||
return res
|
||||
}
|
||||
// 拆包机料盅入库
|
||||
export const hnmlTask = () => {
|
||||
let res = {"message":"满料入库请求成功"}
|
||||
return res
|
||||
}
|
||||
// 拆包机叫空蛊
|
||||
export const hnqkTask = () => {
|
||||
let res = {"message":"空蛊出库请求成功"}
|
||||
return res
|
||||
}
|
||||
// 压机上料位下拉框
|
||||
export const yjslwPointList = () => {
|
||||
let res = [
|
||||
{
|
||||
"value": "YJ01SLW01",
|
||||
"text": "压机01上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ01SLW02",
|
||||
"text": "压机01上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ02SLW01",
|
||||
"text": "压机02上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ02SLW02",
|
||||
"text": "压机02上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ03SLW01",
|
||||
"text": "压机03上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ03SLW02",
|
||||
"text": "压机03上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ04SLW01",
|
||||
"text": "压机04上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ04SLW02",
|
||||
"text": "压机04上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ05SLW01",
|
||||
"text": "压机05上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ05SLW02",
|
||||
"text": "压机05上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ06SLW01",
|
||||
"text": "压机06上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ06SLW02",
|
||||
"text": "压机06上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ07SLW01",
|
||||
"text": "压机07上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ07SLW02",
|
||||
"text": "压机07上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ08SLW01",
|
||||
"text": "压机08上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ08SLW02",
|
||||
"text": "压机08上料位02"
|
||||
},
|
||||
{
|
||||
"value": "YJ09SLW01",
|
||||
"text": "压机09上料位01"
|
||||
},
|
||||
{
|
||||
"value": "YJ09SLW02",
|
||||
"text": "压机09上料位02"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
// 压机上料位强制回货架
|
||||
export const qzhhjTask = (code) => {
|
||||
let res = {"message":"压制上料位强制回库请求成功"}
|
||||
return res
|
||||
}
|
||||
// 物料报废
|
||||
export const materialScrap = () => {
|
||||
let res = {"message":"物料作废成功"}
|
||||
return res
|
||||
}
|
||||
// 查询人工分拣点位
|
||||
export const rgfjPoint = () => {
|
||||
let res = [
|
||||
{
|
||||
"value": "RGFJC01",
|
||||
"text": "人工分拣拆01"
|
||||
},
|
||||
{
|
||||
"value": "RGFJC02",
|
||||
"text": "人工分拣拆02"
|
||||
},
|
||||
{
|
||||
"value": "RGFJC03",
|
||||
"text": "人工分拣拆03"
|
||||
},
|
||||
{
|
||||
"value": "RGFJC04",
|
||||
"text": "人工分拣拆04"
|
||||
},
|
||||
{
|
||||
"value": "RGFJC05",
|
||||
"text": "人工分拣拆05"
|
||||
},
|
||||
{
|
||||
"value": "RGFJC06",
|
||||
"text": "人工分拣拆06"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
// 查询缓存货架点位
|
||||
export const hchjPoint = () => {
|
||||
let res = [
|
||||
{
|
||||
"value": "HCHJ01",
|
||||
"text": "缓存货架01"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ02",
|
||||
"text": "缓存货架02"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ03",
|
||||
"text": "缓存货架03"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ04",
|
||||
"text": "缓存货架04"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ05",
|
||||
"text": "缓存货架05"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ06",
|
||||
"text": "缓存货架06"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ07",
|
||||
"text": "缓存货架07"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ08",
|
||||
"text": "缓存货架08"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ09",
|
||||
"text": "缓存货架09"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ10",
|
||||
"text": "缓存货架10"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ11",
|
||||
"text": "缓存货架11"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ12",
|
||||
"text": "缓存货架12"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ13",
|
||||
"text": "缓存货架13"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ14",
|
||||
"text": "缓存货架14"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ15",
|
||||
"text": "缓存货架15"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ16",
|
||||
"text": "缓存货架16"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ17",
|
||||
"text": "缓存货架17"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ18",
|
||||
"text": "缓存货架18"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ19",
|
||||
"text": "缓存货架19"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ20",
|
||||
"text": "缓存货架20"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ21",
|
||||
"text": "缓存货架21"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ22",
|
||||
"text": "缓存货架22"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ23",
|
||||
"text": "缓存货架23"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ24",
|
||||
"text": "缓存货架24"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ25",
|
||||
"text": "缓存货架25"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ26",
|
||||
"text": "缓存货架26"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ27",
|
||||
"text": "缓存货架27"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ28",
|
||||
"text": "缓存货架28"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ29",
|
||||
"text": "缓存货架29"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ30",
|
||||
"text": "缓存货架30"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ31",
|
||||
"text": "缓存货架31"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ32",
|
||||
"text": "缓存货架32"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ33",
|
||||
"text": "缓存货架33"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ34",
|
||||
"text": "缓存货架34"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ35",
|
||||
"text": "缓存货架35"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ36",
|
||||
"text": "缓存货架36"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ37",
|
||||
"text": "缓存货架37"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ38",
|
||||
"text": "缓存货架38"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ39",
|
||||
"text": "缓存货架39"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ40",
|
||||
"text": "缓存货架40"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ41",
|
||||
"text": "缓存货架41"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ42",
|
||||
"text": "缓存货架42"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ43",
|
||||
"text": "缓存货架43"
|
||||
},
|
||||
{
|
||||
"value": "HCHJ44",
|
||||
"text": "缓存货架44"
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
// 人工分拣叫料
|
||||
export const rgfjqlTask = (sp, code) => {
|
||||
let res = {"message":"人工分拣缺料请求成功"}
|
||||
return res
|
||||
}
|
||||
// 人工分拣送空盘
|
||||
export const rgfjskTask = (code) => {
|
||||
let res = {"message":"人工分拣送空请求成功"}
|
||||
return res
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
import store from '@/vuex/store'
|
||||
const request1 = (params) => {
|
||||
let _self = this;
|
||||
let url = params.url;
|
||||
let method = params.method || 'POST';
|
||||
let data = params.data || {};
|
||||
// data.token = "default-access_token"
|
||||
// if (!params.token) {
|
||||
// let token = uni.getStorageSync('token');
|
||||
// if (!token) {
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// });
|
||||
// } else {
|
||||
// data.token = '179509245-9c91827e0224bdc18d0b118b8be1b5af';
|
||||
// }
|
||||
// }
|
||||
let token = ''
|
||||
if (store.getters.saveToken !== '') {
|
||||
token = store.getters.saveToken
|
||||
}
|
||||
let defaultOpot = {
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'Terminal-Type': 'innerH5',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
}
|
||||
let header = {}
|
||||
method = method.toUpperCase()
|
||||
if (method == 'POST') {
|
||||
header = {
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
'Authorization': token
|
||||
}
|
||||
// data = qs.stringify(data)
|
||||
}
|
||||
const requestUrl = url;
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: requestUrl,
|
||||
method: method,
|
||||
header: Object.assign({}, defaultOpot, header),
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
})
|
||||
.then(res => { // 成功
|
||||
if (res.length === 1) {
|
||||
uni.showModal({
|
||||
content: 'request:fail',
|
||||
showCancel: false
|
||||
})
|
||||
reject('request:fail')
|
||||
} else if (res[1] && res[1].statusCode === 400) {
|
||||
uni.showModal({
|
||||
content: res[1].data.message,
|
||||
showCancel: false
|
||||
})
|
||||
reject(res[1].data.message)
|
||||
} else if (res[1] && res[1].statusCode === 401) {
|
||||
uni.showModal({
|
||||
content: res[1].data.message,
|
||||
showCancel: false
|
||||
})
|
||||
store.dispatch('delUserInfo', '')
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
} else if (res[1] && res[1].statusCode === 200) {
|
||||
let {
|
||||
data: dataType
|
||||
} = res[1]
|
||||
resolve(dataType)
|
||||
// switch (dataType.code * 1) { // 拦截返回参数
|
||||
// case 0:
|
||||
// resolve(dataType)
|
||||
// break;
|
||||
// case 1003:
|
||||
// uni.showModal({
|
||||
// title: '登录已过期',
|
||||
// content: '很抱歉,登录已过期,请重新登录',
|
||||
// confirmText: '重新登录',
|
||||
// success: function(res) {
|
||||
// if (res.confirm) {
|
||||
// uni.navigateTo({
|
||||
// // 切记这儿需要哈pages.json保持一致;不能有.vue后缀
|
||||
// url: '/pages/login/login'
|
||||
// });
|
||||
// } else if (res.cancel) {
|
||||
// console.log('用户点击取消');
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// break;
|
||||
// case -1:
|
||||
// uni.showModal({
|
||||
// title: '请求数据失败',
|
||||
// content: '获取数据失败!',
|
||||
// confirmText: '确定',
|
||||
// showCancel: false,
|
||||
// success: function(res) {
|
||||
// if (res.confirm) {} else if (res.cancel) {
|
||||
// console.log('用户点击取消');
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// break
|
||||
// }
|
||||
}else {
|
||||
uni.showModal({
|
||||
content: res[1].data.message,
|
||||
showCancel: false
|
||||
})
|
||||
reject(res[1].data.message)
|
||||
}
|
||||
})
|
||||
.catch(err => { // 错误
|
||||
reject(err)
|
||||
})
|
||||
.finally(() => {
|
||||
uni.hideLoading();
|
||||
})
|
||||
})
|
||||
}
|
||||
export default request1
|
||||
Reference in New Issue
Block a user