|
@@ -112,7 +112,7 @@
|
|
|
<template #default="scope">
|
|
|
<!-- 这里放置操作按钮 -->
|
|
|
<div class="button-group">
|
|
|
- <el-button type="primary" icon="el-icon-check" :disabled="scope.row.status===2">出库</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-check" :disabled="scope.row.status===2" @click="getOutPalletCode(scope.row)">出库</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -187,7 +187,7 @@
|
|
|
detailListStore: [],
|
|
|
detailListPallet: [],
|
|
|
detailListOut: [],
|
|
|
- options:[],
|
|
|
+ options: [],
|
|
|
name: '',
|
|
|
entryPoint: '',
|
|
|
binCode: '',
|
|
@@ -201,31 +201,31 @@
|
|
|
formInline: {
|
|
|
taskCode: ''
|
|
|
},
|
|
|
- detailType:'',
|
|
|
- palletCode:'',
|
|
|
- dialogVisible:false,
|
|
|
- dialogVisibleTask:false,
|
|
|
- inputDisabled:false,
|
|
|
+ detailType: '',
|
|
|
+ palletCode: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogVisibleTask: false,
|
|
|
+ inputDisabled: false,
|
|
|
plan: this.initOrder(),
|
|
|
rules: {
|
|
|
planName: [
|
|
|
- { required: true, message: '必填', trigger: 'blur' },
|
|
|
+ {required: true, message: '必填', trigger: 'blur'},
|
|
|
],
|
|
|
planType: [
|
|
|
- { required: true, message: '必填', trigger: 'blur' },
|
|
|
+ {required: true, message: '必填', trigger: 'blur'},
|
|
|
],
|
|
|
planStrategy: [
|
|
|
- { required: true, message: '必填', trigger: 'blur' },
|
|
|
+ {required: true, message: '必填', trigger: 'blur'},
|
|
|
],
|
|
|
planInput: [
|
|
|
- { required: true, message: '必填', trigger: 'blur' },
|
|
|
+ {required: true, message: '必填', trigger: 'blur'},
|
|
|
],
|
|
|
},
|
|
|
- inputCode:'',
|
|
|
+ inputCode: '',
|
|
|
selection: [],
|
|
|
- isViewMode:false,
|
|
|
- planId:'',
|
|
|
- wInventoryTransactionOrdersId:'',
|
|
|
+ isViewMode: false,
|
|
|
+ planId: '',
|
|
|
+ wInventoryTransactionOrdersId: '',
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -239,14 +239,14 @@
|
|
|
this.currentPageSize = pageSize;
|
|
|
this.queryClick();
|
|
|
},
|
|
|
- initOrder(){
|
|
|
- return{
|
|
|
- planName:'',
|
|
|
- planStrategy:'',
|
|
|
- planInput:'',
|
|
|
- planTime:'',
|
|
|
- remarks:'',
|
|
|
- planType:''
|
|
|
+ initOrder() {
|
|
|
+ return {
|
|
|
+ planName: '',
|
|
|
+ planStrategy: '',
|
|
|
+ planInput: '',
|
|
|
+ planTime: '',
|
|
|
+ remarks: '',
|
|
|
+ planType: ''
|
|
|
}
|
|
|
},
|
|
|
handleCurrentChange(page) {
|
|
@@ -294,10 +294,10 @@
|
|
|
this.loading = true;
|
|
|
|
|
|
axios.get('/wPInventoryCountTask', {
|
|
|
- params:{
|
|
|
+ params: {
|
|
|
page: this.currentPage,
|
|
|
size: this.currentPageSize,
|
|
|
- taskCode:this.formInline.taskCode
|
|
|
+ taskCode: this.formInline.taskCode
|
|
|
}
|
|
|
})
|
|
|
.then(response => {
|
|
@@ -350,7 +350,7 @@
|
|
|
}
|
|
|
|
|
|
}, getProfitLossTypeText(status) {
|
|
|
- /* if(status === null){
|
|
|
+ /* if(status === null){
|
|
|
let ag= row.realAmount - row.storeAmount;
|
|
|
if(ag > 0){
|
|
|
return '盘盈';
|
|
@@ -375,58 +375,57 @@
|
|
|
|
|
|
}, getPendingAmount(row) {
|
|
|
return row.realAmount - row.storeAmount;
|
|
|
- },handleSelectionChange(selection) {
|
|
|
+ }, handleSelectionChange(selection) {
|
|
|
this.selection = selection
|
|
|
- },toDo(id){
|
|
|
- this.dialogVisibleTask=true;
|
|
|
- this.wPInventoryCountTaskId=id;
|
|
|
- axios.get('/wPInventoryCountPallet/getPalletList/'+id, {
|
|
|
- })
|
|
|
+ }, toDo(id) {
|
|
|
+ this.dialogVisibleTask = true;
|
|
|
+ this.wPInventoryCountTaskId = id;
|
|
|
+ axios.get('/wPInventoryCountPallet/getPalletList/' + id, {})
|
|
|
.then(response => {
|
|
|
console.log(response)
|
|
|
- if(response.data.success){
|
|
|
- this.detailListTask=response.data.data;
|
|
|
- this.isViewMode=true;
|
|
|
+ if (response.data.success) {
|
|
|
+ this.detailListTask = response.data.data;
|
|
|
+ this.isViewMode = true;
|
|
|
}
|
|
|
})
|
|
|
.catch(error => {
|
|
|
// 处理错误
|
|
|
});
|
|
|
|
|
|
- },handleCloseTask(){
|
|
|
- this.dialogVisibleTask=false;
|
|
|
- this.detailListPallet=[];
|
|
|
- this.inputCode='';
|
|
|
- this.palletCode='';
|
|
|
- this.detailList=[];
|
|
|
- this.entryPoint='';
|
|
|
- },handleSelectChange(row){
|
|
|
+ }, handleCloseTask() {
|
|
|
+ this.dialogVisibleTask = false;
|
|
|
+ this.detailListPallet = [];
|
|
|
+ this.inputCode = '';
|
|
|
+ this.palletCode = '';
|
|
|
+ this.detailList = [];
|
|
|
+ this.entryPoint = '';
|
|
|
+ }, handleSelectChange(row) {
|
|
|
console.log(row)
|
|
|
- row.inventoryManagementList.forEach(item=>{
|
|
|
- if(row.outPalletCode === item.palletCode){
|
|
|
- row.storageLocationCode=item.storageLocationCode;
|
|
|
- row.amount=item.amount;
|
|
|
+ row.inventoryManagementList.forEach(item => {
|
|
|
+ if (row.outPalletCode === item.palletCode) {
|
|
|
+ row.storageLocationCode = item.storageLocationCode;
|
|
|
+ row.amount = item.amount;
|
|
|
return
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- rowClick(row, column, event){
|
|
|
+ rowClick(row, column, event) {
|
|
|
console.log(row)
|
|
|
- this.detailList=row.detailList;
|
|
|
- this.isViewMode=false;
|
|
|
- this.selection=row;
|
|
|
- this.inputDisabled=row.status===2;
|
|
|
- },orderDelete(row){
|
|
|
+ this.detailList = row.detailList;
|
|
|
+ this.isViewMode = false;
|
|
|
+ this.selection = row;
|
|
|
+ this.inputDisabled = row.status === 2;
|
|
|
+ }, orderDelete(row) {
|
|
|
this.$confirm('确认删除?')
|
|
|
.then(_ => {
|
|
|
axios.delete('/wPInventoryCountTask', {
|
|
|
- params:{
|
|
|
- id:row.id
|
|
|
+ params: {
|
|
|
+ id: row.id
|
|
|
}
|
|
|
})
|
|
|
.then(response => {
|
|
|
console.log(response)
|
|
|
- if(response.data){
|
|
|
+ if (response.data) {
|
|
|
this.$message({
|
|
|
message: '删除成功',
|
|
|
type: "success"
|
|
@@ -439,27 +438,28 @@
|
|
|
});
|
|
|
done();
|
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
+ .catch(_ => {
|
|
|
+ });
|
|
|
|
|
|
},
|
|
|
- handleInput(row){
|
|
|
+ handleInput(row) {
|
|
|
console.log(row)
|
|
|
|
|
|
- let ag= row.realAmount - row.storeAmount;
|
|
|
- row.profitLossQuantity=ag
|
|
|
- if(ag > 0){
|
|
|
- row.profitLossType='盘盈';
|
|
|
- }else if(ag === 0){
|
|
|
- row.profitLossType='正常';
|
|
|
- }else{
|
|
|
- row.profitLossType='盘亏';
|
|
|
+ let ag = row.realAmount - row.storeAmount;
|
|
|
+ row.profitLossQuantity = ag
|
|
|
+ if (ag > 0) {
|
|
|
+ row.profitLossType = '盘盈';
|
|
|
+ } else if (ag === 0) {
|
|
|
+ row.profitLossType = '正常';
|
|
|
+ } else {
|
|
|
+ row.profitLossType = '盘亏';
|
|
|
}
|
|
|
|
|
|
|
|
|
- },handleScan(){
|
|
|
+ }, handleScan() {
|
|
|
console.log(this.inputCode)
|
|
|
- this.palletCode=this.inputCode;
|
|
|
- this.inputCode='';
|
|
|
+ this.palletCode = this.inputCode;
|
|
|
+ this.inputCode = '';
|
|
|
|
|
|
|
|
|
/*axios.get('/order/verifyCode/'+this.inputCode, {
|
|
@@ -552,24 +552,24 @@
|
|
|
});*/
|
|
|
|
|
|
|
|
|
- },outSubmit(){
|
|
|
+ }, outSubmit() {
|
|
|
|
|
|
console.log(this.selection)
|
|
|
- if(this.entryPoint===''){
|
|
|
+ if (this.entryPoint === '') {
|
|
|
this.$message({
|
|
|
message: '入库口不能为空',
|
|
|
type: "error"
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.selection.palletCode != this.palletCode){
|
|
|
+ if (this.selection.palletCode != this.palletCode) {
|
|
|
this.$message({
|
|
|
message: '选中托盘编码和扫描托盘编码不一致,请核对',
|
|
|
type: "error"
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(this.selection.status===2){
|
|
|
+ if (this.selection.status === 2) {
|
|
|
this.$message({
|
|
|
message: '选中托盘已盘库完成',
|
|
|
type: "error"
|
|
@@ -577,8 +577,8 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- this.detailList.forEach(item=>{
|
|
|
- if(item.realAmount === '' || item.realAmount <= 0){
|
|
|
+ this.detailList.forEach(item => {
|
|
|
+ if (item.realAmount === '' || item.realAmount <= 0) {
|
|
|
this.$message({
|
|
|
message: '盘点数量不能为空或小于等于0',
|
|
|
type: "error"
|
|
@@ -586,25 +586,28 @@
|
|
|
return
|
|
|
}
|
|
|
})
|
|
|
- /*const remainingTasks = this.detailListTask.filter(task => !this.selection.includes(task));
|
|
|
+ /*const remainingTasks = this.detailListTask.filter(task => !this.selection.includes(task));
|
|
|
|
|
|
const allStatusTwo = remainingTasks.every(task => task.status === 2);*/
|
|
|
|
|
|
axios.post('/wPInventoryCountPallet', {
|
|
|
- 'wPInventoryCountTaskId':this.wPInventoryCountTaskId,
|
|
|
- 'taskId':this.wPInventoryCountTaskId,
|
|
|
- 'entryPoint':this.entryPoint,
|
|
|
- 'palletCode':this.selection.palletCode,
|
|
|
- 'storageLocationCode':this.selection.storageLocationCode,
|
|
|
- 'status':2,
|
|
|
- 'detailList':this.detailList
|
|
|
+ 'wPInventoryCountTaskId': this.wPInventoryCountTaskId,
|
|
|
+ 'taskId': this.wPInventoryCountTaskId,
|
|
|
+ 'entryPoint': this.entryPoint,
|
|
|
+ 'palletCode': this.selection.palletCode,
|
|
|
+ 'storageLocationCode': this.selection.storageLocationCode,
|
|
|
+ 'status': 2,
|
|
|
+ 'detailList': this.detailList
|
|
|
})
|
|
|
.then(response => {
|
|
|
- if(response.data.success){
|
|
|
+ if (response.data.success) {
|
|
|
this.$message({
|
|
|
message: '操作成功',
|
|
|
type: 'success'
|
|
|
});
|
|
|
+ this.entryPoint='';
|
|
|
+ this.palletCode='';
|
|
|
+ this.inputDisabled=true;
|
|
|
this.toDo(this.wPInventoryCountTaskId);
|
|
|
}
|
|
|
|
|
@@ -613,7 +616,7 @@
|
|
|
// 处理错误
|
|
|
});
|
|
|
|
|
|
- /* this.selection.forEach(item=>{
|
|
|
+ /* this.selection.forEach(item=>{
|
|
|
if(item.amount === '' || item.amount <= 0){
|
|
|
this.$message({
|
|
|
message: '本次出库数量不能为空或小于等于0',
|
|
@@ -655,15 +658,15 @@
|
|
|
// 处理错误
|
|
|
});*/
|
|
|
|
|
|
- },savePlanTask(row){
|
|
|
+ }, savePlanTask(row) {
|
|
|
|
|
|
this.$confirm('确认生成盘点任务吗?')
|
|
|
.then(_ => {
|
|
|
axios.post('/wPInventoryCountTask', {
|
|
|
- id:row.id
|
|
|
+ id: row.id
|
|
|
})
|
|
|
.then(response => {
|
|
|
- if(response.data.success){
|
|
|
+ if (response.data.success) {
|
|
|
this.$message({
|
|
|
message: '盘点任务生成成功',
|
|
|
type: 'success'
|
|
@@ -676,12 +679,48 @@
|
|
|
});
|
|
|
done();
|
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
+ .catch(_ => {
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ }, getOutPalletCode(row) {
|
|
|
+ //入库口 即空托盘出库的目的地
|
|
|
+ const inCode = row.storageLocationCode;
|
|
|
+ if (this.entryPoint === '') {
|
|
|
+ this.$message({
|
|
|
+ message: '请选择出入库口',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getPalletCodeCon(inCode, this.entryPoint)
|
|
|
|
|
|
+ }, getPalletCodeCon(startPosition, endPosition) {
|
|
|
+ axios.get('/wStorageLocationManagement/getPalletCode', {
|
|
|
+ params: {
|
|
|
+ startPosition: startPosition,
|
|
|
+ endPosition: endPosition
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(response => {
|
|
|
+ if (response.data.success) {
|
|
|
+ const code = response.data.msg;
|
|
|
+ this.$message({
|
|
|
+ message: '托盘 ' + code + ' 已出库',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message.error(response.data.msg);
|
|
|
+ }
|
|
|
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ // 处理错误
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
})
|
|
|
</script>
|
|
|
|