
10 changed files with 786 additions and 395 deletions
@ -0,0 +1,241 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div class="tab-header webtop"> |
|||
<div>验车单</div> |
|||
<div> |
|||
<!-- <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="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> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="项目" align="center" width="205"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.item }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="检查内容" header-align="center" align="left" width="550"> |
|||
<template slot-scope="scope"> <!-- 暂时不删除: :class="{btn: scope.row.itemDetailVoList.length - 1 > 0}" --> |
|||
<div class="con_style" v-for="(item, index) in scope.row.itemDetailVoList"> |
|||
<span>{{ index + 1 }}、{{ item.itemContent }}</span> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="检查结果" align="center" width="150"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.result }}</span> |
|||
<!-- <el-radio v-model="scope.row.result" :label="1">是</el-radio>--> |
|||
<!-- <el-radio v-model="scope.row.result" :label="0">否</el-radio>--> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center" width="300"> |
|||
<template slot-scope="scope"> |
|||
<span>{{scope.row.remarks}}</span> |
|||
<!-- <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="570"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.itemImgVoList.length > 0"> |
|||
<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(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> |
|||
</template> |
|||
</el-table-column> |
|||
</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, saveResultImage } from '@/api/supplychain/yancheguanli' |
|||
import upload_jianchabiao from '@/components/uploadFile/upload_jianchabiao' |
|||
|
|||
export default { |
|||
name: 'cheliangjianchabiao', |
|||
components: { |
|||
upload_jianchabiao |
|||
}, |
|||
data() { |
|||
return { |
|||
temp: { |
|||
vehInspectSid: '', |
|||
scmResultImageDtos: [] |
|||
}, |
|||
disable: false, |
|||
scmResultImageDtos: [], |
|||
dialogVisible: false, |
|||
dialogUrl: [], // 上传的图片 |
|||
dialogVisiblePath: false, |
|||
dialogimgPathList: [], // 示例的图片 |
|||
aa: [1, 3, 0, 0] |
|||
} |
|||
}, |
|||
created() { |
|||
// this.showEdit() |
|||
}, |
|||
methods: { |
|||
// 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.scmResultImageDtos = resp.data |
|||
for (var i = 0; i < this.scmResultImageDtos.length; i++) { |
|||
if (this.scmResultImageDtos[i].result == 1) { |
|||
this.scmResultImageDtos[i].result = '是' |
|||
} |
|||
if (this.scmResultImageDtos[i].result == 0) { |
|||
this.scmResultImageDtos[i].result = '否' |
|||
} |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 查看上传图片 |
|||
handleLookImg(val) { |
|||
console.log('上传图片', val) |
|||
this.dialogVisible = true |
|||
this.dialogUrl = val |
|||
}, |
|||
// 查看示例图 |
|||
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) { |
|||
// const _row = this.aa[rowIndex] |
|||
// const _col = _row > 0 ? 1 : 0 |
|||
// console.log('row', _row, 'col', _col) |
|||
// return { |
|||
// rowspan: _row, |
|||
// colspan: _col |
|||
// } |
|||
// } |
|||
// } |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.btn { |
|||
border-bottom: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
.operate { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.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> |
Loading…
Reference in new issue