diff --git a/apis/commonApi.js b/apis/commonApi.js index 4615a63..67d6160 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -88,3 +88,11 @@ export function getGuaranteeContract(data = {}) { 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/orderApi.js b/apis/orderApi.js index 0b19b8d..1cf50be 100644 --- a/apis/orderApi.js +++ b/apis/orderApi.js @@ -12,3 +12,39 @@ export const getOrderList = (data) => { 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 + }) +} diff --git a/pages.json b/pages.json index c75ebcf..4ccf202 100644 --- a/pages.json +++ b/pages.json @@ -75,6 +75,22 @@ "navigationStyle": "custom" } }, + { + "path": "pages/order-make/index", + "style": { + "navigationBarTitleText": "创建订单", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/order-detail/index", + "style": { + "navigationBarTitleText": "订单详情", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, { "path": "pages/test/index", "style": { @@ -83,27 +99,27 @@ "navigationStyle": "custom" } }, - { - "path": "pages/paper-details/index", - "style": { - "navigationBarTitleText": "纸品详情", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/for-comparison/index", - "style": { - "navigationBarTitleText": "实单询比价", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/add-address-manage/index", - "style": { - "navigationBarTitleText": "新建收货地址", - "enablePullDownRefresh": false - } - } + { + "path": "pages/paper-details/index", + "style": { + "navigationBarTitleText": "纸品详情", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/for-comparison/index", + "style": { + "navigationBarTitleText": "实单询比价", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/add-address-manage/index", + "style": { + "navigationBarTitleText": "新建收货地址", + "enablePullDownRefresh": false + } + } ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/enterprise-info/index.vue b/pages/enterprise-info/index.vue index c47b603..46e3b25 100644 --- a/pages/enterprise-info/index.vue +++ b/pages/enterprise-info/index.vue @@ -229,6 +229,8 @@ export default { locDistrictName: null, locStreetName: null, locDetail: null, + regAddrLongitude: null, + regAddrLatitude: null, legalPersonName: null, legalPersonMobile: null, legalPersonIdCardNo: null, @@ -292,6 +294,8 @@ export default { this.form.locCityName = location.cityName this.form.locDistrictName = location.districtName this.form.locDetail = location.address + this.form.regAddrLongitude = location.longitude + this.form.regAddrLatitude = location.latitude this.$refs.locationPopup.close() }, showCompany(e) { @@ -334,6 +338,8 @@ export default { this.form.locDetail = info.locDetail this.form.registeredCapital = info.registeredCapital this.form.foundDate = info.foundDate + this.form.regAddrLongitude = info.regAddrLongitude + this.form.regAddrLatitude = info.regAddrLatitude }, onAreaChange(e) { if (e.detail.value && e.detail.value.length > 0) { diff --git a/pages/login/index.vue b/pages/login/index.vue index 76a23db..0b7bbf8 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -139,7 +139,7 @@ export default { store.commit('setToken', token) // 登录成功先查看是否有下一个页面 const nextPage = store.state.nextPage - let page = null + let page = undefined if (nextPage.name) { page = { url: nextPage.name, data: nextPage.data, isRedirect: true } } diff --git a/pages/order-detail/index.vue b/pages/order-detail/index.vue new file mode 100644 index 0000000..a464a99 --- /dev/null +++ b/pages/order-detail/index.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/pages/order-list/index.vue b/pages/order-list/index.vue index 88b020c..63029ee 100644 --- a/pages/order-list/index.vue +++ b/pages/order-list/index.vue @@ -13,7 +13,7 @@ - + {{ item.orderId }} @@ -143,6 +143,14 @@ export default { result += `/${target.pieceQuantity}张` } return result + }, + // 根据状态跳转到不同页面 + goDetail(order) { + if (order.status === orderStatusEnum.WAIT_CONFIRM) { + go2('order-make', { orderId: order.orderId }) + } else { + go2('order-detail', { orderId: order.orderId }) + } } }, onLoad(option) { diff --git a/pages/order-make/index.vue b/pages/order-make/index.vue new file mode 100644 index 0000000..707543b --- /dev/null +++ b/pages/order-make/index.vue @@ -0,0 +1,393 @@ + + + + + diff --git a/static/imgs/order/address-icon.png b/static/imgs/order/address-icon.png new file mode 100644 index 0000000..baaf5e0 Binary files /dev/null and b/static/imgs/order/address-icon.png differ diff --git a/static/imgs/order/edit-address-icon.png b/static/imgs/order/edit-address-icon.png new file mode 100644 index 0000000..f1bf1ba Binary files /dev/null and b/static/imgs/order/edit-address-icon.png differ diff --git a/static/imgs/order/fs-pay-icon.png b/static/imgs/order/fs-pay-icon.png new file mode 100644 index 0000000..2a36338 Binary files /dev/null and b/static/imgs/order/fs-pay-icon.png differ diff --git a/static/imgs/order/month-pay-icon.png b/static/imgs/order/month-pay-icon.png new file mode 100644 index 0000000..03ea156 Binary files /dev/null and b/static/imgs/order/month-pay-icon.png differ diff --git a/static/imgs/order/right-arrow.png b/static/imgs/order/right-arrow.png new file mode 100644 index 0000000..532d973 Binary files /dev/null and b/static/imgs/order/right-arrow.png differ diff --git a/static/imgs/order/select-icon.png b/static/imgs/order/select-icon.png new file mode 100644 index 0000000..a1d575e Binary files /dev/null and b/static/imgs/order/select-icon.png differ diff --git a/static/imgs/order/selected-icon.png b/static/imgs/order/selected-icon.png new file mode 100644 index 0000000..1df014e Binary files /dev/null and b/static/imgs/order/selected-icon.png differ diff --git a/utils/hook.js b/utils/hook.js index e30e19a..1255330 100644 --- a/utils/hook.js +++ b/utils/hook.js @@ -156,7 +156,7 @@ export function uploadFile(path, type = 'image') { /** * 根据类型获取缓存 * @param {string} type 缓存类型 - * @returns 缓存数据 + * @returns object 缓存数据 */ export function getCache(type) { let data = null