Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
17dd67d1b4
|
@ -3,11 +3,13 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'equipment.create'">新增</el-button>
|
||||
<el-select v-model="query.belong_dept" placeholder="所在车间" clearable style="margin-left: 2px;">
|
||||
<el-select v-model="query.belong_dept" placeholder="所在车间" clearable style="margin-left: 2px;"
|
||||
@change="handleQuery">
|
||||
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
<el-select v-model="query.state" placeholder="设备状态" clearable style="margin-left: 2px;">
|
||||
<el-option v-for="item in stateOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
<el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value"
|
||||
@change="handleQuery"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
@ -16,7 +18,7 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="paramsEquipment">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="设备名称" prop="name" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
@ -81,7 +83,7 @@
|
|||
</el-container>
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"></save-dialog>
|
||||
<el-drawer title="检定记录" v-model="visibleRecord" :size="1000" destroy-on-close @closed="visibleRecord = false">
|
||||
<el-drawer title="巡检记录" v-model="visibleRecord" :size="1000" destroy-on-close @closed="visibleRecord = false">
|
||||
<el-container v-loading="loading">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="record_create" v-auth="'equipment'"
|
||||
style="position: absolute;z-index: 10;left: 110px;top: 16px;">新增</el-button>
|
||||
|
@ -182,6 +184,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import saveDialog from "./equipment_form.vue";
|
||||
import { genTree } from "@/utils/verificate";
|
||||
export default {
|
||||
name: "rparty",
|
||||
components: {
|
||||
|
@ -189,15 +192,13 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
deptOptions: [],
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
apiObj: this.$API.em.equipment.list,
|
||||
query: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
type: 10
|
||||
},
|
||||
paramsEquipment:{type: 10},
|
||||
query: {},
|
||||
apiObj2: this.$API.em.einspect.list,
|
||||
query2: {
|
||||
equipment: ''
|
||||
|
@ -235,15 +236,12 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUserList();
|
||||
this.getDept()
|
||||
},
|
||||
methods: {
|
||||
//获取员工
|
||||
getUserList() {
|
||||
let that = this;
|
||||
this.$API.system.user.list.req({ page_size: 20, page: 1 }).then(res => {
|
||||
that.userList = res.results;
|
||||
});
|
||||
async getDept() {
|
||||
let res = await this.$API.system.dept.list.req({ page: 0, type: "dept" });
|
||||
this.deptOptions = genTree(res);
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.inspect_user = data.id;
|
||||
|
@ -283,7 +281,7 @@ export default {
|
|||
record_create() {
|
||||
this.visible = true;
|
||||
},
|
||||
//提交检验
|
||||
//提交巡检记录
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
link
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'employee.update'"
|
||||
@click="table_edit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
|
|
|
@ -153,16 +153,17 @@ import memberDialog from "./team_form.vue";
|
|||
this.isSaveing = true;
|
||||
let res;
|
||||
if(this.type==='add'){
|
||||
res = this.$API.mtm.team.create.req(that.form);
|
||||
}else{
|
||||
res = this.$API.mtm.team.update.req(that.form.id,that.form);
|
||||
}
|
||||
if(res.err_msg){
|
||||
this.$message.error(res.err_msg);
|
||||
}else{
|
||||
this.$API.mtm.team.create.req(that.form).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.limitedVisible = false;
|
||||
this.$refs.table.refresh();
|
||||
}).catch(e=>{this.isSaveing = false;})
|
||||
}else{
|
||||
this.$API.mtm.team.update.req(that.form.id,that.form).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.limitedVisible = false;
|
||||
this.$refs.table.refresh();
|
||||
}).catch(e=>{this.isSaveing = false;})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
<el-select v-model="selectMaterial" value-key="id" clearable style="width: 100%;"
|
||||
@change="selectMaterialChange">
|
||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.number" :value="item">
|
||||
<span style="float: left">{{ item.number }}</span>
|
||||
<span style=" float: right; color: var(--el-text-color-secondary);font-size: 13px;">{{ item.name }}</span>
|
||||
<span style="float: left">{{ item.full_name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="utaskCreate"
|
||||
v-auth="'utask.create'">新增任务</el-button>
|
||||
<el-button type="primary" @click="utaskDepuse" v-loading="isLoading"
|
||||
v-auth="'utask.schedue'">任务分解</el-button>
|
||||
v-auth="'utask.schedule'">任务分解</el-button>
|
||||
<el-button type="primary" @click="utaskAssgin" v-loading="isLoading"
|
||||
v-auth="'utask.assgin'">任务下达</el-button>
|
||||
</div>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<el-option
|
||||
v-for="item in equipmentOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
|
|
|
@ -255,9 +255,15 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
||||
:material_out="material_out" :material_in="material_in" :activeType="activeName" @success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"></save-dialog>
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog"
|
||||
:mtask="currentMtask.id"
|
||||
:mgroup="mgroup"
|
||||
:material_out="material_out"
|
||||
:material_in="material_in"
|
||||
:activeType="activeName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false">
|
||||
</save-dialog>
|
||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||
</showDrawer>
|
||||
</el-container>
|
||||
|
|
|
@ -155,6 +155,7 @@
|
|||
<save-dialog v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mgroup="currentMgroup.id"
|
||||
:mgroupShiftRule = "currentMgroup.shift_rule"
|
||||
:activeType="activeName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false">
|
||||
|
|
|
@ -202,6 +202,7 @@
|
|||
<save-dialog v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mgroup="currentMgroup.id"
|
||||
:mgroupShiftRule = "currentMgroup.shift_rule"
|
||||
:activeType="activeName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false">
|
||||
|
|
|
@ -468,21 +468,11 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="批次号">
|
||||
<el-select
|
||||
<el-input
|
||||
v-model="form.batch"
|
||||
tyle="width:100%"
|
||||
placeholder="批次号"
|
||||
clearable
|
||||
filterable
|
||||
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>
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
|
@ -513,7 +503,7 @@
|
|||
<el-option
|
||||
v-for="item in equipmentOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
@ -589,7 +579,7 @@
|
|||
<el-option
|
||||
v-for="item in equipmentOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
@ -874,21 +864,11 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="批次号">
|
||||
<el-select
|
||||
<el-input
|
||||
v-model="form.batch"
|
||||
tyle="width:100%"
|
||||
placeholder="批次号"
|
||||
clearable
|
||||
filterable
|
||||
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>
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -1068,6 +1048,7 @@
|
|||
export default {
|
||||
emits: ["success", "closed"],
|
||||
props: {
|
||||
mgroupShiftRule:{ type: String, default: "" },
|
||||
mgroup:{ type: String, default: "" },
|
||||
mtask: { type: String, default: "" },
|
||||
mgroupId: { type: String, default: "" },
|
||||
|
@ -1186,20 +1167,15 @@ export default {
|
|||
})
|
||||
},
|
||||
getShiftOptions() {
|
||||
this.$API.mtm.shift.list.req({ page: 0}).then((res) => {
|
||||
this.shiftOptions = [];
|
||||
if(this.activeType == "10车间"){
|
||||
res.forEach(item=>{
|
||||
if(item.rule=='三倒'){
|
||||
this.shiftOptions.push(item);
|
||||
let req_dict = {page: 0}
|
||||
if(this.mgroupShiftRule != null && this.mgroupShiftRule != undefined){
|
||||
req_dict.rule = this.mgroupShiftRule
|
||||
}
|
||||
})
|
||||
this.$API.mtm.shift.list.req(req_dict).then((res) => {
|
||||
if(res.length==1){
|
||||
this.form.shift = res[0].id
|
||||
}else{
|
||||
res.forEach(item=>{
|
||||
if(item.rule=='长白班'){
|
||||
this.form.shift = item.id;
|
||||
}
|
||||
})
|
||||
this.shiftOptions = res
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue