更新
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2025-10-13 15:07:24
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2025-10-24 09:19:17
|
||||
* @LastEditTime: 2025-10-29 15:28:52
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -111,7 +111,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-col :span="6" v-if="dataForm.shiftType>1">
|
||||
<el-form-item label="同班次连排" prop="shiftSustainedNum">
|
||||
<el-input
|
||||
v-model="dataForm.shiftSustainedNum"
|
||||
@@ -289,6 +289,7 @@
|
||||
:dialogVisible="addOrUpdateVisible1"
|
||||
@cancel="cancel1"
|
||||
@confirm="handleConfirm1"
|
||||
:before-close="cancel1"
|
||||
:destroy-on-close="true"
|
||||
append-to-body
|
||||
width="40%">
|
||||
@@ -301,6 +302,7 @@
|
||||
:dialogVisible="addOrUpdateVisible2"
|
||||
@cancel="cancel2"
|
||||
@confirm="handleConfirm2"
|
||||
:before-close="cancel2"
|
||||
:destroy-on-close="true"
|
||||
append-to-body
|
||||
width="40%">
|
||||
@@ -313,6 +315,7 @@
|
||||
:dialogVisible="addOrUpdateVisible3"
|
||||
@cancel="cancel3"
|
||||
@confirm="handleConfirm3"
|
||||
:before-close="cancel3"
|
||||
:destroy-on-close="true"
|
||||
append-to-body
|
||||
width="50%">
|
||||
@@ -391,6 +394,7 @@ const tableProps2 = [
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线及工段',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -510,6 +514,16 @@ export default {
|
||||
{
|
||||
type: 'bind',
|
||||
btnName: '绑定产线',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'isProduction',
|
||||
value: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'delete',
|
||||
@@ -640,6 +654,12 @@ export default {
|
||||
this.$message('部门不能为空');
|
||||
return;
|
||||
}
|
||||
const compareDate = this.compareDates(this.dataForm.startDay,this.dataForm.endDay)
|
||||
|
||||
if (compareDate > 0 ) {
|
||||
this.$message('开始时间不能大于结束时间');
|
||||
return;
|
||||
}
|
||||
createStepOne(this.dataForm).then((res) => {
|
||||
if (!this.dataForm.id) {
|
||||
this.dataForm.id = res.data;
|
||||
@@ -754,6 +774,19 @@ export default {
|
||||
setDataForm() {
|
||||
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
||||
},
|
||||
//比较时间,开始时间在结束时间前
|
||||
compareDates(date1, date2) {
|
||||
const d1 = date1;
|
||||
const d2 = date2;
|
||||
|
||||
if (d1 === d2) {
|
||||
return 0; // 日期相等
|
||||
} else if (d1 < d2) {
|
||||
return -1; // date1 在 date2 之前
|
||||
} else {
|
||||
return 1; // date1 在 date2 之后
|
||||
}
|
||||
},
|
||||
//第二步
|
||||
//设置第二部班次
|
||||
setTWOclass() {
|
||||
@@ -830,7 +863,7 @@ export default {
|
||||
addNewGroup() {
|
||||
this.addOrUpdateVisible2 = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addGroupRef.init(this.dataForm.deptId);
|
||||
this.$refs.addGroupRef.init(this.dataForm.deptId,this.tableData2);
|
||||
});
|
||||
},
|
||||
cancel1() {
|
||||
|
||||
Reference in New Issue
Block a user