Commit 0eda0c31 authored by shifangwuji's avatar shifangwuji

10/9

parent a0d4be77
......@@ -35,13 +35,14 @@ export function add(data) {
})
}
// 出库操作接口
export function performOutbound(data) {
export function performOutbound(params) {
return request({
url: '/wbwarehouse/canceListByType',
url: '/wbwarehouse/Outbound',
method: 'post',
data,
params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
'Content-Type': 'application/json;charset=UTF-8',
},
});
}
......@@ -142,6 +142,7 @@
<script>
import { listdevice, performOutbound} from '@/api/outbound'
import { listLog } from '@/api/sample/inventoryRecord'
export default {
name: 'Role',
data() {
......@@ -251,7 +252,7 @@ export default {
pn: undefined,
lot: undefined,
plocation: undefined,
ptype: 1,
ptype: 2,
pstatus: 0,
delFlag: 0
},
......@@ -344,7 +345,7 @@ export default {
lot: undefined,
plocation: undefined,
pstatus: 0,
ptype: 1,
ptype: 2,
delFlag: 0
}
this.resetForm('queryForm')
......@@ -399,15 +400,10 @@ export default {
},
/** 出库按钮操作 */
handleDelete(row) {
const dataToSend = {
id: row.businessId,
pn: row.pn,
lot: row.lot,
plocation: row.plocation,
fqYs: row.fqYs,
createName: row.createName,
updateDate: row.updateDate,
};
console.log('row',row);
const obj = {
id: row.businessId
}
// 弹出确认框
this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
......@@ -415,17 +411,14 @@ export default {
type: 'warning',
}).then(() => {
// 调用 performOutbound 函数执行出库操作
performOutbound(dataToSend)
performOutbound(obj)
.then(response => {
if (response.data.code === 200) {
// 操作成功,从页面中移除该行数据
const index = this.equipmentList.indexOf(row);
if (index !== -1) {
this.equipmentList.splice(index, 1); // 删除当前行
}
this.$message.success('操作成功');
console.log('response',response);
if (response.code === 200) {
this.$message.success('操作成功');
this.getList()
} else {
this.$message.error('操作失败');
this.$message.error('操作失败');
}
})
.catch(error => {
......@@ -435,7 +428,8 @@ export default {
}).catch(() => {
this.$message.info('已取消操作');
});
}
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment