diff --git a/src/views/mes/plan/index.vue b/src/views/mes/plan/index.vue
index 84bb34f..79f87a0 100644
--- a/src/views/mes/plan/index.vue
+++ b/src/views/mes/plan/index.vue
@@ -146,12 +146,12 @@
@selection-change="handleSelectionChange">
-
-
-
-
-
-
+
+
+
+
+
+
@@ -199,17 +199,17 @@
@selection-change="handleSelectionChange">
-
-
-
-
-
-
+
+
+
+
+
+
@@ -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 {
- 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 => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
+ /** 新增-提交按钮 */
+ 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) {
diff --git a/src/views/mes/pro/order/index.vue b/src/views/mes/pro/order/index.vue
index 0d9830a..f468a7d 100644
--- a/src/views/mes/pro/order/index.vue
+++ b/src/views/mes/pro/order/index.vue
@@ -106,6 +106,8 @@
-
+