|
|
@ -3,13 +3,13 @@ |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>验车单</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleCreate">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="disable" @click="handleCreate">保存</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-form class="formadd"> |
|
|
|
<div> |
|
|
|
<el-table :data="tableData" border style="width: 100%; margin-top: 20px" max-height="600"> |
|
|
|
<el-table :data="scmResultImageDtos" border style="width: 100%; margin-top: 20px" max-height="600"> |
|
|
|
<el-table-column label="序号" width="70" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.sortNo }}</span> |
|
|
@ -38,17 +38,27 @@ |
|
|
|
<el-input v-model="scope.row.remarks" clearable placeholder="" resize="none" type="textarea" :autosize="{ minRows: 2, maxRows: 8 }"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" header-align="center" align="left" width="360"> |
|
|
|
<el-table-column label="操作" header-align="center" align="left" width="410"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.itemImgVoList.length > 0"> |
|
|
|
<div class="operate" v-for="item in scope.row.itemImgVoList"> |
|
|
|
<div class="operate" v-for="(item,index) in scope.row.itemImgVoList"> |
|
|
|
<div> |
|
|
|
<span>{{ item.imgTitle }}</span> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" @click="handleLookImg">查看</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleUpload">上传</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleExample">图片示例</el-button> |
|
|
|
<el-button type="primary" size="small" |
|
|
|
@click="handleLookImg(scope.row.itemImgVoList[index].imgUrlList)">查看 |
|
|
|
</el-button> |
|
|
|
<div class="upload_img"> <!-- @change="getUrl($event, index,scope.$index)" --> |
|
|
|
<upload_jianchabiao ref="uploadMoreImg" |
|
|
|
v-model="scope.row.itemImgVoList[index].imgUrlList" |
|
|
|
:limit="1" bucket="map" |
|
|
|
:upload-data="{type:'0001'}"/> |
|
|
|
</div> |
|
|
|
<!-- <el-button type="primary" size="small" @click="handleUpload">上传</el-button>--> |
|
|
|
<el-button type="primary" size="small" |
|
|
|
@click="handleExample(scope.row.itemImgVoList[index].imgPathList)">图片示例 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -57,19 +67,59 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
<!-- 查看上传图片弹窗 --> |
|
|
|
<el-dialog title="开票信息图片" :visible.sync="dialogVisible"> |
|
|
|
<div v-for="(item,index) in dialogUrl" style="display:inline-block;"> |
|
|
|
<div class="dialogImg"> |
|
|
|
<el-image |
|
|
|
:key="index" |
|
|
|
:src="item" |
|
|
|
style="width: 100px; height: 100px" |
|
|
|
:preview-src-list="dialogUrl"> |
|
|
|
</el-image> |
|
|
|
<el-button class="btn_style" type="danger" size="mini" @click="handleDel(index)">删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 查看图片示例弹窗 --> |
|
|
|
<el-dialog title="开票信息图片" :visible.sync="dialogVisiblePath"> |
|
|
|
<div v-for="(item,index) in dialogimgPathList" style="display:inline-block;"> |
|
|
|
<div class="dialogImg"> |
|
|
|
<el-image |
|
|
|
:key="index" |
|
|
|
:src="item" |
|
|
|
style="width: 100px; height: 100px" |
|
|
|
:preview-src-list="dialogimgPathList"> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getVehinspectItemInfo } from '@/api/supplychain/yancheguanli' |
|
|
|
import upload from '@/components/uploadFile/upload' |
|
|
|
import { getVehinspectItemInfo, saveResultImage } from '@/api/supplychain/yancheguanli' |
|
|
|
import upload_jianchabiao from '@/components/uploadFile/upload_jianchabiao' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'cheliangjianchabiao', |
|
|
|
components: { |
|
|
|
upload_jianchabiao |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
formobj: {}, |
|
|
|
tableData: [], |
|
|
|
temp: { |
|
|
|
vehInspectSid: '', |
|
|
|
scmResultImageDtos: [] |
|
|
|
}, |
|
|
|
disable: false, |
|
|
|
scmResultImageDtos: [], |
|
|
|
dialogVisible: false, |
|
|
|
dialogUrl: [], // 上传的图片 |
|
|
|
dialogVisiblePath: false, |
|
|
|
dialogimgPathList: [], // 示例的图片 |
|
|
|
aa: [1, 3, 0, 0] |
|
|
|
} |
|
|
|
}, |
|
|
@ -77,27 +127,61 @@ export default { |
|
|
|
// this.showEdit() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleCreate() {}, |
|
|
|
handleCreate() { |
|
|
|
this.temp.scmResultImageDtos = this.scmResultImageDtos |
|
|
|
// this.$refs['dataForm'].validate((valid) => { |
|
|
|
// if (valid) { |
|
|
|
this.disable = true |
|
|
|
// 只需添加和修改 |
|
|
|
saveResultImage(this.temp).then((response) => { |
|
|
|
this.disable = false |
|
|
|
if (response.code === '200') { |
|
|
|
this.handleReturn() |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '保存失败!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleReturn() { |
|
|
|
this.$emit('doback') |
|
|
|
}, |
|
|
|
showCheck(inspectedSid) { |
|
|
|
const vehInspectSid = inspectedSid |
|
|
|
this.temp.vehInspectSid = vehInspectSid |
|
|
|
getVehinspectItemInfo(vehInspectSid).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.tableData = resp.data |
|
|
|
this.scmResultImageDtos = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleLookImg(){ |
|
|
|
|
|
|
|
}, |
|
|
|
handleUpload(){ |
|
|
|
|
|
|
|
// 查看上传图片 |
|
|
|
handleLookImg(val) { |
|
|
|
console.log('上传图片', val) |
|
|
|
this.dialogVisible = true |
|
|
|
this.dialogUrl = val |
|
|
|
}, |
|
|
|
handleExample(){ |
|
|
|
|
|
|
|
// 查看示例图 |
|
|
|
handleExample(val) { |
|
|
|
console.log('图片示例', val) |
|
|
|
this.dialogVisiblePath = true |
|
|
|
this.dialogimgPathList = val |
|
|
|
}, |
|
|
|
handleDel(index) { |
|
|
|
this.dialogUrl.splice(index, 1) |
|
|
|
// this.dialogUrl.forEach((item, index) => { |
|
|
|
// if (item === val) { |
|
|
|
// this.dialogUrl.splice(index, 1) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
} |
|
|
|
// getUrl(){ |
|
|
|
// } |
|
|
|
// arraySpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
// console.log(rowIndex, columnIndex) |
|
|
|
// if (columnIndex === 0 || columnIndex === 1 || columnIndex === 3 || columnIndex === 4 || columnIndex === 5) { |
|
|
@ -118,6 +202,7 @@ export default { |
|
|
|
.btn { |
|
|
|
border-bottom: 1px solid #e0e3eb; |
|
|
|
} |
|
|
|
|
|
|
|
.operate { |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
@ -125,7 +210,20 @@ export default { |
|
|
|
align-items: center; |
|
|
|
padding-top: 5px; |
|
|
|
} |
|
|
|
.con_style{ |
|
|
|
|
|
|
|
.con_style { |
|
|
|
padding: 2px 0; |
|
|
|
} |
|
|
|
|
|
|
|
.upload_img { |
|
|
|
display: inline-block; |
|
|
|
padding: 0 10px; |
|
|
|
} |
|
|
|
.dialogImg{ |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|