Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
8566b8a6be
|
|
@ -134,10 +134,20 @@
|
|||
highlightCurrentRow
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="名称"
|
||||
prop="mpoint_nickname"
|
||||
>
|
||||
<el-table-column label="名称">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="
|
||||
scope.row.mpoint_nickname !=
|
||||
null
|
||||
"
|
||||
>
|
||||
{{ scope.row.mpoint_nickname }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row.mpoint_name }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组时间">
|
||||
<template #default="scope">
|
||||
|
|
@ -173,38 +183,56 @@
|
|||
</el-table-column>
|
||||
</scTable>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="!mpFormVal">
|
||||
<el-col :md="12" :sm="24" :key="updateKey">
|
||||
<el-form
|
||||
:key="updateKey"
|
||||
ref="mpointForm"
|
||||
:model="mpForm"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
label-width="150px"
|
||||
label-position="right"
|
||||
v-if="form.mgroup_name == '石灰石破碎'"
|
||||
v-if="mpointOptions.length > 0"
|
||||
>
|
||||
<template
|
||||
v-for="item in mpointOptions"
|
||||
:key="item.id"
|
||||
>
|
||||
<!-- 石灰石破碎 -->
|
||||
<el-form-item :label="item.name">
|
||||
<el-input-number
|
||||
v-model="mpForm.val"
|
||||
controls-position="right"
|
||||
placeholder="请输入"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item
|
||||
:label="item.name"
|
||||
required="1"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="item.mpFormVal"
|
||||
controls-position="right"
|
||||
placeholder="请输入"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
:disabled="
|
||||
item.mpFormValAble
|
||||
"
|
||||
@click="submit5(item)"
|
||||
style="float: right"
|
||||
>保存</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-form>
|
||||
<el-footer style="text-align: center">
|
||||
<!-- <el-footer style="text-align: center">
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="isSaveing"
|
||||
@click="submit5"
|
||||
>保存</el-button
|
||||
>
|
||||
</el-footer>
|
||||
</el-footer> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
|
|
@ -717,15 +745,11 @@ export default {
|
|||
visible: false,
|
||||
hideDelete: true,
|
||||
isSaveing: false,
|
||||
mpFormVal: false,
|
||||
activeName: "first",
|
||||
stlogTitle: "新增异常",
|
||||
clickItem: {},
|
||||
sflogItem: {},
|
||||
form: {},
|
||||
mpForm: {
|
||||
val: null,
|
||||
},
|
||||
thirdForm: {
|
||||
num: "",
|
||||
},
|
||||
|
|
@ -770,6 +794,7 @@ export default {
|
|||
apiObj: null,
|
||||
apiObjStlog: null,
|
||||
heightTable: null,
|
||||
updateKey: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -781,10 +806,7 @@ export default {
|
|||
this.apiObjStlog = this.$API.wpm.stlog.list;
|
||||
let form = this.$TOOL.data.get("sflogItem");
|
||||
this.form = JSON.parse(form);
|
||||
if (this.form.mgroup_name == "石灰石破碎") {
|
||||
this.getMpoint();
|
||||
this.getMpointStat();
|
||||
}
|
||||
this.getMpoint();
|
||||
this.getTeam();
|
||||
this.getStlog();
|
||||
let height = document.getElementById("elMain").clientHeight;
|
||||
|
|
@ -820,7 +842,14 @@ export default {
|
|||
form.enabled = 1;
|
||||
form.mgroup = that.mgroupId;
|
||||
that.$API.enm.mpoint.list.req(form).then((res) => {
|
||||
that.mpointOptions = res;
|
||||
if (res.length > 0) {
|
||||
that.mpointOptions = [];
|
||||
res.forEach((item) => {
|
||||
item.mpFormVal = "";
|
||||
that.mpointOptions.push(item);
|
||||
});
|
||||
that.getMpointStat();
|
||||
}
|
||||
});
|
||||
},
|
||||
getMpointStat() {
|
||||
|
|
@ -830,22 +859,22 @@ export default {
|
|||
form.has_create_by = 1;
|
||||
form.mgroup = that.mgroupId;
|
||||
that.$API.enm.mpoint.stat.req(form).then((res) => {
|
||||
console.log("res", res);
|
||||
that.mpointStat = res.results;
|
||||
|
||||
// this.$refs.mpointStatTable.queryData(form);
|
||||
res.results.forEach((item) => {
|
||||
let month_s =
|
||||
item.month_s > 9 ? item.month_s : "0" + item.month_s;
|
||||
let day_s = item.day_s > 9 ? item.day_s : "0" + item.day_s;
|
||||
let work_date = item.year_s + "-" + month_s + "-" + day_s;
|
||||
// debugger;
|
||||
// console.log("work_date", work_date);
|
||||
// console.log("that.form.work_date", that.form.work_date);
|
||||
if (work_date == that.form.work_date) {
|
||||
that.mpForm.val = item.val;
|
||||
this.mpFormVal = true;
|
||||
}
|
||||
that.mpointOptions.forEach((item2) => {
|
||||
if (item2.name == item.mpoint_name) {
|
||||
item2.mpFormValAble = true;
|
||||
item2.mpFormVal = item.val;
|
||||
}
|
||||
});
|
||||
console.log(that.mpointOptions);
|
||||
that.updateKey = !that.updateKey;
|
||||
// that.$set(that.mpointOptions,"that.mpointOptions","新的值");
|
||||
that.$forceUpdate();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
@ -857,10 +886,9 @@ export default {
|
|||
that.$API.enm.mpoint.statDelete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
that.$message.success("删除成功");
|
||||
that.mpFormVal = false;
|
||||
that.getMpointStat();
|
||||
that.$refs.mpointStatTable.refresh();
|
||||
that.$message.success("删除成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.success(err);
|
||||
|
|
@ -1067,20 +1095,21 @@ export default {
|
|||
this.visible = true;
|
||||
this.sflogExpVisiable = false;
|
||||
},
|
||||
submit5() {
|
||||
//测点录入提交
|
||||
submit5(item) {
|
||||
let that = this;
|
||||
that.isSaveing = true;
|
||||
let obj = {};
|
||||
obj.val = that.mpForm.val;
|
||||
obj.val = item.mpFormVal;
|
||||
obj.sflog = that.form.id;
|
||||
obj.mgroup = that.mgroupId;
|
||||
obj.mpoint = that.mpointOptions[0].id;
|
||||
obj.mpoint = item.id;
|
||||
that.$API.enm.mpoint.statCreate
|
||||
.req(obj)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$message.success("操作成功");
|
||||
that.mpFormVal = true;
|
||||
that.$message.success("保存成功");
|
||||
that.getMpointStat();
|
||||
that.$refs.mpointStatTable.refresh();
|
||||
})
|
||||
.catch((res) => {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
<el-descriptions-item label="批次号">{{
|
||||
workObj.batch
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="物料">{{
|
||||
workObj.material_name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="总数">{{
|
||||
workObj.count
|
||||
}}</el-descriptions-item>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@
|
|||
<el-table-column label="批次" prop="batch" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count"></el-table-column>
|
||||
<el-table-column label="类型" prop="type">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.type == 10">交送</el-tag>
|
||||
<el-tag v-if="scope.row.type == 20" type="success"
|
||||
>接收</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="交送人"
|
||||
prop="send_user_name"
|
||||
|
|
@ -127,6 +135,10 @@
|
|||
>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
v-if="
|
||||
scope.row.send_mgroup == mgroupId &&
|
||||
scope.row.submit_time == null
|
||||
"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
|
|
@ -216,7 +228,7 @@ export default {
|
|||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: that.mgroupName })
|
||||
.then((res) => {
|
||||
if(res.length != 1){
|
||||
if (res.length != 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
|
|
@ -281,7 +293,7 @@ export default {
|
|||
//删除
|
||||
async table_del(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.mtm.mgroup.delete.req(id);
|
||||
var res = await this.$API.wpm.handover.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -42,17 +42,16 @@
|
|||
<el-table-column
|
||||
label="物料名称"
|
||||
prop="material_name"
|
||||
min-width="100"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
min-width="100"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="所属部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
|
|
@ -62,14 +61,13 @@
|
|||
<el-table-column
|
||||
label="不合格标记"
|
||||
prop="notok_sign_name"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
min-width="150"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
|
|
@ -100,7 +98,7 @@
|
|||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
||||
|
|
@ -152,7 +150,7 @@ export default {
|
|||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: that.mgroupName })
|
||||
.then((res) => {
|
||||
if(res.length != 1){
|
||||
if (res.length != 1) {
|
||||
that.$message.error("获取工段错误");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,6 +135,35 @@
|
|||
hidePagination
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div style="padding-left: 50px">
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="划伤">{{
|
||||
props.row.count_n_hs
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="气泡">{{
|
||||
props.row.count_n_qp
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="水纹">{{
|
||||
props.row.count_n_swen
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="崩边">{{
|
||||
props.row.count_n_bb
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="雾面">{{
|
||||
props.row.count_n_wm
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="麻点">{{
|
||||
props.row.count_n_md
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="线痕">{{
|
||||
props.row.count_n_xh
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="产出物料"
|
||||
prop="material_out_name"
|
||||
|
|
@ -144,6 +173,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count_real">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数量" prop="count_notok">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -167,18 +198,6 @@
|
|||
>
|
||||
检验
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="check_reSet(scope.row)"
|
||||
:disabled="
|
||||
mlogItem.submit_time !== null &&
|
||||
scope.row.test_date !== null
|
||||
"
|
||||
>
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -242,6 +261,7 @@
|
|||
<edit-dialog
|
||||
v-if="dialog.edit"
|
||||
ref="editDialog"
|
||||
:dept="deptId"
|
||||
@success="handleEditSuccess"
|
||||
@closed="dialog.edit = false"
|
||||
>
|
||||
|
|
@ -293,6 +313,7 @@ export default {
|
|||
count_use: 0,
|
||||
count_break: 0,
|
||||
},
|
||||
deptId: "",
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
|
|
@ -332,7 +353,7 @@ export default {
|
|||
that.mlogItem = res;
|
||||
that.mgroup = res.mgroup;
|
||||
that.materialIn = res.material_in;
|
||||
that.belongDeptId = res.belong_dept;
|
||||
that.deptId = res.belong_dept;
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@
|
|||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:disabledDate="disabledDateFn"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -123,6 +124,7 @@
|
|||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 100%"
|
||||
:disabledDate="disabledDateFn"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -225,9 +227,10 @@ export default {
|
|||
computed: {
|
||||
title() {
|
||||
return this.titleMap[this.mode];
|
||||
}
|
||||
},
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
|
@ -290,9 +293,12 @@ export default {
|
|||
this.getEquipment();
|
||||
},
|
||||
methods: {
|
||||
disabledDateFn(time) {
|
||||
return time.getTime() > new Date().getTime();
|
||||
},
|
||||
//获取
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({depts: this.dept}).then((res) => {
|
||||
this.$API.system.user.list.req({ depts: this.dept }).then((res) => {
|
||||
this.userOptions = res.results;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue