This commit is contained in:
shilixia 2021-11-16 10:38:17 +08:00
parent f63bb65a9e
commit 4e0d5f4f2e
16 changed files with 643 additions and 527 deletions

View File

@ -189,7 +189,7 @@ export const asyncRoutes = [
path: 'need/:id',
name: 'need',
component: () => import('@/views/wpm/need'),
meta: { title: '检测项目', icon: 'example', perms: ['index_manage'] }
meta: { title: '半成品检验', icon: 'example', perms: ['index_manage'] }
}
]
},

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增校准或检定</el-button
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增校准或检定</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增出入库记录</el-button
>
<el-input
v-model="listQuery.search"
placeholder="仓库名称/仓库编号"
@ -26,11 +29,7 @@
</div>
</el-card>
<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
v-loading="listLoading"
:data="fifoList.results"

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增仓库</el-button
>
<el-input
v-model="listQuery.search"
placeholder="仓库名称/仓库编号"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增仓库</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增物料</el-button
>
<el-input
v-model="listQuery.search"
placeholder="物料名称/物料编号/物料类型"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增物料</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -1,17 +1,17 @@
<template>
<div class="app-container">
<el-card>
<el-row :gutter="24">
<el-col :span="6">
<el-card>
<div slot="header" class="clearfix">
<span style="font-size: 16px;
font-weight: 700;
">物料检验记录表</span>
<span style="font-size: 16px; font-weight: 700"
>物料检验记录表</span
>
</div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button>
>新增</el-button
>
<el-table
:data="recordformList.results"
border
@ -26,24 +26,24 @@
<el-table-column label="表名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
@click="handleLook(scope)"
>查看</el-link>
>查看</el-link
>
<el-link
v-if="checkPermission(['material_update'])"
@click="handleEdit(scope)"
>编辑</el-link>
>编辑</el-link
>
<el-link
v-if="checkPermission(['material_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
>删除</el-link
>
</template>
</el-table-column>
</el-table>
@ -57,39 +57,59 @@
label-width="80px"
label-position="right"
>
<el-form-item label="表格名称" prop="name">
<el-input v-model="recordform.name" placeholder="表格名称" />
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="recordformconfirm('Forms')">确认</el-button>
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
>
<el-button type="primary" @click="recordformconfirm('Forms')"
>确认</el-button
>
</div>
</el-dialog>
<el-dialog
:model="tableForm"
:visible.sync="dialogVisibleForm"
:title="tableForm.name">
<el-form
label-width="80px"
label-position="right"
:title="tableForm.name"
>
<el-form label-width="80px" 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-form-item>
<el-form-item v-else-if="item.field_type==='int'" :label="item.field_name">
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
<el-form-item
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 v-else-if="item.field_type==='float'" :label="item.field_name">
<el-input type="number" placeholder="请输入" v-model="item.sort"/>
<el-form-item
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 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
v-model="item.create_time"
type="date"
@ -99,7 +119,10 @@
>
</el-date-picker>
</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
v-model="item.create_time"
type="datetime"
@ -109,23 +132,40 @@
>
</el-date-picker>
</el-form-item>
<el-form-item v-else-if="item.field_type==='select'" :label="item.field_name">
<el-select style="width: 100%" v-model="item.sort" placeholder="请选择">
<el-form-item
v-else-if="item.field_type === 'select'"
:label="item.field_name"
>
<el-select
style="width: 100%"
v-model="item.sort"
placeholder="请选择"
>
<el-option
v-for="item1 in item.field_choice"
:key="item1"
:label="item1"
:value="item1">
:value="item1"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item v-else-if="item.field_type==='selects'" :label="item.field_name">
<el-select style="width: 100%" v-model="optio" multiple placeholder="请选择">
<el-form-item
v-else-if="item.field_type === 'selects'"
:label="item.field_name"
>
<el-select
style="width: 100%"
v-model="optio"
multiple
placeholder="请选择"
>
<el-option
v-for="item1 in item.field_choice"
:key="item1"
:label="item1"
:value="item1">
:value="item1"
>
</el-option>
</el-select>
</el-form-item>
@ -141,14 +181,15 @@
<el-col :span="18">
<el-card>
<div slot="header" class="clearfix">
<span style="font-size: 16px;
font-weight: 700;
">记录字段</span>
<span style="font-size: 16px; font-weight: 700">记录字段</span>
</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
:data="fieldList.results"
border
fit
@ -156,33 +197,44 @@
highlight-current-row
height="100"
v-el-height-adaptive-table="{ bottomOffset: 50 }"
>
<el-table-column type="index" width="50" />
<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 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 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 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 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 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 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 label="是否判定">
<template slot-scope="scope">
@ -191,15 +243,8 @@
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['material_update'])"
@click="handlefieldEdit(scope)"
@ -213,77 +258,172 @@
>
</template>
</el-table-column>
</el-table>
<el-dialog :visible.sync="dialogVisible1" :title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'">
<el-form ref="Form" :model="field" label-width="100px" label-position="right">
<el-dialog
: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-select style="width: 100%" v-model="field.field_type" placeholder="请选择">
<el-select
style="width: 100%"
v-model="field.field_type"
placeholder="请选择"
>
<el-option
v-for="item in fieldtypeoptions"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<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 label="字段名称" prop="field_name">
<el-input v-model="field.field_name" placeholder="字段名称" />
</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-button @click.prevent="addDomain" style="border: none;">
<el-form-item
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>
<span style="font-size:14px;">添加</span>
<span style="font-size: 14px">添加</span>
</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-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 :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
: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-row>
</el-form-item>
<el-form-item label="是否需要判定" prop="need_judge">
<el-switch v-model="field.need_judge"></el-switch>
</el-form-item>
<el-form-item 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
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 label="上限规则" v-if="field.need_judge==true" prop="high_rule">
<el-select style="width: 100%" v-model="field.high_rule" placeholder="请选择">
<el-form-item
label="上限规则"
v-if="field.need_judge == true"
prop="high_rule"
>
<el-select
style="width: 100%"
v-model="field.high_rule"
placeholder="请选择"
>
<el-option
v-for="item in highoptions"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item 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
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 label="下限规则" v-if="field.need_judge==true" prop="low_rule">
<el-select style="width: 100%" v-model="field.low_rule" placeholder="请选择">
<el-form-item
label="下限规则"
v-if="field.need_judge == true"
prop="low_rule"
>
<el-select
style="width: 100%"
v-model="field.low_rule"
placeholder="请选择"
>
<el-option
v-for="item in lowoptions"
:key="item.value"
:label="item.label"
:value="item.value">
:value="item.value"
>
</el-option>
</el-select>
</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-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>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible1 = false">取消</el-button>
<el-button type="primary" @click="fieldconfirm('Form')">确认</el-button>
<el-button type="danger" @click="dialogVisible1 = false"
>取消</el-button
>
<el-button type="primary" @click="fieldconfirm('Form')"
>确认</el-button
>
</div>
</el-dialog>
</el-card>
@ -294,13 +434,20 @@
</template>
<script>
import checkPermission from "@/utils/permission";
import { getEquipmentAll } from "@/api/equipment";
import vueJsonEditor from "vue-json-editor";
import { upUrl, upHeaders } from "@/api/file";
import {getrecordformList,createrecordform,updaterecordform,deleterecordform,getrffieldList,createrffield,updaterffield,
deleterffield} from "@/api/mtm";
import vueJsonEditor from 'vue-json-editor'
import {
getrecordformList,
createrecordform,
updaterecordform,
deleterecordform,
getrffieldList,
createrffield,
updaterffield,
deleterffield,
} from "@/api/mtm";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultstep = {
@ -308,12 +455,8 @@
number: "",
};
const defaultrecordform = {
};
const defaultfield = {
};
const defaultrecordform = {};
const defaultfield = {};
export default {
components: { Pagination, vueJsonEditor },
data() {
@ -329,13 +472,13 @@
dialogVisibleForm: false,
dialogTypes: "new",
field: {
field_type:'',
field_key:'',
field_name:'',
sort:'',
field_type: "",
field_key: "",
field_name: "",
sort: "",
field_choice: [""],
},
field_choice:[''],
field_choice: [""],
options: [],
optio: [],
rule1: {
@ -348,7 +491,7 @@
dialogType1: "new",
dialogVisible1: false,
tableForm: {
name:'',
name: "",
},
listQueryrecordform: {
page: 1,
@ -364,66 +507,71 @@
page: 1,
page_size: 20,
},
highoptions:[{ value: 1,
label: '<'},{ value: 2,
label: '<='}],
lowoptions:[{ value: 1,
label: '>'},{ value: 2,
label: '>='}],
highoptions: [
{ value: 1, label: "<" },
{ value: 2, label: "<=" },
],
lowoptions: [
{ value: 1, label: ">" },
{ value: 2, label: ">=" },
],
highoptionss_: {
1: '<',
2: '<='
1: "<",
2: "<=",
},
lowoptionss_: {
1: '>',
2: '>='
1: ">",
2: ">=",
},
options_: {
'string':'文本',
'int':'整数',
'float':'小数',
'date': '日期',
'datetime': '日期时间',
'select': '单选',
'selects': '多选',
string: "文本",
int: "整数",
float: "小数",
date: "日期",
datetime: "日期时间",
select: "单选",
selects: "多选",
},
fieldtypeoptions: [{
value: 'string',
label: '文本'
fieldtypeoptions: [
{
value: "string",
label: "文本",
},
{
value: 'int',
label: '整数'
value: "int",
label: "整数",
},
{
value: 'float',
label: '小数'
value: "float",
label: "小数",
},
{
value: 'date',
label: '日期'
value: "date",
label: "日期",
},
{
value: 'time',
label: '时间'
value: "time",
label: "时间",
},
{
value: 'datetime',
label: '日期时间'
value: "datetime",
label: "日期时间",
},
{
value: 'select',
label: '单选'
value: "select",
label: "单选",
},
{
value: 'selects',
label: '多选'
}
value: "selects",
label: "多选",
},
],
typeoptions: [{
typeoptions: [
{
value: 1,
label: '生产记录'
}],
label: "生产记录",
},
],
};
},
computed: {},
@ -431,16 +579,15 @@
created() {
this.material = this.$route.params.id;
this.recordformLists();
},
methods: {
//添加字段选项
addDomain() {
this.field_choice.push('')
this.field_choice.push("");
},
//删除字段选项
removeDomain(index) {
this.field_choice.splice(index, 1)
this.field_choice.splice(index, 1);
},
handleLook(scope) {
debugger;
@ -452,33 +599,25 @@
},
checkPermission,
handleCurrentChange(row) {
this.formID = row.id;
this.fieldLists();
},
recordformLists()
{
recordformLists() {
this.listQueryrecordform.material = this.material;
this.listQueryrecordform.type = 2;
getrecordformList(this.listQueryrecordform).then((response) => {
if (response.data) {
this.recordformList = response.data;
}
});
},
fieldLists()
{
this.listQueryfield.form=this.formID
fieldLists() {
this.listQueryfield.form = this.formID;
getrffieldList(this.listQueryfield).then((response) => {
if (response.data) {
this.fieldList = response.data;
}
});
},
//新增记录表
@ -492,8 +631,7 @@
},
//新增字段
handlefieldCreate() {
this.field_choice = [''];
this.field_choice = [""];
this.field = Object.assign({}, defaultfield);
this.dialogType1 = "new";
this.dialogVisible1 = true;
@ -526,7 +664,7 @@
})
.then(async () => {
await deleterecordform(scope.row.id);
this.recordformLists()
this.recordformLists();
this.$message.success("成功");
})
.catch((err) => {
@ -541,7 +679,7 @@
})
.then(async () => {
await deleterffield(scope.row.id);
this.fieldLists()
this.fieldLists();
this.$message.success("成功");
})
.catch((err) => {
@ -555,19 +693,21 @@
if (isEdit) {
this.recordform.material = this.material;
this.recordform.type = 2;
updaterecordform(this.recordform.id, this.recordform).then((res) => {
updaterecordform(this.recordform.id, this.recordform).then(
(res) => {
if (res.code >= 200) {
this.recordformLists()
this.recordformLists();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
);
} else {
this.recordform.material = this.material;
this.recordform.type = 2;
createrecordform(this.recordform).then((res) => {
if (res.code >= 200) {
this.recordformLists()
this.recordformLists();
this.dialogVisible = false;
this.$message.success("成功");
}
@ -587,7 +727,7 @@
this.field.field_choice = this.field_choice;
updaterffield(this.field.id, this.field).then((res) => {
if (res.code >= 200) {
this.fieldLists()
this.fieldLists();
this.dialogVisible1 = false;
this.$message.success("成功");
}
@ -597,7 +737,7 @@
this.field.field_choice = this.field_choice;
createrffield(this.field).then((res) => {
if (res.code >= 200) {
this.fieldLists()
this.fieldLists();
this.dialogVisible1 = false;
this.$message.success("成功");
}
@ -613,10 +753,10 @@
</script>
<style>
.my-label {
background: #E1F3D8;
background: #e1f3d8;
}
.my-content {
background: #FDE2E2;
background: #fde2e2;
}
</style>

View File

@ -274,7 +274,9 @@ export default {
},
handleclick(scope){
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.$nextTick(() => {
this.$refs["Form"].clearValidate();
@ -284,8 +286,17 @@ export default {
async confirm(form) {
this.orderplan.start_date = this.value1[0];
if( this.delivery_date>=this.value1[1])
{
this.orderplan.end_date = this.value1[1];
}
else{
this.$message.error("计划完成时间超过订单交付日期,请从新选择日期!");
}
this.orderplan.order = this.orderID
if( this.orderplan.count<=(this.countsx-this.planed_count)){
createProductionplan(this.orderplan).then((res) => {
if (res.code >= 200) {
this.getorderList();
@ -294,6 +305,12 @@ export default {
this.$message.success("成功");
}
});
}
else
{
this.$message.error("排产数超过所需数,请合理排产!");
}
},
handleWork(scope)
{

View File

@ -90,6 +90,7 @@
fit
stripe
style="width: 100%"
height="320"
>
<el-table-column type="index" width="50" />
@ -130,7 +131,7 @@
fit
stripe
style="width: 100%"
height="300"
>
<el-table-column type="index" width="50" />
@ -151,8 +152,8 @@
</el-table>
<pagination
v-show="orderList.count > 0"
:total="orderList.count"
v-show="equipmentTable.count > 0"
:total="equipmentTable.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getorderList"

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增合同</el-button
>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增合同</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button
>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增订单</el-button
>
<el-input
v-model="listQuery.search"
placeholder="订单名称"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增订单</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -2,6 +2,9 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button
>
<el-input
v-model="listQuery.search"
placeholder="客户名称"
@ -24,11 +27,7 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增客户</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table

View File

@ -24,16 +24,12 @@
>重置</el-button
>
</div>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增项目</el-button
>
</div>
</el-card>
<el-card style="margin-top: 2px">
<el-table
v-loading="listLoading"
:data="testitemList.results"
:data="wproductList.results"
border
fit
stripe
@ -41,44 +37,28 @@
max-height="600"
>
<el-table-column type="index" width="50" />
<el-table-column label="项目名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.m_state_.name }}</template>
</el-table-column>
<el-table-column label="条款号">
<template slot-scope="scope">{{ scope.row.term_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 label="半成品编号">
<template slot-scope="scope">{{ scope.row.m_state_.number }}</template>
</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">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
@click="handleEdit(scope)"
>编辑</el-link
>
<el-link
v-if="checkPermission(['warehouse_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
@click="handleInspection(scope)"
>检验</el-link
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="testitemList.count > 0"
:total="testitemList.count"
v-show="wproductList.count > 0"
:total="wproductList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
@ -126,12 +106,8 @@
</template>
<script>
import {
getTestitemList,
createTestitem,
updateTestitem,
deleteTestitem,
getStandardList,
} from "@/api/qm";
getwproductList,
} from "@/api/wpm";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
@ -142,7 +118,7 @@ export default {
data() {
return {
testitem: defaultetestitem,
testitemList: {
wproductList: {
count: 0,
},
listQuery: {
@ -167,12 +143,13 @@ export default {
},
methods: {
checkPermission,
//列表
//半成品列表
getList() {
this.listLoading = true;
getTestitemList(this.listQuery).then((response) => {
this.listQuery.act_state=2
getwproductList(this.listQuery).then((response) => {
if (response.data) {
this.testitemList = response.data;
this.wproductList = response.data;
}
this.listLoading = false;
});

View File

@ -641,18 +641,9 @@ export default {
//确认领料
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.picks = this.picks;
this.pickData.picks = this.havewl;
// console.log(this.pickData);