|
@@ -964,6 +964,21 @@
|
|
|
<el-form-item label="冲红备注">
|
|
|
<el-input v-model="detailRemark" style="width:200px"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="凭证图片" style="">
|
|
|
+ <el-upload
|
|
|
+ ref="detailsUpload"
|
|
|
+ action="noAction"
|
|
|
+ list-type="picture-card"
|
|
|
+ :limit="10"
|
|
|
+ :on-change="fileChange2"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-exceed="exceed"
|
|
|
+ accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP"
|
|
|
+ :auto-upload="false"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -2205,17 +2220,44 @@ export default {
|
|
|
detailAmount: this.detailAmount,
|
|
|
detailRemark: this.detailRemark
|
|
|
}
|
|
|
- this.axios.post('/api/v1/bms/addTruckDetail', map).then(res => {
|
|
|
- if (res.data.status == 'succeed') {
|
|
|
- this.$message.success('修改成功!')
|
|
|
- this.setteldAllselectValue = 0
|
|
|
- this.onclick()
|
|
|
- } else {
|
|
|
- this.$message.error(res.data.data)
|
|
|
+ let _this=this;
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ if (_this.detailsList.length > 0) {
|
|
|
+ //先上传备注图片
|
|
|
+ let formData = new window.FormData()
|
|
|
+ _this.detailsList.forEach((item, index) => {
|
|
|
+ formData.append('file' + index, item.raw)
|
|
|
+ })
|
|
|
+ let options = {
|
|
|
+ url: '/api/v1/uc/uploadPic',
|
|
|
+ data: formData,
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'multipart/form-data'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _this.axios(options).then(res => {
|
|
|
+ map.urls= res.data
|
|
|
+ _this.closeUpload2();
|
|
|
+ resolve('OK');
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ resolve('NoPIC');
|
|
|
}
|
|
|
- this.showDetailsAdd = false
|
|
|
- this.isLoading = false
|
|
|
- })
|
|
|
+ }).then((result)=>{
|
|
|
+ console.log(result);
|
|
|
+ this.axios.post('/api/v1/bms/addTruckDetail', map).then(res => {
|
|
|
+ if (res.data.status == 'succeed') {
|
|
|
+ this.$message.success('修改成功!')
|
|
|
+ this.setteldAllselectValue = 0
|
|
|
+ this.onclick()
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.data)
|
|
|
+ }
|
|
|
+ this.showDetailsAdd = false
|
|
|
+ this.isLoading = false
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
openConsigneeUpd() {
|