dev4
Panzihang 2023-11-16 18:04:18 +08:00
parent fd15de8d51
commit 2d3e6f1c30
17 changed files with 1207 additions and 482 deletions

View File

@ -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;*/

View File

@ -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;
}
}
}
}

View File

@ -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)
}
}
}

View File

@ -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
},
// typepassword
passwordIcon: {
type: Boolean,
default: true
},
// type inputtextarea
border: {
type: Boolean,
default: false
},
//
borderColor: {
type: String,
default: '#dcdfe6'
},
// typeselectselect
selectOpen: {
type: Boolean,
default: false
},
//
clearable: {
type: Boolean,
default: true
},
//
cursorSpacing: {
type: Number,
default: 0
},
// selectionStartselectionEnd使
//
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
// typeselectinput
// 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-itemthis.$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-itemthis.$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>

View File

@ -1,4 +1,11 @@
{
// "easycom": {
// "autoscan": true,
// "custom": {
// "^(.*)": "@/components/$1/$1.vue"
// }
// },
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/index",
@ -252,7 +259,10 @@
{
"path": "pages/quality/edit",
"style": {
"navigationBarTitleText": "编辑货物质量"
"navigationBarTitleText": "编辑货物质量",
"app-plus": {
"softinputMode": "adjustPan"
}
}
},
{

View File

@ -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;

View File

@ -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;

View File

@ -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>

View File

@ -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

View File

@ -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%;

View File

@ -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)
// }
// })
}
});
}

View File

@ -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)
}
})
}
});
},

View File

@ -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, //

View File

@ -88,7 +88,9 @@
<p>停泊时间</p>
<p>Time of Shifting&nbsp;&nbsp;</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