Merge branch 'master' of ssh://192.168.1.149:29418/高精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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
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 |
@@ -14,11 +14,6 @@
|
||||
height="580"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="材料编号" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料流水号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
@@ -58,7 +53,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="新增材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
|
||||
<el-input v-model="form.MaterialName" clearable size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -68,14 +63,14 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName2" style="display: inline-block">
|
||||
<el-input v-model="form2.MaterialName2" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form')">确定</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -98,8 +93,12 @@ export default {
|
||||
form: {
|
||||
MaterialName: ''
|
||||
},
|
||||
form2: {
|
||||
MaterialName2: ''
|
||||
},
|
||||
rules: {
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
|
||||
MaterialName2: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -130,17 +129,18 @@ export default {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.MaterialName = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
addMaterial(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addMaterial(this.form.MaterialName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.form = {}
|
||||
this.featchMaterial()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.form = {}
|
||||
@@ -150,7 +150,6 @@ export default {
|
||||
})
|
||||
},
|
||||
delMaterial(row) {
|
||||
console.log(row)
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -168,18 +167,18 @@ export default {
|
||||
})
|
||||
},
|
||||
Edit(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form.MaterialName = row.材料
|
||||
this.form2.MaterialName2 = row.材料
|
||||
this.ID = row.材料流水号
|
||||
},
|
||||
editMaterial(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
editMaterial(form2) {
|
||||
this.$refs[form2].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dialogFormVisible2 = false
|
||||
editMaterial(this.ID, this.form.MaterialName).then(response => {
|
||||
editMaterial(this.ID, this.form2.MaterialName2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('编辑成功')
|
||||
@@ -197,10 +196,4 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -385,9 +385,12 @@ export default {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTechnologicalRequirementsOfProcessNum(row) {
|
||||
this.expands = []
|
||||
this.expands.push(row.工艺编号)
|
||||
searchTechnologicalRequirementsOfProcessNum(row, expandedRows) {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.工艺编号)
|
||||
if (expandedRows.length > 1) {
|
||||
expandedRows.shift()
|
||||
}
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="基本件" name="first"><el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick" >
|
||||
<el-tab-pane label="自制" name="first"><el-card v-show="basicshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="BasicShow()">
|
||||
<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-option
|
||||
v-for="item in Project"
|
||||
@@ -28,7 +36,7 @@
|
||||
</el-select>
|
||||
<el-button 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 v-show="basicshow">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableDataBasic"
|
||||
@@ -87,7 +95,7 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card v-show="basicshow">
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="BasicPartIn"
|
||||
@@ -117,6 +125,7 @@
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
v-show="basicshow"
|
||||
:data="BasicPartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
@@ -148,10 +157,16 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="通用件" name="second">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-card v-show="genneralshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="BasicShow()">
|
||||
<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-option
|
||||
v-for="item in Project"
|
||||
@@ -177,7 +192,7 @@
|
||||
</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>
|
||||
<el-card v-show="genneralshow">
|
||||
<el-table
|
||||
v-loading="listLoading3"
|
||||
:data="tableDataGeneral"
|
||||
@@ -237,7 +252,7 @@
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card v-show="genneralshow">
|
||||
<el-table
|
||||
v-loading="listLoading4"
|
||||
:data="PurchasePartIn"
|
||||
@@ -267,6 +282,7 @@
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="listLoading5"
|
||||
v-show="genneralshow"
|
||||
:data="PurchasePartOut"
|
||||
border
|
||||
style="width: 100%;"
|
||||
@@ -294,34 +310,43 @@
|
||||
</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-tab-pane label="采购采购" name="second">
|
||||
<el-card v-show="purchaseshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="GeneralShow()">
|
||||
<el-radio v-model="radio2" :label="3">外购件</el-radio>
|
||||
<el-radio v-model="radio2" :label="4" style="margin-left: 2px">标准件</el-radio>
|
||||
</el-radio-group>
|
||||
<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 v-show="purchaseshow">
|
||||
<el-table
|
||||
v-loading="listLoading6"
|
||||
:data="tableDataPurchase"
|
||||
@@ -380,7 +405,7 @@
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card v-show="purchaseshow">
|
||||
<el-table
|
||||
v-loading="listLoading7"
|
||||
:data="PurchasePartIn"
|
||||
@@ -436,9 +461,15 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="标准件" name="fourth">
|
||||
<el-card>
|
||||
<el-card v-show="standardshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="GeneralShow()">
|
||||
<el-radio v-model="radio2" :label="3">外购件</el-radio>
|
||||
<el-radio v-model="radio2" :label="4" style="margin-left: 2px">标准件</el-radio>
|
||||
</el-radio-group>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||
<el-option
|
||||
@@ -465,7 +496,7 @@
|
||||
</el-select>
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="total3 = 0;pageSize3 = 10;pageList3 = 1;searchStandardPartinfo()">标准件查询</el-button><br>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-card v-show="standardshow">
|
||||
<el-table
|
||||
v-loading="listLoading9"
|
||||
:data="tableDataStandard"
|
||||
@@ -538,7 +569,7 @@
|
||||
<el-button type="primary" @click="edeitsafeAmount()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-card v-show="standardshow">
|
||||
<el-table
|
||||
v-loading="listLoading10"
|
||||
:data="StandardPartIn"
|
||||
@@ -595,12 +626,334 @@
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="车间采购" name="third">
|
||||
<el-card v-show="housebasicshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="HouseShow()">
|
||||
<el-radio :label="5">基本件</el-radio>
|
||||
<el-radio :label="6" 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-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-card v-show="housebasicshow">
|
||||
<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" align="center">
|
||||
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="HouseBasicRecord(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-card v-show="housebasicshow">
|
||||
<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 v-show="housepurchaseshow">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="HouseShow()">
|
||||
<el-radio :label="5">基本件</el-radio>
|
||||
<el-radio :label="6" 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-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-card v-show="housepurchaseshow">
|
||||
<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" 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-card v-show="housepurchaseshow">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
data() {
|
||||
return {
|
||||
@@ -611,6 +964,7 @@ export default {
|
||||
craftNumber: '',
|
||||
tableDataGeneral: [], // 通用件
|
||||
tableDataPurchase: [], // 外购件
|
||||
PurchasePart: true,
|
||||
PurchasePartOut: [], // 外购件出库记录
|
||||
PurchasePartIn: [], // 外购件入库记录
|
||||
tableDataStandard: [], // 标准件
|
||||
@@ -648,6 +1002,8 @@ export default {
|
||||
listLoading9: '',
|
||||
listLoading10: '',
|
||||
listLoading11: '',
|
||||
listLoadingx1: '',
|
||||
listLoadingx2: '',
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
@@ -659,7 +1015,28 @@ export default {
|
||||
total2: null,
|
||||
PageCurrent3: 1,
|
||||
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,
|
||||
genneralshow: false,
|
||||
purchaseshow: true,
|
||||
standardshow: false,
|
||||
housebasicshow: true,
|
||||
housepurchaseshow: false,
|
||||
HouseDataBasic: [],
|
||||
HouseDataBasicOut: [],
|
||||
HouseDataBasicIn: [],
|
||||
HouseDataPurchase: [],
|
||||
HouseDataPurchaseOut: [],
|
||||
HouseDataPurchaseIn: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -668,6 +1045,33 @@ export default {
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
},
|
||||
BasicShow() {
|
||||
if (this.radio === 1) {
|
||||
this.basicshow = true
|
||||
this.genneralshow = false
|
||||
} else if (this.radio === 2) {
|
||||
this.basicshow = false
|
||||
this.genneralshow = true
|
||||
}
|
||||
},
|
||||
GeneralShow() {
|
||||
if (this.radio === 3) {
|
||||
this.purchaseshow = true
|
||||
this.standardshow = false
|
||||
} else {
|
||||
this.purchaseshow = false
|
||||
this.standardshow = true
|
||||
}
|
||||
},
|
||||
HouseShow() {
|
||||
if (this.radio === 5) {
|
||||
this.housebasicshow = true
|
||||
this.housepurchaseshow = false
|
||||
} else {
|
||||
this.housebasicshow = false
|
||||
this.housepurchaseshow = true
|
||||
}
|
||||
},
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
|
||||
},
|
||||
@@ -938,6 +1342,100 @@ export default {
|
||||
handleCurrentChange3(val) {
|
||||
this.PageCurrent3 = val
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
partNumValue = '';typeValue = '';partName = '';
|
||||
material = '';materialName = '';spec = '';batchNum = '';
|
||||
searchParts()">
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
<el-radio v-model="radio" :label="1">未编制</el-radio>
|
||||
<el-radio v-model="radio" :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select
|
||||
|
||||
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