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 @@