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>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料" prop="material" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_"> {{ scope.row.material_.name }}</span>
|
||||
<template #default="scope">{{ scope.row.material_name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batch">
|
||||
|
@ -45,15 +44,15 @@
|
|||
<el-table-column label="操作" fixed="right" align="center" width="100px">
|
||||
<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="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-link type="primary" @click="check_Show(scope.row)" v-else>
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="check_Show(scope.row)" v-else>
|
||||
查看
|
||||
</el-link>
|
||||
<el-link type="danger" @click="table_del(scope.row)" v-if="scope.row.test_date==null">
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="table_del(scope.row)" v-if="scope.row.test_date==null">
|
||||
删除
|
||||
</el-link>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
|
@ -1,75 +1,134 @@
|
|||
<template>
|
||||
<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-item label="物料">
|
||||
<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.full_name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号">
|
||||
<!-- <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-option
|
||||
v-for="item in wbatchOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库已有批次">
|
||||
<el-select v-model="selectBatch" 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: right;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
">{{ item.count }} -- {{ item.warehouse_name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库">
|
||||
<el-select v-model="form.warehouse" 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-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input-number v-model="form.count" :min="1" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<div v-if="assembShow">
|
||||
<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-select v-model="item.batch" clearable style="width: 100%;">
|
||||
<el-option v-for="itemx in item.batchOptions" :key="itemx.id" :label="itemx.batch"
|
||||
:value="itemx.batch">
|
||||
<span style="float: left">{{ itemx.batch }}</span>
|
||||
<span style="
|
||||
float: right;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
">{{ itemx.count }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<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-item label="物料">
|
||||
<el-select
|
||||
v-model="selectMaterial"
|
||||
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>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号">
|
||||
<!-- <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-option
|
||||
v-for="item in wbatchOptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库已有批次">
|
||||
<el-select
|
||||
v-model="selectBatch"
|
||||
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: right;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
"
|
||||
>{{ item.count }} -- {{ item.warehouse_name }}</span
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库">
|
||||
<el-select
|
||||
v-model="form.warehouse"
|
||||
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-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input-number v-model="form.count" :min="1" style="width: 100%" />
|
||||
</el-form-item>
|
||||
<div v-if="assembShow">
|
||||
<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-select v-model="item.batch" clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="itemx in item.batchOptions"
|
||||
:key="itemx.id"
|
||||
:label="itemx.batch"
|
||||
:value="itemx.batch"
|
||||
>
|
||||
<span style="float: left">{{ itemx.batch }}</span>
|
||||
<span
|
||||
style="
|
||||
float: right;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 13px;
|
||||
"
|
||||
>{{ itemx.count }}</span
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">
|
||||
保存
|
||||
</el-button>
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultForm = {
|
||||
|
@ -132,10 +191,21 @@ export default {
|
|||
},
|
||||
//获取车间物料批次号
|
||||
getBatchs(){
|
||||
let that = this;
|
||||
this.$API.wpm.wmaterial.batchs.req({belong_dept_name:this.belongDeptName}).then(res=>{
|
||||
that.wbatchOptions = res;
|
||||
});
|
||||
let wbatchs = []
|
||||
if(this.belongDeptName !=null && this.belongDeptName != undefined && this.belongDeptName != ''){
|
||||
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() {
|
||||
var type = this.form.type;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<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 class="right-panel">
|
||||
<el-input v-model="query.search" placeholder="计划编号" clearable style="margin-right: 5px;"></el-input>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<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 class="right-panel">
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<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 class="right-panel">
|
||||
<el-input
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<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 class="right-panel">
|
||||
<el-input v-model="query.search" placeholder="名称" clearable style="margin-right: 5px;"></el-input>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}-{{ scope.row.material_out_.model }}</span>
|
||||
}}|{{ scope.row.material_out_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}-{{ scope.row.material_out_.model }}</span>
|
||||
}}|{{ scope.row.material_out_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}</span>
|
||||
}}|{{ scope.row.material_out_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划量" prop="count"> </el-table-column>
|
||||
|
|
Loading…
Reference in New Issue