fastlion-amis
Version:
一种MIS页面生成工具
977 lines (976 loc) • 31.4 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Shell = void 0;
var tslib_1 = require("tslib");
var message_1 = (0, tslib_1.__importDefault)(require("antd/lib/message"));
var shell_1 = require("./shell");
var tools_1 = require("./tools");
var Shell = /** @class */ (function () {
// 不允许实例
function Shell() {
}
;
/**
* 判断是否在壳环境
*/
Shell.hasShell = function () {
if ((tools_1.tools.os.ios || tools_1.tools.isMac) && window.webkit && !tools_1.tools.isWeiXin()) {
return true;
}
else if (window.AppShell) {
return true;
}
return false;
};
/**
* window.onerror发送报错信息
*/
Shell.sendError = function (content) {
return (0, shell_1.shellHandler)({ name: 'sendError', data: { content: content } });
};
/**
*
* @param downloadAdd
*/
Shell.restartApplication = function () {
return (0, shell_1.shellHandler)({ name: 'restartApplication' });
};
/**
*
* @param code
*/
Shell.setDownLoadUrl = function (downloadAdd) {
return (0, shell_1.shellHandler)({ name: 'setDownLoadUrl', data: { downloadAdd: downloadAdd } });
};
/**
* 修改客户编码
* @param {string} code 客户编码
* @return {Promise<CompanyInfo>} 返回设备信息
*/
Shell.toCompany = function (code) {
return (0, shell_1.shellHandler)({ name: 'toCompany', data: { code: code } });
};
// 获取客户代码对应服务器地址
Shell.getCompanyCode = function () {
return (0, shell_1.shellHandler)({ name: "companyCode" });
};
/**
* 获取设备信息
* @return {Promise<DeviceInfo>} 返回设备信息
*/
Shell.getDevice = function () {
return (0, shell_1.shellHandler)({ name: 'getDevice' });
};
// 微信登录
Shell.wechatinLogin = function () {
return (0, shell_1.shellHandler)({ name: "wechatinLogin" });
};
/**
* ping 网络检测
* @param data 多组ping数据
* @param success 成功回调
* @param info info为false回调
* @param fail 失败回调
*/
Shell.startPing = function (data, success, info, fail) {
return (0, shell_1.shellHandler)({
name: "startPing",
data: data,
success: success,
info: info,
fail: fail
});
};
/**
* 操作PC多开的数据
* @param companyCode 公司编号
* @param environment 环境的MD5值
* @param key 环境下需要保存的key值,如果已经存在,则覆盖
* @param value 需要保存的值
* @param type //操作类型, 0表示查询,1表示新增,2表示删除,其它返回失败信息
*/
Shell.moreOpenOperat = function (_a) {
var companyCode = _a.companyCode, environment = _a.environment, key = _a.key, value = _a.value, type = _a.type;
return (0, shell_1.shellHandler)({ name: 'execCacheDb', data: { companyCode: companyCode, environment: environment, key: key, value: value, type: type } });
};
/**
* 打开扫码功能
* @param {number} type 默认0,表示全部识别,1表示只识别英文和数字,2表示只识别数字,3表示只识别英文
* @param btn 可配置input(手动输入),voice(语音识别),image(图像识别)。
*/
// btn:{ input?: boolean, voice?: boolean, image?: boolean }
Shell.getScanCode = function (type, btn) {
if (type === void 0) { type = 0; }
if (btn === void 0) { btn = {}; }
return new Promise(function (resolve, reject) {
(0, shell_1.shellHandler)({
name: "scanCode",
data: {
scanType: type,
showBtn: Object.keys(btn).reduce(function (str, key) {
if (btn[key]) {
return str ? str + ',' + key : key;
}
else {
return str;
}
}, '')
}
}).then(function (res) {
if (res.success) {
resolve(res);
}
if (res.success === false) {
if (res.code == '-200') {
message_1.default.error({
content: res.msg || '设备不支持相机'
});
}
else {
resolve(res);
}
}
});
});
};
/**
* 获取gps信息(Android,ios)
*/
Shell.getGPS = function () {
return (0, shell_1.shellHandler)({
name: "getGPS"
});
};
/**
* 下载附件
* @param {string} url 附件地址
* 1保存 0:打开
* @return {Promise<ShellResult<{msg: string}>>}
*/
Shell.download = function (url, name, type) {
return (0, shell_1.shellHandler)({
name: "dealFile",
data: {
type: type !== null && type !== void 0 ? type : (tools_1.tools.isMb ? 0 : 1),
downPath: url,
name: name
}
});
};
/**
* 打开网络文件
* @param {string} url 文件路径
*/
Shell.openNetFile = function (url, fileName) {
return (0, shell_1.shellHandler)({
name: "dealFile",
data: {
type: 0,
downPath: url,
name: fileName
}
});
};
/**
* 打开文件
*/
Shell.openFile = function (type, path, params) {
return (0, shell_1.shellHandler)({
name: "openFile",
data: {
type: type,
path: path,
params: params
}
});
};
/**
* 保存图片
*/
Shell.saveImg = function (img) {
return (0, shell_1.shellHandler)({
name: "saveImg",
data: {
img: img
}
});
};
/**
*
* @param "shareType": String, //分享类型,wx,qq
* @param "content": String, //文字描述。
* @param "FileData": String, //图片也是文件的一种,存放data数据
* @param "url": String //链接
*/
Shell.shareInfo = function (type, content, img, url) {
return (0, shell_1.shellHandler)({
name: 'shareInfo',
data: {
shareType: type,
content: content,
fileData: img,
url: url
}
});
};
/**
* 软件检测
*/
Shell.checkSoftInfo = function (data) {
return (0, shell_1.shellHandler)({
name: "checkSoftInfo",
data: data
});
};
/**
* 打印标签
* @param {string} blob 图片数据,base64格式
* @param {number} pieces 打印份数
* @param {string} driveName 打印机编码
* @param {number} width 纸张宽度
* @param {number} height 纸张高度
*/
// static labelPrint(blob: string, pieces: number, driveName: string, width: number, height: number) {
// return shellHandler<{ msg: string }>({
// name: "labelPrint",
// data: {
// quantity: pieces,
// driveName: driveName,
// image: blob,
// width,
// height
// }
// });
// }
/**
* 打印标签标签UI设置
* @param data 标签UI设置
*/
Shell.setLabelUI = function (data, baseUrl) {
return (0, shell_1.shellHandler)({
name: "setLabelUI",
data: Object.assign({}, data || {}, { baseUrl: baseUrl }),
});
};
/**
* 打印标签设置用户的配置
* @param data 用户的配置
*/
Shell.setUserConfig = function (data) {
return (0, shell_1.shellHandler)({
name: "setUserConfig",
data: data,
});
};
/**
* 打印标签设置标签的数据
* @param dataList 数据
* @param meta 列名
*/
Shell.setLabelData = function (data) {
return (0, shell_1.shellHandler)({
name: "setLabelData",
data: data,
});
};
/**
* 打印标签预览
* @param {number} pageIndex 预览的页数page
*/
Shell.labelPreview = function (pageIndex) {
return (0, shell_1.shellHandler)({
name: "labelPreview",
data: {
// pageIndex: pageIndex,
pageIndex: pageIndex,
}
});
};
/**
* 打印标签
* @param {number} printCount 打印份数
*/
Shell.labelPrint = function () {
return (0, shell_1.shellHandler)({
name: "labelPrint",
});
};
/**
* 清除上述的标签ui、用户设置、标签数据
*/
Shell.clearLabelData = function () {
return (0, shell_1.shellHandler)({
name: "clearLabelData",
});
};
/**
* 批量打印文件
* @param {string} printer 打印机名称
* @param {Array<{name: string, filePath: string, count: number}>} printData 打印内容
* name文件名称,filePath文件路径,count打印份数
*/
Shell.filePrint = function (printer, printData) {
return (0, shell_1.shellHandler)({
name: "filePrint",
data: {
printer: printer,
printData: printData
}
});
};
/**
* 获取打印机列表信息
*/
Shell.getPrinters = function () {
return (0, shell_1.shellHandler)({
name: "getPrinters"
});
};
/**
* 推送消息注册
* @param flag 使用信鸽推送传入推送标识flag给壳注册,并把flag发送给后端(旧版使用的是(登录环境+用户名)MD5)
* 接收apns时flag不用传,调用信鸽注册时要传(.....)
* @return 返回值apns 是推送的pushId,发送给后端
*/
Shell.registMessage = function (flag) {
return (0, shell_1.shellHandler)({
name: "registMessage",
data: {
flag: flag
}
});
};
/**
* 图片压缩
*/
Shell.getAttachment = function (data, info, success, fail) {
return (0, shell_1.shellHandler)({ name: 'getAttachment', data: data, info: info, success: success, fail: fail });
};
/**
* 打开调试工具(pc,Android,ios)
*/
Shell.openDebug = function () {
return (0, shell_1.shellHandler)({
name: "openDebug",
});
};
/**
* 指纹考勤长链接,进入页面时调用一次
* 只走success
*/
Shell.openFinger = function (type, success, info) {
if (type === void 0) { type = 1; }
return (0, shell_1.shellHandler)({ name: 'openFinger', data: { type: type }, success: success, info: info });
};
/**
* 将指纹插入壳数据库
*/
Shell.addFinger = function (userid, matchFinger, fingerType) {
return (0, shell_1.shellHandler)({ name: 'addFinger', data: { userid: userid, matchFinger: matchFinger, fingerType: fingerType } });
};
//关闭指纹长链接
Shell.closeFinger = function () {
return (0, shell_1.shellHandler)({ name: 'closeFinger' });
};
/**
* 获取指纹 info调用形式
* @param {number} type 指纹类型;0: 匹配校验指纹, 1: 注册指纹; 默认1;
* @param success 成功回调
* @param info 实时回调
* @param fail 失败回调
*/
Shell.fingerGet = function (type, success, info, fail) {
if (type === void 0) { type = 1; }
return (0, shell_1.shellHandler)({ name: 'getFinger', data: { type: type }, success: success, info: info, fail: fail });
};
// 取消指纹
Shell.cancelFinger = function (fingerType) {
return (0, shell_1.shellHandler)({ name: 'cancelFinger', data: { fingerType: fingerType } });
};
/**
* 指纹验证
* @param {string} enterFinger 用户输入的指纹
* @param {string} matchFinger 本地需要匹配的指纹
* @param {string} fingerType 是那一种指纹器,值为0或1或2
*/
Shell.verifyFinger = function (enterFinger, matchFinger, fingerType) {
return (0, shell_1.shellHandler)({
name: "verifyFinger",
data: {
enterFinger: enterFinger,
matchFinger: matchFinger,
fingerType: fingerType
}
});
};
/**
* android清除历史
*/
//清除历史
Shell.clearHistory = function () {
return (0, shell_1.shellHandler)({ name: 'clearHistory' });
};
/**
* 卡西欧盘点上传
*/
Shell.casioUpload = function (data, success, fail) {
return (0, shell_1.shellHandler)({
name: "casioUpload",
data: data,
success: success,
fail: fail
});
};
/**
* 卡西欧盘点下载
*/
Shell.casioDownLoad = function (data, success, fail) {
return (0, shell_1.shellHandler)({
name: "casioDownLoad",
data: data,
success: success,
fail: fail
});
};
/**
* 截屏
*/
Shell.screenShot = function () {
return (0, shell_1.shellHandler)({ name: 'screenShot' });
};
/**
* 开始录音
* @param type 类型,如果是0,只在结束的时候返回结果,如果是1,返回过程
*/
Shell.startVoice = function (type, success, fail, info) {
if (type === void 0) { type = 0; }
return (0, shell_1.shellHandler)({ name: 'startVoice', data: { type: type }, success: success, fail: fail, info: info });
};
/**
* 停止录音
*/
Shell.stopVoice = function () {
return (0, shell_1.shellHandler)({ name: 'stopVoice' });
};
/**
* 朗读文字
* @param content 要朗读的文字
*/
Shell.readVoice = function (content) {
return (0, shell_1.shellHandler)({ name: 'readVoice', data: { content: content } });
};
/**
* 获取系统剪贴板的内容
*/
Shell.getClipboardData = function () {
// let production = process.env.NODE_ENV === "production";
// if (!production) {
// var a = {
// "scanType":1,
// "btnId": "h5-12",
// "dataList": [{
// "KEYVALUE":"CMS3",
// "IMAGE":"",
// "KEYFIELD":"测试1",
// "TITLE":"蔡明邀请你加入速狮公司"
// }],
// "h5Url": "http://www.baidu.com",
// "url": "/ui/node/n2-test-cht-1?p_n=%5B%7B%22n%22%3A%22node_test_bg%22%2C%22k%22%3A%22null%22%7D%5D"
// }
// var str = tools.encode(encodeURI(JSON.stringify(a)));
// var url = `${a.h5Url}?qrcodeshare=${str}`;
// return Promise.resolve({
// success: true,
// data: { content: url }
// })
// }
return (0, shell_1.shellHandler)({ name: 'getFromPasteboard', data: {} });
};
/**
* 建表
* @param tableName 表名
* @param key 主键名称
*/
Shell.execCreateTable = function (tableName, key) {
return (0, shell_1.shellHandler)({ name: 'sqlCreateTable', data: { tableName: tableName, key: key } });
};
/**
* 新增数据
* @param tableName 表名
* @param key 主键名称
* @param insertData 新增的数据
*/
Shell.execInsert = function (tableName, insertData, key) {
return (0, shell_1.shellHandler)({ name: 'sqlInsert', data: { tableName: tableName, insertData: insertData, key: key } });
};
/**
* 查找表所有数据 或 单条数据
* @param tableName 表名
* @param key 主键名称 可不传
* @param keyValue 主键值 可不传
* 如果不传则代码查找表中所有数据
*/
Shell.execFind = function (tableName, keyValue, key) {
return (0, shell_1.shellHandler)({ name: 'sqlFind', data: { tableName: tableName, keyValue: keyValue, key: key } });
};
/**
* 删除数据 或 表
* @param tableName 表名
* @param key 主键名称 可不传
* @param keyValue 主键值 可不传
* 如果不传则代码删除所有数据
*/
Shell.execDelete = function (tableName, keyValue, key) {
return (0, shell_1.shellHandler)({ name: 'sqlDelete', data: { tableName: tableName, keyValue: keyValue, key: key } });
};
/**
* 更新数据
* @param tableName 表名
* @param key 主键名称
* @param updateData 要更新的数组
*/
Shell.execUpdate = function (tableName, updateData, key) {
return (0, shell_1.shellHandler)({ name: 'sqlUpdate', data: { tableName: tableName, updateData: updateData, key: key } });
};
/**
* 下载离线资源包
*/
Shell.downloadImgZip = function (url, method, requestParam) {
return (0, shell_1.shellHandler)({ name: 'downloadImg', data: { url: url, method: method, requestParam: requestParam } });
};
/**
* 离线上传图片
*/
Shell.offlineUloadImg = function (tableName, url, method) {
return (0, shell_1.shellHandler)({ name: 'uploadImg', data: { tableName: tableName, url: url, method: method } });
};
/**
* 离线删除图片
*/
Shell.deleteFile = function (tableName, primaryKey, primaryValue, fieldName, path) {
var opts = { tableName: tableName, primaryKey: primaryKey, primaryValue: primaryValue, fieldName: fieldName, path: path };
var newOpts = {};
for (var _i = 0, _a = Object.keys(opts); _i < _a.length; _i++) {
var i = _a[_i];
if (opts[i]) {
newOpts[i] = opts[i];
}
}
return (0, shell_1.shellHandler)({ name: 'deleteFile', data: { tableName: tableName, primaryKey: primaryKey, primaryValue: primaryValue, fieldName: fieldName, path: path } });
};
/**
* 导入读取Excel
*/
Shell.readExcel = function (url) {
return (0, shell_1.shellHandler)({ name: 'readExcel', data: { url: url } });
};
/**
* 获取已导入的Excel的数据
*/
Shell.getExcelData = function (startIndex, endIndex) {
return (0, shell_1.shellHandler)({ name: 'getExcelData', data: { startIndex: startIndex, endIndex: endIndex } });
};
/**
* 删除已导入的Excel的数据
*/
Shell.clearExcel = function () {
return (0, shell_1.shellHandler)({ name: 'clearExcel' });
};
/**
* 离线上传图片
*/
Shell.setBadge = function (count) {
return (0, shell_1.shellHandler)({ name: 'setBadge', data: { count: count } });
};
/**
* 远程协助
*/
Shell.remoteHelpStart = function (data) {
return (0, shell_1.shellHandler)({ name: 'remoteHelpStart', data: data });
};
/**
* 隐藏录制
*/
Shell.hideRecord = function () {
return (0, shell_1.shellHandler)({ name: 'hideRecord' });
};
/**
* 结束远程协助
*/
Shell.remoteHelpStop = function (success, fail) {
return (0, shell_1.shellHandler)({ name: 'remoteHelpStop', success: success, fail: fail });
};
/**
* 远程控制
*/
Shell.remoteControl = function () {
return (0, shell_1.shellHandler)({ name: 'remoteControl' });
};
/**
* 通知终端连接 socket
*/
Shell.connectSocket = function (data) {
return (0, shell_1.shellHandler)({ name: 'connectSocket', data: data });
};
/**
* 通知终端断开 socket
*/
Shell.closeSocket = function () {
return (0, shell_1.shellHandler)({ name: 'closeSocket' });
};
/**
* 导出文件,发送ui给终端
*/
Shell.jsExcelUi = function (data) {
return (0, shell_1.shellHandler)({ name: 'jsExcelUi', data: data });
};
/**
* 导出文件,传递数据给终端
*/
Shell.jsExcelData = function (data) {
return (0, shell_1.shellHandler)({ name: 'jsExcelData', data: data });
};
/**
* 导出文件,结束
*/
Shell.jsExcelOver = function (data) {
return (0, shell_1.shellHandler)({ name: 'jsExcelOver', data: data });
};
/**
* 沟通反馈选择图片
*/
Shell.chooseImage = function (data) {
return (0, shell_1.shellHandler)({ name: 'chooseImage', data: data });
};
/**
* 上传
* path 要上传的临时文件地址
* url 上传的服务器地址
*/
Shell.uploadFile = function (data, info, success, fail) {
return (0, shell_1.shellHandler)({ name: 'uploadFile', data: data, info: info, success: success, fail: fail });
};
/**
* @description 开始录音
*/
Shell.startRecord = function () {
return (0, shell_1.shellHandler)({ name: 'startRecord' });
};
/**
* @description 取消录音
*/
Shell.cancelRecord = function () {
return (0, shell_1.shellHandler)({ name: 'cancelRecord' });
};
/**
* @description 结束录音
*/
Shell.stopRecord = function () {
return (0, shell_1.shellHandler)({ name: 'stopRecord' });
};
/**
* @description 选择文件
*/
Shell.chooseFile = function (data) {
return (0, shell_1.shellHandler)({ name: 'chooseFile', data: data });
};
/**
* @description 语音转文字
* @path 音频地址
*/
Shell.translateText = function (data) {
return (0, shell_1.shellHandler)({ name: 'translateText', data: data });
};
/**
* @description 语音播放
* @path 音频地址
* @playType 1 扬声器 2听筒
*/
Shell.playVoice = function (data) {
return (0, shell_1.shellHandler)({ name: 'playVoice', data: data });
};
/**
* @description 停止播放语音
*/
Shell.stopPlayVoice = function () {
return (0, shell_1.shellHandler)({ name: 'stopPlayVoice' });
};
/* 打开外部Url
* @param data
* @returns
*/
Shell.handleExternalUrl = function (data) {
return (0, shell_1.shellHandler)({ name: 'handleExternalUrl', data: data });
};
/*
* h5打印
*/
Shell.h5Print = function (data) {
return (0, shell_1.shellHandler)({ name: 'h5Print', data: data });
};
// 独占式 PDA
Shell.pdaEnableScan = function (isEnabled) {
return (0, shell_1.shellHandler)({ name: 'pdaEnableScan', data: { isEnabled: isEnabled } });
};
/**
* 预览文件
*/
Shell.previewFile = function (data) {
return (0, shell_1.shellHandler)({ name: 'previewFile', data: data });
};
/**
* 打开拍照
*/
Shell.openCamera = function (count) {
return (0, shell_1.shellHandler)({ name: 'openCamera', data: { count: count } });
};
/**
* 文件压缩
*/
Shell.compressImage = function (data) {
return (0, shell_1.shellHandler)({ name: 'compressImage', data: data });
};
/**
* 下载文件流
*/
Shell.downloadFileStream = function (data) {
return (0, shell_1.shellHandler)({ name: 'downloadFileStream', data: data });
};
/**
* 开始rfid红外扫码
*/
Shell.UHFStartInfrared = function (timeout, success) {
return (0, shell_1.shellHandler)({
name: "UHFStartInfrared",
data: {
timeout: timeout
},
success: success,
fail: success
});
};
/**
* 停止rfid红外扫码
*/
Shell.UHFStopInfrared = function () {
return (0, shell_1.shellHandler)({
name: "UHFStopInfrared",
});
};
/**
* 开始扫码rfid长连接 不关闭的情况下重复调用
*/
Shell.startRFIDScan = function (data, info, success, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartScan",
data: (0, tslib_1.__assign)({ isSound: true }, data),
fail: fail,
success: success,
info: info
});
};
/**
* 开始找货rfid长连接 不关闭的情况下重复调用
*/
Shell.UHFStartSearch = function (info, success, searchType, searchData) {
return (0, shell_1.shellHandler)({
name: "UHFStartSearch",
data: {
searchType: searchType,
searchData: searchData
},
success: success,
info: info
});
};
/**
* 开始找货rfid长连接 不关闭的情况下重复调用
*/
Shell.UHFStartSearchForSKU = function (info, success, param, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartSearchForSKU",
data: (0, tslib_1.__assign)({ power: 30 }, param),
success: success,
fail: fail,
info: info
});
};
/**
* 开始找货rfid长连接 不关闭的情况下重复调用
*/
Shell.UHFStartSearchForEPC = function (info, success, param, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartSearchForEPC",
data: (0, tslib_1.__assign)({ power: 30 }, param),
success: success,
fail: fail,
info: info
});
};
/**
* 关闭扫描
*/
Shell.UHFStopScan = function () {
return (0, shell_1.shellHandler)({
name: "UHFStopScan",
});
};
/**
* 关闭搜索
*/
Shell.UHFStopSearch = function () {
return (0, shell_1.shellHandler)({
name: "UHFStopSearch"
});
};
/**
* 写入状态位
*/
Shell.UHFModify = function (filterEPCList, writeByte, endFn) {
return (0, shell_1.shellHandler)({
name: "UHFModify", data: {
filterEPCList: filterEPCList,
writeByte: writeByte
},
success: endFn,
fail: endFn
});
};
/**
* 写入状态位-pc使用-目前手持机没有
*/
Shell.UHFStopModify = function (endFn) {
return (0, shell_1.shellHandler)({
name: "UHFStopModify",
success: endFn,
fail: endFn
});
};
/**
* 读取白标
*/
Shell.UHFScanSingleBlankTag = function (data, endFn) {
return (0, shell_1.shellHandler)({
name: "UHFScanSingleBlankTag", data: (0, tslib_1.__assign)({ power: 5, scanTime: 2 }, data),
success: endFn,
fail: endFn
});
};
/**
* 写入
*/
Shell.UHFWrite = function (epc, endFn) {
return (0, shell_1.shellHandler)({
name: "UHFWrite", data: {
epc: epc
},
success: endFn
});
};
/**
* 写入
*/
Shell.UHFKillTags = function (filterEPCList, endFn) {
return (0, shell_1.shellHandler)({
name: "UHFKillTags", data: {
filterEPCList: filterEPCList,
killPasswordList: filterEPCList.map(function (_) {
return '12345678';
})
},
success: endFn,
fail: endFn,
});
};
/**
* 写入目标epc
*/
Shell.UHFWriteTag = function (data, endFn) {
return (0, shell_1.shellHandler)({
name: "UHFWriteTag", data: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, data), { writeTime: 10 }),
success: endFn,
fail: endFn
});
};
/**
* 开始盘存
*/
Shell.UHFStartInventoryForEPC = function (param, endFn, info, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartInventoryForEPC", data: (0, tslib_1.__assign)({ isSound: true }, param),
fail: fail,
success: endFn,
info: info
});
};
Shell.UHFStartInventoryForAll = function (param, endFn, info, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartInventoryForAll", data: (0, tslib_1.__assign)({ isSound: true }, param),
fail: fail,
success: endFn,
info: info
});
};
Shell.UHFStartInventoryForBranch = function (param, endFn, info, fail) {
return (0, shell_1.shellHandler)({
name: "UHFStartInventoryForBranch", data: (0, tslib_1.__assign)({ isSound: true }, param),
fail: fail,
success: endFn,
info: info
});
};
/**
* 暂停盘存
*/
Shell.UHFPauseInventory = function (successFn) {
return (0, shell_1.shellHandler)({
name: "UHFPauseInventory",
success: successFn
});
};
/**
* 获取当前盘存结果
*/
Shell.UHFGetInventoryResult = function (res) {
return (0, shell_1.shellHandler)({
name: "UHFGetInventoryResult",
success: res,
fail: res
});
};
/**
* 继续盘存
*/
Shell.UHFResumeInventory = function (shelf) {
return (0, shell_1.shellHandler)({
name: "UHFResumeInventory",
data: { shelf: shelf },
});
};
/**
* 清空对应货架盘存数据
*/
Shell.UHFClearInventoryData = function (shelf) {
return (0, shell_1.shellHandler)({
name: "UHFClearInventoryData",
data: { shelf: shelf },
});
};
/**
* 停止盘存
*/
Shell.UHFStopInventory = function () {
return (0, shell_1.shellHandler)({
name: "UHFStopInventory",
});
};
/**
* android预览pdf
*/
Shell.previewPdf = function (data) {
return (0, shell_1.shellHandler)({ name: 'previewPdf', data: data });
};
return Shell;
}());
exports.Shell = Shell;
//# sourceMappingURL=./utils/shell/index.js.map
;