From 39a9d5b7332b0e0e6883485fbefa1472d60c2238 Mon Sep 17 00:00:00 2001 From: mo-bai <1873032855@qq.com> Date: Sat, 2 Apr 2022 18:03:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=9F=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/commonApi.js | 19 + apis/enterpriseInfoApi.js | 49 ++ apis/forComparisonApi.js | 16 + apis/mallApi.js | 68 ++ apis/orderApi.js | 139 ++++ apis/paperDetailsApi.js | 37 + .../qn-input-number/qn-input-number.vue | 95 +++ enums/index.js | 24 + pages.json | 48 ++ pages/cart/index.vue | 550 +++++++++++++ pages/cart/no-data.vue | 63 ++ pages/device-production-detail/index.vue | 5 +- pages/digital-workshops/index.vue | 37 +- pages/enterprise-info/index.vue | 613 ++++++++++++++ pages/for-comparison/index.vue | 617 +++++++++++++++ pages/mall/index.vue | 283 ++++++- pages/order-make/index.vue | 505 ++++++++++++ pages/paper-details/index.vue | 749 ++++++++++++++++++ pages/production-operation/index.vue | 2 +- pages/store/index.vue | 353 +++++++++ static/imgs/cart/no-data-icon.png | Bin 0 -> 39176 bytes static/imgs/cart/shopping-cart-not-select.png | Bin 0 -> 994 bytes static/imgs/cart/shopping-cart-select.png | Bin 0 -> 1161 bytes static/imgs/digital-workshops/.DS_Store | Bin 0 -> 6148 bytes .../imgs/digital-workshops/camera-tip-bg.png | Bin 0 -> 8448 bytes static/imgs/mall/cart-icon.png | Bin 0 -> 4851 bytes static/imgs/mall/top-bg.png | Bin 0 -> 117190 bytes static/imgs/order/.DS_Store | Bin 0 -> 6148 bytes static/imgs/order/address-icon.png | Bin 0 -> 4569 bytes static/imgs/order/camera.png | Bin 0 -> 1765 bytes static/imgs/order/customer-default.png | Bin 0 -> 14633 bytes static/imgs/order/edit-address-icon.png | Bin 0 -> 949 bytes static/imgs/order/fs-pay-icon.png | Bin 0 -> 1255 bytes static/imgs/order/location-icon.png | Bin 0 -> 782 bytes static/imgs/order/month-pay-icon.png | Bin 0 -> 903 bytes static/imgs/order/order-empty.png | Bin 0 -> 45842 bytes static/imgs/order/paper-default-icon.png | Bin 0 -> 16569 bytes static/imgs/order/right-arrow.png | Bin 0 -> 604 bytes static/imgs/order/select-icon.png | Bin 0 -> 929 bytes static/imgs/order/selected-icon.png | Bin 0 -> 1493 bytes static/imgs/order/status-icon.png | Bin 0 -> 1037 bytes static/imgs/order/wxpay-icon.png | Bin 0 -> 1251 bytes .../paperDetails/add-shopping-trolley.png | Bin 0 -> 954 bytes static/imgs/paperDetails/shop-icon.png | Bin 0 -> 969 bytes static/imgs/paperDetails/shopping-trolley.png | Bin 0 -> 922 bytes static/imgs/store/address-icon.png | Bin 0 -> 1537 bytes static/imgs/store/special-offe.png | Bin 0 -> 3067 bytes static/imgs/store/store-icon.png | Bin 0 -> 33534 bytes store/index.js | 24 +- utils/http/index.js | 16 +- utils/md5.js | 229 ++++++ 51 files changed, 4506 insertions(+), 35 deletions(-) create mode 100644 apis/enterpriseInfoApi.js create mode 100644 apis/forComparisonApi.js create mode 100644 apis/mallApi.js create mode 100644 apis/orderApi.js create mode 100644 apis/paperDetailsApi.js create mode 100644 components/qn-input-number/qn-input-number.vue create mode 100644 pages/cart/index.vue create mode 100644 pages/cart/no-data.vue create mode 100644 pages/enterprise-info/index.vue create mode 100644 pages/for-comparison/index.vue create mode 100644 pages/order-make/index.vue create mode 100644 pages/paper-details/index.vue create mode 100644 pages/store/index.vue create mode 100644 static/imgs/cart/no-data-icon.png create mode 100644 static/imgs/cart/shopping-cart-not-select.png create mode 100644 static/imgs/cart/shopping-cart-select.png create mode 100644 static/imgs/digital-workshops/.DS_Store create mode 100644 static/imgs/digital-workshops/camera-tip-bg.png create mode 100644 static/imgs/mall/cart-icon.png create mode 100644 static/imgs/mall/top-bg.png create mode 100644 static/imgs/order/.DS_Store create mode 100644 static/imgs/order/address-icon.png create mode 100644 static/imgs/order/camera.png create mode 100644 static/imgs/order/customer-default.png create mode 100644 static/imgs/order/edit-address-icon.png create mode 100644 static/imgs/order/fs-pay-icon.png create mode 100644 static/imgs/order/location-icon.png create mode 100644 static/imgs/order/month-pay-icon.png create mode 100644 static/imgs/order/order-empty.png create mode 100644 static/imgs/order/paper-default-icon.png create mode 100644 static/imgs/order/right-arrow.png create mode 100644 static/imgs/order/select-icon.png create mode 100644 static/imgs/order/selected-icon.png create mode 100644 static/imgs/order/status-icon.png create mode 100644 static/imgs/order/wxpay-icon.png create mode 100644 static/imgs/paperDetails/add-shopping-trolley.png create mode 100644 static/imgs/paperDetails/shop-icon.png create mode 100644 static/imgs/paperDetails/shopping-trolley.png create mode 100644 static/imgs/store/address-icon.png create mode 100644 static/imgs/store/special-offe.png create mode 100644 static/imgs/store/store-icon.png create mode 100644 utils/md5.js diff --git a/apis/commonApi.js b/apis/commonApi.js index fa9e967..b774cba 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -117,6 +117,25 @@ export function transformFileToImg(data) { }) } +/** + * 获取当前账号企业的飞算额度 + * @param {object} data 参数 enterpriseId + */ +export function getFsCredit(data = {}) { + return http.get({ + url: '/yyt-uec/credit/get/enterprise-feisuan-credit', + data + }) +} + +/** + * 获取当前账号企业的被担保的月结额度 + * @param {object} data 参数 enterpriseId supplierId + */ +export function getMonthCredit(data = {}) { + return http.get({ url: '/yyt-uec/customer/get/supplier-credit', data }) +} + /** * 推送客户绑定 * diff --git a/apis/enterpriseInfoApi.js b/apis/enterpriseInfoApi.js new file mode 100644 index 0000000..d8b53f7 --- /dev/null +++ b/apis/enterpriseInfoApi.js @@ -0,0 +1,49 @@ +import http from '../utils/http/index.js' + +/** + * 完善企业信息 + * @param {*} data + * @returns + */ +export function completeInfo(data) { + return http.post({ + url: '/yyt-uec/save/my/enterprise', + data + }) +} + +/** + * 根据名称模糊查询企业列表 + * @param {*} data + * @returns + */ +export function getCompanyList(data) { + return http.get({ + url: '/base-paper-trading/get/customers/enterprise/basic/list', + data + }) +} + +/** + * 根据id查询企业详细信息 + * @param {*} data + * @returns + */ +export function getCompanyInfoById(data) { + return http.get({ + url: '/yyt-uec/get/enterprise-detail', + data + }) +} + +/** + * 根据企业名称查询企业坐标列表 + * @param {*} data + * @returns + */ +export function getCompanyLocationList(data) { + return http.get({ + url: '/yyt-uec/get/enterprise/geographic/position/address', + data + }) +} diff --git a/apis/forComparisonApi.js b/apis/forComparisonApi.js new file mode 100644 index 0000000..91ebcf3 --- /dev/null +++ b/apis/forComparisonApi.js @@ -0,0 +1,16 @@ +import http from '../utils/http/index.js' + +// 提交询价单 +export function createEnquiryOrder(data) { + return http.post({ + url: '/base-paper-trading/add/enquiry-order', + data + }) +} +// 查询纸种列表 +export function getCategoryList(data) { + return http.get({ + url: '/base-paper-trading/get/enquiry/category-and-brand-list/by-supplierId', + data + }) +} \ No newline at end of file diff --git a/apis/mallApi.js b/apis/mallApi.js new file mode 100644 index 0000000..f4f1e96 --- /dev/null +++ b/apis/mallApi.js @@ -0,0 +1,68 @@ +import http from '@/utils/http/index.js' + +/** + * 获取店铺列表 + */ +export function getStoreList(data = {}) { + return http.get({ + url: '/base-paper-trading/search/store/page', + data + }) +} + +/** + * 获取店铺信息 + * @param {object} data 参数 + * @returns {Promise} + * swagger:http://api-ops-yyt-test.qniao.cn/base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/ + */ +export const getCustomer = (data = {}) => { + return http.get({ + url: '/base-paper-trading/get/store-detail/for/customer', + data + }) +} +/** + * 获取店铺纸品列表 + * @param {object} data 参数 + * @returns {Promise} + * swagger: http://api-ops-yyt-test.qniao.cn//base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/%E5%95%86%E5%93%81%E7%AE%A1%E7%90%86/getStoreProductListForCustomerUsingGET + */ +export const getPaperList = (data = {}) => { + return http.get({ + url: '/base-paper-trading/get/store/product-list/for/customer', + data + }) +} + +// 获取购物车列表 +export function getShoppingCarList(data) { + return http.get( + { + url: '/base-paper-trading/get/shopping-car-list', + data + }, + { + hideLoading: true + } + ) +} +// 移除购物车 +export function removeShoppingCar(data) { + return http.post({ + url: '/base-paper-trading/delete/shopping-car', + data + }) +} +// 购物车结算 +export function closePaperReserve(data) { + return http.post( + { + url: '/base-paper-trading/shopping/trolley/buyer/paper/reserve', + data + }, + { + isEncrypt: true + } + ) +} diff --git a/apis/orderApi.js b/apis/orderApi.js new file mode 100644 index 0000000..470932f --- /dev/null +++ b/apis/orderApi.js @@ -0,0 +1,139 @@ +import http from '../utils/http/index.js' + +/** + * 获取客户订单列表 + * @param {object} data 获取验证码参数 + * @returns {Promise} + * swagger: http://api-ops-yyt-test.qniao.cn//base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/%E5%8E%9F%E7%BA%B8%E8%AE%A2%E5%8D%95/getCustomerOrderListPageUsingGET + */ +export const getOrderList = (data) => { + return http.get({ + url: '/base-paper-trading/get/customer/order/list/page', + data + }) +} + +/** + * 获取待确认订单详情 + * @param {object} data customerOrderId,userId + * @returns {Promise} + */ +export const getPreOrderInfo = (data) => { + return http.get({ + url: '/base-paper-trading/get/customer/to/be/confirmed/order', + data + }) +} + +/** + * 获取企业默认收货地址 + * @param {object} data enterpriseId + * @returns {Promise} + */ +export const getDefaultAddress = (data) => { + return http.get({ + url: '/uec/get/default-enterprise-shipping-address', + data + }) +} + +/** + * 确认订单 + * @param {object} data + * @returns {Promise} + */ +export const submitClientOrder = (data) => { + return http.post( + { + url: '/base-paper-trading/customer/submit/order', + data + }, + { + isEncrypt: true + } + ) +} + +/** + * 获取客户订单详情 + * @param {object} data customerOrderId + * @returns {Promise} + */ +export const getClientOrderInfo = (data) => { + return http.get({ + url: '/base-paper-trading/get/customer/order/details', + data + }) +} + +/** + * 获取客户订单签署是否成功 + * @param {object} data orderId + * @returns {Promise} + */ +export const confirmContract = (data) => { + return http.get({ + url: '/base-paper-trading/get/customer/signing/contract/status', + data + }) +} + +/** + * 客户上传收货凭证 + * @param {object} data proofDeliveryUrl[] supplierOrderId + * @returns {Promise} + */ +export function clientUploadVoucher(data) { + return http.post({ + url: '/base-paper-trading/customer/submit/upload/proof/receipt', + data + }) +} + +/** + * 客户删除收货凭证 + * @param {object} data id + * @returns {Promise} + */ +export function clientDeleteVoucher(data) { + return http.post({ + url: '/base-paper-trading/delete/certificate/img?id=' + data.id, + data + }) +} + +/** + * 客户确认收货 + * @param {object} data supplierOrderId + * @returns {Promise} + */ +export function clientConfirmOrder(data) { + return http.post({ + url: '/base-paper-trading/customer/submit/confirm/receipt', + data + }) +} + +/** + * 计算不开票价格 + * @param {object} data customerOrderId + * @returns {Promise} + */ +export function calcNotInvoiceOrderInfo(data) { + return http.get({ + url: '/base-paper-trading/get/free/checking/order/calculate', + data + }) +} + +/** + * 获取供应商收款码 + * @param {object} data mallSupplierId + * @returns {Promise} + */ +export function getReciptCode(data) { + return http.get({ + url: '/yyt-uec/get/mall/supplier/payee/code/byId', + data + }) +} diff --git a/apis/paperDetailsApi.js b/apis/paperDetailsApi.js new file mode 100644 index 0000000..b109b18 --- /dev/null +++ b/apis/paperDetailsApi.js @@ -0,0 +1,37 @@ +import http from '../utils/http/index.js' + +/** + * 获取店铺纸品详情 + * @param {object} data 参数 + * @returns {Promise} + * swagger: http://api-ops-yyt-test.qniao.cn//base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/%E5%95%86%E5%93%81%E7%AE%A1%E7%90%86/getProductDetailForCustomerUsingGET + */ +export const getPaperDetail = (data = {}) => { + return http.get({ + url: '/base-paper-trading/get/product-detail/for/customer', + data + }) +} +/** + * 立即订购 + * swagger:https://api-ops-yyt-test.qniao.cn//base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/ + */ +export const createGoodsReserve = (data = {}) => { + return http.post( + { + url: '/base-paper-trading/buyer/paper/goods/reserve', + data + }, + { isEncrypt: true } + ) +} +/** + * 加入购物车 + * swagger:http://api-ops-yyt-test.qniao.cn/base-paper-trading/swagger-ui/index.html?urls.primaryName=CustomerApi#/%E8%B4%AD%E7%89%A9%E8%BD%A6/addShoppingCarUsingPOST + */ +export const createShoppingCar = (data = {}) => { + return http.post({ + url: '/base-paper-trading/add/shopping-car', + data + }) +} diff --git a/components/qn-input-number/qn-input-number.vue b/components/qn-input-number/qn-input-number.vue new file mode 100644 index 0000000..353dfc6 --- /dev/null +++ b/components/qn-input-number/qn-input-number.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/enums/index.js b/enums/index.js index 43cc48b..0bd7120 100644 --- a/enums/index.js +++ b/enums/index.js @@ -264,3 +264,27 @@ export const invoiceStatusMap = { [invoiceStatusEnum.INVOICE]: '开票', [invoiceStatusEnum.NO_INVOICE]: '不开票' } + +/** + * 纸品单位 1:张 2:吨 + */ +export const paperUnitEnum = { + PIECE: 1, + TON: 2 +} + +/** + * 纸品单位map + */ +export const paperUnitMap = { + [paperUnitEnum.PIECE]: '张', + [paperUnitEnum.TON]: '吨' +} + +/** + * 加密类型 1:md5加密 2:sha256加密 + */ +export const encryptType = { + MD5: 1, + SHA256: 2 +} diff --git a/pages.json b/pages.json index 85cb60e..e60e607 100644 --- a/pages.json +++ b/pages.json @@ -75,6 +75,54 @@ "navigationStyle": "custom" } }, + { + "path": "pages/store/index", + "style": { + "navigationBarTitleText": "店铺首页", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/enterprise-info/index", + "style": { + "navigationBarTitleText": "完善信息", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/for-comparison/index", + "style": { + "navigationBarTitleText": "实单询比价", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/order-make/index", + "style": { + "navigationBarTitleText": "订单确认", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/paper-details/index", + "style": { + "navigationBarTitleText": "纸品详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/cart/index", + "style": { + "navigationBarTitleText": "购物车", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/mine/index", "style": { diff --git a/pages/cart/index.vue b/pages/cart/index.vue new file mode 100644 index 0000000..6511280 --- /dev/null +++ b/pages/cart/index.vue @@ -0,0 +1,550 @@ + + + + + diff --git a/pages/cart/no-data.vue b/pages/cart/no-data.vue new file mode 100644 index 0000000..697081a --- /dev/null +++ b/pages/cart/no-data.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/pages/device-production-detail/index.vue b/pages/device-production-detail/index.vue index f9eab52..2f6a683 100644 --- a/pages/device-production-detail/index.vue +++ b/pages/device-production-detail/index.vue @@ -8,7 +8,7 @@ 生产数据 - + {{ (dateRange ? `${dateRange[0]}~${dateRange[1]}` : '全部') | formatDate }} @@ -107,7 +107,8 @@ export default { dateRange: null, deviceList: [], password: '', - hasPassword: true + hasPassword: true, + maxTimestamp: new Date().getTime() } }, onLoad(options) { diff --git a/pages/digital-workshops/index.vue b/pages/digital-workshops/index.vue index 147ba66..72f9dd9 100644 --- a/pages/digital-workshops/index.vue +++ b/pages/digital-workshops/index.vue @@ -22,7 +22,7 @@ - + {{ dateRange ? `${dateRange[0]}~${dateRange[1]}` : '全部' }} @@ -78,18 +78,32 @@ {{ device.name }} - + {{ device.workingStatus == deviceStatus.WORKING ? '工作中' : '空闲中' }} - - - 产量: - {{ device.produceTotalNum || 0 }}个 + + + + 产量: + {{ device.produceTotalNum || 0 }}个 + + + 时长: + {{ device.totalWorkHour | formatNumber }}h + - - 时长: - {{ device.totalWorkHour | formatNumber }}h + + + 未安装云盒 + @@ -133,7 +147,8 @@ export default { fontSize: '40rpx' }, deviceStatus: Object.freeze(deviceStatus), - curTab: 0 + curTab: 0, + maxTimestamp: new Date().getTime() } }, computed: { @@ -540,6 +555,8 @@ export default { border-bottom: solid 2rpx rgba(151, 151, 151, 0.4); .text_28 { width: 220rpx; + overflow: hidden; + text-overflow: ellipsis; color: rgb(31, 31, 31); font-size: 28rpx; line-height: 40rpx; diff --git a/pages/enterprise-info/index.vue b/pages/enterprise-info/index.vue new file mode 100644 index 0000000..73dfe59 --- /dev/null +++ b/pages/enterprise-info/index.vue @@ -0,0 +1,613 @@ + + + + + diff --git a/pages/for-comparison/index.vue b/pages/for-comparison/index.vue new file mode 100644 index 0000000..9f128a3 --- /dev/null +++ b/pages/for-comparison/index.vue @@ -0,0 +1,617 @@ + + + + + diff --git a/pages/mall/index.vue b/pages/mall/index.vue index 5323642..4fcf021 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -1,32 +1,277 @@ - + diff --git a/pages/order-make/index.vue b/pages/order-make/index.vue new file mode 100644 index 0000000..3821457 --- /dev/null +++ b/pages/order-make/index.vue @@ -0,0 +1,505 @@ + + + + + diff --git a/pages/paper-details/index.vue b/pages/paper-details/index.vue new file mode 100644 index 0000000..f7cb2b3 --- /dev/null +++ b/pages/paper-details/index.vue @@ -0,0 +1,749 @@ + + + + + diff --git a/pages/production-operation/index.vue b/pages/production-operation/index.vue index b975175..3670930 100644 --- a/pages/production-operation/index.vue +++ b/pages/production-operation/index.vue @@ -1,6 +1,6 @@