diff --git a/api/api.js b/api/api.js index 8e6bbf1..1c70951 100644 --- a/api/api.js +++ b/api/api.js @@ -99,6 +99,13 @@ const config = { limit: 1500, showLoading: true, }, + // 修改产品报价 + updateProduct: { + url: '/product/updateProduct', + method: 'POST', + limit: 1500, + showLoading: true, + }, // 下订单 addProductOrder: { url: '/product/addProductOrder', diff --git a/pages_order/components/order/orderList.vue b/pages_order/components/order/orderList.vue index 71a1e84..ce92a4e 100644 --- a/pages_order/components/order/orderList.vue +++ b/pages_order/components/order/orderList.vue @@ -49,10 +49,20 @@ - - + + + + {{ $t('other.withdrawOrder') }} + + + + 重新申请 + @@ -80,17 +90,16 @@ return {} }, methods: { - // 查看详情 lookDetail(item, index) { // 交易平台的列表只用于展示,有撤单的说明是我的挂单,则可以查看详情 if (this.showBackOrder && item.showStatus == 0) { + + this.$store.state.orderDetail = item + // uni.navigateTo({ - // url: `/pages_order/order/orderDetail2?id`+item.id - // }) - uni.navigateTo({ - url: `/pages_order/order/myOrderDetail?orderInfo=${encodeURIComponent(JSON.stringify(item))}` - }); + // url: `/pages_order/order/myOrderDetail` + // }); } }, @@ -117,6 +126,14 @@ } }) }, + + // 编辑报价并且重新提交 + toEdit(item){ + this.$store.state.orderDetail = item + uni.navigateTo({ + url: `/pages_order/order/offerOrBillLading?type=edit` + }); + }, } } diff --git a/pages_order/order/offerOrBillLading.vue b/pages_order/order/offerOrBillLading.vue index c45818e..008f3bd 100644 --- a/pages_order/order/offerOrBillLading.vue +++ b/pages_order/order/offerOrBillLading.vue @@ -86,7 +86,7 @@ - {{ address.name + '' + address.phone }} + {{ address.name + address.phone + address.address + address.addressDetail }} @@ -168,6 +168,7 @@ :previewFullImage="true"> + 检测视频 @@ -238,7 +239,45 @@ topbar }, onLoad(options) { - this.titleIndex = options.titleIndex; + this.titleIndex = options.titleIndex || 0;//默认供应商报价 + this.type = options.type + + if(options.type = 'edit'){ + + + this.form = this.$store.state.orderDetail + + // 商品主图 + this.fileList = this.form.pic ? this.form.pic.split(',').map(url => { + return { + url + } + }) : [] + // 检测报告 + this.reportFileList = this.form.report ? this.form.report.split(',').map(url => { + return { + url + } + }) : [] + // 检测视频 + this.reportFileVideoList = this.form.reportVideo ? this.form.reportVideo.split(',').map(url => { + return { + url + } + }) : [] + // 商品内容-详情图片 + this.contentFileList = this.form.picDetail ? this.form.picDetail.split(',').map(url => { + return { + url + } + }) : [] + // 商品内容-详情视频 + this.contentFileVideoList = this.form.video ? this.form.video.split(',').map(url => { + return { + url + } + }) : [] + } }, data() { return { @@ -268,14 +307,13 @@ unit : {//选中的规格 specsName : '请选择规格' }, + type : '', } }, onShow() { this.getUnitList() this.getAddressDefault() }, - onLoad() { - }, methods: { //获取默认地址 getAddressDefault() { @@ -299,6 +337,14 @@ }, res => { if(res.code == 200){ this.unitList = [res.result.records] + + if(this.type == 'edit'){ + res.result.records.forEach(n => { + if(n.id == this.form.specsId){ + this.unit = n + } + }) + } } }) }, @@ -350,8 +396,14 @@ })) { return } + + let api = 'addProduct' + + if(this.type == 'edit'){ + api = 'updateProduct' + } - this.$api('addProduct', this.form, res => { + this.$api(api, this.form, res => { if (res.code == 200) { uni.showToast({ title: '提交成功', @@ -470,7 +522,7 @@ display: flex; align-items: center; background-color: #FFF; - height: 80rpx; + // height: 80rpx; .title { display: flex; @@ -490,14 +542,15 @@ width: 30rpx; height: 30rpx; margin: 10rpx; + flex-shrink: 0; } view { //margin: 20rpx; - overflow: hidden; //超出的文本隐藏 - text-overflow: ellipsis; //溢出用省略号显示 - white-space: nowrap; //溢出不换行 + // overflow: hidden; //超出的文本隐藏 + // text-overflow: ellipsis; //溢出用省略号显示 + // white-space: nowrap; //溢出不换行 } .icon {