|
|
@ -3,42 +3,55 @@ |
|
|
|
<view class="help"> |
|
|
|
<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 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 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> |
|
|
|
</uv-radio-group> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <view class="type"> |
|
|
|
<view class="type"> |
|
|
|
<span>破损数量</span> |
|
|
|
<span> |
|
|
|
<uv-number-box |
|
|
|
v-model="form.num" :min="1" |
|
|
|
:max="order.num"></uv-number-box> |
|
|
|
:max="max"></uv-number-box> |
|
|
|
</span> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="help-box"> |
|
|
|
<view> |
|
|
@ -81,11 +94,13 @@ |
|
|
|
return { |
|
|
|
fileList: [], |
|
|
|
form : { |
|
|
|
orderDetailId : 0, |
|
|
|
num : 1, |
|
|
|
info : '', |
|
|
|
}, |
|
|
|
order: {}, |
|
|
|
list: {}, |
|
|
|
orderId: 0, |
|
|
|
max : 1, |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(agrs) { |
|
|
@ -95,6 +110,13 @@ |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
change(e){ |
|
|
|
this.list.forEach(n => { |
|
|
|
if(n.id == e){ |
|
|
|
this.max = n.num |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteImage(e){ |
|
|
|
this.fileList.splice(e.index, 1) |
|
|
|
}, |
|
|
@ -110,24 +132,25 @@ |
|
|
|
}, |
|
|
|
// 查询订单详情 |
|
|
|
getData() { |
|
|
|
this.$api('orderOne', { |
|
|
|
this.$api('detailList', { |
|
|
|
id: this.orderId |
|
|
|
}, res => { |
|
|
|
uni.stopPullDownRefresh() |
|
|
|
if (res.code == 200) { |
|
|
|
this.order = res.result |
|
|
|
this.list = res.result |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
submit(){ |
|
|
|
this.form.pic = this.fileList.map(item=>item.url).join(",") |
|
|
|
if (this.$utils.verificationAll(this.form, { |
|
|
|
orderDetailId : '请选择产品', |
|
|
|
info: '请输入破损的细节部位', |
|
|
|
pic: '请上传图片', |
|
|
|
})) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.orderConfirmedDamage(this.order, 2, this.form, |
|
|
|
this.orderConfirmedDamage({id : this.orderId}, 2, this.form, |
|
|
|
() => { |
|
|
|
uni.redirectTo({ |
|
|
|
url:'/pages/index/order' |
|
|
@ -144,12 +167,19 @@ |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
background: white; |
|
|
|
border-radius: 15rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
margin: 30rpx; |
|
|
|
width: 690rpx; |
|
|
|
|
|
|
|
.radio{ |
|
|
|
width: 100rpx; |
|
|
|
height: 180rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.img-box { |
|
|
|
width: 180rpx; |
|
|
@ -167,7 +197,6 @@ |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-around; |
|
|
|
width: calc(100% - 180rpx); |
|
|
|
box-sizing: border-box; |
|
|
|
padding: 10rpx 15rpx; |
|
|
|
|
|
|
|