Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
721030420a
|
@ -31,12 +31,18 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'mlog.update'">
|
||||
<el-button link type="primary" :disabled="scope.row.submit_user != null"
|
||||
@click="table_edit(scope.row)" v-auth="'mlog.update'">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link type="success" @click="table_submit(scope.row)" v-auth="'mlog.submit'">
|
||||
<el-button link type="success" v-if="scope.row.submit_user == null"
|
||||
@click="table_submit(scope.row)" v-auth="'mlog.submit'">
|
||||
提交
|
||||
</el-button>
|
||||
<el-button link type="warning" v-else @click="table_revert(scope.row)"
|
||||
v-auth="'mlog.submit'">
|
||||
撤回
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'">
|
||||
删除
|
||||
</el-button>
|
||||
|
@ -202,8 +208,9 @@
|
|||
<el-button type="primary" @click="submitHandover">提交</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mgroup="currentMgroup.id" :mgroupShiftRule="currentMgroup.shift_rule"
|
||||
:activeType="activeName" @success="handleSaveSuccess" @closed="dialogSave = false">
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog" :belongdept="currentMgroup.belong_dept" :mgroup="currentMgroup.id"
|
||||
:mgroupShiftRule="currentMgroup.shift_rule" :activeType="activeName" @success="handleSaveSuccess"
|
||||
@closed="dialogSave = false">
|
||||
</save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -257,6 +264,20 @@ export default {
|
|||
tomio() {
|
||||
this.$router.push({ name: "halfgood_mio" });
|
||||
},
|
||||
table_submit(row) {
|
||||
this.$API.wpm.mlog.submit.req(row.id).then(res => {
|
||||
this.$message.success("提交成功");
|
||||
this.$refs.table.refresh();
|
||||
this.$refs.table_wm.refresh();
|
||||
})
|
||||
},
|
||||
table_revert(row) {
|
||||
this.$API.wpm.mlog.revert.req(row.id).then(res => {
|
||||
this.$message.success("撤回成功");
|
||||
this.$refs.table.refresh();
|
||||
this.$refs.table_wm.refresh();
|
||||
}).catch(e => { })
|
||||
},
|
||||
async table_del(row) {
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
|
|
|
@ -129,9 +129,14 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="批次号" prop="material_in">
|
||||
<el-select v-model="form.batch" placeholder="批次号" filterable clearable allow-create style="width: 100%">
|
||||
<el-option v-for="item in wMaterialOptions" :key="item.batch" :label="item.batch"
|
||||
:value="item.batch"></el-option>
|
||||
<el-select v-model="form.batch" placeholder="批次号" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in wMaterialOptions" :key="item.batch" :label="item.batch" :value="item.batch">
|
||||
<div style="display:flex;justify-content:space-between">
|
||||
<span>{{ item.batch }}</span>
|
||||
<span style="color:#aaaaaa">{{ item.count }}</span>
|
||||
</div>
|
||||
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -577,7 +582,8 @@ export default {
|
|||
material_out: { type: String, default: "" },
|
||||
material_model: { type: String, default: "" },
|
||||
brothersList: { type: Array, default: () => [] },
|
||||
mtaskDate: { type: String, default: "" }
|
||||
mtaskDate: { type: String, default: "" },
|
||||
belongdept: { type: String, default: "" }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -654,7 +660,9 @@ export default {
|
|||
} else {
|
||||
batchDate = dateNow;
|
||||
}
|
||||
this.form.batch = this.material_model + '-' + batchDate;
|
||||
if (this.activeType == "10车间" || this.activeType == "7车间") {
|
||||
this.form.batch = this.material_model + '-' + batchDate;
|
||||
}
|
||||
this.getMaterial();
|
||||
this.getUserList();
|
||||
this.getEquipment();
|
||||
|
@ -670,10 +678,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
routeChange(item) {
|
||||
this.form.material_out = item.material_out;
|
||||
this.form.material_out = item.material_out;
|
||||
this.form.material_in = item.material_in
|
||||
this.form.mgroup = item.mgroup
|
||||
this.form.mgroup = item.mgroup;
|
||||
this.getWorkShopMaterial();
|
||||
},
|
||||
getRouteOptions() {
|
||||
|
@ -797,7 +804,7 @@ export default {
|
|||
let that = this;
|
||||
if (this.form.material_in) {
|
||||
this.$API.wpm.wmaterial.list
|
||||
.req({ material: this.form.material_in, page: 0, count__gte: 1 })
|
||||
.req({ material: this.form.material_in, page: 0, count__gte: 1, belong_dept: that.belongdept })
|
||||
.then((res) => {
|
||||
that.wMaterialOptions = res;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue