This commit is contained in:
liushuai
2020-03-21 17:10:21 +08:00
parent 3c554e5909
commit e314062d42
23 changed files with 473 additions and 793 deletions

View File

@@ -87,6 +87,18 @@
</el-row>
<el-row>
<el-input v-model="MaterialName" placeholder="物料名称/物料规格/物料型号" style="width: 220px" size="small" clearable/>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 240px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始申请日期"
end-placeholder="结束申请日期"/>
<!--<el-input v-model="MaterialSpecification" placeholder="物料规格" size="small" clearable/>-->
<!--<el-input v-model="MaterialModel" placeholder="物料型号" size="small" clearable/>-->
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="pageCurrent=1;PageSize = 30;searchMaterial()">查询</el-button>
@@ -98,7 +110,7 @@
<el-table
v-loading="loading"
:data="tableData"
style="width: 945px;margin-top: 3px"
style="width: 1200px;margin-top: 3px"
height="600"
size="mini"
highlight-current-row
@@ -124,6 +136,16 @@
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column align="center" label="申请时间" width="132px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.操作日期 ? scope.row.操作日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column align="center" label="申请人" width="132px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="审核状态" width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.是否通过===0" type="primary" size="small">未审核</el-tag>
@@ -131,36 +153,36 @@
<el-tag v-if="scope.row.是否通过===2" type="danger" size="small">未通过</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="打回原因" width="180px">
<el-table-column align="center" label="打回原因" width="130px">
<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-column label="操作" fixed="right" align="center" width="60">
<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="scope.row.是否通过 === 1"
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
@@ -323,6 +345,7 @@ import { mapGetters } from 'vuex'
export default {
data() {
return {
dateRange: '',
loading: false,
Gonghuoshang: [],
Gonghuoshang2: [],
@@ -388,6 +411,33 @@ export default {
check9: '',
check10: '',
title: '',
pickerOptions: {
shortcuts: [{
text: '上季度',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '过去半年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
picker.$emit('pick', [start, end])
}
}, {
text: '过去一年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
}
}]
},
form: {
物料流水号: '',
物料类别流水号: '',
@@ -480,6 +530,7 @@ export default {
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
},
searchMaterial() { // 物料查询
let check
this.MaterialName !== '' ? this.check1 = 1 : this.check1 = 0 // 物料名称
this.FullNameOfMaterial !== '' ? this.check2 = 1 : this.check2 = 0 // 物料全称
this.MaterialSpecification !== '' ? this.check3 = 1 : this.check3 = 0 // 物料规格
@@ -489,8 +540,9 @@ export default {
this.MeasurementUnitValue !== '' ? this.check7 = 1 : this.check7 = 0 // 计量单位
this.MaterialSourceValue !== '' ? this.check8 = 1 : this.check8 = 0 // 物料来源
this.GonghuoshangValue !== '' ? this.check9 = 1 : this.check9 = 0 // 供货商
this.dateRange ? check = 1 : (check = 0, this.dateRange = '')
this.loading = true
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 => {
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, check, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData = response.data.result
this.total = parseInt(response.data.output[0].ItemCount)
this.loading = false
@@ -555,7 +607,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.form.GonghuoshangValue], 'form', function() {
this.addTable(addData, [this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue, this.id], 'form', function() {
this.dialogFormVisible1 = false
this.searchMaterial()
})