|
@@ -93,6 +93,11 @@
|
|
|
<el-switch v-model="scope.row.issplit" disabled active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="容量状态" width="90px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.volumeStatus }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="撒料" min-width="250px" align="left" header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-for="element in scope.row.arrList" :key="element.name" class="list">
|
|
@@ -264,9 +269,10 @@
|
|
|
</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="maxweight" style="line-height:20px;"><b>最大容量:</b>{{ create.temp.tmrvolume }} ({{ create.temp.maxVolume }} - {{ create.temp.minVolume }})</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;"><b>容积量:</b>{{ create.temp.volume }} m³ </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>
|
|
@@ -807,6 +813,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
|
|
|
if (this.isDispaly || this.create.dialogStatus == 'update') {
|
|
@@ -851,6 +860,7 @@ export default {
|
|
|
this.create.temp.tmrid2 = this.create.temp.tmrid
|
|
|
this.create.temp.tmrname = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).eqcode
|
|
|
this.create.temp.maxweight = this.TMRNumberList.find(obj => obj.id === this.create.temp.tmrid2).maxstirfeed
|
|
|
+ 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.mytmrid = this.create.temp.tmrid2
|
|
|
this.create.temp.mytmrname = this.create.temp.tmrname
|
|
@@ -992,7 +1002,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleCreate() {
|
|
|
- this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
|
|
|
+ this.create.temp = { sel: 1, tmrid: '', tmrid2: '', maxweight: '', issplit: 1, begintime: '', sumweight: 0,volume:0, display: '', times: 1, ftid: '', ftname: '', tmrname: '', maxweight: '' }
|
|
|
// console.log('新增车次',create.temp.tmrid2)
|
|
|
|
|
|
this.create.temp.times = this.table.getdataListParm.parammaps.times
|
|
@@ -1090,7 +1100,6 @@ export default {
|
|
|
}else{
|
|
|
this.create.temp.volume = 0
|
|
|
}
|
|
|
- console.log('需要计算容积量',this.create.temp.volume)
|
|
|
} else {
|
|
|
this.create.list2 = []
|
|
|
// this.create.temp.sort = 0
|
|
@@ -1208,6 +1217,7 @@ export default {
|
|
|
this.create.temp.mytmrname = row.tmrname
|
|
|
this.create.temp.mytmrid = row.tmrid
|
|
|
this.create.checkBarList = []
|
|
|
+ this.create.temp.mytmrid = row.tmrid
|
|
|
console.log(this.create.temp,'this.create.temp')
|
|
|
this.getCreateList1()
|
|
|
|
|
@@ -1219,26 +1229,55 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
this.isokDisable = false
|
|
|
}, 1000)
|
|
|
- const url = 'authdata/lpplan/edit'
|
|
|
- const data = {}
|
|
|
- this.create.temp.pastureid = Cookies.get('pastureid')
|
|
|
- this.create.temp.times = parseInt(this.create.temp.times)
|
|
|
- data.parammaps = this.create.temp
|
|
|
- data.parammaps.tmrid = this.create.temp.tmrid2
|
|
|
- data.parammaps.tmrname = this.create.temp.mytmrname
|
|
|
- data.old = this.create.temp.arrList
|
|
|
- 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 })
|
|
|
- }
|
|
|
- })
|
|
|
+ // {{ create.temp.tmrvolume }} ({{ create.temp.maxVolume }} - {{ create.temp.minVolume }})
|
|
|
+ // 当超过车辆容量100%时
|
|
|
+ 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/lpplan/edit'
|
|
|
+ const data = {}
|
|
|
+ this.create.temp.pastureid = Cookies.get('pastureid')
|
|
|
+ this.create.temp.times = parseInt(this.create.temp.times)
|
|
|
+ data.parammaps = this.create.temp
|
|
|
+ data.parammaps.tmrid = this.create.temp.tmrid2
|
|
|
+ data.parammaps.tmrname = this.create.temp.mytmrname
|
|
|
+ data.old = this.create.temp.arrList
|
|
|
+ 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 })
|
|
|
}
|
|
|
})
|
|
|
},
|