From 1bff55b08a4d40ffc3aa3cad4ea7e6f3923c5d22 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Mon, 23 Dec 2024 23:43:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 13 +- components/config/customerServicePopup.vue | 85 ++-- components/user/productList - 副本.vue | 143 +++++++ components/user/productList.vue | 226 +++++++---- components/user/visualization.vue | 233 +++++++++++ pages.json | 4 +- pages/index/center2.vue | 10 +- pages/index/index.vue | 12 +- pages/index/tradingPlatform.vue | 77 +++- pages_order/center/systemSet.vue | 12 +- pages_order/components/order/myOrderList.vue | 2 +- pages_order/components/order/orderList.vue | 30 +- pages_order/order/offerOrBillLading.vue | 94 ++++- pages_order/order/orderDetail.vue | 567 --------------------------- pages_order/order/orderDetail2.vue | 116 ++++-- pages_order/tradingPlatform/nowOrder.vue | 11 +- 16 files changed, 875 insertions(+), 760 deletions(-) create mode 100644 components/user/productList - 副本.vue create mode 100644 components/user/visualization.vue delete mode 100644 pages_order/order/orderDetail.vue diff --git a/api/api.js b/api/api.js index 1c70951..bbe4fec 100644 --- a/api/api.js +++ b/api/api.js @@ -214,7 +214,18 @@ const config = { url: '/product/specsList', method: 'GET', }, - + + + // 新铝价接口 + alpriceNew: { + url: '/index/alpriceNew', + method: 'POST', + }, + // 查询仓库地址 + confAddressList : { + url: '/address/confAddressList', + method: 'GET', + }, } diff --git a/components/config/customerServicePopup.vue b/components/config/customerServicePopup.vue index 8eb3b76..d2a5d5b 100644 --- a/components/config/customerServicePopup.vue +++ b/components/config/customerServicePopup.vue @@ -7,12 +7,12 @@ {{ $t('components.confirmCallCustomerService') }}? - + - + @@ -21,13 +21,15 @@ + + \ No newline at end of file diff --git a/components/user/productList.vue b/components/user/productList.vue index aa97e4a..6f898b2 100644 --- a/components/user/productList.vue +++ b/components/user/productList.vue @@ -1,40 +1,88 @@ + \ No newline at end of file diff --git a/components/user/visualization.vue b/components/user/visualization.vue new file mode 100644 index 0000000..8f95aac --- /dev/null +++ b/components/user/visualization.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/pages.json b/pages.json index 4dc320b..faace44 100644 --- a/pages.json +++ b/pages.json @@ -39,9 +39,7 @@ }, "subPackages": [{ "root": "pages_order", - "pages": [{ - "path": "order/orderDetail" - }, + "pages": [ { "path": "auth/selectionIdentity" }, diff --git a/pages/index/center2.vue b/pages/index/center2.vue index 88dcc88..72c53a9 100644 --- a/pages/index/center2.vue +++ b/pages/index/center2.vue @@ -94,7 +94,15 @@ data() { return { // 供应商 - supplierList: [{ + supplierList: [ + { + text: `${this.$t('other.Myorder')}`, + englishText: 'Myorder', + value: ">", + imgUrl: '/static/image/center/14.svg', + toPathUrl: '/pages_order/order/myOrders' + }, + { text: `${this.$t('pageTitle.myOrders')}`, englishText: 'myOrders', value: ">", diff --git a/pages/index/index.vue b/pages/index/index.vue index fef758f..634b5d9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,7 +4,6 @@ - @@ -18,6 +17,8 @@ + + @@ -39,17 +40,16 @@ import topbar from '@/components/base/topbar.vue' import tabber from '@/components/base/tabbar.vue' import productList from '@/components/user/productList.vue' - import { - mapGetters - } from 'vuex' + import { mapGetters } from 'vuex' import changeLanguage from '@/components/base/changeLanguage.vue' - + import visualization from '@/components/user/visualization.vue' export default { components: { tabber, topbar, productList, - changeLanguage + changeLanguage, + visualization, }, data() { return { diff --git a/pages/index/tradingPlatform.vue b/pages/index/tradingPlatform.vue index 26b0803..91903d2 100644 --- a/pages/index/tradingPlatform.vue +++ b/pages/index/tradingPlatform.vue @@ -8,37 +8,58 @@ -
+ + + - + + {{ item.name }} - + --> - + {{ item.name }} - + + + + + + + + + + + + @@ -53,6 +74,7 @@ import OrderList from "@/pages_order/components/order/orderList.vue"; import mixinList from '@/mixins/list.js' import * as echarts from 'echarts'; + import visualization from '@/components/user/visualization.vue' export default { mixins: [mixinList], @@ -61,6 +83,7 @@ ProductList, topbar, tabber, + visualization, }, computed: { ...mapGetters(['userShop']), @@ -71,12 +94,13 @@ mixinsListApi: 'getMyProductlist', type: [ { - name: this.$t('other.futuresTrading') + name: '国内现货' }, { - name: this.$t('other.spotTrading') + name: '国外现货' }, ], + vedioUrl : '', chartData: [ // {date: "08/16", value: 10}, // {date: "08/17", value: 15}, @@ -97,7 +121,7 @@ onLoad() { if (this.userShop) { // 交易平台挂单列表 - this.mixinsListApi = 'productlist' + this.mixinsListApi = 'productList' //'productlist' } else { // 现货/期货列表 this.mixinsListApi = 'productList' @@ -111,7 +135,7 @@ // }) }, onShow() { - this.getAlPrice() + // this.getAlPrice() }, methods: { @@ -227,6 +251,23 @@ this.queryParams.productType = this.actionIndex this.getData() }, + + previewVideo(data){ + + if(data.urls.length > 1){ + uni.showActionSheet({ + itemList: data.urls.map((n, i) => i), + success : e => { + this.vedioUrl = data.urls[e.tapIndex] + this.$refs.previewVideoPopup.open(); + } + }) + }else{ + this.vedioUrl = data.urls[data.index] + this.$refs.previewVideoPopup.open(); + } + + }, } } @@ -312,9 +353,19 @@ .productList { margin-top: 20rpx; // height: 60vh; - overflow: auto; + // overflow: auto; } } } + + .closexxxxx{ + background-color: #00000055; + padding: 30rpx; + position: fixed; + top: 30rpx; + right: 30rpx; + border-radius: 50%; + z-index: 99999999; + } } \ No newline at end of file diff --git a/pages_order/center/systemSet.vue b/pages_order/center/systemSet.vue index c71a5a9..0e4f9d6 100644 --- a/pages_order/center/systemSet.vue +++ b/pages_order/center/systemSet.vue @@ -101,12 +101,12 @@ rightIcon: ">", toUrl: '/pages_order/auth/selectionIdentity' }, - { - leftIcon: "../../static/image/center/4.svg", - text: this.$t('pageTitle.addressList'), - rightIcon: ">", - toUrl: '/pages_order/center/addressListManage' - }, + // { + // leftIcon: "../../static/image/center/4.svg", + // text: this.$t('pageTitle.addressList'), + // rightIcon: ">", + // toUrl: '/pages_order/center/addressListManage' + // }, ] } ], diff --git a/pages_order/components/order/myOrderList.vue b/pages_order/components/order/myOrderList.vue index 121bd06..1ef66e9 100644 --- a/pages_order/components/order/myOrderList.vue +++ b/pages_order/components/order/myOrderList.vue @@ -139,7 +139,7 @@ display: flex; flex-direction: column; gap: 20rpx; - height: calc(90vh - 180rpx); + // height: calc(90vh - 180rpx); .content { position: relative; diff --git a/pages_order/components/order/orderList.vue b/pages_order/components/order/orderList.vue index 1c587c1..6d3765b 100644 --- a/pages_order/components/order/orderList.vue +++ b/pages_order/components/order/orderList.vue @@ -1,9 +1,12 @@ @@ -244,7 +287,6 @@ if(options.type = 'edit'){ - this.form = this.$store.state.orderDetail // 商品主图 @@ -291,12 +333,16 @@ "addressId": "", "num": 1, "price": '', - "transactionTime": dayjs(new Date()).format("YYYY-MM-DD") + "transactionTime": dayjs(new Date()).format("YYYY-MM-DD"), + productType : 0, }, address: { name: '请选择地址', addressDetail: '', + phone : '', + address : '', }, + addressList : [], addressTotal: 0, fileList : [],//商品主图 reportFileList : [],//检测报告 @@ -308,11 +354,17 @@ specsName : '请选择规格' }, type : '', + productType : [ + '国内现货', + '国外现货', + ], } }, onShow() { this.getUnitList() - this.getAddressDefault() + // this.getAddressDefault() + this.confAddressList() + console.log(this.form); }, methods: { //获取默认地址 @@ -328,6 +380,25 @@ }) }) }, + //查询仓库地址 + confAddressList() { + return new Promise((success, fail) => { + this.$api('confAddressList', { + pageNo: 1, + pageSize: 9999, + }, res => { + if (res.code == 200) { + + res.result.records.forEach(n => { + n.addressText = n.address + n.addressDetail + // n.addressText = n.name + n.phone + n.address + n.addressDetail + }) + + this.addressList = res.result.records; + } + }) + }) + }, // 查询规格 getUnitList(){ @@ -397,6 +468,13 @@ return } + if(this.form.productType != 0 && !productType){ + uni.showToast({ + title: '请选择商品类型' + }) + return + } + let api = 'addProduct' if(this.type == 'edit'){ @@ -422,6 +500,9 @@ unitListConfirm(e){ this.unit = e.value[0] }, + addressListConfirm(e){ + this.address = e.value[0] + }, openAddress() { this.$refs.addressPopup.open('bottom') @@ -481,6 +562,11 @@ deleteImage(e) { this[e.name].splice(e.index, 1) }, + productTypeConfirm(e){ + console.log(e); + this.form.productType = e.indexs[0] + this.$forceUpdate() + }, }, } diff --git a/pages_order/order/orderDetail.vue b/pages_order/order/orderDetail.vue deleted file mode 100644 index 8ca27b7..0000000 --- a/pages_order/order/orderDetail.vue +++ /dev/null @@ -1,567 +0,0 @@ - - - - - diff --git a/pages_order/order/orderDetail2.vue b/pages_order/order/orderDetail2.vue index 65f32a7..2a1b32d 100644 --- a/pages_order/order/orderDetail2.vue +++ b/pages_order/order/orderDetail2.vue @@ -15,49 +15,110 @@ - {{ $t('other.aluminumProducts') }} + + {{ orderInfo.specsName }} - + - {{ $t('other.pickupDate') }}:{{ orderInfo.takeTime }} + 交货时间:{{ orderInfo.transactionTime }} + + + + + 商品信息 + + + + + 商品图片 + + + + + + + + 商品视频 + + + + + + + + + + + + 检测报告 + + + + + + + + 检测视频 + + + + + + + + + + + - {{ $t('components.shippingAddress') }} + + 提货地址 - + - {{ orderInfo.userName }}    {{ orderInfo.phone }} {{ orderInfo.address }} - + - {{ $t('components.orderInfo') }} + + 挂单信息 - {{ $t('components.orderNumber') }} + + 挂单编号 {{ orderInfo.id }} @@ -65,7 +126,8 @@ - {{ $t('components.orderTime') }} + + 挂单时间 {{ orderInfo.createTime }} @@ -74,25 +136,26 @@ - + + 1. 请您在收货时间前15分钟内到货,否则将视为放弃挂单。 2. 请您在收货地址提供的手机号码收到货物 - + --> - + {{ $t('components.contactCustomerService') }} @@ -112,14 +175,11 @@ customerServicePopup }, onLoad(options) { - if (options.orderInfo) { - this.orderInfo = JSON.parse(decodeURIComponent(options.orderInfo)); - console.log(this.orderInfo, "解析后的订单数据"); // 解析后的订单数据 - } + this.orderInfo = this.$store.state.orderDetail }, data() { return { - orderInfo: {} + orderInfo: {}, } }, methods: { @@ -141,7 +201,7 @@ success(e) { if (e.confirm) { self.$api('noShow', { - id + id : self.orderInfo.id }, res => { if (res.code == 200) { uni.showToast({ @@ -164,6 +224,16 @@