fix:交接单删除接口修正,以及状态判断
This commit is contained in:
parent
dbec6f5396
commit
e6b945b152
|
|
@ -134,10 +134,20 @@
|
||||||
highlightCurrentRow
|
highlightCurrentRow
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column label="名称">
|
||||||
label="名称"
|
<template #default="scope">
|
||||||
prop="mpoint_nickname"
|
<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>
|
||||||
<el-table-column label="班组时间">
|
<el-table-column label="班组时间">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -173,38 +183,56 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="!mpFormVal">
|
<el-col :md="12" :sm="24" :key="updateKey">
|
||||||
<el-form
|
<el-form
|
||||||
|
:key="updateKey"
|
||||||
ref="mpointForm"
|
ref="mpointForm"
|
||||||
:model="mpForm"
|
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="120px"
|
label-width="150px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
v-if="form.mgroup_name == '石灰石破碎'"
|
v-if="mpointOptions.length > 0"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
v-for="item in mpointOptions"
|
v-for="item in mpointOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
>
|
>
|
||||||
<!-- 石灰石破碎 -->
|
<el-row>
|
||||||
<el-form-item :label="item.name">
|
<el-col :span="20">
|
||||||
<el-input-number
|
<el-form-item
|
||||||
v-model="mpForm.val"
|
:label="item.name"
|
||||||
controls-position="right"
|
required="1"
|
||||||
placeholder="请输入"
|
>
|
||||||
style="width: 100%"
|
<el-input-number
|
||||||
/>
|
v-model="item.mpFormVal"
|
||||||
</el-form-item>
|
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>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-footer style="text-align: center">
|
<!-- <el-footer style="text-align: center">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="isSaveing"
|
:loading="isSaveing"
|
||||||
@click="submit5"
|
@click="submit5"
|
||||||
>保存</el-button
|
>保存</el-button
|
||||||
>
|
>
|
||||||
</el-footer>
|
</el-footer> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
@ -717,15 +745,11 @@ export default {
|
||||||
visible: false,
|
visible: false,
|
||||||
hideDelete: true,
|
hideDelete: true,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
mpFormVal: false,
|
|
||||||
activeName: "first",
|
activeName: "first",
|
||||||
stlogTitle: "新增异常",
|
stlogTitle: "新增异常",
|
||||||
clickItem: {},
|
clickItem: {},
|
||||||
sflogItem: {},
|
sflogItem: {},
|
||||||
form: {},
|
form: {},
|
||||||
mpForm: {
|
|
||||||
val: null,
|
|
||||||
},
|
|
||||||
thirdForm: {
|
thirdForm: {
|
||||||
num: "",
|
num: "",
|
||||||
},
|
},
|
||||||
|
|
@ -770,6 +794,7 @@ export default {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
apiObjStlog: null,
|
apiObjStlog: null,
|
||||||
heightTable: null,
|
heightTable: null,
|
||||||
|
updateKey: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -781,10 +806,7 @@ export default {
|
||||||
this.apiObjStlog = this.$API.wpm.stlog.list;
|
this.apiObjStlog = this.$API.wpm.stlog.list;
|
||||||
let form = this.$TOOL.data.get("sflogItem");
|
let form = this.$TOOL.data.get("sflogItem");
|
||||||
this.form = JSON.parse(form);
|
this.form = JSON.parse(form);
|
||||||
if (this.form.mgroup_name == "石灰石破碎") {
|
this.getMpoint();
|
||||||
this.getMpoint();
|
|
||||||
this.getMpointStat();
|
|
||||||
}
|
|
||||||
this.getTeam();
|
this.getTeam();
|
||||||
this.getStlog();
|
this.getStlog();
|
||||||
let height = document.getElementById("elMain").clientHeight;
|
let height = document.getElementById("elMain").clientHeight;
|
||||||
|
|
@ -820,7 +842,14 @@ export default {
|
||||||
form.enabled = 1;
|
form.enabled = 1;
|
||||||
form.mgroup = that.mgroupId;
|
form.mgroup = that.mgroupId;
|
||||||
that.$API.enm.mpoint.list.req(form).then((res) => {
|
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() {
|
getMpointStat() {
|
||||||
|
|
@ -830,22 +859,22 @@ export default {
|
||||||
form.has_create_by = 1;
|
form.has_create_by = 1;
|
||||||
form.mgroup = that.mgroupId;
|
form.mgroup = that.mgroupId;
|
||||||
that.$API.enm.mpoint.stat.req(form).then((res) => {
|
that.$API.enm.mpoint.stat.req(form).then((res) => {
|
||||||
console.log("res", res);
|
|
||||||
that.mpointStat = res.results;
|
that.mpointStat = res.results;
|
||||||
|
|
||||||
// this.$refs.mpointStatTable.queryData(form);
|
|
||||||
res.results.forEach((item) => {
|
res.results.forEach((item) => {
|
||||||
let month_s =
|
let month_s =
|
||||||
item.month_s > 9 ? item.month_s : "0" + item.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 day_s = item.day_s > 9 ? item.day_s : "0" + item.day_s;
|
||||||
let work_date = item.year_s + "-" + month_s + "-" + day_s;
|
let work_date = item.year_s + "-" + month_s + "-" + day_s;
|
||||||
// debugger;
|
that.mpointOptions.forEach((item2) => {
|
||||||
// console.log("work_date", work_date);
|
if (item2.name == item.mpoint_name) {
|
||||||
// console.log("that.form.work_date", that.form.work_date);
|
item2.mpFormValAble = true;
|
||||||
if (work_date == that.form.work_date) {
|
item2.mpFormVal = item.val;
|
||||||
that.mpForm.val = item.val;
|
}
|
||||||
this.mpFormVal = true;
|
});
|
||||||
}
|
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
|
that.$API.enm.mpoint.statDelete
|
||||||
.req(row.id)
|
.req(row.id)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.$message.success("删除成功");
|
|
||||||
that.mpFormVal = false;
|
|
||||||
that.getMpointStat();
|
that.getMpointStat();
|
||||||
that.$refs.mpointStatTable.refresh();
|
that.$refs.mpointStatTable.refresh();
|
||||||
|
that.$message.success("删除成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.$message.success(err);
|
this.$message.success(err);
|
||||||
|
|
@ -1067,20 +1095,21 @@ export default {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.sflogExpVisiable = false;
|
this.sflogExpVisiable = false;
|
||||||
},
|
},
|
||||||
submit5() {
|
//测点录入提交
|
||||||
|
submit5(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.val = that.mpForm.val;
|
obj.val = item.mpFormVal;
|
||||||
obj.sflog = that.form.id;
|
obj.sflog = that.form.id;
|
||||||
obj.mgroup = that.mgroupId;
|
obj.mgroup = that.mgroupId;
|
||||||
obj.mpoint = that.mpointOptions[0].id;
|
obj.mpoint = item.id;
|
||||||
that.$API.enm.mpoint.statCreate
|
that.$API.enm.mpoint.statCreate
|
||||||
.req(obj)
|
.req(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.$message.success("操作成功");
|
that.$message.success("保存成功");
|
||||||
that.mpFormVal = true;
|
that.getMpointStat();
|
||||||
that.$refs.mpointStatTable.refresh();
|
that.$refs.mpointStatTable.refresh();
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,14 @@
|
||||||
<el-table-column label="批次" prop="batch" min-width="100">
|
<el-table-column label="批次" prop="batch" min-width="100">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count"></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
|
<el-table-column
|
||||||
label="交送人"
|
label="交送人"
|
||||||
prop="send_user_name"
|
prop="send_user_name"
|
||||||
|
|
@ -127,6 +135,10 @@
|
||||||
>
|
>
|
||||||
<el-popconfirm
|
<el-popconfirm
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
|
v-if="
|
||||||
|
scope.row.send_mgroup == mgroupId &&
|
||||||
|
scope.row.submit_time == null
|
||||||
|
"
|
||||||
@confirm="table_del(scope.row, scope.$index)"
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
|
@ -216,7 +228,7 @@ export default {
|
||||||
that.$API.mtm.mgroup.list
|
that.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: that.mgroupName })
|
.req({ page: 0, search: that.mgroupName })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if(res.length != 1){
|
if (res.length != 1) {
|
||||||
that.$message.error("获取工段错误");
|
that.$message.error("获取工段错误");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -281,7 +293,7 @@ export default {
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
var id = row.id;
|
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) {
|
if (res.err_msg) {
|
||||||
this.$message.error(res.err_msg);
|
this.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -42,17 +42,16 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
prop="material_name"
|
prop="material_name"
|
||||||
min-width="100"
|
min-width="120"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="批次号"
|
label="批次号"
|
||||||
prop="batch"
|
prop="batch"
|
||||||
min-width="100"
|
min-width="120"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="所属部门"
|
label="所属部门"
|
||||||
prop="belong_dept_name"
|
prop="belong_dept_name"
|
||||||
min-width="150"
|
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="数量"
|
label="数量"
|
||||||
|
|
@ -62,14 +61,13 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="不合格标记"
|
label="不合格标记"
|
||||||
prop="notok_sign_name"
|
prop="notok_sign_name"
|
||||||
min-width="80"
|
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
prop="create_time"
|
prop="create_time"
|
||||||
min-width="150"
|
width="150"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -100,7 +98,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
|
||||||
|
|
@ -152,7 +150,7 @@ export default {
|
||||||
that.$API.mtm.mgroup.list
|
that.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: that.mgroupName })
|
.req({ page: 0, search: that.mgroupName })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if(res.length != 1){
|
if (res.length != 1) {
|
||||||
that.$message.error("获取工段错误");
|
that.$message.error("获取工段错误");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue