修改包材出库修改

master
mengjiao 11 months ago
parent f7701f9c7e
commit 56108932ff

@ -25,6 +25,14 @@ export function addOutorder(data) {
data: data data: data
}); });
} }
// 用于出库任务页面--查询
export function getOutorderOUT(data) {
return request({
url: '/wms/order/PurchaseOrderOutboundPda',
method: 'post',
data: data
});
}
// 修改包材出库单 // 修改包材出库单
export function updateOutorder(data) { export function updateOutorder(data) {
@ -65,4 +73,12 @@ export function addPurchaseOrderOutbound(data) {
method: 'post', method: 'post',
data: data data: data
}); });
} }
// 新增
export function OutboundPostingSAP(data) {
return request({
url: '/wms/order/OutboundPostingSAP',
method: 'post',
data: data
});
}

@ -104,7 +104,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" type="index" :index='indexMethod'> </el-table-column> <el-table-column label="序号" type="index" :index='indexMethod'> </el-table-column>
<el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" /> <el-table-column label="工厂编码" align="center" prop="siteCode" v-if="false" />
<el-table-column label="ID" align="center" prop="ID" v-if="false" /> <el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="采购单号" align="center" prop="procureCode" /> <el-table-column label="采购单号" align="center" prop="procureCode" />
<el-table-column label="物料编码" align="center" prop="materialCode" /> <el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料描述" align="center" prop="materialDesc" /> <el-table-column label="物料描述" align="center" prop="materialDesc" />
@ -356,7 +356,7 @@ export default {
reset() { reset() {
this.form = { this.form = {
siteCode: null, siteCode: null,
ID: null, id: null,
procureCode: null, procureCode: null,
materialCode: null, materialCode: null,
materialDesc: null, materialDesc: null,
@ -401,7 +401,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -414,7 +414,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const ID = row.ID || this.ids const ID = row.id || this.ids
getOrder(ID).then(response => { getOrder(ID).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
@ -425,7 +425,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.ID != null) { if (this.form.id != null) {
updateOrder(this.form).then(response => { updateOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -443,7 +443,7 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const IDs = row.ID || this.ids; const IDs = row.id || this.ids;
this.$modal.confirm('是否确认删除包材采购单编号为"' + IDs + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除包材采购单编号为"' + IDs + '"的数据项?').then(function() {
return delOrder(IDs); return delOrder(IDs);
}).then(() => { }).then(() => {

@ -26,14 +26,14 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['wms:outorder:add']">新增</el-button> v-hasPermi="['wms:outorder:add']">新增</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" <el-button type="success" plain icon="el-icon-edit" size="mini" @click="handleSAP"
v-hasPermi="['wms:outorder:edit']">修改</el-button> >过账</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['wms:outorder:remove']">删除</el-button> v-hasPermi="['wms:outorder:remove']">删除</el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['wms:outorder:export']">导出</el-button> v-hasPermi="['wms:outorder:export']">导出</el-button>
@ -135,7 +135,7 @@
</template> </template>
<script> <script>
import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK } from "@/api/wms/outorder"; import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK ,OutboundPostingSAP} from "@/api/wms/outorder";
export default { export default {
name: "Outorder", name: "Outorder",
@ -203,11 +203,16 @@ export default {
produceCode: '', produceCode: '',
warehouseNo: '', warehouseNo: '',
}, },
queryParams2: { queryParams2: {
orderNo: '', orderNo: '',
ken:'',
warehouseNo: '', warehouseNo: '',
orderLines:[], list:[],
}, },
queryParams3:{
ID: '',
},
// //
form: {}, form: {},
// //
@ -303,7 +308,7 @@ export default {
}); });
}, },
handleSelectionChange1(selection) { handleSelectionChange1(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
this.selectedRows = selection; this.selectedRows = selection;
@ -377,7 +382,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID) this.ids = selection.map(item => item.id)
this.single = selection.length !== 1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
@ -400,6 +405,15 @@ export default {
this.title = "修改包材出库单"; this.title = "修改包材出库单";
}); });
}, },
handleSAP(row){
console.log(this.ids)
let postData = this.ids.map(id => ({ id: id }));
console.log(postData)
OutboundPostingSAP(JSON.stringify(postData)).then(response => {
this.$modal.msgSuccess("操作完成");
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
const _this = this const _this = this
@ -426,14 +440,14 @@ export default {
// }); // });
} else { } else {
this.queryParams2.orderNo = this.queryParams1.produceCode this.queryParams2.orderNo = this.queryParams1.produceCode
this.queryParams2.warehouseCode = this.queryParams1.warehouseCode this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
this.queryParams2.orderLines = _this.selectedRows this.queryParams2.list = _this.selectedRows
this.queryParams2.ken= 2
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => { addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
if (response.data) {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}
}); });
} }

Loading…
Cancel
Save