Merge pull request '更新' (#21) from zwq into master

Reviewed-on: #21
This commit is contained in:
朱文强 2022-07-18 14:58:20 +08:00
commit 2021b8b076
3 changed files with 49 additions and 33 deletions

View File

@ -134,7 +134,11 @@ export default {
},
init (row, idx) {
this.visible = true
this.row = null
this.editIndex = null
this.formLoading = false
this.dataForm.targetQuantity = null
this.dataForm.targetWeight = null
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (row) {

View File

@ -24,21 +24,10 @@
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
prop="idenCardNum"
label="标识卡号">
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号">
</el-table-column>
<el-table-column
prop="status"
label="任务状态">
@ -69,10 +58,29 @@
prop="quantity"
label="物料数量">
</el-table-column>
<el-table-column
prop="targetQuantity"
label="剩余数量">
</el-table-column>
<el-table-column
prop="weight"
label="物料重量">
</el-table-column>
<el-table-column
prop="targetWeight"
label="剩余重量">
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号">
</el-table-column>
<el-table-column
prop="createTime"
label="获取时间">
<template slot-scope="scope">
{{ scope.row.createTime ? scope.row.createTime.replace('T', ' ') : '' }}
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
@ -189,6 +197,10 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.dataList.forEach(item => {
item.targetQuantity = item.quantity - item.finishQuantity - item.waitQuantity
item.targetWeight = item.weight - item.finishWeight - item.waitWeight
})
this.totalPage = data.data.total
} else {
this.dataList = []

View File

@ -71,7 +71,7 @@
}}</span>
</template>
</el-table-column>
<el-table-column prop="craftName" label="工艺"> </el-table-column>
<el-table-column prop="craftCodeId" label="工艺"> </el-table-column>
<el-table-column prop="startPosition" label="开始位置"> </el-table-column>
<el-table-column prop="targetPosition" label="目标位置">
</el-table-column>
@ -184,20 +184,20 @@ export default {
activated () {
this.getDataList()
this.timer = setInterval(this.getDataList, 180000)
this.$http({
url: this.$http.adornUrl('/craftInfo/page'),
method: 'post',
data: this.$http.adornData({
current: 1,
size: 999
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.processList = data.data.records
} else {
this.processList.splice(0, this.processList.length)
}
})
// this.$http({
// url: this.$http.adornUrl('/craftInfo/page'),
// method: 'post',
// data: this.$http.adornData({
// current: 1,
// size: 999
// })
// }).then(({ data }) => {
// if (data && data.code === 0) {
// this.processList = data.data.records
// } else {
// this.processList.splice(0, this.processList.length)
// }
// })
},
methods: {
//
@ -214,13 +214,13 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
const resData = data.data.records
resData.forEach(item => {
if (item.craftCodeId) {
this.processList.find(item1 => {
if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode }
})
}
})
// resData.forEach(item => {
// if (item.craftCodeId) {
// this.processList.find(item1 => {
// if (item1.id === item.craftCodeId) { item.craftName = item1.craftCode }
// })
// }
// })
this.dataList = resData
this.totalPage = data.data.total
} else {