Commit 0eda0c31 authored by shifangwuji's avatar shifangwuji

10/9

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