物料管理
This commit is contained in:
218
src/api/PurchasingCenter/MaterialMProcure.js
Normal file
218
src/api/PurchasingCenter/MaterialMProcure.js
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getSupplier1(check, num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_供货商_查询数据_根据条件',
|
||||||
|
param: '供货商_check=' + check + '=int&供货商=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function AddGonghuoshang(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `insert into dbo.库存管理_供货商 (供货商) VALUES(\'${num}\')`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -216,3 +216,46 @@ export function deleteVariety(MaterialVarietyNum) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getMaterial() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '库存管理_物料主文件_基本_采购部_查询未审核数量'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function searchmateria5(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: '库存管理_物料主文件_基本_采购部_查询数据_分页1',
|
||||||
|
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 Dahui(num, num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料主文件_基本_采购部_打回',
|
||||||
|
param: '物料流水号=' + num + '&打回原因=' + num1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function Tongguo(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '库存管理_物料主文件_基本_采购部_通过',
|
||||||
|
param: '物料流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -706,7 +706,7 @@ export default {
|
|||||||
if (res1.data.length !== 0) {
|
if (res1.data.length !== 0) {
|
||||||
this.tooltip3 = '热处理零件:' + res1.data[0].零件图号
|
this.tooltip3 = '热处理零件:' + res1.data[0].零件图号
|
||||||
} else {
|
} else {
|
||||||
this.tooltip3 = '无'
|
this.tooltip3 = '热处理零件:无'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -723,7 +723,7 @@ export default {
|
|||||||
if (res1.data.length !== 0) {
|
if (res1.data.length !== 0) {
|
||||||
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
|
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
|
||||||
} else {
|
} else {
|
||||||
this.tooltip3 = '无'
|
this.tooltip3 = '处理零件:无'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -740,7 +740,7 @@ export default {
|
|||||||
if (res1.data.length !== 0) {
|
if (res1.data.length !== 0) {
|
||||||
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
|
this.tooltip3 = '处理零件:' + res1.data[0].零件图号
|
||||||
} else {
|
} else {
|
||||||
this.tooltip3 = '无'
|
this.tooltip3 = '处理零件:无'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -757,7 +757,7 @@ export default {
|
|||||||
if (res1.data.length !== 0) {
|
if (res1.data.length !== 0) {
|
||||||
this.tooltip3 = '加工零件:' + res1.data[0].零件图号
|
this.tooltip3 = '加工零件:' + res1.data[0].零件图号
|
||||||
} else {
|
} else {
|
||||||
this.tooltip3 = '无'
|
this.tooltip3 = '加工零件:无'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
729
src/views/PurchasingCenter/MaterialMProcure/index.vue
Normal file
729
src/views/PurchasingCenter/MaterialMProcure/index.vue
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card>
|
||||||
|
<el-row>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料类别:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialCategoryValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
size="small"
|
||||||
|
clearable
|
||||||
|
@change="searchMaterialVariety">
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialCategory"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料品种:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialVarietyValue"
|
||||||
|
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-col>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料名称:</span>
|
||||||
|
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料全称:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="FullNameOfMaterial"
|
||||||
|
placeholder="物料全称"
|
||||||
|
size="small"
|
||||||
|
clearable/>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料规格:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="MaterialSpecification"
|
||||||
|
placeholder="物料规格"
|
||||||
|
size="small"
|
||||||
|
clearable/>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px;margin-top: 3px">
|
||||||
|
<span>物料型号:</span>
|
||||||
|
<el-input
|
||||||
|
v-model="MaterialModel"
|
||||||
|
placeholder="物料型号"
|
||||||
|
size="small"
|
||||||
|
clearable/>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px">
|
||||||
|
<span>计算单位:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MeasurementUnitValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="margin-bottom: 3px;margin-top: 10px"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in MeasurementUnit"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px">
|
||||||
|
<span>物料来源:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="MaterialSourceValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="margin-bottom: 3px;margin-top: 10px"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in MaterialSource"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 280px">
|
||||||
|
<span style="margin-left: 15px">供货商:</span>
|
||||||
|
<el-select
|
||||||
|
v-model="GonghuoshangValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
style="margin-bottom: 3px;margin-top: 10px"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in Gonghuoshang"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<!--<el-input-->
|
||||||
|
<!--v-model="supplier"-->
|
||||||
|
<!--placeholder="供货商"-->
|
||||||
|
<!--size="small"-->
|
||||||
|
<!--style="margin-bottom: 3px;margin-top: 10px"-->
|
||||||
|
<!--clearable-->
|
||||||
|
<!--@dblclick.native="param=0;openSupplier()"/>-->
|
||||||
|
</el-col>
|
||||||
|
<el-col style="width: 550px">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="small"
|
||||||
|
style="margin-left: 10px"
|
||||||
|
@click="pageCurrent=1;searchMaterial()">查询</el-button>
|
||||||
|
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">申请</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card>
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
style="width: 100%;margin-top: 3px"
|
||||||
|
height="600"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
stripe>
|
||||||
|
<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">
|
||||||
|
<el-tag v-if="scope.row.是否通过===0" type="primary" size="small">未审核</el-tag>
|
||||||
|
<el-tag v-if="scope.row.是否通过===1" type="success" size="small">已通过</el-tag>
|
||||||
|
<el-tag v-if="scope.row.是否通过===2" type="danger" size="small">未通过</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="打回原因">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.打回原因 ? scope.row.打回原因 : '——' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--<el-table-column label="操作" fixed="right" align="center" width="150">-->
|
||||||
|
<!--<template slot-scope="scope">-->
|
||||||
|
<!--<el-tooltip :open-delay="1000" effect="dark" content="编辑">-->
|
||||||
|
<!--<div style="display: inline-block">-->
|
||||||
|
<!--<el-button-->
|
||||||
|
<!--:disabled="token !== 11 && token !== 36"-->
|
||||||
|
<!--size="mini"-->
|
||||||
|
<!--type="text"-->
|
||||||
|
<!--icon="el-icon-edit-outline"-->
|
||||||
|
<!--@click="handleEdit(scope.row)"/>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</el-tooltip>-->
|
||||||
|
<!--<el-tooltip effect="dark" content="删除" placement="top">-->
|
||||||
|
<!--<div style="display: inline-block">-->
|
||||||
|
<!--<el-button-->
|
||||||
|
<!--:disabled="token !== 11 && token !== 36"-->
|
||||||
|
<!--size="mini"-->
|
||||||
|
<!--type="text"-->
|
||||||
|
<!--style="margin-left: 20px"-->
|
||||||
|
<!--icon="el-icon-delete"-->
|
||||||
|
<!--@click="handleDelete(scope.row)"/>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</el-tooltip>-->
|
||||||
|
<!--</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 v-el-drag-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="GonghuoshangValue">
|
||||||
|
<el-select
|
||||||
|
v-model="form.GonghuoshangValue"
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
style="width:200px"
|
||||||
|
size="small"
|
||||||
|
clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in Gonghuoshang2"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<!--<el-input-->
|
||||||
|
<!--v-model="form.供货商"-->
|
||||||
|
<!--placeholder="供货商"-->
|
||||||
|
<!--size="small"-->
|
||||||
|
<!--clearable-->
|
||||||
|
<!--style="width:200px"-->
|
||||||
|
<!--@click.native="param=1;openSupplier()"/>-->
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="常用符号">
|
||||||
|
Φ × ∠ — ○ ⊥ m² μ δ Ⅰ Ⅱ Ⅲ ∥ ±
|
||||||
|
</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>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getSupplier1,
|
||||||
|
AddGonghuoshang,
|
||||||
|
initDepartmentName,
|
||||||
|
initMaterialCategory,
|
||||||
|
initMaterialVariety,
|
||||||
|
initMeasurementUnit,
|
||||||
|
initMaterialSource,
|
||||||
|
searchmaterial,
|
||||||
|
getSupplier,
|
||||||
|
addData,
|
||||||
|
editData,
|
||||||
|
deleteData,
|
||||||
|
searchCategory,
|
||||||
|
searchVarieties,
|
||||||
|
editCategory,
|
||||||
|
addCategory,
|
||||||
|
deleteCategory,
|
||||||
|
editVariety,
|
||||||
|
addVariety,
|
||||||
|
deleteVariety
|
||||||
|
} from '@/api/PurchasingCenter/MaterialMProcure'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
Gonghuoshang: [],
|
||||||
|
Gonghuoshang2: [],
|
||||||
|
GonghuoshangValue: '',
|
||||||
|
form3: {
|
||||||
|
供货商名称: ''
|
||||||
|
},
|
||||||
|
rules3: {
|
||||||
|
供货商名称: [{ required: true, message: '请输入供货商名称', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
dialogFormVisible3: false,
|
||||||
|
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: 30,
|
||||||
|
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: {
|
||||||
|
物料流水号: '',
|
||||||
|
物料类别流水号: '',
|
||||||
|
物料品种流水号: '',
|
||||||
|
物料名称: '',
|
||||||
|
物料全名: '',
|
||||||
|
物料规格: '',
|
||||||
|
物料型号: '',
|
||||||
|
计量单位流水号: '',
|
||||||
|
物料来源流水号: '',
|
||||||
|
GonghuoshangValue: ''
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||||
|
GonghuoshangValue: [{ 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' }]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'name',
|
||||||
|
'id',
|
||||||
|
'token'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
this.searchMaterialCategory()
|
||||||
|
this.getGonghuoshang()
|
||||||
|
this.searchMaterial()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getGonghuoshang() { // 供货商初始化查询
|
||||||
|
this.Gonghuoshang = []
|
||||||
|
this.Gonghuoshang2 = []
|
||||||
|
getSupplier1(0, 0).then(response => {
|
||||||
|
response.data.map(v => {
|
||||||
|
this.Gonghuoshang.push({
|
||||||
|
label: v.供货商,
|
||||||
|
value: v.供货商流水号
|
||||||
|
})
|
||||||
|
this.Gonghuoshang2.push({
|
||||||
|
label: v.供货商,
|
||||||
|
value: v.供货商流水号
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
if (this.$refs['form3'] !== undefined) {
|
||||||
|
this.$refs['form3'].resetFields()
|
||||||
|
}
|
||||||
|
this.form3.供货商名称 = ''
|
||||||
|
this.dialogFormVisible3 = true
|
||||||
|
},
|
||||||
|
AddGonghuoshang(formName) {
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
AddGonghuoshang(this.form3.供货商名称).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
this.dialogFormVisible3 = false
|
||||||
|
} else {
|
||||||
|
this.dialogFormVisible3 = false
|
||||||
|
this.$message.error('添加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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.GonghuoshangValue !== '' ? 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.GonghuoshangValue).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.form.GonghuoshangValue], '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>
|
||||||
|
.el-select{
|
||||||
|
width:190px
|
||||||
|
}
|
||||||
|
.el-input{
|
||||||
|
width:190px
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<!--clearable-->
|
<!--clearable-->
|
||||||
<!--@dblclick.native="param=0;openSupplier()"/>-->
|
<!--@dblclick.native="param=0;openSupplier()"/>-->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col style="width: 450px">
|
<el-col style="width: 550px">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@@ -131,6 +131,9 @@
|
|||||||
@click="CategoryMaintenance">维护物料类别
|
@click="CategoryMaintenance">维护物料类别
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="open()">新增供货商</el-button>
|
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="open()">新增供货商</el-button>
|
||||||
|
<el-badge :value="weishenhe" class="item">
|
||||||
|
<el-button type="primary" size="small" @click="daishenhe()">待审核</el-button>
|
||||||
|
</el-badge>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -480,6 +483,61 @@
|
|||||||
<el-button type="primary" @click="AddGonghuoshang('form3')">确定</el-button>
|
<el-button type="primary" @click="AddGonghuoshang('form3')">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="采购部申请物料" center style="min-height: 300px" width="700px">
|
||||||
|
<el-form>
|
||||||
|
<el-table
|
||||||
|
:data="tableData5"
|
||||||
|
style="width: 100%;margin-top: 3px"
|
||||||
|
height="300"
|
||||||
|
size="mini"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
|
stripe>
|
||||||
|
<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="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<el-button type="primary" size="small" @click="Tongguo(scope.row)">通过</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
width="400"
|
||||||
|
trigger="click">
|
||||||
|
<span>打回原因:</span>
|
||||||
|
<el-input v-model="打回原因" placeholder="打回原因" size="small" clearable/>
|
||||||
|
<el-button type="danger" size="small" @click="queren()">确认</el-button>
|
||||||
|
<el-button slot="reference" type="danger" size="small" @click="Dahui(scope.row)">打回</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible4=false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -504,13 +562,22 @@ import {
|
|||||||
deleteCategory,
|
deleteCategory,
|
||||||
editVariety,
|
editVariety,
|
||||||
addVariety,
|
addVariety,
|
||||||
deleteVariety
|
deleteVariety,
|
||||||
|
getMaterial,
|
||||||
|
searchmateria5,
|
||||||
|
Dahui,
|
||||||
|
Tongguo
|
||||||
} from '@/api/PurchasingCenter/MaterialManagement'
|
} from '@/api/PurchasingCenter/MaterialManagement'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
打回原因: '',
|
||||||
|
物料流水号: '',
|
||||||
|
tableData5: [],
|
||||||
|
dialogFormVisible4: false,
|
||||||
|
weishenhe: 0,
|
||||||
Gonghuoshang: [],
|
Gonghuoshang: [],
|
||||||
Gonghuoshang2: [],
|
Gonghuoshang2: [],
|
||||||
GonghuoshangValue: '',
|
GonghuoshangValue: '',
|
||||||
@@ -605,11 +672,62 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getMaterial()
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
this.searchMaterialCategory()
|
this.searchMaterialCategory()
|
||||||
this.getGonghuoshang()
|
this.getGonghuoshang()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 通过
|
||||||
|
Tongguo(row) {
|
||||||
|
this.$confirm('通过该物料, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
Tongguo(row.物料流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.getMaterial()
|
||||||
|
this.daishenhe()
|
||||||
|
this.searchMaterial()
|
||||||
|
this.$message.success('通过成功')
|
||||||
|
} else { this.$message.error('通过失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消通过'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 打回
|
||||||
|
Dahui(row) {
|
||||||
|
this.物料流水号 = row.物料流水号
|
||||||
|
},
|
||||||
|
// 打回确认
|
||||||
|
queren() {
|
||||||
|
Dahui(this.物料流水号, this.打回原因).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.getMaterial()
|
||||||
|
this.daishenhe()
|
||||||
|
this.$message.success('打回成功')
|
||||||
|
} else { this.$message.error('打回失败') }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询采购部物料申请明细
|
||||||
|
daishenhe() {
|
||||||
|
this.tableData5 = []
|
||||||
|
searchmateria5(0, 0, 0, 0, 0, 0, 0, 0, 1, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).then(response => {
|
||||||
|
this.tableData5 = response.data.result
|
||||||
|
this.dialogFormVisible4 = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询待审核物料数量
|
||||||
|
getMaterial() {
|
||||||
|
getMaterial().then(response => {
|
||||||
|
this.weishenhe = response.data[0].数量
|
||||||
|
})
|
||||||
|
},
|
||||||
getGonghuoshang() { // 供货商初始化查询
|
getGonghuoshang() { // 供货商初始化查询
|
||||||
this.Gonghuoshang = []
|
this.Gonghuoshang = []
|
||||||
this.Gonghuoshang2 = []
|
this.Gonghuoshang2 = []
|
||||||
@@ -726,7 +844,7 @@ export default {
|
|||||||
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
|
||||||
},
|
},
|
||||||
submitEdit() {
|
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.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() {
|
||||||
this.searchMaterial()
|
this.searchMaterial()
|
||||||
this.dialogFormVisible1 = false
|
this.dialogFormVisible1 = false
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user