Commit 6dbe2f80 by Zhang Xin

添加注释

parent a73f3544
...@@ -42,7 +42,7 @@ const submitBreakageProduct = (data)=>{ ...@@ -42,7 +42,7 @@ const submitBreakageProduct = (data)=>{
} }
//test 没有散落货品 // 没有散落货品
const hasNoSku = (commonInfo)=>{ const hasNoSku = (commonInfo)=>{
let {storeInfo={},userInfo={},taskInfo={}} = commonInfo; let {storeInfo={},userInfo={},taskInfo={}} = commonInfo;
let url = `${domain}machine_pad/work/lr/status/${taskInfo.taskId}/${taskInfo.area}/${taskInfo.currentTaskType}`; let url = `${domain}machine_pad/work/lr/status/${taskInfo.taskId}/${taskInfo.area}/${taskInfo.currentTaskType}`;
......
...@@ -127,12 +127,15 @@ const getTaskList = (data={},callback=null)=>{ ...@@ -127,12 +127,15 @@ const getTaskList = (data={},callback=null)=>{
} }
} }
//本地存储公共信息
const saveCommonInfo = (data)=>{ const saveCommonInfo = (data)=>{
return { return {
type : actionType.SAVECOMMONINFO, type : actionType.SAVECOMMONINFO,
data data
} }
}; };
// 退出时清空用户信息,工单信息
const logout = ()=>{ const logout = ()=>{
let data = Object.assign({},{userInfo:{},taskInfo:{},taskList:{}}); let data = Object.assign({},{userInfo:{},taskInfo:{},taskList:{}});
return { return {
...@@ -141,6 +144,7 @@ const logout = ()=>{ ...@@ -141,6 +144,7 @@ const logout = ()=>{
} }
}; };
// 清空门店信息(用于断电断网退出时)
const emptyStoreInfo = ()=>{ const emptyStoreInfo = ()=>{
let data = Object.assign({},{storeInfo:{}}); let data = Object.assign({},{storeInfo:{}});
return { return {
...@@ -149,6 +153,7 @@ const emptyStoreInfo = ()=>{ ...@@ -149,6 +153,7 @@ const emptyStoreInfo = ()=>{
} }
} }
// 获取页面左边部分展示当前任务名
const getTaskName = (currentTaskType,childTaskNum=0)=>{ const getTaskName = (currentTaskType,childTaskNum=0)=>{
return { return {
type : actionType.GETTASKNAME, type : actionType.GETTASKNAME,
......
...@@ -26,7 +26,7 @@ var myHeaders = new Headers({ ...@@ -26,7 +26,7 @@ var myHeaders = new Headers({
'Content-Type': 'application/json; charset=UTF-8', 'Content-Type': 'application/json; charset=UTF-8',
}); });
// 获取故障列表
const getTroubleList = (info) => { const getTroubleList = (info) => {
let {storeInfo={},userInfo={},taskInfo={}} = info; let {storeInfo={},userInfo={},taskInfo={}} = info;
return (dispatch) => { return (dispatch) => {
...@@ -54,6 +54,7 @@ const getTroubleList = (info) => { ...@@ -54,6 +54,7 @@ const getTroubleList = (info) => {
} }
}; };
// 提交故障信息
const updateTroubleList = (info, headerInfo) => { const updateTroubleList = (info, headerInfo) => {
let {taskInfo={},userInfo={},storeInfo={}} = headerInfo; let {taskInfo={},userInfo={},storeInfo={}} = headerInfo;
let bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:userInfo.employeeId,storeId:storeInfo.id}); let bodyData = Object.assign({}, {details: info}, {taskId:taskInfo.taskId,employeeId:userInfo.employeeId,storeId:storeInfo.id});
......
...@@ -11,13 +11,14 @@ let myHeaders = new Headers({ ...@@ -11,13 +11,14 @@ let myHeaders = new Headers({
// 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', // 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Content-Type': 'application/json; charset=UTF-8', 'Content-Type': 'application/json; charset=UTF-8',
}); });
// 条形码错误
const wrongQrcode = (errorInfo)=>{ const wrongQrcode = (errorInfo)=>{
return { return {
type : actionType.SETREPLENISHERRORINFO, type : actionType.SETREPLENISHERRORINFO,
errorInfo errorInfo
} }
} }
// 清空当前补货商品信息
const emptyErrorInfo = ()=>{ const emptyErrorInfo = ()=>{
return { return {
type : actionType.EMPTYREPLENISHERRORINFO, type : actionType.EMPTYREPLENISHERRORINFO,
...@@ -26,7 +27,6 @@ const emptyErrorInfo = ()=>{ ...@@ -26,7 +27,6 @@ const emptyErrorInfo = ()=>{
const finishReplenish = (info,source)=>{ const finishReplenish = (info,source)=>{
//source 1 : 商品页 , 2 : 扫码页 //source 1 : 商品页 , 2 : 扫码页
//已放入回收箱
let {userInfo,taskInfo,storeInfo,taskList} = info; let {userInfo,taskInfo,storeInfo,taskList} = info;
let bodyData = Object.assign({},{ let bodyData = Object.assign({},{
storeId : storeInfo.id, storeId : storeInfo.id,
......
...@@ -53,6 +53,7 @@ const logoutUser = ()=>{ ...@@ -53,6 +53,7 @@ const logoutUser = ()=>{
let timer = null; let timer = null;
// 断电断网 轮询获取用户登录状态
const pollingGetUserinfoAgain = (storeId)=>{ const pollingGetUserinfoAgain = (storeId)=>{
return (dispatch)=>{ return (dispatch)=>{
if(!timer){ if(!timer){
...@@ -66,7 +67,7 @@ const pollingGetUserinfoAgain = (storeId)=>{ ...@@ -66,7 +67,7 @@ const pollingGetUserinfoAgain = (storeId)=>{
} }
} }
// 断电断网获取用户登录信息
const pollingGetUserinfo = (storeId)=>{ const pollingGetUserinfo = (storeId)=>{
UTILPATH.myLogger.info("power_cut_find_user storeId ",storeId) UTILPATH.myLogger.info("power_cut_find_user storeId ",storeId)
return(dispatch)=>{ return(dispatch)=>{
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
*/ */
module.exports = { module.exports = {
domain: 'https://test.mjitech.com/web/', 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