Merge branch 'master' of http://192.168.1.149:10010/r/高精2.0
This commit is contained in:
@@ -171,4 +171,29 @@ export function searchGeneralPart(pageCurrent, pageSize, project_check, project,
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 车间采购基本件查询
|
||||||
|
export function searchHourseBasicPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_库存盘点_车间采购基本件查询',
|
||||||
|
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 车间采购外购件查询
|
||||||
|
export function searchHoursePurchasePart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_库存盘点_车间采购外购件查询',
|
||||||
|
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,14 +23,15 @@ export function getPartsName(num) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTableData(partsCategoriesCheck, partsCategories, partsNameCheck, partsName) {
|
export function getTableData(pageCurrent, pageSize, partsCategoriesCheck, partsCategories, partsNameCheck, partsName) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_综合查询',
|
name: '车间生产管理工艺_基础表_典型工艺名称_查询数据_综合查询',
|
||||||
param: `典型工艺名称分类流水号_check=${partsCategoriesCheck}&典型工艺名称分类流水号=${partsCategories}&典型工艺流水号_check=${partsNameCheck}&典型工艺流水号=${partsName}&典型工艺流水号1_check=0`
|
param: `典型工艺名称分类流水号_check=${partsCategoriesCheck}&典型工艺名称分类流水号=${partsCategories}&典型工艺流水号_check=${partsNameCheck}&典型工艺流水号=${partsName}&典型工艺流水号1_check=0`,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
197
src/api/PurchasingCenter/MaterialManagement.js
Normal file
197
src/api/PurchasingCenter/MaterialManagement.js
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function initDepartmentName() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料主文件_基本_物料部门_查询数据'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function initMaterialCategory(check, DepartmentValue) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料类别编号_查询数据_根据物料部门编号',
|
||||||
|
param: '物料部门流水号_check=' + check + '=int&物料部门流水号=' + DepartmentValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function initMaterialVariety(MaterialCategoryValue) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料品种编号_查询数据',
|
||||||
|
param: '物料类别流水号=' + MaterialCategoryValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function initMeasurementUnit() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_计量单位主文件_查询数据'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function initMaterialSource() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料来源_查询数据'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function searchmaterial(check1, MaterialName, check2, FullNameOfMaterial, check3, MaterialSpecification, check4, MaterialModel, pageCurrent, pageSize, check5, MaterialCategoryValue, check6, MaterialVarietyValue, check7, MeasurementUnitValue, check8, MaterialSourceValue, check9, supplierValue) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料主文件_基本_查询数据_分页',
|
||||||
|
param: '物料流水号_check=0&物料代码_check=0&物料名称_check=' + check1 + '=int&物料名称=' + MaterialName + '&物料全名_check=' + check2 + '=int&物料全名=' + FullNameOfMaterial + '&物料规格_check=' + check3 + '=int&物料规格=' + MaterialSpecification + '&物料型号_check=' + check4 + '=int&物料型号=' + MaterialModel + '&物料类别流水号_check=' + check5 + '=int&物料类别流水号=' + MaterialCategoryValue + '&物料品种流水号_check=' + check6 + '=int&物料品种流水号=' + MaterialVarietyValue + '&供货商流水号_check=' + check9 + '&供货商流水号=' + supplierValue + '&计量单位流水号_check=' + check7 + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号_check=' + check8 + '&物料来源流水号=' + MaterialSourceValue + '&PageCurrent=' + pageCurrent + '=int&PageSize=' + pageSize + '=int&PageCount=1=int=output&ItemCount=1=int=output'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getSupplier(check, num, pageCurrent, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_供货商_查询数据_根据条件',
|
||||||
|
param: '供货商_check=' + check + '=int&供货商=' + num,
|
||||||
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addData(MaterialVariety, MaterialName, FullNameOfMaterial, MaterialSpecification, MaterialModel, MeasurementUnitValue, MaterialSourceValue, supplierValue1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料主文件_基本_增加数据',
|
||||||
|
param: '物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function editData(MaterialValue, MaterialVariety, MaterialName, FullNameOfMaterial, MaterialSpecification, MaterialModel, MeasurementUnitValue, MaterialSourceValue, supplierValue1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料主文件_基本_修改数据',
|
||||||
|
param: '物料流水号=' + MaterialValue + '&物料品种流水号=' + MaterialVariety + '&物料名称=' + MaterialName + '&物料全名=' + FullNameOfMaterial + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&计量单位流水号=' + MeasurementUnitValue + '&物料来源流水号=' + MaterialSourceValue + '&供货商流水号=' + supplierValue1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deleteData(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料主文件_基本_删除数据',
|
||||||
|
param: '物料流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function searchCategory() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料类别编号_查询数据_根据物料部门编号'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function searchVarieties(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料品种编号_查询数据',
|
||||||
|
param: '物料类别流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function editCategory(MaterialCategoryNum, MaterialCategory2, CategoryNumber) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料类别编号_修改数据',
|
||||||
|
param: '物料类别流水号=' + MaterialCategoryNum + '&物料类别=' + MaterialCategory2 + '&类别编号=' + CategoryNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addCategory(MaterialCategory2, CategoryNumber) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料类别编号_增加数据',
|
||||||
|
param: '物料类别=' + MaterialCategory2 + '&类别编号=' + CategoryNumber
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deleteCategory(MaterialCategoryNum) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料类别编号_删除数据',
|
||||||
|
param: '物料类别流水号=' + MaterialCategoryNum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function editVariety(MaterialVarietyNum, MaterialCategoryNum, MaterialVariety2, VarietyNumber, Specifications1, Specifications2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料品种编号_修改数据',
|
||||||
|
param: '物料品种流水号=' + MaterialVarietyNum + '&物料类别流水号=' + MaterialCategoryNum + '&物料品种=' + MaterialVariety2 + '&品种编号=' + VarietyNumber + '&规格1=' + Specifications1 + '&规格2=' + Specifications2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addVariety(MaterialCategoryNum, MaterialVariety2, VarietyNumber, Specifications1, Specifications2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料品种编号_增加数据',
|
||||||
|
param: '物料类别流水号=' + MaterialCategoryNum + '&物料品种=' + MaterialVariety2 + '&品种编号=' + VarietyNumber + '&规格1=' + Specifications1 + '&规格2=' + Specifications2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function deleteVariety(MaterialVarietyNum) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料品种编号_删除数据',
|
||||||
|
param: '物料品种流水号=' + MaterialVarietyNum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
1
src/icons/svg/MaterialManagement.svg
Normal file
1
src/icons/svg/MaterialManagement.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1539331081532" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2108" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M357.856 506.24L230.72 434.4a22.4 22.4 0 0 0-29.664 6.976 19.744 19.744 0 0 0 7.392 27.936l127.136 71.872a22.4 22.4 0 0 0 29.664-6.976 19.776 19.776 0 0 0-7.392-27.968z" p-id="2109"></path><path d="M906.048 407.52c-11.968 0-21.632 9.12-21.632 20.384v251.584l-363.552 193.408V516.544c0-1.568-0.608-2.944-0.928-4.416l371.328-198.272a19.808 19.808 0 0 0-0.96-35.904L508.928 98.272a22.944 22.944 0 0 0-19.328 0L108.224 277.952a19.296 19.296 0 0 0-10.464 23.424 18.336 18.336 0 0 0-1.44 6.752v383.296c0 7.168 3.968 13.76 10.432 17.44l381.376 216.352 0.16 0.064c0.256 0.128 0.576 0.128 0.8 0.288a22.976 22.976 0 0 0 8.608 2.304c0.992 0.064 1.952-0.096 2.944-0.16a22.08 22.08 0 0 0 7.456-1.76c0.608-0.256 1.184-0.128 1.792-0.448l406.816-216.384a20.16 20.16 0 0 0 11.008-17.728v-263.488c-0.032-11.232-9.728-20.384-21.664-20.384zM477.664 871.712L139.488 679.872v-348.8l339.104 181.056c-0.352 1.472-0.928 2.848-0.928 4.416v355.168zM834.656 297.28l-335.392 179.072L163.904 297.28l335.328-158.016L834.656 297.28z" p-id="2110"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -79,9 +79,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this[carrier].length !== 0) {
|
|
||||||
this[carrier] = response.data[0][select[0]]
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
requestData(param).then(response => { // 这个方法没什么难度,不注释了
|
requestData(param).then(response => { // 这个方法没什么难度,不注释了
|
||||||
@@ -139,7 +136,7 @@ export default {
|
|||||||
// 3)接受值,数组,一般是['table','total','loading']顺序不能变
|
// 3)接受值,数组,一般是['table','total','loading']顺序不能变
|
||||||
Vue.prototype.getTable = function(requestData, param, e) {
|
Vue.prototype.getTable = function(requestData, param, e) {
|
||||||
requestData(...param).then(response => {
|
requestData(...param).then(response => {
|
||||||
const data = response.data.rows ? response.data.rows : response.data
|
const data = response.data.rows
|
||||||
this[e[0]] = []
|
this[e[0]] = []
|
||||||
this[e[1]] = 0
|
this[e[1]] = 0
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
@@ -159,9 +156,7 @@ export default {
|
|||||||
// console.log('暂无数据')
|
// console.log('暂无数据')
|
||||||
}
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (this[e[2]]) {
|
this[e[2]] = false
|
||||||
this[e[2]] = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 添加表格数据
|
// 添加表格数据
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export default {
|
|||||||
equipmentNameCheck: null,
|
equipmentNameCheck: null,
|
||||||
equipmentName: [],
|
equipmentName: [],
|
||||||
operator: '',
|
operator: '',
|
||||||
operatorNum: null,
|
operatorNum: '',
|
||||||
operatorCheck: null,
|
operatorCheck: null,
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
tablePeople: [],
|
tablePeople: [],
|
||||||
@@ -200,10 +200,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
console.log(typeof (this.equipmentName))
|
||||||
this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0
|
this.equipmentNameValue ? this.equipmentNameCheck = 1 : this.equipmentNameCheck = 0
|
||||||
this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0
|
this.operator ? this.operatorCheck = 1 : this.operatorCheck = 0
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operator, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading'])
|
this.getTable(getTableData, [this.equipmentNameCheck, this.equipmentNameValue, this.operatorCheck, this.operatorNum, this.pageCurrent, this.pageSize], ['tableData', 'total', 'loading'])
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加'])
|
this.addForm('form', [this.dialogFormVisible_form = true, this.title = '增加'])
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
height="580"
|
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
border>
|
border>
|
||||||
<el-table-column align="center" label="角色编号" width="100">
|
<el-table-column align="center" label="角色编号" width="100">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<span>员工姓名:</span>
|
<span>员工姓名:</span>
|
||||||
<el-input v-model="staffName" size="small" clearable style="width:200px"/>
|
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px"/>
|
||||||
<span style="margin-left: 15px">角色名称:</span>
|
<span style="margin-left: 15px">角色名称:</span>
|
||||||
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table :data="tableData" height="659" highlight-current-row>
|
<el-table :data="tableData" highlight-current-row>
|
||||||
<el-table-column label="员工姓名">
|
<el-table-column label="员工姓名">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.姓名 }}
|
{{ scope.row.姓名 }}
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="员工姓名" prop="staffName">
|
<el-form-item label="员工姓名" prop="staffName">
|
||||||
<el-input v-model="form1.staffName" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
|
<el-input v-model="form1.staffName" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="dialogTableVisible()"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="角色名称" prop="roleName">
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
|
<el-select v-model="form1.roleName" placeholder="角色名称" size="small" clearable style="width:200px">
|
||||||
@@ -207,7 +207,6 @@ export default {
|
|||||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||||
},
|
},
|
||||||
rules1: {
|
rules1: {
|
||||||
staffName: [{ required: true, message: '请选择员工姓名', trigger: 'change' }],
|
|
||||||
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
roleName: [{ required: true, message: '请选择员工角色', trigger: 'change' }]
|
||||||
},
|
},
|
||||||
staffName: '',
|
staffName: '',
|
||||||
@@ -249,12 +248,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitEdit(index, row) {
|
submitEdit(index, row) {
|
||||||
|
if (this.$refs['form2'] !== undefined) {
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
}
|
||||||
this.dialogFormVisible2 = true
|
this.dialogFormVisible2 = true
|
||||||
this.personnelStream = row.人员角色流水号
|
this.personnelStream = row.人员角色流水号
|
||||||
this.form2.staffName = row.姓名
|
this.form2.staffName = row.姓名
|
||||||
this.ssks = row.部门名称
|
this.ssks = row.部门名称
|
||||||
this.personnelNumber = row.人员编号
|
this.personnelNumber = row.人员编号
|
||||||
this.form2.roleName = row.角色功能
|
this.form2.roleName = parseInt(row.角色编号)
|
||||||
this.cjscgy = row.考勤编号
|
this.cjscgy = row.考勤编号
|
||||||
},
|
},
|
||||||
callOFF() {
|
callOFF() {
|
||||||
@@ -304,25 +306,39 @@ export default {
|
|||||||
this.searchData()
|
this.searchData()
|
||||||
},
|
},
|
||||||
submitAdd1() {
|
submitAdd1() {
|
||||||
addData1(this.personnelNumber, this.form1.roleName).then(response => {
|
this.$refs['form1'].validate((valid) => {
|
||||||
if (response.data[0].result === '1') {
|
if (valid) {
|
||||||
this.$message.success('增加成功')
|
addData1(this.personnelNumber, this.form1.roleName).then(response => {
|
||||||
this.ssks = ''
|
if (response.data[0].result === '1') {
|
||||||
this.form1.staffName = ''
|
this.$message.success('增加成功')
|
||||||
this.form1.roleName = ''
|
this.ssks = ''
|
||||||
this.searchData()
|
this.form1.staffName = ''
|
||||||
this.dialogFormVisible1 = false
|
this.form1.roleName = ''
|
||||||
} else { this.$message.error('增加失败') }
|
this.searchData()
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
} else { this.$message.error('增加失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitAdd2() {
|
submitAdd2() {
|
||||||
addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
|
this.$refs['form2'].validate((valid) => {
|
||||||
if (response.data[0].result === '1') {
|
if (valid) {
|
||||||
this.$message.success('修改成功')
|
addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
|
||||||
this.ssks = ''
|
if (response.data[0].result === '1') {
|
||||||
this.searchData()
|
this.$message.success('修改成功')
|
||||||
this.dialogFormVisible2 = false
|
this.ssks = ''
|
||||||
} else { this.$message.error('修改失败') }
|
this.searchData()
|
||||||
|
this.dialogFormVisible2 = false
|
||||||
|
} else { this.$message.error('修改失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCurrentChange3(val) {
|
handleCurrentChange3(val) {
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" >
|
||||||
<el-tab-pane label="基本件" name="first"><el-card>
|
<el-tab-pane label="自制" name="first"><el-card>
|
||||||
<span>项目名称:</span>
|
<el-radio-group
|
||||||
|
v-model="radio"
|
||||||
|
size="small"
|
||||||
|
style="margin: 10px;"
|
||||||
|
@change="visual()">
|
||||||
|
<el-radio v-model="radio" :label="1" >基本件</el-radio>
|
||||||
|
<el-radio v-model="radio" :label="2" style="margin-left: 2px" >通用件</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<span style="margin-left: 20px">项目名称:</span>
|
||||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in Project"
|
v-for="item in Project"
|
||||||
@@ -26,9 +34,9 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchBasciPartinfo()">基本件查询</el-button><br>
|
<el-button v-show="basicshow" size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchBasciPartinfo()">基本件查询</el-button><br>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card v-show="basicshow">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="tableDataBasic"
|
:data="tableDataBasic"
|
||||||
@@ -87,7 +95,7 @@
|
|||||||
@current-change="handleCurrentChange"/>
|
@current-change="handleCurrentChange"/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
<el-card v-show="basicshow">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading1"
|
v-loading="listLoading1"
|
||||||
:data="BasicPartIn"
|
:data="BasicPartIn"
|
||||||
@@ -147,9 +155,154 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-card v-show="purchaseshow">
|
||||||
|
<el-radio v-model="radio2" :label="3">外购件</el-radio>
|
||||||
|
<el-radio v-model="radio2" :label="4" style="margin-left: 2px">标准件</el-radio>
|
||||||
|
<span style="margin-left: 20px" >项目名称:</span>
|
||||||
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Project"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>机床图号:</span>
|
||||||
|
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Machine"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>组号:</span>
|
||||||
|
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in GroupNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total1 = 0;pageSize1 = 10;pageList1 = 1;searchGeneralPartinfo()">通用件查询</el-button><br>
|
||||||
|
</el-card>
|
||||||
|
<el-card v-show="purchaseshow">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading3"
|
||||||
|
:data="tableDataGeneral"
|
||||||
|
:row-style="tableRowClassName2"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="项目名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.项目名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床图号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="组号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.可出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件类型" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.零件类型名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" min-width="120">
|
||||||
|
<template slot-scope="scope" align="center">
|
||||||
|
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="PageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="10"
|
||||||
|
:total="total1"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card v-show="purchaseshow">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading4"
|
||||||
|
:data="PurchasePartIn"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.实际到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="入库人员" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.入库人员 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到货时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading5"
|
||||||
|
:data="PurchasePartOut"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="出库数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出库时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库时间 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领用者" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.领用者 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="通用件" name="second">
|
<el-tab-pane label="采购采购" name="second">
|
||||||
<el-card>
|
<el-card>
|
||||||
<span>项目名称:</span>
|
<span>项目名称:</span>
|
||||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
@@ -175,152 +328,8 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total1 = 0;pageSize1 = 10;pageList1 = 1;searchGeneralPartinfo()">通用件查询</el-button><br>
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total2 = 0;pageSize2 = 10;pageList2 = 1;searchPurchasePartinfo()">外购件查询</el-button><br>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card>
|
|
||||||
<el-table
|
|
||||||
v-loading="listLoading3"
|
|
||||||
:data="tableDataGeneral"
|
|
||||||
:row-style="tableRowClassName2"
|
|
||||||
border
|
|
||||||
style="width: 100%;"
|
|
||||||
height="200">
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column label="项目名称" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.项目名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="机床图号" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.机床图号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="组号" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.组号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="零件名称" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.零件名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="零件数量" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.可出库数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="零件类型" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.零件类型名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" min-width="120">
|
|
||||||
<template slot-scope="scope" align="center">
|
|
||||||
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="block" style="margin-top: 10px;">
|
|
||||||
<el-pagination
|
|
||||||
:current-page="PageCurrent1"
|
|
||||||
:page-sizes="[10, 20, 30, 40]"
|
|
||||||
:page-size="10"
|
|
||||||
:total="total1"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="handleSizeChange1"
|
|
||||||
@current-change="handleCurrentChange1"/>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
<el-card>
|
|
||||||
<el-table
|
|
||||||
v-loading="listLoading4"
|
|
||||||
:data="PurchasePartIn"
|
|
||||||
border
|
|
||||||
style="width: 100%;"
|
|
||||||
height="200">
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column label="实际到货数量" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.实际到货数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库人员" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.入库人员 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="到货时间" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-table
|
|
||||||
v-loading="listLoading5"
|
|
||||||
:data="PurchasePartOut"
|
|
||||||
border
|
|
||||||
style="width: 100%;"
|
|
||||||
height="200">
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column label="出库数量" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.出库数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="出库时间" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.出库时间 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="领用者" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.领用者 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="外购件" name="third"><el-card>
|
|
||||||
<span>项目名称:</span>
|
|
||||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in Project"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
<span>机床图号:</span>
|
|
||||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in Machine"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
<span>组号:</span>
|
|
||||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in GroupNum"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total2 = 0;pageSize2 = 10;pageList2 = 1;searchPurchasePartinfo()">外购件查询</el-button><br>
|
|
||||||
</el-card>
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading6"
|
v-loading="listLoading6"
|
||||||
@@ -436,8 +445,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="标准件" name="fourth">
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<span>项目名称:</span>
|
<span>项目名称:</span>
|
||||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
@@ -595,12 +602,336 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="车间采购" name="third">
|
||||||
|
<el-card>
|
||||||
|
<el-radio v-model="radio3" :label="5">基本件</el-radio>
|
||||||
|
<el-radio v-model="radio3" :label="6" style="margin-left: 2px">外购件</el-radio>
|
||||||
|
<span style="margin-left: 20px">项目名称:</span>
|
||||||
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Project"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>机床图号:</span>
|
||||||
|
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Machine"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>组号:</span>
|
||||||
|
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in GroupNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchHouseBasci()">车间采购基本件查询</el-button><br>
|
||||||
|
</el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoadingx"
|
||||||
|
:data="HouseDataBasic"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="物料名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料规格" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料型号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料型号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="项目名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.项目名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床图号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="组号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.货位存量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.待出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件类型" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.类型名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope" align="center">
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="addWorkshopDetailinfor(scope.row)">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="PageCurrent5"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="10"
|
||||||
|
:total="total5"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange5"
|
||||||
|
@current-change="handleCurrentChange5"/>
|
||||||
|
</div>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading10"
|
||||||
|
:data="HouseDataBasicIn"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.实际到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="入库人员" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.入库人员 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到货时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading11"
|
||||||
|
:data="HouseDataBasicOut"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="出库数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出库时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库时间 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领用者" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.领用者 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<span style="margin-left: 20px">项目名称:</span>
|
||||||
|
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Project"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>机床图号:</span>
|
||||||
|
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Machine"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>组号:</span>
|
||||||
|
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in GroupNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchHousePurchase()">车间采购外购件查询</el-button><br>
|
||||||
|
</el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoadingx"
|
||||||
|
:data="HouseDataPurchase"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="物料名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料规格" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料型号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料型号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="项目名称" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.项目名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="机床图号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="组号" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.货位存量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="待出库数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.待出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="零件类型" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.类型名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope" align="center">
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="HousePurchaseRecord(scope.row)">选择</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="PageCurrent6"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="10"
|
||||||
|
:total="total6"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange6"
|
||||||
|
@current-change="handleCurrentChange6"/>
|
||||||
|
</div>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading10"
|
||||||
|
:data="HouseDataPurchaseIn"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="实际到货数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.实际到货数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="入库人员" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.入库人员 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="到货时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading11"
|
||||||
|
:data="HouseDataPurchaseOut"
|
||||||
|
border
|
||||||
|
style="width: 100%;"
|
||||||
|
height="200">
|
||||||
|
<el-table-column
|
||||||
|
label="序号"
|
||||||
|
align="center"
|
||||||
|
type="index"
|
||||||
|
width="50"/>
|
||||||
|
<el-table-column label="出库数量" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="出库时间" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.出库时间 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="领用者" align="center" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.领用者 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut } from '@/api/Inventory/InventoryCheck'
|
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart } from '@/api/Inventory/InventoryCheck'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -611,6 +942,7 @@ export default {
|
|||||||
craftNumber: '',
|
craftNumber: '',
|
||||||
tableDataGeneral: [], // 通用件
|
tableDataGeneral: [], // 通用件
|
||||||
tableDataPurchase: [], // 外购件
|
tableDataPurchase: [], // 外购件
|
||||||
|
PurchasePart: true,
|
||||||
PurchasePartOut: [], // 外购件出库记录
|
PurchasePartOut: [], // 外购件出库记录
|
||||||
PurchasePartIn: [], // 外购件入库记录
|
PurchasePartIn: [], // 外购件入库记录
|
||||||
tableDataStandard: [], // 标准件
|
tableDataStandard: [], // 标准件
|
||||||
@@ -648,6 +980,8 @@ export default {
|
|||||||
listLoading9: '',
|
listLoading9: '',
|
||||||
listLoading10: '',
|
listLoading10: '',
|
||||||
listLoading11: '',
|
listLoading11: '',
|
||||||
|
listLoadingx1: '',
|
||||||
|
listLoadingx2: '',
|
||||||
PageCurrent: 1,
|
PageCurrent: 1,
|
||||||
PageSize: 10,
|
PageSize: 10,
|
||||||
total: null,
|
total: null,
|
||||||
@@ -659,7 +993,24 @@ export default {
|
|||||||
total2: null,
|
total2: null,
|
||||||
PageCurrent3: 1,
|
PageCurrent3: 1,
|
||||||
PageSize3: 10,
|
PageSize3: 10,
|
||||||
total3: null
|
total3: null,
|
||||||
|
PageCurrent5: 1,
|
||||||
|
PageSize5: 10,
|
||||||
|
total5: null,
|
||||||
|
PageCurrent6: 1,
|
||||||
|
PageSize6: 10,
|
||||||
|
total6: null,
|
||||||
|
radio: 1,
|
||||||
|
radio2: 1,
|
||||||
|
radio3: 1,
|
||||||
|
basicshow: true,
|
||||||
|
purchaseshow: true,
|
||||||
|
HouseDataBasic: [],
|
||||||
|
HouseDataBasicOut: [],
|
||||||
|
HouseDataBasicIn: [],
|
||||||
|
HouseDataPurchase: [],
|
||||||
|
HouseDataPurchaseOut: [],
|
||||||
|
HouseDataPurchaseIn: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -668,6 +1019,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
},
|
},
|
||||||
|
BasicShow() {
|
||||||
|
this.basicshow = true
|
||||||
|
this.purchaseshow = false
|
||||||
|
},
|
||||||
|
GeneralShow() {
|
||||||
|
this.purchaseshow = true
|
||||||
|
this.basicshow = false
|
||||||
|
},
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||||
},
|
},
|
||||||
@@ -938,6 +1297,100 @@ export default {
|
|||||||
handleCurrentChange3(val) {
|
handleCurrentChange3(val) {
|
||||||
this.PageCurrent3 = val
|
this.PageCurrent3 = val
|
||||||
this.searchPartinfo()
|
this.searchPartinfo()
|
||||||
|
},
|
||||||
|
handleSizeChange5(val) {
|
||||||
|
this.PageCurrent5 = 1
|
||||||
|
this.PageSize5 = val
|
||||||
|
this.searchHouseBasci()
|
||||||
|
},
|
||||||
|
handleCurrentChange5(val) {
|
||||||
|
this.PageCurrent5 = val
|
||||||
|
this.searchHouseBasci()
|
||||||
|
},
|
||||||
|
handleSizeChange6(val) {
|
||||||
|
this.PageCurrent6 = 1
|
||||||
|
this.PageSize6 = val
|
||||||
|
this.searchHousePurchase()
|
||||||
|
},
|
||||||
|
handleCurrentChange6(val) {
|
||||||
|
this.PageCurrent6 = val
|
||||||
|
this.searchHousePurchase()
|
||||||
|
},
|
||||||
|
// 查询车间采购基本件
|
||||||
|
searchHouseBasci() {
|
||||||
|
this.listLoadingx1 = true
|
||||||
|
this.HouseDataBasic = []
|
||||||
|
if (this.ProjectValue === '') {
|
||||||
|
this.ProjectValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.ProjectValue_check = 1
|
||||||
|
}
|
||||||
|
if (this.MachineValue === '') {
|
||||||
|
this.MachineValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.MachineValue_check = 1
|
||||||
|
}
|
||||||
|
if (this.GroupNumValue === '') {
|
||||||
|
this.GroupNumValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.GroupNumValue_check = 1
|
||||||
|
}
|
||||||
|
searchHourseBasicPart(this.PageCurrent5, this.PageSize5, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||||
|
this.HouseDataBasic = response.data.rows
|
||||||
|
this.listLoadingx1 = false
|
||||||
|
this.total5 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询外购件记录
|
||||||
|
HouseBasicRecord(row) {
|
||||||
|
this.ContractDetailValue = row.采购合同明细流水号
|
||||||
|
this.TeamPartNumber = row.组件零件流水号
|
||||||
|
searchPurchasePartIn(this.ContractDetailValue).then(response => {
|
||||||
|
this.HouseDataBasicIn = response.data
|
||||||
|
this.listLoading7 = false
|
||||||
|
})
|
||||||
|
searchPurchasePartOut(this.TeamPartNumber).then(response => {
|
||||||
|
this.HouseDataBasicOut = response.data
|
||||||
|
this.listLoading8 = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询车间采购外购件
|
||||||
|
searchHousePurchase() {
|
||||||
|
this.listLoadingx2 = true
|
||||||
|
this.HouseDataPurchase = []
|
||||||
|
if (this.ProjectValue === '') {
|
||||||
|
this.ProjectValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.ProjectValue_check = 1
|
||||||
|
}
|
||||||
|
if (this.MachineValue === '') {
|
||||||
|
this.MachineValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.MachineValue_check = 1
|
||||||
|
}
|
||||||
|
if (this.GroupNumValue === '') {
|
||||||
|
this.GroupNumValue_check = 0
|
||||||
|
} else {
|
||||||
|
this.GroupNumValue_check = 1
|
||||||
|
}
|
||||||
|
searchHoursePurchasePart(this.PageCurrent6, this.PageSize6, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
|
||||||
|
this.HouseDataPurchase = response.data.rows
|
||||||
|
this.listLoadingx2 = false
|
||||||
|
this.total6 = response.data.total
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询外购件记录
|
||||||
|
HousePurchaseRecord(row) {
|
||||||
|
this.ContractDetailValue = row.采购合同明细流水号
|
||||||
|
this.TeamPartNumber = row.组件零件流水号
|
||||||
|
searchPurchasePartIn(this.ContractDetailValue).then(response => {
|
||||||
|
this.HouseDataPurchaseIn = response.data
|
||||||
|
this.listLoading7 = false
|
||||||
|
})
|
||||||
|
searchPurchasePartOut(this.TeamPartNumber).then(response => {
|
||||||
|
this.HouseDataPurchaseOut = response.data
|
||||||
|
this.listLoading8 = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,18 +218,32 @@ export default {
|
|||||||
},
|
},
|
||||||
tableRowClassName2({ row }) {
|
tableRowClassName2({ row }) {
|
||||||
for (let i = 0; i < this.tableData1.length; i++) {
|
for (let i = 0; i < this.tableData1.length; i++) {
|
||||||
|
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||||
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
|
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
|
||||||
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级 || this.tableData1[i].工序顺序 !== row.工序顺序) {
|
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
|
||||||
return 'change'
|
return 'change'
|
||||||
|
} else {
|
||||||
|
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||||
|
return 'change'
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tableRowClassName1({ row }) {
|
tableRowClassName1({ row }) {
|
||||||
for (let i = 0; i < this.tableData2.length; i++) {
|
for (let i = 0; i < this.tableData2.length; i++) {
|
||||||
|
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
|
||||||
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
|
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
|
||||||
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级 || this.tableData2[i].工序顺序 !== row.工序顺序) {
|
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
|
||||||
return 'change'
|
return 'change'
|
||||||
|
} else {
|
||||||
|
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
|
||||||
|
return 'change'
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
partNumValue = '';typeValue = '';partName = '';
|
partNumValue = '';typeValue = '';partName = '';
|
||||||
material = '';materialName = '';spec = '';batchNum = '';
|
material = '';materialName = '';spec = '';batchNum = '';
|
||||||
searchParts()">
|
searchParts()">
|
||||||
<el-radio :label="1">未编制</el-radio>
|
<el-radio v-model="radio" :label="1">未编制</el-radio>
|
||||||
<el-radio :label="2">已编制</el-radio>
|
<el-radio v-model="radio" :label="2">已编制</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<span>工艺员:</span>
|
<span>工艺员:</span>
|
||||||
<el-select
|
<el-select
|
||||||
|
|||||||
@@ -2,38 +2,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div style="margin-top: -10px;">
|
<span>零件分类:</span>
|
||||||
<el-row>
|
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
||||||
<span>零件分类:</span>
|
<el-option
|
||||||
<el-select v-model="partsCategoriesValue" size="small" filterable clearable placeholder="零件分类" @change="getPartsName">
|
v-for="item in partsCategories"
|
||||||
<el-option
|
:key="item.value"
|
||||||
v-for="item in partsCategories"
|
:label="item.label"
|
||||||
:key="item.value"
|
:value="item.value"/>
|
||||||
:label="item.label"
|
</el-select>
|
||||||
:value="item.value"/>
|
<span>零件名称:</span>
|
||||||
</el-select>
|
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
||||||
|
<el-option
|
||||||
<span>零件名称:</span>
|
v-for="item in partsName"
|
||||||
<el-select v-model="partsNameValue" size="small" filterable clearable placeholder="零件名称" @change="getTableData" >
|
:key="item.value"
|
||||||
<el-option
|
:label="item.label"
|
||||||
v-for="item in partsName"
|
:value="item.value"/>
|
||||||
:key="item.value"
|
</el-select>
|
||||||
:label="item.label"
|
<span>典型工艺号:</span>
|
||||||
:value="item.value"/>
|
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 100px" size="small" readonly/>
|
||||||
</el-select>
|
<el-button size="small" type="success" icon="el-icon-search" style="margin-left: 10px" @click="total=0;pageCurrent=1;pageSize=20;getTableData()">查询</el-button>
|
||||||
|
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTableData">增加</el-button>
|
||||||
<span>典型工艺号:</span>
|
<el-button size="small" type="warning" icon="el-icon-menu" style="margin-left: 10px" @click="editConfirm">保存</el-button>
|
||||||
<el-input v-model="typicalNumValue" auto-complete="off" style="width: 200px" size="small" />
|
|
||||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="getTableData">查询</el-button>
|
|
||||||
<el-button size="small" type="info" icon="el-icon-circle-plus-outline" style="margin: 10px 0 0 10px" @click="addTableData">增加</el-button>
|
|
||||||
<el-button size="small" type="success" icon="el-icon-cjn-09" style="margin: 10px 0 0 10px" @click="editConfirm">保存</el-button>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%;max-height: 550px;" size="mini" height="550px">
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%;max-height: 550px;" size="mini" height="550px">
|
||||||
<el-table-column prop="num" label="序号" width="50" align="center" type="index"/>
|
<el-table-column prop="num" label="序号" width="50" align="center" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.工艺序号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="工艺名称" width="230" align="center">
|
<el-table-column prop="name" label="工艺名称" width="230" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -66,12 +64,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="单件" align="center">
|
<el-table-column prop="name" label="单件" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.单件定额工时" style="width:90px" placeholder="单件定额"/>
|
<el-input v-model="scope.row.单件定额工时" size="mini" style="width:90px" placeholder="单件定额"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="准结" align="center">
|
<el-table-column prop="name" label="准结" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.准结定额工时" style="width:90px" placeholder="准结定额"/>
|
<el-input v-model="scope.row.准结定额工时" size="mini" style="width:90px" placeholder="准结定额"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="300" align="center" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
@@ -101,6 +99,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[20, 30, 40, 50]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogFormVisible" title="工艺名称、工艺要求选择" center width="400px">
|
<el-dialog :visible.sync="dialogFormVisible" title="工艺名称、工艺要求选择" center width="400px">
|
||||||
@@ -145,6 +153,9 @@ import { getPartsCategories, getPartsName, getTableData, upMove, downMove, deleR
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageCurrent: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0,
|
||||||
partsCategories: [],
|
partsCategories: [],
|
||||||
partsCategoriesCheck: null,
|
partsCategoriesCheck: null,
|
||||||
partsCategoriesValue: '',
|
partsCategoriesValue: '',
|
||||||
@@ -181,7 +192,7 @@ export default {
|
|||||||
getPartsName(this.partsCategoriesValue).then(res => {
|
getPartsName(this.partsCategoriesValue).then(res => {
|
||||||
const data = res.data
|
const data = res.data
|
||||||
data.length > 0 ? this.partsNameValue = data[0].典型工艺流水号 : this.partsNameValue = ''
|
data.length > 0 ? this.partsNameValue = data[0].典型工艺流水号 : this.partsNameValue = ''
|
||||||
this.typicalNumValue = data[0].典型工艺号
|
this.typicalNumValue = data.length > 0 ? data[0].典型工艺号 : ''
|
||||||
data.map(item => {
|
data.map(item => {
|
||||||
this.partsName.push({
|
this.partsName.push({
|
||||||
label: item.典型工艺名称,
|
label: item.典型工艺名称,
|
||||||
@@ -193,11 +204,25 @@ export default {
|
|||||||
getTableData() {
|
getTableData() {
|
||||||
this.partsCategoriesValue ? this.partsCategoriesCheck = 1 : this.partsCategoriesCheck = 0
|
this.partsCategoriesValue ? this.partsCategoriesCheck = 1 : this.partsCategoriesCheck = 0
|
||||||
this.partsNameValue ? this.partsNameCheck = 1 : this.partsNameCheck = 0
|
this.partsNameValue ? this.partsNameCheck = 1 : this.partsNameCheck = 0
|
||||||
this.loading = true
|
if (this.partsCategoriesCheck === 0 && this.partsNameCheck === 0) {
|
||||||
getTableData(this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
this.$message.error('请选择查询条件')
|
||||||
this.loading = false
|
} else {
|
||||||
this.tableData = res.data
|
this.loading = true
|
||||||
})
|
getTableData(this.pageCurrent, this.pageSize, this.partsCategoriesCheck, this.partsCategoriesValue, this.partsNameCheck, this.partsNameValue).then(res => {
|
||||||
|
this.loading = false
|
||||||
|
this.tableData = res.data.rows
|
||||||
|
this.total = res.data.total
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageCurrent = 1
|
||||||
|
this.pageSize = val
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.getTableData()
|
||||||
},
|
},
|
||||||
upMove(row) {
|
upMove(row) {
|
||||||
upMove(row.典型工艺流水号, row.典型工艺工序流水号).then(res => {
|
upMove(row.典型工艺流水号, row.典型工艺工序流水号).then(res => {
|
||||||
@@ -234,7 +259,7 @@ export default {
|
|||||||
if (res.data[0].result === '1') {
|
if (res.data[0].result === '1') {
|
||||||
index++
|
index++
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('零件保存失败')
|
this.$message.error('零件工艺保存失败')
|
||||||
}
|
}
|
||||||
if (index === this.tableData.length) {
|
if (index === this.tableData.length) {
|
||||||
this.$message.success('保存修改成功')
|
this.$message.success('保存修改成功')
|
||||||
@@ -302,4 +327,7 @@ export default {
|
|||||||
span{
|
span{
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
.el-card{
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
763
src/views/PurchasingCenter/MaterialManagement/index.vue
Normal file
@@ -0,0 +1,763 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-row>
|
||||||
|
<!--<span>部门名称:</span>-->
|
||||||
|
<!--<el-select v-model="DepartmentValue" style="width:200px" placeholder="请选择" size="small" clearable @change="searchMaterialCategory">-->
|
||||||
|
<!--<el-option-->
|
||||||
|
<!--v-for="item in Department"-->
|
||||||
|
<!--:key="item.value"-->
|
||||||
|
<!--:label="item.label"-->
|
||||||
|
<!--:value="item.value">-->
|
||||||
|
<!--</el-option>-->
|
||||||
|
<!--</el-select>-->
|
||||||
|
<span>物料类别:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialCategoryValue"
|
||||||
|
style="width:200px"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
@change="searchMaterialVariety">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialCategory"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>物料品种:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialVarietyValue"
|
||||||
|
style="width:200px"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
@change="searchMaterial">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialVariety"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="small"
|
||||||
|
style="margin-left: 15px"
|
||||||
|
@click="CategoryMaintenance">维护物料类别
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<span>物料名称:</span>
|
||||||
|
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable style="margin-top: 15px;width:200px"/>
|
||||||
|
<span>物料全称:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="FullNameOfMaterial"
|
||||||
|
placeholder="物料全称"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
style="margin-top: 15px;width:200px"/>
|
||||||
|
<span>物料规格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="MaterialSpecification"
|
||||||
|
placeholder="物料规格"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
style="margin-top: 15px;width:200px"/>
|
||||||
|
<span>物料型号:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="MaterialModel"
|
||||||
|
placeholder="物料型号"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
style="margin-top: 15px;width:200px"/>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<span>计算单位:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MeasurementUnitValue"
|
||||||
|
style="margin-top: 15px;width:200px"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in MeasurementUnit"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>物料来源:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialSourceValue"
|
||||||
|
style="margin-top: 15px;width:200px"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialSource"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span style="margin-left: 25px">供货商:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="supplier"
|
||||||
|
placeholder="供货商"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
style="margin-top: 15px;width:200px"
|
||||||
|
@dblclick.native="param=0;openSupplier()"/>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="small"
|
||||||
|
style="margin-top: 15px;margin-left: 15px"
|
||||||
|
@click="pageCurrent=1;searchMaterial()">查询
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 15px">
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%"
|
||||||
|
height="440"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
border>
|
||||||
|
<el-table-column align="center" label="物料名称">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="物料规格">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="物料型号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料型号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="供货商">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供货商 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="参考价格">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.参考价格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleEdit(scope.row)">编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)">删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent"
|
||||||
|
:page-sizes="[10, 20, 30, 40, 50]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="total"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"/>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible" title="选择供货商" center width="400px">
|
||||||
|
<el-input v-model="supplier1" placeholder="供货商" size="small" clearable style="width:200px"/>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="small"
|
||||||
|
style="margin-left: 15px; margin-bottom: 10px"
|
||||||
|
@click="pageCurrent1=1;searchSupplier()">查询
|
||||||
|
</el-button>
|
||||||
|
<el-table
|
||||||
|
:data="tableData1"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
@row-click="selectSupplier">
|
||||||
|
<el-table-column align="center" label="供货商">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供货商 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="block" style="margin-top: 10px;">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="pageCurrent1"
|
||||||
|
:page-sizes="[10, 20, 30]"
|
||||||
|
:page-size="pageSize1"
|
||||||
|
:total="total1"
|
||||||
|
small
|
||||||
|
layout="sizes, prev, pager, next"
|
||||||
|
@size-change="handleSizeChange1"
|
||||||
|
@current-change="handleCurrentChange1"/>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitSupplier">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料类别" prop="物料类别流水号">
|
||||||
|
<el-select
|
||||||
|
v-model="form.物料类别流水号"
|
||||||
|
style="width:200px"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
@change="searchMaterialVariety1">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialCategory1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料品种" prop="物料品种流水号">
|
||||||
|
<el-select v-model="form.物料品种流水号" style="width:200px" placeholder="请选择" size="small" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialVariety1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料名称" prop="物料名称">
|
||||||
|
<el-input v-model="form.物料名称" placeholder="物料名称" size="small" clearable style="width:200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料全名" prop="物料全名">
|
||||||
|
<el-input v-model="form.物料全名" placeholder="物料全名" size="small" clearable style="width:200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料规格" prop="物料规格">
|
||||||
|
<el-input v-model="form.物料规格" placeholder="物料规格" size="small" clearable style="width:200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料型号" prop="物料型号">
|
||||||
|
<el-input v-model="form.物料型号" placeholder="物料型号" size="small" clearable style="width:200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="计量单位" prop="计量单位流水号">
|
||||||
|
<el-select v-model="form.计量单位流水号" style="width:200px" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MeasurementUnit"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料来源" prop="物料来源流水号">
|
||||||
|
<el-select v-model="form.物料来源流水号" style="width:200px" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialSource"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="供货商" prop="供货商">
|
||||||
|
<el-input
|
||||||
|
v-model="form.供货商"
|
||||||
|
placeholder="供货商"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
style="width:200px"
|
||||||
|
@click.native="param=1;openSupplier()"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="cancel('form')">取消</el-button>
|
||||||
|
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||||
|
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible2" title="物料类别维护" center width="1200px">
|
||||||
|
<div style="width: 47%;display: inline-block">
|
||||||
|
<el-card>
|
||||||
|
<span>物料类别:</span>
|
||||||
|
<el-input v-model="MaterialCategory2" placeholder="物料类别" size="mini" clearable style="width:100px"/>
|
||||||
|
<span>类别编号:</span>
|
||||||
|
<el-input v-model="CategoryNumber" placeholder="类别编号" size="mini" clearable style="width:100px"/>
|
||||||
|
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd1">增加</el-button>
|
||||||
|
<el-button type="warning" size="mini" @click="handleEdit1">编辑</el-button>
|
||||||
|
<br>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
:data="tableData2"
|
||||||
|
size="mini"
|
||||||
|
height="328"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
@row-click="selectMaterialCategory">
|
||||||
|
<el-table-column align="center" label="物料类别">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料类别 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="类别编号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.类别编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="ID">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料类别ID }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete1(scope.row)">删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
<div style="width: 49%;display: inline-block;margin-left: 20px">
|
||||||
|
<el-card>
|
||||||
|
<span>品种编号:</span>
|
||||||
|
<el-input v-model="VarietyNumber" placeholder="品种编号" size="mini" clearable style="width:100px"/>
|
||||||
|
<span>物料品种:</span>
|
||||||
|
<el-input v-model="MaterialVariety2" placeholder="物料品种" size="mini" clearable style="width:100px"/>
|
||||||
|
<span>规格1:</span>
|
||||||
|
<el-input v-model="Specifications1" placeholder="规格1" size="mini" clearable style="width:100px"/>
|
||||||
|
<br>
|
||||||
|
<span style="margin-left: 30px">规格2:</span>
|
||||||
|
<el-input v-model="Specifications2" placeholder="规格2" size="mini" clearable style="width:100px"/>
|
||||||
|
<el-button type="primary" size="mini" style="margin-left: 10px" @click="handleAdd2">增加</el-button>
|
||||||
|
<el-button type="warning" size="mini" @click="handleEdit2">编辑</el-button>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
:data="tableData3"
|
||||||
|
size="mini"
|
||||||
|
height="300"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
@row-click="selectMaterialVariety">
|
||||||
|
<el-table-column align="center" label="品种编号">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.品种编号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="物料品种">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.物料品种 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="规格1">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.规格1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="规格2">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.规格2 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
@click="handleDelete2(scope.row)">删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
initDepartmentName,
|
||||||
|
initMaterialCategory,
|
||||||
|
initMaterialVariety,
|
||||||
|
initMeasurementUnit,
|
||||||
|
initMaterialSource,
|
||||||
|
searchmaterial,
|
||||||
|
getSupplier,
|
||||||
|
addData,
|
||||||
|
editData,
|
||||||
|
deleteData,
|
||||||
|
searchCategory,
|
||||||
|
searchVarieties,
|
||||||
|
editCategory,
|
||||||
|
addCategory,
|
||||||
|
deleteCategory,
|
||||||
|
editVariety,
|
||||||
|
addVariety,
|
||||||
|
deleteVariety
|
||||||
|
} from '@/api/PurchasingCenter/MaterialManagement'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
DepartmentValue: '', // 部门名称
|
||||||
|
Department: [], // 部门数组
|
||||||
|
MaterialCategoryValue: '', // 物料类别
|
||||||
|
MaterialCategory: [], // 物料类别数组
|
||||||
|
MaterialVarietyValue: '', // 物料品种
|
||||||
|
MaterialVariety: [], // 物料品种数组
|
||||||
|
MaterialName: '', // 物料名称
|
||||||
|
FullNameOfMaterial: '', // 物料全称
|
||||||
|
MaterialSpecification: '', // 物料规格
|
||||||
|
MaterialModel: '', // 物料型号
|
||||||
|
MeasurementUnitValue: '', // 计量单位
|
||||||
|
MeasurementUnit: [], // 计量单位数组
|
||||||
|
MaterialSourceValue: '', // 物料来源
|
||||||
|
MaterialSource: [], // 物料来源数组
|
||||||
|
supplier: '', // 供货商
|
||||||
|
supplier1: '', // 供货商(弹框)
|
||||||
|
supplierValue: '', // 供货商流水号
|
||||||
|
ReferencePrice: '', // 参考价格
|
||||||
|
supplierValue1: '',
|
||||||
|
MaterialCategory1: [],
|
||||||
|
MaterialVariety1: [],
|
||||||
|
MaterialCategory2: '', // 物料类别
|
||||||
|
CategoryNumber: '', // 类别编号
|
||||||
|
VarietyNumber: '', // 品种编号
|
||||||
|
MaterialVariety2: '', // 物料品种
|
||||||
|
Specifications1: '', // 规格1
|
||||||
|
Specifications2: '', // 规格2
|
||||||
|
MaterialCategoryNum: '', // 物料类别流水号
|
||||||
|
MaterialVarietyNum: '', // 物料品种流水号
|
||||||
|
param: 0,
|
||||||
|
tableData: [],
|
||||||
|
pageCurrent: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: null,
|
||||||
|
tableData1: [],
|
||||||
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
total1: null,
|
||||||
|
tableData2: [],
|
||||||
|
tableData3: [],
|
||||||
|
dialogFormVisible: false,
|
||||||
|
dialogFormVisible1: false,
|
||||||
|
dialogFormVisible2: false,
|
||||||
|
check1: '',
|
||||||
|
check2: '',
|
||||||
|
check3: '',
|
||||||
|
check4: '',
|
||||||
|
check5: '',
|
||||||
|
check6: '',
|
||||||
|
check7: '',
|
||||||
|
check8: '',
|
||||||
|
check9: '',
|
||||||
|
check10: '',
|
||||||
|
title: '',
|
||||||
|
form: {
|
||||||
|
物料流水号: '',
|
||||||
|
物料类别流水号: '',
|
||||||
|
物料品种流水号: '',
|
||||||
|
物料名称: '',
|
||||||
|
物料全名: '',
|
||||||
|
物料规格: '',
|
||||||
|
物料型号: '',
|
||||||
|
计量单位流水号: '',
|
||||||
|
物料来源流水号: '',
|
||||||
|
供货商: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||||
|
供货商: [{ required: true, message: '请选择供货商', trigger: 'change' }],
|
||||||
|
物料类别流水号: [{ required: true, message: '请选择物料类别', trigger: 'change' }],
|
||||||
|
物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
|
||||||
|
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
|
||||||
|
物料来源流水号: [{ required: true, message: '请选择物料来源', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchMaterialCategory()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
this.getSelect(initDepartmentName, ['物料部门名称', '物料部门流水号'], 'Department') // 物料部门
|
||||||
|
this.getSelect(initMeasurementUnit, ['计量单位', '计量单位流水号'], 'MeasurementUnit') // 计量单位
|
||||||
|
this.getSelect(initMaterialSource, ['物料来源', '物料来源流水号'], 'MaterialSource') // 物料来源
|
||||||
|
},
|
||||||
|
searchMaterialCategory() { // 获取物料类别
|
||||||
|
this.MaterialCategory = []
|
||||||
|
this.MaterialVariety = []
|
||||||
|
this.MaterialCategoryValue = ''
|
||||||
|
this.MaterialVarietyValue = ''
|
||||||
|
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
|
||||||
|
},
|
||||||
|
searchMaterialVariety() { // 初始化物料品种
|
||||||
|
this.MaterialVariety = []
|
||||||
|
this.MaterialVarietyValue = ''
|
||||||
|
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
|
||||||
|
},
|
||||||
|
searchMaterial() { // 物料查询
|
||||||
|
this.MaterialName !== '' ? this.check1 = 1 : this.check1 = 0 // 物料名称
|
||||||
|
this.FullNameOfMaterial !== '' ? this.check2 = 1 : this.check2 = 0 // 物料全称
|
||||||
|
this.MaterialSpecification !== '' ? this.check3 = 1 : this.check3 = 0 // 物料规格
|
||||||
|
this.MaterialModel !== '' ? this.check4 = 1 : this.check4 = 0 // 物料型号
|
||||||
|
this.MaterialCategoryValue !== '' ? this.check5 = 1 : this.check5 = 0 // 物料类别
|
||||||
|
this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种
|
||||||
|
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
|
||||||
|
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
|
||||||
|
this.supplier !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
|
||||||
|
searchmaterial(this.check1, this.MaterialName, this.check2, this.FullNameOfMaterial, this.check3, this.MaterialSpecification, this.check4, this.MaterialModel, this.pageCurrent, this.pageSize, this.check5, this.MaterialCategoryValue, this.check6, this.MaterialVarietyValue, this.check7, this.MeasurementUnitValue, this.check8, this.MaterialSourceValue, this.check9, this.supplierValue).then(response => {
|
||||||
|
this.tableData = response.data.result
|
||||||
|
this.total = parseInt(response.data.output[0].ItemCount)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
openSupplier() {
|
||||||
|
this.dialogFormVisible = true
|
||||||
|
this.supplier1 = ''
|
||||||
|
this.check10 = 0
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.pageSize1 = 10
|
||||||
|
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||||
|
},
|
||||||
|
searchSupplier() {
|
||||||
|
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||||
|
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||||
|
},
|
||||||
|
selectSupplier(row) {
|
||||||
|
if (this.param === 0) {
|
||||||
|
this.supplierValue = row.供货商流水号
|
||||||
|
} else if (this.param === 1) {
|
||||||
|
this.supplierValue1 = row.供货商流水号
|
||||||
|
}
|
||||||
|
this.supplier1 = row.供货商
|
||||||
|
},
|
||||||
|
submitSupplier() {
|
||||||
|
if (this.param === 0) {
|
||||||
|
this.supplier = this.supplier1
|
||||||
|
} else if (this.param === 1) {
|
||||||
|
this.form.供货商 = this.supplier1
|
||||||
|
}
|
||||||
|
this.dialogFormVisible = false
|
||||||
|
},
|
||||||
|
cancel() { // 取消
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
},
|
||||||
|
searchMaterialVariety1() { // 物料品种
|
||||||
|
this.MaterialVariety1 = []
|
||||||
|
this.form.物料品种流水号 = ''
|
||||||
|
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号)
|
||||||
|
},
|
||||||
|
handleEdit(row) {
|
||||||
|
this.supplierValue1 = ''
|
||||||
|
this.MaterialCategory1 = []
|
||||||
|
this.MaterialVariety1 = []
|
||||||
|
this.supplierValue1 = row.供货商流水号
|
||||||
|
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||||
|
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
|
||||||
|
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
||||||
|
},
|
||||||
|
submitEdit() {
|
||||||
|
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||||
|
this.searchMaterial()
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
this.supplierValue1 = ''
|
||||||
|
this.MaterialCategory1 = []
|
||||||
|
this.MaterialVariety1 = []
|
||||||
|
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
|
||||||
|
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
|
||||||
|
},
|
||||||
|
submitAdd() { // 提交增加
|
||||||
|
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.supplierValue1], 'form', function() {
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
this.searchMaterial()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete(row) { // 删除
|
||||||
|
this.deleteRow(deleteData, row.物料流水号, function() {
|
||||||
|
this.searchMaterial()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
CategoryMaintenance() {
|
||||||
|
this.dialogFormVisible2 = true
|
||||||
|
this.getData(searchCategory, 'tableData2')
|
||||||
|
},
|
||||||
|
selectMaterialCategory(row) {
|
||||||
|
this.MaterialCategory2 = row.物料类别
|
||||||
|
this.CategoryNumber = row.类别编号
|
||||||
|
this.MaterialCategoryNum = row.物料类别流水号
|
||||||
|
this.getData(searchVarieties, 'tableData3', row.物料类别流水号)
|
||||||
|
},
|
||||||
|
selectMaterialVariety(row) {
|
||||||
|
this.MaterialVarietyNum = row.物料品种流水号
|
||||||
|
this.VarietyNumber = row.品种编号
|
||||||
|
this.MaterialVariety2 = row.物料品种
|
||||||
|
this.Specifications1 = row.规格1
|
||||||
|
this.Specifications2 = row.规格2
|
||||||
|
},
|
||||||
|
handleEdit1() {
|
||||||
|
editCategory(this.MaterialCategoryNum, this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
this.getData(searchCategory, 'tableData2')
|
||||||
|
this.tableData3 = []
|
||||||
|
} else {
|
||||||
|
this.$message.error('编辑失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAdd1() {
|
||||||
|
addCategory(this.MaterialCategory2, this.CategoryNumber).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('增加成功')
|
||||||
|
this.getData(searchCategory, 'tableData2')
|
||||||
|
this.tableData3 = []
|
||||||
|
} else {
|
||||||
|
this.$message.error('增加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete1(row) {
|
||||||
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteCategory(row.物料类别流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getData(searchCategory, 'tableData2')
|
||||||
|
this.tableData3 = []
|
||||||
|
} else {
|
||||||
|
this.$message.error('删除失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleEdit2() {
|
||||||
|
editVariety(this.MaterialVarietyNum, this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||||
|
} else {
|
||||||
|
this.$message.error('编辑失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleAdd2() {
|
||||||
|
addVariety(this.MaterialCategoryNum, this.MaterialVariety2, this.VarietyNumber, this.Specifications1, this.Specifications2).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('增加成功')
|
||||||
|
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||||
|
} else {
|
||||||
|
this.$message.error('增加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleDelete2(row) {
|
||||||
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteVariety(row.物料品种流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.getData(searchVarieties, 'tableData3', this.MaterialCategoryNum)
|
||||||
|
} else {
|
||||||
|
this.$message.error('删除失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageCurrent = 1
|
||||||
|
this.searchMaterial()
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageCurrent = val
|
||||||
|
this.searchMaterial()
|
||||||
|
},
|
||||||
|
handleSizeChange1(val) {
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.pageCurrent1 = 1
|
||||||
|
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||||
|
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||||
|
},
|
||||||
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.supplier1 !== '' ? this.check10 = 1 : this.check10 = 0
|
||||||
|
this.getTable(getSupplier, [this.check10, this.supplier1, this.pageCurrent1, this.pageSize1], ['tableData1', 'total1'])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
span {
|
||||||
|
margin: 10px 0px 10px 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user