Commit 2af25aa6 authored by 廖健文's avatar 廖健文

初始化

parents
/node_modules/
dist
crx
\ No newline at end of file
const fs = require('fs');
const path = require('path');
const ChromeExtension = require('crx');
const manifest = require('./manifest.json');
const packName = '辅助发货易打单插件';
const crxPath = path.resolve(__dirname, './crx/');
const buildPath = path.resolve(__dirname, './dist');
const buildPem = path.resolve(__dirname, './dist.pem');
var deleteFolderRecursive = function(path) {
if (fs.existsSync(path)) {
fs.readdirSync(path).forEach(function(file, index) {
var curPath = path + '/' + file;
if (fs.lstatSync(curPath).isDirectory()) {
// recurse
deleteFolderRecursive(curPath);
} else {
// delete file
fs.unlinkSync(curPath);
}
});
fs.rmdirSync(path);
}
};
deleteFolderRecursive(crxPath);
const privateKey = fs.readFileSync(buildPem);
function buildLikeChromeCrx() {
const crx = new ChromeExtension({
// 私钥
privateKey,
// 版本指定2,否则国产浏览器无法安装
version: 2,
});
return crx
.load(buildPath)
.then((crx) => crx.pack())
.then((crxBuffer) => {
// crx 给国产浏览器使用
fs.writeFile(
path.resolve(crxPath, `./${packName}${manifest.version}.crx`),
crxBuffer,
(err) => {
err && console.log(err);
}
);
console.log(`打包国产浏览器crx完成`);
});
}
function buildChromeCrx() {
const crx = new ChromeExtension({
// 私钥
privateKey,
version: 3,
});
return crx
.load(buildPath)
.then((crx) => crx.pack())
.then((crxBuffer) => {
// crx 单独给chrome浏览器使用
fs.writeFile(
path.resolve(crxPath, `./${packName}${manifest.version}.zip`),
crxBuffer,
(err) => {
err && console.log(err);
}
);
console.log(`打包谷歌zip完成`);
});
}
// function buildVersionFile() {
// fs.writeFile(
// path.resolve(crxPath, `./version.json`),
// JSON.stringify({ version: manifest.version }),
// (err) => {
// err && console.log(err);
// }
// );
// }
async function task() {
console.log(`当前打包版本为: ${manifest.version}`);
try {
fs.mkdirSync('./crx/');
// buildVersionFile();
await buildLikeChromeCrx();
await buildChromeCrx();
} catch (error) {
console.log('打包失败');
}
}
task();
File added
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDLu2OKZ004sSVd
Lxs0noeNvs+gxL43t2kNmgeDlN9c9YaoRoWxRil3vB81VARzlDxTLDWWK2yWhS8J
7rAzzRbOnlEdDZb8sayzO6zPyhhiGSfyTn/a5arG2fj1Um7yAy3iIYQ1gYn8plLa
dm/bkir8w9n3tIdashX0rcKefXaU2VOIvrlMmPgpkY6F/ithqIr3vAKb90Otbwrr
KeUOF025Yzl9WvyFIYIZr04vCmm9YfrJmLUlxW3aWh6mWCWhUcaoYkQye/iXbJI6
HrCXvZTbyavGnQC3aVo81KfTKixIwz0UwRMVnGX6EtjTlyNXrQS5H9VOkUPGcep4
ZDde29RdAgMBAAECggEABdJ/NoAbw0RAFLDpMTXbmrJ/4AYSB+kYWeYTk2WAhE6p
pcBNh01W7N/7MKy2li//u60ZLfIOlSGiwGuqF5zjleLiigxD9Z5FQ3ev3rNVmDjE
UmbUaBF6sdqeWbJx+b1wr6mfYTZobAg7zhhRkN/qlb/UyEEIQjsHKMTYzus30D/1
qJIKlWWQM8IW5iKbqoDGRGQdZQyb3PXTELDIxjWSz1z4qLkIlWbydNKzSxEbkg8I
JhoIeYmeDtfGbg2SegOoEJajWSRitrKKqvyx2FayHGITFYkX8ZzyUFP40BTLW3cl
2ilOE1VvnKf4nT1Fvvkfai+MHOFVMndy5rF88N1guQKBgQDvrlffg4yJCrXgUdi2
/Ulxsc6QoKElCgrrLLDd+jqX82J8vI4iZkZR7gQls/ze3ontugctjlh1JidWWa9n
zbwcTc8BQVOT6103zdj52tTpVlktupGVXwfdd5popRuIoETVFPdr4KTKbbExgFdA
zJl7J/59culI6XkF6Aj147kveQKBgQDZmnOKmJuWP5DV0rYpwha1srjoXOgIHw3f
Rani0p2jeklQajq3aUnaq9XJu5IKPQR31tp5lT+3M/QZBi+uD8yOeIEdIg8jOQQP
mGIq0x1YpSLtkS+WNp+HmXAU3lrlL54nTgenMB0ChEWBTEV09N2nNU5FlhdA/6ua
oca0yKBfBQKBgQDIBNLIcNvDMfD+Ns+IRnAYNa6Q+7v/URYzlKQ1WzGyxSYXurNS
+c8NaHiFjmMlCspIXcrHtdcUTLbfVREQq5ykcjqibYX2F6E/hMXiHUE5SRo7E0uT
QC8sHzf4xHDp3/YRbOHeYSak2E3bZaNrLFOZd5Ll1hPhCRY6W52+tkBA4QKBgCVu
DNvVPkYM7xPop87tBM0CTg4iFQN4nAFA0WUjx1vcaAn+C9WKtdp4XlDSA9/g+QjI
G1J4mrofpKg9SSxOqWgEUGk7d5EeeJVaJ+Cn6c9asHRe2emjwbMocIAWc1oi47ht
EqHug77wE6iW/weMKyhc4fbUR3G1yMXTeAOW0wclAoGBAKqRbdsSSuyCvRar8n2h
QAHGcIoJpg8P9JtbwURjrg185CUxXf9PeAz8I5sJiP+E7kJraQcm7yTG2tnXgIZC
U8OvQbSRH2/Ad2JumOEEKXvi8fsmvRFizU7/XJ+ehkXSsuvzqak5qCa6YdHaniIz
d0iHC8ZixBZFBx+xLF8ouhWI
-----END PRIVATE KEY-----
{
"name": "辅助发货易打单1.1.0",
"version": "1.0.0",
"description": "辅助手机壳厂家打印发货易的快递单",
"manifest_version": 2,
"background": {
"scripts": ["background.js"]
},
"browser_action": {
"default_popup": "popup.html",
"default_icon": "icon.png",
"default_title": "辅助发货易打单"
},
"icons": {
"128": "icon.png"
},
"web_accessible_resources": ["icon.png"],
"content_scripts": [
{
"matches": [
"*://*.fahuoyi.com/*",
"*://admin.rtxmdz.com/*",
"http://localhost:8082/*",
"http://localhost:8083/*",
"*://*.rtxmdz.com/*"
],
"js": ["content.js"],
"run_at": "document_idle"
}
],
"permissions": [
"background",
"storage",
"contextMenus",
"tabs",
"cookies",
"webRequest",
"management",
"activeTab",
"history",
"notifications",
"webRequestBlocking",
"http://*/*",
"https://*/*",
"downloads"
]
}
This diff is collapsed.
{
"name": "linkfahuoyi-exension",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config ./webpack/webpack.dev.js --watch",
"build": "cross-env NODE_ENV=production webpack --config ./webpack/webpack.prod.js"
},
"devDependencies": {
"@types/chrome": "^0.0.126",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"antd": "^4.9.3",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^7.0.0",
"cross-env": "^7.0.3",
"crx": "^5.0.1",
"css-loader": "^5.0.1",
"html-webpack-plugin": "^4.5.0",
"node-sass": "^5.0.0",
"sass-loader": "^10.1.0",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.12",
"webpack": "^5.10.1",
"webpack-cli": "^4.2.0",
"webpack-merge": "^5.7.0"
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1",
"typescript": "^4.1.3"
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
\ No newline at end of file
import { factoryContentUrls } from "../config";
import { StartPrint, Print } from "../types";
// platform: PlatformCode,// 平台编码,淘系及其他平台订单模板的为0,拼多多订单的为1,京东订单的为2
const PlatfromsMap = new Map([
[0, /.+:\/\/a.*\.fahuoyi.com\/scanPrinting\/index/],
[1, /.+:\/\/pdd.*\.fahuoyi.com\/scanPrinting\/index/],
[2, /.+:\/\/jd.*\.fahuoyi.com\/scanPrinting\/index/]
])
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
if (message.action === StartPrint) {
// console.log("startPrint")
// 通知fahuoyi的content开始点击
chrome.tabs.query({
url: "*://*.fahuoyi.com/scanPrinting/index"
}, function (tabs) {
let exp = new RegExp(PlatfromsMap.get(message.value.platform)!, 'i')
console.log(tabs, 'tabs66')
tabs && tabs.forEach(tab => {
if (exp.test(tab.url!)) {
chrome.tabs.sendMessage(tab.id!, { action: Print, value: message.value })
}
})
// // sendResponse("")
// if (tabs[0]) {
// chrome.tabs.sendMessage(tabs[0].id!, { action: Print, value: message.value })
// }
})
chrome.tabs.query({
url: "*://*.fahuoyi.com/features/scanPrinting"
}, function (tabs) {
console.log(tabs, 'tabs11')
tabs && tabs.forEach(tab => {
chrome.tabs.executeScript(tab.id!, {code: 'console.log(window["scan-printing-form"])'});
})
})
} else if (message.action === "sendNewWaybillNo") {
// 从bg页面转发给厂家页面的content.js
chrome.tabs.query({
url: factoryContentUrls
}, function (tabs) {
tabs && tabs.forEach(tab => {
// chrome.tabs.sendMessage(tab.id!, message)
const port = chrome.tabs.connect(tab.id!, { name: "sendNewWaybillNo" })
port.onMessage.addListener(function (msg, port) {
if (msg.action === "answer") {
// console.log(msg, port, 'bg')
port.disconnect()
}
})
port.postMessage(message)
})
})
// let port = chrome.runtime.connect({ name: "bgSendMessage" })
// port.postMessage(message)
}
})
// chrome.runtime.onConnect.addListener(function (msg) {
// console.log(msg, 'msgbg')
// })
\ No newline at end of file
export const factoryContentUrls = ["http://localhost:8082/*", "http://localhost:8083/*", "*://admin.rtxmdz.com/*", "*://*.rtxmdz.com/*"]
This diff is collapsed.
import React,{ useCallback, useContext, useEffect, useState } from "react";
import { Checkbox } from "antd";
const IsAutoEmit = function () {
const [checked, setChecked] = useState<boolean>(false)
const changeRadio = useCallback((e) => {
setChecked(e.target.checked)
}, [])
useEffect(() => {
chrome.storage.local.get({ isAutoEmit: false }, function (res) {
setChecked(res.isAutoEmit)
})
}, [])
useEffect(() => {
chrome.storage.local.set({isAutoEmit:checked})
},[checked])
return <>
<span className="waybill-panel-title">自动发货</span>
<Checkbox checked={ checked } onChange={ changeRadio } style={ { marginLeft: "13px" } }>打印成功后自动发货</Checkbox>
</>
}
export default IsAutoEmit
\ No newline at end of file
.waybill-model{
width: 809px;
max-height: 200px;
overflow-y: auto;
overflow-x: hidden;
display: grid;
justify-items: center;
align-items: center;
grid-template-columns: 1fr 1.1fr repeat(3,1fr) 44px;
grid-auto-rows: 40px;
}
\ No newline at end of file
This diff is collapsed.
import React from "react";
import ReactDOM from "react-dom";
import 'antd/dist/antd.css';
import Popup from "./popup"
ReactDOM.render(<Popup/>,document.getElementById("root"))
\ No newline at end of file
.popup-page{
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
height:400px;
width: 800px;
.popup-page-title{
padding:10px 0;
font-size: 16px;
font-weight: 650;
text-align: center;
border-bottom: 1px solid #ccc;
}
.waybill-panel{
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
.waybill-panel-title{
margin:10px 0;
font-size: 15px;
font-weight: 650;
margin-left:10px;
}
}
}
\ No newline at end of file
import React from "react";
import WayBillModel from "./components/WayBillModel";
import IsAutoEmit from "./components/IsAutoEmit";
import "./popup.scss"
const Popup = function () {
return (
<div className="popup-page">
<span className="popup-page-title">打单设置</span>
<div className="waybill-panel">
<span className="waybill-panel-title">电子面单模板</span>
<div className="waybill-model-wrap">
<WayBillModel />
</div>
</div>
<div className="waybill-panel">
<IsAutoEmit />
</div>
</div>
)
}
export default Popup;
\ No newline at end of file
// // 快递模板列表下载是否完成
// export const WaybillTemplateComplete = "waybillTemplateComplete"
// // 让popup获取waybillTemplate
// export const GetWaybillTemplate = "getWaybillTemplate"
export const StartPrint = "StartPrint"
export const Print = "Print"
\ No newline at end of file
{
"typeAcquisition": {
"include": [
"chrome"
]
},
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"include": [
"./src/**/*"
]
}
const Path = require("path")
const CopyWebpackPlugin = require("copy-webpack-plugin")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const {CleanWebpackPlugin} = require("clean-webpack-plugin")
module.exports = {
entry: {
background: Path.resolve(__dirname, "../src/background/index.ts"),
popup: Path.resolve(__dirname, "../src/popup/index.tsx"),
content: Path.resolve(__dirname, "../src/content/index.ts"),
},
output: {
filename: "[name].js",
path:Path.resolve(__dirname,"../dist")
},
resolve: {
extensions:[".tsx",".ts",".js"]
},
module: {
rules: [
{
test: /\.tsx?$/,
use:"ts-loader"
},
{
test: /\.scss$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
importLoaders:1
}
},
"sass-loader"
]
},
{
test: /\.css$/,
use: [
"style-loader",
"css-loader"
]
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: Path.resolve(__dirname, "../public/index.html"),
chunks: ["popup"],
filename:"popup.html"
}),
new CopyWebpackPlugin({
patterns: [
{
from: Path.resolve(__dirname, "../manifest.json"),
to: Path.resolve(__dirname, "../dist"),
force:true
},
{
from: Path.resolve(__dirname, "../assets"),
to: Path.resolve(__dirname, "../dist"),
force:true
}
]
}),
// new CleanWebpackPlugin({
// verbose:true
// }),
]
}
\ No newline at end of file
const common= require("./webpack.common.js")
const { merge }=require("webpack-merge")
module.exports = merge(common, {
mode: "development",
devtool: "cheap-source-map",
})
\ No newline at end of file
const common= require("./webpack.common.js")
const { merge }=require("webpack-merge")
module.exports = merge(common, {
mode: "production",
})
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
// ScanPrintingForm对象默认绑定在 window["scan-printing-form"]
// 可以在发货易js加载之前增加事件回调,可以保证获取到ScanPrintingForm对象
// window.addEventListener("onSEScanPrintingFormLoad", () => {
// const scanPrintingForm = window["scan-printing-form"];
// });
/**
* 扫描打印数据加载完成回调函数
*/
type OnLoadCallbackFunction = (data: OnLoadData) => void;
/**
* 扫描打印数据加载完成回调数据
*/
interface OnLoadData {
waybillTemplates: WaybillTemplate[];
shippingAddresses: ShippingAddress[];
printers: Printer[];
}
interface ScanPrintingForm {
/**
* 增加数据加载成功回调方法
* 使用示例
* ```
* scanPrintingForm.onLoad((data)=>{
* const { waybillTemplates, shippingAddresses, printers } = data;
*
* })
* ```
*/
onLoad(callbackFn: OnLoadCallbackFunction): void;
/**
* 配置表单
*/
config(params: ConfigParams): Result;
/**
* 发送扫描打印任务
*/
searchAndPrint(value: string): Result;
}
interface Result {
successful: boolean;
message: string;
}
/**
* 扫描打印类型
*/
enum ScanPrintSearchType {
/**
* 使用订单编号
*/
ORDER_ORIGINAL_ID = "ORDER_ORIGINAL_ID",
/**
* 使用运单号
*/
WAYBILL_NO = "WAYBILL_NO",
}
/**
* 获取运单号方式
*/
enum GetWaybillNoMethod {
/**
* 使用新单号
*/
NEW = "NEW",
/**
* 使用旧单号
*/
OLD = "OLD",
}
/**
* 发货方式
*/
enum ShippingWay {
/**
* 自己联系物流
*/
OFFLINE = "OFFLINE",
/**
* 在线下单
*/
ONLINE = "ONLINE",
}
/**
* 快递单模板打印类型
*/
interface ConfigParams {
/**
* 扫描类型
*/
searchType: ScanPrintSearchType;
/**
* 是否避免重复扫描打印
*/
checkRepeatPrint: boolean;
/**
* 快递单模板id
*/
waybillTemplateId: number;
/**
* 打印机名称
*/
printer: string;
/**
* 发货人id
*/
shippingAddressId: number;
/**
* 是否打印成功后自动发货
*/
autoShippingAfterPrint: boolean;
/**
* 获取面单方式
*/
getWaybillNoMethod: GetWaybillNoMethod;
/**
* 发货方式
*/
shippingWay?: ShippingWay;
}
/**
* 快递单模板的类型
*/
enum WaybillTemplateType {
CAINIAO = "CAINIAO",
JD = "JD",
JDL = "JDL",
NORMAL = "NORMAL",
OFFICIAL = "OFFICIAL",
PDD = "PDD",
JINRITEMAI = "JINRITEMAI",
TAOBAO_CAINIAO = "TAOBAO_CAINIAO",
}
/**
* 快递单模板
*/
interface WaybillTemplate {
allowedShopIds?: string;
allowedShopIdsArray?: string[];
bindingPrinter: string;
bindingShopIds: string;
companyId: number;
customAreaHeight?: number;
customAreaLeft: number;
customAreaPrintTemplateUrl: string;
customAreaTop: number;
customAreaWidth?: number;
defaultShippingAddressId: number;
deleted: boolean;
enableEmptyShortAddressCheck: boolean;
/**
* 只有电子面单才有此字段
* 申请地址id
*/
ewaybillShippingAddressId: number;
forceNoPageMargins: boolean;
height: number;
id: number;
index: number;
is3PartsWaybill: boolean;
isPrintBottomLogo: boolean;
isPrintTopLogo: boolean;
isSystemTemplate: boolean;
logisticsCompany: LogisticsCompany;
name: string;
offsetLeft: number;
offsetTop: number;
picture: string;
printTemplateId: string;
printTemplateUrl: string;
printType: WaybillTemplatePrintType;
serviceOptions: string;
shopId: number;
supportsChildWaybillNoMode: boolean;
systemTemplateId: number;
thumbnail: string;
type: WaybillTemplateType;
width: number;
}
/**
* 快递单模板打印类型
*/
enum WaybillTemplatePrintType {
CAINIAO = "CAINIAO",
JDL = "JDL",
PDD = "PDD",
/**蓝牙打印 */
PRINT_CMD = "PRINT_CMD",
JINRITEMAI = "JINRITEMAI",
}
/**
* 快递公司类型
*/
enum LogisticsCompany {
/**中通快递 */
ZTO = "ZTO",
/**中通快运 */
ZTO56 = "ZTO56",
/**圆通速递 */
YTO = "YTO",
/**申通快递 */
STO = "STO",
/**韵达速递 */
YUNDA = "YUNDA",
/**韵达快运 */
YUNDA56 = "YUNDA56",
/**中国邮政 */
POST = "POST",
/**邮政快递包裹 */
POSTB = "POSTB",
/**邮政标准快递 */
POSTS = "POSTS",
/**EMS */
EMS = "EMS",
/**顺丰速运 */
SF = "SF",
/**顺丰快运 */
SFKY = "SFKY",
/**极兔速递 */
JT = "JT",
/**天天快递 */
TTKDEX = "TTKDEX",
/**宅急送 */
ZJS = "ZJS",
/**百世快递 */
HTKY = "HTKY",
/**百世快运 */
BESTQJT = "BESTQJT",
/**百世物流 */
BEST = "BEST",
/**众邮快递 */
ZY = "ZY",
/**京东快运 */
JDKY = "JDKY",
/**丰网速运 */
FENGWANG = "FENGWANG",
/**安能快递 */
ANE66 = "ANE66",
/**安能物流 */
ANE56 = "ANE56",
/**京东快递 */
JD_EXPRESS = "JD_EXPRESS",
/**京东大件物流 */
JD_HPCP = "JD_HPCP",
/**德邦物流 */
DBL = "DBL",
/**德邦快递 */
DBKD = "DBKD",
/**韵达国际 */
YUNDAGJ = "YUNDAGJ",
/**韵达同城 */
YUNDA_TC = "YUNDA_TC",
/**申通快运 */
STO56 = "STO56",
/**申通国际 */
STOGJ = "STOGJ",
/**中通国际 */
ZTOGJ = "ZTOGJ",
/**国通快递 */
GTO = "GTO",
/**EMS经济快递 */
EYB = "EYB",
/**跨越速运 */
KUAYUE = "KUAYUE",
/**安鲜达 */
EXFRESH = "EXFRESH",
/**九曳供应链 */
JIUYESCM = "JIUYESCM",
/**优速快递 */
UC = "UC",
/**万象物流 */
WXWL = "WXWL",
/**全锋快递 */
QFKD = "QFKD",
/**龙邦快递 */
LB = "LB",
/**全一快递 */
UAPEX = "UAPEX",
/**快捷快递 */
FAST = "FAST",
/**天地华宇 */
HOAU = "HOAU",
/**品骏快递 */
PJBEST = "PJBEST",
/**如风达快递 */
RFD = "RFD",
/**远成快运 */
YCKY = "YCKY",
/**壹米滴答 */
YMDD = "YMDD",
/**速尔快递 */
SURE = "SURE",
/**速通物流 */
SUT56 = "SUT56",
/**中铁快运 */
CRE = "CRE",
/**亚风 */
AIR = "AIR",
/**佳吉快递 */
CNEX = "CNEX",
/**联邦快递 */
FEDEX = "FEDEX",
/**增益速递 */
QRT = "QRT",
/**加运美速递 */
JYMWL = "JYMWL",
/**信丰物流 */
XFWL = "XFWL",
/**大田物流 */
DTW = "DTW",
/**D速物流 */
DSWL = "DSWL",
/**承诺达特快 */
CNDTK = "CNDTK",
/**运通物流 */
YTWL = "YTWL",
/**长宇物流 */
CYWL = "CYWL",
/**新邦物流 */
XBWL = "XBWL",
/**联昊通 */
LWT = "LWT",
/**苏宁物流 */
SNWL = "SNWL",
/**能达速递 */
NDSD = "NDSD",
/**保宏物流 */
BHWL = "BHWL",
/**发网 */
FW = "FW",
/**长发 */
CF = "CF",
/**远长 */
YC = "YC",
/**东方汇 */
DFH = "DFH",
/**飞远配送 */
FYPS = "FYPS",
/**黑猫宅急便 */
HMZJB = "HMZJB",
/**E速宝 */
ESB = "ESB",
/**华强物流 */
HQWL = "HQWL",
/**安迅物流 */
AXWL = "AXWL",
/**中运全速 */
TOPSPEED = "TOPSPEED",
/**华企快运 */
HUAQIEX = "HUAQIEX",
/**丹鸟 */
DN = "DN",
/**都市节奏 */
DSJZ = "DSJZ",
/**宽昊物流 */
KHWL = "KHWL",
/**顺心捷达 */
SXJD = "SXJD",
/**京广速递 */
SZKKE = "SZKKE",
/**韵达点通达 */
YUNDA_DTD = "YUNDA_DTD",
/**百世云配 */
BSYP = "BSYP",
/**运通速运 */
WTO = "WTO",
/**沃埃家 */
WOWVIP = "WOWVIP",
/**菜鸟裹裹 */
CN_GUOGUO = "CN_GUOGUO",
/**淘特物流快递 */
TTWLKD = "TTWLKD",
/**速腾快递 */
STE56 = "STE56",
/**安得物流 */
ANDE = "ANDE",
/**百世国际 */
BESTGJ = "BESTGJ",
/**当当网 */
DANGDANG = "DANGDANG",
/**EWE全球快递 */
EWE = "EWE",
/**丰云配 */
FYP = "FYP",
/**高捷物流 */
GJWL = "GJWL",
/**空港宏远电商物流 */
HYWL = "HYWL",
/**卡行天下快运 */
KXTX = "KXTX",
/**日日顺 */
RRS = "RRS",
/**威盛快递 */
WSKD = "WSKD",
/**威时沛运 */
WSPY = "WSPY",
/**贝海国际速递 */
XLOBO = "XLOBO",
/**中远e环球 */
ZYEHQ = "ZYEHQ",
/**转运四方物流 */
ZYSF = "ZYSF",
/**卓志速运 */
ZZSY = "ZZSY",
/**其他 */
OTHER = "OTHER",
}
/**
* 发货人对象
*/
interface ShippingAddress {
id: number;
/**绑定的店铺列表 用,分割 */
bindingShopIds: string;
city: string;
cityCode: number;
district: string;
districtCode: number;
mobile: string;
/**发货地址名称 */
name: string;
province: string;
provinceCode: number;
/**发货人姓名 */
shipperName: string;
street: string;
telephone: string;
zipCode: string;
/**排序 */
index: number;
}
/**
* 打印机对象
*/
interface Printer {
name: string;
}
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