fix:玻纤子工序填写日志操作记录mloguser
This commit is contained in:
parent
69decccef5
commit
f8ad4a7e09
|
|
@ -351,6 +351,26 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mloguser: {
|
||||||
|
list: {
|
||||||
|
name: "列表",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.get(`${config.API_URL}/wpm/mloguser/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(`${config.API_URL}/wpm/mloguser/`, data);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(`${config.API_URL}/wpm/mloguser/${id}/`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
handover: {
|
handover: {
|
||||||
list: {
|
list: {
|
||||||
name: "值班记录列表",
|
name: "值班记录列表",
|
||||||
|
|
|
||||||
|
|
@ -68,27 +68,152 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- 子工序操作记录 该工序拥有子工序-->
|
||||||
|
<el-card
|
||||||
|
v-if="processOptions.length>0"
|
||||||
|
style="width: 100%; margin: 1vh 0;position: relative"
|
||||||
|
header="子工序操作记录"
|
||||||
|
shadow="never"
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="table_muser_add"
|
||||||
|
style="position: absolute; left: 150px; top: 5px"
|
||||||
|
>新增</el-button>
|
||||||
|
<scTable
|
||||||
|
ref="tableMuser"
|
||||||
|
:apiObj="apiObjMuser"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
height="250px"
|
||||||
|
:params="paramsMuser"
|
||||||
|
hidePagination
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="工序" prop="process_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人" prop="handle_user_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作日期" prop="handle_date">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="班次" prop="shift_name">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
fixed="right"
|
||||||
|
align="center"
|
||||||
|
width="100px"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link
|
||||||
|
:underline="false"
|
||||||
|
type="danger"
|
||||||
|
@click="table_muser_del(scope.row)"
|
||||||
|
>删除</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
<!-- 日志操作记录编辑 -->
|
||||||
|
<el-dialog v-model="saveMuserDialog" title="子工序操作记录">
|
||||||
|
<el-form
|
||||||
|
:model="muserForm"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
ref="saveInForm"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="操作日期" required>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="muserForm.handle_date"
|
||||||
|
type="date"
|
||||||
|
placeholder="操作日期"
|
||||||
|
value-format="YYYY-MM-DD"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="操作人" required>
|
||||||
|
<ehsSelect
|
||||||
|
v-model="muserForm.handle_user"
|
||||||
|
:showName="muserForm.handle_user_name"
|
||||||
|
:apiObj="this.$API.system.user.list"
|
||||||
|
:params="{ depts: dept }"
|
||||||
|
class="width-100"
|
||||||
|
></ehsSelect>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="子工序" prop="process">
|
||||||
|
<el-select
|
||||||
|
v-model="muserForm.process"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="width-100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in processOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="23">
|
||||||
|
<el-form-item label="关联班次" prop="shift">
|
||||||
|
<el-select
|
||||||
|
v-model="muserForm.shift"
|
||||||
|
placeholder="班次"
|
||||||
|
class="width-100"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in shiftOtions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:loading="isSaveing"
|
||||||
|
@click="saveMuserSubmit()"
|
||||||
|
>保 存</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
<!-- 输入物料 -->
|
<!-- 输入物料 -->
|
||||||
<el-card
|
<el-card
|
||||||
style="width: 100%; margin: 1vh 0"
|
style="width: 100%; margin: 1vh 0;position: relative"
|
||||||
header="输入物料"
|
header="输入物料"
|
||||||
shadow="never"
|
shadow="never"
|
||||||
>
|
>
|
||||||
<div>
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
||||||
v-if="mlogItem.submit_time == null&&(mlogItem.ticket==null||(mlogItem.ticket_&&mlogItem.ticket_.state_.type==1))"
|
icon="el-icon-plus"
|
||||||
icon="el-icon-plus"
|
@click="table_add"
|
||||||
@click="table_add"
|
style="position: absolute; left: 100px; top: 5px"
|
||||||
>新增</el-button
|
>新增</el-button>
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div style="height: 4px"></div>
|
|
||||||
<scTable
|
<scTable
|
||||||
ref="tableIn"
|
ref="tableIn"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
|
height="250px"
|
||||||
:params="paramsIn"
|
:params="paramsIn"
|
||||||
hidePagination
|
hidePagination
|
||||||
>
|
>
|
||||||
|
|
@ -190,12 +315,13 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 输出物料 -->
|
<!-- 输出物料 -->
|
||||||
<el-card style="width: 100%" header="输出物料" shadow="never">
|
<el-card style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never">
|
||||||
<scTable
|
<scTable
|
||||||
ref="tableOut"
|
ref="tableOut"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
|
height="250px"
|
||||||
:params="paramsOut"
|
:params="paramsOut"
|
||||||
hidePagination
|
hidePagination
|
||||||
>
|
>
|
||||||
|
|
@ -342,7 +468,11 @@ export default {
|
||||||
process:{
|
process:{
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
}
|
},
|
||||||
|
dept:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
editDialog,
|
editDialog,
|
||||||
|
|
@ -358,6 +488,7 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
//表单数据
|
//表单数据
|
||||||
form: {},
|
form: {},
|
||||||
|
muserForm:{},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
|
|
@ -367,6 +498,7 @@ export default {
|
||||||
},
|
},
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
apiObjWm:null,
|
apiObjWm:null,
|
||||||
|
apiObjMuser:null,
|
||||||
paramsWm: {
|
paramsWm: {
|
||||||
page: 0,
|
page: 0,
|
||||||
search:'',
|
search:'',
|
||||||
|
|
@ -383,6 +515,9 @@ export default {
|
||||||
mlog: "",
|
mlog: "",
|
||||||
material_out__isnull: 0,
|
material_out__isnull: 0,
|
||||||
},
|
},
|
||||||
|
paramsMuser:{
|
||||||
|
mlog:""
|
||||||
|
},
|
||||||
tracking:10,
|
tracking:10,
|
||||||
mlogb:"",
|
mlogb:"",
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
|
|
@ -394,6 +529,7 @@ export default {
|
||||||
fileList:[],
|
fileList:[],
|
||||||
tableDataWm:[],
|
tableDataWm:[],
|
||||||
oinfo_json:[],
|
oinfo_json:[],
|
||||||
|
processOptions:[],
|
||||||
test_file:'',
|
test_file:'',
|
||||||
deptId: "",
|
deptId: "",
|
||||||
visible: false,
|
visible: false,
|
||||||
|
|
@ -401,19 +537,17 @@ export default {
|
||||||
options: [],
|
options: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
tableData2:[],
|
tableData2:[],
|
||||||
|
shiftOtions:[],
|
||||||
defectOptions:[],
|
defectOptions:[],
|
||||||
isSingle:true,
|
isSingle:true,
|
||||||
saveInDialog: false,
|
saveInDialog: false,
|
||||||
printVisible:false,
|
printVisible:false,
|
||||||
|
saveMuserDialog:false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
rules: {
|
rules: {
|
||||||
count_use: [
|
count_use: [{required: true,message: "请输入领取数量",trigger: "blur"}],
|
||||||
{
|
process:[{required: true,message: "请选择工序",trigger: "blur"}],
|
||||||
required: true,
|
shift:[{required: true,message: "请选择班次",trigger: "blur"}],
|
||||||
message: "请输入领取数量",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
route_file:null,
|
route_file:null,
|
||||||
handle_date:'',
|
handle_date:'',
|
||||||
|
|
@ -445,6 +579,8 @@ export default {
|
||||||
that.tableData = res;
|
that.tableData = res;
|
||||||
})
|
})
|
||||||
that.getMlogItem();
|
that.getMlogItem();
|
||||||
|
that.getPreocess();
|
||||||
|
that.getShift();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
|
|
@ -483,7 +619,22 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getPreocess(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.process.list.req({page:0,parent:that.process}).then((res) => {
|
||||||
|
that.processOptions = res;
|
||||||
|
if(res.length>0){
|
||||||
|
that.paramsMuser.mlog = that.mlogId;
|
||||||
|
that.apiObjMuser = that.$API.wpm.mloguser.list;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getShift(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||||
|
that.shiftOtions = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
|
@ -582,6 +733,36 @@ export default {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
table_muser_add(){
|
||||||
|
let that = this;
|
||||||
|
let userInfo = that.$TOOL.data.get("USER_INFO");
|
||||||
|
that.muserForm.mlog = that.mlogItem.id;
|
||||||
|
that.muserForm.handle_user = userInfo.id;
|
||||||
|
that.muserForm.handle_user_name = userInfo.name;
|
||||||
|
that.muserForm.handle_date = this.$TOOL.dateFormat2(new Date());
|
||||||
|
that.saveMuserDialog = true;
|
||||||
|
},
|
||||||
|
saveMuserSubmit (){
|
||||||
|
let that = this;
|
||||||
|
that.isSaveing = true;
|
||||||
|
that.$API.wpm.mloguser.create.req(that.muserForm).then((res) => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
that.visible = false;
|
||||||
|
that.$message.success("操作成功");
|
||||||
|
that.$refs.tableMuser.refresh();
|
||||||
|
}).catch(() => {
|
||||||
|
that.isSaveing = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
table_muser_del(row){
|
||||||
|
let that = this;
|
||||||
|
that.$confirm("确定删除吗?").then(res=>{
|
||||||
|
that.$API.wpm.mloguser.delete.req(row.id).then((res) => {
|
||||||
|
that.$message.success("删除成功");
|
||||||
|
that.$refs.tableMuser.refresh();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSaveSuccess() {
|
handleSaveSuccess() {
|
||||||
this.$refs.tableIn.refresh();
|
this.$refs.tableIn.refresh();
|
||||||
this.$refs.tableOut.refresh();
|
this.$refs.tableOut.refresh();
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@
|
||||||
:mlogId="mlogId"
|
:mlogId="mlogId"
|
||||||
:process="processId"
|
:process="processId"
|
||||||
:mtask="mtask"
|
:mtask="mtask"
|
||||||
|
:dept = "deptId"
|
||||||
@closed="detailClose"
|
@closed="detailClose"
|
||||||
>
|
>
|
||||||
</detail-drawer>
|
</detail-drawer>
|
||||||
|
|
@ -245,7 +246,6 @@ export default {
|
||||||
that.processCate = res.process_cate;
|
that.processCate = res.process_cate;
|
||||||
that.params.mgroup = res.id;
|
that.params.mgroup = res.id;
|
||||||
that.apiObj = that.$API.wpm.mlog.list;
|
that.apiObj = that.$API.wpm.mlog.list;
|
||||||
// that.$refs.table.refresh();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getRemaTime(row){
|
getRemaTime(row){
|
||||||
|
|
@ -253,12 +253,8 @@ export default {
|
||||||
let times = 0;
|
let times = 0;
|
||||||
let nowTime = new Date().getTime();
|
let nowTime = new Date().getTime();
|
||||||
let startTiem = new Date(row.work_start_time).getTime();
|
let startTiem = new Date(row.work_start_time).getTime();
|
||||||
console.log('nowTime',nowTime)
|
|
||||||
console.log('startTiem',startTiem)
|
|
||||||
let remaTime = nowTime - startTiem;
|
let remaTime = nowTime - startTiem;
|
||||||
console.log('remaTime',remaTime)
|
|
||||||
let temp = Math.floor(remaTime/1000*60);
|
let temp = Math.floor(remaTime/1000*60);
|
||||||
console.log('temp',temp)
|
|
||||||
if(remaTime>0&&row.reminder_interval_list[0]){
|
if(remaTime>0&&row.reminder_interval_list[0]){
|
||||||
if(temp<row.reminder_interval_list[0]){
|
if(temp<row.reminder_interval_list[0]){
|
||||||
times = row.reminder_interval_list[0]-temp;
|
times = row.reminder_interval_list[0]-temp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue