|
|
|
@ -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>
|
|
|
|
@ -57,15 +57,31 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" v-if="false" />
|
|
|
|
|
<el-table-column label="计划数量" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="出库数量" align="center" prop="outNumber" />
|
|
|
|
|
<el-table-column label="托盘号" align="center" prop="userDefined2" />
|
|
|
|
|
<el-table-column label="库位" align="center" prop="locCode" />
|
|
|
|
|
<el-table-column label="仓库编号" align="center" prop="locCode" />
|
|
|
|
|
<el-table-column label="库位名称" align="center" prop="locDesc" v-if="false" />
|
|
|
|
|
<el-table-column label="产线名称" align="center" prop="productionLineDesc" v-if="false" />
|
|
|
|
|
<el-table-column label="产线" align="center" prop="productionLineCode" />
|
|
|
|
|
<el-table-column label="状态" align="center" prop="orderStatus" />
|
|
|
|
|
<el-table-column label="状态" align="center" prop="orderStatus">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.orderStatus === '1'">未进行</span>
|
|
|
|
|
<span v-else-if="scope.row.orderStatus === '2'">进行中</span>
|
|
|
|
|
<span v-else-if="scope.row.orderStatus === '3'">完成</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="反冲标识" align="center" prop="userDefined3" />
|
|
|
|
|
|
|
|
|
|
<el-table-column label="sap过账状态" align="center" prop="userDefined10">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.userDefined10 === '1'">未过账</span>
|
|
|
|
|
<span v-else-if="scope.row.userDefined10 === '2'">过账成功</span>
|
|
|
|
|
<span v-else-if="scope.row.userDefined10 === '3'">过账失败</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="sap过账信息" align="center" prop="userDefined11" />
|
|
|
|
|
<el-table-column label="操作人" align="center" prop="createBy" />
|
|
|
|
|
<el-table-column label="操作时间" align="center" prop="createDate" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
@ -114,7 +130,18 @@
|
|
|
|
|
<el-table-column label="物料描述" align="center" prop="materialDesc" />
|
|
|
|
|
<el-table-column label="物料编号" align="center" prop="materialCode" />
|
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
|
<el-table-column label="数量" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="计划数量" align="center" prop="planNumber" />
|
|
|
|
|
<el-table-column label="出库数量" align="center" prop="outNumber" />
|
|
|
|
|
<el-table-column label="剩余数量" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.planNumber - scope.row.outNumber }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作数量" align="center" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="包装线" align="center" prop="stationNo" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable
|
|
|
|
@ -135,7 +162,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",
|
|
|
|
@ -169,6 +196,7 @@ export default {
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
planDate: null,
|
|
|
|
|
planNumber: null,
|
|
|
|
|
qty: null,
|
|
|
|
|
Unit: null,
|
|
|
|
|
outNumber: null,
|
|
|
|
|
locCode: null,
|
|
|
|
@ -203,11 +231,16 @@ export default {
|
|
|
|
|
produceCode: '',
|
|
|
|
|
warehouseNo: '',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
queryParams2: {
|
|
|
|
|
orderNo: '',
|
|
|
|
|
ken:'',
|
|
|
|
|
warehouseNo: '',
|
|
|
|
|
orderLines:[],
|
|
|
|
|
list:[],
|
|
|
|
|
},
|
|
|
|
|
queryParams3:{
|
|
|
|
|
ID: '',
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
@ -303,7 +336,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;
|
|
|
|
@ -320,6 +353,7 @@ export default {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.queryForm = {}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
@ -330,6 +364,7 @@ export default {
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
planDate: null,
|
|
|
|
|
planNumber: null,
|
|
|
|
|
qty: null,
|
|
|
|
|
Unit: null,
|
|
|
|
|
outNumber: null,
|
|
|
|
|
locCode: null,
|
|
|
|
@ -377,11 +412,19 @@ 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
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
handleQtyChange(row, event) {
|
|
|
|
|
// 在这里处理输入变化,你可以更新 row 对象中的 qty 属性
|
|
|
|
|
row.qty = event;
|
|
|
|
|
// 或者调用后端接口保存数据
|
|
|
|
|
// this.saveQtyToServer(row.id, event);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
@ -400,6 +443,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
|
|
|
|
@ -410,6 +462,18 @@ export default {
|
|
|
|
|
_this.$modal.msgError("请选择");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let tem=""
|
|
|
|
|
_this.selectedRows.forEach(function(row) {
|
|
|
|
|
// 在这里对每个 row 进行操作
|
|
|
|
|
|
|
|
|
|
if (row.outNumber === row.planNumber) {
|
|
|
|
|
_this.$modal.msgError("已经出完");
|
|
|
|
|
tem="0"
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (tem=="0"){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
var bull = _this.selectedRows.some((item) => {
|
|
|
|
|
// console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo)
|
|
|
|
|
return item.stationNo == undefined || item.stationNo == ''
|
|
|
|
@ -426,14 +490,14 @@ export default {
|
|
|
|
|
// });
|
|
|
|
|
} else {
|
|
|
|
|
this.queryParams2.orderNo = this.queryParams1.produceCode
|
|
|
|
|
this.queryParams2.warehouseCode = this.queryParams1.warehouseCode
|
|
|
|
|
this.queryParams2.orderLines = _this.selectedRows
|
|
|
|
|
addPurchaseOrderOutbound(_this.queryParams2).then(response => {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
|
|
|
|
|
this.queryParams2.list = _this.selectedRows
|
|
|
|
|
this.queryParams2.ken= 2
|
|
|
|
|
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|