pad新增登录以及新增逻辑修改

dev2
Panzihang 2023-07-24 16:56:46 +08:00
parent 0feb180d6f
commit 5303d552ec
27 changed files with 1151 additions and 259 deletions

View File

@ -1,18 +1,130 @@
<template>
<view class="headInfo">
<view class="info">
<view class="info" @click="showInfo">
<image class="toux" src="@/static/images/theme/toux.png" mode="widthFix"></image>
<text>wchenp</text>
<uni-icons type="gear" size="21" />
</view>
<view class="infoList" v-if="infoType">
<view class="userInfo">
<p>张星星 - 堆场计划员</p>
<p>12341234567</p>
</view>
<view class="borTop" @click="tabsPort('center')">
<uni-icons type="loop" size="16" />
<text>切换港口</text>
</view>
<view class="borTop" @click="outLogin">
<uni-icons type="undo" size="16" />
<text>退出登录</text>
</view>
</view>
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popupBox">
<view class="ul">
<view class="li" v-for="(item,index) in portList" :key="index"
:class="{active:activeIndex == index}" @click="selectPort(item,index)">
<text>{{item.title}}</text>
</view>
</view>
<view class="btnBox">
<button class="btn" type="default" @click="close"> </button>
<button class="btn" type="primary" @click="toGo"> </button>
</view>
</view>
</uni-popup>
<uni-popup ref="popup2" type="dialog">
<uni-popup-dialog confirmText="确定" content="是否退出登录?" @close="close2"
@confirm="outConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
infoType: false,
//
type: "",
portList: [{
value: "1",
title: "港口1"
},
{
value: "2",
title: "港口2"
},
{
value: "3",
title: "港口3"
},
],
portId: "",
portName: "",
activeIndex: 0,
}
},
mounted() {
this.activeIndex = uni.getStorageSync("selectPortIndex")
this.portId = this.portList[this.activeIndex].value
this.portName = this.portList[this.activeIndex].title
},
methods: {
showInfo() {
this.infoType = !this.infoType
},
//
tabsPort(type) {
this.type = type
this.$refs.popup.open(type)
},
//
change(e) {},
//
selectPort(item, index) {
this.portName = item.title
this.portId = item.value
this.activeIndex = index
},
//
toGo() {
let portObj = {
portName: this.portName,
portId: this.portId
}
uni.setStorageSync('portObj', portObj);
uni.setStorageSync('selectPortIndex', this.activeIndex)
this.$refs.popup.close()
this.infoType = false
uni.navigateTo({
url: '/pages/index/index'
})
},
//
close() {
this.infoType = false
this.$refs.popup.close()
},
// 退
outLogin() {
this.$refs.popup2.open()
},
// 退
outConfirm() {
uni.navigateTo({
url: '/pages/login/index'
})
},
// 退
close2() {
this.infoType = false
}
}
}
</script>
<style>
<style lang="less" scoped>
.headInfo {
width: 100%;
height: 40px;
@ -21,6 +133,7 @@
border-bottom: 1px solid #999999;
display: flex;
justify-content: flex-end;
position: relative;
.info {
width: 120px;
@ -33,11 +146,73 @@
height: 26px;
border-radius: 30px;
overflow: hidden;
}
text {
display: in;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.infoList {
width: 200px;
height: 190px;
padding: 10px 20px;
border-radius: 8px;
background-color: #fff;
z-index: 999;
display: flex;
flex-direction: column;
justify-content: space-between;
position: absolute;
right: 0;
top: 40px;
.borTop {
border-top: 1px #ccc solid;
/deep/.uni-icons {
margin-right: 10px;
}
}
}
.popupBox {
width: 500px;
height: 400px;
overflow: scroll;
padding: 30px;
.ul {
display: felx;
flex-direction: column;
justify-content: space-between;
.li {
padding: 15px 0px;
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 10px;
}
.active {
color: #0079fe;
border-color: #0079fe;
}
}
.btnBox {
display: flex;
justify-content: space-between;
.btn {
flex: 1;
padding: 10px 0;
margin: 10px 20px;
}
}
}
/deep/.uni-dialog-title {
display: none;
}
}
</style>
</style>

View File

@ -1,5 +1,11 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登录"
}
},
{
"path": "pages/index/index",
"style": {
@ -36,6 +42,12 @@
"navigationBarTitleText": "单证列表"
}
},
{
"path": "pages/shipWork/sign",
"style": {
"navigationBarTitleText": "单证签名"
}
},
{
"path": "pages/shipWork/mixWork",
"style": {
@ -45,18 +57,18 @@
{
"path": "pages/shipWork/peopleAdd",
"style": {
"navigationBarTitleText": "杂项作业查看(人员信息)"
"navigationBarTitleText": "杂项作业(人员信息)"
}
},
{
"path": "pages/shipWork/shiftAdd",
"style": {
"navigationBarTitleText": "杂项作业查看(工班信息)"
"navigationBarTitleText": "杂项作业(工班信息)"
}
}, {
"path": "pages/shipWork/shiftDetails",
"style": {
"navigationBarTitleText": "工班信息详情"
"navigationBarTitleText": "杂项作业(工班信息)"
}
}, {
"path": "pages/shipWork/untieCord",
@ -159,7 +171,7 @@
"style": {
"navigationBarTitleText": "品牌明细"
}
},{
}, {
"path": "pages/shipWork/carDetails",
"style": {
"navigationBarTitleText": "车型明细"

View File

@ -0,0 +1,180 @@
<template>
<view class="login">
<view class="loginBox">
<van-field v-model="account" left-icon="manager" placeholder="请输入账号"
:rules="[{ required: true, message: '请输入账号' }]" />
<van-field v-model="password" type="password" left-icon="lock" right-icon="eye" placeholder="请输入密码"
:rules="[{ required: true, message: '请输入密码' }]" @click-right-icon="rightIcon" v-if="!pwdType" />
<van-field v-model="password" left-icon="lock" right-icon="closed-eye" placeholder="请输入密码"
:rules="[{ required: true, message: '请输入密码' }]" @click-right-icon="rightIcon" v-else />
<view class="button" @click="loginGo('center')"></view>
<uni-popup ref="popup" background-color="#fff" @change="change">
<view class="popupBox">
<view class="ul">
<view class="li" v-for="(item,index) in portList" :key="index"
:class="{active:activeIndex == index}" @click="selectPort(item,index)">
<text>{{item.title}}</text>
</view>
</view>
<view class="btnBox">
<button class="btn" type="default" @click="close"> </button>
<button class="btn" type="primary" @click="toGo"> </button>
</view>
</view>
</uni-popup>
<uni-popup ref="popup2" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="未开通权限,请联系管理员"></uni-popup-dialog>
</uni-popup>
</view>
</view>
</template>
<script>
export default {
data() {
return {
// rtoswuhan1
account: 'rtoswuhan1',
// 123456
password: '123456',
//
pwdType: false,
//
type: "",
portList: [],
portId: "",
portName: "",
activeIndex: 0,
}
},
mounted() {
this.portList = [{
value: "1",
title: "港口1"
},
{
value: "2",
title: "港口2"
},
{
value: "3",
title: "港口3"
},
]
},
methods: {
//
rightIcon() {
this.pwdType = !this.pwdType
},
//
loginGo(type) {
if (this.account == "rtoswuhan1" && this.password == "123456") {
if (this.portList.length > 0) {
this.type = type
this.$refs.popup.open(type)
this.portId = this.portList[0].value
this.portName = this.portList[0].title
} else {
this.$refs.popup2.open()
}
}
},
//
change(e) {},
//
selectPort(item, index) {
this.portName = item.title
this.portId = item.value
this.activeIndex = index
},
//
toGo() {
let portObj = {
portName: this.portName,
portId: this.portId
}
uni.setStorageSync('portObj', portObj)
uni.setStorageSync('selectPortIndex', this.activeIndex)
this.$refs.popup.close()
uni.navigateTo({
url: '/pages/index/index'
})
},
//
close() {
this.$refs.popup.close()
},
}
}
</script>
<style lang="less" scoped>
.login {
height: calc(100vh - 44px);
display: flex;
flex-direction: column;
justify-content: center;
.loginBox {
width: 500px;
height: 300px;
border: 1px solid #999;
margin: 0 auto;
padding: 30px;
/deep/.van-cell {
margin-top: 20px;
}
.popupBox {
width: 500px;
height: 400px;
overflow: scroll;
padding: 30px;
line-height: 40px;
.ul {
display: felx;
flex-direction: column;
justify-content: space-between;
.li {
padding: 15px 0px;
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 10px;
}
.active {
color: #0079fe;
border-color: #0079fe;
}
}
.btnBox {
display: flex;
justify-content: space-between;
.btn {
flex: 1;
padding: 10px 0;
margin: 10px 20px;
}
}
}
}
.button {
color: #fff;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 4rpx;
border-radius: 12rpx;
height: 80rpx;
background-color: #0079fe;
margin-top: 50px;
}
}
</style>

View File

@ -1,15 +1,21 @@
<template>
<view class="abnormal">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.type}}</view>
<p>上传状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>贸易类型{{item.importExportFlagName}}</p>
<p>进出口{{item.tradeTypeName}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.type}}</view>
<p>上传状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>贸易类型{{item.importExportFlagName}}</p>
<p>进出口{{item.tradeTypeName}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -28,6 +34,13 @@
this.infoList = uni.getStorageSync('addAbnormalArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('abnormalRow', item);
@ -50,6 +63,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -38,6 +38,10 @@
<text v-else>{{remark}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -127,8 +131,8 @@
url: '/pages/shipWork/abnormal'
})
},
//
del() {
//
delConfirm() {
let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
addAbnormalArr.splice(this.abnormalRowIndex, 1)
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
@ -136,6 +140,10 @@
url: '/pages/shipWork/abnormal'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addAbnormalArr = uni.getStorageSync('addAbnormalArr')

View File

@ -10,22 +10,25 @@
:defaultValue="defaultValue" @result="resultConditon" />
</view>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in listInfo" :key="index" @click="togoCar(item)">
<p class="title">品牌{{item.brdName}}</p>
<p>提单号{{item.mnfBl}}</p>
<p>源类型{{item.sourceType}}</p>
<p>场位{{item.yardPos}}</p>
<p>航次{{item.vvyName}}</p>
<p>报关状态{{item.customsDeclareStatus}}</p>
<p>车型{{item.bvmName}}</p>
<p>数量{{item.amount}}</p>
<p>港口{{item.potName}}</p>
<p>报关单号{{item.customsDeclareNo}}</p>
<p>车型明细{{item.bvdName}}</p>
<p>货代{{item.agentName}}</p>
<template v-if="listInfo.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in listInfo" :key="index" @click="togoCar(item)">
<p class="title">品牌{{item.brdName}}</p>
<p>提单号{{item.mnfBl}}</p>
<p>源类型{{item.sourceType}}</p>
<p>场位{{item.yardPos}}</p>
<p>航次{{item.vvyName}}</p>
<p>报关状态{{item.customsDeclareStatus}}</p>
<p>车型{{item.bvmName}}</p>
<p>数量{{item.amount}}</p>
<p>港口{{item.potName}}</p>
<p>报关单号{{item.customsDeclareNo}}</p>
<p>车型明细{{item.bvdName}}</p>
<p>货代{{item.agentName}}</p>
</view>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#fff" />
</view>
</view>
</template>

View File

@ -60,10 +60,6 @@
name: "安全巡检",
url: "patrol"
},
// {
// name: "",
// url: "mixWork"
// },
{
name: "船舶资料",
url: "shipInfo"

View File

@ -5,11 +5,11 @@
<side-bar path='3'></side-bar>
<view class="content">
<view class="form">
<view class="select">
<!-- <view class="select">
<uni-data-select v-model="pamValue" :localdata="pamList" @change="pamChange"
placeholder="请选择港口">
</uni-data-select>
</view>
</view> -->
<view class="select">
<superwei-combox :candidates="shipList" :isJSON="true" keyName="spmName" placeholder="请选择船名航次"
v-model="shipName" @input="input_json" @select="select_json"></superwei-combox>
@ -100,7 +100,7 @@
return {
//
pamValue: "",
pamList: [],
// pamList: [],
//
shipName: "",
shipValue: '',
@ -121,7 +121,8 @@
HeadInfo,
},
mounted() {
this.getPam();
this.pamValue = uni.getStorageSync('portObj').portId
// this.getPam();
},
methods: {
//
@ -161,27 +162,27 @@
this.initData()
},
//
getPam() {
uni.request({
url: this.$local + '/api/shipOperate/queryPortArea',
header: {
'Content-Type': 'application/json' //
},
method: 'GET', //
success: (res) => {
console.log('接口返回------', res);
if (res.statusCode === 200) {
let arr = res.data.data;
arr.forEach((v, index) => {
this.pamList.push({
text: v.pamName,
value: v.pamId
})
})
}
}
})
},
// getPam() {
// uni.request({
// url: this.$local + '/api/shipOperate/queryPortArea',
// header: {
// 'Content-Type': 'application/json' //
// },
// method: 'GET', //
// success: (res) => {
// console.log('------', res);
// if (res.statusCode === 200) {
// let arr = res.data.data;
// arr.forEach((v, index) => {
// this.pamList.push({
// text: v.pamName,
// value: v.pamId
// })
// })
// }
// }
// })
// },
//
getShip() {
uni.request({
@ -198,8 +199,6 @@
}
})
},
//
pamChange(event) {},
//
input_json(e) {
this.shipInput = e;

View File

@ -1,16 +1,22 @@
<template>
<view class="mafi">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">马菲板号{{item.mafiBarcode}}</view>
<p>上传状态未上传</p>
<p>尺码{{item.size}}</p>
<p>类型{{item.lxTextValue}}</p>
<p>装卸方式{{item.loaderType}}</p>
<p>航次{{item.vvyName}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">马菲板号{{item.mafiBarcode}}</view>
<p>上传状态未上传</p>
<p>尺码{{item.size}}</p>
<p>类型{{item.lxTextValue}}</p>
<p>装卸方式{{item.loaderType}}</p>
<p>航次{{item.vvyName}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -29,6 +35,13 @@
this.infoList = uni.getStorageSync('addMafiArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('mafiRow', item);
@ -51,6 +64,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -49,6 +49,10 @@
<text v-else>{{loaderType}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -183,8 +187,8 @@
url: '/pages/shipWork/mafi'
})
},
//
del() {
//
delConfirm() {
let addMafiArr = uni.getStorageSync('addMafiArr')
addMafiArr.splice(this.mafiRowIndex, 1)
uni.setStorageSync('addMafiArr', addMafiArr);
@ -192,6 +196,10 @@
url: '/pages/shipWork/mafi'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addMafiArr = uni.getStorageSync('addMafiArr')

View File

@ -1,31 +1,40 @@
<template>
<view class="mixWork">
<view class="container">
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<view class="tabsList">
<view class="tabsBox" v-for="(item,index) in tabsList" :key="index" :class="{active:tabsIndex == index}"
@click="tabsClick(item,index)">{{item}}</view>
</view>
<!-- 人员信息列表 -->
<view class="ul" v-if="tabsType == 0">
<view class="li" v-for="(item,index) in peopleInfo" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>作业组数{{item.workSuite}}</p>
<p>单船人数{{item.shipPerson}}</p>
<p>状态未上传</p>
</view>
<template v-if="peopleInfo.length > 0">
<view class="li" v-for="(item,index) in peopleInfo" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>作业组数{{item.workSuite}}</p>
<p>单船人数{{item.shipPerson}}</p>
<p>状态未上传</p>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
</view>
<!-- 工班信息列表 -->
<view class="ul" v-if="tabsType == 1">
<view class="li" v-for="(item,index) in shiftInfo" :key="index" @click="lookShift(item,index)">
<view class="title">航次{{item.vvyName}}</view>
<view class="shift" v-for="(item2,index2) in item.shiftList" :key="index2">
<p>{{item2.gbTextValue}}</p>
<span>作业开始时间{{item2.startTime}}</span>
<template v-if="shiftInfo.length > 0">
<view class="li" v-for="(item,index) in shiftInfo" :key="index" @click="lookShift(item,index)">
<view class="title">航次{{item.vvyName}}</view>
<view class="shift" v-for="(item2,index2) in item.shiftList" :key="index2">
<p>{{item2.gbTextValue}}</p>
<span>作业开始时间{{item2.startTime}}</span>
</view>
<view class="state">状态未上传</view>
</view>
<view class="state">状态未上传</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
</view>
<view class="addBtn" @click="add('add')">+ </view>
</view>
@ -50,7 +59,6 @@
},
mounted() {
this.tabsType = this.$route.query.infoType
console.log(this.tabsType)
if (this.tabsType != 0 && this.tabsType != 1) {
this.tabsType = 0
this.tabsIndex = 0
@ -59,10 +67,15 @@
}
this.peopleInfo = uni.getStorageSync('addPeopleArr')
this.shiftInfo = uni.getStorageSync('addShiftArr')
console.log(this.shiftInfo)
this.shipInfo = uni.getStorageSync('shipInfo')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
tabsClick(item, index) {
this.tabsIndex = index;
if (item == "人员信息") {
@ -71,6 +84,7 @@
this.tabsType = 1;
}
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('peopleRow', item);
@ -106,6 +120,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.tabsList {
display: flex;
justify-content: center;

View File

@ -1,15 +1,21 @@
<template>
<view class="notice">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业日期{{item.workDate}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业日期{{item.workDate}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -28,6 +34,13 @@
this.infoList = uni.getStorageSync('addNoticeArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('noticeRow', item);
@ -50,6 +63,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -27,6 +27,10 @@
<text v-else>{{workDate}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -110,8 +114,8 @@
url: '/pages/shipWork/notice'
})
},
//
del() {
//
delConfirm() {
let addNoticeArr = uni.getStorageSync('addNoticeArr')
addNoticeArr.splice(this.noticeRowIndex, 1)
uni.setStorageSync('addNoticeArr', addNoticeArr);
@ -119,6 +123,10 @@
url: '/pages/shipWork/notice'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addNoticeArr = uni.getStorageSync('addNoticeArr')

View File

@ -1,15 +1,21 @@
<template>
<view class="opinion">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业日期{{item.workTime}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业日期{{item.workTime}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view>
<view class="addBtn" @click="add('add')">+ </view>
</view>
@ -30,6 +36,13 @@
this.infoList = uni.getStorageSync('addOpinionArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('opinionRow', item);
@ -52,6 +65,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -49,6 +49,10 @@
<text v-else>{{workTime}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -182,8 +186,8 @@
url: '/pages/shipWork/opinion'
})
},
//
del() {
//
delConfirm() {
let addOpinionArr = uni.getStorageSync('addOpinionArr')
addOpinionArr.splice(this.opinionRowIndex, 1)
uni.setStorageSync('addOpinionArr', addOpinionArr);
@ -191,6 +195,10 @@
url: '/pages/shipWork/opinion'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addOpinionArr = uni.getStorageSync('addOpinionArr')

View File

@ -1,15 +1,18 @@
<template>
<view class="patrol">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.type}}</view>
<p>上传状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.type}}</view>
<p>上传状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
</view>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>

View File

@ -46,6 +46,10 @@
<text v-else>{{remark}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -135,8 +139,8 @@
url: '/pages/shipWork/patrol'
})
},
//
del() {
//
delConfirm() {
let addPatrolArr = uni.getStorageSync('addPatrolArr')
addPatrolArr.splice(this.patrolRowIndex, 1)
uni.setStorageSync('addPatrolArr', addPatrolArr);
@ -144,6 +148,10 @@
url: '/pages/shipWork/patrol'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addPatrolArr = uni.getStorageSync('addPatrolArr')

View File

@ -49,6 +49,10 @@
<text v-else>{{peopleRow.jobStartTime}} - {{peopleRow.jobEndTime}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -197,8 +201,8 @@
url: '/pages/shipWork/mixWork?infoType=0'
})
},
//
del() {
//
delConfirm() {
let addPeopleArr = uni.getStorageSync('addPeopleArr')
addPeopleArr.splice(this.peopleRowIndex, 1)
uni.setStorageSync('addPeopleArr', addPeopleArr);
@ -206,6 +210,10 @@
url: '/pages/shipWork/mixWork?infoType=0'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addPeopleArr = uni.getStorageSync('addPeopleArr')

View File

@ -27,40 +27,45 @@
<uni-data-select v-model="zxValue" :localdata="zxList" @change="zxChange"></uni-data-select>
</view>
</view>
<view class="ulTop"><text @click="ulAdd1"></text><van-icon name="arrow-down" /></view>
<view class="ul ul2" v-for="(item,index) in ulList1" :key="index+'ul'">
<view class="li">
<p class="liTitle"><text class="required">*</text>工班</p>
<uni-data-select v-model="item.gbValue" :localdata="gbList"
@change="gbChange(item,index)"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>作业时间 </p>
<uni-datetime-picker v-model="item.datetime" type="datetimerange" rangeSeparator="-"
@change="changeLog(item)" />
</view>
</view>
<view class="ulTop"><text @click="ulAdd2"></text><text @click="del"></text><van-icon
name="arrow-down" /></view>
<view class="ul ul2" v-for="(item,index) in ulList2" :key="index+'ul2'">
<view class="li">
<p class="liTitle"><text class="required">*</text>车型</p>
<uni-data-select v-model="item.cxValue" :localdata="cxList"
@change="cxChange(item,index)"></uni-data-select>
</view>
<view class="li">
<p><text class="required">*</text>数量</p>
<uni-number-box @change="numChange" v-model="item.numValue" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>装卸方式</p>
<uni-data-select v-model="item.fsValue" :localdata="fsList"
@change="fsChange(item,index)"></uni-data-select>
</view>
<view class="li widthLi">
<p class="liTitle">备注</p>
<uni-easyinput type="textarea" autoHeight v-model="item.notes" placeholder="请输入任务描述(200字以内)"
maxlength="200"></uni-easyinput>
<view class="widthLi" v-for="(item,index) in ulList1" :key="index+'ul'">
<view class="ulTop"><text @click="ulAdd1"></text><text v-if="index > 0"
@click="delGb(index)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul">
<view class="li">
<p class="liTitle"><text class="required">*</text>工班</p>
<uni-data-select v-model="item.gbValue" :localdata="gbList"
@change="gbChange(item,index)"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>作业时间 </p>
<uni-datetime-picker v-model="item.datetime" type="datetimerange" rangeSeparator="-"
@change="changeLog(item)" />
</view>
<view class="widthLi" v-for="(item2,index2) in item.ulList2" :key="index2+'ul2'">
<view class="ulTop"><text @click="ulAdd2(index)"></text></text><text v-if="index2 > 0"
@click="delGb2(index,index2)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul">
<view class="li">
<p class="liTitle"><text class="required">*</text>车型</p>
<uni-data-select v-model="item2.cxValue" :localdata="cxList"
@change="cxChange(item,index,item2,index2)"></uni-data-select>
</view>
<view class="li">
<p><text class="required">*</text>数量</p>
<uni-number-box @change="numChange" v-model="item2.numValue" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>装卸方式</p>
<uni-data-select v-model="item2.fsValue" :localdata="fsList"
@change="fsChange(item,index,item2,index2)"></uni-data-select>
</view>
<view class="li widthLi">
<p class="liTitle">备注</p>
<uni-easyinput type="textarea" autoHeight v-model="item2.notes"
placeholder="请输入任务描述(200字以内)" maxlength="200"></uni-easyinput>
</view>
</view>
</view>
</view>
</view>
</template>
@ -68,7 +73,8 @@
<!-- 翻仓信息 -->
<template v-if="active == 1">
<view v-for="(item,index) in fcUlList" :key="index + 'fc'">
<view class="ulTop"><text @click="fcAdd"></text><van-icon name="arrow-down" /></view>
<view class="ulTop"><text @click="fcAdd"></text><text v-if="index > 0"
@click="delFc(index)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul fcUl">
<view class="li">
<p class="liTitle"><text class="required">*</text>翻仓类型</p>
@ -77,8 +83,8 @@
</view>
</view>
<view v-for="(item2,index2) in item.fcUlList2" :key="index2 + 'fc2'">
<view class="ulTop"><text @click="fcAdd2(index)"></text></text><text v-if="index2 > 0"
@click="delFc(index,index2)">删除</text><van-icon name="arrow-down" /></view>
<view class="ulTop"><text @click="fcAdd2(index)"></text></text><text v-if="index2 > 0"
@click="delFc2(index,index2)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul ul2 fcUl2">
<view class="li">
<p class="liTitle"><text class="required">*</text>翻舱起点位置</p>
@ -216,17 +222,17 @@
datetime: ['', ''],
startTime: "",
endTime: "",
ulList2: [{
cxValue: "",
cxTextValue: "",
numValue: 0,
fsValue: "",
fsTextValue: "",
notes: "",
}],
}],
//
gbList: [],
ulList2: [{
cxValue: "",
cxTextValue: "",
numValue: 0,
fsValue: "",
fsTextValue: "",
notes: "",
}],
//
cxList: [],
//
@ -336,7 +342,6 @@
this.zxValue = this.dataInfo.zxId
this.zxTextValue = this.dataInfo.zxTextValue
this.ulList1 = this.dataInfo.shiftList
this.ulList2 = this.dataInfo.shiftList2
this.fcUlList = this.dataInfo.fcList
this.otherObj = this.dataInfo.otherList
},
@ -359,13 +364,28 @@
}
})
},
//
//
ulAdd1() {
this.ulList1.push({
datetime: ['', ''],
gbValue: "",
gbTextValue: ""
gbTextValue: "",
ulList2: [{
cxValue: "",
cxTextValue: "",
numValue: 0,
fsValue: "",
fsTextValue: "",
notes: "",
}],
})
},
ulAdd2(index) {
this.ulList1[index].ulList2.push({
cxValue: "",
numValue: 0,
fsValue: "",
notes: "",
})
},
//
@ -382,35 +402,30 @@
item.startTime = item.datetime[0].slice(0, item.datetime[0].length - 3)
item.endTime = item.datetime[1].slice(0, item.datetime[1].length - 3)
},
//
ulAdd2() {
this.ulList2.push({
cxValue: "",
numValue: 0,
fsValue: "",
notes: "",
})
//
delGb(index) {
this.ulList1.splice(index, 1)
},
del() {
this.ulList2.splice(0, 1)
delGb2(index, index2) {
this.ulList1[index].ulList2.splice(index2, 1)
},
//
cxChange(item, index) {
this.ulList2[index].cxValue = item.cxValue
cxChange(item, index, item2, index2) {
this.ulList1[index].ulList2[index2].cxValue = item2.cxValue
this.cxList.forEach(v => {
if (v.value == item.cxValue) {
item.cxTextValue = v.text
if (v.value == item2.cxValue) {
item2.cxTextValue = v.text
}
})
},
//
numChange(val) {},
//
fsChange(item, index) {
this.ulList2[index].fsValue = item.fsValue
fsChange(item, index, item2, index2) {
this.ulList1[index].ulList2[index2].fsValue = item2.fsValue
this.fsList.forEach(v => {
if (v.value == item.fsValue) {
item.fsTextValue = v.text
if (v.value == item2.fsValue) {
item2.fsTextValue = v.text
}
})
},
@ -468,7 +483,10 @@
})
},
//
delFc(index, index2) {
delFc(index) {
this.fcUlList.splice(index, 1)
},
delFc2(index, index2) {
this.fcUlList[index].fcUlList2.splice(index2, 1)
},
@ -495,7 +513,6 @@
zxName: this.zxTextValue,
zxId: this.zxValue,
shiftList: this.ulList1,
shiftList2: this.ulList2,
fcList: this.fcUlList,
otherList: this.otherObj
}
@ -627,7 +644,6 @@
.widthLi {
width: 100%;
}
}
.ul2 {

View File

@ -26,7 +26,7 @@
<text> {{dataInfo.zxName}}</text>
</view>
</view>
<view class="ul bUl" v-for="(item,index) in dataInfo.shiftList" :key="index + 'a'">
<view class="ul bUl borTop" v-for="(item,index) in dataInfo.shiftList" :key="index + 'a'">
<view class="li">
<p>工班</p>
<text> {{item.gbTextValue}}</text>
@ -35,19 +35,19 @@
<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 class="ul bUl" v-for="(item2,index2) in item.ulList2" :key="index2 + 'b'">
<view class="li">
<p>车型</p>
<text>{{item2.cxTextValue}}</text>
</view>
<view class="li">
<p>数量</p>
<text>{{item2.numValue}}</text>
</view>
<view class="li wLi">
<p>备注</p>
<text>{{item2.notes}}</text>
</view>
</view>
</view>
</custom-tab-pane>
@ -135,6 +135,10 @@
</view>
</custom-tab-pane>
</custom-tabs>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" @click="del"></van-button>
@ -177,8 +181,8 @@
url: '/pages/shipWork/mixWork?infoType=1'
})
},
//
del() {
//
delConfirm() {
let addShiftArr = uni.getStorageSync('addShiftArr')
addShiftArr.splice(this.shiftRowIndex, 1)
uni.setStorageSync('addShiftArr', addShiftArr);
@ -186,6 +190,10 @@
url: '/pages/shipWork/mixWork?infoType=1'
})
},
//
del() {
this.$refs.popup.open()
},
//
edit(state) {
this.obj = {
@ -216,14 +224,6 @@
line-height: 35px;
font-size: 16px;
}
.ul {
border-bottom: 1px dashed #ccc;
}
.ul:last-child {
border: none;
}
}
.otherInfo {
@ -236,12 +236,6 @@
}
}
.ul[data-v-298cacec] {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.ul {
display: flex;
justify-content: space-between;
@ -266,9 +260,17 @@
}
.bUl {
width: 100%;
}
.borTop {
border-top: 1px solid #999;
}
.borBtm {
border-bottom: 1px solid #999;
}
.btnList {
display: flex;
justify-content: center;

View File

@ -0,0 +1,225 @@
<template>
<view class="container">
<view class="sigh-btns">
<van-button class="btn" type="default" @tap="handleCancel"></van-button>
<van-button class="btn" type="default" @tap="handleReset"></van-button>
<van-button class="btn" type="default" @tap="handleConfirm"></van-button>
<!-- <button class="btn" @tap="handleCancel"></button>
<button class="btn" @tap="handleReset"></button>
<button class="btn" @tap="handleConfirm"></button> -->
</view>
<view class="sign-box">
<canvas class="mycanvas" :style="{width:width +'px',height:height +'px'}" canvas-id="mycanvas"
@touchstart="touchstart" @touchmove="touchmove" @touchend="touchend"></canvas>
<canvas canvas-id="camCacnvs" :style="{width:height +'px',height:width +'px'}" class="canvsborder"></canvas>
</view>
</view>
</template>
<script>
var x = 20;
var y = 20;
var tempPoint = []; //
var id = 0;
var type = '';
let that;
let canvasw;
let canvash;
export default {
data() {
return {
ctx: '', //
points: [], //,
width: 0,
height: 0
};
},
mounted() {},
onLoad(option) {
that = this;
console.log(option);
id = option.id;
type = option.type;
this.ctx = uni.createCanvasContext('mycanvas', this); //
//
this.ctx.lineWidth = 4;
this.ctx.lineCap = 'round';
this.ctx.lineJoin = 'round';
uni.getSystemInfo({
success: function(res) {
console.log(res);
that.width = res.windowWidth * 0.8;
that.height = res.windowHeight * 0.85;
}
});
},
methods: {
//
touchstart: function(e) {
let startX = e.changedTouches[0].x;
let startY = e.changedTouches[0].y;
let startPoint = {
X: startX,
Y: startY
};
/* **************************************************
#由于uni对canvas的实现有所不同这里需要把起点存起来
* **************************************************/
this.points.push(startPoint);
//
this.ctx.beginPath();
},
//
touchmove: function(e) {
let moveX = e.changedTouches[0].x;
let moveY = e.changedTouches[0].y;
let movePoint = {
X: moveX,
Y: moveY
};
this.points.push(movePoint); //
let len = this.points.length;
if (len >= 2) {
this.draw(); //
}
tempPoint.push(movePoint);
},
//
touchend: function() {
this.points = [];
},
/* ***********************************************
# 绘制笔迹
# 1.为保证笔迹实时显示必须在移动的同时绘制笔迹
# 2.为保证笔迹连续每次从路径集合中区两个点作为起点moveTo和终点(lineTo)
# 3.将上一次的终点作为下一次绘制的起点即清除第一个点
************************************************ */
draw: function() {
let point1 = this.points[0];
let point2 = this.points[1];
this.points.shift();
this.ctx.moveTo(point1.X, point1.Y);
this.ctx.lineTo(point2.X, point2.Y);
this.ctx.stroke();
this.ctx.draw(true);
},
handleCancel() {
uni.navigateBack({
delta: 1
});
},
//
handleReset: function() {
console.log('handleReset');
that.ctx.clearRect(0, 0, that.width, that.height);
that.ctx.draw(true);
tempPoint = [];
},
//
handleConfirm: function() {
if (tempPoint.length == 0) {
uni.showToast({
title: '请先签名',
icon: 'none',
duration: 2000
});
return;
}
uni.canvasToTempFilePath({
canvasId: 'mycanvas',
success: function(res) {
let tempPath = res.tempFilePath;
console.log(tempPath)
const ctx = uni.createCanvasContext('camCacnvs', that);
ctx.translate(0, that.width);
ctx.rotate((-90 * Math.PI) / 180);
ctx.drawImage(tempPath, 0, 0, that.width, that.height);
ctx.draw();
setTimeout(() => {
//
uni.canvasToTempFilePath({
canvasId: 'camCacnvs',
success: function(res) {
//
let path = res.tempFilePath;
},
fail: err => {
console.log('fail', err);
}
},
this
);
}, 200);
}
});
}
}
};
</script>
<style lang="scss" scoped>
.container {
display: flex;
flex-direction: row;
height: 100%;
padding: 50px 0;
}
.sign-box {
width: 80%;
height: 90%;
margin: auto;
display: flex;
flex-direction: column;
text-align: center;
}
.sign-view {
height: 100%;
}
.sigh-btns {
height: 100%;
margin: auto;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.btn {
margin: 30px 0px;
padding: 8rpx;
transform: rotate(90deg);
border: grey 1rpx solid;
width: 100px;
height: 50px;
}
.mycanvas {
margin: auto 0rpx;
background-color: #ececec;
}
.canvsborder {
border: 1rpx solid #333;
position: fixed;
top: 0;
left: 10000rpx;
}
</style>

View File

@ -1,15 +1,21 @@
<template>
<view class="supply">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.supplyType}}</view>
<p>状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">类型{{item.supplyType}}</view>
<p>状态未上传</p>
<p>航次{{item.vvyName}}</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -29,6 +35,13 @@
console.log(this.infoList)
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('supplyRow', item);
@ -51,6 +64,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -44,6 +44,10 @@
<text v-else>{{supplyDate}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -170,8 +174,8 @@
url: '/pages/shipWork/supply'
})
},
//
del() {
//
delConfirm() {
let addSupplyArr = uni.getStorageSync('addSupplyArr')
addSupplyArr.splice(this.supplyRowIndex, 1)
uni.setStorageSync('addSupplyArr', addSupplyArr);
@ -179,6 +183,10 @@
url: '/pages/shipWork/supply'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addSupplyArr = uni.getStorageSync('addSupplyArr')

View File

@ -52,6 +52,10 @@
<text v-else>{{noProductBerthTime}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -179,8 +183,8 @@
url: '/pages/shipWork/untieCord'
})
},
//
del() {
//
delConfirm() {
let addUntieArr = uni.getStorageSync('addUntieArr')
addUntieArr.splice(this.untieRowIndex, 1)
uni.setStorageSync('addUntieArr', addUntieArr);
@ -188,6 +192,10 @@
url: '/pages/shipWork/untieCord'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addUntieArr = uni.getStorageSync('addUntieArr')

View File

@ -1,16 +1,22 @@
<template>
<view class="untieCord">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>泊位{{item.bthIdName}}</p>
<p>系缆时间{{item.attachTime}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>泊位{{item.bthIdName}}</p>
<p>系缆时间{{item.attachTime}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -29,6 +35,13 @@
this.infoList = uni.getStorageSync('addUntieArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('untieRow', item);
@ -51,6 +64,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -1,15 +1,21 @@
<template>
<view class="workAssign">
<view class="container">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业时间{{item.startTime}} - {{item.endTime}}</p>
</view>
<view class="signBox">
<p class="sign" @click="sign"></p>
</view>
<template v-if="infoList.length > 0">
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="add('look',item,index)">
<view class="title">航次{{item.vvyName}}</view>
<p>状态未上传</p>
<p>进出口{{item.importExportFlagName}}</p>
<p>贸易类型{{item.tradeTypeName}}</p>
<p>作业时间{{item.startTime}} - {{item.endTime}}</p>
</view>
</view>
</template>
<o-empty v-else height="70vh" bg="#f5f6fa" />
<view class="addBtn" @click="add('add')">+ </view>
</view>
</view>
@ -28,6 +34,13 @@
this.infoList = uni.getStorageSync('addAssignArr')
},
methods: {
//
sign() {
uni.navigateTo({
url: '/pages/shipWork/sign'
})
},
//
add(state, item, index) {
if (state != 'add') {
uni.setStorageSync('assignRow', item);
@ -50,6 +63,19 @@
.container {
padding: 30px 20px;
.signBox {
display: flex;
justify-content: flex-end;
.sign {
text-align: right;
color: #2979ff;
padding: 10px;
background: #fff;
border: 1px solid #ccc;
}
}
.ul {
padding: 20px 0;

View File

@ -60,6 +60,10 @@
<text v-else>{{startTime}} - {{endTime}}</text>
</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" confirmText="确定" title="通知" content="是否删除此条数据"
@confirm="delConfirm"></uni-popup-dialog>
</uni-popup>
<view class="btnList">
<van-button type="default" @click="cancel"></van-button>
<van-button type="danger" v-if="obj.state == 'look'" @click="del"></van-button>
@ -224,8 +228,8 @@
url: '/pages/shipWork/workAssign'
})
},
//
del() {
//
delConfirm() {
let addAssignArr = uni.getStorageSync('addAssignArr')
addAssignArr.splice(this.assignRowIndex, 1)
uni.setStorageSync('addAssignArr', addAssignArr);
@ -233,6 +237,10 @@
url: '/pages/shipWork/workAssign'
})
},
//
del() {
this.$refs.popup.open()
},
//
save() {
let addAssignArr = uni.getStorageSync('addAssignArr')