Browse Source

fix: [SBBJ-906] pda-点检项上传图片必传校验

master
zengqinyuan 2 weeks ago
parent
commit
f0ad8cfc90
  1. 9
      src/pages/spotCheckOrder/detailAndEdit.vue

9
src/pages/spotCheckOrder/detailAndEdit.vue

@ -117,6 +117,7 @@
</view>
</view>
<view class="image-item image-item1" @click="chooseImage(item)">
<view style="color: red">*</view>
<image src="../../static/images/photo.png" mode=""></image>
</view>
</view>
@ -230,6 +231,13 @@ function submit() {
proxy.$modal.showToast('请选择班次')
return
}
console.log('subList.value', subList.value)
for (let valueElement of subList.value) {
if (!valueElement.fileInfoList || valueElement.fileInfoList.length == 0) {
proxy.$modal.showToast('点检项内容:设备部位名称为'+valueElement.equipmentPosition+' 未上传图片')
return;
}
}
const submitData = {
id: data.value.id,
@ -375,6 +383,7 @@ function chooseImage(dataItem) {
sizeType: ['compressed'], //
sourceType: ['album', 'camera'], //
success: (res) => {
console.log("上传图片",dataItem);
const filePath = res.tempFilePaths[0]
proxy.$modal.loading()
const fileInfo = ref({

Loading…
Cancel
Save