pad-app/pages/index/instructDetails.vue

581 lines
15 KiB
Vue
Raw Permalink Normal View History

2023-07-12 18:06:16 +08:00
<template>
<view class="details">
2023-08-24 17:06:35 +08:00
<head-view :title="title"></head-view>
2023-11-01 18:40:05 +08:00
<view class="content contentFixed">
2023-08-23 17:42:44 +08:00
<view class="liBox">
<view class="title">
2023-09-23 20:16:54 +08:00
<image src="../../static/images/carInfo.png" mode="widthFix"></image>
2023-08-23 17:42:44 +08:00
<text>基本信息</text>
2023-07-12 18:06:16 +08:00
</view>
2023-09-23 20:16:54 +08:00
<view class="ul" v-if="objInfo.tradeName == 'W'">
2023-08-23 17:42:44 +08:00
<view class="li">
<p>船名</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.vslCnName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>航次</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.vvyName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>港口</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.potName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>货代</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.goodsAgent}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>联系人</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.contact}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>联系方式</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.contactNumber}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>泊位</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.planBerthageName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>备注</p>
2023-09-23 20:16:54 +08:00
<text>{{basicInfo.remark}}</text>
</view>
</view>
<view class="ul" v-if="objInfo.tradeName == 'N'">
<view class="li">
<p>船名</p>
<text>{{objInfo.shipInfo.spmIdDesc}}</text>
</view>
<view class="li">
<p>航次</p>
<text>{{objInfo.shipInfo.vvyName}}</text>
</view>
<view class="li">
<p>目的港</p>
<text>{{objInfo.jcInfo.destPortDesc}}</text>
</view>
<view class="li">
<p>泊位</p>
<text>{{objInfo.shipInfo.actualBerthageDesc}}</text>
2023-07-12 18:06:16 +08:00
</view>
</view>
</view>
2023-08-23 17:42:44 +08:00
<view class="liBox">
<view class="title">
2023-09-23 20:16:54 +08:00
<image src="../../static/images/goodsImg.png" mode="widthFix"></image>
<text>详细信息</text>
2023-07-12 18:06:16 +08:00
</view>
2023-09-23 20:16:54 +08:00
<view class="ul" v-if="objInfo.tradeName == 'W'">
2023-08-23 17:42:44 +08:00
<view class="li">
<p>提单号</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.mnfBl}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>品牌</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.brdName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>车辆明细</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.bvdName}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>车长</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.carLength}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>车宽</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.carWidth}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>车高</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.carHeight}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>体积</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.volume}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>重量</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.weight}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>单票数量</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.ticketGtpks}}</text>
2023-07-12 18:06:16 +08:00
</view>
2023-08-23 17:42:44 +08:00
<view class="li">
<p>单票重量</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.ticketWeight}}</text>
2023-08-23 17:42:44 +08:00
</view>
<view class="li">
<p>单票体积</p>
2023-09-23 20:16:54 +08:00
<text>{{detailInfo.ticketVolume}}</text>
</view>
</view>
<view class="ul" v-if="objInfo.tradeName == 'N'">
<view class="li">
<p>提单号</p>
<text>{{objInfo.xqInfo.mnfBl}}</text>
</view>
<view class="li">
<p>品牌</p>
<text>{{objInfo.xqInfo.brdName}}</text>
</view>
<view class="li">
<p>车型</p>
<text>{{objInfo.xqInfo.bvmName}}</text>
</view>
<view class="li">
<p>车辆数</p>
<text>{{objInfo.xqInfo.carAmount}}</text>
2023-07-12 18:06:16 +08:00
</view>
</view>
</view>
2023-08-23 17:42:44 +08:00
<view class="liBox">
<view class="title">
2023-09-23 20:16:54 +08:00
<image src="../../static/images/goodsImg2.png" mode="widthFix"></image>
<text>货物明细</text>
2023-08-23 17:42:44 +08:00
</view>
<view class="formNr">
2023-12-22 17:48:52 +08:00
<uni-table stripe emptyText="暂无更多数据">
2023-08-23 17:42:44 +08:00
<!-- 表头行 -->
2023-12-22 17:48:52 +08:00
<uni-tr>
<uni-th width="10">序号</uni-th>
<uni-th width="22">车架号/条形码</uni-th>
<uni-th width="15">作业状态</uni-th>
<uni-th width="40">场位</uni-th>
<uni-th width="15">货物性质</uni-th>
<uni-th width="10">操作</uni-th>
2023-08-23 17:42:44 +08:00
</uni-tr>
<!-- 表格数据行 -->
2023-09-23 20:16:54 +08:00
<uni-tr v-for="(item,index) in tableList" :key="index">
2023-12-22 17:48:52 +08:00
<uni-td>{{index + 1}}</uni-td>
<uni-td>{{item.vinCode}}</uni-td>
<uni-td>{{item.workStatus}}</uni-td>
<uni-td v-if="objInfo.tradeName == 'W'">{{item.yardPosition}}</uni-td>
<uni-td v-if="objInfo.tradeName == 'N'">{{item.yardPos}}</uni-td>
<uni-td>{{item.natureFlagName}}</uni-td>
<uni-td>
2023-09-23 20:16:54 +08:00
<text class="operate" @click="open(item)"></text>
2023-08-23 17:42:44 +08:00
</uni-td>
</uni-tr>
</uni-table>
2024-05-20 17:44:18 +08:00
<uni-pagination :show-icon="true" :total="total" :pageSize="10" :current="current"
@change="changePage" />
2023-08-23 17:42:44 +08:00
</view>
2023-07-12 18:06:16 +08:00
</view>
2023-07-13 11:12:15 +08:00
<!-- 弹出层 -->
<uni-popup ref="popup" :mask-click="false">
<view class="dialog">
<view class="dtitle">
<text>残损信息</text>
<uni-icons type="closeempty" size="30" @click="close"></uni-icons>
</view>
<view class="tableContant">
<view class="nr">
2023-09-23 20:16:54 +08:00
<text class="text">品牌:{{rowInfo.brdName}}</text>
<text class="text" v-if="objInfo.tradeName == 'W'">:{{rowInfo.goodsTypeName}}</text>
<text class="text" v-if="objInfo.tradeName == 'N'">:{{rowInfo.bvmName}}</text>
<text class="text">车架号/条形码:{{rowInfo.vinCode}}</text>
2023-07-13 11:12:15 +08:00
</view>
2023-09-23 20:16:54 +08:00
<view class="table" v-for="(item,index) in damagedList" :key="index">
2023-07-13 11:12:15 +08:00
<view class="title">
2023-09-23 20:16:54 +08:00
<view>质损发生环节: {{item.qdLinkName}}</view>
<view class="tag" v-if="item.godStatus != null">{{item.godStatus}}</view>
2023-07-13 11:12:15 +08:00
</view>
<view class="row">
<view class="col">
2023-09-23 20:16:54 +08:00
质损上报人员: {{item.qdReportPerson}}
2023-07-13 11:12:15 +08:00
</view>
<view class="col">
2023-09-23 20:16:54 +08:00
质损上报时间: {{item.qualityDamageTime}}
2023-07-13 11:12:15 +08:00
</view>
<view class="col">
2023-09-23 20:16:54 +08:00
质损发生位置: {{item.yardPos}}
2023-07-13 11:12:15 +08:00
</view>
</view>
<view class="row">
<view class="col">
2023-09-23 20:16:54 +08:00
质损概况: {{item.qualityDamageSituationName}}
2023-07-13 11:12:15 +08:00
</view>
<view class="col">
2023-09-23 20:16:54 +08:00
损坏情况: {{item.damageSituationName}}
2023-07-13 11:12:15 +08:00
</view>
<view class="col">
2023-09-23 20:16:54 +08:00
处置情况: {{item.disposalSituationName}}
2023-07-13 11:12:15 +08:00
</view>
</view>
<view class="imgRow">
<view class="name">
质损照片:
</view>
<view class="imgList">
2023-09-23 20:16:54 +08:00
<view class="img" v-for="(item2,index2) in item.damageImageList" :key="index2">
<image :src="item2" mode="widthFix"></image>
2023-07-13 11:12:15 +08:00
</view>
</view>
</view>
<view class="imgRow">
<view class="name">
车架号照片:
</view>
<view class="imgList">
2023-09-23 20:16:54 +08:00
<view class="img" v-for="(item2,index2) in item.vinCodeImageList" :key="index2">
<image :src="item2" mode="widthFix"></image>
2023-07-13 11:12:15 +08:00
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
2023-07-12 18:06:16 +08:00
</view>
</view>
</template>
<script>
import HeadInfo from '@/components/head-info/head-info';
export default {
data() {
2023-07-24 16:14:37 +08:00
return {
2023-09-23 20:16:54 +08:00
loginObj: {},
2023-08-24 17:06:35 +08:00
title: "货物详情",
2023-09-23 20:16:54 +08:00
id: "",
// 基本信息
basicInfo: {},
// 详细信息
detailInfo: {},
// 货物明细
tableList: [],
// 货物明细当前行信息
rowInfo: {},
// 残损信息列表
damagedList: [],
// 质损照片
damageImage: [],
// 车架号照片
vinCodeImage: [],
// 内贸详情数据
objInfo: {},
2024-05-20 17:44:18 +08:00
//分页数据
total:20,
current:1
2023-07-24 16:14:37 +08:00
}
2023-07-12 18:06:16 +08:00
},
components: {
HeadInfo
},
2023-08-23 17:42:44 +08:00
onLoad(options) {
2023-09-23 20:16:54 +08:00
this.objInfo = JSON.parse(decodeURIComponent(options.params))
console.log(this.objInfo)
this.loginObj = uni.getStorageSync('loginObj')
this.loadList()
this.getTableInfo()
2023-07-24 16:14:37 +08:00
},
2023-07-12 18:06:16 +08:00
methods: {
2023-09-23 20:16:54 +08:00
// 获取基础信息和详细信息
2023-07-24 16:14:37 +08:00
loadList() {
2023-09-23 20:16:54 +08:00
uni.request({
url: `${this.$local}/api/shipInstructions/listDetail?spsId=${this.objInfo.id}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == 200) {
this.basicInfo = res.data.data.basicInfo
this.detailInfo = res.data.data.detailInfo
}
}
2023-07-24 16:14:37 +08:00
})
},
2023-09-23 20:16:54 +08:00
// 获取货物明细数据
getTableInfo() {
let url = ""
if (this.objInfo.tradeName == 'W') {
2024-05-20 17:44:18 +08:00
url = `${this.$local}/api/shipInstructions/goodsDetail/page?spsId=${this.objInfo.id}&size=10&current=${this.current}`
2023-09-23 20:16:54 +08:00
} else if (this.objInfo.tradeName == 'N') {
url =
`${this.$local}/api/domestic/load/command/pageForCargoDetails?splId=${this.objInfo.xqInfo.splId}&dlcId=${this.objInfo.jcInfo.dlcId}`
}
uni.request({
url: url,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == 200) {
2024-05-20 17:44:18 +08:00
this.total = res.data.data.total
2023-09-23 20:16:54 +08:00
this.tableList = res.data.data.records
console.log(this.tableList)
}
}
})
},
open(item) {
console.log(item)
this.rowInfo = item
2023-07-13 11:12:15 +08:00
this.$refs.popup.open('center')
2023-09-23 20:16:54 +08:00
this.getDamaged(item.vinCode)
},
// 获取残损信息
getDamaged(vinCode) {
uni.request({
url: `${this.$local}/api/goodsQuality/damage/${vinCode}`,
header: {
'Content-Type': 'application/json', //自定义请求头信息
'Authorization': `Bearer ${this.loginObj.access_token}`
},
method: 'GET', //请求方式,必须为大写
success: (res) => {
if (res.data.status == 200) {
this.damagedList = res.data.data
this.damagedList.forEach((item, index) => {
item.damageImage.forEach((v, index2) => {
this.initImg(v, "1", index, index2)
})
item.vinCodeImage.forEach((v, index2) => {
this.initImg(v, "2", index, index2)
})
})
}
}
})
},
initImg(fileName, type, index, index2) {
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 (type == 1) {
this.damageImage.push(res.data)
this.$set(this.damagedList[index], "damageImageList", this.damageImage)
if (this.damagedList[index].damageImage.length == this.damageImage.length) {
this.damageImage = []
}
} else if (type == 2) {
this.vinCodeImage.push(res.data)
this.$set(this.damagedList[index], "vinCodeImageList", this.vinCodeImage)
if (this.damagedList[index].vinCodeImage.length == this.vinCodeImage.length) {
this.vinCodeImage = []
}
}
}
})
2023-07-13 11:12:15 +08:00
},
close() {
this.$refs.popup.close()
2024-05-20 17:44:18 +08:00
},
//切换分页
changePage(e) {
this.current = e.current
this.getTableInfo()
2023-07-12 18:06:16 +08:00
}
}
}
</script>
<style lang="less" scoped>
.details {
2023-11-01 18:40:05 +08:00
.content {
2023-08-23 17:42:44 +08:00
padding: 16px;
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
.liBox {
width: 100%;
padding: 24px 16px;
background-color: #fff;
margin-bottom: 16px;
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
.title {
display: flex;
margin-bottom: 20px;
image {
width: 24px;
height: 24px;
margin-top: 2px;
}
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
text {
font-size: 18px;
font-weight: bold;
margin-left: 10px;
}
}
.ul {
2023-07-12 18:06:16 +08:00
display: flex;
2023-08-23 17:42:44 +08:00
flex-wrap: wrap;
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
.li {
width: 32%;
margin-bottom: 12px;
2023-07-12 18:06:16 +08:00
display: flex;
2023-08-23 17:42:44 +08:00
font-size: 14px;
2023-11-13 10:11:34 +08:00
height: 20px;
line-height: 20px;
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
p {
color: #999;
2023-07-12 18:06:16 +08:00
}
2023-08-23 17:42:44 +08:00
text {
color: #23262E;
}
2023-07-12 18:06:16 +08:00
}
}
2023-08-23 17:42:44 +08:00
}
2023-07-12 18:06:16 +08:00
2023-08-23 17:42:44 +08:00
.formTitle {
padding-left: 10px;
border-left: 5px solid #2979ff;
font-size: 20px;
font-weight: bold;
}
.formNr {
2023-12-22 17:48:52 +08:00
/deep/.uni-table-th {
background-color: #f4f4f4;
color: #0B266A;
font-size: 15px;
.uni-table-th-content {
padding-left: 7.5px;
border-left: 1px solid #C3CBD8;
}
}
/deep/.uni-table-td {
padding-left: 15px;
2023-07-12 18:06:16 +08:00
}
2023-08-23 17:42:44 +08:00
.operate {
color: #2979ff;
}
2023-07-12 18:06:16 +08:00
}
}
}
2023-07-13 11:12:15 +08:00
.dialog {
width: 90vh;
height: 80vh;
background-color: #fff;
border-radius: 10px;
.dtitle {
width: 100%;
height: 60px;
line-height: 60px;
border-radius: 10px 10px 0 0;
padding: 0 20px;
font-size: 18px;
font-weight: 700;
background-color: #f9f9f9;
text-align: left;
display: flex;
justify-content: space-between;
}
.tableContant {
height: calc(80vh - 60px);
overflow-y: auto;
.nr {
padding: 0 20px;
height: 60px;
line-height: 60px;
display: flex;
justify-content: flex-start;
.text {
min-width: 120px;
text-align: left;
}
}
.table {
width: calc(100% - 40px);
margin: 0 20px 20px;
padding: 0 20px;
border-bottom: 1px solid #ebebeb;
.title {
height: 40px;
line-height: 40px;
font-weight: 900;
text-align: left;
display: flex;
justify-content: flex-start;
.tag {
width: 60px;
margin: 10px 15px 0;
border-radius: 3px;
height: 20px;
line-height: 20px;
font-weight: 400;
color: #fff;
text-align: center;
background-color: #108ee9;
}
}
.row {
width: 100%;
display: flex;
justify-content: space-between;
font-size: 18px;
height: 40px;
font-size: 10px;
.col {
width: 32%;
text-align: left;
}
}
.imgRow {
margin-bottom: 25rpx;
display: flex;
justify-content: flex-start;
.name {
width: 80px;
text-align: left;
font-size: 10px;
}
.imgList {
width: calc(100% - 80px);
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.img {
width: 100px;
margin-left: 10px;
margin-bottom: 10px;
}
}
}
}
}
}
2023-07-12 18:06:16 +08:00
</style>