+
+ 盘点数量
-
+
PC
@@ -71,9 +121,9 @@
-
+
完成确认
+ style="margin-left: 25px; align-self: center; font-weight: bold;font-size: 45px; writing-mode: vertical-lr;">确认盘点
@@ -86,11 +136,11 @@
@@ -100,124 +150,110 @@ export default {
data() {
return {
standId: store.getters.getStandId,
- timer: '',
labelPosition: 'top',
workFormRef: ref(),
workFormEntity: reactive({
goodsId: '',
- planPickNum: 0,
- remainNumOrigin: null,
- remainNumReal: null,
- remark: '',
- finishedRows: 0,
- totalRows: 0,
- finishedCounts: 0,
- totalCounts: 0,
- tip: ''
+ vehicleId: ''
}),
rules: reactive({
goodsId: [
{ required: true, message: '请输入料号' }
]
}),
+ inventoryGoodsDetails: [],
+ confirmFormRef: ref(),
+ confirmFormEntity: reactive({
+ goodsId: '',
+ vehicleId: '',
+ confirmNum: null
+ }),
}
},
mounted() {
this.$refs.goodsId.focus()
- this.timer = setInterval(() => {
- this.queryFinish()
- }, 2000)
},
beforeUnmount() {
- clearInterval(this.timer)
},
methods: {
- // 获取当前工作信息
- getCurrentWorkInfo() {
- 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.planPickNum = response.returnData.planPickNum
- this.workFormEntity.remainNumOrigin = response.returnData.remainNumOrigin
- this.workFormEntity.remainNumReal = response.returnData.remainNumReal
- 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()
- errorBox(response.message)
- }
- }).catch(err => {
- console.log(err)
- this.resetForms()
- errorBox('查询工作信息错误')
- })
- },
- // 查询是否完成
- queryFinish() {
+ // 获取当前盘点信息
+ getCurrentInvInfo() {
if (this.workFormEntity.goodsId == '') {
return
}
const request = {
- standId: this.standId,
- goodsId: this.workFormEntity.goodsId
+ goodsId: this.workFormEntity.goodsId,
+ userName: store.getters.getUserName
}
- queryFinishByStandAndGoods(request).then(res => {
+ getCurrentGoodsInventory(request).then(res => {
const response = res.data
if (response.code == 0) {
- if (response.returnData != null) {
- this.workFormEntity.tip = response.returnData.tip
- }
- this.resetForms()
- ElMessage.success(response.message)
+ this.inventoryGoodsDetails = response.returnData
+ } else {
+ this.inventoryGoodsDetails = []
+ errorBox(response.message)
}
}).catch(err => {
console.log(err)
+ this.inventoryGoodsDetails = []
+ errorBox('查询盘点信息错误。')
})
},
// 重置参数
- resetForms() {
+ resetWorkForms() {
this.workFormEntity = reactive({
goodsId: '',
- planPickNum: 0,
- remainNumOrigin: null,
- remainNumReal: null,
- remark: '',
- finishedRows: 0,
- totalRows: 0,
- finishedCounts: 0,
- totalCounts: 0,
- tip: ''
+ vehicleId: ''
})
this.$refs.goodsId.focus()
},
+ resetConfirmForms() {
+ this.confirmFormEntity = reactive({
+ vehicleId: '',
+ goodsId: '',
+ confirmNum: null
+ })
+ this.$refs.confirmGoodsId.focus()
+ },
+ invenOut() {
+ if (this.workFormEntity.goodsId == '') {
+ errorBox('料号不可缺少')
+ return
+ }
+ const request = {
+ goodsId: this.workFormEntity.goodsId,
+ vehicleId: this.confirmFormEntity.vehicleId,
+ userName: store.getters.getUserName
+ }
+ inventoryOut(request).then(res => {
+ const response = res.data
+ if (response.code == 0) {
+ this.resetWorkForms()
+ ElMessage.success(response.message)
+ } else {
+ errorBox(response.message)
+ }
+ }).catch(err => {
+ console.log(err)
+ errorBox('下发盘点时发生异常。')
+ })
+ },
// 确认完成工作
- confirmTask() {
- if (this.standId == '' || this.workFormEntity.goodsId == '') {
- errorBox('站台号和料号不可缺少')
+ invenConfirm() {
+ if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == '') {
+ errorBox('料号、箱号、确认数量不可缺少。')
return
}
const confirmParams = {
- standId: this.standId,
- goodsId: this.workFormEntity.goodsId,
- remainNumOrigin: this.workFormEntity.remainNumOrigin,
- remainNumReal: this.workFormEntity.remainNumReal
+ goodsId: this.confirmFormEntity.goodsId,
+ vehicleId: this.confirmFormEntity.vehicleId,
+ confirmNum: this.confirmFormEntity.confirmNum,
+ userName: store.getters.getUserName
}
- confirmFinishWork(confirmParams).then(res => {
+ inventoryConfirmBack(confirmParams).then(res => {
const response = res.data
if (response.code == 0) {
- if (response.returnData != null) {
- this.workFormEntity.tip = response.returnData.tip
- }
- this.resetForms()
+ this.resetConfirmForms()
ElMessage.success(response.message)
} else {
errorBox(response.message)
@@ -226,7 +262,22 @@ export default {
console.log(err)
errorBox('确认时发生异常')
})
- }
+ },
+ changeFocus() {
+ this.confirmFormEntity.vehicleId = replaceEnglishAndNumberIGAI(this.confirmFormEntity.vehicleId)
+ if (this.confirmFormEntity.vehicleId == '' || this.confirmFormEntity.vehicleId == null || this.confirmFormEntity.vehicleId == undefined) {
+ this.$refs.confirmVehicleId.focus()
+ return
+ }
+ if (this.confirmFormEntity.goodsId == '' || this.confirmFormEntity.goodsId == null || this.confirmFormEntity.goodsId == undefined) {
+ this.$refs.confirmGoodsId.focus()
+ return
+ }
+ if (this.confirmFormEntity.confirmNum == null || this.confirmFormEntity.confirmNum == undefined || this.confirmFormEntity.confirmNum == '') {
+ this.$refs.confirmNum.focus()
+ return
+ }
+ },
}
}
@@ -276,7 +327,7 @@ export default {
#309330 50%,
#309330 100%) bottom right;
background-size: 100% 50%;
- height: 400px;
+ /* height: 400px; */
width: 250px;
background-repeat: no-repeat;
display: inline-flex;
@@ -398,4 +449,16 @@ export default {
font-weight: bold;
font-size: 25px;
}
+
+.goods-list-area {
+ margin: auto;
+ min-height: fit-content;
+ max-height: 90%;
+ margin-bottom: 10px;
+ min-width: inherit;
+ border: solid 1px;
+ border-radius: 10px;
+ box-shadow: 0px 15px 10px -15px #000;
+ overflow: auto;
+}
\ No newline at end of file