Commit 6dbe2f80 by Zhang Xin

添加注释

parent a73f3544
......@@ -42,7 +42,7 @@ const submitBreakageProduct = (data)=>{
}
//test 没有散落货品
// 没有散落货品
const hasNoSku = (commonInfo)=>{
let {storeInfo={},userInfo={},taskInfo={}} = commonInfo;
let url = `${domain}machine_pad/work/lr/status/${taskInfo.taskId}/${taskInfo.area}/${taskInfo.currentTaskType}`;
......
......@@ -127,12 +127,15 @@ const getTaskList = (data={},callback=null)=>{
}
}
//本地存储公共信息
const saveCommonInfo = (data)=>{
return {
type : actionType.SAVECOMMONINFO,
data
}
};
// 退出时清空用户信息,工单信息
const logout = ()=>{
let data = Object.assign({},{userInfo:{},taskInfo:{},taskList:{}});
return {
......@@ -141,6 +144,7 @@ const logout = ()=>{
}
};
// 清空门店信息(用于断电断网退出时)
const emptyStoreInfo = ()=>{
let data = Object.assign({},{storeInfo:{}});
return {
......@@ -149,6 +153,7 @@ const emptyStoreInfo = ()=>{
}
}
// 获取页面左边部分展示当前任务名
const getTaskName = (currentTaskType,childTaskNum=0)=>{
return {
type : actionType.GETTASKNAME,
......
......@@ -26,7 +26,7 @@ var myHeaders = new Headers({
'Content-Type': 'application/json; charset=UTF-8',
});
// 获取故障列表
const getTroubleList = (info) => {
let {storeInfo={},userInfo={},taskInfo={}} = info;
return (dispatch) => {
......@@ -54,6 +54,7 @@ const getTroubleList = (info) => {
}
};
// 提交故障信息
const updateTroubleList = (info, headerInfo) => {
let {taskInfo={},userInfo={},storeInfo={}} = headerInfo;
let bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:userInfo.employeeId,storeId:storeInfo.id});
......
......@@ -11,13 +11,14 @@ let myHeaders = new Headers({
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Type': 'application/json; charset=UTF-8',
});
// 条形码错误
const wrongQrcode = (errorInfo)=>{
return {
type : actionType.SETREPLENISHERRORINFO,
errorInfo
}
}
// 清空当前补货商品信息
const emptyErrorInfo = ()=>{
return {
type : actionType.EMPTYREPLENISHERRORINFO,
......@@ -26,7 +27,6 @@ const emptyErrorInfo = ()=>{
const finishReplenish = (info,source)=>{
//source 1 : 商品页 , 2 : 扫码页
//已放入回收箱
let {userInfo,taskInfo,storeInfo,taskList} = info;
let bodyData = Object.assign({},{
storeId : storeInfo.id,
......
......@@ -53,6 +53,7 @@ const logoutUser = ()=>{
let timer = null;
// 断电断网 轮询获取用户登录状态
const pollingGetUserinfoAgain = (storeId)=>{
return (dispatch)=>{
if(!timer){
......@@ -66,7 +67,7 @@ const pollingGetUserinfoAgain = (storeId)=>{
}
}
// 断电断网获取用户登录信息
const pollingGetUserinfo = (storeId)=>{
UTILPATH.myLogger.info("power_cut_find_user storeId ",storeId)
return(dispatch)=>{
......
......@@ -3,5 +3,5 @@
*/
module.exports = {
domain: 'https://test.mjitech.com/web/',
uploadImg : 'https://test.mjitech.com/static/uploadTrouble'
uploadImg : 'https://test.mjitech.com/static/uploadTrouble' // 小程序上传图片的二维码连接(已作废)
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment