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

This commit is contained in:
caoxinyu
2019-03-15 09:03:29 +08:00
17 changed files with 781 additions and 616 deletions

View File

@@ -69,3 +69,15 @@ export function getTable2(stepNumber) {
}
})
}
// 正在加工零件
export function searchParts(stepNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_加工顺序调整_查询正在加工零件工序',
param: '终端编号=' + stepNumber
}
})
}

View File

@@ -144,3 +144,14 @@ export function getTable8(code) {
}
})
}
export function isMachining(code) {
return request({
url: '',
method: 'post',
data: {
type: 2,
name: '车间生产管理工艺_零件撤出待加工库',
param: '工艺计划流水号=' + code + '&结果=11111=string=output'
}
})
}

View File

@@ -7,7 +7,7 @@ export function initApproval(pageCurrent, pageSize, state) {
method: 'post',
data: {
type: '1',
name: '采购管理_请款表_查询数据_审批付款',
name: '采购管理_采购合同_审批付款_查询数据',
param: `审批_付款状态=${state}`,
Pagination: pageCurrent + '&' + pageSize
}
@@ -20,8 +20,8 @@ export function execApproval(num1, num2, reason, person, state) {
method: 'post',
data: {
type: '2',
name: '采购管理_请款表_修改数据_审批付款',
param: `采购请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
name: '采购管理_采购合同_审批付款_修改数据',
param: `采购合同请款流水号=${num1}&审批_付款情况流水号=${num2}&未通过原因=${reason}&操作员编号=${person}&审批_付款状态=${state}`
}
})
}
@@ -39,7 +39,19 @@ export function initApprovalOffline(pageCurrent, pageSize, state) {
})
}
// 查询离线合同请款信息明细
export function searchRequsetFundDetail(num) {
export function searchRequsetFundDetail1(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_请款明细_查询数据',
param: `采购合同请款流水号=${num}`
}
})
}
// 查询离线合同请款信息明细
export function searchRequsetFundDetail2(num) {
return request({
url: '',
method: 'post',

View File

@@ -1,5 +1,16 @@
import request from '@/utils/request'
// 查询供应商
export function searchSupplier() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件'
}
})
}
// 根据条件查发票结算申请单
export function searchTable1(...group) {
return request({
@@ -61,51 +72,75 @@ export function searchTable2(num) {
}
})
}
// 入库单查询
export function searchInboundCard(data1, data2) {
// 根据供应商查询采购合同
export function searchPurchase(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单查询',
param: '入库单号_check=' + data1 + '&入库单号=' + data2
name: '采购管理_采购合同_查询数据',
param: '供应商流水号_check=1&供应商流水号=' + data
}
})
}
// 入库单明细查询
export function searchInboundCardDetail(data1) {
// 根据供应商查询离线合同
export function searchOffline(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_采购入库单_入库单明细_查询数据',
param: '采购入库单流水号=' + data1
name: '采购管理_离线合同_查询数据',
param: '供应商流水号_check=1&供应商流水号=' + data
}
})
}
// 发票结算申请单明细增加
export function addTable2(data, group) {
// 查询采购合同明细
export function searchPurchaseDetail(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同明细_查询数据',
param: '采购合同流水号=' + data
}
})
}
// 查询离线合同明细
export function searchOfflineDetail(data) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同明细_查询数据',
param: '离线合同流水号=' + data
}
})
}
// 发票结算申请单明细增加-1采购/2离线
export function addTable2(data, group1, group2, type) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_增加数据',
param: '发票结算申请单流水号=' + data + '&采购入库单流水号组=' + group
param: '发票结算申请单流水号=' + data + '&合同明细流水号组=' + group1 + '&到票数量组=' + group2 + '&合同类型=' + type
}
})
}
// 发票结算申请单明细删除
export function deleteTable2(group) {
export function deleteTable2(data) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_发票结算申请单明细_删除数据',
param: '发票结算申请单明细流水号=' + group
param: '发票结算申请单明细流水号=' + data
}
})
}

View File

@@ -11,66 +11,6 @@ export function searchTable0(check, date1, date2) {
}
})
}
// 初始化合同
export function initContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_查询数据'
}
})
}
// 查询表1
export function searchTable1(...params) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_查询数据',
param: '采购合同流水号_check=' + params[2] + '&采购合同流水号=' + params[3] + '&供应商名称_check=' + params[4] + '&供应商名称=' + params[5],
Pagination: params[0] + '&' + params[1]
}
})
}
// 查询请款进度
export function searchCondition(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_请款进度_查询数据',
param: '采购合同流水号=' + num1
}
})
}
// 请款
export function requestFund(num1, money, time, id) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购请款表_增加数据',
param: `采购合同流水号=${num1}&请款金额=${money}&请款人=${id}&请款时间=${time}`
}
})
}
// 取消请款
export function cancelRequestFund(num1) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购请款表_删除数据',
param: '采购请款流水号=' + num1
}
})
}
// 采购合同内容查询
export function searchContract(num) {
return request({
@@ -83,3 +23,75 @@ export function searchContract(num) {
}
})
}
// 查询请款表
export function searchRequestFund(pageCurrent, pageSize, check1, start, end, check2, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_请款_查询数据',
param: `时间段_check=${check1}&开始时间=${start}&结束时间=${end}&供应商流水号_check=${check2}&供应商流水号=${num}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询供应商
export function searchSupplier() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_供应商_查询数据_根据条件'
}
})
}
// 查询离线合同待请款信息
export function submitRequestFund(contractGroup, sumGroup, supplier, money, person) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_采购合同_请款_增加数据',
param: `采购合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person}`
}
})
}
// 查询离线合同待请款信息
export function searchRequsetFundDetail(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_请款明细_查询数据',
param: `采购合同请款流水号=${num}`
}
})
}
// 取消请款
export function cancelRequestFund(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_请款_删除数据',
param: `采购合同请款流水号=${num}`
}
})
}
// 查询离线合同待请款信息
export function searchPurchaseContract(check, num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购合同_查询数据',
param: `供应商流水号_check=${check}&供应商流水号=${num}`
}
})
}

View File

@@ -22,7 +22,7 @@ const service = axios.create({
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间git
timeout: 1500000 // 请求超时时间
})
// request拦截器

View File

@@ -831,7 +831,6 @@ export default {
if (this.result === this.multipleSelection.length) {
this.$message.success('投产成功')
this.total = 0
this.pageSize = 10
this.pageList = 1
this.getTable()
this.checked_baitu = false

View File

@@ -3,7 +3,7 @@
<el-card>
<span>工位号:</span>
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable()">
<el-select v-model="MachineValue" filterable size="small" style="width:220px;margin-bottom:10px" placeholder="工位号" @change="searchTable();searchParts()">
<el-option
v-for="item in Machine"
:key="item.value"
@@ -15,6 +15,8 @@
</el-select>
<el-button type="success" class="el-icon-refresh" size="small" style="margin: 10px 0 0 10px" @click="Refresh">刷新工位</el-button>
<span v-if="lengths !== 0" style="color: #53A3F7;font-size: 14px"> 加工零件 {{ Parts }};加工工序 {{ gongxu }}</span>
<span v-if="lengths === 0" style="color: #53A3F7;font-size: 14px"> 无正在加工零件</span>
<el-badge :value="num" :max="99" class="item">
<el-button size="small" type="text" @click="dialogFormVisible=true;Jurisdiction()">调序权限</el-button>
</el-badge>
@@ -329,11 +331,14 @@
</template>
<script>
import { getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
import { wsuri, name } from '@/utils/request'
export default {
data() {
return {
Parts: '',
gongxu: '',
lengths: '',
a: 1,
b: 1,
expands: [],
@@ -363,6 +368,7 @@ export default {
watch: {
MachineValue(val) {
this.searchTable()
this.searchParts()
}
},
created() {
@@ -371,8 +377,19 @@ export default {
this.initWebsocket()
},
methods: {
searchParts() {
this.Parts = ''
this.gongxu = ''
this.lengths = ''
searchParts(this.MachineValue).then(response => {
this.lengths = response.data.length
if (response.data.length !== 0) {
this.Parts = response.data[0].零件图号_零件工艺计划
this.gongxu = response.data[0].工艺名称
}
})
},
getRowKeys(row) {
console.log(row)
return row.零件图号
},
selectMachine(row) {

View File

@@ -343,12 +343,12 @@ export default {
if (this.multipleSelection[i].人员编号 === '') {
this.$message.error('请选择工艺员')
} else {
this.result = 0
save(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号, this.multipleSelection[i].零件号).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.multipleSelection.length) {
this.$message.success('保存成功')
this.PageCurrent = 1
this.PageSize = 10
this.getTable()
} else if (i === this.multipleSelection.length - 1 && this.result !== this.multipleSelection.length) {
this.$message.error('存在保存失败项')

View File

@@ -367,11 +367,13 @@
</div>
</template>
<script>
import { handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
import { isMachining, handlechange3, getTable8, getTree, fn, dialogtablevisible, getNames, getMachines, getGroups, getTable, getTable2, handlechange, handlechange2 } from '@/api/ManufacturingCenter/ProcessingStatusEdit'
export default {
data() {
return {
Num2: '',
gongyijihualiushuihao: [[]],
midd: 0,
ssks: '',
cjscgy: '',
@@ -562,6 +564,7 @@ export default {
this.result = []
this.kaoqinbianhao = [[]]
this.gongxuliushuihao = [[]]
this.gongyijihualiushuihao = [[]]
this.process = [[]]
this.planDate = [[]]
this.worker = [[]]
@@ -579,6 +582,7 @@ export default {
this.投产数量.push(response.data.rows[i].投产数量)
this.kaoqinbianhao[i] = []
this.gongxuliushuihao[i] = []
this.gongyijihualiushuihao[i] = []
this.process[i] = []
this.planDate[i] = []
this.worker[i] = []
@@ -594,6 +598,7 @@ export default {
if (response.data[k].工艺计划流水号 === this.liushuihao) {
this.kaoqinbianhao[i][k] = response.data[k].工作者考勤编号
this.gongxuliushuihao[i][k] = response.data[k].工序流水号
this.gongyijihualiushuihao[i][k] = response.data[k].工艺计划流水号
this.process[i][k] = response.data[k].工艺名称简称
this.planDate[i][k] = response.data[k].计划日期_短
this.worker[i][k] = response.data[k].员工姓名
@@ -642,42 +647,54 @@ export default {
}
this.title = this.process[index][a]
this.Num = this.gongxuliushuihao[index][a]
this.Num2 = this.gongyijihualiushuihao[index][a]
this.dialogFormVisible = true
}
},
// 编辑确定
handleChange() {
if (this.midd === 0) {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange2(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
handlechange(this.Num, this.form.完成时间).then(response => {
isMachining(this.Num2).then(res => {
if (res.data.output[0].结果 === '0') {
this.$message.error('该零件正在加工,不能手动完成')
} else {
handlechange3(this.Num, this.form.考勤编号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
this.getTableData()
handlechange(this.Num, this.form.完成时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('信息编辑成功')
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
}).then(() => {
this.getTableData()
})
} else {
this.$message.error('信息编辑失败')
}
})
}

View File

@@ -1442,9 +1442,6 @@ export default {
this.bianliang1.push(this.tableData1[i].工艺计划流水号)
}
discharge(this.bianliang1).then(response => {
this.total1 = 0
this.pageSize1 = 10
this.pageList1 = 1
this.Selection1()
})
},

View File

@@ -2,38 +2,44 @@
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款" align="center" min-width="70">
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款 }}
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="70">
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审" align="center" min-width="200">
<el-table-column label="审" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData1" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</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-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>
</template>
@@ -77,7 +83,7 @@
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table :data="gridData2" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
@@ -113,7 +119,7 @@
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
export default {
@@ -128,7 +134,8 @@ export default {
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
gridData1: [],
gridData2: []
}
},
computed: {
@@ -179,9 +186,14 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable01(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
this.gridData1 = response.data
})
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
this.gridData2 = response.data
})
},
yesApproval(row) { // 通过审批
@@ -190,7 +202,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 1).then(response => {
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
@@ -208,7 +220,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 1).then(response => {
execApproval(row.采购合同请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()

View File

@@ -2,38 +2,44 @@
<div class="app-container">
<el-card>
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="采购合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款" align="center" min-width="70">
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请款 }}
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="70">
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="70">
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="付款" align="center" min-width="200">
<el-table-column label="审核" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData1" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</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-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>
</template>
@@ -77,7 +83,7 @@
<el-table-column label="付款" align="center" width="320">
<template slot-scope="scope">
<el-popover placement="right" width="400" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary>
<el-table :data="gridData2" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
@@ -113,7 +119,7 @@
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
import { mapGetters } from 'vuex'
export default {
@@ -128,7 +134,8 @@ export default {
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData: []
gridData1: [],
gridData2: []
}
},
computed: {
@@ -178,9 +185,14 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable01(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
this.gridData1 = response.data
})
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
this.gridData = response.data
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
this.gridData2 = response.data
})
},
yesApproval(row) { // 通过付款
@@ -189,7 +201,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购请款流水号, 1, '通过', this.id, 2).then(response => {
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
// 记录付款金额及时间
@@ -208,7 +220,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购请款流水号, 2, value, this.id, 2).then(response => {
execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()

View File

@@ -3,13 +3,13 @@
<el-card>
<span>发票号:</span>
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
</el-card>
<el-card>
<h4 style="margin-top: 5px">发票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 400px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 300px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
@@ -42,6 +42,11 @@
</el-form>
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="发票号" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.发票号 }}
@@ -72,7 +77,7 @@
{{ 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="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
@@ -82,7 +87,7 @@
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</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.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
@@ -92,16 +97,6 @@
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
@@ -124,114 +119,49 @@
</el-card>
<el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
<span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreOrder()">追加入库</el-button>
<el-button :disabled="group2.length === 0" type="danger" size="small" icon="el-icon-delete" style="margin-left:10px" @click="deleteTable2()">移除入库单</el-button>
<el-table ref="multipleTable" :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3" @selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="35"/>
<el-table-column label="入库单号" align="center" min-width="100">
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
{{ 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" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
{{ 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" min-width="150">
<template slot-scope="scope">
{{ scope.row.仓库 }}
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.合同编号 }}
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="合同名称" align="center" min-width="100">
<template slot-scope="scope">
{{ 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.货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
{{ 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">
<template slot-scope="scope">
{{ scope.row.供应商 }}
</template>
</el-table-column>
<el-table-column label="业务员" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务员 }}
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类型" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库类型 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<h4>采购入库单明细</h4>
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100" prop="数量">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -253,8 +183,14 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="已付款项">
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
<el-form-item label="供应商" prop="supplierValue">
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑发票结算申请单'" placeholder="供应商" filterable size="small">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -270,15 +206,22 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
<el-form-item label="已付款项">
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注" style="width: 500px"/>
</el-form-item>
<el-col :span="12">
<el-form-item label="是否费用类">
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
</el-col>
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
<el-upload
@@ -289,7 +232,7 @@
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
@@ -304,119 +247,77 @@
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
<span>入库单号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="searchInboundCard()">查询</el-button>
<el-table ref="multipleTable" :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="35"/>
<el-table-column label="入库单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" width="100" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="到货单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货单号 }}
</template>
</el-table-column>
<el-table-column label="到货日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
</template>
</el-table-column>
<span>供应商</span>
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
<el-radio label="采购合同" border/>
<el-radio label="离线合同" border/>
</el-radio-group>
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
<el-table-column label="供应商" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="业务员" align="center" min-width="70">
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
{{ 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" min-width="100">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类别" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.入库类别 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
</template>
</el-table-column>
</el-table>
<el-table :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="35"/>
<el-table-column label="名称" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="150">
<el-table-column label="图号或型号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row. }}
{{ 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" min-width="150">
<template slot-scope="scope">
{{ scope.row.规格 }}
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100" prop="数量">
<el-table-column label="采购数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" width="100">
<el-table-column label="已到货数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
{{ scope.row.已到货数量 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" width="100">
<el-table-column label="已到票数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
{{ scope.row.到票数量 }}
</template>
</el-table-column>
<el-table-column label="本次到票数量" align="center" width="100">
<template slot-scope="scope">
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量" size="mini" controls-position="right" style="width: 100%;"/>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button :disabled="group1.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchInboundCard, searchInboundCardDetail,
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
import { mapGetters } from 'vuex'
import { uploadInvoiceScan, readFile } from '@/utils/request'
@@ -425,6 +326,7 @@ export default {
name: '', // 发票结算申请
data() {
return {
contractType: '采购合同',
invoiceNum: '',
total1: 0,
pageCurrent1: 1,
@@ -435,12 +337,15 @@ export default {
title2: '',
dialogVisible2: false,
tableData2: [],
tableData3: [],
dialogVisible1: false,
title1: '',
supplier: [],
supplierName: '',
supplierValue: '',
form1: {
invoiceNum: '',
money: '',
supplierValue: '',
paid: '',
unpaid: '',
tax: '',
@@ -454,6 +359,9 @@ export default {
],
money: [
{ required: true, message: '请输入开票金额' }
],
supplierValue: [
{ required: true, message: '请选择供应商' }
]
},
upload: uploadInvoiceScan,
@@ -461,8 +369,7 @@ export default {
tableData01: [],
tableData02: [],
inboundCardNumber: '', // 入库单号
group1: [], // 入库单流水号组
group2: [] // 发票结算申请单明细流水号组
group: [] // 发票结算申请单明细流水号组
}
},
computed: {
@@ -477,13 +384,24 @@ export default {
this.searchTable1()
},
methods: {
fetchData() {},
fetchData() {
this.supplier = []
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
createOrder() {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = ''
this.form1.money = ''
this.form1.supplierValue = ''
this.form1.paid = ''
this.form1.unpaid = ''
this.form1.tax = ''
@@ -493,8 +411,9 @@ export default {
this.dialogVisible1 = true
},
searchTable1() {
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
searchTable1(this.check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
let check1
this.invoiceNum ? check1 = 1 : check1 = 0
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')
@@ -506,12 +425,41 @@ export default {
this.total1 = response.data.total
})
},
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
submitEdit() { // 提交编辑
this.$refs['form1'].validate((valid) => {
if (valid) {
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
if (response.data[0].result === '修改成功') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else if (response.data[0].result === '修改失败') {
this.$message.error('已提交申请,编辑失败')
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleEdit(row) {
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
this.form1.invoiceNum = row.发票号
this.form1.money = row.发票金额
this.form1.supplierValue = Number(row.供应商流水号)
this.form1.paid = row.已付款项
this.form1.unpaid = row.尚欠金额
this.form1.tax = row.税额
@@ -553,60 +501,10 @@ export default {
})
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
warningExceed() {
this.$message.error('仅可上传一张发票')
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
submitApply(row) {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.tableData2.length === 0) {
this.$message.warning('入库单为空')
} else {
submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('提交成功')
this.searchTable1()
} else { this.$message.error('提交失败') }
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchInboundCard() {
let check
this.inboundCardNumber ? check = 1 : check = 0
this.tableData01 = []
searchInboundCard(check, this.inboundCardNumber).then(response => {
console.log(response.data)
this.tableData01 = response.data
})
},
searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
searchTable3(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData3 = response.data
})
},
beforeUpload(file) { // 上船前检测
beforeUpload(file) { // 上传前检测
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
if (!isJPG) {
@@ -627,104 +525,153 @@ export default {
this.$message.error('增加失败')
}
},
warningExceed() {
this.$message.error('仅可上传一张发票')
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
addInStoreOrder() {
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
submitApply(row) {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.tableData2.length === 0) {
this.$message.warning('发票结算申请明细为空!')
} else {
submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('提交成功')
this.searchTable1()
} else { this.$message.error('提交失败') }
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号
this.supplierName = row.供应商名称
this.supplierValue = row.供应商流水号
searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data
})
},
addInStoreRecord() {
if (this.applyOrderNum) {
this.searchTable01()
this.title2 = '追加入库单'
this.dialogVisible2 = true
} else {
this.$message.error('请选择发票!')
}
},
submitAdd1() { // 提交新增
this.$refs['form1'].validate((valid) => {
if (valid) {
this.$refs.upload.submit() // 上传图片
} else {
console.log('error submit!!')
return false
}
})
},
submitEdit() { // 提交编辑
this.$refs['form1'].validate((valid) => {
if (valid) {
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
if (response.data[0].result === '修改成功') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.searchTable1()
} else if (response.data[0].result === '修改失败') {
this.$message.error('已提交申请,编辑失败')
} else { this.$message.error('编辑失败') }
searchTable01() {
this.tableData01 = []
this.tableData02 = []
if (this.contractType === '采购合同') {
searchPurchase(this.supplierValue).then(response => {
this.tableData01 = response.data
})
} else if (this.contractType === '离线合同') {
searchOffline(this.supplierValue).then(response => {
response.data.map(data => {
if (Number(data.离线合同状态) === 2) {
this.tableData01.push(data)
}
})
} else {
console.log('error submit!!')
return false
}
})
},
searchTable02(row) {
searchInboundCardDetail(row.采购入库单流水号).then(response => {
this.tableData02 = response.data
})
},
handleSelectionChange(val) {
this.group1 = val
},
submitAdd2() { // 追加入库单
if (this.group1.length === 0) {
this.$message.warning('请选择入库单')
} else {
const group = []
for (let i = 0; i < this.group1.length; i++) {
group.push(this.group1[i].采购入库单流水号)
}
addTable2(this.applyOrderNum, group).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
}
},
handleSelectionChange2(val) {
this.group2 = val
searchTable02(row) {
this.tableData02 = []
if (this.contractType === '采购合同') {
searchPurchaseDetail(row.采购合同流水号).then(response => {
response.data.map(data => {
this.$set(data, '本次到票数量', 0)
data.本次到票数量 = data.已到货数量 - data.到票数量
this.tableData02.push(data)
})
})
} else if (this.contractType === '离线合同') {
searchOfflineDetail(row.离线合同流水号).then(response => {
response.data.map(data => {
this.$set(data, '本次到票数量', 0)
data.本次到票数量 = data.到货数量 - data.到票数量
this.tableData02.push(data)
})
})
}
},
deleteTable2() { // 移除入库单
if (this.group2.length === 0) {
this.$message.warning('请选择入库单')
handleSelectionChange(val) {
this.group = val
},
submitAdd2() { // 追加入库单
if (this.group.length === 0) {
this.$message.warning('请选择零件或物料')
} else {
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const group = []
for (let i = 0; i < this.group2.length; i++) {
group.push(this.group2[i].发票结算申请单明细流水号)
const group1 = []
const group2 = []
if (this.contractType === '采购合同') {
for (let i = 0; i < this.group.length; i++) {
group1.push(this.group[i].采购合同明细流水号)
group2.push(this.group[i].本次到票数量)
}
deleteTable2(group).then(response => {
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('移除成功')
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('移除失败') }
} else { this.$message.error('追加失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
} else if (this.contractType === '离线合同') {
for (let i = 0; i < this.group.length; i++) {
group1.push(this.group[i].离线合同明细流水号)
group2.push(this.group[i].本次到票数量)
}
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('追加成功')
this.dialogVisible2 = false
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('追加失败') }
})
})
}
}
},
deleteTable2(row) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteTable2(row.发票结算申请单明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchTable2(this.applyOrderNum).then(response => {
this.tableData2 = response.data
})
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
}
}

View File

@@ -82,7 +82,7 @@
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" stripe size="mini" show-summary @row-click="searchTable2">
<el-table :data="gridData" highlight-current-row size="mini" show-summary @row-click="searchTable2">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="离线合同编号">
<template slot-scope="scope">
@@ -187,7 +187,7 @@
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @row-click="searchTable03" @selection-change="handleSelectionChange">
<el-table v-loading="" :data="tableData01" highlight-current-row border style="max-height: 300px;" height="300px" size="mini" @row-click="searchTable03" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column label="离线合同编号" align="center" min-width="120">
<template slot-scope="scope">
@@ -433,12 +433,17 @@ export default {
return sums
},
searchTable01() { // 查询待请款
this.tableData01 = []
if (this.supplierValue) {
this.contractGroup = []
let check
this.supplierValue ? check = 1 : check = 0
searchOfflineContract(check, this.supplierValue).then(response => {
this.tableData01 = response.data
response.data.map(data => {
if (Number(data.离线合同状态) === 2) {
this.tableData01.push(data)
}
})
this.tableData01.map(v => {
this.$set(v, '请款金额', 0)
v.请款金额 = v.合同总额 - v.已付金额
@@ -497,6 +502,7 @@ export default {
this.$message.success('操作成功')
this.searchTable1()
} else if (response.data[0].result === '已审批') {
this.searchTable1()
this.$message.error('已审批,操作失败')
} else { this.$message.error('操作失败') }
})

View File

@@ -14,12 +14,7 @@
style="width:300px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="searchTable0()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable0()">查询</el-button>
</el-card>
<el-card>
@@ -64,113 +59,95 @@
</el-card>
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in contractNum"
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input
v-model="supplierName"
placeholder="供应商"
size="small"
clearable
style="width:180px"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-card>
<el-card>
<el-table :data="tableData1" size="mini" border style="width: 100%" highlight-current-row @row-click="searchContract">
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="合同总额" width="70" align="center">
<el-table-column label="请款时间" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="本次请款金额" min-width="100" align="center">
<el-table-column label="请款人" align="center" min-width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款" min-width="80" align="center">
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款付款情况" width="710" align="center">
<el-table-column label="请款付款情况" align="center">
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作" align="center" width="250">
<template slot-scope="scope">
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<el-table-column label="取消请款" width="100" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.审批情况流水号!==3"
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
<el-table-column label="次数" min-width="60" align="center" type="index"/>
<el-table-column label="请款金额" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审批情况" width="80" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="80" align="center">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table>
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini" show-summary @row-click="searchContract">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="采购合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
@@ -184,14 +161,73 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<span v-show="supplierValue">累计合同总额</span>
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
<span v-show="supplierValue">累计付款</span>
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
<span v-show="supplierValue">累计欠款</span>
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
</div>
</el-card>
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @row-click="searchContract" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column label="采购合同编号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="180">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="已付金额" align="center" min-width="100" prop="已付金额">
<template slot-scope="scope">
{{ scope.row.已付金额 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
<el-input v-model="scope.row.请款金额" size="mini" style="width: 100%;"/>
</template>
</el-table-column>
</el-table>
<span>合计<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
</el-dialog>
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
</div>
</template>
<script>
import { searchTable0, initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { searchTable0, searchContract, searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { mapGetters } from 'vuex'
import { getNowTime, timeToStamp } from '@/utils/tool'
@@ -200,7 +236,6 @@ export default {
return {
getDate: null,
tableData0: [],
check: 0,
pickerOptions: {
shortcuts: [{
text: '未来一周',
@@ -245,116 +280,158 @@ export default {
}]
},
dateRange: '',
tableData11: [],
tableData1: [],
total1: 0,
pageCurrent1: 1,
pageSize1: 10,
contractNum: [],
contractNumValue: '',
supplierName: '',
tableData1: [],
check1: 0,
check2: 0,
returns: ''
returns: '',
supplierValue: '',
supplier: [],
totalSum: 0,
totalPay: 0,
totalDebt: 0,
tableData2: [],
dialogVisible2: false,
tableData01: [],
SUM: 0,
contractGroup: [],
gridData: []
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id'
])
},
created() {
this.fetchData()
this.searchTable1()
this.searchTable0()
this.searchTable1()
},
methods: {
timeToStamp(param) { // 转时间戳
return timeToStamp(param)
},
searchTable0() { // 查询付款计划
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
searchTable0(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
let check
this.dateRange ? check = 1 : (check = 0, this.dateRange = '')
searchTable0(check, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData0 = response.data
})
},
fetchData() {
initContract().then(response => {
this.supplier = []
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
value: response.data[i].采购合同流水号
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
},
searchTable1() { // 查询
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
this.tableData1 = []
this.returns = ''
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
if (response0.data.length === 0) {
this.tableData11[j].push(response0.data)
document.getElementById(j).setAttribute('style', 'display:none')
} else {
for (let i = 0; i < response0.data.length; i++) {
this.tableData11[j].push(response0.data[i])
}
}
})
}
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, '本次应请款', 0)
return v
})
this.total1 = response.data.total
searchContract(row) {
searchContract(row.采购合同流水号).then(response => {
this.returns = response.data[0].合同内容
})
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
requestFund(row) { // 请款
if (row.本次应请款 <= 0) {
this.$message.warning('请输入正确金额')
searchTable1() { // 请款信息
let check1, check2
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
this.supplierValue ? check2 = 1 : check2 = 0
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
this.totalSum = 0
this.totalPay = 0
searchPurchaseContract(check2, this.supplierValue).then(response => {
response.data.map(data => {
this.totalSum += data.合同总额
this.totalPay += data.已付金额
})
this.totalDebt = this.totalSum - this.totalPay
})
},
requestFund() { // 请款
this.dialogVisible2 = true
this.supplierValue = ''
this.fetchData() // 重新获取供应商
this.tableData01 = []
},
searchTable01() { // 查询待请款
if (this.supplierValue) {
this.contractGroup = []
let check
this.supplierValue ? check = 1 : check = 0
searchPurchaseContract(check, this.supplierValue).then(response => {
this.tableData01 = response.data
this.tableData01.map(v => {
this.$set(v, '请款金额', 0)
v.请款金额 = v.合同总额 - v.已付金额
return v
})
})
} else {
const day1 = new Date()
const day2 = day1.getFullYear() + '-' + (day1.getMonth() + 1) + '-' + day1.getDate()
requestFund(row.采购合同流水号, row.本次应请款, day2, this.id).then(response => {
this.$message.error('请选择供应商')
}
},
selectable(row, index) { // 控制某行是否可选
return parseInt(row.已请款) !== 1 // 已经请款
},
handleSelectionChange(val) {
this.SUM = 0
this.contractGroup = []
this.sumGroup = []
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].请款金额)
this.contractGroup.push(val[i].采购合同流水号)
this.sumGroup.push(val[i].请款金额)
}
},
submitRequestFund() { // 确认请款
if (this.supplierValue && this.contractGroup.length !== 0) {
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => { // 采购合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person
if (response.data[0].result === '1') {
this.$message.success('请款成功')
this.searchTable1()
this.dialogVisible2 = false
} else { this.$message.error('请款失败') }
})
} else {
this.$message.error('请选择需要请款的合同')
}
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail(row.采购合同请款流水号).then(response => {
this.gridData = response.data
})
},
cancelRequestFund(row) { // 取消请款
this.$confirm('确取消请款?', '提示', {
this.$confirm('确取消请款?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelRequestFund(row.采购请款流水号).then(response => {
cancelRequestFund(row.采购合同请款流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else if (response.data[0].result === '已审批') {
this.searchTable1()
this.$message.error('已审批操作失败')
this.$message.error('已审批,操作失败')
} else { this.$message.error('操作失败') }
})
}).catch(() => {
@@ -363,11 +440,6 @@ export default {
message: '已取消操作'
})
})
},
searchContract(row) {
searchContract(row.采购合同流水号).then(response => {
this.returns = response.data[0].合同内容
})
}
}
}

View File

@@ -193,9 +193,13 @@ export default {
this.pageCurrent1 = val
this.searchTable1()
},
searchPlan(row) {
searchPlan(row, expandedRows) {
this.form1.采购合同流水号 = row.采购合同流水号
searchTable01(row.采购合同流水号).then(response => {
if (expandedRows.length > 1) {
this.expands = []
expandedRows.shift()
}
this.tableData01 = response.data
this.expands.indexOf(row.采购合同流水号) === -1 ? this.expands.push(row.采购合同流水号) : this.expands = []
})