李俊城 2 months ago
parent
commit
0b7971c428
  1. 27
      src/pages/deviceReport/addForm.vue

27
src/pages/deviceReport/addForm.vue

@ -37,18 +37,20 @@
<u-input v-model="form.factoryAreaName" <u-input v-model="form.factoryAreaName"
:placeholder="`根据${type=='DEVICE'?'设备':type == 'TECH'?'工艺' : '模具'}编码获得`" disabled /> :placeholder="`根据${type=='DEVICE'?'设备':type == 'TECH'?'工艺' : '模具'}编码获得`" disabled />
</u-form-item> </u-form-item>
<view class="image" style="margin-top: 20rpx;"> <u-form-item required>
<view class="image-list" v-if='imgList.length>0'> <view class="image" style="margin-top: 20rpx;">
<view class="image-item" v-for="(item,index) in imgList" :key="index"> <view class="image-list" v-if='imgList.length>0'>
<image :src="item" mode=""></image> <view class="image-item" v-for="(item,index) in imgList" :key="index">
<u-icon name="close-circle-fill" color="red" class="close" size="36" @click="delImage(index)"> <image :src="item" mode=""></image>
</u-icon> <u-icon name="close-circle-fill" color="red" class="close" size="36" @click="delImage(index)">
</u-icon>
</view>
</view>
<view class="image-item image-item1" @click="chooseImage" v-if='imgList.length<3'>
<image src="../../static/images/photo.png" mode=""></image>
</view> </view>
</view> </view>
<view class="image-item image-item1" @click="chooseImage" v-if='imgList.length<3'> </u-form-item>
<image src="../../static/images/photo.png" mode=""></image>
</view>
</view>
</u-form> </u-form>
<view class="footer"> <view class="footer">
<view class="btns"> <view class="btns">
@ -199,12 +201,17 @@
proxy.$modal.showToast(`请选择类型'}`) proxy.$modal.showToast(`请选择类型'}`)
return; return;
} }
if(imgList.value.length == 0){
proxy.$modal.showToast(`请上传图片`)
return;
}
const data = { const data = {
describes: form.value.describes, describes: form.value.describes,
deviceNumber: form.value.deviceNumber, deviceNumber: form.value.deviceNumber,
factoryAreaNumber: form.value.factoryAreaNumber, factoryAreaNumber: form.value.factoryAreaNumber,
type: type.value, type: type.value,
filePathList: imgList.value, filePathList: imgList.value,
sourceType: '0'
} }
proxy.$modal.confirm('是否添加报修').then(() => { proxy.$modal.confirm('是否添加报修').then(() => {
proxy.$modal.loading('加载中') proxy.$modal.loading('加载中')

Loading…
Cancel
Save