|
|
|
@ -30,6 +30,7 @@ let diagnosisData = {
|
|
|
|
|
repairFlag: true,
|
|
|
|
|
innerFlag: true,
|
|
|
|
|
repairDeptCode: null,
|
|
|
|
|
repairUserId: '',
|
|
|
|
|
repairUserName: '',
|
|
|
|
|
repairUserPhone: '',
|
|
|
|
|
diagnosisInfo: '',
|
|
|
|
@ -87,7 +88,7 @@ export default {
|
|
|
|
|
message: "维修部门不能为空",
|
|
|
|
|
trigger: ["change", "blur"]
|
|
|
|
|
}],
|
|
|
|
|
repairUserName: [{
|
|
|
|
|
repairUserId: [{
|
|
|
|
|
required: true,
|
|
|
|
|
validator: this.repairUserNameValid,
|
|
|
|
|
message: "维修人姓名不能为空",
|
|
|
|
@ -129,6 +130,9 @@ export default {
|
|
|
|
|
repairInfo(row) {
|
|
|
|
|
this.repairId = row.repairId
|
|
|
|
|
},
|
|
|
|
|
handleEmployeeSelect(value){
|
|
|
|
|
this.diagnosisData.repairUserName = this.userlist.find(user => user.userId == value).employeeName;
|
|
|
|
|
},
|
|
|
|
|
commitFunc() {
|
|
|
|
|
this.$refs.saveForm.validate(b => {
|
|
|
|
|
if (!b) {
|
|
|
|
@ -156,7 +160,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
repairUserNameValid(rule, value, callback) {
|
|
|
|
|
if (this.diagnosisData?.repairFlag) {
|
|
|
|
|
if (!this.diagnosisData.repairUserName) {
|
|
|
|
|
if (!this.diagnosisData.repairUserId) {
|
|
|
|
|
callback(new Error("维修人姓名不能为空"))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|