|
|
@ -29,8 +29,11 @@ |
|
|
|
prop="responsiblePerson"> |
|
|
|
prop="responsiblePerson"> |
|
|
|
<!-- <j-select-multi-user placeholder="请选择车间负责人"--> |
|
|
|
<!-- <j-select-multi-user placeholder="请选择车间负责人"--> |
|
|
|
<!-- v-model="model.responsiblePerson"></j-select-multi-user>--> |
|
|
|
<!-- v-model="model.responsiblePerson"></j-select-multi-user>--> |
|
|
|
<j-select-multi-user placeholder="请选择车间负责人" v-model="model.responsiblePerson" |
|
|
|
<!-- <j-select-multi-user placeholder="请选择车间负责人" v-model="model.responsiblePerson"--> |
|
|
|
:multiple="false"></j-select-multi-user> |
|
|
|
<!-- :multiple="false"></j-select-multi-user>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<j-dict-select-tag type="list" v-model="model.responsiblePerson" |
|
|
|
|
|
|
|
placeholder="请选择车间负责人" :disabled="model.workshopId==null"/> |
|
|
|
|
|
|
|
|
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -58,7 +61,7 @@ |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-col :span="24"> |
|
|
|
<a-form-model-item label="生产时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
|
|
|
<a-form-model-item label="生产时长(天)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
|
|
|
<a-input-number v-model="model.duration" placeholder="请输入生产时长" style="width: 100%"/> |
|
|
|
<a-input-number v-model="model.duration" placeholder="请输入生产时长" style="width: 100%"/> |
|
|
|
</a-form-model-item> |
|
|
|
</a-form-model-item> |
|
|
|
</a-col> |
|
|
|
</a-col> |
|
|
@ -112,7 +115,13 @@ export default { |
|
|
|
return { |
|
|
|
return { |
|
|
|
groupxVal: "groupx,group_name,id", |
|
|
|
groupxVal: "groupx,group_name,id", |
|
|
|
groupxVal2: "sys_user,realname,id", |
|
|
|
groupxVal2: "sys_user,realname,id", |
|
|
|
model: {}, |
|
|
|
model: { |
|
|
|
|
|
|
|
workTime: new Date(), |
|
|
|
|
|
|
|
status:0, |
|
|
|
|
|
|
|
auditBy:66, |
|
|
|
|
|
|
|
auditTimr: new Date(), |
|
|
|
|
|
|
|
speedUp:0, |
|
|
|
|
|
|
|
}, |
|
|
|
labelCol: { |
|
|
|
labelCol: { |
|
|
|
xs: {span: 24}, |
|
|
|
xs: {span: 24}, |
|
|
|
sm: {span: 5}, |
|
|
|
sm: {span: 5}, |
|
|
@ -127,7 +136,7 @@ export default { |
|
|
|
{required: true, message: "工单不能为空"}, |
|
|
|
{required: true, message: "工单不能为空"}, |
|
|
|
], |
|
|
|
], |
|
|
|
workshopId: [ |
|
|
|
workshopId: [ |
|
|
|
{required: true, message: "工单不能为空"}, |
|
|
|
{required: true, message: "车间不能为空"}, |
|
|
|
], |
|
|
|
], |
|
|
|
teamId: [ |
|
|
|
teamId: [ |
|
|
|
{required: true, message: "班组不能为空"}, |
|
|
|
{required: true, message: "班组不能为空"}, |
|
|
@ -141,6 +150,7 @@ export default { |
|
|
|
], |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
url: { |
|
|
|
url: { |
|
|
|
|
|
|
|
groupxList: "/groupx/list", |
|
|
|
add: "/org.jeecg.modules.productplan/zyProductPlan/add", |
|
|
|
add: "/org.jeecg.modules.productplan/zyProductPlan/add", |
|
|
|
edit: "/org.jeecg.modules.productplan/zyProductPlan/edit", |
|
|
|
edit: "/org.jeecg.modules.productplan/zyProductPlan/edit", |
|
|
|
queryById: "/org.jeecg.modules.productplan/zyProductPlan/queryById" |
|
|
|
queryById: "/org.jeecg.modules.productplan/zyProductPlan/queryById" |
|
|
@ -155,10 +165,28 @@ export default { |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
//备份model原始值 |
|
|
|
//备份model原始值 |
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
|
|
|
|
|
|
|
// console.log(this.getNowDate()) |
|
|
|
|
|
|
|
// this.getNowDate(); //调用函数 |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
departSelected() { |
|
|
|
|
|
|
|
let that = this; |
|
|
|
|
|
|
|
let param = { |
|
|
|
|
|
|
|
"id": that.model.workshopId, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// alert(param.toString()); |
|
|
|
|
|
|
|
getAction(that.url.groupxList, param).then((res) => { |
|
|
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
|
|
// console.log("----------" + JSON.stringify(res.result.records)) |
|
|
|
|
|
|
|
let phone = JSON.stringify(res.result.records[0].enterprisesNanager); |
|
|
|
|
|
|
|
that.model = Object.assign(that.model, {'mobile': phone}); |
|
|
|
|
|
|
|
this.$forceUpdate(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
getGroupxValChange() { |
|
|
|
getGroupxValChange() { |
|
|
|
this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'"; |
|
|
|
this.groupxVal = "groupx,group_name,id,depart_id='" + this.model.workshopId + "'"; |
|
|
|
|
|
|
|
this.departSelected(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getEnterprisesManagerValChange() { |
|
|
|
getEnterprisesManagerValChange() { |
|
|
|
this.groupxVal2 = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')"; |
|
|
|
this.groupxVal2 = "sys_user,realname,id,id=(select enterprises_manager from groupx where id='" + this.model.teamId + "')"; |
|
|
@ -199,6 +227,37 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getNowDate() { |
|
|
|
|
|
|
|
var date = new Date(); |
|
|
|
|
|
|
|
var sign2 = ":"; |
|
|
|
|
|
|
|
var year = date.getFullYear() // 年 |
|
|
|
|
|
|
|
var month = date.getMonth() + 1; // 月 |
|
|
|
|
|
|
|
var day = date.getDate(); // 日 |
|
|
|
|
|
|
|
var hour = date.getHours(); // 时 |
|
|
|
|
|
|
|
var minutes = date.getMinutes(); // 分 |
|
|
|
|
|
|
|
var seconds = date.getSeconds() //秒 |
|
|
|
|
|
|
|
var weekArr = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天']; |
|
|
|
|
|
|
|
var week = weekArr[date.getDay()]; |
|
|
|
|
|
|
|
// 给一位数的数据前面加 “0” |
|
|
|
|
|
|
|
if (month >= 1 && month <= 9) { |
|
|
|
|
|
|
|
month = "0" + month; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (day >= 0 && day <= 9) { |
|
|
|
|
|
|
|
day = "0" + day; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (hour >= 0 && hour <= 9) { |
|
|
|
|
|
|
|
hour = "0" + hour; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (minutes >= 0 && minutes <= 9) { |
|
|
|
|
|
|
|
minutes = "0" + minutes; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (seconds >= 0 && seconds <= 9) { |
|
|
|
|
|
|
|
seconds = "0" + seconds; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.model.workTime = year + "-" + month + "-" + day + " " + hour + sign2 + minutes + sign2 + seconds; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |