Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0

This commit is contained in:
jiangfuzhuang
2019-05-29 20:29:49 +08:00
14 changed files with 629 additions and 45 deletions

View File

@@ -8,7 +8,7 @@ export function initCraftmen() {
data: {
type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=17'
param: '考核部门编号=20'
}
})
}

View File

@@ -0,0 +1,47 @@
import request from '@/utils/request'
export function searchTableData(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_原材料库存管理_查询',
param: '原材料名称=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function addData(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_新增',
param: '原材料名称=' + num
}
})
}
export function editData(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_编辑',
param: '原材料流水号=' + num1 + '&原材料名称=' + num2
}
})
}
export function deleteCategory(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_删除',
param: '原材料流水号=' + num
}
})
}

View File

@@ -0,0 +1,47 @@
import request from '@/utils/request'
export function searchTableData(num, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_原材料库存管理_查询',
param: '原材料名称=' + num,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function addData(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_新增',
param: '原材料名称=' + num
}
})
}
export function editData(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_编辑',
param: '原材料流水号=' + num1 + '&原材料名称=' + num2
}
})
}
export function deleteCategory(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_原材料库存管理_删除',
param: '原材料流水号=' + num
}
})
}

View File

@@ -8,7 +8,7 @@ export function searchTable1(...group) {
data: {
type: '1',
name: '采购管理_发票结算申请单_查询数据',
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1`,
param: `时间段_check=${group[0]}&开始日期=${group[1]}&结束日期=${group[2]}&是否提交=1&角色编号=${group[5]}`,
Pagination: group[3] + '&' + group[4]
}
})

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request'
// 查询库存数
// 询价状态修改
export function changeInquiryStatus(num) {
return request({
url: '',

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1540798965773" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3335" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M 929.1 736.8 c 0 -17.4 -14.1 -31.6 -31.6 -31.6 H 163.1 V 128.4 c 0 -17.4 -14.1 -31.6 -31.6 -31.6 h -1.9 C 112.2 96.9 98 111 98 128.4 v 639.9 h 799.5 c 17.5 0.1 31.6 -14.1 31.6 -31.5 Z M 929.3 825.5 h -64 V 866 l -63.5 -0.1 v -40.4 h -64 v 40.4 l -63.7 -0.1 V 826 h -64 v 39.8 h -64.3 v -39.3 h -64 v 39.2 h -63.7 v -39.2 h -64 v 39.1 h -63.8 v -40.1 h -64 v 40.1 h -64 V 826 H 98 v 100.8 h 831.1 v -37.3 h 0.2 Z" p-id="3336"></path><path d="M 414.4 631.7 c 3.9 3.6 8.9 5.5 14.1 5.5 c 0.8 0 1.6 0 2.4 -0.1 h 0.4 l 145.1 -22.7 l 330.1 -347.5 c 10.6 -10.7 16.5 -25.5 16.1 -40.5 c -0.3 -15.1 -6.8 -29.6 -17.9 -39.9 l -74.6 -71.9 c -10.1 -9.4 -22.1 -14.3 -34.7 -14.3 c -14.8 0 -29.4 7 -41.1 19.7 L 422.4 469 l -14.7 145.3 l -0.1 0.7 v 0.4 c -0.2 6.1 2.2 12 6.8 16.3 Z M 795 158.6 h 0.3 l 71.2 68.8 v 0.3 l -14.1 15.2 l -71.4 -69.1 l 14 -15.2 Z M 476.5 493.2 L 742.7 215 l 71.5 69.2 l -266.1 278.1 l -82.9 13.6 l 11.3 -82.7 Z" p-id="3337"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -10,14 +10,13 @@
:value="item.value"/>
</el-select>
<span>零件图号:</span>
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" clearable @clear="returnDate = ''">
<el-select v-model="partNumValue" filterable placeholder="零件图号" style="margin-right: 10px" size="small" @change="tableData1=[];tableData2=[];returnDate = '';searchData();">
<el-option
v-for="item in partNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchData()">查询</el-button>
<span>打回时间:</span>
<el-date-picker v-model="returnDate" :clearable="false" type="datetime" placeholder="打回时间" size="small" readonly/>
</el-card>
@@ -219,15 +218,11 @@ export default {
tableRowClassName2({ row }) {
for (let i = 0; i < this.tableData1.length; i++) {
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
if (this.tableData1[i].工序流水号 === row.工序流水号 && this.tableData1[i].工艺编号 !== null) {
if (this.tableData1[i].工序顺序 === row.工序顺序) {
if (this.tableData1[i].工艺编号 !== row.工艺编号 || this.tableData1[i].工艺要求 !== row.工艺要求 || this.tableData1[i].工艺难度等级 !== row.工艺难度等级) {
return 'change'
} else {
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
return 'change'
} else {
return ''
}
return ''
}
}
}
@@ -235,15 +230,11 @@ export default {
tableRowClassName1({ row }) {
for (let i = 0; i < this.tableData2.length; i++) {
row.工艺编号 === null ? row.工艺编号 = 0 : row.工艺编号
if (this.tableData2[i].工序流水号 === row.工序流水号 && this.tableData2[i].工艺编号 !== null) {
if (this.tableData2[i].工序顺序 === row.工序顺序) {
if (this.tableData2[i].工艺编号 !== row.工艺编号 || this.tableData2[i].工艺要求 !== row.工艺要求 || this.tableData2[i].工艺难度等级 !== row.工艺难度等级) {
return 'change'
} else {
if (this.tableData1[i].工序顺序 !== row.工序顺序 && (row.工艺要求 || row.工艺难度等级)) {
return 'change'
} else {
return ''
}
return ''
}
}
}

View File

@@ -0,0 +1,169 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<el-col style="width: 330px">
<span style="margin-left: 10px">原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="small" clearable/>
</el-col>
<el-col style="width: 200px">
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">增加</el-button>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top: 15px">
<el-table :data="tableData" style="width: 100%;min-height: 500px" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-form-item label="原材料名称" prop="RawMaterialName">
<el-input v-model="form.RawMaterialName" placeholder="原材料名称" size="small" clearable/>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取消</el-button>
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTableData, addData, editData, deleteCategory } from '@/api/ManufacturingCenter/RawMaterialsMaintenance'
export default {
data() {
return {
RawMaterialNumber: '',
RawMaterialName: '',
param: 0,
tableData: [],
pageCurrent: 1,
pageSize: 10,
total: null,
dialogFormVisible: false,
title: '',
form: {
RawMaterialName: ''
},
rules: {
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
}
}
},
created() {
this.searchTableData()
},
methods: {
// 获取原材料
searchTableData() {
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = parseInt(response.data.total)
})
},
// 增加
handleAdd() {
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加'])
},
// 提交增加
submitAdd() {
this.addTable(addData, [this.form.RawMaterialName], 'form', function() {
this.dialogFormVisible = false
this.pageCurrent = 1
this.searchTableData()
})
},
// 编辑
handleEdit(row) {
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible = true])
this.form.RawMaterialName = row.原材料名称
this.RawMaterialNumber = row.原材料流水号
},
// 提交编辑
submitEdit() {
this.editTable(editData, [this.RawMaterialNumber, this.form.RawMaterialName], 'form', function() {
this.searchTableData()
this.dialogFormVisible = false
})
},
// 取消
cancel() {
this.dialogFormVisible = false
},
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCategory(row.原材料流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
if (this.tableData && this.tableData.length === 1 && this.pageCurrent > 1) { // 判断删除的是否是最后一页最后一行,如果是且不是第一页,页数减一
this.pageCurrent--
}
this.searchTableData()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTableData()
}
}
}
</script>
<style scoped>
span {
margin: 10px 0px 10px 10px;
}
.el-select{
width:190px
}
.el-input{
width:190px
}
</style>

View File

@@ -0,0 +1,130 @@
<template>
<div class="app-container">
<el-card style="margin-top: 5px">
<el-row>
<el-col :span="7">
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" border @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
</el-col>
<el-col :span="16" style="margin-left: 20px">
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="mini" @click="handleAdd()">增加</el-button>
<el-table :data="tableData" style="margin-top: 15px;width: 100%" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
</el-row>
<el-row style="margin-top: 10px">
<el-table :data="tableData" style="width: 100%" height="500" size="mini" highlight-current-row border>
<el-table-column align="center" label="原材料名称">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-row>
</el-card>
</div>
</template>
<script>
import { searchTableData } from '@/api/ManufacturingCenter/SparePartsPurchase'
export default {
data() {
return {
RawMaterialNumber: '',
RawMaterialName: '',
param: 0,
tableData: [],
pageCurrent: 1,
pageSize: 10,
total: null,
dialogFormVisible: false,
title: '',
form: {
RawMaterialName: ''
},
rules: {
RawMaterialName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }]
}
}
},
created() {
this.searchTableData()
},
methods: {
// 获取原材料
searchTableData() {
searchTableData(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = parseInt(response.data.total)
})
},
// tabledata分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTableData()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTableData()
},
// 多选
handleSelectionChange(val) {
this.materielGroup = []
for (let i = 0; i < val.length; i++) {
this.materielGroup.push(val[i].物料流水号)
}
}
}
}
</script>
<style scoped>
span {
margin: 10px 0px 10px 10px;
}
.el-select{
width:190px
}
.el-input{
width:190px
}
</style>

View File

@@ -117,9 +117,48 @@
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<h3 style="margin-top: 0">采购合同</h3>
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/>
<h3 style="">离线合同</h3>
<h3 id="firstAnchor" style="margin-top: 0">采购合同</h3>
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="contractDetail1"/><hr>
<h3 id="secondAnchor" style="">离线合同</h3>
<div id="offlineContract" style="min-height:500px;margin: 0 auto;width: 800px;border:1px solid black">
<table v-show="contractDetail2.length > 0" class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2"/>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: left;"/>
</tr>
<tr id="tablehead">
<td width="50px">序号</td>
<td colspan="2">名称</td>
<td>规格</td>
<td colspan="2">型号</td>
<td>数量</td>
<td colspan="2">单价</td>
<td colspan="2">合计</td>
<td>交货期</td>
<td colspan="2">备注</td>
</tr>
<tr>
<td>总计</td>
<td id="remark" colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</tr>
</table>
</div>
<!--
<el-table v-loading="" :data="contractDetail2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
<template slot-scope="scope">
@@ -167,12 +206,14 @@
</template>
</el-table-column>
</el-table>
-->
</div>
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
import $ from 'jquery'
export default {
name: '', // 管理审批
@@ -204,14 +245,56 @@ export default {
this.fetchData()
},
methods: {
showOffline(row) {
console.log(row, 222)
const children = document.getElementsByClassName('tableData')
const parent = document.getElementsByClassName('offlineContract')[0]
if (children.length !== 0) {
for (let i = children.length - 1; i >= 0; i--) {
parent.removeChild(children[i])
}
}
const tr = []
let length = 0
this.contractDetail2.length < 15 ? length = 15 : length = this.contractDetail2.length
for (let i = 0; i < length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = `<td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/><td colspan="2" style="height: 40px"/><td style="height: 40px"/><td colspan="2" style="height: 40px"/>`
$('#tablehead').after(tr[i])
}
let total = 0
for (let j = 0; j < this.contractDetail2.length; j++) {
document.getElementsByClassName('tableData')[j].children[0].innerHTML = j + 1
document.getElementsByClassName('tableData')[j].children[1].innerHTML = this.contractDetail2[j].物料名称
document.getElementsByClassName('tableData')[j].children[2].innerHTML = this.contractDetail2[j].物料规格
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.contractDetail2[j].物料型号
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.contractDetail2[j].数量
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.contractDetail2[j].单价
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.contractDetail2[j].数量 * this.contractDetail2[j].单价).toFixed(2)
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.contractDetail2[j].交货期要求
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.contractDetail2[j].备注
total += Number(this.contractDetail2[j].数量 * this.contractDetail2[j].单价)
}
total = total.toFixed(2)
document.getElementById('contractNum').innerHTML = row.离线合同编号
document.getElementById('contractName').innerHTML = row.离线合同名称
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
document.getElementById('total').innerHTML = total
document.getElementById('remark').innerHTML = row.离线合同备注
},
searchContactDetail(row) {
document.documentElement.scrollTop = this.$el.querySelector('#firstAnchor').offsetTop
searchContactDetail(row.采购合同流水号).then(response => {
this.contractDetail1 = response.data[0].合同内容
})
},
searchOfflineContactDetail(row) { // 查询离线合同明细
document.documentElement.scrollTop = this.$el.querySelector('#secondAnchor').offsetTop
searchMateriel(row.离线合同流水号).then(response => {
this.contractDetail2 = response.data
this.showOffline(row)
})
},
getSummaries(param) { // 合计
@@ -245,7 +328,6 @@ export default {
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 1).then(response => {
console.log(response.data)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -261,7 +343,6 @@ export default {
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
})

View File

@@ -76,17 +76,17 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>

View File

@@ -66,7 +66,7 @@
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="60">
<el-table-column label="采购审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
@@ -76,17 +76,7 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<el-table-column label="总经理审批" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
@@ -96,6 +86,16 @@
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(scope.row)">审批</el-button>
@@ -194,11 +194,11 @@ export default {
},
methods: {
fetchData() {
console.log(this.token)
// console.log(this.token)
},
searchTable1() {
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1, this.token).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')

View File

@@ -93,12 +93,12 @@
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="80">
<el-table-column label="分配数量" align="center" min-width="80" prop="零件数量">
<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" min-width="100" prop="使用滞货数量">
<template slot-scope="scope">
{{ Number(scope.row.使用滞货数量) }}
</template>
@@ -108,11 +108,21 @@
{{ scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注筛选">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商筛选">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0 0 0;">
<el-pagination
@@ -653,6 +663,18 @@ export default {
name: '', // 离线合同
data() {
return {
source: [
{
text: 'BZ',
value: 1
},
{
text: 'WG',
value: 2
}
],
remarkFilters: [],
supplierFilters: [],
groupPartNumGroup: [], // 组件零件流水号组
offlineContractsValue: '',
offlineContracts: [],
@@ -806,6 +828,15 @@ export default {
this.searchTable00()
},
methods: {
filterHandler0(value, row) { // 筛选备注
return row['备注'] === value
},
filterHandler(value, row) { // 筛选供货商
return row['供货商'] === value
},
filterSource(value, row) {
return Number(row['零件类型']) === Number(value)
},
// 变更询价状态
changeInquiryStatus() {
this.$confirm('确定变更询价状态?', '提示', {
@@ -1332,6 +1363,18 @@ export default {
searchMaterial(this.pageCurrent00, this.pageSize00, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
this.tableData00 = response.data.rows
this.total00 = response.data.total
const remark = []
const supplier = []
this.remarkFilters = []
this.supplierFilters = []
response.data.rows.map(v => {
if (!remark.includes(v.备注)) {
remark.push(v.备注)
supplier.push(v.供货商)
this.remarkFilters.push({ text: v.备注, value: v.备注 })
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
}
})
})
},
handleSizeChange00(val) { // 标准件和外购件列表分页

View File

@@ -25,19 +25,94 @@
import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import { searchTable1 } from '@/api/PurchasingCenter/PurchaseContractApproval'
import { initApproval, initApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { searchTable1 as searchTableInvoice } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
export default {
components: {
Breadcrumb,
Hamburger
},
data() {
return {
timer: '',
noticeContract: null,
noticeFund: null,
noticeInvoice: null
}
},
computed: {
...mapGetters([
'sidebar',
'avatar'
'avatar',
'name',
'id',
'token'
])
},
mounted() {
if (this.id.toString() === '3') {
this.checkApproval()
this.timer = setInterval(this.checkApproval, 1000 * 60 * 5)
}
},
beforeDestroy() {
clearInterval(this.timer)
},
methods: {
checkApproval() {
searchTable1(1, 999, 0, null, null, 0, 0, 0, 0, 0, 0).then(res => {
if (res.data.total) {
this.noticeContract = null
this.noticeContract = this.$notify.info({
title: '提示',
message: '您有采购合同待审批,请及时处理,点击查看',
onClick: () => {
this.$router.push({ path: '/PurchaseContractApproval/index' })
setTimeout(this.noticeContract.close(), 1000)
},
duration: 1000 * 60
})
}
})
const p1 = new Promise((resolve, reject) => {
initApproval(1, 999, 1).then(res => {
resolve(res)
})
})
const p2 = new Promise((resolve, reject) => {
initApprovalOffline(1, 999, 1).then(res => {
resolve(res)
})
})
Promise.race([p1, p2]).then(res => {
if (res.data.total) {
this.noticeFund = this.$notify.info({
title: '提示',
message: '您有合同请款申请待审批,请及时处理,点击查看',
onClick: () => {
this.$router.push({ path: '/FundApproval2/index' })
setTimeout(this.noticeFund.close(), 1000)
},
duration: 1000 * 60 * 5
})
}
})
searchTableInvoice(0, null, null, 1, 999, this.token).then(res => {
if (res.data.total) {
this.noticeInvoice = null
this.noticeInvoice = this.$notify.info({
title: '提示',
message: '您有发票结算申请待审批,请及时处理,点击查看',
onClick: () => {
this.$router.push({ path: '/InvoiceSettlementApprove/index' })
setTimeout(this.noticeInvoice.close(), 1000)
},
duration: 1000 * 60 * 5
})
}
})
},
toggleSideBar() {
this.$store.dispatch('ToggleSideBar')
},