订单管理管理模块(首页显示修复)

yangwl
wws 1 year ago
parent b2297f323e
commit 077588bdec

@ -146,12 +146,12 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column> <el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column>
<el-table-column prop="workorderCode" label="工单编码" width="120"></el-table-column> <el-table-column width="140" align="center" prop="workorderCode" label="工单编码"></el-table-column>
<el-table-column prop="productName" label="产品名称" width="120"></el-table-column> <el-table-column width="230" align="center" prop="productName" label="产品名称"></el-table-column>
<el-table-column prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column> <el-table-column width="150" align="center" prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column>
<el-table-column prop="shiftDesc" label="班次" show-overflow-tooltip></el-table-column> <el-table-column prop="shiftDesc" label="班次"></el-table-column>
<el-table-column prop="" label="料罐" show-overflow-tooltip></el-table-column> <el-table-column prop="" label="料罐"></el-table-column>
<el-table-column prop="" label="物料" show-overflow-tooltip></el-table-column> <el-table-column prop="" label="物料"></el-table-column>
</el-table> </el-table>
</el-row> </el-row>
<!-- 料罐-物料-计划日期的选择 --> <!-- 料罐-物料-计划日期的选择 -->
@ -199,17 +199,17 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></el-table-column>
<el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column> <el-table-column width="60" align="center" label="序号" type="index" :index="indexMethod"></el-table-column>
<el-table-column prop="workorderCode" label="工单编码" width="120"></el-table-column> <el-table-column width="140" align="center" prop="workorderCode" label="工单编码"></el-table-column>
<el-table-column prop="productName" label="产品名称" width="120"></el-table-column> <el-table-column width="230" align="center" prop="productName" label="产品名称"></el-table-column>
<el-table-column prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column> <el-table-column width="150" align="center" prop="productDate" label="工单日期" show-overflow-tooltip></el-table-column>
<el-table-column prop="shiftDesc" label="班次" show-overflow-tooltip></el-table-column> <el-table-column prop="shiftDesc" label="班次"></el-table-column>
<el-table-column prop="bucketName" label="料罐" show-overflow-tooltip></el-table-column> <el-table-column prop="bucketName" label="料罐"></el-table-column>
<el-table-column prop="materialName" label="物料" show-overflow-tooltip></el-table-column> <el-table-column prop="materialName" label="物料"></el-table-column>
</el-table> </el-table>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="addSubmitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -230,7 +230,7 @@ export default {
// BMS // BMS
bmsList: null, bmsList: null,
// //
newWorkOrderList: null, newWorkOrderList: [],
// list // list
selectProductList: null, selectProductList: null,
// list // list
@ -289,7 +289,6 @@ export default {
methods: { methods: {
/** 新增-提交按钮 */ /** 新增-提交按钮 */
batchBtn() { batchBtn() {
console.log(this.selectProductList)
// //
if (this.selectList == null || this.selectList === undefined){ if (this.selectList == null || this.selectList === undefined){
this.$message({ this.$message({
@ -320,75 +319,68 @@ export default {
materialId: this.form.productId, materialId: this.form.productId,
shiftId: this.selectList[0].shiftId, shiftId: this.selectList[0].shiftId,
}); });
for (let i = 0;i<bmsList.length-1;i++){ if (this.bmsList != 0){
for (let j = i;j < bmsList.length-1;j++){ for (let i = 0;i<bmsList.length;i++){
for (let j = i;j < bmsList.length;j++){
if (bmsList[i].shiftId == bmsList[j].shiftId && bmsList[i].bucketId == bmsList[j].bucketId && bmsList[i].materialId != bmsList[j].materialId){ if (bmsList[i].shiftId == bmsList[j].shiftId && bmsList[i].bucketId == bmsList[j].bucketId && bmsList[i].materialId != bmsList[j].materialId){
this.$message({ this.$message({
message: '同班次下-同料罐下:不能混料!', message: '同班次下-同料罐下:不能混料!',
type: 'warning' type: 'warning'
}) })
this.bmsList.pop();
return; return;
} }
} }
} }
}
// //
console.log("这里是你先要的数据")
console.log(this.selectList)
console.log(this.selectBucketList)
console.log(this.selectProductList)
// //
var bucket; var bucket;
for (let i = 0;i < this.selectBucketList.length-1;i++){ for (let i = 0;i < this.selectBucketList.length;i++){
if (this.form.bucketId == this.selectBucketList[i].bucketId){ if (this.form.bucketId == this.selectBucketList[i].bucketId){
bucket = this.selectBucketList[i]; bucket = this.selectBucketList[i];
} }
} }
// //
var material; var material;
for (let i = 0;i < this.selectProductList.length-1;i++){ for (let i = 0;i < this.selectProductList.length;i++){
if (this.form.productId == this.selectProductList[i].productId){ if (this.form.productId == this.selectProductList[i].productId){
material = this.selectProductList[i]; material = this.selectProductList[i];
} }
} }
this.newWorkOrderList = this.selectList; // newList
for (let i = 0; i < this.newWorkOrderList.length-1;i++){ for (let i = 0;i < this.selectList.length;i++){
// this.newWorkOrderList[i]. this.selectList[i].bucketName = bucket.bucketName;
this.selectList[i].bucketId = bucket.bucketId;
this.selectList[i].bucketCode = bucket.bucketCode;
this.selectList[i].materialId = material.productId;
this.selectList[i].materialCode = material.productCode;
this.selectList[i].materialName = material.productDesc;
this.selectList[i].planTime = this.form.planTime;
this.newWorkOrderList.push(this.selectList[i]);
} }
// 湿 //
// var wetMaterialDetail = { var list = [];
// workorderId: null, for (let i = 0; i < this.workOrderList.length; i++){
// workorderCode: null, for (let j = 0;j < this.selectList.length; j++){
// productName: null, if (this.workOrderList[i].workorderCode != this.selectList[j].workorderCode){
// workorderTime: null, list.push(this.workOrderList[i]);
// shiftId: null, }
// shiftCode: null, }
// shiftDesc: null, }
// bucketId: bucket.bucketId, // worklist
// bucketCode: bucket.bucketCode, this.workOrderList = list;
// bucketName: bucket.bucketName,
// materialId: material.productId,
// materialName: material.productDesc,
// };
// for (let i = 0; i < this.selectList.length-1;i++){
// var workOrder = this.selectList[i];
// wetMaterialDetail.workorderId = workOrder.workorderId;
// wetMaterialDetail.workorderCode = workOrder.workorderCode;
// wetMaterialDetail.productName = workOrder.productName;
// wetMaterialDetail.workorderTime = workOrder.productDate;
// wetMaterialDetail.shiftId = workOrder.shiftId;
// wetMaterialDetail.shiftDesc = workOrder.shiftDesc;
//
// this.wetMaterialDetailList.push(workOrder);
// }
console.log("看这里!!!!") this.$message('点击了提交按钮!');
console.log(this.wetMaterialDetailList)
//
this.bmsList = bmsList; this.bmsList = bmsList;
this.$message('点击了提交按钮!'); this.form.bucketId = null;
this.form.productId = null;
}, },
/** 校验计划日期 */ /** 校验计划日期 */
checkDate(e){ checkDate(e){
@ -418,8 +410,6 @@ export default {
const productDate = `${year}-${month}-${day}`; const productDate = `${year}-${month}-${day}`;
getWorkOrderList(productDate).then(response => { getWorkOrderList(productDate).then(response => {
console.log("这里是你要的数据")
console.log(response.data)
this.workOrderList = response.data; this.workOrderList = response.data;
// //
// //
@ -474,8 +464,6 @@ export default {
}, },
/** 首-搜索按钮操作 */ /** 首-搜索按钮操作 */
handleQuery() { handleQuery() {
console.log("这里是你要的数据");
console.log(this.timeList);
if (this.timeList.length-1>1){ if (this.timeList.length-1>1){
// //
const year = this.timeList[0].getFullYear(); // const year = this.timeList[0].getFullYear(); //
@ -510,7 +498,7 @@ export default {
// //
this.checkSelect = true; this.checkSelect = true;
// //
for (let i = 0; i < selection.length-1; i++){ for (let i = 0; i < selection.length; i++){
if (selection[0].shiftId != selection[i].shiftId){ if (selection[0].shiftId != selection[i].shiftId){
this.$message({ this.$message({
message: '班次冲突!', message: '班次冲突!',
@ -533,7 +521,7 @@ export default {
this.workOrderTime = null; this.workOrderTime = null;
this.workOrderList = []; this.workOrderList = [];
this.selectProductList = null; this.selectProductList = null;
this.newWorkOrderList = null; this.newWorkOrderList = [];
this.bmapId = null; this.bmapId = null;
// //
this.workOrderTime = new Date(); this.workOrderTime = new Date();
@ -581,25 +569,21 @@ export default {
this.title = "修改湿料计划管理"; this.title = "修改湿料计划管理";
}); });
}, },
/** 提交按钮 */ /** 新增-提交按钮 */
submitForm() { addSubmitForm() {
this.$refs["form"].validate(valid => { // newList
if (valid) { if (this.newWorkOrderList == [] || this.newWorkOrderList.length == 0 || this.newWorkOrderList == null){
if (this.form.id != null) { this.$message({
updatePlan(this.form).then(response => { message:'提交数据不能为空!',
this.$modal.msgSuccess("修改成功"); type:'warning'
this.open = false; })
this.getList(); return;
}); }
} else {
addPlan(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
this.getList(); this.getList();
});
}
}
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {

@ -106,6 +106,8 @@
</el-row> </el-row>
<el-table <el-table
style="width: 100%"
height="480"
v-if="refreshTable" v-if="refreshTable"
v-loading="loading" v-loading="loading"
:data="orderList" :data="orderList"
@ -133,7 +135,7 @@
<el-table-column width="100" align="center" label="计划工厂编码" prop="planFactoryCode"/> <el-table-column width="100" align="center" label="计划工厂编码" prop="planFactoryCode"/>
<el-table-column label="订单类型" align="center" prop="orderType"/> <el-table-column label="订单类型" align="center" prop="orderType"/>
<el-table-column label="产品类型" align="center" prop="prodType"/> <el-table-column label="产品类型" align="center" prop="prodType"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" > <el-table-column label="操作" align="center" class-name="small-padding fixed-width " fixed="right" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"

Loading…
Cancel
Save