From b9c4b9e8c66d528b9c381ab81ad2f105573be9a7 Mon Sep 17 00:00:00 2001 From: liuwk <1834183435@qq.com> Date: Fri, 31 May 2019 15:05:50 +0800 Subject: [PATCH] 123 --- jsconfig.json | 1 + public/index.html | 7 +- src/App.vue | 4 + src/api/common.js | 10 + src/api/devices.js | 2 + src/api/devicesStatus.js | 36 + src/api/orgManage.js | 7 +- src/api/privilegeManagement.js | 2 +- src/api/replenishment.js | 70 ++ src/api/shelfs.js | 14 + src/api/valueAddedManagement.js | 84 +++ src/config.js | 11 +- src/router/modules/shelfs.js | 26 +- src/router/modules/valueAddedManagement.js | 40 ++ src/store/modules/tagsView.js | 2 + src/styles/list.scss | 17 + src/utils/date.js | 7 +- .../classification.vue | 4 +- src/views/dashboard/dateHeader.vue | 3 +- .../layout/components/rightMenu/rightMenu.vue | 5 + src/views/login/index.vue | 4 +- .../couponManagement/index.vue | 4 +- src/views/marketingCenter/luckyDraw/index.vue | 6 +- src/views/marketingCenter/luckyFree/index.vue | 6 +- .../marketingCenter/noviceCourtesy/index.vue | 6 +- .../paymentOfCourtesy/index.vue | 6 +- .../marketingCenter/salesPromotion/index.vue | 6 +- src/views/order/salesOrder/index.vue | 2 +- src/views/orgManage/orgManage/index.vue | 48 +- .../privilegeManagement/account/form.vue | 62 +- .../privilegeManagement/account/index.vue | 21 +- src/views/shelfs/add/index.vue | 616 ++++++++++++++--- src/views/shelfs/list/itemFormModal.vue | 117 +++- .../shelfs/list/putawayShelf/lefttable.vue | 52 +- .../shelfs/list/putawayShelf/righttable.vue | 44 +- src/views/shelfs/list/rightEdit.vue | 539 ++++++++++++--- src/views/shelfs/list/rightEdit。1.vue | 236 +++++++ src/views/shelfs/list/rightShowItem.vue | 61 +- src/views/shelfs/list/styles/rightEdit.scss | 62 ++ src/views/shelfs/list/table.vue | 10 +- src/views/shelfs/replenishment/index.vue | 31 + .../shelfs/replenishment/mixins/initStore.js | 20 + .../shelfs/replenishment/mixins/props.js | 36 + .../shelfs/replenishment/mixins/table.js | 43 ++ src/views/shelfs/replenishment/quxia-vm.vue | 373 ++++++++++ src/views/shelfs/replenishment/quxia.vue | 261 +++++++ src/views/shelfs/replenishment/table.vue | 162 +++++ src/views/shelfs/status/form.vue | 182 ++--- src/views/shelfs/status/index.vue | 7 + src/views/shelfs/status/mixins/initStore.js | 2 +- src/views/shelfs/status/mixins/props.js | 7 +- src/views/shelfs/status/rightEdit.vue | 638 ++++++++++++++++-- src/views/shelfs/status/table.vue | 41 +- .../distributionSettings/index.vue | 15 + .../valueAddedAtatistics/channelDetails.vue | 15 + .../valueAddedAtatistics/index.vue | 309 +++++++++ .../valueAddedAtatistics/orderDetails.vue | 155 +++++ 57 files changed, 4124 insertions(+), 433 deletions(-) create mode 100644 src/api/replenishment.js create mode 100644 src/api/valueAddedManagement.js create mode 100644 src/router/modules/valueAddedManagement.js create mode 100644 src/styles/list.scss create mode 100644 src/views/shelfs/list/rightEdit。1.vue create mode 100644 src/views/shelfs/list/styles/rightEdit.scss create mode 100644 src/views/shelfs/replenishment/index.vue create mode 100644 src/views/shelfs/replenishment/mixins/initStore.js create mode 100644 src/views/shelfs/replenishment/mixins/props.js create mode 100644 src/views/shelfs/replenishment/mixins/table.js create mode 100644 src/views/shelfs/replenishment/quxia-vm.vue create mode 100644 src/views/shelfs/replenishment/quxia.vue create mode 100644 src/views/shelfs/replenishment/table.vue create mode 100644 src/views/valueAddedManagement/distributionSettings/index.vue create mode 100644 src/views/valueAddedManagement/valueAddedAtatistics/channelDetails.vue create mode 100644 src/views/valueAddedManagement/valueAddedAtatistics/index.vue create mode 100644 src/views/valueAddedManagement/valueAddedAtatistics/orderDetails.vue diff --git a/jsconfig.json b/jsconfig.json index ac2715f..63fbc52 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,4 +1,5 @@ { + // https://juejin.im/post/5a9fae575188255574593aeb "compilerOptions": { "baseUrl": "./", "paths": { diff --git a/public/index.html b/public/index.html index 766454b..16a4975 100644 --- a/public/index.html +++ b/public/index.html @@ -17,12 +17,7 @@
- - - - - - + diff --git a/src/App.vue b/src/App.vue index ec9032c..ebb3e42 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,7 @@ export default { name: 'App' } + + diff --git a/src/api/common.js b/src/api/common.js index 844c3f4..7f79b14 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -78,3 +78,13 @@ export function GET_LOCALTION_TYPE(params) { params }).then(res => res.data.data) } + + + +export function GET_clientsSel(params) { + return request({ + url: "/api/admin/clients/select", + method: 'get', + params + }).then(res => res.data.data) +} diff --git a/src/api/devices.js b/src/api/devices.js index cd4f65d..36ce46c 100644 --- a/src/api/devices.js +++ b/src/api/devices.js @@ -50,6 +50,8 @@ export function GET_DEVICE_DETAIL(params) { }).then(res => res.data.data) } + + export function UPDATE_DEVICE(params) { return request({ url: `/api/admin/devices/update?id=${params.id}`, diff --git a/src/api/devicesStatus.js b/src/api/devicesStatus.js index a2c55de..874e648 100644 --- a/src/api/devicesStatus.js +++ b/src/api/devicesStatus.js @@ -8,6 +8,8 @@ export function get_shelfs_device_lists(params) { }).then(res => res.data.data) } + + export function get_shelfs_device_summary(params) { return request({ url: "/api/admin/shelfs/devices/summary", @@ -24,10 +26,44 @@ export function get_shelfs_device_detail(id) { params: { id } }).then(res => res.data.data) } + +export function get_shelfs_device_detail_vm(id) { + return request({ + url: "/api/admin/shelfs/devices/vmDetail", + method: 'get', + params: { id } + }).then(res => res.data.data) +} export function put_shelfs_device_detail(params) { return request({ url: `/api/admin/shelfs/devices?deviceId=${params.deviceId}`, method: 'post', data: params }).then(res => res.data.data) +} +export function put_shelfs_device_detail_vm(params) { + return request({ + url: `/api/admin/shelfs/devices/vm?deviceId=${params.deviceId}`, + method: 'post', + data: params + }).then(res => res.data.data) +} + + + +// api/admin/shelfs/devices/vmDetail +export function shelfs_devices_vmDetail(id) { + return request({ + url: `/api/admin/shelfs/devices/vmDetail?id=${id}`, + method: 'get', + data: { id } + }).then(res => res.data.data.rows) +} +//修改 大售货机状态/ +export function post_shelfs_devices_vmDetail(params) { + return request({ + url: `/api/admin/shelfs/devices/vm?deviceId=${params.deviceId}`, + method: 'post', + data: params + }).then(res => res.data.data) } \ No newline at end of file diff --git a/src/api/orgManage.js b/src/api/orgManage.js index 99f5e95..5029b68 100644 --- a/src/api/orgManage.js +++ b/src/api/orgManage.js @@ -15,6 +15,9 @@ export function GET_clients(params) { }).then(res => res.data.data) } + + + /** * 组织管理 -- 新建组织 * @param params @@ -30,14 +33,14 @@ export function POST_clients(params) { } /** - * 组织管理 -- 新建组织 + * 组织管理 -- 更新组织 * @param params * @returns {Q.Promise} * @constructor */ export function PUT_clients(params) { return request({ - url: "/api/admin/clients", + url: "/api/admin/clients?id=" + params.id, method: 'put', data: params }).then(res => res.data.data) diff --git a/src/api/privilegeManagement.js b/src/api/privilegeManagement.js index b3a32e4..51d6302 100644 --- a/src/api/privilegeManagement.js +++ b/src/api/privilegeManagement.js @@ -120,7 +120,7 @@ export function PASSWORD_ACCOUNT_LIST(params) { */ export function COUNT_ACCOUNT_LIST(params) { return request({ - url: "/api/admin/accounts/count", + url: "/api/admin/accounts/count?clientId=" + params, method: 'get', data: params }).then(res => res.data.data) diff --git a/src/api/replenishment.js b/src/api/replenishment.js new file mode 100644 index 0000000..5e20048 --- /dev/null +++ b/src/api/replenishment.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +/** + * 货道补货 -- 酒店售货机 and 自助售货机 详情 + * @param params + * @returns {Promise} + * @constructor + */ +export function GET_DEVICEINFO(params) { + return request({ + url: "/api/admin/restocks/deviceInfo?deviceId=" + params, + method: 'get', + }).then(res => res.data.data) +} + + +/** + * 货道补货 -- 酒店售货机 and 自助售货机 开门补货 + * @param params + * @returns {Promise} + * @constructor + */ +export function POST_RESTOCKS(params) { + return request({ + url: "/api/admin/restocks?deviceId=" + params.deviceId, + method: 'post', + data:params + }).then(res => res.data.data) +} + + +/** + * 货道补货 -- 一键开门 + * @param params + * @returns {Promise} + * @constructor + */ +export function POST_OPENDOOR(params) { + return request({ + url: "/api/admin/quxia/remote/openDoors?deviceId=" + params.deviceId, + method: 'post', + data:params + }).then(res => res.data.data) +} + + + +/** + * 货道补货 -- 酒店售货机 确认补货 + * @param params + * @returns {Promise} + * @constructor + */ +export function POST_RESTOCKS_UPDATE(params) { + return request({ + url: "/api/admin/restocks/update?deviceId=" + params.deviceId, + method: 'post', + data:params + }).then(res => res.data.data) +} + + + + + + + + + + diff --git a/src/api/shelfs.js b/src/api/shelfs.js index fc11715..c7c801a 100644 --- a/src/api/shelfs.js +++ b/src/api/shelfs.js @@ -30,6 +30,13 @@ export function postShelf(params) { data: params }).then(res => res.data.data) } +export function postShelfvm(params) { + return request({ + url: '/api/admin/shelfs/vm', + method: 'post', + data: params + }).then(res => res.data.data) +} export function deleteShelf(id) { return request({ url: '/api/admin/shelfs', @@ -45,6 +52,13 @@ export function putShelf(params) { data: params }).then(res => res.data.data) } +export function putShelfvm(params) { + return request({ + url: `/api/admin/shelfs/vm?id=${params.id}`, + method: 'put', + data: params + }).then(res => res.data.data) +} export function getShelfCount(params) { return request({ diff --git a/src/api/valueAddedManagement.js b/src/api/valueAddedManagement.js new file mode 100644 index 0000000..dd4a47f --- /dev/null +++ b/src/api/valueAddedManagement.js @@ -0,0 +1,84 @@ +import request from '@/utils/request' + +const url = '/api/admin'; + +/** + * 增值功能-数据统计 / 数据汇总 + * @param params + * @returns {Q.Promise | * | Q.Promise | PromiseLike | Promise} + * @constructor + */ +export function GET_SUMMARY(params) { + return request({ + url: url + "/channels/analytics/summary", + method: 'get', + params + }).then(res => res.data.data) + +} + + +/** + * 增值功能-数据统计 / 增值渠道订单列表 + * @param params + * @returns {Q.Promise | * | Q.Promise | PromiseLike | Promise} + * @constructor + */ +export function GET_LIST_ORDERS(params) { + return request({ + url: url + "/channels/orders", + method: 'get', + params + }).then(res => res.data.data) +} + + +/** + * 增值功能-数据统计 / 增值渠道列表 + * @param params + * @returns {Q.Promise | * | Q.Promise | PromiseLike | Promise} + * @constructor + */ +export function GET_SELECT(params) { + return request({ + url: url + "/channels/select", + method: 'get', + params + }).then(res => res.data.data) + +} + + + + +/** + * 增值功能-数据统计 / 增值订单详情 + * @param params + * @returns {Q.Promise | * | Q.Promise | PromiseLike | Promise} + * @constructor + */ +export function GET_LIST_ORDERS_DETAIL(params) { + return request({ + url: url + "/channels/orders/detail", + method: 'get', + params + }).then(res => res.data.data) + +} + + +/** + * 增值功能-数据统计 / 增值渠道订单总数 + * @param params + * @returns {Q.Promise | * | Q.Promise | PromiseLike | Promise} + * @constructor + */ +export function GET_ORDERS_COUNT(params) { + return request({ + url: url + "/channels/orders/count", + method: 'get', + params + }).then(res => res.data.data) + +} + diff --git a/src/config.js b/src/config.js index b39d1c9..477d379 100644 --- a/src/config.js +++ b/src/config.js @@ -1,8 +1,13 @@ -// export const BASE_API = "https://rapapi.renqilai.com/app/mock/39"; +export const DEVICE_TYPE_SMALL = "quxia" +export const DEVICE_TYPE_BIG = "quxia-vm" export const client_id = 'test' export const client_secret = "test" -export const BASE_API = "http://192.168.0.222:8080" +export const BASE_API = "http://192.168.0.222:8080"; +// export const BASE_API = "http://192.168.0.252:9090" // export const BASE_API = "https://quxiaapi.renqilai.com" - +// export const BASE_API = "https://rapapi.renqilai.com/app/mock/39"; export const pageSize = 20 + +export const SHELF_MAX_ROW=7 +export const SHELF_MAX_COLOUM=12 diff --git a/src/router/modules/shelfs.js b/src/router/modules/shelfs.js index 4fc5f49..f078bca 100644 --- a/src/router/modules/shelfs.js +++ b/src/router/modules/shelfs.js @@ -10,14 +10,34 @@ const route = { component: () => import('@/views/shelfs/list'), name: "shelfs_list", meta: { - title: '货道列表', noCache: false, affix: false + title: '货道模板', noCache: false, affix: false }, }, { path: '/shelfs/status', component: () => import('@/views/shelfs/status'), name: "shelfs_status", - meta: { title: '货道状态', noCache: false, affix: false }, + meta: { title: '设备货道', noCache: false, affix: false }, + }, + { + path: '/shelfs/replenishment', + component: () => import('@/views/shelfs/replenishment'), + name: "shelfs_replenishment", + meta: { title: '货道补货', noCache: false, affix: false }, + }, + { + path: '/shelfs/replenishment/quxia', + hidden: true, + component: () => import('@/views/shelfs/replenishment/quxia'), + name: "shelfs_quxia", + meta: { title: '货道补货-酒店售货机', noCache: false, affix: false }, + }, + { + path: '/shelfs/replenishment/quxia-vm', + hidden: true, + component: () => import('@/views/shelfs/replenishment/quxia-vm'), + name: "shelfs_quxia-vm", + meta: { title: '货道补货-自助售货机', noCache: false, affix: false }, }, { path: '/shelfs/detail', @@ -43,4 +63,4 @@ const route = { ] } -export default route \ No newline at end of file +export default route diff --git a/src/router/modules/valueAddedManagement.js b/src/router/modules/valueAddedManagement.js new file mode 100644 index 0000000..1ba04be --- /dev/null +++ b/src/router/modules/valueAddedManagement.js @@ -0,0 +1,40 @@ +import Layout from '@/views/layout/Layout' + +const valueAddedManagement = { + path: '/valueAddedManagement', + component: Layout, + meta: {title: '增值管理', icon: 'guanggaoguanli', noCache: true, affix: false}, + children: [ + { + path: '/valueAddedAtatistics/index', + component: () => import('@/views/valueAddedManagement/valueAddedAtatistics/index'), + name: '增值统计', + meta: {title: '增值统计', noCache: false, affix: false} + }, + { + path: '/valueAddedAtatistics/channelDetails', + component: () => import('@/views/valueAddedManagement/valueAddedAtatistics/channelDetails'), + hidden:true, + name: '渠道详情', + meta: {title: '渠道详情', noCache: false, affix: false}, + + }, + { + path: '/advertisingManagement/orderDetails', + component: () => import('@/views/valueAddedManagement/valueAddedAtatistics/orderDetails'), + hidden:true, + name: '订单详情', + meta: {title: '订单详情', noCache: false, affix: false}, + + }, + { + path: '/distributionSettings/index', + component: () => import('@/views/valueAddedManagement/distributionSettings/index'), + name: '分润设置', + meta: {title: '分润设置', noCache: false, affix: false}, + + }, + ] +}; + +export default valueAddedManagement diff --git a/src/store/modules/tagsView.js b/src/store/modules/tagsView.js index 7ad906a..0dcf9e1 100644 --- a/src/store/modules/tagsView.js +++ b/src/store/modules/tagsView.js @@ -62,6 +62,8 @@ const tagsView = { state.cachedViews = [] }, + + UPDATE_VISITED_VIEW: (state, view) => { for (let v of state.visitedViews) { if (v.path === view.path) { diff --git a/src/styles/list.scss b/src/styles/list.scss new file mode 100644 index 0000000..8655d1b --- /dev/null +++ b/src/styles/list.scss @@ -0,0 +1,17 @@ +.list { + display: flex; + + .label { + text-align : right; + float : left; + font-size : 14px; + color : #606266; + line-height : 40px; + padding : 0 12px 0 0; + font-weight : 600; + -webkit-box-sizing: border-box; + box-sizing : border-box; + } + + .value {} +} \ No newline at end of file diff --git a/src/utils/date.js b/src/utils/date.js index 741c860..6141e73 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -27,7 +27,8 @@ export function getToday() { start: a, end: a, laststart: b, - lastend: b + lastend: b, + siez:10 } } export function getLastWeek() { @@ -36,6 +37,7 @@ export function getLastWeek() { end: moment().endOf('isoWeek').format('YYYY-MM-DD'), laststart: moment().add(-1, 'weeks').startOf('isoWeek').format('YYYY-MM-DD'), lastend: moment().add(-1, 'weeks').startOf('isoWeek').format('YYYY-MM-DD'), + siez:10 } } @@ -45,5 +47,6 @@ export function getLastMonth() { end: moment().endOf('months').format('YYYY-MM-DD'), laststart: moment().add(-1, 'months').startOf('isoWeek').format('YYYY-MM-DD'), lastend: moment().add(-1, 'months').startOf('isoWeek').format('YYYY-MM-DD'), + siez:10 } -} \ No newline at end of file +} diff --git a/src/views/commodityManagement/commodityClassification/classification.vue b/src/views/commodityManagement/commodityClassification/classification.vue index 1570eeb..12b2232 100644 --- a/src/views/commodityManagement/commodityClassification/classification.vue +++ b/src/views/commodityManagement/commodityClassification/classification.vue @@ -104,7 +104,7 @@ ORDERS_CATEGORIES } from '@/api/commodityManagement' - import {dateTimeFormateHHmm} from "@/filters/index"; + import {dateTimeFormate} from "@/filters/index"; export default { name: "classification", @@ -283,7 +283,7 @@ }, filters: { filterCreatedDate(val) { - return dateTimeFormateHHmm(val) + return dateTimeFormate(val) } } } diff --git a/src/views/dashboard/dateHeader.vue b/src/views/dashboard/dateHeader.vue index d3febf0..b822ba2 100644 --- a/src/views/dashboard/dateHeader.vue +++ b/src/views/dashboard/dateHeader.vue @@ -34,7 +34,8 @@ export default { this.type = ""; this.$emit("sure", { start: dateFormate(value[0]), - end: dateFormate(value[1]) + end: dateFormate(value[1]), + siez:10 }); } else { this.selectTime("today"); diff --git a/src/views/layout/components/rightMenu/rightMenu.vue b/src/views/layout/components/rightMenu/rightMenu.vue index 5c64613..cef97eb 100644 --- a/src/views/layout/components/rightMenu/rightMenu.vue +++ b/src/views/layout/components/rightMenu/rightMenu.vue @@ -33,6 +33,7 @@ diff --git a/src/views/shelfs/list/itemFormModal.vue b/src/views/shelfs/list/itemFormModal.vue index 802bd80..3baf4e0 100644 --- a/src/views/shelfs/list/itemFormModal.vue +++ b/src/views/shelfs/list/itemFormModal.vue @@ -1,6 +1,11 @@ @@ -67,6 +119,8 @@ import { GET_LIST } from "../../../api/commodityManagement"; import { mergeArray } from "../../../utils/lodash"; import { clone } from "@/filters"; +import myalert from "../../../utils/alert"; +import { DEVICE_TYPE_SMALL } from '../../../config'; export default { props: ["visible", "editItem"], data() { @@ -85,9 +139,13 @@ export default { query: "", from: "", size: 10 - } + }, + deviceTypeId: DEVICE_TYPE_SMALL }; }, + mounted() { + this.init() + }, methods: { //验证 number validator(rule, value, callback) { @@ -104,19 +162,40 @@ export default { callback(); } }, - open() { + init() { + this.deviceTypeId = this.$parent.deviceTypeId if (this.$data.products.length <= 0) { this.remoteMethod(); } - if (this.editItem.length >= 0) { + if (this.editItem.length > 1) { + //如果是多选 进来选择都为空 + this.$data.cacheItemCopy = clone({}); + this.$data.formInline = clone({}); + } else { this.$data.cacheItemCopy = clone(this.editItem[0]); this.$data.formInline = clone(this.editItem[0]); } + }, + open() { + }, finish() { - this.$emit("update:visible", false); this.$emit("finish", this.$data.formInline); }, + isExitNumberInArray() { + var array = this.$parent.$data.detail.shelfs; + var exit = false; + var self = this; + for (var item of array) { + for (var item1 of item.items) { + if (item1.number == self.formInline.number) { + exit = true; + break; + } + } + } + return exit; + }, sure() { var self = this; this.$refs["form"].validate(valid => { @@ -165,7 +244,7 @@ export default { } }, - mounted() {} + }; diff --git a/src/views/shelfs/list/putawayShelf/lefttable.vue b/src/views/shelfs/list/putawayShelf/lefttable.vue index a4da966..a5c498f 100644 --- a/src/views/shelfs/list/putawayShelf/lefttable.vue +++ b/src/views/shelfs/list/putawayShelf/lefttable.vue @@ -9,6 +9,7 @@ style="width: 100%" @row-click="(row)=>{$emit('selectRow',row)}" ref="table" + :row-class-name="tableRowClassName" > @@ -18,14 +19,24 @@ :value="scope.row.checked&&!scope.row.disabled" :checked="scope.row.checked&&!scope.row.disabled" :disabled="scope.row.disabled" + @change="checked_checkbox($event,scope.row,scope.$index)" /> - - + + - + - - + + - +