123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428 |
- /**
- * Created by Administrator on 2017/12/5.
- */
- /**
- * Created by summer on 2018/5/25.
- */
- var validator = {
- tips:[
- {
- success:0,
- message:'接口传入字段成功!',
- },
- {
- success:1,
- message:'接口传入字段缺失!',
- },
- {//2
- success:1,
- message:'数据库连接失败!',
- },
- {//3
- success:1,
- message:'时间格式错误',
- },
- {//4
- success:1,
- message:'数据类型错误',
- },
- {//5
- success:1,
- message:'操作类型错误',
- },
- {//6
- success:1,
- message:'请求失败!',
- jsapi_ticket: '',
- noncestr: '',
- timestamp: '',
- url: '',
- signature: ''
- },
- {//7
- success:1,
- message:'不能为空',
- },
- {//8
- success:1,
- message:'指标编码重复,添加失败',
- },
- {//9
- success:1,
- message:'指标编码重复,修改失败',
- },
- {//10
- success:1,
- message:'权重分值总分不等于100,添加失败',
- },
- {//11
- success:1,
- message:'权重分值总分不等于100,修改失败',
- },
- {//12
- success:1,
- message:'该类别编码已存在',
- },
- {//13
- success:1,
- message:'该数据已存在',
- },
- {//14
- success:1,
- message:'数据不符合规则',
- }
- ]
- };
- var corporation = {
- tips:[
- {
- success:1,
- message:'身份证格式错误!',
- },
- {
- success:1,
- message:'统一社会信用代码错误!',
- },
- {
- success:1,
- message:'该企业已上传,请勿重复上传!',
- }
- ]
- };
- var login = {
- tips:[
- {//0
- success:0,
- message:'登陆成功!',
- },
- {//1
- success:1,
- message:'账号或密码错误!',
- },
- {//2
- success:0,
- message:'查询成功!',
- },
- {//3
- success:1,
- message:'账号密码不能为空!',
- },
- {//4
- success:0,
- message:'密码修改成功!',
- },
- {//5
- success:1,
- message:'新密码与原密码相同,修改失败!',
- },
- {//6
- success:1,
- message:'账号或原密码错误,修改失败!',
- },
- {//7
- success:1,
- message:'企业信息获取失败,请联系管理员!',
- },
- ]
- };
- var precheck = {
- tips:[
- {//0
- success:1,
- message:'token错误!',
- },
- {//1
- success:2,
- message:'token过期!',
- },
- {//2
- success:3,
- message:'该用户没有该权限!',
- },
- {//3
- success:4,
- message:'用户名有误,请重新登录!',
- },
- ]
- };
- var processWarehouse = {
- tips:[
- {//0
- success:1,
- message:'产品编码选择错误,库存修改失败!',
- },
- {//1
- success:0,
- message:'出库成功!',
- },
- ]
- };
- var packageCoding = {
- tips:[
- {//0
- success:1,
- message:'请检查二维码是否正确!',
- },
- ]
- };
- var plantArea = {
- tips:[
- {//0
- success:1,
- message:'该企业不存在该基地信息,添加地块失败!',
- },
- ]
- };
- var productCode = {
- tips:[
- {//0
- success:1,
- message:'防伪码查询失败!',
- },
- {//1
- success:1,
- message:'查询码未绑定nfc!',
- },
- {//2
- success:0,
- message:'验证成功!',
- },
- {//3
- success:1,
- message:'nfc不匹配!',
- },
- ]
- };
- var productionProcess = {
- tips:[
- {//0
- success:1,
- message:'仓库编号、投入品商品码等错误,投入品出库失败!',
- },
- {//1
- success:0,
- message:'投入品出库成功!',
- },
- ]
- };
- var operation = {
- tips:[
- {//0
- success:1,
- message:'修改失败!',
- },
- {//1
- success:0,
- message:'修改成功!',
- },
- {//2
- success:1,
- message:'查询失败!',
- },
- {//3
- success:0,
- message:'查询成功!',
- },
- {//4
- success:0,
- message:'未修改数据!',
- },
- {//5
- success:0,
- message:'添加成功!',
- },
- {//6
- success:1,
- message:'添加失败!',
- },
- {//7
- success:1,
- message:'该标签已经初始化,请勿重复初始化!',
- },
- {//8
- success:1,
- message:'统一社会信用代码重复!',
- },
- {//9
- success:1,
- message:'数据不存在或者已经备案,删除失败!',
- },
- {//10
- success:1,
- message:'数据不存在或者已经备案,修改失败!',
- },
- {
- //11
- success:1,
- message:'召回计划编码错误,添加失败!',
- },
- {
- //12
- success:1,
- message:'已审核,删除失败!',
- },
- {
- //13
- success:1,
- message:'数据不存在或已审核,修改失败!',
- },
- {
- //14
- success:1,
- message:'数据不存在或未审核,修改失败!',
- },
- {
- //15
- success:1,
- message:'应急事件不存在或者未启动!',
- },
- {
- //16
- success:1,
- message:'设备ID已经存在,添加失败!',
- },
- {
- //17
- success:1,
- message:'字典值已存在,添加失败!',
- },
- {
- //18
- success:1,
- message:'字典表的值不存在,添加失败!',
- },
- {
- //19
- success:1,
- message:'数据不存在或已锁定,删除失败!',
- },
- {
- //20
- success:0,
- message:'删除成功!',
- },
- {
- //21
- success:1,
- message:'数据不存在或已发布,删除失败!',
- },
- {
- //22
- success:1,
- message:'数据不存在或已发布,修改失败!',
- },
- {
- //23
- success:1,
- message:'数据不存在或已发布,回复失败!',
- },
- {
- //24
- success:1,
- message:'该业务类型不存在!',
- },
- {
- //25
- success:1,
- message:'配送主表查询失败,请检查配送单号!',
- },
- {
- //26
- success:1,
- message:'检验单号错误,请检查!',
- },
- {
- //27
- success:1,
- message:'起始码和结束码不属于同一批次,请核对!',
- },
- {
- //28
- success:1,
- message:'数据已备案,企业名称和机构代码不能修改!',
- },
- {
- //29
- success:200,
- message:'上传成功!',
- },
- {
- //30
- success:1,
- message:'未找到产品或者库存不足,投入量大于库存!',
- },
- {
- //31
- success:1,
- message:'该企业已存在该投入品!',
- },
- ]
- };
- var deviceAction = {
- tips:[
- {//0
- success:1,
- message:'已经存在设备操作记录,该设备无法删除!',
- },
- {//1
- success:1,
- message:'该设备不存在,添加操作记录失败!',
- },
- {//2
- success:1,
- message:'统计失败',
- },
- {//3
- success:0,
- message:'统计成功',
- },
- {//4
- success:0,
- message:'墒情数据上传成功',
- },
- {//5
- success:0,
- message:'气象数据上传成功',
- },
- {//6
- success:1,
- message:'传入数据值超出范围,统计失败',
- },
- ]
- }
- module.exports={
- validator:function(index){
- return validator[index];
- },
- operation:function(index){
- return operation[index];
- },
- corporation:function(index){
- return corporation[index];
- },
- login:function(index){
- return login[index];
- },
- precheck:function(index){
- return precheck[index];
- },
- processWarehouse:function(index){
- return processWarehouse[index];
- },
- packageCoding:function(index){
- return packageCoding[index];
- },
- plantArea:function(index){
- return plantArea[index];
- },
- productionProcess:function(index){
- return productionProcess[index];
- },
- deviceAction:function(index){
- return deviceAction[index];
- },
- productCode:function(index){
- return productCode[index];
- }
- };
|