pad-app/pages/shipWork/shiftDetails.vue

285 lines
6.7 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="shiftDetails">
<view class="container">
<custom-tabs type="c1" :value="value" @change="changeIndex">
<custom-tab-pane label="工班信息" name="c1_1">
<view></view>
<view class="ul">
<view class="li">
<p>船名</p>
<text>{{shipInfo.voyageScheduleDataList[0].spmName}}</text>
</view>
<view class="li">
<p>航次</p>
<text>{{shipInfo.voyageScheduleDataList[0].vvyName}}</text>
</view>
<view class="li">
<p>进出口</p>
<text>{{shipInfo.voyageScheduleDataList[0].importExportFlagName}}</text>
</view>
<view class="li">
<p>贸易类型</p>
<text>{{shipInfo.voyageScheduleDataList[0].tradeTypeName}}</text>
</view>
<view class="li">
<p>装卸类型</p>
<text> {{dataInfo.zxName}}</text>
</view>
</view>
<view class="ul bUl" v-for="(item,index) in dataInfo.shiftList" :key="index + 'a'">
<view class="li">
<p>工班:</p>
<text> {{item.gbTextValue}}</text>
</view>
<view class="li">
<p>作业时间:</p>
<text> {{item.startTime}} - {{item.endTime}}</text>
</view>
</view>
<view class="ul bUl" v-for="(item,index) in dataInfo.shiftList2" :key="index + 'b'">
<view class="li">
<p>车型:</p>
<text>{{item.cxTextValue}}</text>
</view>
<view class="li">
<p>数量:</p>
<text>{{item.numValue}}</text>
</view>
<view class="li wLi">
<p>备注:</p>
<text>{{item.notes}}</text>
</view>
</view>
</custom-tab-pane>
<custom-tab-pane label="翻仓信息" name="c1_2">
<view class="fcInfo" v-for="(item,index) in dataInfo.fcList" :key="index + 'fc'">
<view class="fcBox">
<p>翻舱类型:</p>
<text>{{item.fcTextValue}}</text>
</view>
<view class="ul" v-for="(item2,index2) in item.fcUlList2" :key="index2 + 'info'">
<view class="li">
<p>航次:</p>
<text>{{shipInfo.voyageScheduleDataList[0].vvyName}}</text>
</view>
<view class="li">
<p>翻舱起点:</p>
<text>{{item2.qdValue}}</text>
</view>
<view class="li">
<p>翻舱终点:</p>
<text>{{item2.zdValue}}</text>
</view>
<view class="li">
<p>作业时间:</p>
<text>{{item2.startTime}} - {{item2.endTime}}</text>
</view>
<view class="li">
<p>数量:</p>
<text>{{item2.numValue}}</text>
</view>
<view class="li">
<p>体积:</p>
<text>{{item2.tjValue}}</text>
</view>
<view class="li">
<p>重量:</p>
<text>{{item2.zlValue}}</text>
</view>
</view>
</view>
</custom-tab-pane>
<custom-tab-pane label="其他信息" name="c1_3">
<view class="otherInfo">
<p class="title">辅助作业</p>
<view class="ul">
<view class="li">
<p>技术工人:</p>
<text>{{dataInfo.otherList.jsWorker}}</text>
</view>
<view class="li">
<p>普通工人:</p>
<text>{{dataInfo.otherList.ptworker}}</text>
</view>
<view class="li">
<p>作业时间:</p>
<text>{{dataInfo.otherList.startTime}} - {{dataInfo.otherList.endTime}}</text>
</view>
<view class="li">
<p>重量:</p>
<text>{{dataInfo.otherList.zlValue}}</text>
</view>
<view class="li">
<p>体积:</p>
<text>{{dataInfo.otherList.tjValue}}</text>
</view>
<view class="li wLi">
<p>描述:</p>
<text>{{dataInfo.otherList.describe}}</text>
</view>
</view>
<p class="title">待工作业</p>
<view class="ul">
<view class="li wLi">
<p>描述:</p>
<text>{{dataInfo.otherList.dgWork}}</text>
</view>
</view>
<p class="title">作业备注</p>
<view class="ul">
<view class="li wLi">
<p>描述:</p>
<text>{{dataInfo.otherList.notes}}</text>
</view>
</view>
</view>
</custom-tab-pane>
</custom-tabs>
<view class="btnList">
<van-button type="default" @click="cancel">取消</van-button>
<van-button type="default" @click="del">删除</van-button>
<van-button type="info" @click="edit('edit')"></van-button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
value: 0,
shipInfo: {
voyageScheduleDataList: [{
spmName: "",
importExportFlagName: "",
tradeTypeName: ""
}]
},
dataInfo: {
otherList: {}
},
shiftRowIndex: 0,
}
},
mounted() {
this.shipInfo = uni.getStorageSync('shipInfo')
this.dataInfo = uni.getStorageSync('shiftRow')
this.shiftRowIndex = uni.getStorageSync('shiftRowIndex')
},
methods: {
changeIndex(e) {
// console.log('选中:', e)
},
// 取消
cancel() {
uni.navigateTo({
url: '/pages/shipWork/mixWork?infoType=1'
})
},
// 删除
del() {
let addShiftArr = uni.getStorageSync('addShiftArr')
addShiftArr.splice(this.shiftRowIndex, 1)
uni.setStorageSync('addShiftArr', addShiftArr);
uni.navigateTo({
url: '/pages/shipWork/mixWork?infoType=1'
})
},
// 编辑
edit(state) {
this.obj = {
state: state
};
const params = encodeURIComponent(JSON.stringify(this.obj));
uni.navigateTo({
url: `/pages/shipWork/shiftAdd?params=${params}`
})
},
}
}
</script>
<style lang="less" scoped>
.shiftDetails {
.container {
padding: 30px 20px;
background-color: #fff;
.fcInfo {
padding-bottom: 20px;
border-bottom: 1px solid #ccc;
.fcBox {
display: flex;
padding: 10px 20px;
line-height: 35px;
font-size: 16px;
}
.ul {
border-bottom: 1px dashed #ccc;
}
.ul:last-child {
border: none;
}
}
.otherInfo {
.title {
margin: 20px 0;
font-size: 16px;
font-weight: bold;
padding-left: 10px;
border-left: 5px solid #2979ff;
}
}
.ul[data-v-298cacec] {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.ul {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.li {
width: 45%;
display: flex;
padding: 10px 20px;
line-height: 35px;
font-size: 16px;
p {
min-width: 85px;
text-align: right;
}
}
.wLi {
width: calc(100% - 150px);
}
}
.bUl {
border-top: 1px solid #999;
}
.btnList {
display: flex;
justify-content: center;
margin-top: 20px;
/deep/ .van-button {
margin: 30px 20px;
width: 120px;
height: 50px;
}
}
}
}
</style>