Merge branch 'master' of http://192.168.1.149:10010/r/高精2.0
This commit is contained in:
@@ -8,7 +8,7 @@ export function initCraftmen() {
|
|||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||||
param: '考核部门编号=10'
|
param: '考核部门编号=17'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -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) {
|
||||||
|
|||||||
@@ -45,13 +45,14 @@
|
|||||||
{{ scope.row.领用人 }}
|
{{ scope.row.领用人 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
<el-table-column label="操作" min-width="100" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleEdit(scope.row)">修改</el-button>
|
@click="handleEdit(scope.$index, scope.row, 'form')">修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
@@ -113,14 +114,15 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!--仓库表单-->
|
<!--仓库表单-->
|
||||||
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center style="min-height: 300px" width="400px">
|
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center width="450px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="仓库编号" prop="WarehouseNumber">
|
<el-form-item label="仓库编号" prop="WarehouseNumber">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.WarehouseNumber"
|
v-model="form.WarehouseNumber"
|
||||||
size="small"
|
size="small"
|
||||||
|
clearable
|
||||||
style="width:200px"/>
|
style="width:200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -131,6 +133,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.WarehouseName"
|
v-model="form.WarehouseName"
|
||||||
size="small"
|
size="small"
|
||||||
|
clearable
|
||||||
style="width:200px"/>
|
style="width:200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -141,6 +144,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.WarehouseDescription"
|
v-model="form.WarehouseDescription"
|
||||||
size="small"
|
size="small"
|
||||||
|
clearable
|
||||||
style="width:200px"/>
|
style="width:200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -150,6 +154,7 @@
|
|||||||
<el-form-item label="地址" prop="Address">
|
<el-form-item label="地址" prop="Address">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Address"
|
v-model="form.Address"
|
||||||
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
style="width:200px"/>
|
style="width:200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -157,10 +162,10 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
<el-form-item label="联系人" prop="ContactpeopleValue">
|
||||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in People"
|
v-for="item in Contactpeople"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
@@ -173,6 +178,7 @@
|
|||||||
<el-form-item label="备注" prop="Note">
|
<el-form-item label="备注" prop="Note">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Note"
|
v-model="form.Note"
|
||||||
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
style="width:200px"/>
|
style="width:200px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -209,7 +215,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="永久" prop="永久">
|
<el-form-item label="是否永久" prop="永久">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form2.永久"
|
v-model="form2.永久"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -240,6 +246,8 @@ import { initWarehouse, addWarehouse, alterWarehouse, deleteWarehouse, searchLoc
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
Contactpeople: [], // 联系人
|
||||||
|
count2: 0, // 清表单验证计数器
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
wareHouse: '',
|
wareHouse: '',
|
||||||
@@ -250,10 +258,12 @@ export default {
|
|||||||
WarehouseName: '', // 仓库名称
|
WarehouseName: '', // 仓库名称
|
||||||
WarehouseDescription: '', // 仓库描述
|
WarehouseDescription: '', // 仓库描述
|
||||||
Address: '', // 地址
|
Address: '', // 地址
|
||||||
|
ContactpeopleValue: '',
|
||||||
Note: '' // 备注
|
Note: '' // 备注
|
||||||
},
|
},
|
||||||
rules: { // 表单验证规则
|
rules: { // 表单验证规则
|
||||||
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'change' }],
|
WarehouseNumber: [{ required: true, message: '请输入仓库编号', trigger: 'blur' }],
|
||||||
|
ContactpeopleValue: [{ required: true, message: '请选择联系人', trigger: 'change' }],
|
||||||
WarehouseName: [{ required: true, message: '请输入仓库名称', trigger: 'blur' }],
|
WarehouseName: [{ required: true, message: '请输入仓库名称', trigger: 'blur' }],
|
||||||
WarehouseDescription: [{ required: true, message: '请输入仓库描述', trigger: 'blur' }],
|
WarehouseDescription: [{ required: true, message: '请输入仓库描述', trigger: 'blur' }],
|
||||||
Address: [{ required: true, message: '请输入地址', trigger: 'blur' }],
|
Address: [{ required: true, message: '请输入地址', trigger: 'blur' }],
|
||||||
@@ -290,7 +300,6 @@ export default {
|
|||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
initWarehouse().then(response => {
|
initWarehouse().then(response => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
console.log(response)
|
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.tableData.push({
|
this.tableData.push({
|
||||||
仓库流水号: response.data[i].仓库流水号,
|
仓库流水号: response.data[i].仓库流水号,
|
||||||
@@ -298,8 +307,9 @@ export default {
|
|||||||
仓库名称: response.data[i].仓库名称,
|
仓库名称: response.data[i].仓库名称,
|
||||||
仓库描述: response.data[i].仓库描述,
|
仓库描述: response.data[i].仓库描述,
|
||||||
地址: response.data[i].地址,
|
地址: response.data[i].地址,
|
||||||
联系人: response.data[i].联系人,
|
联系人: response.data[i].姓名,
|
||||||
备注: response.data[i].备注
|
备注: response.data[i].备注,
|
||||||
|
人员编号: response.data[i].人员编号
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -309,11 +319,12 @@ export default {
|
|||||||
this.getLocate()
|
this.getLocate()
|
||||||
},
|
},
|
||||||
searchPeopleData() { // 查询人员
|
searchPeopleData() { // 查询人员
|
||||||
|
this.Contactpeople = []
|
||||||
searchPeople().then(response => {
|
searchPeople().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.People.push({
|
this.Contactpeople.push({
|
||||||
label: response.data[i].姓名,
|
label: response.data[i].姓名,
|
||||||
value: response.data[i].考勤编号
|
value: response.data[i].人员编号
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -351,19 +362,20 @@ export default {
|
|||||||
this.form.WarehouseName = ''
|
this.form.WarehouseName = ''
|
||||||
this.form.WarehouseDescription = ''
|
this.form.WarehouseDescription = ''
|
||||||
this.form.Address = ''
|
this.form.Address = ''
|
||||||
this.form.Contactpeople = ''
|
this.form.ContactpeopleValue = ''
|
||||||
this.form.Note = ''
|
this.form.Note = ''
|
||||||
this.temp = null
|
this.temp = ''
|
||||||
} else if (this.temp === 2) {
|
} else if (this.temp === 2) {
|
||||||
this.chaEdit()
|
this.chaEdit()
|
||||||
this.temp = null
|
this.temp = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 执行增加仓库
|
// 执行增加仓库
|
||||||
addTableData() {
|
addTableData() {
|
||||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.PeopleValue, this.form.Note).then(response => {
|
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||||
|
console.log(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note)
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('添加成功')
|
this.$message.success('添加成功')
|
||||||
@@ -371,7 +383,7 @@ export default {
|
|||||||
this.form.WarehouseName = ''
|
this.form.WarehouseName = ''
|
||||||
this.form.WarehouseDescription = ''
|
this.form.WarehouseDescription = ''
|
||||||
this.form.Address = ''
|
this.form.Address = ''
|
||||||
this.form.Contactpeople = ''
|
this.form.ContactpeopleValue = ''
|
||||||
this.form.Note = ''
|
this.form.Note = ''
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('添加失败')
|
this.$message.error('添加失败')
|
||||||
@@ -380,29 +392,28 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(index, row, formName) {
|
||||||
|
console.log(row)
|
||||||
|
this.count2 = this.count2 + 1
|
||||||
|
if (this.count2 !== 1) {
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
}
|
||||||
this.temp = 2
|
this.temp = 2
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible = true
|
||||||
this.form.WarehouseNumber = row.仓库编号
|
this.form.WarehouseNumber = row.仓库编号
|
||||||
this.form.WarehouseName = row.仓库名称
|
this.form.WarehouseName = row.仓库名称
|
||||||
this.form.WarehouseDescription = row.仓库描述
|
this.form.WarehouseDescription = row.仓库描述
|
||||||
this.form.Address = row.地址
|
this.form.Address = row.地址
|
||||||
this.form.Contactpeople = row.联系人
|
this.form.ContactpeopleValue = row.人员编号
|
||||||
this.form.Note = row.备注
|
this.form.Note = row.备注
|
||||||
this.HouseNumber = row.仓库流水号
|
this.HouseNumber = row.仓库流水号
|
||||||
},
|
},
|
||||||
// 执行修改
|
// 执行修改
|
||||||
chaEdit() {
|
chaEdit() {
|
||||||
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.Contactpeople, this.form.Note).then(response => {
|
alterWarehouse(this.HouseNumber, this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||||
this.dialogFormVisible = false
|
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('信息更新成功')
|
this.$message.success('信息更新成功')
|
||||||
this.form.WarehouseNumber = ''
|
this.dialogFormVisible = false
|
||||||
this.form.WarehouseName = ''
|
|
||||||
this.form.WarehouseDescription = ''
|
|
||||||
this.form.Address = ''
|
|
||||||
this.form.Contactpeople = ''
|
|
||||||
this.form.Note = ''
|
|
||||||
this.getTable()
|
this.getTable()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('信息更新失败')
|
this.$message.error('信息更新失败')
|
||||||
@@ -428,7 +439,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 重置表单
|
// 重置表单
|
||||||
callOff(formName) {
|
callOff(formName) {
|
||||||
console.log(1515)
|
|
||||||
this.form = {}
|
this.form = {}
|
||||||
this.form2.ContractNumberValue = ''
|
this.form2.ContractNumberValue = ''
|
||||||
this.form2.EntryName = ''
|
this.form2.EntryName = ''
|
||||||
|
|||||||
@@ -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 ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:50px" 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:50px" 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>
|
||||||
|
|||||||
@@ -52,26 +52,11 @@
|
|||||||
{{ scope.row.设备情况 }}
|
{{ scope.row.设备情况 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!--<el-table-column label="类别" align="center" width="110px">-->
|
|
||||||
<!--<template slot-scope="scope">-->
|
|
||||||
<!--{{scope.row.类别}}-->
|
|
||||||
<!--</template>-->
|
|
||||||
<!--</el-table-column>-->
|
|
||||||
<!--<el-table-column label="关注" align="center">-->
|
|
||||||
<!--<template slot-scope="scope">-->
|
|
||||||
<!--{{scope.row.关注}}-->
|
|
||||||
<!--</template>-->
|
|
||||||
<!--</el-table-column>-->
|
|
||||||
<el-table-column label="备注" align="center" width="150px">
|
<el-table-column label="备注" align="center" width="150px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.备注 }}
|
{{ scope.row.备注 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!--<el-table-column label="序号" align="center">-->
|
|
||||||
<!--<template slot-scope="scope">-->
|
|
||||||
<!--{{scope.row.序号}}-->
|
|
||||||
<!--</template>-->
|
|
||||||
<!--</el-table-column>-->
|
|
||||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -138,18 +123,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!--<el-row>-->
|
|
||||||
<!--<el-col :span="12">-->
|
|
||||||
<!--<el-form-item label="类别" prop="category">-->
|
|
||||||
<!--<el-input v-model="form.category" placeholder="类别" clearable size="small"></el-input>-->
|
|
||||||
<!--</el-form-item>-->
|
|
||||||
<!--</el-col>-->
|
|
||||||
<!--<el-col :span="12">-->
|
|
||||||
<!--<el-form-item label="关注" prop="attention">-->
|
|
||||||
<!--<el-input v-model="form.attention" placeholder="关注" clearable size="small" ></el-input>-->
|
|
||||||
<!--</el-form-item>-->
|
|
||||||
<!--</el-col>-->
|
|
||||||
<!--</el-row>-->
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="设备情况" prop="EquipmentCondition">
|
<el-form-item label="设备情况" prop="EquipmentCondition">
|
||||||
@@ -162,15 +135,6 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!--<el-row>-->
|
|
||||||
<!--<el-col :span="12">-->
|
|
||||||
<!--<el-form-item label="厂家序号" prop="ManufacturerNumber">-->
|
|
||||||
<!--<el-input v-model="form.ManufacturerNumber" placeholder="厂家序号" clearable size="small"></el-input>-->
|
|
||||||
<!--</el-form-item>-->
|
|
||||||
<!--</el-col>-->
|
|
||||||
<!--<el-col :span="12">-->
|
|
||||||
<!--</el-col>-->
|
|
||||||
<!--</el-row>-->
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="callOff('form')">取消</el-button>
|
<el-button @click="callOff('form')">取消</el-button>
|
||||||
|
|||||||
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>
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
<!--二维码扫描查询-->
|
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
|
|
||||||
<el-card>
|
|
||||||
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
|
|
||||||
<el-table-column
|
|
||||||
label=" "
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column label="外协厂家名称" align="center" width="280px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.外协厂家名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
</el-card>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { searchtable } from '@/api/Outsourcing/OutFactoryMaintenance'
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading0: false,
|
|
||||||
tableData: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.searchTable()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 查询
|
|
||||||
searchTable() {
|
|
||||||
this.loading0 = true
|
|
||||||
searchtable(this.pageCurrent, this.pageSize, this.num1, this.ManufacturerNumber, this.num2, this.ManufacturerName, this.num10, this.ManufacturerAbbreviation, this.num3, this.address, this.num4, this.roleName, this.num5, this.phNumber, this.num6, this.Fax, this.num7, this.Remarks, this.num8, this.category, this.num11, this.attention, this.num9, this.EquipmentCondition).then(response => {
|
|
||||||
this.tableData = response.data.rows
|
|
||||||
this.total = response.data.total
|
|
||||||
this.loading0 = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.el-card{
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
Reference in New Issue
Block a user