修改
This commit is contained in:
@@ -69,7 +69,8 @@
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.workorder_status}}</td>
|
||||
<!-- <td>{{e.workorder_status}}</td> -->
|
||||
<td>{{e.workorder_status_name}}</td>
|
||||
<td>{{e.operator}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
<td>{{e.plan_weight}}</td>
|
||||
@@ -93,7 +94,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {regionList, pointList, getWeight, getOrderList, downMaterial} from '@/utils/getData4.js'
|
||||
import {regionList, pointList, getWeight, jbGetVehicleCode, getOrderList, downMaterial} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -115,7 +116,15 @@
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
flag: '',
|
||||
dupWeight: '',
|
||||
orgWeight: '',
|
||||
standError: '',
|
||||
disabled: false,
|
||||
statusMap: {
|
||||
'1': '未开始',
|
||||
'3': '生产中',
|
||||
'5': '已结束'
|
||||
},
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
@@ -166,6 +175,7 @@
|
||||
},
|
||||
selectChange2 (e) {
|
||||
this.index2 = e
|
||||
this._jbGetVehicleCode()
|
||||
this.seachList()
|
||||
},
|
||||
handleChange (e) {
|
||||
@@ -188,7 +198,11 @@
|
||||
async _getOrderList () {
|
||||
let res = await getOrderList(this.index2, '2')
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.dataList = res.data
|
||||
this.taskList = res.data.map(item => ({
|
||||
...item,
|
||||
workorder_status_name: this.statusMap[item.workorder_status] || ''
|
||||
}))
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
@@ -227,6 +241,19 @@
|
||||
console.log(11111)
|
||||
this.val3 = res.data.weight
|
||||
this.flag = res.data.flag
|
||||
this.dupWeight = res.data.weight
|
||||
this.orgWeight = res.data.org_weight
|
||||
this.standError = res.data.stand_error
|
||||
}
|
||||
},
|
||||
async _jbGetVehicleCode () {
|
||||
if (!this.index2) {
|
||||
return
|
||||
}
|
||||
let res = await jbGetVehicleCode(this.index2)
|
||||
if (res.code === '200') {
|
||||
this.val1 = res.data.tp_code
|
||||
this.val2 = res.data.lt_code
|
||||
}
|
||||
},
|
||||
xlconfirm () {
|
||||
@@ -236,18 +263,38 @@
|
||||
return
|
||||
}
|
||||
if (this.flag === '2') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认以重量:' + this.val3 + '提交?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
||||
if ( chazhi > Number(this.standError)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '输⼊的重量:' + this.val3 + '与吨袋的重量:' + this.orgWeight + '误差过⼤!是否继续?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.flag === '1') {
|
||||
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
||||
if ( chazhi > Number(this.standError)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您修改的重量:' + this.val3 + '与吨袋的重量:' + this.orgWeight + '误差过⼤!是否以您输⼊的重量继续?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async _downMaterial () {
|
||||
|
||||
Reference in New Issue
Block a user