Browse Source

对接登录

master
前端-胡立永 6 months ago
parent
commit
28ee682bb3
3 changed files with 94 additions and 17 deletions
  1. +7
    -0
      api/api.js
  2. +25
    -8
      pages_order/components/order/orderList.vue
  3. +62
    -9
      pages_order/order/offerOrBillLading.vue

+ 7
- 0
api/api.js View File

@ -99,6 +99,13 @@ const config = {
limit: 1500,
showLoading: true,
},
// 修改产品报价
updateProduct: {
url: '/product/updateProduct',
method: 'POST',
limit: 1500,
showLoading: true,
},
// 下订单
addProductOrder: {
url: '/product/addProductOrder',


+ 25
- 8
pages_order/components/order/orderList.vue View File

@ -49,10 +49,20 @@
</view>
<!--撤单按钮-->
<view class="bottom" v-if="showBackOrder && item.showStatus == 0">
<view @click="backOrder(item.id)" class="btn">
<view class="bottom"
v-if="showBackOrder">
<!-- 挂单状态 0挂单 1 已撤单 2未挂单 -->
<view @click="backOrder(item.id)" class="btn"
v-if="item.showStatus == 0">
{{ $t('other.withdrawOrder') }}
</view>
<!-- 审核不通过 -->
<view @click="toEdit(item)" class="btn"
v-if="item.auditStatus == 2">
重新申请
</view>
</view>
</view>
@ -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`
});
},
}
}
</script>


+ 62
- 9
pages_order/order/offerOrBillLading.vue View File

@ -86,7 +86,7 @@
<view class="address" style="width: 70%">
<image mode="" src="/static/image/address/selectIcon.png"></image>
<view class="">
{{ address.name + '' + address.phone }}
{{ address.name + address.phone + address.address + address.addressDetail }}
</view>
<view class="icon">
<uv-icon name="arrow-right" size="30rpx"></uv-icon>
@ -168,6 +168,7 @@
:previewFullImage="true"></uv-upload>
</view>
</view>
<view class="item">
<view>检测视频</view>
<view class="">
@ -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 {


Loading…
Cancel
Save