样式修改,逻辑修改

dev2
Panzihang 2023-08-18 17:28:11 +08:00
parent e71d539aa8
commit 49baa9bc22
49 changed files with 1415 additions and 528 deletions

View File

@ -32,6 +32,8 @@ module.exports = {
this.createMafiListRespList() this.createMafiListRespList()
// 创建安全巡检 // 创建安全巡检
this.createSafetyInspectionRespList() this.createSafetyInspectionRespList()
// 创建安全巡检图片上传地址
this.createSafetyInspectionRespUrlList()
// 创建作业查询 // 创建作业查询
this.createShipmentShipLoadPlansRespList() this.createShipmentShipLoadPlansRespList()
// 创建船舶资料 // 创建船舶资料
@ -123,6 +125,12 @@ module.exports = {
'CREATE TABLE if not exists safetyInspectionRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"type" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));' 'CREATE TABLE if not exists safetyInspectionRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"type" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql) this.executeSql(sql)
}, },
// 创建安全巡检图片上传地址 safetyInspectionRespUrlList
createSafetyInspectionRespUrlList() {
let sql =
'CREATE TABLE if not exists safetyInspectionRespUrlList ("webId" text NOT NULL,"contactId" text,"url" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建作业查询 shipmentShipLoadPlansRespList // 创建作业查询 shipmentShipLoadPlansRespList
createShipmentShipLoadPlansRespList() { createShipmentShipLoadPlansRespList() {
let sql = let sql =

View File

@ -23,7 +23,6 @@ module.exports = {
}, },
compress(base64String, w, quality) { compress(base64String, w, quality) {
console.log(base64String.length);
var getMimeType = (urlData) => { var getMimeType = (urlData) => {
var arr = urlData.split(","); var arr = urlData.split(",");
var mime = arr[0].match(/:(.*?);/)[1]; var mime = arr[0].match(/:(.*?);/)[1];
@ -55,7 +54,6 @@ module.exports = {
ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(newImage, 0, 0, canvas.width, canvas.height); ctx.drawImage(newImage, 0, 0, canvas.width, canvas.height);
var base64 = canvas.toDataURL(getMimeType(base64String), quality); var base64 = canvas.toDataURL(getMimeType(base64String), quality);
console.log(base64);
return base64; return base64;
}); });

View File

@ -1,42 +1,58 @@
<template> <template>
<view class="headInfo"> <view class="headInfo">
<view class="info" @click="showInfo"> <view class="infoLeft">
<image class="toux" src="@/static/images/theme/toux.png" mode="widthFix"></image> <view class="infoLogo">
<text>wchenp</text> <image src="../../static/images/theme/logo.png" mode="" class="logo"></image>
<uni-icons type="gear" size="21" />
</view>
<view class="infoList" v-if="infoType">
<view class="userInfo">
<p>张星星 - 堆场计划员</p>
<p>12341234567</p>
</view> </view>
<view class="borTop" @click="tabsPort('center')"> <view class="navList">
<uni-icons type="loop" size="16" /> <template v-for="(item,index) in navList">
<text>切换港区</text> <navigator :key="index" :url="item.url" open-type="redirect" class="item">
</view> <view class="itemInfo" :class="item.type?'navActive':''">
<view class="borTop" @click="outLogin"> <image :src="item.imageUrl" v-if="item.type"></image>
<uni-icons type="undo" size="16" /> <image :src="item.imageUrl2" v-if="!item.type"></image>
<text>退出登录</text> <text>{{item.name}}</text>
</view>
</navigator>
</template>
</view> </view>
</view> </view>
<uni-popup ref="popup" background-color="#fff" @change="change"> <view class="infoRight">
<view class="popupBox"> <view class="info" @click="showInfo">
<view class="ul"> <image class="toux" src="@/static/images/theme/toux.png" mode="widthFix"></image>
<view class="li" v-for="(item,index) in portList" :key="index" </view>
:class="{active:activeIndex == index}" @click="selectPort(item,index)"> <view class="infoList" v-if="infoType">
<text>{{item.title}}</text> <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>
</view> </view>
<view class="btnBox"> </uni-popup>
<button class="btn" type="default" @click="close"> </button> <uni-popup ref="popup2" type="dialog">
<button class="btn" type="primary" @click="toGo"> </button> <uni-popup-dialog confirmText="确定" content="是否退出登录?" @close="close2"
</view> @confirm="outConfirm"></uni-popup-dialog>
</view> </uni-popup>
</uni-popup> </view>
<uni-popup ref="popup2" type="dialog">
<uni-popup-dialog confirmText="确定" content="是否退出登录?" @close="close2"
@confirm="outConfirm"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
@ -63,12 +79,53 @@
portId: "", portId: "",
portName: "", portName: "",
activeIndex: 0, activeIndex: 0,
navList: [{
url: "/pages/index/index",
name: "装船指令",
type: false,
imageUrl: "../../static/images/theme/zcIcon1-1.png",
imageUrl2: "../../static/images/theme/zcIcon1-2.png"
},
{
url: "/pages/discharge/index",
name: "卸船指令",
type: false,
imageUrl: "../../static/images/theme/xcIcon1-1.png",
imageUrl2: "../../static/images/theme/xcIcon1-2.png"
}, {
url: "/pages/shipWork/index",
name: "船舶作业",
type: false,
imageUrl: "../../static/images/theme/cbIcon1-1.png",
imageUrl2: "../../static/images/theme/cbIcon1-2.png"
}, {
url: "/pages/quality/index",
name: "货物质量",
type: false,
imageUrl: "../../static/images/theme/cbIcon1-1.png",
imageUrl2: "../../static/images/theme/cbIcon1-2.png"
}, {
url: "/pages/monitor/index",
name: "场位监控",
type: false,
imageUrl: "../../static/images/theme/cbIcon1-1.png",
imageUrl2: "../../static/images/theme/cbIcon1-2.png"
}
],
} }
}, },
props: {
navIndex: {
type: Number,
default: 0,
required: true
},
},
mounted() { mounted() {
this.activeIndex = uni.getStorageSync("selectPortIndex") this.activeIndex = uni.getStorageSync("selectPortIndex")
this.portId = this.portList[this.activeIndex].value this.portId = this.portList[this.activeIndex].value
this.portName = this.portList[this.activeIndex].title this.portName = this.portList[this.activeIndex].title
this.navList[this.navIndex].type = true
}, },
methods: { methods: {
showInfo() { showInfo() {
@ -127,50 +184,102 @@
<style lang="less" scoped> <style lang="less" scoped>
.headInfo { .headInfo {
width: 100%; width: 100%;
height: 40px; height: 66px;
line-height: 40px; line-height: 66px;
background-color: #fff; background-color: #fff;
border-bottom: 1px solid #999999; border-bottom: 1px solid #999999;
display: flex; display: flex;
justify-content: flex-end; justify-content: space-between;
position: relative; position: relative;
.info { .infoLeft {
width: 120px;
display: flex; display: flex;
justify-content: space-around;
.toux { .logo {
margin-top: 10rpx; width: 175px;
width: 26px; height: 32px;
height: 26px; margin: 16px;
border-radius: 30px; margin-left: 24px;
overflow: hidden; }
.navList {
display: flex; display: flex;
flex-direction: column; margin-top: 12px;
justify-content: center;
.item {
width: 124px;
height: 42px;
line-height: 42px;
border-radius: 8px;
background: #F2F7FC;
margin-right: 16px;
.itemInfo {
width: 100%;
height: 100%;
color: #445173;
font-size: 16px;
font-weight: 500;
display: flex;
justify-content: center;
}
image {
width: 20px;
height: 20px;
margin-top: 9px;
margin-right: 6px;
}
}
.navActive {
background: #0067CF;
color: #fff !important;
border-radius: 8px;
}
} }
} }
.infoList { .infoRight {
width: 200px;
height: 190px;
padding: 10px 20px;
border-radius: 8px;
background-color: #fff;
z-index: 999;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: center;
position: absolute;
right: 0;
top: 40px;
.borTop { .info {
border-top: 1px #ccc solid; margin-right: 20px;
/deep/.uni-icons { .toux {
margin-right: 10px; margin-top: 10rpx;
width: 30px;
height: 30px;
border-radius: 50%;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
}
}
.infoList {
width: 200px;
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: 60px;
.borTop {
border-top: 1px #ccc solid;
/deep/.uni-icons {
margin-right: 10px;
}
} }
} }
} }

View File

@ -15,21 +15,16 @@
船舶作业 船舶作业
</view> </view>
</navigator> </navigator>
<view url="/pages/quality/index" open-type="redirect"> <navigator url="/pages/quality/index" open-type="redirect">
<view class="item" :class="path==4?'active':''"> <view class="item" :class="path==4?'active':''">
货物质量 货物质量
</view> </view>
</view> </navigator>
<navigator url="/pages/monitor/index" open-type="redirect"> <navigator url="/pages/monitor/index" open-type="redirect">
<view class="item" :class="path==5?'active':''"> <view class="item" :class="path==5?'active':''">
场位监控 场位监控
</view> </view>
</navigator> </navigator>
<navigator url="/pages/test/ceshi" open-type="redirect">
<view class="item" :class="path==6?'active':''">
测试
</view>
</navigator>
</view> </view>
</template> </template>
<script> <script>

View File

@ -1,28 +1,25 @@
<template> <template>
<view class="app"> <view class="app">
<head-info></head-info> <head-info :navIndex="1"></head-info>
<view class="container"> <view class="container">
<side-bar path='2'></side-bar>
卸船指令 卸船指令
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info'; import HeadInfo from '@/components/head-info/head-info';
export default { export default {
data() { data() {
return { return {
ltemList:[1,1,1,1,2,1,1,1,1], ltemList: [1, 1, 1, 1, 2, 1, 1, 1, 1],
} }
}, },
onLoad() { onLoad() {
}, },
components: { components: {
SideBar,
HeadInfo HeadInfo
}, },
methods: { methods: {
@ -60,6 +57,7 @@
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
.item { .item {
width: 32%; width: 32%;
margin-top: 15px; margin-top: 15px;
@ -67,6 +65,7 @@
height: 160px; height: 160px;
border: 1px solid #c9cacb; border: 1px solid #c9cacb;
padding: 22px 15px; padding: 22px 15px;
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -74,23 +73,27 @@
margin-bottom: 20px; margin-bottom: 20px;
font-weight: 700; font-weight: 700;
} }
.status { .status {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
} }
.row { .row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 18px; font-size: 18px;
margin: 10px 0; margin: 10px 0;
.text { .text {
display: block; display: block;
} }
} }
} }
.item:nth-child(3n) { .item:nth-child(3n) {
margin-right: 0; margin-right: 0;
} }
} }
} }
</style> </style>

View File

@ -1,8 +1,7 @@
<template> <template>
<view class="app"> <view class="app">
<head-info></head-info> <head-info :navIndex="0"></head-info>
<view class="container"> <view class="container">
<side-bar path='1'></side-bar>
<view class="content"> <view class="content">
<view class="form"> <view class="form">
<view class="end"> <view class="end">
@ -60,7 +59,6 @@
</template> </template>
<script> <script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info'; import HeadInfo from '@/components/head-info/head-info';
import sqlite from "../../common/sqlite.js" import sqlite from "../../common/sqlite.js"
import rSqlite from "../../common/rSqlite.js" import rSqlite from "../../common/rSqlite.js"
@ -80,11 +78,8 @@
shipList: [] shipList: []
} }
}, },
onLoad() { onLoad() {},
// this.loadList()
},
components: { components: {
SideBar,
HeadInfo HeadInfo
}, },
methods: { methods: {
@ -169,15 +164,15 @@
let data = { let data = {
id: 1, id: 1,
fromId: '123', fromId: '123',
toId: '321', toId: '321',
content: 'bihao1', content: 'bihao1',
flag: 1 flag: 1
} // => "'1','123','312'" } // => "'1','123','312'"
data.id = Math.floor(Math.random() * 100); data.id = Math.floor(Math.random() * 100);
let dbTable = 'cesTable' let dbTable = 'cesTable'
let Arr = [] let Arr = []
for (let key in data) { for (let key in data) {
Arr.push(`'${data[key]}'`); Arr.push(`'${data[key]}'`);
} }
let Str = Arr.join(',') let Str = Arr.join(',')
@ -319,7 +314,6 @@
justify-content: flex-end; justify-content: flex-end;
.end { .end {
width: 500px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -328,7 +322,7 @@
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
padding-left: 10px; padding-left: 10px;
margin-left: 15px; margin-right: 15px;
} }
.btn { .btn {

View File

@ -1,62 +1,98 @@
<template> <template>
<view class="app"> <view class="app">
<head-view v-show="current!=2" title="船名/航次"></head-view> <head-view title="船名/航次"></head-view>
<head-info v-show="current==2"></head-info>
<view class="content"> <view class="content">
<view class="form"> <view class="form">
<view class="input"> <view class="uni-list">
<superwei-combox class="input" :candidates="mnfBlList" :isJSON="true" keyName="mnfBl" <radio-group class="group" @change="radioChange">
placeholder="提单号" v-model="mnfBl" @input="mnfBlInput" @select="mnfBlSelect"></superwei-combox> <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
</uni-easyinput> <view>
<radio :value="item.value" :checked="index === current" />{{item.name}}
</view>
</label>
</radio-group>
</view> </view>
<view class="select" v-show="current!=0"> <view class="inputBox">
<uni-data-select v-model="harbour" :localdata="harbourRange" @change="change('harbour')" <view class="input">
placeholder="港区"> <superwei-combox class="input" :candidates="mnfBlList" :isJSON="true" keyName="mnfBl"
</uni-data-select> placeholder="提单号" v-model="mnfBl" @input="mnfBlInput"
@select="mnfBlSelect"></superwei-combox>
</uni-easyinput>
</view>
<!-- <view class="select" v-show="current!=0">
<uni-data-select v-model="harbour" :localdata="harbourRange" @change="change('harbour')"
placeholder="港区">
</uni-data-select>
</view> -->
<!-- <view class="select" v-show="current!=0">
<uni-data-select v-model="type" :localdata="typeRange" @change="change('type')"
placeholder="贸易类型">
</uni-data-select>
</view> -->
<view class="input">
<superwei-combox class="input" :candidates="brandList" :isJSON="true" keyName="brdName"
placeholder="品牌" v-model="brdName" @input="brandInput"
@select="brandSelect"></superwei-combox>
</uni-easyinput>
</view>
<!-- <view class="select" v-show="current!=0">
<superwei-combox class="input" :candidates="bvmList" :isJSON="true" keyName="bvmName"
placeholder="车型" v-model="bvmName" @input="bvmInput" @select="bvmSelect"></superwei-combox>
</uni-easyinput>
</view> -->
<view class="select">
<superwei-combox class="input" :candidates="potList" :isJSON="true" keyName="potName"
placeholder="港口" v-model="potName" @input="potInput" @select="potSelect"></superwei-combox>
</uni-easyinput>
</view>
<!-- <view class="select" v-show="current!=0">
<uni-data-select v-model="status" :localdata="statusRange" @change="change('status')"
placeholder="计划状态">
</uni-data-select>
</view> -->
<button class="btn" @click="screen" v-show='current==0'>筛选</button>
<button class="btn" @click="onSearch"></button>
</view> </view>
<view class="select" v-show="current!=0">
<uni-data-select v-model="type" :localdata="typeRange" @change="change('type')" placeholder="贸易类型">
</uni-data-select>
</view>
<view class="input">
<superwei-combox class="input" :candidates="brandList" :isJSON="true" keyName="brdName"
placeholder="品牌" v-model="brdName" @input="brandInput" @select="brandSelect"></superwei-combox>
</uni-easyinput>
</view>
<view class="select" v-show="current!=0">
<superwei-combox class="input" :candidates="bvmList" :isJSON="true" keyName="bvmName"
placeholder="车型" v-model="bvmName" @input="bvmInput" @select="bvmSelect"></superwei-combox>
</uni-easyinput>
</view>
<view class="select">
<superwei-combox class="input" :candidates="potList" :isJSON="true" keyName="potName"
placeholder="港口" v-model="potName" @input="potInput" @select="potSelect"></superwei-combox>
</uni-easyinput>
</view>
<view class="select" v-show="current!=0">
<uni-data-select v-model="status" :localdata="statusRange" @change="change('status')"
placeholder="计划状态">
</uni-data-select>
</view>
<button class="btn" @click="screen" v-show='current==0'>筛选</button>
<button class="btn" @click="onSearch"></button>
</view> </view>
<fjj-condition ref='condition' @touchmove.stop color="#4D7BFE" :list="menuList" :defaultValue="defaultValue" <fjj-condition ref='condition' @touchmove.stop color="#4D7BFE" :list="menuList" :defaultValue="defaultValue"
@result="resultConditon" /> @result="resultConditon" />
<view class="uni-list">
<radio-group class="group" @change="radioChange">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
<view>
<radio :value="item.value" :checked="index === current" />{{item.name}}
</view>
</label>
</radio-group>
</view>
<view class="buttonlist"> <view class="buttonlist">
<button v-show="current==0" class="button" type="default"></button> <button v-show="current==0" class="button" type="default" @click="distribute('center')"></button>
<button v-show="current!=2" class="button" type="default"></button> <button v-show="current==1" class="button" type="default"></button>
<button class="button" type="default">刷新</button> <button v-show="current==0 || current == 1" class="button" type="default" @click="ask"></button>
<button class="button" type="default" v-show="current != 3"></button>
<button v-show="current==2" class="button" type="default"></button> <button v-show="current==2" class="button" type="default"></button>
<uni-popup ref="popup" type="dialog">
<view class="popupBox">
<view class="popupTitle">
指令下发
</view>
<view class="popupInfo">
<text>负责人</text>
<uni-data-select v-model="director" :localdata="directorList"></uni-data-select>
</view>
<view class="popupBtn">
<view class="btnList">
<button class="button" type="default" @click="cancel"> </button>
<button class="button" type="primary" @click="confirm"> </button>
</view>
</view>
</view>
</uni-popup>
<uni-popup ref="popup2" type="dialog">
<view class="popupBox">
<view class="popupTitle">
装船要求
</view>
<uni-easyinput type="textarea" v-model="askValue" placeholder="请输入内容..."></uni-easyinput>
<view class="popupBtn">
<view class="btnList">
<button class="button" type="default" @click="cancel"> </button>
<button class="button" type="primary" @click="confirm"> </button>
</view>
</view>
</view>
</uni-popup>
</view> </view>
<view class="itemList" v-show="current==0"> <view class="itemList" v-show="current==0">
<view class="exp" v-for="(item,index) in itemList" :key="item.index"> <view class="exp" v-for="(item,index) in itemList" :key="item.index">
@ -102,7 +138,7 @@
</view> </view>
</view> </view>
<view class="details"> <view class="details">
<uni-icons v-show="itemActive != index" class="jt" type="top" size="24" color="#108ee9" <uni-icons v-show="itemActive != index" class="jt" type="bottom" size="24" color="#108ee9"
@click="isActive(index)"></uni-icons> @click="isActive(index)"></uni-icons>
<view class="itemDetails" v-show="itemActive == index"> <view class="itemDetails" v-show="itemActive == index">
<view class="row" v-for="cell in item.xq"> <view class="row" v-for="cell in item.xq">
@ -128,7 +164,7 @@
详情 详情
</view> </view>
</view> </view>
<uni-icons class="jt" type="bottom" size="24" color="#108ee9" <uni-icons class="jt" type="top" size="24" color="#108ee9"
@click="itemActive = '-1'"></uni-icons> @click="itemActive = '-1'"></uni-icons>
</view> </view>
</view> </view>
@ -182,7 +218,7 @@
</view> </view>
</view> </view>
<view class="details"> <view class="details">
<uni-icons v-show="itemActive != index" class="jt" type="top" size="24" color="#108ee9" <uni-icons v-show="itemActive != index" class="jt" type="bottom" size="24" color="#108ee9"
@click="isActive(index)"></uni-icons> @click="isActive(index)"></uni-icons>
<view class="itemDetails" v-show="itemActive == index"> <view class="itemDetails" v-show="itemActive == index">
<view class="row" v-for="cell in item.xq"> <view class="row" v-for="cell in item.xq">
@ -208,7 +244,7 @@
详情 详情
</view> </view>
</view> </view>
<uni-icons class="jt" type="bottom" size="24" color="#108ee9" <uni-icons class="jt" type="top" size="24" color="#108ee9"
@click="itemActive = '-1'"></uni-icons> @click="itemActive = '-1'"></uni-icons>
</view> </view>
</view> </view>
@ -265,6 +301,131 @@
</uni-table> </uni-table>
</view> </view>
<view v-show="current == 3">
<view class="field">
<view class="boxTop">
<view class="title">
堆场
</view>
<view class="option">
<uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
</view>
</view>
<view class="fpList">
<view class="fpInfo">
<view class="fpTitle">
港建库
</view>
<view class="fpListInfo">
<view class="infoTop">
<view class="infoTopTitle">A1区12*12</view>
<view class="titleRight" @click="toGoPlace">
<text>车道</text>
<view class="titleIcon">
<van-icon name="arrow" color="#fff" />
</view>
</view>
</view>
<view class="infoCarNum">
<text>车位总数120车位</text>
<text>使用40车位</text>
<text>剩余40车位</text>
<text>可停放车辆300</text>
<text>已停放车辆300</text>
</view>
<view class="progressBox">
<van-progress :percentage="itemSum2(2000)" :pivot-text="'1000/' + 2000" />
</view>
<view class="carInfoList">
<view class="carBrand" v-for="item in 4" :key="item">
<view class="brandTitle">
保时捷-轿车
</view>
<view class="placeInfo">
400 共5道12车位
</view>
</view>
</view>
</view>
<view class="fpListInfo notListInfo">
<view class="infoTop">
<view class="infoTopTitle">A1区12*12</view>
<view class="titleRight" @click="toGoPlace">
<text>车道</text>
<view class="titleIcon">
<van-icon name="arrow" color="#fff" />
</view>
</view>
</view>
<view class="notTitle">
未分配
</view>
<text>车位总数120车位</text>
<text>可停放车辆300</text>
</view>
<view class="tipInfo">
未使用2车道20车位
</view>
</view>
<view class="fpInfo">
<view class="fpTitle">
海棠库
</view>
<view class="fpListInfo notListInfo">
<view class="infoTop">
<view class="infoTopTitle">A1区12*12</view>
<view class="titleRight" @click="toGoPlace">
<text>车道</text>
<view class="titleIcon">
<van-icon name="arrow" color="#fff" />
</view>
</view>
</view>
<view class="notTitle">
未分配
</view>
<text>车位总数120车位</text>
<text>可停放车辆300</text>
</view>
<view class="fpListInfo">
<view class="carInfoList">
<view class="infoTop">
<view class="infoTopTitle">A1区12*12</view>
<view class="titleRight" @click="toGoPlace">
<text>车道</text>
<view class="titleIcon">
<van-icon name="arrow" color="#fff" />
</view>
</view>
</view>
<view class="infoCarNum">
<text>车位总数120车位</text>
<text>使用40车位</text>
<text>剩余40车位</text>
<text>可停放车辆300</text>
<text>已停放车辆300</text>
</view>
<view class="progressBox">
<van-progress :percentage="itemSum2(2000)" :pivot-text="'1000/' + 2000" />
</view>
</view>
<view class="carInfoList">
<view class="carBrand" v-for="item in 4" :key="item">
<view class="brandTitle">
保时捷-轿车
</view>
<view class="placeInfo">
400 共5道12车位
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
@ -292,26 +453,30 @@
brandList: [], brandList: [],
harbour: '', // harbour: '', //
harbourRange: [{ harbourRange: [{
value: 1, value: 1,
text: '全部' text: '全部'
}, { },
value: 2, {
text: '内贸' value: 2,
}, { text: '内贸'
value: 3, }, {
text: '外贸' value: 3,
}], text: '外贸'
}
],
type: '', // type: '', //
typeRange: [{ typeRange: [{
value: 1, value: 1,
text: '全部' text: '全部'
}, { },
value: 2, {
text: '内贸' value: 2,
}, { text: '内贸'
value: 3, }, {
text: '外贸' value: 3,
}], text: '外贸'
}
],
bvmName: '', // bvmName: '', //
bvmItem: {}, bvmItem: {},
bvmList: [], bvmList: [],
@ -320,25 +485,39 @@
potList: [], potList: [],
status: '', // status: '', //
statusRange: [{ statusRange: [{
value: 1, value: 1,
text: '待发送' text: '待发送'
}, { },
value: 2, {
text: '已发送' value: 2,
}, { text: '已发送'
value: 3, }, {
text: '待作业' value: 3,
}, { text: '待作业'
value: 4, }, {
text: '作业中' value: 4,
}, { text: '作业中'
value: 5, }, {
text: '暂停' value: 5,
}, { text: '暂停'
value: 6, }, {
text: '已完成' value: 6,
}], text: '已完成'
}
],
//
director: "",
directorList: [{
text: "产品馆",
value: "1"
},
{
text: "产品馆服务",
value: "2"
}
],
//
askValue: "",
value: '', value: '',
itemList: [], itemList: [],
range: [1], range: [1],
@ -363,6 +542,29 @@
current: 0, current: 0,
active: 1, active: 1,
itemActive: -1, itemActive: -1,
optionValue: "",
optionList: [{
value: "0",
text: "全部堆场"
},
{
alue: "1",
text: "外六"
},
{
alue: "2",
text: "港建库"
},
{
alue: "3",
text: "高东库"
},
{
alue: "4",
text: "江海库"
}
],
} }
}, },
computed: { computed: {
@ -371,6 +573,12 @@
let sum = (60 / item) * 100 let sum = (60 / item) * 100
return sum return sum
}; };
},
itemSum2() {
return function(item) {
let sum = 1000 / item * 100
return sum
};
} }
}, },
onLoad() { onLoad() {
@ -447,7 +655,6 @@
resultConditon(obj) { resultConditon(obj) {
this.$refs.condition.visibleDrawer = false; this.$refs.condition.visibleDrawer = false;
this.hasChoose = obj.hasChoose; this.hasChoose = obj.hasChoose;
console.log(obj);
}, },
loadSumOrder() { loadSumOrder() {
let data = {} let data = {}
@ -520,8 +727,6 @@
status: '暂停' status: '暂停'
} }
] ]
console.log(2);
console.log(this.itemList);
}, },
tabChange(tag) { tabChange(tag) {
this.active = tag this.active = tag
@ -599,7 +804,22 @@
} }
}, },
//
distribute(type) {
this.$refs.popup.open(type)
},
cancel() {
this.$refs.popup.close()
this.$refs.popup2.close()
},
confirm() {
this.$refs.popup.close()
this.$refs.popup2.close()
},
//
ask(type) {
this.$refs.popup2.open(type)
},
// //
mnfBlInput(e) { mnfBlInput(e) {
clearTimeout(timers) clearTimeout(timers)
@ -732,36 +952,43 @@
.form { .form {
display: flex; display: flex;
justify-content: space-between;
margin-bottom: 20px;
.select { .inputBox {
width: 150px; display: flex;
margin-right: 20px;
} }
.input { .input {
width: 150px; width: 120px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
margin-right: 20px; margin-right: 20px;
} }
.btn { .btn {
width: 60px;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
margin: 0 20px 0 0; margin-right: 10px;
} }
} }
.uni-list { .uni-list {
margin-top: 20px;
.group { .group {
width: 360px;
height: 50px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 5px;
.uni-label-pointer {
margin-right: 10px;
line-height: 24px;
}
/deep/.uni-radio-input {
width: 16px;
height: 16px;
}
} }
} }
@ -775,6 +1002,52 @@
line-height: 40px; line-height: 40px;
margin-right: 20rpx; margin-right: 20rpx;
} }
.popupBox {
width: 500px;
background-color: #fff;
padding: 30px;
.popupTitle {
font-size: 20px;
font-weight: bold;
border-bottom: 1px solid #ccc;
padding-bottom: 20px;
}
.popupInfo {
display: flex;
margin-top: 20px;
line-height: 35px;
width: 250px;
padding: 30px 0;
}
/deep/.uni-easyinput {
margin-top: 20px;
}
/deep/.uni-select__input-placeholder {
text-align: left;
}
/deep/.uni-select__input-text {
text-align: left;
}
.popupBtn {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #ccc;
display: flex;
justify-content: flex-end;
.btnList {
display: flex;
}
}
}
} }
.tablist { .tablist {
@ -900,5 +1173,203 @@
} }
} }
} }
.field {
padding: 20px;
background-color: #000;
.boxTop {
display: flex;
.title {
margin-right: 20px;
font-size: 18px;
display: flex;
flex-direction: column;
justify-content: center;
color: #fff;
}
.option {
width: 200px;
}
}
.carTabs {
width: 100%;
background-color: #fff;
margin-top: 20px;
border-radius: 8px;
/deep/.tab {
border-radius: 8px !important;
}
.carList {
display: flex;
justify-content: space-around;
padding: 20px;
.carInfo {
width: 19%;
padding: 20px;
background-color: #ccc;
text-align: center;
border-radius: 6px;
}
}
.partsList {
width: 100%;
display: flex;
justify-content: space-around;
padding: 20px;
.partsInfo {
width: 19%;
padding: 20px;
background-color: #ccc;
text-align: center;
border-radius: 6px;
}
}
}
.infoTitle {
font-size: 16px;
color: #666;
}
.infoNum {
font-size: 28px;
}
.fpList {
width: 100%;
margin-top: 20px;
display: flex;
justify-content: space-between;
.fpInfo {
width: 49%;
}
.fpTitle {
text-align: center;
background: #262626;
padding: 10px;
color: #fff;
}
.fpListInfo {
padding: 20px 10px;
background: #262626;
color: #fff;
margin-top: 10px;
.infoTop {
width: 100%;
display: flex;
justify-content: space-between;
.infoTopTitle {
font-size: 18px;
font-weight: bold;
padding-left: 10px;
border-left: 5px solid #0079FE;
}
.titleRight {
display: flex;
.titleIcon {
width: 16px;
height: 16px;
background: #0079FE;
margin-left: 5px;
line-height: 16px;
text-align: center;
border-radius: 50%;
margin-top: 5px;
/deep/.van-icon {
transform: scale(0.8);
margin-top: 2px;
margin-left: 2px;
}
}
text {
color: #0079FE;
margin-top: 2px;
}
}
}
.infoCarNum {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
text {
margin: 10px 20px;
}
}
.progressBox {
width: 100%;
}
.carInfoList {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.carBrand {
width: 32%;
background-color: #2C2D2D;
padding: 10px;
margin-bottom: 10px;
.brandTitle {
color: #0079FE;
margin-bottom: 10px;
}
}
}
}
.notListInfo {
.notTitle {
font-size: 22px;
font-weight: bold;
text-align: center;
margin: 30px 0;
}
.infoTop {
text {
margin-right: 0;
}
}
text {
margin-right: 30px;
}
}
.tipInfo {
width: 100%;
font-size: 24px;
color: #5FE515;
font-weight: bold;
padding: 20px 0;
text-align: center;
background: #fff;
margin-top: 10px;
}
}
}
} }
</style> </style>

View File

@ -63,7 +63,6 @@
loginGo(type) { loginGo(type) {
if (this.account == "rtoswuhan1" && this.password == "123456") { if (this.account == "rtoswuhan1" && this.password == "123456") {
if (this.portList.length > 0) { if (this.portList.length > 0) {
this.type = type
this.$refs.popup.open(type) this.$refs.popup.open(type)
this.portId = this.portList[0].value this.portId = this.portList[0].value
this.portName = this.portList[0].title this.portName = this.portList[0].title

View File

@ -1,9 +1,8 @@
<template> <template>
<view class="app"> <view class="app">
<head-info></head-info> <head-info :navIndex="4"></head-info>
<view class="container"> <view class="container">
<side-bar path='5'></side-bar> <custom-tabs type="c1" :value="tabsValue">
<custom-tabs type="c1" :value="tabsValue" @change="changeIndex">
<custom-tab-pane label="场位图" name="c1_1"> <custom-tab-pane label="场位图" name="c1_1">
<view></view> <view></view>
<template v-if="placeTabs == 0"> <template v-if="placeTabs == 0">
@ -13,8 +12,7 @@
堆场 堆场
</view> </view>
<view class="option"> <view class="option">
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
</view> </view>
<view class="cwBox"> <view class="cwBox">
@ -186,33 +184,27 @@
<view class="topOption"> <view class="topOption">
<view class="option"> <view class="option">
<text>堆场</text> <text>堆场</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
<view class="option"> <view class="option">
<text>进出口</text> <text>进出口</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
<view class="option"> <view class="option">
<text>贸易类型</text> <text>贸易类型</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
<view class="option"> <view class="option">
<text>船名/航次</text> <text>船名/航次</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
<view class="option"> <view class="option">
<text>品牌</text> <text>品牌</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
<view class="option"> <view class="option">
<text>港口</text> <text>港口</text>
<uni-data-select v-model="optionValue" :localdata="optionList" <uni-data-select v-model="optionValue" :localdata="optionList"></uni-data-select>
@change="fcChange"></uni-data-select>
</view> </view>
</view> </view>
<view class="goodsList"> <view class="goodsList">
@ -241,7 +233,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</custom-tab-pane> </custom-tab-pane>
</custom-tabs> </custom-tabs>
@ -251,7 +242,6 @@
</template> </template>
<script> <script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info'; import HeadInfo from '@/components/head-info/head-info';
import place from './place.vue'; import place from './place.vue';
export default { export default {
@ -351,13 +341,10 @@
}, },
onLoad() {}, onLoad() {},
components: { components: {
SideBar,
HeadInfo, HeadInfo,
place place
}, },
methods: { methods: {
// tabs
changeIndex(e) {},
// //
toGoPlace() { toGoPlace() {
this.placeTabs = 1; this.placeTabs = 1;
@ -455,10 +442,10 @@
} }
.partsList { .partsList {
width: calc(100% + 40px); width: 100%;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
padding-left: 40px; padding: 20px;
.partsInfo { .partsInfo {
width: 19%; width: 19%;
@ -527,6 +514,12 @@
text-align: center; text-align: center;
border-radius: 50%; border-radius: 50%;
margin-top: 5px; margin-top: 5px;
/deep/.van-icon {
transform: scale(0.8);
margin-top: 2px;
margin-left: 2px;
}
} }
text { text {
@ -623,7 +616,7 @@
} }
.goodsList { .goodsList {
padding-left: 30px; padding: 0 30px;
margin-top: 10px; margin-top: 10px;
.li { .li {

View File

@ -118,7 +118,7 @@
// //
cancel() { cancel() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/index' url: '/pages/quality/index'
}) })
} }
} }

View File

@ -1,160 +1,164 @@
<template> <template>
<view class="edit"> <view class="edit">
<view class="container"> <view class="container">
<view class="formTitle"> <uni-steps :options="stepList" :active="active" />
基本信息
</view>
<view class="ul"> <view class="ul">
<view class="li"> <template v-if="active == 0">
<p class="liTitle"><text class="required">*</text>资损发生环节</p> <view class="li">
<radio-group class="radioList" @change="radioChange"> <p class="liTitle"><text class="required">*</text>资损发生环节</p>
<label class="radioBox" v-for="(item, index) in radioList" :key="item.value"> <radio-group class="radioList" @change="radioChange">
<view> <label class="radioBox" v-for="(item, index) in radioList" :key="item.value">
<radio :value="item.value" :checked="index === current" /> <view>
</view> <radio :value="item.value" :checked="index === current" />
<view>{{item.name}}</view> </view>
</label> <view>{{item.name}}</view>
</radio-group> </label>
</view> </radio-group>
<view class="li"> </view>
<view class="li">
<p class="liTitle">板车照片</p> <p class="liTitle">板车照片</p>
<van-uploader> <van-uploader>
<van-button icon="plus" type="info">图片上传</van-button> <van-button icon="plus" type="info">图片上传</van-button>
</van-uploader> </van-uploader>
<view class="picture"> <view class="picture">
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker> <uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
</view>
</view> </view>
</view> <view class="li">
<view class="li"> <p class="liTitle">板车车牌照</p>
<p class="liTitle">板车车牌照</p> <van-uploader>
<van-uploader> <van-button icon="plus" type="info">图片上传</van-button>
<van-button icon="plus" type="info">图片上传</van-button> </van-uploader>
</van-uploader> <view class="picture">
<view class="picture"> <uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker> </view>
</view> </view>
</view> </template>
<view class="li zisun">
<p class="liTitle"><text class="required">*</text>责损负责人:</p> <template v-if="active == 3">
<uni-easyinput class="inputBox" v-model="lossHead" placeholder="请输入"></uni-easyinput> <view class="li">
</view> <p class="liTitle"><text class="required">*</text>签名:</p>
<view class="li zisun"> <p class="sign" @click="sign"></p>
<p class="liTitle"><text class="required">*</text>签名:</p> </view>
<p class="sign" @click="sign"></p> </template>
</view>
</view>
<view class="formTitle">
质损信息
</view> </view>
<view class="ul zsInfo"> <view class="ul zsInfo">
<view class="li"> <template v-if="active == 1">
<p class="liTitle"><text class="required">*</text>车架号/条形码:</p> <view class="li">
<uni-easyinput class="inputBox" v-model="carValue" placeholder="请输入"></uni-easyinput> <p class="liTitle"><text class="required">*</text>车架号/条形码:</p>
</view> <uni-easyinput class="inputBox" v-model="carValue" placeholder="请输入"></uni-easyinput>
<view class="li">
<p class="liTitle"><text class="required">*</text>船名航次:</p>
<uni-data-select v-model="shipValue" :localdata="shipList" @change="shipChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>车型:</p>
<uni-data-select v-model="carModel" :localdata="carList" @change="carChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>品牌:</p>
<uni-data-select v-model="brandValue" :localdata="brandList"
@change="brandChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>场位:</p>
<uni-data-select v-model="fieldValue" :localdata="fieldList"
@change="fieldChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>质损时间:</p>
<uni-datetime-picker type="datetime" v-model="zsDate" @change="dateChange" />
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>质损货物品类:</p>
<radio-group @change="radioChange2" class="radioList2">
<label class="radioBox" v-for="(item, index) in radioList2" :key="item.value">
<view>
<radio :value="item.value" :checked="index === current2" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other"
placeholder="请输入" v-if="item.name == '其他'"></uni-easyinput></view>
</label>
</radio-group>
</view>
<view class="li imageLi">
<image src="../../static/images/car1.png"></image>
<image src="../../static/images/car2.png"></image>
<image src="../../static/images/car3.png"></image>
<image src="../../static/images/car4.png"></image>
<image src="../../static/images/car5.png"></image>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>资损概况:</p>
<checkbox-group class="radioList2" @change="checkboxChange">
<label class="radioBox" v-for="item in checklist" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other1"
placeholder="请输入" v-if="item.name == '其他'"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>损伤情况:</p>
<checkbox-group class="radioList2" @change="checkboxChange2">
<label class="radioBox" v-for="item in checklist2" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other2"
placeholder="请输入" v-if="item.name == '其他'"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>处置情况:</p>
<checkbox-group class="radioList2" @change="checkboxChange3">
<label class="radioBox" v-for="item in checklist3" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other3"
placeholder="请输入" v-if="item.name == '其他'"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
<view class="li tpLi">
<p class="liTitle">资损照片</p>
<van-uploader>
<van-button icon="plus" type="info">图片上传</van-button>
</van-uploader>
<view class="picture">
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
</view> </view>
</view> <view class="li">
<view class="li tpLi"> <p class="liTitle"><text class="required">*</text>船名航次:</p>
<p class="liTitle">车架号图片</p> <uni-data-select v-model="shipValue" :localdata="shipList"
<van-uploader> @change="shipChange"></uni-data-select>
<van-button icon="plus" type="info">图片上传</van-button>
</van-uploader>
<view class="picture">
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
</view> </view>
</view> <view class="li">
<p class="liTitle"><text class="required">*</text>车型:</p>
<uni-data-select v-model="carModel" :localdata="carList" @change="carChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>品牌:</p>
<uni-data-select v-model="brandValue" :localdata="brandList"
@change="brandChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>场位:</p>
<uni-data-select v-model="fieldValue" :localdata="fieldList"
@change="fieldChange"></uni-data-select>
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>质损时间:</p>
<uni-datetime-picker type="datetime" v-model="zsDate" @change="dateChange" />
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>质损货物品类:</p>
<radio-group @change="radioChange2" class="radioList2">
<label class="radioBox" v-for="(item, index) in radioList2" :key="item.value">
<view>
<radio :value="item.value" :checked="index === current2" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other"
placeholder="请输入" v-if="showInput2 && item.name == '其他'"></uni-easyinput></view>
</label>
</radio-group>
</view>
<view class="li imageLi">
<image src="../../static/images/car1.png"></image>
<image src="../../static/images/car2.png"></image>
<image src="../../static/images/car3.png"></image>
<image src="../../static/images/car4.png"></image>
<image src="../../static/images/car5.png"></image>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>资损概况:</p>
<checkbox-group class="radioList2" @change="checkboxChange">
<label class="radioBox" v-for="item in checklist" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other1"
placeholder="请输入" v-if="item.name == '其他' && showInput3"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>损伤情况:</p>
<checkbox-group class="radioList2" @change="checkboxChange2">
<label class="radioBox" v-for="item in checklist2" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other2"
placeholder="请输入" v-if="item.name == '其他' && showInput4"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
<view class="li zsLi">
<p class="liTitle"><text class="required">*</text>处置情况:</p>
<checkbox-group class="radioList2" @change="checkboxChange3">
<label class="radioBox" v-for="item in checklist3" :key="item.value">
<view>
<checkbox :value="item.value" :checked="item.checked" />
</view>
<view class="boxInfo">{{item.name}}<uni-easyinput class="inputBox" v-model="other3"
placeholder="请输入" v-if="item.name == '其他' && showInput5"></uni-easyinput>
</view>
</label>
</checkbox-group>
</view>
</template>
<template v-if="active == 2">
<view class="li tpLi">
<p class="liTitle">资损照片</p>
<van-uploader>
<van-button icon="plus" type="info">图片上传</van-button>
</van-uploader>
<view class="picture">
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
</view>
</view>
<view class="li tpLi">
<p class="liTitle">车架号图片</p>
<van-uploader>
<van-button icon="plus" type="info">图片上传</van-button>
</van-uploader>
<view class="picture">
<uni-file-picker limit="9" title="最多选择9张图片"></uni-file-picker>
</view>
</view>
</template>
</view> </view>
<view class="btnList"> <view class="btnList">
<van-button type="default" @click="cancel"></van-button> <van-button type="default" @click="cancel"></van-button>
<van-button type="info">提交</van-button> <van-button type="default" @click="back" v-if="active > 0"></van-button>
<van-button type="default" @click="next" v-if="active < 3"></van-button>
<van-button type="info" @click="save" v-if="active == 3"></van-button>
</view> </view>
</view> </view>
</view> </view>
@ -166,8 +170,21 @@
name: "monEdit", name: "monEdit",
data() { data() {
return { return {
active: 0,
stepList: [{
title: '基本信息'
},
{
title: '质损信息'
},
{
title: '质损图片'
},
{
title: '签字'
}
],
// //
lossHead: "", //
radioList: [{ radioList: [{
value: "1", value: "1",
name: "收车交接" name: "收车交接"
@ -300,46 +317,49 @@
name: "其他" name: "其他"
} }
], ],
showInput2: false,
current2: "", current2: "",
other: "", // other: "", //
checkValue: [], // checkValue: [], //
checklist: [{ // checklist: [{ //
value: "碰撞", value: "1",
name: "碰撞", name: "碰撞",
}, },
{ {
value: "追尾", value: "2",
name: "追尾", name: "追尾",
}, },
{ {
value: "短装/卸", value: "3",
name: "短装/卸", name: "短装/卸",
}, },
{ {
value: "其他", value: "4",
name: "其他", name: "其他",
} }
], ],
showInput3: false,
other1: "", // other1: "", //
checkValue2: [], // checkValue2: [], //
checklist2: [{ checklist2: [{
value: "磕伤(点状)", value: "1",
name: "磕伤(点状)", name: "磕伤(点状)",
}, },
{ {
value: "擦伤(面状)", value: "2",
name: "擦伤(面状)", name: "擦伤(面状)",
}, { }, {
value: "划伤(线状)", value: "3",
name: "划伤(线状)", name: "划伤(线状)",
}, { }, {
value: "凹陷(凹状)", value: "4",
name: "凹陷(凹状)", name: "凹陷(凹状)",
}, { }, {
value: "其他", value: "5",
name: "其他", name: "其他",
} }
], ],
showInput4: false,
other2: "", // other2: "", //
checkValue3: [], // checkValue3: [], //
checklist3: [{ // checklist3: [{ //
@ -362,11 +382,12 @@
name: "其他", name: "其他",
} }
], ],
showInput5: false,
other3: "", // other3: "", //
} }
}, },
methods: { methods: {
radioChange: function(evt) { radioChange(evt) {
for (let i = 0; i < this.radioList.length; i++) { for (let i = 0; i < this.radioList.length; i++) {
if (this.radioList[i].value === evt.detail.value) { if (this.radioList[i].value === evt.detail.value) {
this.current = i; this.current = i;
@ -374,13 +395,18 @@
} }
} }
}, },
radioChange2: function(evt) { radioChange2(evt) {
for (let i = 0; i < this.radioList2.length; i++) { for (let i = 0; i < this.radioList2.length; i++) {
if (this.radioList2[i].value === evt.detail.value) { if (this.radioList2[i].value === evt.detail.value) {
this.current2 = i; this.current2 = i;
break; break;
} }
} }
if (evt.detail.value == 4) {
this.showInput2 = true
} else {
this.showInput2 = false
}
}, },
checkboxChange(e) { checkboxChange(e) {
var items = this.checklist, var items = this.checklist,
@ -402,8 +428,20 @@
this.checkValue = newArr.filter((v, index) => { this.checkValue = newArr.filter((v, index) => {
return newArr.indexOf(v) === index return newArr.indexOf(v) === index
}) })
newArr.forEach(v => {
if (v == '其他') {
this.showInput3 = true
} else {
this.showInput3 = false
}
})
}, },
checkboxChange2(e) { checkboxChange2(e) {
if (e.detail.value == 5) {
this.showInput4 = true
} else {
this.showInput4 = false
}
var items = this.checklist2, var items = this.checklist2,
values = e.detail.value; values = e.detail.value;
for (var i = 0, lenI = items.length; i < lenI; ++i) { for (var i = 0, lenI = items.length; i < lenI; ++i) {
@ -423,6 +461,13 @@
this.checkValue2 = newArr.filter((v, index) => { this.checkValue2 = newArr.filter((v, index) => {
return newArr.indexOf(v) === index return newArr.indexOf(v) === index
}) })
newArr.forEach(v => {
if (v == '其他') {
this.showInput4 = true
} else {
this.showInput4 = false
}
})
}, },
checkboxChange3(e) { checkboxChange3(e) {
var items = this.checklist3, var items = this.checklist3,
@ -444,11 +489,18 @@
this.checkValue3 = newArr.filter((v, index) => { this.checkValue3 = newArr.filter((v, index) => {
return newArr.indexOf(v) === index return newArr.indexOf(v) === index
}) })
newArr.forEach(v => {
if (v == '其他') {
this.showInput5 = true
} else {
this.showInput5 = false
}
})
}, },
// //
sign() { sign() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/sign' url: '/pages/quality/sign'
}) })
}, },
// //
@ -471,12 +523,22 @@
dateChange(e) { dateChange(e) {
this.zsDate = e this.zsDate = e
}, },
//
back() {
this.active--
},
//
next() {
this.active++
},
// //
cancel() { cancel() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/index' url: '/pages/quality/index'
}) })
} },
//
save() {},
} }
} }
</script> </script>
@ -487,15 +549,25 @@
.container { .container {
padding: 20px 30px; padding: 20px 30px;
input::placeholder { /deep/.uni-steps {
color: #6a6a6a !important; height: 80px;
justify-content: center;
} }
.formTitle { /deep/.uni-steps__row-title {
padding-left: 10px;
border-left: 5px solid #2979ff;
font-size: 20px; font-size: 20px;
font-weight: bold; }
/deep/.uni-icons {
font-size: 32px !important;
}
/deep/.uni-steps__row-container {
margin-top: 14px;
}
input::placeholder {
color: #6a6a6a !important;
} }
.ul { .ul {
@ -527,14 +599,6 @@
} }
} }
.zisun {
display: flex;
.liTitle {
margin-top: 10px;
}
}
.picture { .picture {
margin-top: 20px; margin-top: 20px;

View File

@ -1,8 +1,7 @@
<template> <template>
<view class="app"> <view class="app">
<head-info></head-info> <head-info :navIndex="3"></head-info>
<view class="container"> <view class="container">
<side-bar path='4'></side-bar>
<view class="content"> <view class="content">
<view class="form"> <view class="form">
<button type="primary" class="button" @click="add"> <button type="primary" class="button" @click="add">
@ -89,7 +88,6 @@
</template> </template>
<script> <script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info'; import HeadInfo from '@/components/head-info/head-info';
export default { export default {
data() { data() {
@ -117,7 +115,6 @@
}, },
components: { components: {
SideBar,
HeadInfo HeadInfo
}, },
methods: { methods: {
@ -133,19 +130,19 @@
// //
add() { add() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/edit' url: '/pages/quality/edit'
}) })
}, },
// //
edit() { edit() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/edit' url: '/pages/quality/edit'
}) })
}, },
// //
details() { details() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/monitor/details' url: '/pages/quality/details'
}) })
}, },
@ -178,17 +175,16 @@
.right { .right {
width: 600px; width: 600px;
height: 40px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.select { .select {
width: 130px; width: 130px;
margin-left: 20px; margin-left: 20px;
}
.uni-select { /deep/.is-input-border {
height: 40px; height: 35px;
}
} }
} }
} }
@ -197,8 +193,7 @@
margin-top: 30px; margin-top: 30px;
.item { .item {
height: 110px; padding: 20px 0;
padding: 20px;
border-bottom: 2px solid #e9e9e9; border-bottom: 2px solid #e9e9e9;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -214,6 +209,10 @@
justify-content: space-between; justify-content: space-between;
} }
.col {
margin-bottom: 10px;
}
.rowFoot { .rowFoot {
width: 12%; width: 12%;
flex-direction: column; flex-direction: column;

View File

@ -1,18 +1,31 @@
<template> <template>
<view class="documentList"> <view class="documentList">
<view class="container"> <view class="container">
<p class="title">作业单证</p> <view class="workBox">
<view class="ul"> <view class="title">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)"> <image src="../../static/images/shipWork/zydz.png" mode=""></image>
<view class="round"></view> <text>作业单证</text>
<p>{{item.name}}</p]> </view>
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)">
<image :src="item.imgUrl" mode=""></image>
<p>{{item.name}}</p>
<view class="uploadStatus" v-if="!item.status">
<text>未上传</text>
</view>
</view>
</view> </view>
</view> </view>
<p class="title">其他作业</p> <view class="workBox">
<view class="ul"> <view class="title">
<view class="li" v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)"> <image src="../../static/images/shipWork/qtzy.png" mode=""></image>
<view class="round"></view> <text>其他作业</text>
<p>{{item.name}}</p> </view>
<view class="ul">
<view class="li" v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)">
<image :src="item.imgUrl" mode=""></image>
<p>{{item.name}}</p>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -26,52 +39,72 @@
return { return {
infoList: [{ infoList: [{
name: "杂项作业单", name: "杂项作业单",
url: "mixWork" url: "mixWork",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
}, },
{ {
name: "系解缆", name: "系解缆",
url: "untieCord" url: "untieCord",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
}, },
{ {
name: "供给", name: "供给",
url: "supply" url: "supply",
imgUrl: "../../static/images/shipWork/gj.png",
status: true,
}, },
{ {
name: "指导员作业布置", name: "指导员作业布置",
url: "workAssign" url: "workAssign",
imgUrl: "../../static/images/shipWork/zybz.png",
status: true,
}, },
{ {
name: "船舶装卸通知单", name: "船舶装卸通知单",
url: "notice" url: "notice",
imgUrl: "../../static/images/shipWork/tzd.png",
status: true,
}, },
{ {
name: "质量意见征询", name: "质量意见征询",
url: "opinion" url: "opinion",
imgUrl: "../../static/images/shipWork/zlyj.png",
status: true,
}, },
{ {
name: "异常情况", name: "异常情况",
url: "abnormal" url: "abnormal",
imgUrl: "../../static/images/shipWork/yczk.png",
status: true,
}, },
{ {
name: "MAFI清单", name: "MAFI清单",
url: "mafi" url: "mafi",
imgUrl: "../../static/images/shipWork/mafiqd.png",
status: true,
} }
], ],
otherListh: [{ otherListh: [{
name: "安全巡检", name: "安全巡检",
url: "patrol" url: "patrol",
imgUrl: "../../static/images/shipWork/aqxj.png"
}, },
{ {
name: "船舶资料", name: "船舶资料",
url: "shipInfo" url: "shipInfo",
imgUrl: "../../static/images/shipWork/cbzl.png"
}, },
{ {
name: "船舶计划", name: "船舶计划",
url: "shipPlan" url: "shipPlan",
imgUrl: "../../static/images/shipWork/cbjh.png"
}, },
{ {
name: "作业查询", name: "作业查询",
url: "brandDetails" url: "brandDetails",
imgUrl: "../../static/images/shipWork/zycx.png"
} }
], ],
} }
@ -111,32 +144,65 @@
.container { .container {
padding: 30px 20px; padding: 30px 20px;
.workBox {
background-color: #fff;
margin-bottom: 20px;
padding: 25px 16px;
}
.title { .title {
font-size: 20px; display: flex;
font-weight: bold;
image {
width: 18px;
height: 18px;
margin-top: 3px;
}
text {
margin-left: 10px;
font-size: 16px;
font-weight: bold;
}
} }
.ul { .ul {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 20px;
margin-bottom: 20px;
.li { .li {
margin: 10px 20px; margin: 10px 20px;
width: 195px;
height: 70px;
line-height: 70px;
box-shadow: 1px 1px 6px 0 rgba(52, 52, 52, 0.20);
border-radius: 8px;
display: flex;
position: relative;
overflow: hidden;
.round { image {
width: 80px; width: 38px;
height: 80px; height: 38px;
background: #ccc; margin: 16px;
border-radius: 50%;
margin: 10px auto;
} }
p { p {
text-align: center; color: #23262E;
font-size: 16px; font-size: 16px;
margin-top: 10px; font-weight: bold;
}
.uploadStatus {
padding: 0 8px;
height: 20px;
line-height: 20px;
background: #FFF7EE;
border-radius: 4px;
color: #FC8300;
position: absolute;
right: 0;
top: 0;
} }
} }
} }

View File

@ -1,8 +1,7 @@
<template> <template>
<view class="app"> <view class="app">
<head-info></head-info> <head-info :navIndex="2"></head-info>
<view class="container"> <view class="container">
<side-bar path='3'></side-bar>
<view class="content"> <view class="content">
<view class="form"> <view class="form">
<view class="select"> <view class="select">
@ -10,71 +9,68 @@
v-model="shipName" @input="input_json" @select="select_json"></superwei-combox> v-model="shipName" @input="input_json" @select="select_json"></superwei-combox>
</view> </view>
<button class="searchBtn" type="default" @click="search"></button> <button class="searchBtn" type="default" @click="search"></button>
<button class="searchBtn" type="default" @click="isOpen"></button>
<button class="searchBtn" type="default" @click="open"></button> <button class="searchBtn" type="default" @click="open"></button>
<!-- <button class="searchBtn" type="default" @click="isOpen"></button>
<button class="searchBtn" type="default" @click="createTable"></button> <button class="searchBtn" type="default" @click="createTable"></button>
<button class="searchBtn" type="default" @click="dropTable"></button> <button class="searchBtn" type="default" @click="dropTable"></button>
<button class="searchBtn" type="default" @click="dropData"></button> <button class="searchBtn" type="default" @click="dropData"></button>
<button class="searchBtn" type="default" @click="executeSql1('shipInfoTable')"></button> <button class="searchBtn" type="default" @click="executeSql1('shipInfoTable')"></button> -->
</view> </view>
<view class="itemList"> <view class="itemList">
<template v-if="itemList.length > 0"> <template v-if="itemList.length > 0">
<view v-for="(item, index) in itemList" :key="index" class="item" @click="toGo(item)"> <view v-for="(item, index) in itemList" :key="index" class="item" @click="toGo(item)">
<view class="title"> <view class="title">
<image src="../../static/images/ship.png" mode=""></image>
<view class="name"> <view class="name">
{{item.spmName}} {{item.shipName}}
</view> </view>
</view> </view>
<view class="table"> <view class="row">
<view class="row"> <view class="nitem">
<view class="nitem"> 进口航次: <text>{{item.inVvyName}}</text>
进口航次: <text>{{item.inVvyName}}</text>
</view>
<view class="nitem">
进口贸易类型: <text>{{item.inTradeTypeName}}</text>
</view>
</view> </view>
<view class="row"> <view class="nitem">
<view class="nitem"> 进口贸易类型: <text>{{item.inTradeTypeName}}</text>
出口航次: <text>{{item.outVvyName}}</text>
</view>
<view class="nitem">
出口贸易类型: <text>{{item.outTradeTypeName}}</text>
</view>
</view> </view>
<view class="row"> </view>
<view class="nitem"> <view class="row">
计划泊位: <text>{{item.planBerthageName}}</text> <view class="nitem">
</view> 出口航次: <text>{{item.outVvyName}}</text>
<view class="nitem">
实际泊位: <text>{{item.actualBerthageName}}</text>
</view>
</view> </view>
<view class="row"> <view class="nitem">
<view class="nitem"> 出口贸易类型: <text>{{item.outTradeTypeName}}</text>
<text>{{item.uploadStatusDesc}}</text>
<text>{{item.uploadTime}}</text>
</view>
<!-- <view class="nitem" v-if="item==1">
<text class="green"></text> 已下载
<text>2023/09/21 12:00</text>
</view>
<view class="nitem" v-if="item==2">
<text></text> 未下载
</view>
<view class="nitem" v-if="item==1">
<text class="green"></text> 已上传
<text>2023/09/21 12:00</text>
</view>
<view class="nitem" v-if="item==2">
<text></text> 未上传
</view> -->
</view> </view>
<view class="footer"> </view>
<view class="footer"> <view class="row">
<button class="fitem" type="default" @click.stop="download(item)">下载</button> <view class="nitem">
<button class="fitem" type="default" @click.stop="upload(item)">上传</button> 计划泊位: <text>{{item.planBerthageName}}</text>
</view> </view>
<view class="nitem">
实际泊位: <text>{{item.actualBerthageName}}</text>
</view>
</view>
<view class="footer">
<view class="fitem">
<button class="fitem1" type="default" @click.stop="download(item)">下载</button>
<button class="fitem2" type="default" @click.stop="upload(item)">上传</button>
</view>
</view>
<view class="statusBox statusBox1">
<view class="statusInfo" v-if="item.uploadTime != ''">
<text>已上传</text>
<text>{{item.uploadTime}}</text>
</view>
<view class="statusInfo notStatus" v-else>
<text>未上传</text>
</view>
</view>
<view class="statusBox statusBox2">
<view class="statusInfo" v-if="item.downloadTime != ''">
<text>已下载</text>
<text>{{item.downloadTime}}</text>
</view>
<view class="statusInfo notStatus" v-else>
<text>未下载</text>
</view> </view>
</view> </view>
</view> </view>
@ -92,11 +88,13 @@
</template> </template>
<script> <script>
import SideBar from '@/components/sider-bar/slider-bar';
import HeadInfo from '@/components/head-info/head-info'; import HeadInfo from '@/components/head-info/head-info';
import sqlite from "../../common/sqlite.js" import sqlite from "../../common/sqlite.js"
import tableList from "../../common/createDataTable.js" import tableList from "../../common/createDataTable.js"
import api from "../../common/api.js" import api from "../../common/api.js"
import {
v4 as uuidv4
} from 'uuid';
export default { export default {
data() { data() {
return { return {
@ -306,7 +304,6 @@
} }
}, },
components: { components: {
SideBar,
HeadInfo, HeadInfo,
}, },
mounted() { mounted() {
@ -350,7 +347,7 @@
}, },
dropTable() { dropTable() {
console.log('删除表'); console.log('删除表');
let sql = 'DROP TABLE retallyMessageRespList;' let sql = 'DROP TABLE safetyInspectionRespUrlList;'
this.executeSql(sql) this.executeSql(sql)
}, },
dropData() { dropData() {
@ -436,14 +433,47 @@
// //
search() { search() {
this.itemList = [{ this.itemList = [{
shipName: "海王星领袖",
uploadTime: "2022-12-11 12:00:08", uploadTime: "2022-12-11 12:00:08",
uploadStatusDesc: "已上传", uploadStatusDesc: "已上传",
actualBerthageName: "3", downloadTime: "2022-12-12 12:00:08",
planBerthageName: "4", downloadStatusDesc: "已下载",
outTradeTypeName: "5", actualBerthageName: "一泊位",
outVvyName: "6", planBerthageName: "一泊位",
inTradeTypeName: "7", outTradeTypeName: "外贸",
inVvyName: "8" outVvyName: "381527688",
inTradeTypeName: "内贸",
inVvyName: "381527688"
}, {
shipName: "海王星领袖",
uploadTime: "",
downloadTime: "",
actualBerthageName: "一泊位",
planBerthageName: "一泊位",
outTradeTypeName: "外贸",
outVvyName: "381527688",
inTradeTypeName: "内贸",
inVvyName: "381527688"
}, {
shipName: "海王星领袖",
uploadTime: "2022-12-11 12:00:08",
downloadTime: "",
actualBerthageName: "一泊位",
planBerthageName: "一泊位",
outTradeTypeName: "外贸",
outVvyName: "381527688",
inTradeTypeName: "内贸",
inVvyName: "381527688"
}, {
shipName: "海王星领袖",
uploadTime: "",
downloadTime: "2022-12-12 12:00:08",
actualBerthageName: "一泊位",
planBerthageName: "一泊位",
outTradeTypeName: "外贸",
outVvyName: "381527688",
inTradeTypeName: "内贸",
inVvyName: "381527688"
}] }]
// this.initData() // this.initData()
}, },
@ -782,6 +812,10 @@
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
margin-left: 0; margin-left: 0;
font-size: 16px;
color: #fff;
background-color: #0067CF;
margin-right: 10px;
} }
} }
@ -798,16 +832,30 @@
.item { .item {
width: 49%; width: 49%;
min-height: 204px;
margin-top: 15px; margin-top: 15px;
margin-right: 2%; margin-right: 2%;
border: 1px solid #c9cacb; background-color: #fff;
border-radius: 8px;
padding: 10px 0;
position: relative;
.title { .title {
display: flex; display: flex;
justify-content: space-between;
font-size: 21px;
padding: 10px 20px; padding: 10px 20px;
font-weight: 700;
image {
width: 32px;
height: 32px;
margin-right: 12px;
}
.name {
margin-top: 5px;
font-size: 16px;
color: #23262E;
font-weight: bold;
}
} }
.row { .row {
@ -828,13 +876,70 @@
.footer { .footer {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-around; justify-content: flex-end;
border-top: 1px solid #EEEEEE;
padding-top: 10px;
.fitem { .fitem {
flex: 1;
margin: 10px 20px;
background-color: #fff; display: flex;
} }
button {
width: 72px;
height: 28px;
line-height: 28px;
border-radius: 4px;
margin-right: 16px;
font-size: 14px;
}
.fitem1 {
background: #EEEEEE;
color: #999999;
}
.fitem2 {
background: #0067CF;
color: #fff;
}
}
.statusBox {
.statusInfo {
margin-bottom: 3px;
padding: 5px;
background: #F1F8FF;
border-radius: 4px;
font-size: 12px;
color: #0067CF;
text:first-child {
margin-right: 10px;
}
}
.notStatus {
background: #FFF7EE;
color: #FC8300;
text:first-child {
margin-right: 0;
}
}
}
.statusBox1 {
position: absolute;
top: 10px;
right: 5px;
}
.statusBox2 {
position: absolute;
top: 40px;
right: 5px;
} }
} }

View File

@ -63,6 +63,7 @@
<script> <script>
import sqlite from "../../common/sqlite.js" import sqlite from "../../common/sqlite.js"
import api from "../../common/api.js"; import api from "../../common/api.js";
import utils from '@/common/util.js';
import { import {
v4 as uuidv4 v4 as uuidv4
} from 'uuid'; } from 'uuid';
@ -87,9 +88,10 @@
type: "", type: "",
// //
url: [], // url: [], //
ysUrl: [],
// //
remark: "", remark: "",
// //
optionData: [], optionData: [],
} }
@ -104,7 +106,9 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') { if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow(); this.getRow();
} }
this.executeSql1('shipOption') this.executeSql1('shipOption')
this.executeSql2('safetyInspectionRespUrlList')
}, },
methods: { methods: {
// //
@ -119,6 +123,16 @@
console.error(error); console.error(error);
}); });
}, },
executeSql2(tableName) {
let sql = `select * from ${tableName} WHERE contactId = '${this.patrolRow.webId}'`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
// console.log(value)
}).catch((error) => {
// reject
console.error(error);
});
},
// //
getShip() { getShip() {
this.shipInfo = uni.getStorageSync('shipInfo') this.shipInfo = uni.getStorageSync('shipInfo')
@ -158,6 +172,26 @@
// //
select(e) { select(e) {
console.log(e) console.log(e)
let file = e.tempFiles[0].file
this.fileToBase64(file).then(res => {
console.log(res)
utils.compress(res, 500, 0.3).then(res2 => {
console.log(res2)
this.ysUrl.push(res2)
});
console.log(this.ysUrl)
}).catch((error) => {
// reject
console.error(error);
});
},
fileToBase64(file) {
return new Promise((resolve, reject) => { ///
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error);
});
}, },
// //
cancel() { cancel() {
@ -194,6 +228,14 @@
'${this.type}','${this.remark}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}', '${this.type}','${this.remark}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')` '${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
this.executeSql(sql) this.executeSql(sql)
console.log(this.ysUrl)
for (var i = 0; i < this.ysUrl.length; i++) {
let webId2 = uuidv4()
let sql2 = `insert into safetyInspectionRespUrlList values('${webId2}','${webId}','${this.ysUrl[i]}',
'${webStatus}','${webDate}')`
console.log(sql2)
this.executeSql(sql2)
}
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/shipWork/patrol' url: '/pages/shipWork/patrol'
@ -210,7 +252,7 @@
executeSql(sql) { executeSql(sql) {
sqlite.executeSqlCeshi(sql).then((value) => { sqlite.executeSqlCeshi(sql).then((value) => {
// resolve // resolve
console.log(value); // console.log(value);
}).catch((error) => { }).catch((error) => {
// reject // reject
console.error(error); console.error(error);

View File

@ -29,7 +29,7 @@
</view> </view>
<view class="widthLi" v-for="(item,index) in ulList1" :key="index+'ul'"> <view class="widthLi" v-for="(item,index) in ulList1" :key="index+'ul'">
<view class="ulTop"><text @click="ulAdd1"></text><text v-if="index > 0" <view class="ulTop"><text @click="ulAdd1"></text><text v-if="index > 0"
@click="delGb(index)">删除</text><van-icon name="arrow-down" /></view> @click="delGb(item,index)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<p class="liTitle"><text class="required">*</text>工班</p> <p class="liTitle"><text class="required">*</text>工班</p>
@ -43,7 +43,7 @@
</view> </view>
<view class="widthLi" v-for="(item2,index2) in item.ulList2" :key="index2+'ul2'"> <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" <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> @click="delGb2(item2,index,index2)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<p class="liTitle"><text class="required">*</text>车型</p> <p class="liTitle"><text class="required">*</text>车型</p>
@ -74,7 +74,7 @@
<template v-if="active == 1"> <template v-if="active == 1">
<view v-for="(item,index) in fcUlList" :key="index + 'fc'"> <view v-for="(item,index) in fcUlList" :key="index + 'fc'">
<view class="ulTop"><text @click="fcAdd"></text><text v-if="index > 0" <view class="ulTop"><text @click="fcAdd"></text><text v-if="index > 0"
@click="delFc(index)">删除</text><van-icon name="arrow-down" /></view> @click="delFc(item,index)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul fcUl"> <view class="ul fcUl">
<view class="li"> <view class="li">
<p class="liTitle"><text class="required">*</text>翻仓类型</p> <p class="liTitle"><text class="required">*</text>翻仓类型</p>
@ -84,7 +84,7 @@
</view> </view>
<view v-for="(item2,index2) in item.fcUlList2" :key="index2 + 'fc2'"> <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" <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> @click="delFc2(item2,index,index2)">删除</text><van-icon name="arrow-down" /></view>
<view class="ul ul2 fcUl2"> <view class="ul ul2 fcUl2">
<view class="li"> <view class="li">
<p class="liTitle"><text class="required">*</text>翻舱起点位置</p> <p class="liTitle"><text class="required">*</text>翻舱起点位置</p>
@ -287,6 +287,12 @@
optionData: [], optionData: [],
contactId: "", contactId: "",
// ids
shiftDelList: [],
// ids
shiftInfoDelList: [],
// ids
fcInfoDelList: [],
} }
}, },
onLoad(options) { onLoad(options) {
@ -358,6 +364,7 @@
this.getData(obj) this.getData(obj)
}) })
} else if (tableName == 'retallyMessageRespList') { } else if (tableName == 'retallyMessageRespList') {
// console.log(value);
let arr = []; let arr = [];
value.forEach(item => { value.forEach(item => {
if (!arr[item.retallyType]) { if (!arr[item.retallyType]) {
@ -370,6 +377,7 @@
}; };
} }
arr[item.retallyType].fcUlList2.push({ arr[item.retallyType].fcUlList2.push({
webId: item.webId,
qdValue: item.retallyOrigin, qdValue: item.retallyOrigin,
zdValue: item.retallyTerminus, zdValue: item.retallyTerminus,
carType: item.carType, carType: item.carType,
@ -384,6 +392,7 @@
}); });
}); });
this.fcUlList = Object.values(arr); this.fcUlList = Object.values(arr);
// console.log(this.fcUlList);
} else if (tableName == 'infoRespList') { } else if (tableName == 'infoRespList') {
this.otherObj.webId = value[0].webId this.otherObj.webId = value[0].webId
this.otherObj.contactId = value[0].contactId this.otherObj.contactId = value[0].contactId
@ -562,23 +571,30 @@
}, },
// //
changeLog(item) { changeLog(item) {
// item.startTime = item.datetime[0].slice(0, item.datetime[0].length - 3) // item.datetime[0].slice(0, item.datetime[0].length - 3)
// item.endTime = item.datetime[1].slice(0, item.datetime[1].length - 3)
// if (item.startTime2 != undefined) {
// item.startTime2 = item.datetime2[0].slice(0, item.datetime2[0].length - 3)
// item.endTime2 = item.datetime2[1].slice(0, item.datetime2[1].length - 3)
// }
item.startTime = item.datetime[0] item.startTime = item.datetime[0]
item.endTime = item.datetime[1] item.endTime = item.datetime[1]
item.startTime2 = item.datetime2[0] item.startTime2 = item.datetime2[0]
item.endTime2 = item.datetime2[1] item.endTime2 = item.datetime2[1]
}, },
// //
delGb(index) { delGb(item, index) {
this.ulList1.splice(index, 1) this.ulList1.splice(index, 1)
if (item.webId != null) {
this.shiftDelList.push(item.webId)
this.shiftDelList = Array.from(new Set(this.shiftDelList))
item.ulList2.forEach(v => {
this.shiftInfoDelList.push(v.webId)
})
this.shiftInfoDelList = Array.from(new Set(this.shiftInfoDelList))
}
}, },
delGb2(index, index2) { delGb2(item2, index, index2) {
this.ulList1[index].ulList2.splice(index2, 1) this.ulList1[index].ulList2.splice(index2, 1)
if (item2.webId != null) {
this.shiftInfoDelList.push(item.webId)
this.shiftInfoDelList = Array.from(new Set(this.shiftInfoDelList))
}
}, },
// //
cxChange(item, index, item2, index2) { cxChange(item, index, item2, index2) {
@ -656,11 +672,21 @@
}) })
}, },
// //
delFc(index) { delFc(item, index) {
this.fcUlList.splice(index, 1) this.fcUlList.splice(index, 1)
if (item.webId != null) {
item.fcUlList2.forEach(v => {
this.fcInfoDelList.push(v.webId)
})
this.fcInfoDelList = Array.from(new Set(this.fcInfoDelList))
}
}, },
delFc2(index, index2) { delFc2(item2, index, index2) {
this.fcUlList[index].fcUlList2.splice(index2, 1) this.fcUlList[index].fcUlList2.splice(index2, 1)
if (item2.webId != null) {
this.fcInfoDelList.push(item2.webId)
this.fcInfoDelList = Array.from(new Set(this.fcInfoDelList))
}
}, },
// //
cancel() { cancel() {
@ -681,6 +707,7 @@
save() { save() {
let date = new Date().getTime() let date = new Date().getTime()
let contactId = this.shipObj[0].webId let contactId = this.shipObj[0].webId
console.log(contactId)
let webStatus = "0" let webStatus = "0"
let editStatus = 1 let editStatus = 1
if (this.obj.state == "edit") { if (this.obj.state == "edit") {
@ -759,7 +786,7 @@
carType = '${this.fcUlList[i].fcUlList2[j].carType}',carTypeName = '${this.fcUlList[i].fcUlList2[j].carTypeName}', carType = '${this.fcUlList[i].fcUlList2[j].carType}',carTypeName = '${this.fcUlList[i].fcUlList2[j].carTypeName}',
goodsNumber = '${this.fcUlList[i].fcUlList2[j].goodsNumber}', goodsVolume = '${this.fcUlList[i].fcUlList2[j].tjValue}', goodsNumber = '${this.fcUlList[i].fcUlList2[j].goodsNumber}', goodsVolume = '${this.fcUlList[i].fcUlList2[j].tjValue}',
goodsWeight = '${this.fcUlList[i].fcUlList2[j].zlValue}', webStatus = '${webStatus}', goodsWeight = '${this.fcUlList[i].fcUlList2[j].zlValue}', webStatus = '${webStatus}',
webDate = '${webDate}' WHERE webId = '${this.fcUlList[i].webId}';` webDate = '${webDate}' WHERE webId = '${this.fcUlList[i].fcUlList2[j].webId}';`
this.executeSql(sql) this.executeSql(sql)
} else { } else {
let sql = let sql =
@ -799,6 +826,21 @@
genVolume = '${this.otherObj.tjValue2}', auxRemark = '${this.otherObj.describe}', waitRemark = '${this.otherObj.dgWork}', genVolume = '${this.otherObj.tjValue2}', auxRemark = '${this.otherObj.describe}', waitRemark = '${this.otherObj.dgWork}',
workRemark = '${this.otherObj.remark}', webStatus = '${webStatus}', webDate = '${webDate}' WHERE webId = '${this.otherObj.webId}';` workRemark = '${this.otherObj.remark}', webStatus = '${webStatus}', webDate = '${webDate}' WHERE webId = '${this.otherObj.webId}';`
this.executeSql(sql) this.executeSql(sql)
//
this.shiftDelList.forEach(v => {
let sql = `DELETE FROM workMessageRespList WHERE webId = '${v}';`
this.executeSql(sql)
})
//
this.shiftInfoDelList.forEach(v => {
let sql = `DELETE FROM workMessageRespInfoList WHERE webId = '${v}';`
this.executeSql(sql)
})
//
this.fcInfoDelList.forEach(v => {
let sql = `DELETE FROM retallyMessageRespList WHERE webId = '${v}';`
this.executeSql(sql)
})
} else if (this.obj.state == "add") { } else if (this.obj.state == "add") {
// //
for (let i = 0; i < this.ulList1.length; i++) { for (let i = 0; i < this.ulList1.length; i++) {

View File

@ -140,24 +140,23 @@
canvasId: 'mycanvas', canvasId: 'mycanvas',
success: function(res) { success: function(res) {
let tempPath = res.tempFilePath; let tempPath = res.tempFilePath;
console.log(tempPath,'压缩前') console.log(tempPath, '压缩前')
// //
let compressBase64Img = utils.compress(tempPath, 500, 0.3); //conpress utils.compress(tempPath, 500, 0.3).then(res => {
console.log(compressBase64Img,'压缩后'); console.log(res);
}); //conpress; //conpress
const ctx = uni.createCanvasContext('camCacnvs', that); const ctx = uni.createCanvasContext('camCacnvs', that);
ctx.translate(0, that.width); ctx.translate(0, that.width);
ctx.rotate((-90 * Math.PI) / 180); ctx.rotate((-90 * Math.PI) / 180);
ctx.drawImage(tempPath, 0, 0, that.width, that.height); ctx.drawImage(tempPath, 0, 0, that.width, that.height);
ctx.draw(); ctx.draw();
setTimeout(() => { setTimeout(() => {
// //
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'camCacnvs', canvasId: 'camCacnvs',
success: function(res) { success: function(res) {
// //
let path = res.tempFilePath; let path = res.tempFilePath;
}, },
fail: err => { fail: err => {
console.log('fail', err); console.log('fail', err);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB