pad-app/pages/quality/details.vue

352 lines
7.9 KiB
Vue
Raw Normal View History

2023-07-10 17:11:31 +08:00
<template>
<view class="details">
2023-08-24 16:22:29 +08:00
<head-view title="船名/航次"></head-view>
2023-07-10 17:57:36 +08:00
<view class="container">
<view class="userInfo">
2023-09-23 20:16:54 +08:00
<p>填报人{{infoData.qdReportPerson}}</p>
<p>上报部门{{infoData.qrpDept}}</p>
2023-07-10 17:57:36 +08:00
</view>
<view class="formTitle">
基本信息
</view>
2023-09-23 20:16:54 +08:00
<view class="ul zsInfo">
<view class="li">
<p>质损发生环节</p>
2023-07-10 17:57:36 +08:00
<view class="rightInfo">
2023-09-23 20:16:54 +08:00
<p>{{infoData.qdLinkName}} </p>
<p v-if="infoData.linkFeedback != '' || infoData.linkOther != ''">
备注{{infoData.linkFeedback}}{{infoData.linkOther}}
2023-07-10 17:57:36 +08:00
</p>
</view>
2023-07-25 17:15:05 +08:00
</view>
2023-09-23 20:16:54 +08:00
</view>
<view class="ul">
2023-07-25 17:15:05 +08:00
<view class="li">
2023-07-10 17:57:36 +08:00
<p class="liTitle">板车照片</p>
<view class="picture">
2023-09-23 20:16:54 +08:00
<template v-for="item in boardCarPhotos">
<image :key="item" :src="item" mode="widthFix"></image>
</template>
2023-07-10 17:57:36 +08:00
</view>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p class="liTitle">板车车牌照</p>
<view class="picture">
2023-09-23 20:16:54 +08:00
<template v-for="item in boardCarList">
<image :key="item" :src="item" mode="widthFix"></image>
</template>
2023-07-10 17:57:36 +08:00
</view>
2023-07-25 17:15:05 +08:00
</view>
</view>
2023-07-10 17:57:36 +08:00
<view class="formTitle">
质损信息
</view>
2023-07-25 17:15:05 +08:00
<view class="ul zsInfo">
<view class="li">
2023-07-10 17:57:36 +08:00
<p>车架号/条形码</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.vinCode}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>船名/航次</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.spmIdAndVvyId}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>车型</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.bvmName}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>品牌</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.brdName}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>场位</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.pos}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>质损时间</p>
2023-09-23 20:16:54 +08:00
<p>{{infoData.qualityDamageTime}}</p>
2023-07-25 17:15:05 +08:00
</view>
<view class="li">
2023-07-10 17:57:36 +08:00
<p>质损货物品类</p>
2023-09-23 20:16:54 +08:00
<view class="rightInfo">
<p>{{infoData.qdGodsCategoryName}}</p>
<p v-if="infoData.qdGcOther != ''">
备注{{infoData.qdGcOther}}
</p>
</view>
2023-07-25 17:15:05 +08:00
</view>
2023-09-23 20:16:54 +08:00
<view class="li imageLi">
<image :src="zsImg" mode="widthFix"></image>
2023-07-25 17:15:05 +08:00
</view>
<view class="li tsLi">
2023-07-10 17:57:36 +08:00
<p>质损概况</p>
2023-09-23 20:16:54 +08:00
<view class="rightInfo">
<p>{{infoData.qdGodsCategoryName}}</p>
<p v-if="infoData.qdGcOther != ''">
备注{{infoData.qdGcOther}}
</p>
</view>
2023-07-25 17:15:05 +08:00
</view>
<view class="li tsLi">
2023-07-10 17:57:36 +08:00
<p>损伤情况</p>
2023-09-23 20:16:54 +08:00
<view class="rightInfo">
<p>{{infoData.damageSituationName}}</p>
<p v-if="infoData.dsOther != ''">
备注{{infoData.dsOther}}
</p>
</view>
2023-07-25 17:15:05 +08:00
</view>
<view class="li tsLi">
2023-07-10 17:57:36 +08:00
<p>处置情况</p>
2023-09-23 20:16:54 +08:00
<view class="rightInfo">
<p>{{infoData.disposalSituationName}}</p>
<p v-if="infoData.dpsOther != ''">
备注{{infoData.dpsOther}}
</p>
</view>
2023-07-25 17:15:05 +08:00
</view>
<view class="li zpLi">
2023-07-10 17:57:36 +08:00
<p class="liTitle">质损照片</p>
<view class="picture">
2023-09-23 20:16:54 +08:00
<template v-for="item in qualityDamage">
<image :key="item" :src="item" mode="widthFix"></image>
</template>
2023-07-10 17:57:36 +08:00
</view>
2023-07-25 17:15:05 +08:00
</view>
<view class="li zpLi">
2023-07-10 17:57:36 +08:00
<p class="liTitle">车架号图片</p>
<view class="picture">
2023-09-23 20:16:54 +08:00
<template v-for="item in carFrameNumber">
<image :key="item" :src="item" mode="widthFix"></image>
</template>
</view>
</view>
</view>
<view class="formTitle">
签字
</view>
<view class="ul">
<view class="li flexLi">
<p class="liTitle">质损负责人</p>
<p>{{infoData.qdLiablePerson}}</p>
</view>
<view class="li flexLi">
<p class="liTitle">签名</p>
<view class="picture">
<image :src="signImg" mode="widthFix"></image>
2023-07-10 17:57:36 +08:00
</view>
2023-07-25 17:15:05 +08:00
</view>
</view>
2023-07-11 15:28:40 +08:00
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
</view>
2023-07-10 17:57:36 +08:00
</view>
2023-07-10 17:11:31 +08:00
</view>
</template>
<script>
2023-07-11 15:28:40 +08:00
export default {
data() {
2023-09-23 20:16:54 +08:00
return {
ygqId: "",
loginObj: {},
infoData: {},
// 板车照片
boardCarPhotos: [],
// 板车车牌照
boardCarList: [],
// 质损照片
qualityDamage: [],
// 车架号图片
carFrameNumber: [],
// 签名图片
signImg: "",
// 质损参考图
zsImg: "",
}
},
onLoad(options) {
if ('params' in options) {
// 获取传递的对象参数使用decodeURIComponent解码并转为对象
this.ygqId = JSON.parse(decodeURIComponent(options.params)).ygqId
}
this.loginObj = uni.getStorageSync('loginObj')
this.initData()
2023-07-11 15:28:40 +08:00
},
methods: {
2023-09-23 20:16:54 +08:00
initData() {
uni.request({
url: `${this.$local}/api/goodsQuality/getDetail?ygqId=${this.ygqId}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode == 200) {
this.infoData = res.data.data
// 获取板车照片
this.infoData.boardCarPhotos.forEach(v => {
this.initImg(v.filePath, "1")
})
// 获取板车车牌照
this.infoData.boardCarLicensePlates.forEach(v => {
this.initImg(v.filePath, "2")
})
// 获取质损照片
this.infoData.qualityDamagePhotos.forEach(v => {
this.initImg(v.filePath, "3")
})
// 获取车架号图片
this.infoData.carFrameNumberPhotos.forEach(v => {
this.initImg(v.filePath, "4")
})
this.initImg(this.infoData.signUrl, "5")
this.initImg(this.infoData.refImageUrl, "6")
}
}
})
},
// type 1 板车照片 2板车车牌照 3质损照片 4车架号图片 5签名 6参考图
initImg(fileName, type) {
uni.request({
url: `${this.$local}/api/file/url/?fileName=${fileName}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.statusCode == 200) {
if (type == 1) {
this.boardCarPhotos.push(res.data)
} else if (type == 2) {
this.boardCarList.push(res.data)
} else if (type == 3) {
this.qualityDamage.push(res.data)
} else if (type == 4) {
this.carFrameNumber.push(res.data)
} else if (type == 5) {
this.signImg = res.data
} else if (type == 5) {
this.zsImg = res.data
}
}
}
})
},
2023-07-11 15:28:40 +08:00
// 取消
cancel() {
uni.navigateTo({
2023-08-18 17:28:11 +08:00
url: '/pages/quality/index'
2023-07-11 15:28:40 +08:00
})
}
}
}
2023-07-10 17:11:31 +08:00
</script>
<style lang="less" scoped>
2023-07-10 17:57:36 +08:00
.details {
.container {
padding: 20px 30px;
.userInfo {
display: flex;
margin-bottom: 20px;
p {
margin-right: 30px;
font-size: 16px;
}
}
.formTitle {
padding-left: 10px;
border-left: 5px solid #2979ff;
font-size: 20px;
font-weight: bold;
}
2023-07-25 17:15:05 +08:00
.ul {
2023-07-10 17:57:36 +08:00
margin-bottom: 30px;
2023-09-23 20:16:54 +08:00
.rightInfo {
display: flex;
p {
width: 120px;
}
}
2023-07-10 17:57:36 +08:00
.flexLi {
display: flex;
}
2023-07-25 17:15:05 +08:00
.li {
2023-07-10 17:57:36 +08:00
margin-top: 30px;
.liTitle {
min-width: 100px;
margin-right: 20px;
font-size: 16px;
font-weight: bold;
}
.picture {
margin-top: 20px;
2023-07-11 15:28:40 +08:00
display: flex;
flex-wrap: wrap;
2023-07-10 17:57:36 +08:00
2023-07-25 17:15:05 +08:00
image {
2023-07-11 15:28:40 +08:00
width: 120px;
height: 120px;
margin: 10px;
2023-07-10 17:57:36 +08:00
}
}
2023-09-23 20:16:54 +08:00
2023-07-10 17:57:36 +08:00
}
}
.zsInfo {
display: flex;
flex-wrap: wrap;
2023-07-25 17:15:05 +08:00
.li {
2023-07-10 17:57:36 +08:00
width: 48%;
display: flex;
p:first-child {
width: 120px;
}
}
.tsLi {
width: 100%;
}
.zpLi {
width: 100%;
display: block;
}
2023-07-11 15:28:40 +08:00
2023-09-23 20:16:54 +08:00
.imageLi {
2023-07-11 15:28:40 +08:00
width: 100%;
2023-07-25 17:15:05 +08:00
height: 400px;
2023-07-11 15:28:40 +08:00
}
}
.btnList {
display: flex;
justify-content: center;
/deep/ .van-button {
margin: 30px 0;
width: 120px;
height: 50px;
}
2023-07-10 17:57:36 +08:00
}
}
}
2023-07-10 17:11:31 +08:00
</style>