|
|
|
@ -133,12 +133,16 @@
|
|
|
|
|
@click="viewAbnormalLoading(slotProps.scope)" |
|
|
|
|
>异 常 审 核</el-text |
|
|
|
|
> |
|
|
|
|
<!-- v-if=" |
|
|
|
|
slotProps.scope.row.sijiSigningStatus == '司机已签收' && |
|
|
|
|
slotProps.scope.row.wenyuanSigningStatus == '文员待审核' |
|
|
|
|
" --> |
|
|
|
|
<el-text |
|
|
|
|
size="small" |
|
|
|
|
v-if=" |
|
|
|
|
slotProps.scope.row.sijiSigningStatus == '司机已签收' && |
|
|
|
|
slotProps.scope.row.wenyuanSigningStatus == '文员待审核' |
|
|
|
|
" |
|
|
|
|
size="small" |
|
|
|
|
@click="handleSign(slotProps.scope.row)" |
|
|
|
|
>复 核</el-text |
|
|
|
|
> |
|
|
|
@ -244,28 +248,23 @@
|
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog :title="'签收'" 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: 250px; width: 50%"> |
|
|
|
|
<div style="width: 100%"> |
|
|
|
|
<el-button type="primary" @click="submitForm" style="margin-right: 40%">确定</el-button> |
|
|
|
|
<el-button type="primary" @click="cancellation">取消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<span>-------------------------------------------------------------------------------</span> |
|
|
|
|
<el-dialog :title="'签收'" v-model="signBox" width="60%" append-to-body> |
|
|
|
|
<!-- <avue-form :option="signoption" v-model="signform" :data="signdata" ref="signform"> |
|
|
|
|
</avue-form> --> |
|
|
|
|
|
|
|
|
|
<!-- <span>-------------------------------------------------------------------------------</span> --> |
|
|
|
|
<div class="TcFrom"> |
|
|
|
|
<el-form :model="TcForm" label-width="120px"> |
|
|
|
|
<el-form-item label="收货人姓名"> |
|
|
|
|
<el-input disabled v-model="TcForm.consignee" /> |
|
|
|
|
<el-input disabled v-model="TcForm.consignee" placeholder="暂无收货人姓名" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="收货人电话"> |
|
|
|
|
<el-input disabled v-model="TcForm.deliveryPhone" /> |
|
|
|
|
<el-input disabled v-model="TcForm.deliveryPhone" placeholder="暂无收货人电话" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="收货人地址"> |
|
|
|
|
<el-input disabled v-model="TcForm.deliveryAddress" /> |
|
|
|
|
<el-input disabled v-model="TcForm.deliveryAddress" placeholder="暂无收货人地址" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="签收人类型"> |
|
|
|
@ -276,17 +275,19 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="备注"> |
|
|
|
|
<el-input v-model="TcForm.clerkSignRemarks" /> |
|
|
|
|
<el-input v-model="TcForm.clerkSignRemarks" placeholder="暂无备注" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div class="imgName"> |
|
|
|
|
<span>上门照</span> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="DoorstepPhoto" |
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
|
|
|
|
:action="doubledCount" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="ImgSuccessA" |
|
|
|
|
:headers="headers" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
@ -299,10 +300,12 @@
|
|
|
|
|
<span>堆码照</span> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="StackingPhoto" |
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
|
|
|
|
:action="doubledCount" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="ImgSuccessB" |
|
|
|
|
:headers="headers" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
@ -315,10 +318,12 @@
|
|
|
|
|
<span>易碎照</span> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="FragilePhotos" |
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
|
|
|
|
:action="doubledCount" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="ImgSuccessC" |
|
|
|
|
:headers="headers" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
@ -331,10 +336,12 @@
|
|
|
|
|
<span>家配照</span> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="HomePhotos" |
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
|
|
|
|
:action="doubledCount" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="ImgSuccessD" |
|
|
|
|
:headers="headers" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
@ -347,10 +354,12 @@
|
|
|
|
|
<span>签收照</span> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="SignForPhotos" |
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
|
|
|
|
:action="doubledCount" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
:on-preview="handlePictureCardPreview" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:on-success="ImgSuccessE" |
|
|
|
|
:headers="headers" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
@ -358,6 +367,13 @@
|
|
|
|
|
<img w-full :src="dialogImageUrl" alt="IMG" /> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div style="bottom: 7%; margin-left: 250px; width: 50%"> |
|
|
|
|
<div style="width: 100%"> |
|
|
|
|
<el-button type="primary" @click="submitForm" style="margin-right: 40%">确定</el-button> |
|
|
|
|
<el-button type="primary" @click="cancellation">取消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -457,7 +473,7 @@ import option from '@/option/distribution/distributionSignfor';
|
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
|
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -474,7 +490,7 @@ export default {
|
|
|
|
|
HomePhotos: [], |
|
|
|
|
// 签收照 |
|
|
|
|
SignForPhotos: [], |
|
|
|
|
|
|
|
|
|
reservationId: null, //当前行的ID |
|
|
|
|
columnList: [ |
|
|
|
|
// { |
|
|
|
|
// prop: '', |
|
|
|
@ -1347,6 +1363,14 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
return ids.join(','); |
|
|
|
|
}, |
|
|
|
|
// 图片上传接口 |
|
|
|
|
doubledCount() { |
|
|
|
|
return '/api/blade-resource/oss/endpoint/put-file'; |
|
|
|
|
}, |
|
|
|
|
// 图片上传必须携带TOKEN |
|
|
|
|
headers() { |
|
|
|
|
return { 'Blade-Auth': 'Bearer ' + getToken() }; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
showdrawer(value) { |
|
|
|
@ -1363,6 +1387,41 @@ export default {
|
|
|
|
|
console.log('执行了2回调'); |
|
|
|
|
dialogVisible.value = true; |
|
|
|
|
}, |
|
|
|
|
photo(name, data) { |
|
|
|
|
if (response.success == true) { |
|
|
|
|
console.log(response, '图片上传成功'); |
|
|
|
|
this.name[this.name.length - 1].url = data.data.link; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 通用的图片上传成功处理函数 |
|
|
|
|
handleImageUploadSuccess(response, uploadFile, photoArray) { |
|
|
|
|
if (response.success === true) { |
|
|
|
|
console.log(response, '图片上传成功'); |
|
|
|
|
this.$set(photoArray, photoArray.length - 1, { url: response.data.link }); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 上门照图片上传成功 |
|
|
|
|
ImgSuccessA(response, uploadFile) { |
|
|
|
|
this.handleImageUploadSuccess(response, uploadFile, this.DoorstepPhoto); |
|
|
|
|
}, |
|
|
|
|
// 堆门图片上传成功 |
|
|
|
|
ImgSuccessB(response, uploadFile) { |
|
|
|
|
this.handleImageUploadSuccess(response, uploadFile, this.StackingPhoto); |
|
|
|
|
}, |
|
|
|
|
// 易碎图片上传成功 |
|
|
|
|
ImgSuccessC(response, uploadFile) { |
|
|
|
|
this.handleImageUploadSuccess(response, uploadFile, this.FragilePhotos); |
|
|
|
|
}, |
|
|
|
|
// 家配图片上传成功 |
|
|
|
|
ImgSuccessD(response, uploadFile) { |
|
|
|
|
this.handleImageUploadSuccess(response, uploadFile, this.HomePhotos); |
|
|
|
|
}, |
|
|
|
|
// 签收图片上传成功 |
|
|
|
|
ImgSuccessE(response, uploadFile) { |
|
|
|
|
this.handleImageUploadSuccess(response, uploadFile, this.SignForPhotos); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 弹窗的勾选回调,用于更改头部数组 |
|
|
|
|
* 固定搭配,只需要更换 columnList |
|
|
|
@ -1387,31 +1446,114 @@ export default {
|
|
|
|
|
//签收 |
|
|
|
|
submitForm() { |
|
|
|
|
// this.isDis = true; |
|
|
|
|
console.log(this.$refs.signform.validate, 'this.$refs.signform'); |
|
|
|
|
// let row = {}; |
|
|
|
|
// row.id = this.signform.id; |
|
|
|
|
// row.clerkSignPictures = this.signform.clerkSignPictures; |
|
|
|
|
// row.clerkSignRemarks = this.signform.clerkSignRemarks; |
|
|
|
|
// console.log(row, '要提交的数据'); |
|
|
|
|
this.$refs.signform.validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
let row = {}; |
|
|
|
|
|
|
|
|
|
row.map = { |
|
|
|
|
photo_1: [], |
|
|
|
|
photo_2: [], |
|
|
|
|
photo_3: [], |
|
|
|
|
photo_4: [], |
|
|
|
|
photo_5: [], |
|
|
|
|
}; |
|
|
|
|
// 提交图片处理 |
|
|
|
|
//最后提交 |
|
|
|
|
row.id = this.signform.id; |
|
|
|
|
row.reservationId = this.reservationId; |
|
|
|
|
row.clerkSignPictures = this.signform.clerkSignPictures; |
|
|
|
|
row.clerkSignRemarks = this.signform.clerkSignRemarks; |
|
|
|
|
row.signingStatus = '2'; |
|
|
|
|
// if (!!row.id){ |
|
|
|
|
updatesign(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
row.clerkSignRemarks = this.TcForm.clerkSignRemarks;//备注 |
|
|
|
|
row.signingStatus = '2';//状态 |
|
|
|
|
// 本身图片处理开始 |
|
|
|
|
const photoMap = { |
|
|
|
|
photo_1: 'photo_1', |
|
|
|
|
photo_2: 'photo_2', |
|
|
|
|
photo_3: 'photo_3', |
|
|
|
|
photo_4: 'photo_4', |
|
|
|
|
photo_5: 'photo_5', |
|
|
|
|
}; |
|
|
|
|
this.TcForm.printVOList.forEach(item => { |
|
|
|
|
const type = item.type; |
|
|
|
|
if (photoMap.hasOwnProperty(type)) { |
|
|
|
|
const photoProperty = photoMap[type]; |
|
|
|
|
row.map[photoProperty].push({ |
|
|
|
|
name: item.name, |
|
|
|
|
reservationId: this.reservationId, |
|
|
|
|
type: type, |
|
|
|
|
urlRoute: item.urlRoute, |
|
|
|
|
}); |
|
|
|
|
this.signBox = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
console.log(error); |
|
|
|
|
this.signBox = false; |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
// 本身图片处理结束 |
|
|
|
|
|
|
|
|
|
// 上传图片处理开始 |
|
|
|
|
function generatePhotoArray(photoType, photoItems, reservationId) { |
|
|
|
|
const photoArray = []; |
|
|
|
|
photoItems.forEach(item => { |
|
|
|
|
photoArray.push({ |
|
|
|
|
name: item.name, |
|
|
|
|
reservationId: reservationId, |
|
|
|
|
type: photoType, |
|
|
|
|
urlRoute: item.url, |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
return photoArray; |
|
|
|
|
} |
|
|
|
|
row.map.photo_1 = generatePhotoArray('photo_1', this.DoorstepPhoto, this.reservationId); |
|
|
|
|
row.map.photo_2 = generatePhotoArray('photo_2', this.StackingPhoto, this.reservationId); |
|
|
|
|
row.map.photo_3 = generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId); |
|
|
|
|
row.map.photo_4 = generatePhotoArray('photo_4', this.HomePhotos, this.reservationId); |
|
|
|
|
row.map.photo_5 = generatePhotoArray('photo_5', this.SignForPhotos, this.reservationId); |
|
|
|
|
// 上传图片处理结束 |
|
|
|
|
// 图片去重 |
|
|
|
|
this.deduplicateByIdAndUpdate(row.map.photo_1); |
|
|
|
|
this.deduplicateByIdAndUpdate(row.map.photo_2); |
|
|
|
|
this.deduplicateByIdAndUpdate(row.map.photo_3); |
|
|
|
|
this.deduplicateByIdAndUpdate(row.map.photo_4); |
|
|
|
|
this.deduplicateByIdAndUpdate(row.map.photo_5); |
|
|
|
|
console.log(row, '要提交的参数'); |
|
|
|
|
// 提交 |
|
|
|
|
// updatesign(row).then(res => { |
|
|
|
|
// console.log(res, '提交之后返回的参数'); |
|
|
|
|
// }); |
|
|
|
|
// if (!!row.id){ |
|
|
|
|
// updatesign(row).then( |
|
|
|
|
// () => { |
|
|
|
|
// console.log(row, '要提交的值'); |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
// this.signBox = false; |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// }, |
|
|
|
|
// error => { |
|
|
|
|
// console.log(error); |
|
|
|
|
// this.signBox = false; |
|
|
|
|
// } |
|
|
|
|
// ); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
deduplicateByIdAndUpdate(val) { |
|
|
|
|
const result = val.filter((item, index, array) => { |
|
|
|
|
// 通过 some 方法检查当前元素之前是否已经出现过相同的ID |
|
|
|
|
return !array.slice(0, index).some(prevItem => prevItem.urlRoute === item.urlRoute); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 清空传入的值 |
|
|
|
|
val.length = 0; |
|
|
|
|
// 将去重后的参数重新赋值给传入的值 |
|
|
|
|
result.forEach(item => { |
|
|
|
|
val.push(item); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
selectionsc(value) { |
|
|
|
|
console.log(value); |
|
|
|
|
}, |
|
|
|
@ -1459,6 +1601,7 @@ export default {
|
|
|
|
|
console.log('签收>>>>>>>>>>', row); |
|
|
|
|
// this.title = '查看'; |
|
|
|
|
// this.view = true; |
|
|
|
|
this.reservationId = row.reservationId; //存储当前行的ID |
|
|
|
|
this.signform = row; |
|
|
|
|
this.signBox = true; |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|