2023-07-12 17:46:47 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="supply">
|
|
|
|
|
<view class="container">
|
2023-07-24 16:56:46 +08:00
|
|
|
|
<view class="signBox">
|
|
|
|
|
<p class="sign" @click="sign">点击签名</p>
|
2023-07-20 17:16:08 +08:00
|
|
|
|
</view>
|
2023-07-24 16:56:46 +08:00
|
|
|
|
<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" />
|
2023-07-12 17:46:47 +08:00
|
|
|
|
<view class="addBtn" @click="add('add')">+ 新增</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-08-01 09:32:45 +08:00
|
|
|
|
import sqlite from "../../common/sqlite.js"
|
2023-07-12 17:46:47 +08:00
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-07-20 17:16:08 +08:00
|
|
|
|
shipInfo: {},
|
|
|
|
|
infoList: []
|
2023-07-12 17:46:47 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
2023-07-20 17:16:08 +08:00
|
|
|
|
mounted() {
|
2023-08-01 09:32:45 +08:00
|
|
|
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
|
|
|
|
// this.infoList = uni.getStorageSync('addSupplyArr')
|
|
|
|
|
this.executeSql1('shipmentShipSupplyRespList')
|
2023-07-20 17:16:08 +08:00
|
|
|
|
},
|
2023-07-12 17:46:47 +08:00
|
|
|
|
methods: {
|
2023-08-01 09:32:45 +08:00
|
|
|
|
// 查
|
2023-08-01 14:35:05 +08:00
|
|
|
|
executeSql1(tableName) {
|
|
|
|
|
let sql = `select * from ${tableName}`
|
2023-08-01 09:32:45 +08:00
|
|
|
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
|
|
|
|
// 在resolve时执行的回调函数
|
|
|
|
|
this.infoList = value
|
|
|
|
|
console.log(this.infoList)
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
// 在reject时执行的回调函数
|
|
|
|
|
console.error(error);
|
|
|
|
|
});
|
|
|
|
|
},
|
2023-07-24 16:56:46 +08:00
|
|
|
|
// 点击签名
|
|
|
|
|
sign() {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/shipWork/sign'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击新增
|
2023-07-20 17:16:08 +08:00
|
|
|
|
add(state, item, index) {
|
|
|
|
|
if (state != 'add') {
|
|
|
|
|
uni.setStorageSync('supplyRow', item);
|
|
|
|
|
uni.setStorageSync('supplyRowIndex', index);
|
|
|
|
|
}
|
2023-07-12 17:46:47 +08:00
|
|
|
|
const obj = {
|
|
|
|
|
state: state,
|
|
|
|
|
}
|
|
|
|
|
const params = encodeURIComponent(JSON.stringify(obj));
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/shipWork/supplyAdd?params=${params}`
|
|
|
|
|
})
|
|
|
|
|
},
|
2023-08-01 09:32:45 +08:00
|
|
|
|
onBackPress(event) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pages/shipWork/documentList'
|
|
|
|
|
})
|
|
|
|
|
return true;
|
|
|
|
|
},
|
2023-07-12 17:46:47 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.supply {
|
|
|
|
|
.container {
|
|
|
|
|
padding: 30px 20px;
|
|
|
|
|
|
2023-07-24 16:56:46 +08:00
|
|
|
|
.signBox {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
|
|
.sign {
|
|
|
|
|
text-align: right;
|
|
|
|
|
color: #2979ff;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-20 17:16:08 +08:00
|
|
|
|
.ul {
|
2023-07-12 17:46:47 +08:00
|
|
|
|
padding: 20px 0;
|
|
|
|
|
|
2023-07-20 17:16:08 +08:00
|
|
|
|
.li {
|
2023-07-12 17:46:47 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.shift {
|
|
|
|
|
p {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.state {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.addBtn {
|
|
|
|
|
position: fixed;
|
|
|
|
|
right: 50px;
|
|
|
|
|
bottom: 50px;
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 100px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background-color: #2979ff;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 100px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|