物料管理

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' 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) { export function AddGonghuoshang(num) {
return request({ return request({
url: '', url: '',

View File

@@ -36,7 +36,7 @@
<span>物料名称:</span> <span>物料名称:</span>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable /> <el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable />
</el-col> </el-col>
<el-col style="width: 280px;margin-top: 10px"> <el-col style="width: 280px;margin-top: 3px">
<span>物料全称:</span> <span>物料全称:</span>
<el-input <el-input
v-model="FullNameOfMaterial" v-model="FullNameOfMaterial"
@@ -44,7 +44,7 @@
size="small" size="small"
clearable/> clearable/>
</el-col> </el-col>
<el-col style="width: 280px;margin-top: 10px"> <el-col style="width: 280px;margin-top: 3px">
<span>物料规格:</span> <span>物料规格:</span>
<el-input <el-input
v-model="MaterialSpecification" v-model="MaterialSpecification"
@@ -52,7 +52,7 @@
size="small" size="small"
clearable/> clearable/>
</el-col> </el-col>
<el-col style="width: 280px;margin-top: 10px"> <el-col style="width: 280px;margin-top: 3px">
<span>物料型号:</span> <span>物料型号:</span>
<el-input <el-input
v-model="MaterialModel" v-model="MaterialModel"
@@ -92,13 +92,26 @@
</el-col> </el-col>
<el-col style="width: 280px"> <el-col style="width: 280px">
<span style="margin-left: 25px">供货商:</span> <span style="margin-left: 25px">供货商:</span>
<el-input <el-select
v-model="supplier" v-model="GonghuoshangValue"
placeholder="供货商" placeholder="请选择"
size="small" filterable
style="margin-bottom: 3px;margin-top: 10px" style="margin-bottom: 3px;margin-top: 10px"
clearable size="small"
@dblclick.native="param=0;openSupplier()"/> 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>
<el-col style="width: 450px"> <el-col style="width: 450px">
<el-button <el-button
@@ -313,14 +326,27 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="供货商" prop="供货商"> <el-form-item label="供货商" prop="GonghuoshangValue">
<el-input <el-select
v-model="form.供货商" v-model="form.GonghuoshangValue"
placeholder="供货商" placeholder="请选择"
filterable
style="margin-bottom: 3px;margin-top: 10px"
size="small" size="small"
clearable clearable>
style="width:200px" <el-option
@click.native="param=1;openSupplier()"/> 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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -459,6 +485,7 @@
<script> <script>
import { import {
getSupplier1,
AddGonghuoshang, AddGonghuoshang,
initDepartmentName, initDepartmentName,
initMaterialCategory, initMaterialCategory,
@@ -484,6 +511,9 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
Gonghuoshang: [],
Gonghuoshang2: [],
GonghuoshangValue: '',
form3: { form3: {
供货商名称: '' 供货商名称: ''
}, },
@@ -555,11 +585,11 @@ export default {
物料型号: '', 物料型号: '',
计量单位流水号: '', 计量单位流水号: '',
物料来源流水号: '', 物料来源流水号: '',
供货商: '' GonghuoshangValue: ''
}, },
rules: { rules: {
物料名称: [{ required: true, message: '请输入物料名称', trigger: 'blur' }], 物料名称: [{ 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' }], 物料品种流水号: [{ required: true, message: '请选择物料品种', trigger: 'change' }],
计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }], 计量单位流水号: [{ required: true, message: '请选择计量单位', trigger: 'change' }],
@@ -577,8 +607,23 @@ export default {
created() { created() {
this.fetchData() this.fetchData()
this.searchMaterialCategory() this.searchMaterialCategory()
this.getGonghuoshang()
}, },
methods: { 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() { open() {
if (this.$refs['form3'] !== undefined) { if (this.$refs['form3'] !== undefined) {
this.$refs['form3'].resetFields() this.$refs['form3'].resetFields()
@@ -627,8 +672,8 @@ export default {
this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种 this.MaterialVarietyValue !== '' ? this.check6 = 1 : this.check6 = 0 // 物料品种
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位 this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源 this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
this.supplier !== '' ? this.check9 = 1 : this.check9 = 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.supplierValue).then(response => { 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.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount) this.total = parseInt(response.data.output[0].ItemCount)
}) })
@@ -692,7 +737,7 @@ export default {
this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加']) this.addForm('form', [this.dialogFormVisible1 = true, this.title = '增加'])
}, },
submitAdd() { // 提交增加 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.dialogFormVisible1 = false
this.searchMaterial() this.searchMaterial()
}) })

View File

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

View File

@@ -17,7 +17,7 @@
<span class="svg-container svg-container_login"> <span class="svg-container svg-container_login">
<svg-icon icon-class="username" /> <svg-icon icon-class="username" />
</span> </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>
<el-form-item prop="password"> <el-form-item prop="password">
<span class="svg-container"> <span class="svg-container">