|
@@ -98,6 +98,13 @@
|
|
|
:inactive-value="0"
|
|
|
/>
|
|
|
</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="容量状态" width="90px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.volumeStatus == 1" style="color:red;">{{ scope.row.volumeStatusStr }}</span>
|
|
|
+ <span v-if="scope.row.volumeStatus == 2" style="color:red;">{{ scope.row.volumeStatusStr }}</span>
|
|
|
+ <span v-if="scope.row.volumeStatus == 0" style="color:green;">{{ scope.row.volumeStatusStr }}</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="撒料" min-width="250px" align="left" header-align="center">
|
|
|
<template slot-scope="scope">
|
|
@@ -298,11 +305,12 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
- <div style="text-align: center;height: 100px;margin-top: 40px;">
|
|
|
- <div class="maxweight" style="line-height:20px;"><b>最大重量:</b>{{ create.temp.maxweight }} (KG)</div>
|
|
|
- <div class="sumweight" style="line-height:20px;margin-top: 10px;">
|
|
|
- <b>合计重量:</b>{{ create.temp.sumweight }} (KG)
|
|
|
- </div>
|
|
|
+ <div style="text-align: center;height: 100px;margin-top: 40px;">
|
|
|
+ <div class="maxweight" style="line-height:20px;"><b>车辆容积量:</b>{{ create.temp.tmrvolume }} ( {{ create.temp.minVolume }} - {{ create.temp.maxVolume }})m³</div>
|
|
|
+ <!-- <div class="maxweight" style="line-height:20px;"><b>最大重量:</b>{{ create.temp.maxweight }} (KG)</div> -->
|
|
|
+ <div class="sumweight" style="line-height:20px;margin-top: 10px;"> <b>合计重量:</b>{{ create.temp.sumweight }} (KG) </div>
|
|
|
+ <div class="sumweight" style="line-height:20px;margin-top: 10px;color: red;" v-if="parseFloat(create.temp.volume) > parseFloat(create.temp.tmrvolume)"><b>容积量:</b>{{ create.temp.volume }} m³ </div>
|
|
|
+ <div class="sumweight" style="line-height:20px;margin-top: 10px;" v-else><b>容积量:</b>{{ create.temp.volume }} m³ </div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -394,12 +402,12 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 更改TMR编号 -->
|
|
|
- <el-dialog
|
|
|
- :title="textMap[tmrNumber.dialogStatus]"
|
|
|
- :destroy-on-close="true"
|
|
|
+ <el-dialog
|
|
|
+ :title="textMap[tmrNumber.dialogStatus]"
|
|
|
+ :destroy-on-close="true"
|
|
|
:visible.sync="tmrNumber.dialogFormVisible"
|
|
|
:before-close="close"
|
|
|
- :close-on-click-modal="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
width="30%"
|
|
|
:modal-append-to-body="false"
|
|
|
:append-to-body="true">
|
|
@@ -840,6 +848,9 @@ export default {
|
|
|
this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === item).eqcode
|
|
|
this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === item).maxstirfeed
|
|
|
this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === item).tclassname
|
|
|
+ this.create.temp.tmrvolume = this.TMRNumberList.find(obj => obj.id === item).tmrvolume
|
|
|
+ this.create.temp.maxVolume = this.TMRNumberList.find(obj => obj.id === item).maxVolume
|
|
|
+ this.create.temp.minVolume = this.TMRNumberList.find(obj => obj.id === item).minVolume
|
|
|
this.create.temp.mytmrid = this.create.temp.tmrid
|
|
|
this.create.temp.mytmrname = this.create.temp.tmrname
|
|
|
console.log('TMR编号item==>', item)
|
|
@@ -871,6 +882,9 @@ export default {
|
|
|
this.$notify({ title: '', message: '成功', type: 'success', duration: 2000 })
|
|
|
this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
|
|
|
this.create.temp.tclassname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tclassname
|
|
|
+ this.create.temp.tmrvolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).tmrvolume
|
|
|
+ this.create.temp.maxVolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxVolume
|
|
|
+ this.create.temp.minVolume = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).minVolume
|
|
|
this.tmrNumber.dialogFormVisible = false
|
|
|
this.getCreateList1()
|
|
|
}
|
|
@@ -1097,7 +1111,8 @@ export default {
|
|
|
maxweight: '',
|
|
|
issplit: 1,
|
|
|
begintime: '',
|
|
|
- sumweight: 0,
|
|
|
+ sumweight: 0,
|
|
|
+ volume:0,
|
|
|
display: '',
|
|
|
times: 1,
|
|
|
ftid: '',
|
|
@@ -1208,11 +1223,17 @@ export default {
|
|
|
this.$set(this.create.list2[i], 'focusState', false)
|
|
|
}
|
|
|
console.log('sumweight==>', sumweight)
|
|
|
- this.create.temp.sumweight = (sumweight).toFixed(2)
|
|
|
+ this.create.temp.sumweight = (sumweight).toFixed(2)
|
|
|
+ if(parseFloat(this.create.temp.ftvolume) !== 0 && parseFloat(this.create.temp.sumweight) !== 0){
|
|
|
+ this.create.temp.volume = (parseFloat(this.create.temp.sumweight) / parseFloat(this.create.temp.ftvolume)).toFixed(2)
|
|
|
+ }else{
|
|
|
+ this.create.temp.volume = 0
|
|
|
+ }
|
|
|
} else {
|
|
|
this.create.list2 = []
|
|
|
// this.create.temp.sort = 0
|
|
|
- this.create.temp.sumweight = 0
|
|
|
+ this.create.temp.sumweight = 0
|
|
|
+ this.create.temp.volume = 0
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1333,41 +1354,68 @@ export default {
|
|
|
this.isokDisable = true
|
|
|
setTimeout(() => {
|
|
|
this.isokDisable = false
|
|
|
- }, 1000)
|
|
|
- const url = 'authdata/PostDataByName'
|
|
|
- const data = {}
|
|
|
- data.name = 'updateLppdate'
|
|
|
- this.create.temp.pastureid = Cookies.get('pastureid')
|
|
|
- this.create.temp.times = parseInt(this.create.temp.times)
|
|
|
- this.create.temp.sumcowcount = 0
|
|
|
- this.create.temp.date = this.date
|
|
|
- data.parammaps = this.create.temp
|
|
|
- data.parammaps.tmrid = this.create.temp.tmrid2
|
|
|
- data.parammaps.tmrname = this.create.temp.mytmrname
|
|
|
- postJson(url, data).then(response => {
|
|
|
- console.log('新增保存发送参数', this.requestParam)
|
|
|
- if (response.msg !== 'fail') {
|
|
|
- this.$notify({
|
|
|
- title: '成功',
|
|
|
- message: '保存成功',
|
|
|
- type: 'success',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- this.isDispaly = false
|
|
|
- this.dialogFull = false
|
|
|
- this.create.dialogFormVisible = false
|
|
|
- this.getList()
|
|
|
- } else {
|
|
|
- this.$notify({
|
|
|
- title: '保存失败',
|
|
|
- message: response.data,
|
|
|
- type: 'warning',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ }, 1000)
|
|
|
+ var tip = ''
|
|
|
+ if(parseFloat(this.create.temp.volume) > parseFloat(this.create.temp.tmrvolume)){
|
|
|
+ tip = '装载量已超过车辆容量' + this.create.temp.tmrvolume + 'm³,请确认'
|
|
|
+ MessageBox.confirm(tip, {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.save_updateData()
|
|
|
+ })
|
|
|
+ }else if(parseFloat(this.create.temp.volume) > parseFloat(this.create.temp.maxVolume)){
|
|
|
+ tip = '装载量不可超过车辆容量' + this.create.temp.maxVolume + 'm³,请确认'
|
|
|
+ MessageBox.confirm(tip, {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.save_updateData()
|
|
|
+ })
|
|
|
+ }else if(parseFloat(this.create.temp.volume) < parseFloat(this.create.temp.minVolume)){
|
|
|
+ tip = '装载量不可低于车辆容量' + this.create.temp.minVolume + 'm³,请确认'
|
|
|
+ MessageBox.confirm(tip, {
|
|
|
+ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.save_updateData()
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.save_updateData()
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ save_updateData(){
|
|
|
+ const url = 'authdata/PostDataByName'
|
|
|
+ const data = {}
|
|
|
+ data.name = 'updateLppdate'
|
|
|
+ this.create.temp.pastureid = Cookies.get('pastureid')
|
|
|
+ this.create.temp.times = parseInt(this.create.temp.times)
|
|
|
+ this.create.temp.sumcowcount = 0
|
|
|
+ this.create.temp.date = this.date
|
|
|
+ data.parammaps = this.create.temp
|
|
|
+ data.parammaps.tmrid = this.create.temp.tmrid2
|
|
|
+ data.parammaps.tmrname = this.create.temp.mytmrname
|
|
|
+ postJson(url, data).then(response => {
|
|
|
+ console.log('新增保存发送参数', this.requestParam)
|
|
|
+ if (response.msg !== 'fail') {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '保存成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ this.isDispaly = false
|
|
|
+ this.dialogFull = false
|
|
|
+ this.create.dialogFormVisible = false
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '保存失败',
|
|
|
+ message: response.data,
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
close() {
|
|
|
if (this.create.dialogStatus == 'create') {
|