Compare commits

..

11 Commits

Author SHA1 Message Date
tk
6ec284c9d3 【类 型】:feat
【主	题】:销售统计页面 (未写完成)
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-19 19:53:57 +08:00
tk
d758c7d554 【类 型】:新功能
【主	题】:添加一些新的 css样式
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-19 19:46:31 +08:00
tk
3f21670345 【类 型】:feat
【主	题】:添加新路由 销售统计 页面
【描	述】:
	[原因]:添加销售统计页面
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 19:08:34 +08:00
tk
8e225dceb5 【类 型】:fix
【主	题】:改用网络声音接口  本地音频文件删除
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 19:06:58 +08:00
tk
cea1b66635 【类 型】:feat
【主	题】:安装easycom 插件
【描	述】:
	[原因]:组件调用语法糖 方便组件调用
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 17:44:19 +08:00
tk
97f6fa7125 【类 型】:feat
【主	题】:改用自定义的 配置文件
【描	述】:
	[原因]:Easycom 需要在配置文件里面 做初始化的设置
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 17:43:12 +08:00
tk
526a5780ae 【类 型】:fix
【主	题】:时间跨度组件  修改
【描	述】:
	[原因]:不显示时分秒 太长了 显示不下
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 16:26:49 +08:00
tk
136ee3ca0f 【类 型】:fix
【主	题】:提交订单是 检测订单重量
【描	述】:
	[原因]:检测订单重量超过飞机承载重量上限  给提示 增加安全保障
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-18 16:24:50 +08:00
tk
e44d78cded 【类 型】:refactor
【主	题】:取消用户选项卡的‘首页’导航;订单声音 放弃并改用 新的声音播放模式
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-17 14:44:52 +08:00
tk
c3e407327b 【类 型】:fix
【主	题】:飞机控制面板弹出按钮播放bug
【描	述】:
	[原因]:收回也播放声音
	[过程]:判断收回时 不播放声音
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-17 14:42:40 +08:00
tk
c5f2a27789 【类 型】:fix
【主	题】:取消面包屑的链接 显示‘飞机主控’ 和 ‘小程序后台’
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2024-06-17 13:53:12 +08:00
14 changed files with 404 additions and 119 deletions

91
package-lock.json generated
View File

@ -4330,16 +4330,10 @@
"dev": true "dev": true
}, },
"node_modules/chokidar": { "node_modules/chokidar": {
"version": "3.5.3", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true, "dev": true,
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"dependencies": { "dependencies": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
"braces": "~3.0.2", "braces": "~3.0.2",
@ -4352,6 +4346,9 @@
"engines": { "engines": {
"node": ">= 8.10.0" "node": ">= 8.10.0"
}, },
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": { "optionalDependencies": {
"fsevents": "~2.3.2" "fsevents": "~2.3.2"
} }
@ -8087,10 +8084,13 @@
} }
}, },
"node_modules/function-bind": { "node_modules/function-bind": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"dev": true "dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
}, },
"node_modules/function.prototype.name": { "node_modules/function.prototype.name": {
"version": "1.1.5", "version": "1.1.5",
@ -8578,6 +8578,18 @@
"minimalistic-assert": "^1.0.1" "minimalistic-assert": "^1.0.1"
} }
}, },
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/he": { "node_modules/he": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -9414,12 +9426,12 @@
} }
}, },
"node_modules/is-core-module": { "node_modules/is-core-module": {
"version": "2.12.1", "version": "2.13.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
"integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"has": "^1.0.3" "hasown": "^2.0.0"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
@ -13153,12 +13165,12 @@
"dev": true "dev": true
}, },
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.22.3", "version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
"integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"is-core-module": "^2.12.0", "is-core-module": "^2.13.0",
"path-parse": "^1.0.7", "path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0" "supports-preserve-symlinks-flag": "^1.0.0"
}, },
@ -20556,9 +20568,9 @@
"dev": true "dev": true
}, },
"chokidar": { "chokidar": {
"version": "3.5.3", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true, "dev": true,
"requires": { "requires": {
"anymatch": "~3.1.2", "anymatch": "~3.1.2",
@ -23532,9 +23544,9 @@
"optional": true "optional": true
}, },
"function-bind": { "function-bind": {
"version": "1.1.1", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"dev": true "dev": true
}, },
"function.prototype.name": { "function.prototype.name": {
@ -23903,6 +23915,15 @@
"minimalistic-assert": "^1.0.1" "minimalistic-assert": "^1.0.1"
} }
}, },
"hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
"dev": true,
"requires": {
"function-bind": "^1.1.2"
}
},
"he": { "he": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
@ -24547,12 +24568,12 @@
} }
}, },
"is-core-module": { "is-core-module": {
"version": "2.12.1", "version": "2.13.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
"integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
"dev": true, "dev": true,
"requires": { "requires": {
"has": "^1.0.3" "hasown": "^2.0.0"
} }
}, },
"is-data-descriptor": { "is-data-descriptor": {
@ -27600,12 +27621,12 @@
"dev": true "dev": true
}, },
"resolve": { "resolve": {
"version": "1.22.3", "version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.3.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
"integrity": "sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"dev": true, "dev": true,
"requires": { "requires": {
"is-core-module": "^2.12.0", "is-core-module": "^2.13.0",
"path-parse": "^1.0.7", "path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0" "supports-preserve-symlinks-flag": "^1.0.0"
} }

Binary file not shown.

Binary file not shown.

View File

@ -1,10 +1,12 @@
<template> <template>
<el-breadcrumb separator-class="el-icon-caret-right" class="app-breadcrumb"> <el-breadcrumb separator-class="el-icon-caret-right" class="app-breadcrumb">
<el-breadcrumb-item> <el-breadcrumb-item>
<router-link to="/">飞机主控</router-link> <!-- <router-link to="/">飞机主控</router-link> -->
{{ $route.meta.tapName === "plane" ? "飞机主控" : "小程序后台" }}
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item v-for="(item, index) in breadcrumb" :key="index"> <el-breadcrumb-item v-for="(item, index) in breadcrumb" :key="index">
<router-link :to="item.path">{{ item.title }}</router-link> <!-- <router-link :to="item.path">{{ item.title }}</router-link> -->
{{ item.title }}
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</template> </template>

View File

@ -44,7 +44,7 @@
<div class="tab-container"> <div class="tab-container">
<el-button size="medium" type="primary" :class="activeIndex === index ? 'butIconGroupBG' : ''" <el-button size="medium" type="primary" :class="activeIndex === index ? 'butIconGroupBG' : ''"
class="butIconGroup" v-for="(item, index) in controlItems" :key="index" class="butIconGroup" v-for="(item, index) in controlItems" :key="index"
@click="toggleContent(index); speakText(item.voice)"> @click="toggleContent(index, item.voice)">
<i :class="item.icon" class="iconfont f-s-35"></i> <i :class="item.icon" class="iconfont f-s-35"></i>
<div class="m-t-5 fb">{{ item.title }}</div> <div class="m-t-5 fb">{{ item.title }}</div>
</el-button> </el-button>
@ -61,7 +61,8 @@
<el-form label-position="left" ref="questForm" :model="questForm" label-width="80px"> <el-form label-position="left" ref="questForm" :model="questForm" label-width="80px">
<el-form-item label="订单任务"> <el-form-item label="订单任务">
<el-select v-model="questForm.id" :filterable="isMobile" placeholder="请选择,也可输入搜索" :disabled="airLock"> <el-select v-model="questForm.id" :filterable="isMobile" placeholder="请选择,也可输入搜索" :disabled="airLock">
<el-option v-for="item in questList" :key="item.id" :label="item.id" :value="item.id"> <el-option v-for="item in questList" :key="item.id" :label="item.id" :value="item.id"
:class="Number(item.total_weight) >= Number(plane.weight_max) ? 'danger-color' : ''">
<span class="l">{{ item.id }}</span> <span class="l">{{ item.id }}</span>
<span class="l m-l-5">{{ item.receiver }}</span> <span class="l m-l-5">{{ item.receiver }}</span>
<span class="l m-l-5">{{ item.receive_site_name }}</span> <span class="l m-l-5">{{ item.receive_site_name }}</span>
@ -75,7 +76,7 @@
<font class="m-l-5">航线锁定</font> <font class="m-l-5">航线锁定</font>
</el-button> </el-button>
<el-button size="mini" class="f-s-14" v-if="planeState & 1 && !airLock" type="primary" <el-button size="mini" class="f-s-14" v-if="planeState & 1 && !airLock" type="primary"
icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="runQuest; speakText('提交任务,锁定航线。')"> icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="checkQuest">
<font class="m-l-5">提交任务</font> <font class="m-l-5">提交任务</font>
</el-button> </el-button>
<el-button size="mini" class="f-s-14" v-if="planeState & 2" key="wirteBut" type="info" <el-button size="mini" class="f-s-14" v-if="planeState & 2" key="wirteBut" type="info"
@ -97,11 +98,11 @@
<el-form-item label="任务操作"> <el-form-item label="任务操作">
<el-button-group> <el-button-group>
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt" <el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt"
@click="reQuest; speakText('任务取消,退回未备货状态')"> @click="reQuest">
<font class="m-l-5">取消任务</font> <font class="m-l-5">取消任务</font>
</el-button> </el-button>
<el-button size="mini" class="f-s-14" type="success" icon="iconfont icon-qiandai" key="bingBut" <el-button size="mini" class="f-s-14" type="success" icon="iconfont icon-qiandai" key="bingBut"
@click="overQuest; speakText('任务完成')"> @click="overQuest">
<font class="m-l-5">已送达</font> <font class="m-l-5">已送达</font>
</el-button> </el-button>
</el-button-group> </el-button-group>
@ -312,6 +313,15 @@ export default {
overQuestList () { overQuestList () {
return this.$store.state.orderList.filter((item) => item.status === 'shipped') return this.$store.state.orderList.filter((item) => item.status === 'shipped')
}, },
/**
* @description: 当前选中的订单
*/
currentOrder () {
if (this.questForm && this.questForm.id !== undefined) {
return this.questList.find((item) => item.id === this.questForm.id) || null
}
return null
},
/** /**
* @description: 航线列表 * @description: 航线列表
*/ */
@ -366,17 +376,21 @@ export default {
/** /**
* @description: 菜单切换 PS:UI * @description: 菜单切换 PS:UI
* @param {*} index 序号 * @param {*} index 序号
* @param {*} voice 播放声音的文本
*/ */
toggleContent (index) { toggleContent (index, voice) {
this.activeIndex = this.activeIndex === index ? null : index this.activeIndex = this.activeIndex === index ? null : index
if (this.tabIsOpen) { if (this.tabIsOpen) {
if (index !== this.activeIndex) { if (index !== this.activeIndex) {
this.tabIsOpen = false this.tabIsOpen = false
this.$emit('mapXOffset', -200) this.$emit('mapXOffset', -200)
} else {
this.speakText(voice)
} }
} else { } else {
this.tabIsOpen = true this.tabIsOpen = true
this.$emit('mapXOffset', 200) this.$emit('mapXOffset', 200)
this.speakText(voice)
} }
}, },
/** /**
@ -391,6 +405,35 @@ export default {
this.$message.warning('与飞机通信未接通,请稍后') this.$message.warning('与飞机通信未接通,请稍后')
} }
}, },
/**
* @description: 执行任务前 先检测订单是否 合法 例如订单重量会不会超出飞机载重上限
*/
checkQuest () {
//
if (Number(this.currentOrder.total_weight) >= Number(this.plane.weight_max)) {
this.$confirm('此订单总重超出本飞机的载重上限', '检测订单', {
confirmButtonText: '仍然提交',
cancelButtonText: '放弃提交',
type: 'warning'
})
.then(() => {
this.$message({
type: 'warning',
message: '存在超重风险,仍然提交订单'
})
this.runQuest()//
})
.catch(action => {
this.$message({
type: 'info',
message: '取消提交订单'
})
})
} else {
//
this.runQuest()
}
},
/** /**
* @description: 执行订单任务 * @description: 执行订单任务
*/ */
@ -399,41 +442,73 @@ export default {
this.$message.error('未选择订单任务!') this.$message.error('未选择订单任务!')
return return
} }
let i if (this.currentOrder) {
this.questList.map((item) => { /* 插入日志 */
if (this.questForm.id === item.id) { this.$store.dispatch('fetchLog', { content: `${this.plane.name} 开始执行 订单ID${this.currentOrder.id}、叫餐号:${this.currentOrder.food_sn}号。` })
i = true /* 执行写在这里 */
/* 插入日志 */ if (this.currentOrder.bind_route === null) { //
this.$store.dispatch('fetchLog', { content: `${this.plane.name} 开始执行 订单ID${item.id}、叫餐号:${item.food_sn}号。` }) this.$message.error('此站点,未绑定任务航点')
/* 执行写在这里 */ return
if (item.bind_route === null) { //
this.$message.error('此站点,未绑定任务航点')
return
}
let routeData
try {
const bindRoute = item.bind_route.split(',')
routeData = this.routeList.find(element => element.id === bindRoute[0]).route_data
routeData = JSON.parse(routeData)//
/* 处理声音航点 航点里面的表达式 如$food_sn$ 正则替换成订单对应的字段 */
item.telTail = item.tel.substr(-4)// telTail tel
routeData.tasks.forEach((x, index) => {
if (x.sound) {
const str = this.voiceRouteParse(item, x.sound)
routeData.tasks[index].sound = str//
}
})
routeData = JSON.stringify(routeData)//
} catch (error) {
this.$message.error('操作失败,请重新尝试')
}
this.publishFun(`{"questAss":${routeData}}`)//
this.questAss(item.id, 'status', 'shipped')//
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: this.plane.id })// 线
} }
}) let routeData
if (i) { return } try {
this.$message.error('此订单已被申请退款或者订单已经被取消!') const bindRoute = this.currentOrder.bind_route.split(',')
routeData = this.routeList.find(element => element.id === bindRoute[0]).route_data
routeData = JSON.parse(routeData)//
/* 处理声音航点 航点里面的表达式 如$food_sn$ 正则替换成订单对应的字段 */
this.currentOrder.telTail = this.currentOrder.tel.substr(-4)// telTail tel
routeData.tasks.forEach((x, index) => {
if (x.sound) {
const str = this.voiceRouteParse(this.currentOrder, x.sound)
routeData.tasks[index].sound = str//
}
})
routeData = JSON.stringify(routeData)//
} catch (error) {
this.$message.error('操作失败,请重新尝试')
}
this.publishFun(`{"questAss":${routeData}}`)//
this.questAss(this.currentOrder.id, 'status', 'shipped')//
this.$store.dispatch('fetchLockSite', { id: this.currentOrder.receive_site_id, runing: this.plane.id })// 线
this.speakText('提交任务,锁定航线。')
} else {
this.$message.error('此订单已被申请退款或者订单已经被取消!')
}
// let i
// this.questList.map((item) => {
// if (this.questForm.id === item.id) {
// i = true
// /* */
// this.$store.dispatch('fetchLog', { content: `${this.plane.name} ID${item.id}${item.food_sn}` })
// /* */
// if (item.bind_route === null) { //
// this.$message.error('')
// return
// }
// let routeData
// try {
// const bindRoute = item.bind_route.split(',')
// routeData = this.routeList.find(element => element.id === bindRoute[0]).route_data
// routeData = JSON.parse(routeData)//
// /* $food_sn$ */
// item.telTail = item.tel.substr(-4)// telTail tel
// routeData.tasks.forEach((x, index) => {
// if (x.sound) {
// const str = this.voiceRouteParse(item, x.sound)
// routeData.tasks[index].sound = str//
// }
// })
// routeData = JSON.stringify(routeData)//
// } catch (error) {
// this.$message.error(',')
// }
// this.publishFun(`{"questAss":${routeData}}`)//
// this.questAss(item.id, 'status', 'shipped')//
// this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: this.plane.id })// 线
// this.speakText('线')
// }
// })
// if (i) { return }
}, },
/** /**
* @description: 匹配声音航点字符串 比如$food_sn$ food_sn匹配成 送餐订单里面的对应字段 * @description: 匹配声音航点字符串 比如$food_sn$ food_sn匹配成 送餐订单里面的对应字段
@ -489,6 +564,7 @@ export default {
this.questAss(item.id, 'status', 'pending')// this.questAss(item.id, 'status', 'pending')//
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 线 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 线
this.questForm.id = ''// this.questForm.id = ''//
speakText('任务取消,退回未备货状态')
} }
}) })
}).catch(() => { }).catch(() => {
@ -516,6 +592,7 @@ export default {
this.publishFun('{"resetState":1}')// this.publishFun('{"resetState":1}')//
this.questAss(item.id, 'status', 'completed')// this.questAss(item.id, 'status', 'completed')//
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 线 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 线
this.speakText('任务完成')
} }
}) })
}).catch(() => { }).catch(() => {
@ -570,6 +647,11 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/styles/theme.scss"; @import "@/styles/theme.scss";
.danger-color {
color: $danger-color;
font-weight: bold;
}
.tab-container { .tab-container {
height: 365px; height: 365px;
width: 80px; width: 80px;

View File

@ -1,6 +1,6 @@
<template> <template>
<el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator="" <el-date-picker v-model="value" type="daterange" align="right" unlink-panels range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" format="yyyy-MM-dd HH:mm:ss"> start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" format="yyyy-MM-dd">
</el-date-picker> </el-date-picker>
</template> </template>

View File

@ -402,8 +402,8 @@ const routes = [
component: Layout, component: Layout,
redirect: '/order/index', redirect: '/order/index',
meta: { meta: {
title: '订单管理', title: '订单与统计',
icon: 'iconfont icon-a-SalesOrderManagement', icon: 'iconfont icon-dingdantongji',
roles: ['admin', 'editor'], roles: ['admin', 'editor'],
tapName: 'admin' tapName: 'admin'
}, },
@ -428,6 +428,16 @@ const routes = [
tapName: 'admin', tapName: 'admin',
hidden: true hidden: true
} }
},
{
path: '/order/stat',
component: () => import('@/views/layout/components/main/order/stat'),
meta: {
title: '销售统计',
icon: 'iconfont icon-data-view',
roles: ['admin', 'editor'],
tapName: 'admin'
}
} }
] ]
}, },

View File

@ -142,10 +142,26 @@ label {
vertical-align: middle; vertical-align: middle;
} }
.bg-b {
background-color: $brand-color;
}
.bg-white { .bg-white {
background-color: $white-color; background-color: $white-color;
} }
.fc-b {
color: $brand-color;
}
.fc-m {
color: $maintext-color;
}
.fc-i {
color: $holdtext-color;
}
.border-b-n { .border-b-n {
border-bottom: none !important; border-bottom: none !important;
} }
@ -185,6 +201,111 @@ label {
} }
} }
.flex {
display: flex;
}
//垂直排列
.column {
flex-direction: column;
}
//主轴左对齐
.ml {
justify-content: flex-start;
}
//主轴右对齐
.mr {
justify-content: flex-end;
}
//主轴两端对齐
.msb {
justify-content: space-between;
}
//主轴 居中对齐
.mc {
justify-content: center;
}
//主轴 等距
.mse {
justify-content: space-evenly;
}
//主轴 元素两侧平分
.msa {
justify-content: space-around;
}
//交叉轴 填满
.man {
align-items: normal;
}
//交叉轴 上对齐
.mu {
align-items: flex-start;
}
//交叉轴 下对齐
.md {
align-items: flex-end;
}
//交叉轴 居中对齐
.mac {
align-items: center;
}
//交叉轴 第一行最高的基线对齐
.mub {
align-items: baseline;
}
.flex1 {
flex: 1;
}
.flex2 {
flex: 2;
}
.flex3 {
flex: 3;
}
.flex4 {
flex: 4;
}
.rad-c {
border-radius: 50%;
}
.rad32 {
border-radius: 32px;
}
.rad16 {
border-radius: 16px;
}
.rad8 {
border-radius: 8px;
}
.rad4 {
border-radius: 4px;
}
.rad2 {
border-radius: 2px;
}
//m-l-0 p-l-0 马根 帕丁 //m-l-0 p-l-0 马根 帕丁
$position: ( $position: (
"t":"top", "t":"top",

View File

@ -1 +1 @@
@import 'https://at.alicdn.com/t/c/font_3703467_it8bp4b57g9.css'; //iconfont阿里巴巴 @import 'https://at.alicdn.com/t/c/font_3703467_om4sfs0bw5s.css'; //iconfont阿里巴巴

View File

@ -48,6 +48,7 @@ export function questAss (id, state, val) {
store.dispatch('fetchOrderList')// 更新订单列表 store.dispatch('fetchOrderList')// 更新订单列表
} else { } else {
Message.error(res.data.msg) Message.error(res.data.msg)
store.dispatch('fetchOrderList')// 更新订单列表
} }
}) })
} }

View File

@ -1,8 +1,5 @@
<template> <template>
<div> <div>
<!-- 订单音效 -->
<audio controls="controls" hidden src="@/assets/sound/newMsg.mp3" ref="newMsg"></audio>
<audio controls="controls" hidden src="@/assets/sound/rebackMsg.mp3" ref="rebackMsg"></audio>
<!-- menu缩进按钮 --> <!-- menu缩进按钮 -->
<div class="w-50px h-50px fc l" id="menuTabB" @click="handleCollapse"> <div class="w-50px h-50px fc l" id="menuTabB" @click="handleCollapse">
<i class="iconfont f-s-26" :class="isCollapse ? 'icon-a-yousuojin3x' : 'icon-a-zuosuojin3x'"></i> <i class="iconfont f-s-26" :class="isCollapse ? 'icon-a-yousuojin3x' : 'icon-a-zuosuojin3x'"></i>
@ -19,11 +16,6 @@
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown" class="user-dropdown"> <el-dropdown-menu slot="dropdown" class="user-dropdown">
<el-dropdown-item divided>
<RouterLink to="/">
主控
</RouterLink>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout"> <el-dropdown-item divided @click.native="logout">
<span style="display:block;">退出登录</span> <span style="display:block;">退出登录</span>
</el-dropdown-item> </el-dropdown-item>
@ -55,7 +47,7 @@
<el-tabs type="card"> <el-tabs type="card">
<el-tab-pane> <el-tab-pane>
<template slot="label"> <template slot="label">
<span>已付款处理中</span> <span>已付款</span>
<el-badge :hidden="pendingCount == 0 ? true : false" :value="pendingCount"> <el-badge :hidden="pendingCount == 0 ? true : false" :value="pendingCount">
</el-badge> </el-badge>
</template> </template>
@ -63,7 +55,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane> <el-tab-pane>
<template slot="label"> <template slot="label">
<span>已接单备货中</span> <span>备货中</span>
<el-badge :hidden="processingCount == 0 ? true : false" :value="processingCount"> <el-badge :hidden="processingCount == 0 ? true : false" :value="processingCount">
</el-badge> </el-badge>
</template> </template>
@ -71,7 +63,7 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane> <el-tab-pane>
<template slot="label"> <template slot="label">
<span>申请退款订单</span> <span>申请退款</span>
<el-badge :hidden="requestedCount == 0 ? true : false" :value="requestedCount"> <el-badge :hidden="requestedCount == 0 ? true : false" :value="requestedCount">
</el-badge> </el-badge>
</template> </template>
@ -93,6 +85,7 @@ import mqtt from '@/utils/mqtt'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import QuestTabs from '@/components/QuestTabs' import QuestTabs from '@/components/QuestTabs'
import SelectionShopId from '@/components/SelectionShopId' import SelectionShopId from '@/components/SelectionShopId'
import { speakText } from '@/utils/index'
export default { export default {
name: 'Headbar', name: 'Headbar',
@ -154,6 +147,7 @@ export default {
} }
}, },
methods: { methods: {
speakText,
/** /**
* @description: 切换侧边栏 显隐 * @description: 切换侧边栏 显隐
*/ */
@ -172,10 +166,10 @@ export default {
const processing = list.filter(item => item.status === 'processing' && item.back === 'normal')// const processing = list.filter(item => item.status === 'processing' && item.back === 'normal')//
const requested = list.filter(item => item.back === 'requested')// 退 const requested = list.filter(item => item.back === 'requested')// 退
if (this.pendingCount < pending.length && this.pendingCount != null) { // if (this.pendingCount < pending.length && this.pendingCount != null) { //
this.playMusic('newMsg')// this.speakText('有新的付款订单')
} }
if (this.requestedCount < requested.length && this.requestedCount != null) { // if (this.requestedCount < requested.length && this.requestedCount != null) { //
this.playMusic('rebackMsg')// 退 this.speakText('有申请退款订单')
} }
this.pendingCount = pending.length// this.pendingCount = pending.length//
this.processingCount = processing.length// this.processingCount = processing.length//
@ -184,31 +178,12 @@ export default {
this.animationTrumpet = !this.animationTrumpet// this.animationTrumpet = !this.animationTrumpet//
}, 500) }, 500)
}, },
//
playMusic (domId) {
const audioElement = this.$refs[domId]
if (!audioElement) {
console.error(`音频元素 ${domId} 不存在`)
return
}
audioElement.currentTime = 0 //
audioElement.play()
.then(() => {
console.log('音频播放成功')
})
.catch(error => {
console.error('音频播放失败', error)
})
setTimeout(() => {
audioElement.pause() //
}, 11000)
},
/** /**
* @description: 刷新当前页面 * @description: 刷新当前页面
*/ */
refreshPage () { refreshPage () {
mqtt.mqttDestroy()// mqtt mqtt.mqttDestroy()// mqtt
this.$router.go(0)// window.location.reload() //
}, },
/** /**
* @description: 登出 * @description: 登出

View File

@ -5,18 +5,18 @@
<el-col :span="4"> <el-col :span="4">
<SelectionShopId class="w-100" v-model="shop_id" :allSel="true" /> <SelectionShopId class="w-100" v-model="shop_id" :allSel="true" />
</el-col> </el-col>
<el-col :span="10"> <el-col :span="8">
<DatePickerOrder class="w-100" /> <DatePickerOrder class="w-100" />
</el-col> </el-col>
<el-col :span="10"> <el-col :span="12">
<SearchOrder class="w-100" /> <SearchOrder class="w-100" />
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="13"> <el-col :span="12">
<SelectionOrderStatus /> <SelectionOrderStatus />
</el-col> </el-col>
<el-col :span="11"> <el-col :span="12">
<SelectionOrderBack /> <SelectionOrderBack />
</el-col> </el-col>
</el-row> </el-row>

View File

@ -0,0 +1,74 @@
<template>
<div class="app-container">
<!-- 用户select选项 -->
<el-row :gutter="15" class="m-t-0">
<el-col :span="4">
<SelectionShopId class="w-100" v-model="shop_id" :allSel="true" />
</el-col>
<el-col :span="8">
<DatePickerOrder class="w-100" />
</el-col>
</el-row>
<!-- 统计标签 -->
<el-row :gutter="10" class="m-t-20">
<el-col :span="8">
<div class="statBox rad4 flex p-10">
<div class="flex3 flex mc column">
<div class="flex">
<div class="p-4 bg-white rad2 fc-b fb">成交额</div>
<div class="p-4 m-l-5">23441.44</div>
</div>
<div class="flex m-t-5">
<div class="p-4 bg-white rad2 fc-b fb">退款额</div>
<div class="p-4 m-l-5">23441.44</div>
</div>
<div class="flex m-t-5">
<div class="p-4 bg-white rad2 fc-b fb">订单总数</div>
<div class="p-4 m-l-5">18</div>
</div>
</div>
<div class="flex1 flex mc mac">
<div class="rad-c w-50px h-50px bg-white fb fc f-s-32 fc-b l-h-50"></div>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import SelectionShopId from '@/components/SelectionShopId.vue'
import DatePickerOrder from '@/components/DatePickerOrder.vue'
export default {
name: 'Stat',
data () {
return {
shop_id: '' // id
}
},
components: {
SelectionShopId,
DatePickerOrder
},
computed: {
},
methods: {
},
watch: {
},
created () {
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/theme.scss";
.statBox {
background-color: $brand-color;
height: 30vh;
color: $white-color;
}
</style>

View File

@ -126,7 +126,6 @@ export default {
watch: { watch: {
}, },
created () { created () {
console.log('hi')
}, },
filters: { filters: {
parseTime, parseTime,