|
@@ -80,25 +80,6 @@
|
|
|
v-hasPermi="['invoice:bookingworkticket:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- icon="el-icon-edit"
|
|
|
- size="mini"
|
|
|
- :disabled="single"
|
|
|
- @click="handleUpdate"
|
|
|
- v-hasPermi="['invoice:bookingworkticket:edit']"
|
|
|
- >修改</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleImport"
|
|
|
- v-hasPermi="['invoice:bookingworkticket:edit']"
|
|
|
- >导入</el-button>
|
|
|
- </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
@@ -144,8 +125,8 @@
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['invoice:bookingworkticket:edit']"
|
|
|
>修改</el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.status== 0"
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.status== 0"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
@@ -324,10 +305,10 @@
|
|
|
<el-input v-model="ruleForm.estimateWorktime" ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
-
|
|
|
+
|
|
|
<el-button @click="resetForm1()">重置</el-button>
|
|
|
<el-button @click="add">新增一条</el-button>
|
|
|
<el-button @click="reduce" :disabled="flag">移除一条</el-button>
|
|
@@ -513,11 +494,38 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
workArea: [
|
|
|
- { required: false, message: "作业区域不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "作业区域不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ floorLocation: [
|
|
|
+ { required: true, message: "楼层位置不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ workStartTime: [
|
|
|
+ { required: true, message: "作业开始时间不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ workEndTime: [
|
|
|
+ { required: true, message: "作业结束时间不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ workType: [
|
|
|
+ { required: true, message: "作业类型不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ userMg: [
|
|
|
+ { required: true, message: "用户主管不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ userUnit: [
|
|
|
+ { required: true, message: "用户单位不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ workDescription: [
|
|
|
+ { required: true, message: "作业内容不能为空", trigger: "blur" }
|
|
|
],
|
|
|
riskLevel: [
|
|
|
{ required: true, message: "风险等级不能为空", trigger: "blur" }
|
|
|
],
|
|
|
+ workPeopleNumber: [
|
|
|
+ { required: true, message: "作业人数不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ estimateWorktime: [
|
|
|
+ { required: true, message: "预计作业时间不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
}
|
|
|
};
|
|
|
},
|
|
@@ -526,7 +534,7 @@ export default {
|
|
|
deptName(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
created() {
|
|
|
//设置表格高度对应屏幕高度
|
|
@@ -558,7 +566,7 @@ export default {
|
|
|
methods: {
|
|
|
//根据用户单位 查询对应选择的用户主管 根据用户单位 字段 查找对应的多个主管 返回 Sysuser的集合(id,name)
|
|
|
checkCategoryPromotion(oneId){
|
|
|
-
|
|
|
+
|
|
|
getUserByUnit(oneId).then(response => {
|
|
|
// this.form.userMg=null;
|
|
|
this.userMgOptions = response.data;
|
|
@@ -613,7 +621,7 @@ export default {
|
|
|
if (row.bookingworkticket.workStartTime && row.bookingworkticket.workStartTime === row.createdate){
|
|
|
this.approveForm.isToday = 1;
|
|
|
}
|
|
|
- //判断是否涉及 动火 和当日
|
|
|
+ //判断是否涉及 动火 和当日
|
|
|
if (row.workType===1||row.workType===2||row.workType===3||row.workType===15){
|
|
|
this.approveForm.isSpecial = 1
|
|
|
}
|
|
@@ -663,7 +671,7 @@ export default {
|
|
|
},
|
|
|
// 表单减少一行
|
|
|
reduce() {
|
|
|
-
|
|
|
+
|
|
|
this.ruleForm.length = this.ruleForm.length - 1
|
|
|
this.flags()
|
|
|
},
|
|
@@ -810,6 +818,8 @@ export default {
|
|
|
//查询用户归属的部门名称
|
|
|
getUserByUserName(names).then(response => {
|
|
|
this.form.workUnit=response.data.dept.deptName;
|
|
|
+ //默认是用户自己的部门
|
|
|
+ this.form.deptId=response.data.dept.deptId;
|
|
|
});
|
|
|
this.open = true;
|
|
|
this.title = "添加预约作业票台账";
|