代码更新

This commit is contained in:
梁州 2024-07-24 22:13:40 +08:00
parent ffa2fb6790
commit b8321b332f

View File

@ -31,8 +31,8 @@
<span class="display-title-text">料号</span>
</div>
<div class="display-form-div">
<el-input v-model="workFormEntity.goodsId" size="default" v-on:keyup.prevent.enter="getCurrentWorkInfo()"
clearable></el-input>
<el-input v-model="workFormEntity.goodsId" size="default"
v-on:keyup.prevent.enter="getCurrentWorkInfo()" clearable></el-input>
</div>
</div>
<div style="display: flex; flex-direction: column;">
@ -45,7 +45,8 @@
controls-position="right" :min="0" width="200px" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">{{ workFormEntity.goodsUnit }}</span>
<span class="display-form-text-right">{{ workFormEntity.goodsUnit
}}</span>
</div>
</div>
</div>
@ -59,7 +60,8 @@
controls-position="right" :min="0" />
</div>
<div class="display-form-div-right">
<span class="display-form-text-right">{{ workFormEntity.goodsUnit }}</span>
<span class="display-form-text-right">{{ workFormEntity.goodsUnit
}}</span>
</div>
</div>
</div>
@ -71,7 +73,8 @@
</div>
<div
style="display: inline-flex; justify-content: center; width: 700px; margin: 5px; padding: 5px; background-color: #00AAE8;">
<span style="align-self: center; font-weight: bold;font-size: 25px;">{{ workFormEntity.remark }}</span>
<span style="align-self: center; font-weight: bold;font-size: 25px;">{{
workFormEntity.remark }}</span>
</div>
</div>
<div style="display: flex; margin-top: 5px; margin-top: 15px">
@ -98,7 +101,8 @@
</div>
<div
style="display: inline-flex; justify-content: center; width: 80px; margin: 5px; padding: 5px; background-color: #CCCCCC;">
<span style="align-self: center; font-weight: bold;font-size: 20px;">{{ workFormEntity.goodsUnit }}</span>
<span style="align-self: center; font-weight: bold;font-size: 20px;">{{
workFormEntity.goodsUnit }}</span>
</div>
</div>
</div>
@ -118,7 +122,7 @@
<script setup>
import store from '@/store'
import { getWorkByStand } from '@/api/task'
import { getWorkByStandAndGoods } from '@/api/task'
import { taskStatusFormatter, dueFormatter, timeFormatter } from '@/utils/formatter.js'
import { reactive, ref } from 'vue'
import { ElMessage } from 'element-plus'
@ -163,40 +167,57 @@ export default {
},
methods: {
getCurrentWorkInfo() {
this.workFormEntity = {
goodsId: 'text0001',
goodsUnit: 'PC',
planPickNum: 10,
actualDifference: 0,
remark: '装盒子',
finishedRows: 800,
totalRows: 2500,
finishedCounts: 2500,
totalCounts: 6000,
tip: ''
// this.workFormEntity = {
// goodsId: 'text0001',
// goodsUnit: 'PC',
// planPickNum: 10,
// actualDifference: 0,
// remark: '',
// finishedRows: 800,
// totalRows: 2500,
// finishedCounts: 2500,
// totalCounts: 6000,
// tip: ''
// }
const request = {
standId: this.standId,
goodsId: this.workFormEntity.goodsId
}
// const request = {
// standId: this.standId,
// goodsId: this.workFormEntity.goodsId
// }
// getWorkByStandAndGoods(request).then(res => {
// const response = res.data
// if (response.code == 0) {
// this.workFormEntity.goodsId = response.returnData.goodsId
// this.workFormEntity.goodsUnit = response.returnData.goodsUnit
// this.workFormEntity.planPickNum = response.returnData.planPickNum
// this.workFormEntity.actualDifference = response.returnData.actualDifference
// this.workFormEntity.remark = response.returnData.remark
// this.workFormEntity.finishedRows = response.returnData.finishedRows
// this.workFormEntity.totalRows = response.returnData.totalRows
// this.workFormEntity.finishedCounts = response.returnData.finishedCounts
// this.workFormEntity.totalCounts = response.returnData.totalCounts
// this.workFormEntity.tip = response.returnData.tip
// }
// }).catch(err => {
// console.log(err)
// ElMessage.error('')
// })
getWorkByStandAndGoods(request).then(res => {
const response = res.data
if (response.code == 0) {
this.workFormEntity.goodsId = response.returnData.goodsId
this.workFormEntity.goodsUnit = response.returnData.goodsUnit
this.workFormEntity.planPickNum = response.returnData.planPickNum
this.workFormEntity.actualDifference = response.returnData.actualDifference
this.workFormEntity.remark = response.returnData.remark
this.workFormEntity.finishedRows = response.returnData.finishedRows
this.workFormEntity.totalRows = response.returnData.totalRows
this.workFormEntity.finishedCounts = response.returnData.finishedCounts
this.workFormEntity.totalCounts = response.returnData.totalCounts
this.workFormEntity.tip = response.returnData.tip
} else {
this.resetForms()
}
}).catch(err => {
console.log(err)
this.resetForms()
ElMessage.error('查询工作信息错误')
})
},
resetForms() {
this.workFormEntity = reactive({
goodsId: '',
goodsUnit: '',
planPickNum: 0,
actualDifference: 0,
remark: '',
finishedRows: 0,
totalRows: 0,
finishedCounts: 0,
totalCounts: 0,
tip: ''
})
},
//
taskStatusFormat: (row, column, cellValue, index) => {