ui
This commit is contained in:
@@ -2,23 +2,23 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-24 18:20:26
|
||||
* @LastEditTime: 2023-11-28 14:09:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
:wrapper-closable="true"
|
||||
class="drawer"
|
||||
size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ '预使用主原料信息' }}
|
||||
{{ '工单名称:' + dataForm.name }}
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div style="height: 10vh">
|
||||
<!-- <div style="height: 10vh">
|
||||
<div style="font-size: 18px;">工单名:{{ dataForm.name }}</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="attr-list">
|
||||
<small-title
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;">
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
@@ -55,9 +55,9 @@
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<!-- <div class="drawer-body__footer">
|
||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<attr-add
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="产品名称" prop="planProductId">
|
||||
<el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" @change="selectProduct">
|
||||
<el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" filterable @change="selectProduct">
|
||||
<el-option
|
||||
v-for="item in productList"
|
||||
:key="item.id"
|
||||
@@ -175,6 +175,7 @@ export default {
|
||||
planQuantity: 0,
|
||||
processFlowId: '',
|
||||
materialMethod: 1,
|
||||
triggerOrigin: 1,
|
||||
priority: '',
|
||||
productLineIds: [],
|
||||
type: '',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:width="'35%'"
|
||||
:width="'50%'"
|
||||
:append-to-body="true"
|
||||
:close-on-click-modal="false"
|
||||
class="dialog">
|
||||
@@ -17,73 +17,92 @@
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
label-width="80px"
|
||||
@keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item label="原料" prop="material">
|
||||
<el-select
|
||||
v-model="dataForm.material"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择原料">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas('material')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="origin">
|
||||
<el-select
|
||||
v-model="dataForm.origin"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择来源">
|
||||
<el-option
|
||||
v-for="dict in originList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select
|
||||
v-model="dataForm.supplierId"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择供应商">
|
||||
<el-option
|
||||
v-for="dict in supplierList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batch">
|
||||
<el-input
|
||||
v-model="dataForm.batch"
|
||||
clearable
|
||||
placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input-number
|
||||
v-model="dataForm.num"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select
|
||||
v-model="dataForm.unit"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择单位">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas('unit_dict')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原料" prop="material">
|
||||
<el-select
|
||||
v-model="dataForm.material"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择原料">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas('material')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来源" prop="origin">
|
||||
<el-select
|
||||
v-model="dataForm.origin"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择来源">
|
||||
<el-option
|
||||
v-for="dict in originList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select
|
||||
v-model="dataForm.supplierId"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择供应商">
|
||||
<el-option
|
||||
v-for="dict in supplierList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次号" prop="batch">
|
||||
<el-input
|
||||
v-model="dataForm.batch"
|
||||
clearable
|
||||
placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input-number
|
||||
v-model="dataForm.num"
|
||||
clearable
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-select
|
||||
v-model="dataForm.unit"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择单位">
|
||||
<el-option
|
||||
v-for="dict in getDictDatas('unit_dict')"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="300"
|
||||
:width="350"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -57,7 +57,8 @@ import {
|
||||
getCoreWOPage,
|
||||
deleteCoreWO,
|
||||
statusChange,
|
||||
getConOrderList
|
||||
getConOrderList,
|
||||
getCoreWOList
|
||||
} from '@/api/base/coreWorkOrder';
|
||||
|
||||
|
||||
@@ -66,19 +67,26 @@ const tableProps = [
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
'show-overflow-tooltip': true
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'name',
|
||||
label: '工单名称'
|
||||
label: '工单名称',
|
||||
minWidth: 120,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '工单编码'
|
||||
label: '工单编码',
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'workers',
|
||||
label: '负责人'
|
||||
label: '负责人',
|
||||
minWidth: 100,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'priority',
|
||||
@@ -88,7 +96,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'triggerOrigin',
|
||||
label: '来源',
|
||||
filter: (val) => ['', 'MES', 'ERP'][val]
|
||||
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
@@ -98,15 +106,19 @@ const tableProps = [
|
||||
{
|
||||
prop: 'planFinishTime',
|
||||
label: '计划完成时间',
|
||||
filter: parseTime
|
||||
filter: parseTime,
|
||||
minWidth: 150,
|
||||
showOverflowtooltip: true
|
||||
},
|
||||
{
|
||||
prop: 'planQuantity',
|
||||
label: '计划生产数量'
|
||||
label: '计划生产数量',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
prop: 'actualQuantity',
|
||||
label: '实际生产数量'
|
||||
label: '实际生产数量',
|
||||
minWidth: 120,
|
||||
}
|
||||
];
|
||||
|
||||
@@ -251,6 +263,16 @@ export default {
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工单名称',
|
||||
// placeholder: '工单名称',
|
||||
// param: 'name',
|
||||
// defaultSelect: '',
|
||||
// selectOptions: [],
|
||||
// allowCreate: true,
|
||||
// filterable: true
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: '工单名称',
|
||||
@@ -308,9 +330,20 @@ export default {
|
||||
this.listQuery.name = this.$route.query.workOrderName;
|
||||
this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
|
||||
}
|
||||
// this.getWorkOrder()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
getWorkOrder() {
|
||||
getCoreWOList().then(res => {
|
||||
this.formConfig[0].selectOptions = res.data.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.name
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
refreshWorkOrder(val) {
|
||||
console.log(val)
|
||||
if (val) {
|
||||
|
||||
Reference in New Issue
Block a user