Merge remote-tracking branch 'origin/master'

master
A0010407 1 year ago
commit aef81d62c1

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

@ -106,6 +106,8 @@
</el-row>
<el-table
style="width: 100%"
height="480"
v-if="refreshTable"
v-loading="loading"
:data="orderList"
@ -133,7 +135,7 @@
<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="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">
<el-button
size="mini"

Loading…
Cancel
Save