修改包材出库修改

master
mengjiao 11 months ago
parent f7701f9c7e
commit 56108932ff

@ -25,6 +25,14 @@ export function addOutorder(data) {
data: data
});
}
// 用于出库任务页面--查询
export function getOutorderOUT(data) {
return request({
url: '/wms/order/PurchaseOrderOutboundPda',
method: 'post',
data: data
});
}
// 修改包材出库单
export function updateOutorder(data) {
@ -66,3 +74,11 @@ export function addPurchaseOrderOutbound(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 label="序号" type="index" :index='indexMethod'> </el-table-column>
<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="materialCode" />
<el-table-column label="物料描述" align="center" prop="materialDesc" />
@ -356,7 +356,7 @@ export default {
reset() {
this.form = {
siteCode: null,
ID: null,
id: null,
procureCode: null,
materialCode: null,
materialDesc: null,
@ -401,7 +401,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
@ -414,7 +414,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const ID = row.ID || this.ids
const ID = row.id || this.ids
getOrder(ID).then(response => {
this.form = response.data;
this.open = true;
@ -425,7 +425,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.ID != null) {
if (this.form.id != null) {
updateOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -443,7 +443,7 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const IDs = row.ID || this.ids;
const IDs = row.id || this.ids;
this.$modal.confirm('是否确认删除包材采购单编号为"' + IDs + '"的数据项?').then(function() {
return delOrder(IDs);
}).then(() => {

@ -26,14 +26,14 @@
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['wms:outorder:add']">新增</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['wms:outorder:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['wms:outorder:remove']">删除</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" @click="handleSAP"
>过账</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['wms:outorder:remove']">删除</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['wms:outorder:export']">导出</el-button>
@ -135,7 +135,7 @@
</template>
<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 {
name: "Outorder",
@ -203,11 +203,16 @@ export default {
produceCode: '',
warehouseNo: '',
},
queryParams2: {
orderNo: '',
ken:'',
warehouseNo: '',
orderLines:[],
list:[],
},
queryParams3:{
ID: '',
},
//
form: {},
//
@ -303,7 +308,7 @@ export default {
});
},
handleSelectionChange1(selection) {
this.ids = selection.map(item => item.ID)
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
this.selectedRows = selection;
@ -377,7 +382,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID)
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
@ -400,6 +405,15 @@ export default {
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() {
const _this = this
@ -426,14 +440,14 @@ export default {
// });
} else {
this.queryParams2.orderNo = this.queryParams1.produceCode
this.queryParams2.warehouseCode = this.queryParams1.warehouseCode
this.queryParams2.orderLines = _this.selectedRows
this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
this.queryParams2.list = _this.selectedRows
this.queryParams2.ken= 2
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
if (response.data) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}

Loading…
Cancel
Save