修改包材出库页面

master
LAPTOP-R6EHHS26\86155 11 months ago
parent 85efdf85a4
commit be02b66e45

@ -6,14 +6,14 @@
<el-input v-model="queryParams.produceCode" placeholder="请输入出库单号" clearable <el-input v-model="queryParams.produceCode" placeholder="请输入出库单号" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="型号编码" prop="materialCode"> <el-form-item label="批次号" prop="materialCode">
<el-input v-model="queryParams.materialCode" placeholder="请输入型号编码" clearable <el-input v-model="queryParams.userDefined1" placeholder="请输入型号编码" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="型号名称" prop="materialDesc"> <!-- <el-form-item label="型号名称" prop="materialDesc">
<el-input v-model="queryParams.materialDesc" placeholder="请输入型号名称" clearable <el-input v-model="queryParams.materialDesc" placeholder="请输入型号名称" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -26,11 +26,10 @@
<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" @click="handleSAP" <el-button type="success" plain icon="el-icon-edit" size="mini" @click="handleSAP"></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> -->
@ -40,10 +39,10 @@
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="outorderList" @selection-change="handleSelectionChange"
<el-table v-loading="loading" :data="outorderList" @selection-change="handleSelectionChange"> :tree-props="{ children: 'list', hasChildren: 'hasChildren' }" row-key="id" border :default-expand-all="false">
<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" />
<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="produceCode" /> <el-table-column label="出库单号" align="center" prop="produceCode" />
@ -57,31 +56,31 @@
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" prop="unit" v-if="false" /> <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="planNumber" />
<el-table-column label="出库数量" align="center" prop="outNumber" /> <el-table-column label="出库数量" align="center" prop="outNumber" />
<el-table-column label="托盘号" align="center" prop="userDefined2" /> <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="locDesc" v-if="false" />
<el-table-column label="产线名称" align="center" prop="productionLineDesc" 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="productionLineCode" />
<el-table-column label="状态" align="center" prop="orderStatus"> <el-table-column label="状态" align="center" prop="orderStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.orderStatus === '1'"></span> <span v-if="scope.row.orderStatus === '1'"></span>
<span v-else-if="scope.row.orderStatus === '2'">进行中</span> <span v-else-if="scope.row.orderStatus === '2'">进行中</span>
<span v-else-if="scope.row.orderStatus === '3'">完成</span> <span v-else-if="scope.row.orderStatus === '3'">完成</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="反冲标识" align="center" prop="userDefined3" /> <el-table-column label="反冲标识" align="center" prop="userDefined3" />
<el-table-column label="sap过账状态" align="center" prop="userDefined10"> <el-table-column label="sap过账状态" align="center" prop="userDefined10">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.userDefined10 === '1'"></span> <span v-if="scope.row.userDefined10 === '1'"></span>
<span v-else-if="scope.row.userDefined10 === '2'">过账成功</span> <span v-else-if="scope.row.userDefined10 === '2'">过账成功</span>
<span v-else-if="scope.row.userDefined10 === '3'">过账失败</span> <span v-else-if="scope.row.userDefined10 === '3'">过账失败</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="sap过账信息" align="center" prop="userDefined11" /> <el-table-column label="sap过账信息" align="center" prop="userDefined11" />
<el-table-column label="操作人" align="center" prop="createBy" /> <el-table-column label="操作人" align="center" prop="createBy" />
<el-table-column label="操作时间" align="center" prop="createDate" width="180"> <el-table-column label="操作时间" align="center" prop="createDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -131,17 +130,17 @@
<el-table-column label="物料编号" align="center" prop="materialCode" /> <el-table-column label="物料编号" align="center" prop="materialCode" />
<el-table-column label="单位" align="center" prop="unit" /> <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" prop="outNumber" />
<el-table-column label="剩余数量" align="center"> <el-table-column label="剩余数量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.planNumber - scope.row.outNumber }} {{ scope.row.planNumber - scope.row.outNumber }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作数量" align="center" width="180"> <el-table-column label="操作数量" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input> <el-input v-model="scope.row.qty" @change="handleQtyChange(scope.row, $event)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="包装线" align="center" prop="stationNo" width="180"> <el-table-column label="包装线" align="center" prop="stationNo" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable <el-select v-model="scope.row.stationNo" placeholder="请选择包装线" @change="change1(scope.row)" clearable
@ -162,7 +161,7 @@
</template> </template>
<script> <script>
import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK ,OutboundPostingSAP} from "@/api/wms/outorder"; import { listOutorder, getOutorder, delOutorder, PurchaseOrderOutboundPda, addPurchaseOrderOutbound, getlistCK, OutboundPostingSAP } from "@/api/wms/outorder";
export default { export default {
name: "Outorder", name: "Outorder",
@ -181,7 +180,94 @@ export default {
// //
total: 0, total: 0,
// //
outorderList: [], outorderList: [
{
createBy: 'admin',
siteCode: '1000',
produceCode: '000100305998',
materialCode: '000000040000015127',
materialDesc: '榄菊蚊香小盘Ф134mm×H100mm 36圈内增高塑料筒有字盖(2201)',
planDate: '2023-12-25',
planNumber: 3000.0,
outNumber: 3000.0,
locCode: 'WH02',
productionLineCode: 'LJ8',
orderStatus: '3',
userDefined1: '20231225154549',
userDefined2: '00001',
userDefined3: '',
userDefined10: '1',
createDate: '2023-12-25',
id: '18d2af6969e0405ba202a5c09bc14f33',
active: '1',
unit: 'ST',
list: [
{
createBy: 'admin',
siteCode: '1000',
produceCode: '000100305998',
materialCode: '000000040000015127',
materialDesc: '榄菊蚊香小盘Ф134mm×H100mm 36圈内增高塑料筒有字盖(2201)',
planDate: '2023-12-25',
planNumber: 3000.0,
outNumber: 3000.0,
locCode: 'WH02',
productionLineCode: 'LJ8',
orderStatus: '3',
userDefined1: '20231225154549',
userDefined2: '00001',
userDefined3: '',
userDefined10: '1',
createDate: '2023-12-25',
id: '18d2af6969e0405ba202a5c09bc14f331',
active: '1',
unit: 'ST',
},
{
createBy: 'admin',
siteCode: '1000',
produceCode: '000100305998',
materialCode: '000000040000015127',
materialDesc: '榄菊蚊香小盘Ф134mm×H100mm 36圈内增高塑料筒有字盖(2201)',
planDate: '2023-12-25',
planNumber: 3000.0,
outNumber: 3000.0,
locCode: 'WH02',
productionLineCode: 'LJ8',
orderStatus: '3',
userDefined1: '20231225154549',
userDefined2: '00001',
userDefined3: '',
userDefined10: '1',
createDate: '2023-12-25',
id: '18d2af6969e0405ba202a5c09bc14f332',
active: '1',
unit: 'ST',
},
],
},
{
createBy: 'admin',
siteCode: '1000',
produceCode: '000100305998',
materialCode: '000000040000015127',
materialDesc: '榄菊蚊香小盘Ф134mm×H100mm 36圈内增高塑料筒有字盖(2201)',
planDate: '2023-12-25',
planNumber: 3000.0,
outNumber: 3000.0,
locCode: 'WH02',
productionLineCode: 'LJ8',
orderStatus: '3',
userDefined1: '20231225154549',
userDefined2: '00001',
userDefined3: '',
userDefined10: '1',
createDate: '2023-12-25',
id: '18d2af6969e0405ba202a5c09bc14f32',
active: '1',
unit: 'ST',
},
],
// //
title: "", title: "",
// //
@ -196,7 +282,7 @@ export default {
materialDesc: null, materialDesc: null,
planDate: null, planDate: null,
planNumber: null, planNumber: null,
qty: null, qty: null,
Unit: null, Unit: null,
outNumber: null, outNumber: null,
locCode: null, locCode: null,
@ -234,13 +320,13 @@ export default {
queryParams2: { queryParams2: {
orderNo: '', orderNo: '',
ken:'', ken: '',
warehouseNo: '', warehouseNo: '',
list:[], list: [],
},
queryParams3: {
ID: '',
}, },
queryParams3:{
ID: '',
},
// //
form: {}, form: {},
// //
@ -306,12 +392,18 @@ export default {
return index + 1; return index + 1;
}, },
getList() { getList() {
this.loading = true; this.loading = false;
listOutorder(this.queryParams).then(response => { this.outorderList.forEach((item, index) => {
this.outorderList = response.rows; item.index = index + 1
this.total = response.total;
this.loading = false;
}); });
// listOutorder(this.queryParams).then(response => {
// this.outorderList = response.rows;
// this.outorderList.forEach((item,index) => {
// item.index = index+1
// });
// this.total = response.total;
// this.loading = false;
// });
}, },
getList1() { getList1() {
this.loading = true; this.loading = true;
@ -364,7 +456,7 @@ export default {
materialDesc: null, materialDesc: null,
planDate: null, planDate: null,
planNumber: null, planNumber: null,
qty: null, qty: null,
Unit: null, Unit: null,
outNumber: null, outNumber: null,
locCode: null, locCode: null,
@ -417,12 +509,12 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
handleQtyChange(row, event) { handleQtyChange(row, event) {
// row qty // row qty
row.qty = event; row.qty = event;
// //
// this.saveQtyToServer(row.id, event); // this.saveQtyToServer(row.id, event);
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -443,15 +535,15 @@ export default {
this.title = "修改包材出库单"; this.title = "修改包材出库单";
}); });
}, },
handleSAP(row){ handleSAP(row) {
console.log(this.ids) console.log(this.ids)
let postData = this.ids.map(id => ({ id: id })); let postData = this.ids.map(id => ({ id: id }));
console.log(postData) console.log(postData)
OutboundPostingSAP(JSON.stringify(postData)).then(response => { OutboundPostingSAP(JSON.stringify(postData)).then(response => {
this.$modal.msgSuccess("操作完成"); this.$modal.msgSuccess("操作完成");
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
const _this = this const _this = this
@ -462,18 +554,18 @@ export default {
_this.$modal.msgError("请选择"); _this.$modal.msgError("请选择");
return return
} }
let tem="" let tem = ""
_this.selectedRows.forEach(function(row) { _this.selectedRows.forEach(function (row) {
// row // row
if (row.outNumber === row.planNumber) { if (row.outNumber === row.planNumber) {
_this.$modal.msgError("已经出完"); _this.$modal.msgError("已经出完");
tem="0" tem = "0"
} }
}); });
if (tem=="0"){ if (tem == "0") {
return return
} }
var bull = _this.selectedRows.some((item) => { var bull = _this.selectedRows.some((item) => {
// console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo) // console.log(item.stationNo == undefined || item.stationNo == '',item.stationNo)
return item.stationNo == undefined || item.stationNo == '' return item.stationNo == undefined || item.stationNo == ''
@ -492,11 +584,11 @@ export default {
this.queryParams2.orderNo = this.queryParams1.produceCode this.queryParams2.orderNo = this.queryParams1.produceCode
this.queryParams2.warehouseNo = this.queryParams1.warehouseNo this.queryParams2.warehouseNo = this.queryParams1.warehouseNo
this.queryParams2.list = _this.selectedRows this.queryParams2.list = _this.selectedRows
this.queryParams2.ken= 2 this.queryParams2.ken = 2
addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => { addPurchaseOrderOutbound(JSON.stringify(_this.queryParams2)).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });

@ -35,8 +35,9 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://localhost:8080`,
// target: `http://192.168.3.93:8080`, // target: `http://192.168.3.93:8080`,
target: `http://192.168.3.158:8080`, // target: `http://192.168.3.158:8080`,
// target: `http://192.168.202.34:30000`, // target: `http://192.168.202.34:30000`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {

Loading…
Cancel
Save