|
@@ -129,11 +129,11 @@
|
|
|
</el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="工长" prop="foremanName">
|
|
|
- <el-input v-model="todayPlanForm.foremanName" disabled></el-input>
|
|
|
+ <el-input v-model="todayPlanForm.foremanName" readonly></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="开工时间" prop="startDate">
|
|
|
<el-date-picker class="w100" v-model="todayPlanForm.startDate" type="date" placeholder="选择日期"
|
|
|
- value-format="yyyy-MM-dd">
|
|
|
+ value-format="yyyy-MM-dd" readonly>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="完工时间" prop="endDate">
|
|
@@ -218,7 +218,7 @@ export default {
|
|
|
stationId: "",
|
|
|
foremanId: "",
|
|
|
foremanName: "",
|
|
|
- startDate: "",
|
|
|
+ startDate: this.todayDate,
|
|
|
endDate: "",
|
|
|
describtion: "",
|
|
|
versionNumber: "",
|
|
@@ -240,12 +240,12 @@ export default {
|
|
|
],
|
|
|
productId: [{ required: true, message: "产品名称", trigger: "blur" }],
|
|
|
projectCode: [{ required: true, message: "项目代码", trigger: "blur" }],
|
|
|
- steelStampNumberStart: [
|
|
|
- { required: true, message: "钢印号", trigger: "blur" },
|
|
|
- ],
|
|
|
- steelStampNumberEnd: [
|
|
|
- { required: true, message: "钢印号", trigger: "blur" },
|
|
|
- ],
|
|
|
+ // steelStampNumberStart: [
|
|
|
+ // { required: true, message: "钢印号", trigger: "blur" },
|
|
|
+ // ],
|
|
|
+ // steelStampNumberEnd: [
|
|
|
+ // { required: true, message: "钢印号", trigger: "blur" },
|
|
|
+ // ],
|
|
|
num: [{ required: true, message: "数量", trigger: "blur" }],
|
|
|
mainProcess: [{ required: true, message: "主工序", trigger: "blur" }],
|
|
|
stationId: [{ required: true, message: "工位", trigger: "blur" }],
|
|
@@ -316,7 +316,6 @@ export default {
|
|
|
this.departmentIdArray,
|
|
|
JSON.stringify(this.departmentIdArray)
|
|
|
);
|
|
|
- return
|
|
|
let arr = [];
|
|
|
for (var i in this.departmentIdArray) {
|
|
|
arr.push(
|
|
@@ -493,13 +492,60 @@ export default {
|
|
|
},
|
|
|
addPlan() {
|
|
|
this.titleName = `新增${this.titleText}`;
|
|
|
+ this.initTodayPlanForm()
|
|
|
this.editPlanDiaLog = true;
|
|
|
this.getDepartmentList();
|
|
|
this.getProductList();
|
|
|
// this.todayPlanForm
|
|
|
},
|
|
|
+ // 初始化 Form
|
|
|
+ initTodayPlanForm() {
|
|
|
+ this.todayPlanForm = {
|
|
|
+ id: null,
|
|
|
+ productSchedulingNum: "",
|
|
|
+ productId: "",
|
|
|
+ projectCode: "",
|
|
|
+ steelStampNumberStart: "",
|
|
|
+ steelStampNumberEnd: "",
|
|
|
+ num: "",
|
|
|
+ mainProcess: "",
|
|
|
+ progress: "",
|
|
|
+ stationId: "",
|
|
|
+ foremanId: "",
|
|
|
+ foremanName: "",
|
|
|
+ startDate: this.todayDate,
|
|
|
+ endDate: "",
|
|
|
+ describtion: "",
|
|
|
+ versionNumber: "",
|
|
|
+ }
|
|
|
+ },
|
|
|
addPlanData(formName) {
|
|
|
console.log(this.todayPlanForm);
|
|
|
+ if(!this.todayPlanForm.steelStampNumberStart){
|
|
|
+ if(this.todayPlanForm.steelStampNumberEnd){
|
|
|
+ this.$message({
|
|
|
+ message:"钢印号区间填写不完整",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!this.todayPlanForm.steelStampNumberEnd){
|
|
|
+ if(this.todayPlanForm.steelStampNumberStart){
|
|
|
+ this.$message({
|
|
|
+ message:"钢印号区间填写不完整",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.todayPlanForm.endDate<this.todayPlanForm.startDate){
|
|
|
+ this.$message({
|
|
|
+ message:"完工日期不能小于开工日期",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
if (valid) {
|
|
|
console.log(this.todayPlanForm, "传给后端的值");
|
|
@@ -524,7 +570,6 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
this.editPlanDiaLog = false;
|
|
|
- this.todayPlanForm = [];
|
|
|
this.getTableData(this.hasChooseDept);
|
|
|
} else {
|
|
|
this.$message({
|