Browse Source

优化一键签收逻辑

fix_bug_pro20231227
13208366016 1 year ago
parent
commit
8dc19f2411
  1. 84
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

84
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -416,15 +416,15 @@
</el-dialog>
<el-dialog :title="signtitle" v-model="signBox" width="45%" append-to-body>
<avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform">
</avue-form>
<div style="bottom: 7%; margin-left: 500px; width: 50%">
<!-- <avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform">
</avue-form> -->
<!-- <div style="bottom: 7%; margin-left: 500px; width: 50%">
<div style="width: 100%">
<el-button @click="cancellation">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</div>
<div>------------------------------</div>
<div>------------------------------</div> -->
<div class="TcFrom">
<el-form :model="TcForm" label-width="120px">
<el-form-item label="收货人姓名">
@ -540,7 +540,7 @@
</el-dialog>
</div>
<div class="tj-ttn">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button type="primary" @click="submitForm" :disabled="TCloading">确定</el-button>
<el-button type="primary" @click="cancellation">取消</el-button>
</div>
</div>
@ -587,6 +587,7 @@ export default {
dialogVisibleE: false,
deliveryId: null,
Routid: null,
TCloading: false, //
TcForm: {}, //
//
DoorstepPhoto: [],
@ -2859,54 +2860,35 @@ export default {
return;
}
this.DoorstepPhoto.forEach(item => {
row.map['photo_1'].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: 'photo_1',
urlRoute: item.response.data.link,
});
});
this.StackingPhoto.forEach(item => {
row.map['photo_2'].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: 'photo_2',
urlRoute: item.response.data.link,
});
});
this.FragilePhotos.forEach(item => {
row.map['photo_3'].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: 'photo_3',
urlRoute: item.response.data.link,
});
});
this.HomePhotos.forEach(item => {
row.map['photo_4'].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: 'photo_4',
urlRoute: item.response.data.link,
});
});
this.SignForPhotos.forEach(item => {
row.map['photo_5'].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: 'photo_5',
urlRoute: item.response.data.link,
const pushPhotoToRow = (photoArray, photoType) => {
photoArray.forEach(item => {
row.map[photoType].push({
name: item.response.data.originalName,
reservationId: this.reservationId,
type: photoType,
urlRoute: item.response.data.link,
});
});
});
};
pushPhotoToRow(this.DoorstepPhoto, 'photo_1');
pushPhotoToRow(this.StackingPhoto, 'photo_2');
pushPhotoToRow(this.FragilePhotos, 'photo_3');
pushPhotoToRow(this.HomePhotos, 'photo_4');
pushPhotoToRow(this.SignForPhotos, 'photo_5');
console.log(row, '准备提交的参数');
this.TCloading = true; //
this.signBox = false;
getOneclickq(row).then(res => {
console.log(res, '上传成功后的返回值');
if (res.data.code == 200) {
this.TCloading = false; //
ElMessage({
message: '操作成功',
type: 'success',
});
} else {
ElMessage.error('操作失败');
}
});
//
@ -3182,9 +3164,9 @@ export default {
const data = decodeURIComponent(this.$route.query.data);
this.deliverydata = JSON.parse(data);
console.log(this.Routid,this.Routid,'存储的ID=====================WDWADAWD');
console.log(this.Routid, this.Routid, '存储的ID=====================WDWADAWD');
console.log('data>>>>>>>>', this.deliverydata);
this.deliveryId=this.deliverydata.id;//ID
this.deliveryId = this.deliverydata.id; //ID
this.loading = true;
let id = this.deliverydata.id;
getDetail(id).then(res => {

Loading…
Cancel
Save