Browse Source

上传

master
前端-胡立永 4 months ago
parent
commit
a3e91dcb8c
6 changed files with 74 additions and 35 deletions
  1. +9
    -0
      api/api.js
  2. +2
    -2
      mixins/order.js
  3. +1
    -1
      pages/index/order.vue
  4. +1
    -0
      pages_order/components/product/submitUnitSelect.vue
  5. +60
    -31
      pages_order/order/damageReport.vue
  6. +1
    -1
      pages_order/order/orderDetail.vue

+ 9
- 0
api/api.js View File

@ -267,6 +267,15 @@ const config = {
limit: 500, limit: 500,
auth: true, auth: true,
}, },
// 订单详情列表
detailList: {
// order/detail/list
url: '/order/detail/list',
method: 'GET',
showLoading : true,
limit: 500,
auth: true,
},
// 根据商品id获取规格 // 根据商品id获取规格
goodsSku: { goodsSku: {
url: '/goods/sku', url: '/goods/sku',


+ 2
- 2
mixins/order.js View File

@ -4,10 +4,10 @@ export default {
methods: { methods: {
// 酒店支付订单 // 酒店支付订单
payOrder(id, orderId, replacePay){ payOrder(id, orderId, replacePay){
console.log(id, orderId);
let self = this let self = this
this.$api(replacePay ? 'replacePay' : 'orderPay', { this.$api(replacePay ? 'replacePay' : 'orderPay', {
id,
orderId
id : replacePay ? orderId : id,
}, res => { }, res => {
if (res.code == 200) { if (res.code == 200) {
uni.requestPayment({ uni.requestPayment({


+ 1
- 1
pages/index/order.vue View File

@ -103,7 +103,7 @@
<template v-if="item.status == 5"> <template v-if="item.status == 5">
<view @click.stop="orderConfirmedDamage(item, 1)" class="b2" <view @click.stop="orderConfirmedDamage(item, 1)" class="b2"
> >
确认无破损
确认下一步
</view> </view>
<!-- <view @click.stop="$utils.navigateTo <!-- <view @click.stop="$utils.navigateTo


+ 1
- 0
pages_order/components/product/submitUnitSelect.vue View File

@ -231,6 +231,7 @@
this.$api('cartAdd', { this.$api('cartAdd', {
id: this.detail.id, id: this.detail.id,
skuId: this.unit.id, skuId: this.unit.id,
num : this.num,
}, res => { }, res => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({


+ 60
- 31
pages_order/order/damageReport.vue View File

@ -3,42 +3,55 @@
<view class="help"> <view class="help">
<navbar title="破损上报" leftClick @leftClick="$utils.navigateBack" /> <navbar title="破损上报" leftClick @leftClick="$utils.navigateBack" />
<view class="flex">
<view class="server-item"
v-for="(p, i) in order.orderDetails"
:key="i">
<view class="img-box">
<image :src="p.pic" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
产品名称{{p.goodsName}}
<uv-radio-group
@change="change"
v-model="form.orderDetailId">
<view class="flex">
<view class="server-item"
v-for="(p, i) in list"
:key="i">
<view class="radio">
<uv-radio :name="p.id"
:disabled="!!p.status"
activeColor="#FA5A0A" size="40rpx"
icon-size="35rpx"></uv-radio>
</view> </view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{p.sku}}</view>
<view class="img-box">
<image :src="p.pic" mode="aspectFill"></image>
</view> </view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">数量{{p.num}}</view>
<view class="server-info">
<view class="server-title">
产品名称{{p.goodsName}}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{p.sku}}</view>
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">数量{{p.num}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view>
</uv-radio-group>
<!-- <view class="type">
<view class="type">
<span>破损数量</span> <span>破损数量</span>
<span> <span>
<uv-number-box <uv-number-box
v-model="form.num" :min="1" v-model="form.num" :min="1"
:max="order.num"></uv-number-box>
:max="max"></uv-number-box>
</span> </span>
</view> -->
</view>
<view class="help-box"> <view class="help-box">
<view> <view>
@ -81,11 +94,13 @@
return { return {
fileList: [], fileList: [],
form : { form : {
orderDetailId : 0,
num : 1, num : 1,
info : '', info : '',
}, },
order: {},
list: {},
orderId: 0, orderId: 0,
max : 1,
} }
}, },
onLoad(agrs) { onLoad(agrs) {
@ -95,6 +110,13 @@
this.getData() this.getData()
}, },
methods: { methods: {
change(e){
this.list.forEach(n => {
if(n.id == e){
this.max = n.num
}
})
},
deleteImage(e){ deleteImage(e){
this.fileList.splice(e.index, 1) this.fileList.splice(e.index, 1)
}, },
@ -110,24 +132,25 @@
}, },
// //
getData() { getData() {
this.$api('orderOne', {
this.$api('detailList', {
id: this.orderId id: this.orderId
}, res => { }, res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if (res.code == 200) { if (res.code == 200) {
this.order = res.result
this.list = res.result
} }
}) })
}, },
submit(){ submit(){
this.form.pic = this.fileList.map(item=>item.url).join(",") this.form.pic = this.fileList.map(item=>item.url).join(",")
if (this.$utils.verificationAll(this.form, { if (this.$utils.verificationAll(this.form, {
orderDetailId : '请选择产品',
info: '请输入破损的细节部位', info: '请输入破损的细节部位',
pic: '请上传图片', pic: '请上传图片',
})) { })) {
return return
} }
this.orderConfirmedDamage(this.order, 2, this.form,
this.orderConfirmedDamage({id : this.orderId}, 2, this.form,
() => { () => {
uni.redirectTo({ uni.redirectTo({
url:'/pages/index/order' url:'/pages/index/order'
@ -144,12 +167,19 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: space-between;
background: white; background: white;
border-radius: 15rpx; border-radius: 15rpx;
box-sizing: border-box; box-sizing: border-box;
margin: 30rpx; margin: 30rpx;
width: 690rpx; width: 690rpx;
.radio{
width: 100rpx;
height: 180rpx;
display: flex;
justify-content: center;
align-items: center;
}
.img-box { .img-box {
width: 180rpx; width: 180rpx;
@ -167,7 +197,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box; box-sizing: border-box;
padding: 10rpx 15rpx; padding: 10rpx 15rpx;


+ 1
- 1
pages_order/order/orderDetail.vue View File

@ -39,7 +39,7 @@
<template v-if="order.status == 5"> <template v-if="order.status == 5">
<view @click.stop="orderConfirmedDamage(order, 1)" <view @click.stop="orderConfirmedDamage(order, 1)"
> >
确认无破损
确认下一步
</view> </view>
<view @click.stop="$utils.navigateTo <view @click.stop="$utils.navigateTo


Loading…
Cancel
Save