物料管理
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
|
||||
</el-col>
|
||||
<el-col style="width: 280px;margin-top: 10px">
|
||||
<el-col style="width: 280px;margin-top: 3px">
|
||||
<span>物料全称:</span>
|
||||
<el-input
|
||||
v-model="FullNameOfMaterial"
|
||||
@@ -44,7 +44,7 @@
|
||||
size="small"
|
||||
clearable/>
|
||||
</el-col>
|
||||
<el-col style="width: 280px;margin-top: 10px">
|
||||
<el-col style="width: 280px;margin-top: 3px">
|
||||
<span>物料规格:</span>
|
||||
<el-input
|
||||
v-model="MaterialSpecification"
|
||||
@@ -52,7 +52,7 @@
|
||||
size="small"
|
||||
clearable/>
|
||||
</el-col>
|
||||
<el-col style="width: 280px;margin-top: 10px">
|
||||
<el-col style="width: 280px;margin-top: 3px">
|
||||
<span>物料型号:</span>
|
||||
<el-input
|
||||
v-model="MaterialModel"
|
||||
@@ -92,13 +92,26 @@
|
||||
</el-col>
|
||||
<el-col style="width: 280px">
|
||||
<span style="margin-left: 25px">供货商:</span>
|
||||
<el-input
|
||||
v-model="supplier"
|
||||
placeholder="供货商"
|
||||
size="small"
|
||||
<el-select
|
||||
v-model="GonghuoshangValue"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
style="margin-bottom: 3px;margin-top: 10px"
|
||||
clearable
|
||||
@dblclick.native="param=0;openSupplier()"/>
|
||||
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: 450px">
|
||||
<el-button
|
||||
@@ -313,14 +326,27 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供货商" prop="供货商">
|
||||
<el-input
|
||||
v-model="form.供货商"
|
||||
placeholder="供货商"
|
||||
<el-form-item label="供货商" prop="GonghuoshangValue">
|
||||
<el-select
|
||||
v-model="form.GonghuoshangValue"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
style="margin-bottom: 3px;margin-top: 10px"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"
|
||||
@click.native="param=1;openSupplier()"/>
|
||||
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">
|
||||
@@ -459,6 +485,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSupplier1,
|
||||
AddGonghuoshang,
|
||||
initDepartmentName,
|
||||
initMaterialCategory,
|
||||
@@ -484,6 +511,9 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Gonghuoshang: [],
|
||||
Gonghuoshang2: [],
|
||||
GonghuoshangValue: '',
|
||||
form3: {
|
||||
供货商名称: ''
|
||||
},
|
||||
@@ -555,11 +585,11 @@ export default {
|
||||
物料型号: '',
|
||||
计量单位流水号: '',
|
||||
物料来源流水号: '',
|
||||
供货商: ''
|
||||
GonghuoshangValue: ''
|
||||
},
|
||||
rules: {
|
||||
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||
供货商: [{ required: true, message: '请选择供货商', trigger: 'change' }],
|
||||
GonghuoshangValue: [{ required: true, message: '请选择供货商', trigger: 'change' }],
|
||||
物料类别流水号: [{ required: true, message: '请选择物料类别', trigger: 'change' }],
|
||||
物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
|
||||
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
|
||||
@@ -577,8 +607,23 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchMaterialCategory()
|
||||
this.getGonghuoshang()
|
||||
},
|
||||
methods: {
|
||||
getGonghuoshang() { // 供货商初始化查询
|
||||
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()
|
||||
@@ -627,8 +672,8 @@ export default {
|
||||
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.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)
|
||||
})
|
||||
@@ -692,7 +737,7 @@ export default {
|
||||
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.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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user