11.16
parent
fd15de8d51
commit
2d3e6f1c30
|
@ -3,7 +3,7 @@
|
|||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
z-index: 99999999999999999999999999999;
|
||||
background: rgba(255, 255, 255, 0);
|
||||
/*display: -webkit-box;
|
||||
display: -webkit-flex;*/
|
||||
|
|
|
@ -28,18 +28,25 @@
|
|||
<p>{{userInfo.name}}</p>
|
||||
<p>{{userInfo.phone}}</p>
|
||||
</view>
|
||||
<view class="borTop">
|
||||
<view class="borHead">
|
||||
<image src="../../static/images/gqIcon.png" mode=""></image>
|
||||
<p>请选择港区</p>
|
||||
</view>
|
||||
<view class="borContent">
|
||||
<view class="gqContent" v-for="(item,index) in portList" :key="index"
|
||||
:class="{activeGq:activeIndex == index}" @click="selectPort(item,index)">
|
||||
{{item.pamName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnCss" @click="outLogin">
|
||||
<text>退出登录</text>
|
||||
</view>
|
||||
<!-- <view class="borTop" @click="messageSql('center')">
|
||||
<uni-icons type="vip" size="16" />
|
||||
<text>数据库管理</text>
|
||||
</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" @maskClick="close">
|
||||
<view class="popupBox">
|
||||
|
@ -155,6 +162,7 @@
|
|||
},
|
||||
mounted() {
|
||||
this.loginObj = uni.getStorageSync('loginObj')
|
||||
this.initData()
|
||||
this.activeIndex = uni.getStorageSync("selectPortIndex")
|
||||
this.navList[this.navIndex].type = true
|
||||
this.getUser()
|
||||
|
@ -171,7 +179,6 @@
|
|||
method: 'GET', //请求方式,必须为大写
|
||||
success: (res) => {
|
||||
this.userInfo = res.data.data
|
||||
console.log(this.userInfo)
|
||||
uni.setStorageSync('userInfo', this.userInfo)
|
||||
},
|
||||
fail: function(err) {
|
||||
|
@ -219,11 +226,11 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
if (this.portList.length > 0) {
|
||||
this.$refs.popup.open(this.type)
|
||||
this.portId = this.portList[this.activeIndex].pamId
|
||||
this.portName = this.portList[this.activeIndex].pamName
|
||||
}
|
||||
// if (this.portList.length > 0) {
|
||||
// this.$refs.popup.open(this.type)
|
||||
// this.portId = this.portList[this.activeIndex].pamId
|
||||
// this.portName = this.portList[this.activeIndex].pamName
|
||||
// }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -354,6 +361,7 @@
|
|||
this.portName = item.pamName
|
||||
this.portId = item.pamId
|
||||
this.activeIndex = index
|
||||
this.toGo()
|
||||
},
|
||||
// 确认弹框
|
||||
toGo() {
|
||||
|
@ -396,7 +404,7 @@
|
|||
},
|
||||
// 确认退出登录
|
||||
outConfirm() {
|
||||
uni.navigateTo({
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
},
|
||||
|
@ -424,8 +432,6 @@
|
|||
|
||||
.headInfo {
|
||||
width: 100%;
|
||||
height: 66px;
|
||||
line-height: 50px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.10);
|
||||
border-radius: 1px;
|
||||
|
@ -507,7 +513,6 @@
|
|||
|
||||
.infoList {
|
||||
width: 200px;
|
||||
padding: 10px 20px;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
|
@ -516,13 +521,80 @@
|
|||
position: absolute;
|
||||
right: 2px;
|
||||
top: 60px;
|
||||
box-shadow: 1px 1px 6px 0 rgba(52, 52, 52, 0.20);
|
||||
box-shadow: 0 -2px 12px 0 rgba(0, 0, 0, 0.20);
|
||||
|
||||
|
||||
.userInfo {
|
||||
color: #23262E;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
padding: 16px 0px;
|
||||
margin: 0 16px;
|
||||
|
||||
p:first-child {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.btnCss {
|
||||
width: 100%;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #0067CF;
|
||||
border-top: 1px solid #F0F0F0;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
|
||||
.borTop {
|
||||
border-top: 1px #ccc solid;
|
||||
.borHead {
|
||||
display: flex;
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
|
||||
/deep/.uni-icons {
|
||||
margin-right: 10px;
|
||||
image {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.borContent {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
overflow: scroll;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 16px;
|
||||
margin-top: 12px;
|
||||
|
||||
.gqContent {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
background: rgba(0, 103, 207, 0.05);
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: #23262E;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.activeGq {
|
||||
background: #0067CF;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* 递归使用call方式 this指向
|
||||
*
|
||||
* @param {String} componentName 需要查找的组件的名称
|
||||
* @param {String} eventName 事件名称
|
||||
* @param {Object} params 需要传递的参数
|
||||
*/
|
||||
function broadcast(componentName, eventName, params) {
|
||||
// 循环子节点找到需要的节点,没有查找到就递归进行查找
|
||||
this.$children.map(child => {
|
||||
if (componentName === child.$options.name) {
|
||||
child.$emit.apply(child, [eventName].concat(params))
|
||||
} else {
|
||||
broadcast.apply(child, [componentName, eventName].concat(params))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
/**
|
||||
* 派发 向上查找一个
|
||||
* @param {Object} componentName 需要查找的组件的名称
|
||||
* @param {Object} eventName 事件名称
|
||||
* @param {Object} params 需要传递的参数
|
||||
*/
|
||||
dispatch(componentName, eventName, params) {
|
||||
// 找到最近父节点 $root 根节点
|
||||
let parent = this.$parent || this.$root
|
||||
// 获取当前实例的名称
|
||||
let name = parent.$options.name
|
||||
|
||||
// 当前存在节点并且当前节点没有名称或者名称不等于我们要查找的节点名称,则继续遍历
|
||||
while (parent && (!name || name !== componentName)) {
|
||||
parent = parent.$parent
|
||||
if (parent) {
|
||||
name = parent.$options.name
|
||||
}
|
||||
}
|
||||
// 如果有节点则表示找到
|
||||
if (parent) {
|
||||
parent.$emit.apply(parent, [eventName].concat(params))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 广播 向下查找多个
|
||||
* @param {Object} componentName 需要查找的组件的名称
|
||||
* @param {Object} eventName 事件名称
|
||||
* @param {Object} params 需要传递的参数
|
||||
*/
|
||||
broadcast(componentName, eventName, params) {
|
||||
broadcast.call(this, componentName, eventName, params)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,320 @@
|
|||
<template>
|
||||
<view class="tn-input-class tn-input" :class="{
|
||||
'tn-input--border': border,
|
||||
'tn-input--error': validateState
|
||||
}" :style="{
|
||||
padding: `0 ${border ? 20 : 0}rpx`,
|
||||
borderColor: borderColor,
|
||||
textAlign: inputAlign
|
||||
}" @tap.stop="inputClick">
|
||||
<textarea v-if="type === 'textarea'" class="tn-input__input tn-input__textarea"
|
||||
style="width: 100%; height: 50px;" :value="defaultValue" :placeholder="placeholder"
|
||||
:placeholderStyle="placeholderStyle" :disabled="disabled || type === 'select'" :maxlength="maxLength"
|
||||
:fixed="fixed" :focus="focus" :autoHeight="autoHeight" :selectionStart="elSelectionStart"
|
||||
:selectionEnd="elSelectionEnd" :cursorSpacing="cursorSpacing" :showConfirmBar="showConfirmBar"
|
||||
@input="handleInput" @blur="handleBlur" @focus="onFocus" @confirm="onConfirm" />
|
||||
<input v-else class="tn-input__input" :type="type === 'password' ? 'text' : type"
|
||||
style="width: 100%; height: 50px;" :value="defaultValue" :password="type === 'password' && !showPassword"
|
||||
:placeholder="placeholder" :placeholderStyle="placeholderStyle" :disabled="disabled || type === 'select'"
|
||||
:maxlength="maxLength" :focus="focus" :confirmType="confirmType" :selectionStart="elSelectionStart"
|
||||
:selectionEnd="elSelectionEnd" :cursorSpacing="cursorSpacing" :showConfirmBar="showConfirmBar"
|
||||
@input="handleInput" @blur="handleBlur" @focus="onFocus" @confirm="onConfirm" />
|
||||
|
||||
<!-- 右边的icon -->
|
||||
<view class="tn-input__right-icon tn-flex tn-flex-col-center">
|
||||
<!-- 清除按钮 -->
|
||||
<view v-if="clearable && value !== '' && focused"
|
||||
class="tn-input__right-icon__item tn-input__right-icon__clear" @tap="onClear">
|
||||
<view class="icon tn-icon-close"></view>
|
||||
</view>
|
||||
<view v-else-if="type === 'text' && !focused && showRightIcon && rightIcon !== ''"
|
||||
class="tn-input__right-icon__item tn-input__right-icon__clear">
|
||||
<view class="icon" :class="[`tn-icon-${rightIcon}`]"></view>
|
||||
</view>
|
||||
<!-- 显示密码按钮 -->
|
||||
<view v-if="passwordIcon && type === 'password'"
|
||||
class="tn-input__right-icon__item tn-input__right-icon__clear" @tap="showPassword = !showPassword">
|
||||
<view v-if="!showPassword" class="tn-icon-eye-hide"></view>
|
||||
<view v-else class="icon tn-icon-eye"></view>
|
||||
</view>
|
||||
<!-- 可选项箭头 -->
|
||||
<view v-if="type === 'select'" class="tn-input__right-icon__item tn-input__right-icon__select" :class="{
|
||||
'tn-input__right-icon__select--reverse': selectOpen
|
||||
}">
|
||||
<view class="icon tn-icon-up-triangle"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Emitter from '../u-input/emitter.js'
|
||||
export default {
|
||||
mixins: [Emitter],
|
||||
name: 'tn-input',
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
// 输入框的类型
|
||||
type: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
// 输入框文字对齐方式
|
||||
inputAlign: {
|
||||
type: String,
|
||||
default: 'left'
|
||||
},
|
||||
// 文本框为空时显示的信息
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholderStyle: {
|
||||
type: String,
|
||||
default: 'color: #AAAAAA'
|
||||
},
|
||||
// 是否禁用输入框
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 可输入文字的最大长度
|
||||
maxLength: {
|
||||
type: Number,
|
||||
default: 255
|
||||
},
|
||||
// 输入框高度
|
||||
height: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// 根据内容自动调整高度
|
||||
autoHeight: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 键盘右下角显示的文字,仅在text时生效
|
||||
confirmType: {
|
||||
type: String,
|
||||
default: 'done'
|
||||
},
|
||||
// 输入框自定义样式
|
||||
customStyle: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否固定输入框
|
||||
fixed: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否自动获取焦点
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 当type为password时,是否显示右侧密码图标
|
||||
passwordIcon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 当type为 input或者textarea时是否显示边框
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 边框的颜色
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: '#dcdfe6'
|
||||
},
|
||||
// 当type为select时,旋转右侧图标,标记当时select是打开还是关闭
|
||||
selectOpen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否可清空
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 光标与键盘的距离
|
||||
cursorSpacing: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
// selectionStart和selectionEnd需要搭配使用,自动聚焦时生效
|
||||
// 光标起始位置
|
||||
selectionStart: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
// 光标结束位置
|
||||
selectionEnd: {
|
||||
type: Number,
|
||||
default: -1
|
||||
},
|
||||
// 自动去除两端空格
|
||||
trim: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否显示键盘上方的完成按钮
|
||||
showConfirmBar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 是否在输入框内最右边显示图标
|
||||
showRightIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 最右边图标的名称
|
||||
rightIcon: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 输入框样式
|
||||
inputStyle() {
|
||||
let style = {}
|
||||
// 如果没有设置高度,根据不同的类型设置一个默认值
|
||||
style.minHeight = this.height ? this.height + 'rpx' :
|
||||
this.type === 'textarea' ? this.textareaHeight + 'rpx' : this.inputHeight + 'rpx'
|
||||
|
||||
style = Object.assign(style, this.customStyle)
|
||||
|
||||
return style
|
||||
},
|
||||
// 光标起始位置
|
||||
elSelectionStart() {
|
||||
return String(this.selectionStart)
|
||||
},
|
||||
// 光标结束位置
|
||||
elSelectionEnd() {
|
||||
return String(this.selectionEnd)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 默认值
|
||||
defaultValue: this.value,
|
||||
// 输入框高度
|
||||
inputHeight: 70,
|
||||
// textarea的高度
|
||||
textareaHeight: 100,
|
||||
// 标记验证的状态
|
||||
validateState: false,
|
||||
// 标记是否获取到焦点
|
||||
focused: false,
|
||||
// 是否预览密码
|
||||
showPassword: false,
|
||||
// 用于头条小程序,判断@input中,前后的值是否发生了变化,因为头条中文下,按下键没有输入内容,也会触发@input事件
|
||||
lastValue: '',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(newVal, oldVal) {
|
||||
this.defaultValue = newVal
|
||||
// 当值发生变化时,并且type为select时,不会触发input事件
|
||||
// 模拟input事件
|
||||
if (newVal !== oldVal && this.type === 'select') {
|
||||
this.handleInput({
|
||||
detail: {
|
||||
value: newVal
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 监听form-item发出的错误事件,将输入框变成红色
|
||||
this.$on("on-form-item-error", this.onFormItemError)
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* input事件
|
||||
*/
|
||||
handleInput(event) {
|
||||
let value = event.detail.value
|
||||
// 是否需要去掉空格
|
||||
if (this.trim) value = this.$tn.string.trim(value)
|
||||
// 原生事件
|
||||
this.$emit('input', value)
|
||||
// model赋值
|
||||
this.defaultValue = value
|
||||
// 过一个生命周期再发送事件给tn-form-item,否则this.$emit('input')更新了父组件的值,但是微信小程序上
|
||||
// 尚未更新到tn-form-item,导致获取的值为空,从而校验混论
|
||||
// 这里不能延时时间太短,或者使用this.$nextTick,否则在头条上,会造成混乱
|
||||
setTimeout(() => {
|
||||
// 头条小程序由于自身bug,导致中文下,每按下一个键(尚未完成输入),都会触发一次@input,导致错误,这里进行判断处理
|
||||
// #ifdef MP-TOUTIAO
|
||||
if (this.$tn.string.trim(value) === this.lastValue) return
|
||||
this.lastValue = value
|
||||
// #endif
|
||||
|
||||
// 发送当前的值到form-item进行校验
|
||||
this.dispatch('tn-form-item', 'on-form-change', value)
|
||||
}, 40)
|
||||
},
|
||||
/**
|
||||
* blur事件
|
||||
*/
|
||||
handleBlur(event) {
|
||||
let value = event.detail.value
|
||||
|
||||
// 由于点击清除图标也会触发blur事件,导致图标消失从而无法点击
|
||||
setTimeout(() => {
|
||||
this.focused = false
|
||||
}, 100)
|
||||
|
||||
// 原生事件
|
||||
this.$emit('blur', value)
|
||||
// 过一个生命周期再发送事件给tn-form-item,否则this.$emit('blur')更新了父组件的值,但是微信小程序上
|
||||
// 尚未更新到tn-form-item,导致获取的值为空,从而校验混论
|
||||
// 这里不能延时时间太短,或者使用this.$nextTick,否则在头条上,会造成混乱
|
||||
setTimeout(() => {
|
||||
// 头条小程序由于自身bug,导致中文下,每按下一个键(尚未完成输入),都会触发一次@input,导致错误,这里进行判断处理
|
||||
// #ifdef MP-TOUTIAO
|
||||
if (this.$tn.string.trim(value) === this.lastValue) return
|
||||
this.lastValue = value
|
||||
// #endif
|
||||
|
||||
// 发送当前的值到form-item进行校验
|
||||
this.dispatch('tn-form-item', 'on-form-blur', value)
|
||||
}, 40)
|
||||
},
|
||||
// 处理校验错误
|
||||
onFormItemError(status) {
|
||||
this.validateState = status
|
||||
},
|
||||
// 聚焦事件
|
||||
onFocus(event) {
|
||||
this.focused = true
|
||||
this.$emit('focus')
|
||||
},
|
||||
// 点击确认按钮事件
|
||||
onConfirm(event) {
|
||||
this.$emit('confirm', event.detail.value)
|
||||
},
|
||||
// 清除事件
|
||||
onClear(event) {
|
||||
this.$emit('input', '')
|
||||
},
|
||||
// 点击事件
|
||||
inputClick() {
|
||||
this.$emit('click')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
12
pages.json
12
pages.json
|
@ -1,4 +1,11 @@
|
|||
{
|
||||
// "easycom": {
|
||||
// "autoscan": true,
|
||||
// "custom": {
|
||||
// "^(.*)": "@/components/$1/$1.vue"
|
||||
|
||||
// }
|
||||
// },
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/login/index",
|
||||
|
@ -252,7 +259,10 @@
|
|||
{
|
||||
"path": "pages/quality/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑货物质量"
|
||||
"navigationBarTitleText": "编辑货物质量",
|
||||
"app-plus": {
|
||||
"softinputMode": "adjustPan"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
// 分页
|
||||
total: 0,
|
||||
pageSize: 9,
|
||||
pageSize: 12,
|
||||
current: 1,
|
||||
|
||||
// 港区信息
|
||||
|
@ -274,22 +274,22 @@
|
|||
.itemList {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
margin-top: 40px;
|
||||
gap: 16px;
|
||||
|
||||
/deep/.o-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 32.2%;
|
||||
width: calc(33.3% - 16px);
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 10px 20px;
|
||||
position: relative;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
|
||||
// 分页
|
||||
total: 0,
|
||||
pageSize: 9,
|
||||
pageSize: 12,
|
||||
current: 1,
|
||||
|
||||
// 港区信息
|
||||
|
@ -171,7 +171,6 @@
|
|||
},
|
||||
method: 'GET', //请求方式,必须为大写
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
if (res.data.status == "200") {
|
||||
this.shipList = res.data.data
|
||||
this.shipList.forEach(v => {
|
||||
|
@ -207,6 +206,10 @@
|
|||
this.lotusLoadingData.isShow = false
|
||||
this.total = res.data.data.total
|
||||
this.itemList.push(...res.data.data.records)
|
||||
this.vvyId = ""
|
||||
this.vvyShip = ""
|
||||
this.shipId = ""
|
||||
this.shipName = ""
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -282,22 +285,23 @@
|
|||
.itemList {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
// justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
margin-top: 40px;
|
||||
gap: 16px;
|
||||
|
||||
/deep/.o-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 32.2%;
|
||||
width: calc(33.3% - 16px);
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 10px 20px;
|
||||
position: relative;
|
||||
margin-bottom: 16px;
|
||||
margin-right: 16px;
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<p>账号密码登录</p>
|
||||
</view>
|
||||
<view class="loginInput">
|
||||
<uni-easyinput prefixIcon="locked-filled" v-model="account" placeholder="请输入账号"></uni-easyinput>
|
||||
<uni-easyinput type="password" prefixIcon="person-filled" v-model="password" placeholder="请输入密码">
|
||||
<uni-easyinput prefixIcon="person-filled" v-model="account" placeholder="请输入账号"></uni-easyinput>
|
||||
<uni-easyinput type="password" prefixIcon="locked-filled" v-model="password" placeholder="请输入密码">
|
||||
</uni-easyinput>
|
||||
<button class="button" @click="loginGo('center')">立即登录</button>
|
||||
</view>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<view class="li">
|
||||
<p>质损发生环节:</p>
|
||||
<view class="rightInfo">
|
||||
<p>{{infoData.qdLinkName}} </p>
|
||||
<p v-if="infoData.qdLinkName == '客户反馈' || infoData.qdLinkName == '其他'">
|
||||
<p>{{infoData.qdLink}} </p>
|
||||
<p v-if="infoData.qdLink == '客户反馈' || infoData.qdLink == '其他'">
|
||||
备注:{{infoData.linkFeedback}}{{infoData.linkOther}}
|
||||
</p>
|
||||
</view>
|
||||
|
@ -25,7 +25,7 @@
|
|||
</view>
|
||||
<view class="itemBox">
|
||||
<view class="formTitle">
|
||||
<image class="titleImg" src="../../static/images/zlIcon.png"></image>
|
||||
<image src="../../static/images/zlIcon.png"></image>
|
||||
<text>板车照片</text>
|
||||
</view>
|
||||
<view class="picture">
|
||||
|
@ -36,7 +36,7 @@
|
|||
</view>
|
||||
<view class="itemBox">
|
||||
<view class="formTitle">
|
||||
<image class="titleImg" src="../../static/images/cpIcon.png"></image>
|
||||
<image src="../../static/images/cpIcon.png"></image>
|
||||
<text>板车车牌照</text>
|
||||
</view>
|
||||
<view class="picture">
|
||||
|
@ -47,7 +47,7 @@
|
|||
</view>
|
||||
<view class="itemBox">
|
||||
<view class="formTitle">
|
||||
<image class="titleImg" src="../../static/images/zxIcon.png"></image>
|
||||
<image src="../../static/images/zxIcon.png"></image>
|
||||
<text>质损信息</text>
|
||||
</view>
|
||||
<view class="zsInfo">
|
||||
|
@ -78,20 +78,20 @@
|
|||
<view class="li">
|
||||
<p>质损货物品类:</p>
|
||||
<view class="rightInfo">
|
||||
<p>{{infoData.qdGodsCategoryName}}</p>
|
||||
<p v-if="infoData.qdGodsCategoryName == '其他'">
|
||||
<p>{{infoData.qdGodsCategory}}</p>
|
||||
<p v-if="infoData.qdGcOther != null">
|
||||
备注:{{infoData.qdGcOther}}
|
||||
</p>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li imageLi">
|
||||
<view class="li imageLi" v-if="zsImg != ''">
|
||||
<image :src="zsImg"></image>
|
||||
</view>
|
||||
<view class="li tsLi">
|
||||
<p>质损概况:</p>
|
||||
<view class="rightInfo">
|
||||
<p>{{infoData.qdGodsCategoryName}}</p>
|
||||
<p v-if="infoData.qdGodsCategoryName == '其他'">
|
||||
<p>{{infoData.qualityDamageSituationName}}</p>
|
||||
<p v-if="infoData.qdsOther != null">
|
||||
备注:{{infoData.qdsOther}}
|
||||
</p>
|
||||
</view>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<p>损伤情况:</p>
|
||||
<view class="rightInfo">
|
||||
<p>{{infoData.damageSituationName}}</p>
|
||||
<p v-if="infoData.damageSituationName == '其他'">
|
||||
<p v-if="infoData.dsOther != null">
|
||||
备注:{{infoData.dsOther}}
|
||||
</p>
|
||||
</view>
|
||||
|
@ -109,7 +109,7 @@
|
|||
<p>处置情况:</p>
|
||||
<view class="rightInfo">
|
||||
<p>{{infoData.disposalSituationName}}</p>
|
||||
<p v-if="infoData.disposalSituationName == '其他'">
|
||||
<p v-if="infoData.dpsOther != null">
|
||||
备注:{{infoData.dpsOther}}
|
||||
</p>
|
||||
</view>
|
||||
|
@ -118,7 +118,7 @@
|
|||
</view>
|
||||
<view class="itemBox">
|
||||
<view class="formTitle">
|
||||
<image class="titleImg" src="../../static/images/zsIcon.png"></image>
|
||||
<image src="../../static/images/zsIcon.png"></image>
|
||||
<text>质损照片</text>
|
||||
</view>
|
||||
<view class="picture">
|
||||
|
@ -129,7 +129,7 @@
|
|||
</view>
|
||||
<view class="itemBox">
|
||||
<view class="formTitle">
|
||||
<image class="titleImg" src="../../static/images/cjhIcon.png"></image>
|
||||
<image src="../../static/images/cjhIcon.png"></image>
|
||||
<text>车架号图片</text>
|
||||
</view>
|
||||
<view class="picture">
|
||||
|
@ -194,9 +194,9 @@
|
|||
},
|
||||
method: 'GET', //请求方式,必须为大写
|
||||
success: (res) => {
|
||||
console.log('接口返回------', res);
|
||||
if (res.statusCode == 200) {
|
||||
this.infoData = res.data.data
|
||||
console.log(this.infoData)
|
||||
this.title = `${this.infoData.vinCode} - 质损详情`
|
||||
// 获取板车照片
|
||||
this.infoData.boardCarPhotos.forEach(v => {
|
||||
|
@ -241,7 +241,7 @@
|
|||
this.carFrameNumber.push(res.data)
|
||||
} else if (type == 5) {
|
||||
this.signImg = res.data
|
||||
} else if (type == 5) {
|
||||
} else if (type == 6) {
|
||||
this.zsImg = res.data
|
||||
}
|
||||
}
|
||||
|
@ -316,10 +316,6 @@
|
|||
margin-bottom: 12px;
|
||||
font-size: 14px;
|
||||
color: #23262E;
|
||||
|
||||
p:first-child {
|
||||
width: 105px;
|
||||
}
|
||||
}
|
||||
|
||||
.tsLi {
|
||||
|
@ -366,8 +362,8 @@
|
|||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,11 +9,12 @@
|
|||
<uni-easyinput suffixIcon="search" v-model="carValue" placeholder="请输入车架号"
|
||||
@iconClick="iconClick">
|
||||
</uni-easyinput>
|
||||
</view>
|
||||
<view class="right">
|
||||
<superwei-combox class="select" :candidates="shipList" :isJSON="true" keyName="shipVvy"
|
||||
placeholder="船名/航次" v-model="shipValue" @select="shipChange"
|
||||
@input="shipInput"></superwei-combox>
|
||||
<button class="btn" @click="onSearch">搜索</button>
|
||||
</view>
|
||||
<view class="right">
|
||||
<superwei-combox class="select" :candidates="zshjList" :isJSON="true" keyName="name"
|
||||
placeholder="质损环节" v-model="zshjName" @select="zshjChange"></superwei-combox>
|
||||
<superwei-combox class="select" :candidates="brandList" :isJSON="true" keyName="brdName"
|
||||
|
@ -29,7 +30,7 @@
|
|||
<text>{{item.vinCode}}</text>
|
||||
</view>
|
||||
<view class="rightHead">
|
||||
<view class="delBtn" @click.stop="del(item)">
|
||||
<view class="delBtn" @click.stop="del(item)" v-if="item.removableFlag == 1">
|
||||
<image src="../../static/images/delBtn.png"></image>
|
||||
<text>删除</text>
|
||||
</view>
|
||||
|
@ -41,7 +42,9 @@
|
|||
</view>
|
||||
<view class="row">
|
||||
<view class="col">
|
||||
航次/船名:{{item.spmIdDesc}}
|
||||
<text
|
||||
v-if="item.spmIdAndVvyId != null && item.spmIdAndVvyId != ''">船名/航次:{{item.spmIdAndVvyId}}</text>
|
||||
<text v-else>船名/航次:暂无计划</text>
|
||||
</view>
|
||||
<view class="col">
|
||||
作业时间:{{item.workTime}}
|
||||
|
@ -137,7 +140,8 @@
|
|||
onLoad() {
|
||||
this.loginObj = uni.getStorageSync('loginObj')
|
||||
this.portObj = uni.getStorageSync('portObj')
|
||||
uni.setStorageSync('signObj', "")
|
||||
uni.setStorageSync('signImg', "")
|
||||
uni.setStorageSync('hzzsImg', "")
|
||||
this.initData()
|
||||
this.getBrand()
|
||||
this.getShip()
|
||||
|
@ -159,6 +163,10 @@
|
|||
iconClick() {
|
||||
this.initData()
|
||||
},
|
||||
// 搜索按钮
|
||||
onSearch() {
|
||||
this.initData()
|
||||
},
|
||||
// 获取列表数据
|
||||
initData() {
|
||||
uni.request({
|
||||
|
@ -172,7 +180,6 @@
|
|||
console.log('接口返回------', res);
|
||||
if (res.statusCode == 200) {
|
||||
this.itemList = res.data.data.records
|
||||
console.log(this.itemList)
|
||||
this.total = res.data.data.total
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +214,6 @@
|
|||
this.shipValue = e.shipVvy
|
||||
this.vvyId = e.vvyId
|
||||
this.current = 1
|
||||
this.initData()
|
||||
},
|
||||
// 质损环节下拉
|
||||
zshjChange(e) {
|
||||
|
@ -234,7 +240,6 @@
|
|||
name: v.ptrDesc
|
||||
})
|
||||
})
|
||||
console.log(this.zshjList)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -242,6 +247,11 @@
|
|||
// 选择船输入框
|
||||
shipInput(e) {
|
||||
this.shipSr = e
|
||||
if (e == '') {
|
||||
this.vvyId = ""
|
||||
this.vvyName = ""
|
||||
this.shipId = ""
|
||||
}
|
||||
this.getShip()
|
||||
},
|
||||
// 获取品牌
|
||||
|
@ -380,17 +390,26 @@
|
|||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
/deep/.is-input-border {
|
||||
border-radius: 20px;
|
||||
width: 300px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/deep/.uni-easyinput__placeholder-class {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
/deep/.uni-input-input {
|
||||
padding-left: 10px;
|
||||
.btn {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin-left: 0;
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
background-color: #0067CF;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -429,7 +448,6 @@
|
|||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
|
||||
.item {
|
||||
padding: 15px;
|
||||
|
@ -440,8 +458,8 @@
|
|||
justify-content: space-between;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 14px;
|
||||
color: #23262E;
|
||||
gap: 12px;
|
||||
color: #23262E;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.headTop {
|
||||
width: 100%;
|
||||
|
|
|
@ -47,8 +47,6 @@
|
|||
},
|
||||
onLoad(option) {
|
||||
that = this;
|
||||
id = option.id;
|
||||
type = option.type;
|
||||
this.ctx = uni.createCanvasContext('mycanvas', this); //创建绘图对象
|
||||
//设置画笔样式
|
||||
this.ctx.lineWidth = 4;
|
||||
|
@ -57,7 +55,7 @@
|
|||
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
that.width = res.windowWidth * 0.8;
|
||||
that.height = res.windowHeight * 0.85;
|
||||
}
|
||||
|
@ -154,39 +152,43 @@
|
|||
// 当操作完成时调用resolve()或reject()
|
||||
pathToBase64(e.tempFilePath).then(path => {
|
||||
that.url = path
|
||||
uni.setStorageSync('signImg', that.url)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
});
|
||||
myPromise.then(result => {}).catch(error => {});
|
||||
let timestamp = new Date().getTime();
|
||||
let sunumber = Math.floor(Math.random() * 999);
|
||||
var file = that.base64ToFile(that.url, timestamp + sunumber)
|
||||
uni.uploadFile({
|
||||
url: `${that.$local}/api/file/upload`, //上传图片api
|
||||
header: {
|
||||
'Authorization': `Bearer ${that.loginObj.access_token}`
|
||||
},
|
||||
file: file,
|
||||
fileType: 'image',
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
console.log(JSON.parse(res.data))
|
||||
that.signImg = JSON.parse(res.data).data.filePath
|
||||
console.log(that.signImg)
|
||||
let signObj = {
|
||||
signImg: that.signImg,
|
||||
}
|
||||
uni.setStorageSync('signObj', signObj)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
// let timestamp = new Date().getTime();
|
||||
// let sunumber = Math.floor(Math.random() * 999);
|
||||
// var file = that.base64ToFile(that.url, timestamp + sunumber)
|
||||
// console.log(file)
|
||||
// uni.uploadFile({
|
||||
// url: `${that.$local}/api/file/upload`, //上传图片api
|
||||
// header: {
|
||||
// 'Authorization': `Bearer ${that.loginObj.access_token}`
|
||||
// },
|
||||
// file: file,
|
||||
// fileType: 'image',
|
||||
// name: 'file',
|
||||
// success: (res) => {
|
||||
// console.log(JSON.parse(res.data))
|
||||
// that.signImg = JSON.parse(res.data).data.filePath
|
||||
// console.log(that.signImg)
|
||||
// let signObj = {
|
||||
// signImg: that.signImg,
|
||||
// }
|
||||
// uni.setStorageSync('signObj', signObj)
|
||||
// uni.navigateBack({
|
||||
// delta: 1
|
||||
// });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<head-view title="绘制质损图"></head-view>
|
||||
<view class="containe contentFixedr">
|
||||
<view class="sign-box">
|
||||
<canvas class="mycanvas" canvas-id="mycanvas"
|
||||
@touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" disable-scroll="true"></canvas>
|
||||
<canvas class="mycanvas" canvas-id="mycanvas" @touchstart="touchstart" @touchmove="touchmove"
|
||||
@touchend="touchend" disable-scroll="true"></canvas>
|
||||
<view class="canvasBg">
|
||||
<image src="../../static/images/zs5.jpg" mode=""></image>
|
||||
</view>
|
||||
|
@ -51,7 +51,7 @@
|
|||
methods: {
|
||||
init() {
|
||||
this.ctx = uni.createCanvasContext('mycanvas', this); //创建绘图对象
|
||||
console.log(this.ctx);
|
||||
this.ctx.setFillStyle('#ff0000');
|
||||
//设置画笔样式
|
||||
this.ctx.lineWidth = 4;
|
||||
this.ctx.lineCap = 'round';
|
||||
|
@ -59,12 +59,10 @@
|
|||
var that = this
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
that.ctx.drawImage("../../static/images/zs5.jpg", 0, 0, 1000, 222)
|
||||
that.width = res.windowWidth;
|
||||
that.height = res.windowHeight;
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
@ -145,42 +143,44 @@
|
|||
canvasId: 'mycanvas',
|
||||
success: function(e) {
|
||||
const myPromise = new Promise((resolve, reject) => {
|
||||
console.log(e.tempFilePath)
|
||||
// 执行异步操作
|
||||
// 当操作完成时调用resolve()或reject()
|
||||
pathToBase64(e.tempFilePath).then(path => {
|
||||
that.url = path
|
||||
console.log(that.url)
|
||||
uni.setStorageSync('hzzsImg', that.url)
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
// let timestamp = new Date().getTime();
|
||||
// let sunumber = Math.floor(Math.random() * 999);
|
||||
// var file = that.base64ToFile(that.url, timestamp + sunumber)
|
||||
// uni.uploadFile({
|
||||
// url: `${that.$local}/api/file/upload`, //上传图片api
|
||||
// header: {
|
||||
// 'Authorization': `Bearer ${that.loginObj.access_token}`
|
||||
// },
|
||||
// file: file,
|
||||
// fileType: 'image',
|
||||
// name: 'file',
|
||||
// success: (res) => {
|
||||
// console.log(res)
|
||||
// console.log(JSON.parse(res.data))
|
||||
// that.signImg = JSON.parse(res.data).data.filePath
|
||||
// console.log(that.signImg)
|
||||
// // uni.navigateBack({
|
||||
// // delta: 1
|
||||
// // });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.log(err)
|
||||
// }
|
||||
// })
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
})
|
||||
});
|
||||
myPromise.then(result => {}).catch(error => {});
|
||||
let timestamp = new Date().getTime();
|
||||
let sunumber = Math.floor(Math.random() * 999);
|
||||
var file = that.base64ToFile(that.url, timestamp + sunumber)
|
||||
uni.uploadFile({
|
||||
url: `${that.$local}/api/file/upload`, //上传图片api
|
||||
header: {
|
||||
'Authorization': `Bearer ${that.loginObj.access_token}`
|
||||
},
|
||||
file: file,
|
||||
fileType: 'image',
|
||||
name: 'file',
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
console.log(JSON.parse(res.data))
|
||||
that.signImg = JSON.parse(res.data).data.filePath
|
||||
console.log(that.signImg)
|
||||
// uni.navigateBack({
|
||||
// delta: 1
|
||||
// });
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
进口航次: <text>{{item.inVvyName}}</text>
|
||||
</view>
|
||||
<view class="nitem">
|
||||
进口贸易类型: <text>{{item.inTradeTypeName}}</text>
|
||||
贸易类型: <text>{{item.inTradeTypeName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
|
@ -40,7 +40,7 @@
|
|||
出口航次: <text>{{item.outVvyName}}</text>
|
||||
</view>
|
||||
<view class="nitem">
|
||||
出口贸易类型: <text>{{item.outTradeTypeName}}</text>
|
||||
贸易类型: <text>{{item.outTradeTypeName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
|
@ -749,16 +749,49 @@
|
|||
})
|
||||
})
|
||||
let delPmIds = uni.getStorageSync("delPmIds")
|
||||
if (delPmIds == null || delPmIds == "") {
|
||||
delPmIds = []
|
||||
}
|
||||
let delSwmIds = uni.getStorageSync("delSwmIds")
|
||||
if (delSwmIds == null || delSwmIds == "") {
|
||||
delSwmIds = []
|
||||
}
|
||||
let delSrmIds = uni.getStorageSync("delSrmIds")
|
||||
if (delSrmIds == null || delSrmIds == "") {
|
||||
delSrmIds = []
|
||||
}
|
||||
let delSoiIds = uni.getStorageSync("delSoiIds")
|
||||
if (delSoiIds == null || delSoiIds == "") {
|
||||
delSoiIds = []
|
||||
}
|
||||
let delSauIds = uni.getStorageSync("delSauIds")
|
||||
if (delSauIds == null || delSauIds == "") {
|
||||
delSauIds = []
|
||||
}
|
||||
let delSsIds = uni.getStorageSync("delSsIds")
|
||||
if (delSsIds == null || delSsIds == "") {
|
||||
delSsIds = []
|
||||
}
|
||||
let delAlIds = uni.getStorageSync("delAlIds")
|
||||
if (delAlIds == null || delAlIds == "") {
|
||||
delAlIds = []
|
||||
}
|
||||
let delLnIds = uni.getStorageSync("delLnIds")
|
||||
if (delLnIds == null || delLnIds == "") {
|
||||
delLnIds = []
|
||||
}
|
||||
let delCsIds = uni.getStorageSync("delCsIds")
|
||||
if (delCsIds == null || delCsIds == "") {
|
||||
delCsIds = []
|
||||
}
|
||||
let delCtIds = uni.getStorageSync("delCtIds")
|
||||
if (delCtIds == null || delCtIds == "") {
|
||||
delCtIds = []
|
||||
}
|
||||
let delMfIds = uni.getStorageSync("delMfIds")
|
||||
if (delMfIds == null || delMfIds == "") {
|
||||
delMfIds = []
|
||||
}
|
||||
|
||||
let workDataInfo = {
|
||||
"adviserLayoutReqList": that.shipmentAdviserLayoutRespList, // 指导员作业布置
|
||||
|
|
|
@ -88,7 +88,9 @@
|
|||
<p>停泊时间:</p>
|
||||
<p>Time of Shifting </p>
|
||||
</td>
|
||||
<td class="td2">{{tableInfo.noProductBerthTime}}</td>
|
||||
<td class="td2">{{tableInfo.noProductBerthStTime}} -
|
||||
{{tableInfo.noProductBerthEdTime}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue