|
|
@ -33,7 +33,9 @@ |
|
|
|
<!-- :multiple="false"></j-select-multi-user>--> |
|
|
|
<!-- :multiple="false"></j-select-multi-user>--> |
|
|
|
|
|
|
|
|
|
|
|
<j-dict-select-tag type="list" v-model="model.responsiblePerson" |
|
|
|
<j-dict-select-tag type="list" v-model="model.responsiblePerson" |
|
|
|
placeholder="请选择车间负责人" :disabled="model.workshopId==null"/> |
|
|
|
placeholder="请选择车间负责人" |
|
|
|
|
|
|
|
:dict-code="departManger" |
|
|
|
|
|
|
|
:disabled="model.workshopId==null"/> |
|
|
|
|
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -49,7 +51,7 @@ |
|
|
|
<a-form-model-item label="组长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teamLeader"> |
|
|
|
<a-form-model-item label="组长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teamLeader"> |
|
|
|
<!-- <a-input v-model="model.teamLeader" placeholder="请输入组长"></a-input>--> |
|
|
|
<!-- <a-input v-model="model.teamLeader" placeholder="请输入组长"></a-input>--> |
|
|
|
<j-dict-select-tag type="list" v-model="model.teamLeader" |
|
|
|
<j-dict-select-tag type="list" v-model="model.teamLeader" |
|
|
|
placeholder="请选择组长" :dict-code="groupxVal2" |
|
|
|
placeholder="请选择组长" :dict-code="teamLeaderVal" |
|
|
|
:disabled="model.teamId==null"/> |
|
|
|
:disabled="model.teamId==null"/> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -73,8 +75,11 @@ |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditBy"> |
|
|
|
<a-form-model-item label="审核人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditBy"> |
|
|
|
<j-select-multi-user placeholder="请选择审核人" v-model="model.auditBy" |
|
|
|
<!-- <j-select-multi-user placeholder="请选择审核人" v-model="model.auditBy" --> |
|
|
|
:multiple="false"></j-select-multi-user> |
|
|
|
<!-- :multiple="false"></j-select-multi-user>--> |
|
|
|
|
|
|
|
<j-dict-select-tag type="list" v-model="model.auditBy" |
|
|
|
|
|
|
|
placeholder="请选择审核人" |
|
|
|
|
|
|
|
:dict-code="auditByVal"/> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
@ -113,14 +118,16 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
departManger: "sys_user,realname,username", |
|
|
|
|
|
|
|
auditByVal: "sys_user,realname,username", |
|
|
|
groupxVal: "groupx,group_name,id", |
|
|
|
groupxVal: "groupx,group_name,id", |
|
|
|
groupxVal2: "sys_user,realname,id", |
|
|
|
teamLeaderVal: "sys_user,realname,username", |
|
|
|
model: { |
|
|
|
model: { |
|
|
|
workTime: new Date(), |
|
|
|
workTime: '', |
|
|
|
status: 0, |
|
|
|
status: 0, |
|
|
|
auditBy:66, |
|
|
|
auditTimr: '', |
|
|
|
auditTimr: new Date(), |
|
|
|
|
|
|
|
speedUp: 0, |
|
|
|
speedUp: 0, |
|
|
|
|
|
|
|
auditBy: 'admin', |
|
|
|
}, |
|
|
|
}, |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: {span: 24}, |
|
|
|
xs: {span: 24}, |
|
|
@ -169,30 +176,39 @@ export default { |
|
|
|
// this.getNowDate(); //调用函数 |
|
|
|
// this.getNowDate(); //调用函数 |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
departSelected() { |
|
|
|
// 车间选定 |
|
|
|
|
|
|
|
// 1,查询车间负责人(查询所属当前车间用户) |
|
|
|
|
|
|
|
// 2,查询班组(查询所属当前车间班组) |
|
|
|
|
|
|
|
getGroupxValChange() { |
|
|
|
|
|
|
|
this.departManger = "sys_user,realname,username,id in (select user_id from sys_user_depart where dep_id='" + this.model.workshopId + "')"; |
|
|
|
|
|
|
|
this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'"; |
|
|
|
|
|
|
|
this.auditByVal = "sys_user,realname,username,id in (select user_id from sys_user_depart where dep_id='" + this.model.workshopId + "')"; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//班组选定,组长自动填充 |
|
|
|
|
|
|
|
getEnterprisesManagerValChange() { |
|
|
|
|
|
|
|
// this.teamLeaderVal = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')"; |
|
|
|
let that = this; |
|
|
|
let that = this; |
|
|
|
let param = { |
|
|
|
let param = { |
|
|
|
"id": that.model.workshopId, |
|
|
|
"id": that.model.teamId, |
|
|
|
} |
|
|
|
} |
|
|
|
// alert(param.toString()); |
|
|
|
// alert(param.toString()); |
|
|
|
getAction(that.url.groupxList, param).then((res) => { |
|
|
|
getAction(that.url.groupxList, param).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
|
// console.log("----------" + JSON.stringify(res.result.records)) |
|
|
|
// console.log("----------" + JSON.stringify(res.result.records)) |
|
|
|
let phone = JSON.stringify(res.result.records[0].enterprisesNanager); |
|
|
|
let enterprisesManager = JSON.stringify(res.result.records[0].enterprisesManager_dictText); |
|
|
|
that.model = Object.assign(that.model, {'mobile': phone}); |
|
|
|
// enterprisesManager.replace('"',"") |
|
|
|
|
|
|
|
enterprisesManager = enterprisesManager.substring(1, enterprisesManager.length - 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.model = Object.assign(that.model, {'teamLeader': enterprisesManager}); |
|
|
|
this.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getGroupxValChange() { |
|
|
|
|
|
|
|
this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'"; |
|
|
|
|
|
|
|
this.departSelected(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getEnterprisesManagerValChange() { |
|
|
|
|
|
|
|
this.groupxVal2 = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')"; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
add() { |
|
|
|
add() { |
|
|
|
this.edit(this.modelDefault); |
|
|
|
this.edit(this.modelDefault); |
|
|
|
|
|
|
|
this.getNowDate(); |
|
|
|
|
|
|
|
// console.log(this.model.workTime); |
|
|
|
}, |
|
|
|
}, |
|
|
|
edit(record) { |
|
|
|
edit(record) { |
|
|
|
this.model = Object.assign({}, record); |
|
|
|
this.model = Object.assign({}, record); |
|
|
@ -256,6 +272,8 @@ export default { |
|
|
|
seconds = "0" + seconds; |
|
|
|
seconds = "0" + seconds; |
|
|
|
} |
|
|
|
} |
|
|
|
this.model.workTime = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; |
|
|
|
this.model.workTime = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; |
|
|
|
|
|
|
|
this.model.auditTimr = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|