|
@@ -29,7 +29,8 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="bottom">
|
|
|
- <div class="bg-left titleup">
|
|
|
+ <div id="video-container"></div>
|
|
|
+ <!--<div class="bg-left titleup">
|
|
|
<span class="word_css">实时监控</span>
|
|
|
</div>
|
|
|
<div style="position:relative;">
|
|
@@ -41,23 +42,7 @@
|
|
|
<video id="videoDo" class="video"></video>
|
|
|
</div>
|
|
|
<canvas id="canvasId" v-show="false" class="canvas"></canvas>
|
|
|
- <!-- <div class="videoImg">
|
|
|
- <div class="videoImg-row">
|
|
|
- <video id="videoElement" autoplay muted width="50%"></video>
|
|
|
- <video id="videoElement1" autoplay muted width="50%"></video>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="videoImg-row">
|
|
|
- <div class="carnumber-style">
|
|
|
- <el-button @click='positionPlace(1)' type="primary" class="btn">定位车辆</el-button>
|
|
|
- <div class="number">车牌号1:{{ $store.state.user.carNumber1 }}</div>
|
|
|
- </div>
|
|
|
- <div class="carnumber-style">
|
|
|
- <el-button @click='positionPlace(2)' type="primary" class="btn">定位车辆</el-button>
|
|
|
- <div class="number">车牌号2:{{ $store.state.user.carNumber2 }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
+ -->
|
|
|
<!-- <div v-if="!monitorUrl1" class="video1">
|
|
|
<img
|
|
|
src="../../../public/img/quesheng@2x.png"
|
|
@@ -412,9 +397,9 @@
|
|
|
<el-button @click="refreshClick(1)" type="primary"
|
|
|
>刷新</el-button
|
|
|
>
|
|
|
- <el-button @click="refreshClick" type="primary">{{
|
|
|
+ <!-- <el-button @click="refreshClick" type="primary">{{
|
|
|
timer ? refresh : '自动刷新'
|
|
|
- }}</el-button>
|
|
|
+ }}</el-button> -->
|
|
|
<!-- <el-checkbox v-model="checked">默认</el-checkbox> -->
|
|
|
</div>
|
|
|
<div class="screen frame">
|
|
@@ -684,6 +669,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+var player = null
|
|
|
+var accessToken = null
|
|
|
import flvjs from 'flv.js'
|
|
|
import {
|
|
|
tare,
|
|
@@ -706,7 +693,7 @@ import BalanceAlert from '@/components/balanceAlert'
|
|
|
import html2canvas from 'html2canvas'
|
|
|
import axios from 'axios'
|
|
|
import configText from '../../../vue.config.js'
|
|
|
-
|
|
|
+import EZUIKit from 'ezuikit-js'
|
|
|
export default {
|
|
|
components: {
|
|
|
weightCheckPrint,
|
|
@@ -813,7 +800,6 @@ export default {
|
|
|
isShowImg: false,
|
|
|
photoInfo: '',
|
|
|
canvas: null,
|
|
|
- player: null,
|
|
|
ip1: '',
|
|
|
ip2: '',
|
|
|
rom1: '',
|
|
@@ -926,7 +912,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.cameraImgFile()
|
|
|
localStorage.setItem('serverIp', configText.devServer.proxy['/pb'].target)
|
|
|
getcomp({
|
|
|
userMobilePhone: JSON.parse(
|
|
@@ -935,9 +920,15 @@ export default {
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then(res => {
|
|
|
- this.compNameoptions = res
|
|
|
+ console.log(res)
|
|
|
+ if (res.length > 0)
|
|
|
+ this.companyNameOptions = [
|
|
|
+ {
|
|
|
+ label: res[0],
|
|
|
+ value: res[0]
|
|
|
+ }
|
|
|
+ ]
|
|
|
})
|
|
|
- // this.getVideos()
|
|
|
this.isShowBalance = true
|
|
|
var _saomaData = JSON.parse(localStorage.getItem('saoma_data')) //判断是否扫码进来的
|
|
|
// }
|
|
@@ -1024,6 +1015,24 @@ export default {
|
|
|
} else if (this.tpyeNo == 2) {
|
|
|
this.information = '皮重'
|
|
|
}
|
|
|
+ getToken()
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ accessToken = response
|
|
|
+ player = new EZUIKit.EZUIKitPlayer({
|
|
|
+ id: 'video-container', // 视频容器ID
|
|
|
+ accessToken: accessToken,
|
|
|
+ url: this.monitorUrl2,
|
|
|
+ template: 'standard',
|
|
|
+ width: 550,
|
|
|
+ height: 350,
|
|
|
+ handleCapturePicture: res => {
|
|
|
+ console.log('rereer', res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.player = player
|
|
|
+ window.accessToken = accessToken
|
|
|
+ })
|
|
|
this.getList()
|
|
|
})
|
|
|
},
|
|
@@ -1042,77 +1051,48 @@ export default {
|
|
|
// if (this.$route.query.automaticWeightAcquisition == '1') {
|
|
|
},
|
|
|
methods: {
|
|
|
- cameraImgFile() {
|
|
|
- let _this = this
|
|
|
- if (this.canvas !== null) {
|
|
|
- let cxt = this.canvas.getContext('2d')
|
|
|
- cxt.clearRect(0, 0, this.canvas.width, this.canvas.height)
|
|
|
- }
|
|
|
- // 老的浏览器可能根本没有实现 mediaDevices,所以我们可以先设置一个空的对象
|
|
|
- if (navigator.mediaDevices === undefined) {
|
|
|
- navigator.mediaDevices = {}
|
|
|
- }
|
|
|
- // 一些浏览器部分支持 mediaDevices。我们不能直接给对象设置 getUserMedia
|
|
|
- // 因为这样可能会覆盖已有的属性。这里我们只会在没有getUserMedia属性的时候添加它。
|
|
|
- if (navigator.mediaDevices.getUserMedia === undefined) {
|
|
|
- navigator.mediaDevices.getUserMedia = function(constraints) {
|
|
|
- // 首先,如果有getUserMedia的话,就获得它
|
|
|
- var getUserMedia =
|
|
|
- navigator.webkitGetUserMedia || navigator.mozGetUserMedia
|
|
|
-
|
|
|
- // 一些浏览器根本没实现它 - 那么就返回一个error到promise的reject来保持一个统一的接口
|
|
|
- if (!getUserMedia) {
|
|
|
- return Promise.reject(
|
|
|
- new Error('getUserMedia is not implemented in this browser')
|
|
|
- )
|
|
|
+ // callbackPic(data) {
|
|
|
+ // console.log('ressssss', data)
|
|
|
+ // },
|
|
|
+ getAPhoto() {
|
|
|
+ console.log('getAPhoto')
|
|
|
+ // const capCallback = data => {
|
|
|
+ // console.log('ressssss', data)
|
|
|
+ // }
|
|
|
+ // player.handleCapturePicture = this.callbackPic
|
|
|
+ // player.capturePicture('default', this.callbackPic)
|
|
|
+ // player.capturePicture(`${new Date().getTime()}`, capCallback)
|
|
|
+ var capturePicturePromise = player.capturePicture(
|
|
|
+ `${new Date().getTime()}`
|
|
|
+ )
|
|
|
+ capturePicturePromise.then(res => {
|
|
|
+ console.log('promise 获取 数据', res)
|
|
|
+ let b = this.dataURLtoFile(
|
|
|
+ this.transformUint8ArrayToBase64(res.data.fileUint8Array),
|
|
|
+ 'printImage'
|
|
|
+ )
|
|
|
+ let formdata = new FormData()
|
|
|
+ formdata.append('file', b)
|
|
|
+ axios({
|
|
|
+ method: 'post',
|
|
|
+ url: this.global.uploadPath,
|
|
|
+ data: formdata
|
|
|
+ }).then(response => {
|
|
|
+ console.log('response.data.data.url', response.data.data.url)
|
|
|
+ this.photoInfo = response.data.data.url
|
|
|
+ if (this.photoInfo) {
|
|
|
+ this.coverImgList.push(this.photoInfo)
|
|
|
}
|
|
|
- // 否则,为老的navigator.getUserMedia方法包裹一个Promise
|
|
|
- return new Promise(function(resolve, reject) {
|
|
|
- getUserMedia.call(navigator, constraints, resolve, reject)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- navigator.mediaDevices
|
|
|
- .getUserMedia({ video: true, audio: false })
|
|
|
- .then(function(stream) {
|
|
|
- _this.videoShow = true
|
|
|
- _this.$nextTick(() => {
|
|
|
- let video = document.getElementById('videoDo')
|
|
|
- video.srcObject = stream
|
|
|
- video.onloadedmetadata = function(e) {
|
|
|
- video.play()
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(function(err) {
|
|
|
- _this.videoShow = false
|
|
|
- _this.$message.warning('未发现可拍照设备或出现其他错误!')
|
|
|
})
|
|
|
- },
|
|
|
-
|
|
|
- getAPhoto() {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- let video = document.getElementById('videoDo')
|
|
|
- this.canvas = document.getElementById('canvasId')
|
|
|
- this.canvas
|
|
|
- .getContext('2d')
|
|
|
- .drawImage(video, 0, 0, this.canvas.width, this.canvas.height)
|
|
|
- //把canvas图像转为img图片
|
|
|
- this.photoInfo = this.canvas.toDataURL('image/png')
|
|
|
- if (this.photoInfo !== '') {
|
|
|
- let b = this.dataURLtoFile(this.photoInfo, ' carImage')
|
|
|
- let formdata = new FormData()
|
|
|
- formdata.append('file', b)
|
|
|
- axios({
|
|
|
- method: 'post',
|
|
|
- url: this.global.uploadPath,
|
|
|
- data: formdata
|
|
|
- }).then(response => {
|
|
|
- resolve(response.data.data.url)
|
|
|
- })
|
|
|
- }
|
|
|
})
|
|
|
},
|
|
|
+ transformUint8ArrayToBase64(array) {
|
|
|
+ var binary = ''
|
|
|
+ for (var len = array.byteLength, i = 0; i < len; i++) {
|
|
|
+ binary += String.fromCharCode(array[i])
|
|
|
+ }
|
|
|
+ return 'data:image/png;base64,' + window.btoa(binary).replace(/=/g, '')
|
|
|
+ },
|
|
|
// uploadingPhoto() {
|
|
|
// if (this.photoInfo) {
|
|
|
// // 获取到的图片为base64格式
|
|
@@ -1128,95 +1108,6 @@ export default {
|
|
|
// this.$message.warning("请先拍照再确定上传照片");
|
|
|
// }
|
|
|
// },
|
|
|
- play() {
|
|
|
- this.flvPlayer.play()
|
|
|
- },
|
|
|
- positionPlace(type) {
|
|
|
- let _number = ''
|
|
|
- if (type == 1) {
|
|
|
- _number = this.carNumber1
|
|
|
- } else {
|
|
|
- _number = this.carNumber2
|
|
|
- }
|
|
|
- console.log('定位车辆')
|
|
|
- console.log(this.carList)
|
|
|
- for (let i = 0; i < this.carList.length; i++) {
|
|
|
- if (_number == this.carList[i].carNumber) {
|
|
|
- this.setCurrent(this.carList[2])
|
|
|
- return
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: '未识别到车辆信息',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- getVideos(ip1, ip2, rom1, rom2) {
|
|
|
- if (rom1) {
|
|
|
- if (flvjs.isSupported()) {
|
|
|
- getToken({ romId: rom1 })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- console.log(111)
|
|
|
- // let _accessToken = response.split('$$')[0]
|
|
|
- let _playUrl = response.split('$$')[1]
|
|
|
- // this.VideoSrc = _playUrl
|
|
|
- let videoElement = document.getElementById('videoElement')
|
|
|
- this.flvPlayer = flvjs.createPlayer({
|
|
|
- type: 'flv',
|
|
|
- isLive: true,
|
|
|
- hasAudio: false,
|
|
|
- url: _playUrl
|
|
|
- })
|
|
|
- this.flvPlayer.attachMediaElement(videoElement)
|
|
|
- this.flvPlayer.load()
|
|
|
- this.flvPlayer.play()
|
|
|
- })
|
|
|
- .catch(response => {})
|
|
|
- }
|
|
|
- whetherWebSocket1(ip1, localStorage.getItem('ws-pf_userId'))
|
|
|
- }
|
|
|
- if (rom2) {
|
|
|
- if (flvjs.isSupported()) {
|
|
|
- getRom({ romId: rom2 })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- console.log(111)
|
|
|
- // let _accessToken = response.split('$$')[0]
|
|
|
- let _playUrl = response.split('$$')[1]
|
|
|
- // this.VideoSrc1 = _playUrl
|
|
|
- let videoElement1 = document.getElementById('videoElement1')
|
|
|
- this.flvPlayer = flvjs.createPlayer({
|
|
|
- type: 'flv',
|
|
|
- isLive: true,
|
|
|
- hasAudio: false,
|
|
|
- url: _playUrl
|
|
|
- })
|
|
|
- this.flvPlayer.attachMediaElement(videoElement1)
|
|
|
- this.flvPlayer.load()
|
|
|
- this.flvPlayer.play()
|
|
|
- })
|
|
|
- .catch(response => {})
|
|
|
- }
|
|
|
-
|
|
|
- whetherWebSocket2(ip2, localStorage.getItem('ws-pf_userId'))
|
|
|
- }
|
|
|
-
|
|
|
- // getVideo({
|
|
|
- // ip1:ip1,
|
|
|
- // ip2:ip2,
|
|
|
- // userId:localStorage.getItem('ws-pf_userId')
|
|
|
- // })
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // console.log(111)
|
|
|
-
|
|
|
- // })
|
|
|
- // .catch((response) => {
|
|
|
-
|
|
|
- // })
|
|
|
- },
|
|
|
changeOut(e) {
|
|
|
if (e) {
|
|
|
this.printout = true
|
|
@@ -1243,82 +1134,11 @@ export default {
|
|
|
.then(response => {
|
|
|
that.common.commonWeighingList = response.records
|
|
|
that.makeData()
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- statusType: that.statusType,
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- pcFlag: 5
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- that.deptBudgetTotal = response.total
|
|
|
- // that.weighingList = response.records
|
|
|
- })
|
|
|
- .catch(response => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
+ that.deptBudgetTotal = response.total
|
|
|
})
|
|
|
.catch(response => {
|
|
|
// EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
})
|
|
|
- } else {
|
|
|
- clearInterval(that.timer)
|
|
|
- that.refresh = 60
|
|
|
- that.timer = setInterval(function() {
|
|
|
- // console.log(that.refresh)
|
|
|
- if (that.refresh == 0) {
|
|
|
- that.refresh = 60
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- pcFlag: 5
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- that.common.commonWeighingList = response.records
|
|
|
- that.makeData()
|
|
|
- getweighingList({
|
|
|
- compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- currentPage: that.currentPage,
|
|
|
- pageSize: that.pageSize,
|
|
|
- searchKeyWord: '',
|
|
|
- statusType: that.statusType,
|
|
|
- warehouseName: that.warehouseName,
|
|
|
- managementType: 1,
|
|
|
- serviceManagementType: that.inWarehouseType,
|
|
|
- loadingstatus: 1,
|
|
|
- pcFlag: 5
|
|
|
- // statusType:1
|
|
|
- })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- that.deptBudgetTotal = response.total
|
|
|
- // that.weighingList = response.records
|
|
|
- })
|
|
|
- .catch(response => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(response => {
|
|
|
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- })
|
|
|
- }
|
|
|
- that.refresh--
|
|
|
- }, 1000)
|
|
|
}
|
|
|
},
|
|
|
changeEw(e) {
|
|
@@ -1438,6 +1258,21 @@ export default {
|
|
|
} else if (this.allowEdit == 1) {
|
|
|
this.disabled = false
|
|
|
}
|
|
|
+ let _this = this
|
|
|
+ if (_this.monitorUrl2) {
|
|
|
+ player = new EZUIKit.EZUIKitPlayer({
|
|
|
+ id: 'video-container', // 视频容器ID
|
|
|
+ accessToken: accessToken,
|
|
|
+ url: _this.monitorUrl2,
|
|
|
+ // simple - 极简版; pcLive-pc直播;pcRec-pc回放;mobileLive-移动端直播;mobileRec-移动端回放;security - 安防版;voice-语音版;
|
|
|
+ template: 'standard',
|
|
|
+ width: 550,
|
|
|
+ height: 350
|
|
|
+ })
|
|
|
+ window.player = player
|
|
|
+ } else {
|
|
|
+ player.stop()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
this.getList()
|
|
@@ -1543,43 +1378,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
this.refreshClick(1)
|
|
|
- // getweighingList({
|
|
|
- // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- // currentPage: this.currentPage,
|
|
|
- // pageSize: this.pageSize,
|
|
|
- // searchKeyWord: '',
|
|
|
- // warehouseName: this.warehouseName,
|
|
|
- // managementType: 1,
|
|
|
- // serviceManagementType: this.inWarehouseType,
|
|
|
- // // statusType:1
|
|
|
- // })
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // this.common.commonWeighingList = response.records
|
|
|
- // this.makeData()
|
|
|
- // })
|
|
|
- // .catch((response) => {
|
|
|
- // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- // })
|
|
|
- // getweighingList({
|
|
|
- // compId: localStorage.getItem('ws-pf_compId'),
|
|
|
- // currentPage: this.currentPage,
|
|
|
- // pageSize: this.pageSize,
|
|
|
- // searchKeyWord: '',
|
|
|
- // statusType: this.statusType,
|
|
|
- // warehouseName: this.warehouseName,
|
|
|
- // managementType: 1,
|
|
|
- // serviceManagementType: this.inWarehouseType,
|
|
|
- // // statusType:1
|
|
|
- // })
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // this.deptBudgetTotal = response.total
|
|
|
- // this.weighingList = response.records
|
|
|
- // })
|
|
|
- // .catch((response) => {
|
|
|
- // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
- // })
|
|
|
},
|
|
|
makeData() {
|
|
|
this.mList = []
|
|
@@ -1742,211 +1540,6 @@ export default {
|
|
|
this.deptBudgetTotal = this.pList.length
|
|
|
}
|
|
|
this.weighingList.carModel = this.weighingList.qualityInspectionManagement.carModel
|
|
|
- //已下代码注释保留
|
|
|
- // if (this.weighingList.carModel == '单拖小柜') {
|
|
|
- // this.weighingList.receivableWeighingFee = 80
|
|
|
- // this.weighingList.actualWeighingFee = 80
|
|
|
- // } else if (this.weighingList.carModel == '双拖小柜') {
|
|
|
- // this.weighingList.receivableWeighingFee = 160
|
|
|
- // this.weighingList.actualWeighingFee = 160
|
|
|
- // } else if (this.weighingList.carModel == '大柜') {
|
|
|
- // if (this.weighingList.grossWeight / 1000 < 50) {
|
|
|
- // this.$set(this.weighingList, 'receivableWeighingFee', 120)
|
|
|
- // this.weighingList.actualWeighingFee = 120
|
|
|
- // this.$forceUpdate()
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 50 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 65
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 150
|
|
|
- // this.weighingList.actualWeighingFee = 150
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 65 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 75
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 170
|
|
|
- // this.weighingList.actualWeighingFee = 170
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 75 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 80
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 190
|
|
|
- // this.weighingList.actualWeighingFee = 190
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 80 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 85
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 210
|
|
|
- // this.weighingList.actualWeighingFee = 210
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 85 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 95
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 240
|
|
|
- // this.weighingList.actualWeighingFee = 240
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 95 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 105
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 260
|
|
|
- // this.weighingList.actualWeighingFee = 260
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 105 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 150
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 300
|
|
|
- // this.weighingList.actualWeighingFee = 300
|
|
|
- // }
|
|
|
- // } else if (this.weighingList.carModel == '挂车') {
|
|
|
- // if (this.weighingList.grossWeight / 1000 < 50) {
|
|
|
- // this.weighingList.receivableWeighingFee = 180
|
|
|
- // this.weighingList.actualWeighingFee = 180
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 50 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 65
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 200
|
|
|
- // this.weighingList.actualWeighingFee = 200
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 65 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 75
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 250
|
|
|
- // this.weighingList.actualWeighingFee = 250
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 75 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 85
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 350
|
|
|
- // this.weighingList.actualWeighingFee = 350
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 85 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 95
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 400
|
|
|
- // this.weighingList.actualWeighingFee = 400
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 95 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 105
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 450
|
|
|
- // this.weighingList.actualWeighingFee = 450
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 105 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 120
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 500
|
|
|
- // this.weighingList.actualWeighingFee = 500
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 120 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 130
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 550
|
|
|
- // this.weighingList.actualWeighingFee = 550
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 130 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 150
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 700
|
|
|
- // this.weighingList.actualWeighingFee = 700
|
|
|
- // }
|
|
|
- // } else if (this.weighingList.carModel == '冷藏箱(不抠箱)') {
|
|
|
- // if (this.weighingList.grossWeight / 1000 < 50) {
|
|
|
- // this.weighingList.receivableWeighingFee = 120
|
|
|
- // this.weighingList.actualWeighingFee = 120
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 50 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 65
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 150
|
|
|
- // this.weighingList.actualWeighingFee = 150
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 65 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 75
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 170
|
|
|
- // this.weighingList.actualWeighingFee = 170
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 75 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 80
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 190
|
|
|
- // this.weighingList.actualWeighingFee = 190
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 80 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 85
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 210
|
|
|
- // this.weighingList.actualWeighingFee = 210
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 85 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 95
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 240
|
|
|
- // this.weighingList.actualWeighingFee = 240
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 95 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 105
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 260
|
|
|
- // this.weighingList.actualWeighingFee = 260
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 105 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 120
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 300
|
|
|
- // this.weighingList.actualWeighingFee = 300
|
|
|
- // }
|
|
|
- // } else if (this.weighingList.carModel == '冷藏箱(抠箱)') {
|
|
|
- // if (this.weighingList.grossWeight / 1000 < 50) {
|
|
|
- // this.weighingList.receivableWeighingFee = 360
|
|
|
- // this.weighingList.actualWeighingFee = 360
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 50 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 65
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 390
|
|
|
- // this.weighingList.actualWeighingFee = 390
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 65 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 75
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 410
|
|
|
- // this.weighingList.actualWeighingFee = 410
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 75 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 80
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 430
|
|
|
- // this.weighingList.actualWeighingFee = 430
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 80 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 85
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 450
|
|
|
- // this.weighingList.actualWeighingFee = 450
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 85 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 95
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 480
|
|
|
- // this.weighingList.actualWeighingFee = 480
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 95 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 105
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 500
|
|
|
- // this.weighingList.actualWeighingFee = 500
|
|
|
- // } else if (
|
|
|
- // this.weighingList.grossWeight / 1000 > 105 ||
|
|
|
- // this.weighingList.grossWeight / 1000 < 120
|
|
|
- // ) {
|
|
|
- // this.weighingList.receivableWeighingFee = 540
|
|
|
- // this.weighingList.actualWeighingFee = 540
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.weighingList.receivableWeighingFee = ''
|
|
|
- // }
|
|
|
},
|
|
|
tabClick(val) {
|
|
|
this.mListTop = []
|
|
@@ -1991,7 +1584,8 @@ export default {
|
|
|
this.weighingList.boxNoOther =
|
|
|
val.qualityInspectionManagement.boxNoOther
|
|
|
this.weighingList.titleNo = val.qualityInspectionManagement.titleNo
|
|
|
- this.weighingList.titleNoOther = val.qualityInspectionManagement.titleNoOther
|
|
|
+ this.weighingList.titleNoOther =
|
|
|
+ val.qualityInspectionManagement.titleNoOther
|
|
|
// if (this.tpyeNo == 2 && this.status == 1 && val && val.qualityInspectionManagement.confirm == 0 && this
|
|
|
// .warehouseName != '克东千丰库') {
|
|
|
// this.submitAllow = true
|
|
@@ -2002,8 +1596,10 @@ export default {
|
|
|
// }
|
|
|
this.paramType = val.qualityInspectionManagement.paramType
|
|
|
}
|
|
|
-
|
|
|
- this.coverImgList.push(val.addressUrl)
|
|
|
+ if (val.addressUrl) {
|
|
|
+ this.coverImgList.push(val.addressUrl)
|
|
|
+ console.log('this.coverImgList', this.coverImgList.toString())
|
|
|
+ }
|
|
|
}
|
|
|
console.log(val)
|
|
|
this.weighingList.addressUrl = val.addressUrl
|
|
@@ -2117,18 +1713,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async print() {
|
|
|
- if (!this.photoInfo) {
|
|
|
- let _src = await this.getAPhoto()
|
|
|
- if (!_src) {
|
|
|
- this.$message({
|
|
|
- message: '拍照失败,请重新保存!',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.photoInfo = _src
|
|
|
- this.coverImgList.push(_src)
|
|
|
- }
|
|
|
if (this.reader) {
|
|
|
this.reader.cancel()
|
|
|
}
|
|
@@ -2217,36 +1801,28 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- this.weighingList.addressUrl = this.weighingList.addressUrl+','+this.coverImgList.toString()
|
|
|
- }
|
|
|
-<<<<<<< HEAD
|
|
|
-=======
|
|
|
- else{
|
|
|
- this.weighingList.addressUrl = this.coverImgList.toString()
|
|
|
+ this.weighingList.addressUrl =
|
|
|
+ this.weighingList.addressUrl + ',' + this.coverImgList.toString()
|
|
|
}
|
|
|
->>>>>>> 0cdbde441704903f128ea4965b50cf2fc68528ff
|
|
|
// if (this.tpyeNo == 2) {
|
|
|
// if (this.submitAllow) {
|
|
|
// this.$message.error('该条质检信息未确认')
|
|
|
// return
|
|
|
// }
|
|
|
// }
|
|
|
+ if (!this.photoInfo) {
|
|
|
+ this.getAPhoto()
|
|
|
+ }
|
|
|
this.$confirm('确定保存检斤信息?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
-<<<<<<< HEAD
|
|
|
this.deptBudgetList.secretaryWeigher = localStorage.getItem(
|
|
|
'ws-pf_staffName'
|
|
|
)
|
|
|
this.weighingList.addressUrl = this.coverImgList.toString()
|
|
|
-=======
|
|
|
- this.deptBudgetList.secretaryWeigher =
|
|
|
- localStorage.getItem('ws-pf_staffName')
|
|
|
- // this.weighingList.addressUrl = this.coverImgList.toString()
|
|
|
->>>>>>> 0cdbde441704903f128ea4965b50cf2fc68528ff
|
|
|
var that = this
|
|
|
var warehousing = {}
|
|
|
//贸易入库保存需要再走入库接口
|
|
@@ -2591,103 +2167,25 @@ export default {
|
|
|
})
|
|
|
this.idPrint = response
|
|
|
|
|
|
- if (
|
|
|
- this.weighingList.serviceManagementType == 1 &&
|
|
|
- (this.warehouseName == '鲅鱼圈金信库' ||
|
|
|
- this.warehouseName == '洮南向阳乡金昊' ||
|
|
|
- this.warehouseName == '白城内陆港' ||
|
|
|
- this.warehouseName == '山东园丰库' ||
|
|
|
- this.warehouseName == '杜尔伯特家禾库' ||
|
|
|
- this.warehouseName == '甘南宏旗库' ||
|
|
|
- this.warehouseName == '洮南新友谊兴旺库' ||
|
|
|
- this.warehouseName == '佳屹农仓储库')
|
|
|
- ) {
|
|
|
+ if (this.weighingList.serviceManagementType == 1) {
|
|
|
if (
|
|
|
this.weighingList.seller &&
|
|
|
this.weighingList.buyer
|
|
|
) {
|
|
|
let cang = {}
|
|
|
- cang.value = this.weighingList.seller
|
|
|
- cang.label = this.weighingList.seller
|
|
|
- let cang1 = {}
|
|
|
- cang1.value = this.weighingList.buyer
|
|
|
- cang1.label = this.weighingList.buyer
|
|
|
-
|
|
|
- if (this.warehouseName == '佳屹农仓储库') {
|
|
|
- this.customerOptions = [
|
|
|
- {
|
|
|
- label: this.weighingList.customer,
|
|
|
- value: this.weighingList.customer
|
|
|
- }
|
|
|
- ]
|
|
|
- if (this.check(this.weighingList.buyer, 3)) {
|
|
|
- this.companyNameEWOptions.push(cang1)
|
|
|
- this.companyName = this.weighingList.buyer
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.check(this.weighingList.buyer, 2)) {
|
|
|
- this.companyNameEWOptions.push(cang1)
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.check(this.weighingList.seller, 1)) {
|
|
|
- this.ewCustomerOptions.push(cang)
|
|
|
+ cang.value = this.weighingList.buyer
|
|
|
+ cang.label = this.weighingList.buyer
|
|
|
+ if (this.check(this.weighingList.buyer, 3)) {
|
|
|
+ this.companyNameOptions.push(cang)
|
|
|
}
|
|
|
+ this.companyName = this.weighingList.buyer
|
|
|
}
|
|
|
}
|
|
|
- if (this.warehouseName == '鲅鱼圈金信库') {
|
|
|
- getbinNumber({ id: that.cangid })
|
|
|
- .toPromise()
|
|
|
- .then(response => {
|
|
|
- this.binNumberList1 =
|
|
|
- response.warehousePositionInfoList
|
|
|
- this.isShowPrintType = true
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.isShowPrintType = true
|
|
|
- }
|
|
|
-
|
|
|
+ this.isShowPrintType = true
|
|
|
this.getList()
|
|
|
this.photoInfo = ''
|
|
|
this.coverImgList = []
|
|
|
})
|
|
|
- // addstorageputList(that.inOutData).toPromise().then((response) => {
|
|
|
- // this.weighingList.warehouseId = this.cangid;
|
|
|
- // this.weighingList.skinInspector = localStorage.getItem('ws-pf_staffName')
|
|
|
- // tare(this.weighingList)
|
|
|
- // .toPromise()
|
|
|
- // .then((response) => {
|
|
|
- // console.log(1111)
|
|
|
- // // if (this.reader) {
|
|
|
- // // this.reader.cancel()
|
|
|
- // // }
|
|
|
- // this.$notify.success({
|
|
|
- // title: '成功',
|
|
|
- // message: '保存成功',
|
|
|
- // })
|
|
|
- // this.idPrint = response
|
|
|
- // if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
|
|
|
- // .warehouseName == '洮南向阳乡金昊' || this
|
|
|
- // .warehouseName == '白城内陆港')) {
|
|
|
- // if (this.weighingList.seller && this.weighingList.buyer) {
|
|
|
- // let cang = {}
|
|
|
- // cang.value = this.weighingList.seller
|
|
|
- // cang.label = this.weighingList.seller
|
|
|
- // if (this.check(this.weighingList.seller, 1)) {
|
|
|
- // this.ewCustomerOptions.push(cang)
|
|
|
- // }
|
|
|
- // let cang1 = {}
|
|
|
- // cang1.value = this.weighingList.buyer
|
|
|
- // cang1.label = this.weighingList.buyer
|
|
|
- // if (this.check(this.weighingList.buyer, 2)) {
|
|
|
- // this.companyNameEWOptions.push(cang1)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.isShowPrintType = true
|
|
|
- // this.getList()
|
|
|
- // })
|
|
|
- // .catch((response) => {})
|
|
|
- // })
|
|
|
})
|
|
|
} else {
|
|
|
//收购入库皮检
|