Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
0ecd78bf40
|
@ -28,8 +28,7 @@
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" hidePagination hideDo>
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" hidePagination hideDo>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="物料" prop="material" show-overflow-tooltip>
|
<el-table-column label="物料" prop="material" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">{{ scope.row.material_name }}
|
||||||
<span v-if="scope.row.material_"> {{ scope.row.material_.name }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="批次号" prop="batch">
|
<el-table-column label="批次号" prop="batch">
|
||||||
|
@ -45,15 +44,15 @@
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100px">
|
<el-table-column label="操作" fixed="right" align="center" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <el-link type="primary" @click="table_check(scope.row)" v-if="mioObj.state==20&&mioObj.type=='do_in'"> -->
|
<!-- <el-link type="primary" @click="table_check(scope.row)" v-if="mioObj.state==20&&mioObj.type=='do_in'"> -->
|
||||||
<el-link type="primary" @click="table_check(scope.row)" v-if="scope.row.test_date==null" v-auth="'mioitem.test'">
|
<el-button link type="primary" @click="table_check(scope.row)" v-if="scope.row.test_date==null" v-auth="'mioitem.test'">
|
||||||
检验
|
检验
|
||||||
</el-link>
|
</el-button>
|
||||||
<el-link type="primary" @click="check_Show(scope.row)" v-else>
|
<el-button link type="primary" @click="check_Show(scope.row)" v-else>
|
||||||
查看
|
查看
|
||||||
</el-link>
|
</el-button>
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.test_date==null">
|
<el-button link type="danger" @click="table_del(scope.row)" v-if="scope.row.test_date==null">
|
||||||
删除
|
删除
|
||||||
</el-link>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
|
@ -1,62 +1,121 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :title="titleMap[form.type]" v-model="visible" :size="1000" destroy-on-close @closed="$emit('closed')">
|
<el-dialog
|
||||||
|
:title="titleMap[form.type]"
|
||||||
|
v-model="visible"
|
||||||
|
:size="1000"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="$emit('closed')"
|
||||||
|
>
|
||||||
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="dialogForm" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="物料">
|
<el-form-item label="物料">
|
||||||
<el-select v-model="selectMaterial" value-key="id" clearable style="width: 100%;"
|
<el-select
|
||||||
@change="selectMaterialChange">
|
v-model="selectMaterial"
|
||||||
<el-option v-for="item in materialOptions" :key="item.id" :label="item.number" :value="item">
|
value-key="id"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="selectMaterialChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.full_name"
|
||||||
|
:value="item"
|
||||||
|
>
|
||||||
<span style="float: left">{{ item.full_name }}</span>
|
<span style="float: left">{{ item.full_name }}</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批次号">
|
<el-form-item label="批次号">
|
||||||
<!-- <el-input v-model="form.batch" placeholder="手动输入批次号" :disabled="inputBatchDisable" /> -->
|
<!-- <el-input v-model="form.batch" placeholder="手动输入批次号" :disabled="inputBatchDisable" /> -->
|
||||||
<el-select v-model="form.batch" value-key="id" filterable allow-create clearable style="width: 100%;" :disabled="inputBatchDisable">
|
<el-select
|
||||||
|
v-model="form.batch"
|
||||||
|
value-key="id"
|
||||||
|
filterable
|
||||||
|
allow-create
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="inputBatchDisable"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in wbatchOptions"
|
v-for="item in wbatchOptions"
|
||||||
:key="item"
|
:key="item"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="item">
|
:value="item"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="仓库已有批次">
|
<el-form-item label="仓库已有批次">
|
||||||
<el-select v-model="selectBatch" value-key="id" clearable style="width: 100%;" @change="selectBatchChange"
|
<el-select
|
||||||
@clear="selectBatchClear" :disabled="selectBatchDisable">
|
v-model="selectBatch"
|
||||||
<el-option v-for="item in batchOptions" :key="item.id" :label="item.batch" :value="item">
|
value-key="id"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
@change="selectBatchChange"
|
||||||
|
@clear="selectBatchClear"
|
||||||
|
:disabled="selectBatchDisable"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in batchOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item"
|
||||||
|
>
|
||||||
<span style="float: left">{{ item.batch }}</span>
|
<span style="float: left">{{ item.batch }}</span>
|
||||||
<span style="
|
<span
|
||||||
|
style="
|
||||||
float: right;
|
float: right;
|
||||||
color: var(--el-text-color-secondary);
|
color: var(--el-text-color-secondary);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
">{{ item.count }} -- {{ item.warehouse_name }}</span>
|
"
|
||||||
|
>{{ item.count }} -- {{ item.warehouse_name }}</span
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="仓库">
|
<el-form-item label="仓库">
|
||||||
<el-select v-model="form.warehouse" clearable style="width: 100%;" :disabled="warehouseDisable">
|
<el-select
|
||||||
<el-option v-for="item in warehouseOptions" :key="item.id" :label="item.name"
|
v-model="form.warehouse"
|
||||||
:value="item.id"></el-option>
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
:disabled="warehouseDisable"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in warehouseOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数量">
|
<el-form-item label="数量">
|
||||||
<el-input-number v-model="form.count" :min="1" style="width: 100%;" />
|
<el-input-number v-model="form.count" :min="1" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="assembShow">
|
<div v-if="assembShow">
|
||||||
<el-row v-for="item in components" v-bind:key="item" style="margin-bottom:8px">
|
<el-row
|
||||||
|
v-for="item in components"
|
||||||
|
v-bind:key="item"
|
||||||
|
style="margin-bottom: 8px"
|
||||||
|
>
|
||||||
|
<el-col :span="12"> {{ item.number }} - {{ item.name }} </el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
{{ item.number }} - {{ item.name }}
|
<el-select v-model="item.batch" clearable style="width: 100%">
|
||||||
</el-col>
|
<el-option
|
||||||
<el-col :span="12">
|
v-for="itemx in item.batchOptions"
|
||||||
<el-select v-model="item.batch" clearable style="width: 100%;">
|
:key="itemx.id"
|
||||||
<el-option v-for="itemx in item.batchOptions" :key="itemx.id" :label="itemx.batch"
|
:label="itemx.batch"
|
||||||
:value="itemx.batch">
|
:value="itemx.batch"
|
||||||
|
>
|
||||||
<span style="float: left">{{ itemx.batch }}</span>
|
<span style="float: left">{{ itemx.batch }}</span>
|
||||||
<span style="
|
<span
|
||||||
|
style="
|
||||||
float: right;
|
float: right;
|
||||||
color: var(--el-text-color-secondary);
|
color: var(--el-text-color-secondary);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
">{{ itemx.count }}</span>
|
"
|
||||||
|
>{{ itemx.count }}</span
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -132,10 +191,21 @@ export default {
|
||||||
},
|
},
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getBatchs(){
|
getBatchs(){
|
||||||
let that = this;
|
let wbatchs = []
|
||||||
this.$API.wpm.wmaterial.batchs.req({belong_dept_name:this.belongDeptName}).then(res=>{
|
if(this.belongDeptName !=null && this.belongDeptName != undefined && this.belongDeptName != ''){
|
||||||
that.wbatchOptions = res;
|
this.$API.wpm.wmaterial.list.req({
|
||||||
|
"belong_dept__name": this.belongDeptName,
|
||||||
|
"count__gte": 1,
|
||||||
|
"page": 0
|
||||||
|
}).then(res=>{
|
||||||
|
res.forEach(item => {
|
||||||
|
if (!wbatchs.includes(item.batch)) {
|
||||||
|
wbatchs.push(item.batch);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
this.wbatchOptions = wbatchs
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getMaterialOptions() {
|
getMaterialOptions() {
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'pu_plan.create'">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input v-model="query.search" placeholder="计划编号" clearable style="margin-right: 5px;"></el-input>
|
<el-input v-model="query.search" placeholder="计划编号" clearable style="margin-right: 5px;"></el-input>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'supplier.create'">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'customer.create'">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'order.delete'">新增</el-button>
|
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'order.create'">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-input v-model="query.search" placeholder="名称" clearable style="margin-right: 5px;"></el-input>
|
<el-input v-model="query.search" placeholder="名称" clearable style="margin-right: 5px;"></el-input>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_out_">{{
|
<span v-if="scope.row.material_out_">{{
|
||||||
scope.row.material_out_.specification
|
scope.row.material_out_.specification
|
||||||
}}-{{ scope.row.material_out_.model }}</span>
|
}}|{{ scope.row.material_out_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_out_">{{
|
<span v-if="scope.row.material_out_">{{
|
||||||
scope.row.material_out_.specification
|
scope.row.material_out_.specification
|
||||||
}}-{{ scope.row.material_out_.model }}</span>
|
}}|{{ scope.row.material_out_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||||
|
|
|
@ -225,7 +225,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.material_out_">{{
|
<span v-if="scope.row.material_out_">{{
|
||||||
scope.row.material_out_.specification
|
scope.row.material_out_.specification
|
||||||
}}</span>
|
}}|{{ scope.row.material_out_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划量" prop="count"> </el-table-column>
|
<el-table-column label="计划量" prop="count"> </el-table-column>
|
||||||
|
|
Loading…
Reference in New Issue