This commit is contained in:
liushuai
2019-09-27 12:06:07 +08:00
14 changed files with 147 additions and 73 deletions

View File

@@ -27,8 +27,8 @@
:data="tableData1"
border
highlight-current-row
style="width: 100%;max-height: 250px;"
height="250px"
style="width: 100%"
height="400px"
size="mini"
@row-click="searchTable2">
<el-table-column label="采购合同编号" align="center" min-width="100">
@@ -83,7 +83,7 @@
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<el-table-column label="图号" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
@@ -98,12 +98,12 @@
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" min-width="100">
<el-table-column label="采购总数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.采购总数量 }}
</template>
</el-table-column>
<el-table-column label="已到货数量" align="center" min-width="100">
<el-table-column label="已到货数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.已到货数量 }}
</template>

View File

@@ -39,10 +39,10 @@
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
<el-button slot="reference" plain size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable01(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
<el-button type="warning" plain size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="danger" plain size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -100,7 +100,7 @@
clearable
@dblclick.native="param=0;openSupplier()"/>
</el-col>
<el-col style="width: 330px">
<el-col style="width: 450px">
<el-button
type="success"
icon="el-icon-search"
@@ -114,9 +114,10 @@
type="warning"
icon="el-icon-refresh"
size="small"
style="margin:10px 10px 3px"
style="margin:10px 5px 3px"
@click="CategoryMaintenance">维护物料类别
</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-col>
</el-row>
</el-card>
@@ -193,7 +194,7 @@
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible" title="选择供货商" center width="400px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="选择供货商" center width="400px">
<el-input v-model="supplier1" placeholder="供货商" size="small" clearable style="width:200px"/>
<el-button
type="success"
@@ -230,7 +231,7 @@
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
<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">
@@ -336,7 +337,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="物料类别维护" center width="1200px">
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="物料类别维护" center width="1200px">
<div style="width: 47%;display: inline-block">
<el-card>
<span>物料类别:</span>
@@ -437,11 +438,28 @@
</el-card>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" title="新增供应商" center style="min-height: 300px" width="400px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="供货商名称" prop="供货商名称">
<el-input v-model="form3.供货商名称" placeholder="供货商名称" size="small" clearable style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible3=false">取消</el-button>
<el-button type="primary" @click="AddGonghuoshang('form3')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
AddGonghuoshang,
initDepartmentName,
initMaterialCategory,
initMaterialVariety,
@@ -466,6 +484,13 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
form3: {
供货商名称: ''
},
rules3: {
供货商名称: [{ required: true, message: '请输入供货商名称', trigger: 'blur' }]
},
dialogFormVisible3: false,
DepartmentValue: '', // 部门名称
Department: [], // 部门数组
MaterialCategoryValue: '', // 物料类别
@@ -554,6 +579,28 @@ export default {
this.searchMaterialCategory()
},
methods: {
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') // 计量单位

View File

@@ -75,11 +75,11 @@
:data="tableData1"
size="mini"
border
style="width: 100%;max-height: 350px;"
height="350px"
style="width: 100%"
height="500px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand">
<el-table-column label="详情" type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
@@ -110,7 +110,7 @@
</el-form>
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="220">
<el-table-column label="供应商" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -139,12 +139,12 @@
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="danger" size="small">未通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审核原因" align="center" min-width="150">
<el-table-column label="未通过审核原因" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.未通过审核原因 ? scope.row.未通过审核原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="未通过审批原因" align="center" min-width="150">
<el-table-column label="未通过审批原因" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.未通过原因 ? scope.row.未通过原因 : '—' }}
</template>
@@ -171,7 +171,7 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" min-width="60">
<el-table-column label="总金额" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>