物料管理

This commit is contained in:
zhangdingyu
2019-09-28 14:53:40 +08:00
parent 663d74c892
commit 8dcaa3c57c
4 changed files with 79 additions and 24 deletions

View File

@@ -1,5 +1,16 @@
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: '',

View File

@@ -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()
})

View File

@@ -292,7 +292,7 @@
</el-table-column>
<el-table-column align="center" label="创立日期">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
{{ scope.row.创立日期&&scope.row.创立日期!=='1900-01-01' ? scope.row.创立日期 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本">
@@ -435,7 +435,6 @@ export default {
methods: {
searchData() {
searchData1(this.contractNumValue).then(response => {
console.log(response.data, 222)
for (let j = 0; j < response.data.length; j++) {
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
}

View File

@@ -17,7 +17,7 @@
<span class="svg-container svg-container_login">
<svg-icon icon-class="username" />
</span>
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="on" placeholder="请输入用户名" @input.native="changeUser" />
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="off" placeholder="请输入用户名" @input.native="changeUser" />
</el-form-item>
<el-form-item prop="password">
<span class="svg-container">