guize
This commit is contained in:
parent
f63bb65a9e
commit
4e0d5f4f2e
|
|
@ -189,7 +189,7 @@ export const asyncRoutes = [
|
||||||
path: 'need/:id',
|
path: 'need/:id',
|
||||||
name: 'need',
|
name: 'need',
|
||||||
component: () => import('@/views/wpm/need'),
|
component: () => import('@/views/wpm/need'),
|
||||||
meta: { title: '检测项目', icon: 'example', perms: ['index_manage'] }
|
meta: { title: '半成品检验', icon: 'example', perms: ['index_manage'] }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增设备</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="设备名称/设备编号/备注"
|
placeholder="设备名称/设备编号/备注"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增设备</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增设备</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="设备名称/设备编号/备注"
|
placeholder="设备名称/设备编号/备注"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增设备</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增校准或检定</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="设备名称/设备编号/备注"
|
placeholder="设备名称/设备编号/备注"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增校准或检定</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增出入库记录</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="仓库名称/仓库编号"
|
placeholder="仓库名称/仓库编号"
|
||||||
|
|
@ -26,11 +29,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增出入库记录</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="fifoList.results"
|
:data="fifoList.results"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增仓库</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="仓库名称/仓库编号"
|
placeholder="仓库名称/仓库编号"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增仓库</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增物料</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="物料名称/物料编号/物料类型"
|
placeholder="物料名称/物料编号/物料类型"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增物料</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span style="font-size: 16px;
|
<span style="font-size: 16px; font-weight: 700"
|
||||||
font-weight: 700;
|
>物料检验记录表</span
|
||||||
">物料检验记录表</span>
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
:data="recordformList.results"
|
:data="recordformList.results"
|
||||||
border
|
border
|
||||||
|
|
@ -26,24 +26,24 @@
|
||||||
<el-table-column label="表名称">
|
<el-table-column label="表名称">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column align="center" label="操作">
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
@click="handleLook(scope)"
|
@click="handleLook(scope)"
|
||||||
>查看</el-link>
|
>查看</el-link
|
||||||
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
@click="handleEdit(scope)"
|
@click="handleEdit(scope)"
|
||||||
>编辑</el-link>
|
>编辑</el-link
|
||||||
|
>
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_delete'])"
|
v-if="checkPermission(['material_delete'])"
|
||||||
type="danger"
|
type="danger"
|
||||||
@click="handleDelete(scope)"
|
@click="handleDelete(scope)"
|
||||||
>删除</el-link>
|
>删除</el-link
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -57,39 +57,59 @@
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="表格名称" prop="name">
|
<el-form-item label="表格名称" prop="name">
|
||||||
<el-input v-model="recordform.name" placeholder="表格名称" />
|
<el-input v-model="recordform.name" placeholder="表格名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible = false"
|
||||||
<el-button type="primary" @click="recordformconfirm('Forms')">确认</el-button>
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="recordformconfirm('Forms')"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:model="tableForm"
|
:model="tableForm"
|
||||||
:visible.sync="dialogVisibleForm"
|
:visible.sync="dialogVisibleForm"
|
||||||
:title="tableForm.name">
|
:title="tableForm.name"
|
||||||
<el-form
|
>
|
||||||
label-width="80px"
|
<el-form label-width="80px" label-position="right">
|
||||||
label-position="right"
|
<el-row
|
||||||
|
v-for="(item, $index) in fieldList.results"
|
||||||
|
:key="$index"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
v-if="item.field_type === 'string'"
|
||||||
|
:label="item.field_name"
|
||||||
>
|
>
|
||||||
<el-row v-for="(item,$index) in fieldList.results" :key="$index">
|
|
||||||
<el-form-item v-if="item.field_type==='string'" :label="item.field_name" >
|
|
||||||
<el-input placeholder="请输入" v-model="item.sort" />
|
<el-input placeholder="请输入" v-model="item.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='int'" :label="item.field_name">
|
<el-form-item
|
||||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
v-else-if="item.field_type === 'int'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='float'" :label="item.field_name">
|
<el-form-item
|
||||||
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
|
v-else-if="item.field_type === 'float'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='date'" :label="item.field_name">
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'date'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.create_time"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
@ -99,7 +119,10 @@
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='datetime'" :label="item.field_name">
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'datetime'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="item.create_time"
|
v-model="item.create_time"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
|
|
@ -109,23 +132,40 @@
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='select'" :label="item.field_name">
|
<el-form-item
|
||||||
<el-select style="width: 100%" v-model="item.sort" placeholder="请选择">
|
v-else-if="item.field_type === 'select'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.sort"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1"
|
||||||
:label="item1"
|
:label="item1"
|
||||||
:value="item1">
|
:value="item1"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else-if="item.field_type==='selects'" :label="item.field_name">
|
<el-form-item
|
||||||
<el-select style="width: 100%" v-model="optio" multiple placeholder="请选择">
|
v-else-if="item.field_type === 'selects'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="optio"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item1 in item.field_choice"
|
v-for="item1 in item.field_choice"
|
||||||
:key="item1"
|
:key="item1"
|
||||||
:label="item1"
|
:label="item1"
|
||||||
:value="item1">
|
:value="item1"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -141,14 +181,15 @@
|
||||||
<el-col :span="18">
|
<el-col :span="18">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span style="font-size: 16px;
|
<span style="font-size: 16px; font-weight: 700">记录字段</span>
|
||||||
font-weight: 700;
|
|
||||||
">记录字段</span>
|
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handlefieldCreate"
|
<el-button
|
||||||
>新增</el-button>
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="handlefieldCreate"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
<el-table
|
<el-table
|
||||||
|
|
||||||
:data="fieldList.results"
|
:data="fieldList.results"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
|
|
@ -156,33 +197,44 @@
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{ bottomOffset: 50 }"
|
v-el-height-adaptive-table="{ bottomOffset: 50 }"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="字段名称">
|
<el-table-column label="字段名称">
|
||||||
<template slot-scope="scope">{{ scope.row.field_name }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.field_name
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="字段类型">
|
<el-table-column label="字段类型">
|
||||||
<template slot-scope="scope">{{ options_[scope.row.field_type] }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
options_[scope.row.field_type]
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="字段标识">
|
<el-table-column label="字段标识">
|
||||||
<template slot-scope="scope">{{ scope.row.field_key }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.field_key
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上限值">
|
<el-table-column label="上限值">
|
||||||
<template slot-scope="scope">{{ scope.row.high_limit }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.high_limit
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上限规则">
|
<el-table-column label="上限规则">
|
||||||
<template slot-scope="scope">{{ highoptionss_[scope.row.high_rule] }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
highoptionss_[scope.row.high_rule]
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下限值">
|
<el-table-column label="下限值">
|
||||||
<template slot-scope="scope">{{ scope.row.low_limit }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.low_limit
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下限规则">
|
<el-table-column label="下限规则">
|
||||||
<template slot-scope="scope"> {{ lowoptionss_[scope.row.low_rule] }}</template>
|
<template slot-scope="scope">
|
||||||
|
{{ lowoptionss_[scope.row.low_rule] }}</template
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="是否判定">
|
<el-table-column label="是否判定">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -191,15 +243,8 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['material_update'])"
|
v-if="checkPermission(['material_update'])"
|
||||||
@click="handlefieldEdit(scope)"
|
@click="handlefieldEdit(scope)"
|
||||||
|
|
@ -213,77 +258,172 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-dialog :visible.sync="dialogVisible1" :title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'">
|
<el-dialog
|
||||||
<el-form ref="Form" :model="field" label-width="100px" label-position="right">
|
:visible.sync="dialogVisible1"
|
||||||
|
:title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="field"
|
||||||
|
label-width="100px"
|
||||||
|
label-position="right"
|
||||||
|
>
|
||||||
<el-form-item label="字段类型" prop="field_type">
|
<el-form-item label="字段类型" prop="field_type">
|
||||||
<el-select style="width: 100%" v-model="field.field_type" placeholder="请选择">
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="field.field_type"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fieldtypeoptions"
|
v-for="item in fieldtypeoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段标识" prop="field_key">
|
<el-form-item label="字段标识" prop="field_key">
|
||||||
<el-input v-model="field.field_key" placeholder="字段标识" onkeyup="value=value.replace(/[^A-Za-z_\/]/ig,'')"/>
|
<el-input
|
||||||
|
v-model="field.field_key"
|
||||||
|
placeholder="字段标识"
|
||||||
|
onkeyup="value=value.replace(/[^A-Za-z_\/]/ig,'')"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段名称" prop="field_name">
|
<el-form-item label="字段名称" prop="field_name">
|
||||||
<el-input v-model="field.field_name" placeholder="字段名称" />
|
<el-input v-model="field.field_name" placeholder="字段名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选项" v-show="field.field_type=='radio'||field.field_type=='checkbox'||field.field_type=='select'||field.field_type=='selects'">
|
<el-form-item
|
||||||
<el-button @click.prevent="addDomain" style="border: none;">
|
label="选项"
|
||||||
|
v-show="
|
||||||
|
field.field_type == 'radio' ||
|
||||||
|
field.field_type == 'checkbox' ||
|
||||||
|
field.field_type == 'select' ||
|
||||||
|
field.field_type == 'selects'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-button @click.prevent="addDomain" style="border: none">
|
||||||
<i class="el-icon-circle-plus-outline"></i>
|
<i class="el-icon-circle-plus-outline"></i>
|
||||||
<span style="font-size:14px;">添加</span>
|
<span style="font-size: 14px">添加</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-row v-for="(domain, $index) in field_choice" :key=domain+$index style="margin-bottom: 10px">
|
<el-row
|
||||||
|
v-for="(domain, $index) in field_choice"
|
||||||
|
:key="domain + $index"
|
||||||
|
style="margin-bottom: 10px"
|
||||||
|
>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-input v-model="field_choice[$index]" auto-complete="off"></el-input>
|
<el-input
|
||||||
|
v-model="field_choice[$index]"
|
||||||
|
auto-complete="off"
|
||||||
|
></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center" v-if="$index!==0">
|
<el-col
|
||||||
<i class="el-icon-remove-outline" @click.prevent="removeDomain($index,'1')" style="color: red;font-size: 16px;"></i>
|
:span="3"
|
||||||
|
style="text-align: center"
|
||||||
|
v-if="$index !== 0"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="el-icon-remove-outline"
|
||||||
|
@click.prevent="removeDomain($index, '1')"
|
||||||
|
style="color: red; font-size: 16px"
|
||||||
|
></i>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否需要判定" prop="need_judge">
|
<el-form-item label="是否需要判定" prop="need_judge">
|
||||||
<el-switch v-model="field.need_judge"></el-switch>
|
<el-switch v-model="field.need_judge"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!--
|
||||||
<el-form-item label="上限值" v-if="field.need_judge==true" prop="high_limit">
|
<el-form-item
|
||||||
<el-input-number v-model="field.high_limit" :precision="2" :min="0"></el-input-number>
|
label="上限值"
|
||||||
|
v-if="field.need_judge == true"
|
||||||
|
prop="high_limit"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="field.high_limit"
|
||||||
|
:precision="2"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上限规则" v-if="field.need_judge==true" prop="high_rule">
|
<el-form-item
|
||||||
<el-select style="width: 100%" v-model="field.high_rule" placeholder="请选择">
|
label="上限规则"
|
||||||
|
v-if="field.need_judge == true"
|
||||||
|
prop="high_rule"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="field.high_rule"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in highoptions"
|
v-for="item in highoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="下限值" v-if="field.need_judge==true" prop="low_limit">
|
<el-form-item
|
||||||
<el-input-number v-model="field.low_limit" :precision="2" :min="0"></el-input-number>
|
label="下限值"
|
||||||
|
v-if="field.need_judge == true"
|
||||||
|
prop="low_limit"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="field.low_limit"
|
||||||
|
:precision="2"
|
||||||
|
:min="0"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="下限规则" v-if="field.need_judge==true" prop="low_rule">
|
<el-form-item
|
||||||
<el-select style="width: 100%" v-model="field.low_rule" placeholder="请选择">
|
label="下限规则"
|
||||||
|
v-if="field.need_judge == true"
|
||||||
|
prop="low_rule"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="field.low_rule"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in lowoptions"
|
v-for="item in lowoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
!-->
|
||||||
|
|
||||||
|
<el-form-item label="表达式" v-if="field.need_judge == true">
|
||||||
|
<vue-json-editor
|
||||||
|
:mode="'code'"
|
||||||
|
lange="zh"
|
||||||
|
v-model="field.rule_expression"
|
||||||
|
>
|
||||||
|
|
||||||
|
</vue-json-editor>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number v-model="field.sort" :min="1" placeholder="排序"></el-input-number>
|
<el-input-number
|
||||||
|
v-model="field.sort"
|
||||||
|
:min="1"
|
||||||
|
placeholder="排序"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisible1 = false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible1 = false"
|
||||||
<el-button type="primary" @click="fieldconfirm('Form')">确认</el-button>
|
>取消</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" @click="fieldconfirm('Form')"
|
||||||
|
>确认</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -294,13 +434,20 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getEquipmentAll } from "@/api/equipment";
|
import { getEquipmentAll } from "@/api/equipment";
|
||||||
|
import vueJsonEditor from "vue-json-editor";
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
import {getrecordformList,createrecordform,updaterecordform,deleterecordform,getrffieldList,createrffield,updaterffield,
|
import {
|
||||||
deleterffield} from "@/api/mtm";
|
getrecordformList,
|
||||||
import vueJsonEditor from 'vue-json-editor'
|
createrecordform,
|
||||||
|
updaterecordform,
|
||||||
|
deleterecordform,
|
||||||
|
getrffieldList,
|
||||||
|
createrffield,
|
||||||
|
updaterffield,
|
||||||
|
deleterffield,
|
||||||
|
} from "@/api/mtm";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultstep = {
|
const defaultstep = {
|
||||||
|
|
@ -308,12 +455,8 @@
|
||||||
number: "",
|
number: "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaultrecordform = {
|
const defaultrecordform = {};
|
||||||
|
const defaultfield = {};
|
||||||
};
|
|
||||||
const defaultfield = {
|
|
||||||
|
|
||||||
};
|
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination, vueJsonEditor },
|
components: { Pagination, vueJsonEditor },
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -329,13 +472,13 @@
|
||||||
dialogVisibleForm: false,
|
dialogVisibleForm: false,
|
||||||
dialogTypes: "new",
|
dialogTypes: "new",
|
||||||
field: {
|
field: {
|
||||||
field_type:'',
|
field_type: "",
|
||||||
field_key:'',
|
field_key: "",
|
||||||
field_name:'',
|
field_name: "",
|
||||||
sort:'',
|
sort: "",
|
||||||
field_choice: [""],
|
field_choice: [""],
|
||||||
},
|
},
|
||||||
field_choice:[''],
|
field_choice: [""],
|
||||||
options: [],
|
options: [],
|
||||||
optio: [],
|
optio: [],
|
||||||
rule1: {
|
rule1: {
|
||||||
|
|
@ -348,7 +491,7 @@
|
||||||
dialogType1: "new",
|
dialogType1: "new",
|
||||||
dialogVisible1: false,
|
dialogVisible1: false,
|
||||||
tableForm: {
|
tableForm: {
|
||||||
name:'',
|
name: "",
|
||||||
},
|
},
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
@ -364,66 +507,71 @@
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
highoptions:[{ value: 1,
|
highoptions: [
|
||||||
label: '<'},{ value: 2,
|
{ value: 1, label: "<" },
|
||||||
label: '<='}],
|
{ value: 2, label: "<=" },
|
||||||
lowoptions:[{ value: 1,
|
],
|
||||||
label: '>'},{ value: 2,
|
lowoptions: [
|
||||||
label: '>='}],
|
{ value: 1, label: ">" },
|
||||||
|
{ value: 2, label: ">=" },
|
||||||
|
],
|
||||||
highoptionss_: {
|
highoptionss_: {
|
||||||
1: '<',
|
1: "<",
|
||||||
2: '<='
|
2: "<=",
|
||||||
},
|
},
|
||||||
lowoptionss_: {
|
lowoptionss_: {
|
||||||
1: '>',
|
1: ">",
|
||||||
2: '>='
|
2: ">=",
|
||||||
},
|
},
|
||||||
options_: {
|
options_: {
|
||||||
'string':'文本',
|
string: "文本",
|
||||||
'int':'整数',
|
int: "整数",
|
||||||
'float':'小数',
|
float: "小数",
|
||||||
'date': '日期',
|
date: "日期",
|
||||||
'datetime': '日期时间',
|
datetime: "日期时间",
|
||||||
'select': '单选',
|
select: "单选",
|
||||||
'selects': '多选',
|
selects: "多选",
|
||||||
},
|
},
|
||||||
fieldtypeoptions: [{
|
fieldtypeoptions: [
|
||||||
value: 'string',
|
{
|
||||||
label: '文本'
|
value: "string",
|
||||||
|
label: "文本",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'int',
|
value: "int",
|
||||||
label: '整数'
|
label: "整数",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'float',
|
value: "float",
|
||||||
label: '小数'
|
label: "小数",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'date',
|
value: "date",
|
||||||
label: '日期'
|
label: "日期",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'time',
|
value: "time",
|
||||||
label: '时间'
|
label: "时间",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'datetime',
|
value: "datetime",
|
||||||
label: '日期时间'
|
label: "日期时间",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'select',
|
value: "select",
|
||||||
label: '单选'
|
label: "单选",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'selects',
|
value: "selects",
|
||||||
label: '多选'
|
label: "多选",
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
typeoptions: [{
|
typeoptions: [
|
||||||
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '生产记录'
|
label: "生产记录",
|
||||||
}],
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|
@ -431,16 +579,15 @@
|
||||||
created() {
|
created() {
|
||||||
this.material = this.$route.params.id;
|
this.material = this.$route.params.id;
|
||||||
this.recordformLists();
|
this.recordformLists();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//添加字段选项
|
//添加字段选项
|
||||||
addDomain() {
|
addDomain() {
|
||||||
this.field_choice.push('')
|
this.field_choice.push("");
|
||||||
},
|
},
|
||||||
//删除字段选项
|
//删除字段选项
|
||||||
removeDomain(index) {
|
removeDomain(index) {
|
||||||
this.field_choice.splice(index, 1)
|
this.field_choice.splice(index, 1);
|
||||||
},
|
},
|
||||||
handleLook(scope) {
|
handleLook(scope) {
|
||||||
debugger;
|
debugger;
|
||||||
|
|
@ -452,33 +599,25 @@
|
||||||
},
|
},
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleCurrentChange(row) {
|
handleCurrentChange(row) {
|
||||||
this.formID = row.id;
|
this.formID = row.id;
|
||||||
this.fieldLists();
|
this.fieldLists();
|
||||||
|
|
||||||
},
|
},
|
||||||
recordformLists()
|
recordformLists() {
|
||||||
{
|
|
||||||
this.listQueryrecordform.material = this.material;
|
this.listQueryrecordform.material = this.material;
|
||||||
this.listQueryrecordform.type = 2;
|
this.listQueryrecordform.type = 2;
|
||||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.recordformList = response.data;
|
this.recordformList = response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fieldLists()
|
fieldLists() {
|
||||||
{
|
this.listQueryfield.form = this.formID;
|
||||||
this.listQueryfield.form=this.formID
|
|
||||||
getrffieldList(this.listQueryfield).then((response) => {
|
getrffieldList(this.listQueryfield).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.fieldList = response.data;
|
this.fieldList = response.data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//新增记录表
|
//新增记录表
|
||||||
|
|
@ -492,8 +631,7 @@
|
||||||
},
|
},
|
||||||
//新增字段
|
//新增字段
|
||||||
handlefieldCreate() {
|
handlefieldCreate() {
|
||||||
|
this.field_choice = [""];
|
||||||
this.field_choice = [''];
|
|
||||||
this.field = Object.assign({}, defaultfield);
|
this.field = Object.assign({}, defaultfield);
|
||||||
this.dialogType1 = "new";
|
this.dialogType1 = "new";
|
||||||
this.dialogVisible1 = true;
|
this.dialogVisible1 = true;
|
||||||
|
|
@ -526,7 +664,7 @@
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await deleterecordform(scope.row.id);
|
await deleterecordform(scope.row.id);
|
||||||
this.recordformLists()
|
this.recordformLists();
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -541,7 +679,7 @@
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await deleterffield(scope.row.id);
|
await deleterffield(scope.row.id);
|
||||||
this.fieldLists()
|
this.fieldLists();
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -555,19 +693,21 @@
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
this.recordform.material = this.material;
|
this.recordform.material = this.material;
|
||||||
this.recordform.type = 2;
|
this.recordform.type = 2;
|
||||||
updaterecordform(this.recordform.id, this.recordform).then((res) => {
|
updaterecordform(this.recordform.id, this.recordform).then(
|
||||||
|
(res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.recordformLists()
|
this.recordformLists();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
this.recordform.material = this.material;
|
this.recordform.material = this.material;
|
||||||
this.recordform.type = 2;
|
this.recordform.type = 2;
|
||||||
createrecordform(this.recordform).then((res) => {
|
createrecordform(this.recordform).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.recordformLists()
|
this.recordformLists();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
|
|
@ -587,7 +727,7 @@
|
||||||
this.field.field_choice = this.field_choice;
|
this.field.field_choice = this.field_choice;
|
||||||
updaterffield(this.field.id, this.field).then((res) => {
|
updaterffield(this.field.id, this.field).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.fieldLists()
|
this.fieldLists();
|
||||||
this.dialogVisible1 = false;
|
this.dialogVisible1 = false;
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
|
|
@ -597,7 +737,7 @@
|
||||||
this.field.field_choice = this.field_choice;
|
this.field.field_choice = this.field_choice;
|
||||||
createrffield(this.field).then((res) => {
|
createrffield(this.field).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.fieldLists()
|
this.fieldLists();
|
||||||
this.dialogVisible1 = false;
|
this.dialogVisible1 = false;
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
|
|
@ -613,10 +753,10 @@
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.my-label {
|
.my-label {
|
||||||
background: #E1F3D8;
|
background: #e1f3d8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.my-content {
|
.my-content {
|
||||||
background: #FDE2E2;
|
background: #fde2e2;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,9 @@ export default {
|
||||||
},
|
},
|
||||||
handleclick(scope){
|
handleclick(scope){
|
||||||
this.orderID = scope.row.id;
|
this.orderID = scope.row.id;
|
||||||
|
this.countsx = scope.row.count;
|
||||||
|
this.planed_count = scope.row.planed_count;
|
||||||
|
this.delivery_date = scope.row.delivery_date;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["Form"].clearValidate();
|
this.$refs["Form"].clearValidate();
|
||||||
|
|
@ -284,8 +286,17 @@ export default {
|
||||||
async confirm(form) {
|
async confirm(form) {
|
||||||
|
|
||||||
this.orderplan.start_date = this.value1[0];
|
this.orderplan.start_date = this.value1[0];
|
||||||
|
|
||||||
|
if( this.delivery_date>=this.value1[1])
|
||||||
|
{
|
||||||
this.orderplan.end_date = this.value1[1];
|
this.orderplan.end_date = this.value1[1];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.$message.error("计划完成时间超过订单交付日期,请从新选择日期!");
|
||||||
|
}
|
||||||
|
|
||||||
this.orderplan.order = this.orderID
|
this.orderplan.order = this.orderID
|
||||||
|
if( this.orderplan.count<=(this.countsx-this.planed_count)){
|
||||||
createProductionplan(this.orderplan).then((res) => {
|
createProductionplan(this.orderplan).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getorderList();
|
this.getorderList();
|
||||||
|
|
@ -294,6 +305,12 @@ export default {
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.$message.error("排产数超过所需数,请合理排产!");
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleWork(scope)
|
handleWork(scope)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
height="320"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
@ -130,7 +131,7 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
height="300"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
@ -151,8 +152,8 @@
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="orderList.count > 0"
|
v-show="equipmentTable.count > 0"
|
||||||
:total="orderList.count"
|
:total="equipmentTable.count"
|
||||||
:page.sync="listQuery.page"
|
:page.sync="listQuery.page"
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getorderList"
|
@pagination="getorderList"
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增合同</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="客户名称"
|
placeholder="客户名称"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增合同</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增客户</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="客户名称"
|
placeholder="客户名称"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增客户</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增订单</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="订单名称"
|
placeholder="订单名称"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增订单</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div>
|
<div>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
|
>新增客户</el-button
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="listQuery.search"
|
v-model="listQuery.search"
|
||||||
placeholder="客户名称"
|
placeholder="客户名称"
|
||||||
|
|
@ -24,11 +27,7 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增客户</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
|
|
|
||||||
|
|
@ -24,16 +24,12 @@
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 2px">
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
|
||||||
>新增项目</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="testitemList.results"
|
:data="wproductList.results"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
|
|
@ -41,44 +37,28 @@
|
||||||
max-height="600"
|
max-height="600"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="项目名称">
|
<el-table-column label="半成品名称">
|
||||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
<template slot-scope="scope">{{ scope.row.m_state_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="条款号">
|
<el-table-column label="半成品编号">
|
||||||
<template slot-scope="scope">{{ scope.row.term_number }}</template>
|
<template slot-scope="scope">{{ scope.row.m_state_.number }}</template>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="标准名称">
|
|
||||||
<template slot-scope="scope">{{ scope.row.standard_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="标准编号">
|
|
||||||
<template slot-scope="scope">{{
|
|
||||||
scope.row.standard_.number
|
|
||||||
}}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="创建时间">
|
|
||||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handleEdit(scope)"
|
@click="handleInspection(scope)"
|
||||||
>编辑</el-link
|
>检验</el-link
|
||||||
>
|
|
||||||
<el-link
|
|
||||||
v-if="checkPermission(['warehouse_delete'])"
|
|
||||||
type="danger"
|
|
||||||
@click="handleDelete(scope)"
|
|
||||||
>删除</el-link
|
|
||||||
>
|
>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="testitemList.count > 0"
|
v-show="wproductList.count > 0"
|
||||||
:total="testitemList.count"
|
:total="wproductList.count"
|
||||||
:page.sync="listQuery.page"
|
:page.sync="listQuery.page"
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
|
|
@ -126,12 +106,8 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getTestitemList,
|
getwproductList,
|
||||||
createTestitem,
|
} from "@/api/wpm";
|
||||||
updateTestitem,
|
|
||||||
deleteTestitem,
|
|
||||||
getStandardList,
|
|
||||||
} from "@/api/qm";
|
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
|
|
@ -142,7 +118,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
testitem: defaultetestitem,
|
testitem: defaultetestitem,
|
||||||
testitemList: {
|
wproductList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
|
@ -167,12 +143,13 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
//列表
|
//半成品列表
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
getTestitemList(this.listQuery).then((response) => {
|
this.listQuery.act_state=2
|
||||||
|
getwproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.testitemList = response.data;
|
this.wproductList = response.data;
|
||||||
}
|
}
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -641,18 +641,9 @@ export default {
|
||||||
|
|
||||||
//确认领料
|
//确认领料
|
||||||
handlePick() {
|
handlePick() {
|
||||||
let _this = this;
|
|
||||||
_this.picks = []; //所需物料
|
|
||||||
this.$refs.multipleTable.selection.forEach((item) => {
|
|
||||||
_this.picks.push({
|
|
||||||
warehouse:item.warehouse,
|
|
||||||
material: item.material,
|
|
||||||
batch: item.batch,
|
|
||||||
pick_count: item.pick_count,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.pickData.subproduction_plan = this.id;
|
this.pickData.subproduction_plan = this.id;
|
||||||
this.pickData.picks = this.picks;
|
this.pickData.picks = this.havewl;
|
||||||
|
|
||||||
// console.log(this.pickData);
|
// console.log(this.pickData);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue