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) { init (row, idx) {
this.visible = true this.visible = true
this.row = null
this.editIndex = null
this.formLoading = false this.formLoading = false
this.dataForm.targetQuantity = null
this.dataForm.targetWeight = null
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
if (row) { if (row) {

View File

@ -24,21 +24,10 @@
label="序号" label="序号"
width="50"> width="50">
</el-table-column> </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 <el-table-column
prop="idenCardNum" prop="idenCardNum"
label="标识卡号"> label="标识卡号">
</el-table-column> </el-table-column>
<el-table-column
prop="orderNo"
label="订单号">
</el-table-column>
<el-table-column <el-table-column
prop="status" prop="status"
label="任务状态"> label="任务状态">
@ -69,10 +58,29 @@
prop="quantity" prop="quantity"
label="物料数量"> label="物料数量">
</el-table-column> </el-table-column>
<el-table-column
prop="targetQuantity"
label="剩余数量">
</el-table-column>
<el-table-column <el-table-column
prop="weight" prop="weight"
label="物料重量"> label="物料重量">
</el-table-column> </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 <el-table-column
fixed="right" fixed="right"
header-align="center" header-align="center"
@ -189,6 +197,10 @@
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.data.records 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 this.totalPage = data.data.total
} else { } else {
this.dataList = [] this.dataList = []

View File

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