第一轮测试采购bug修改
This commit is contained in:
@@ -47,4 +47,15 @@ export function allocateTask(group, person) {
|
||||
param: `标准件和外购件流水号组=${group}&人员编号=${person}`
|
||||
}
|
||||
})
|
||||
}// 执行退回
|
||||
export function executeReturn(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购部采购_退回物料',
|
||||
param: `标准件和外购件流水号组=${params[0]}&组件零件流水号组=${params[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -43,7 +43,16 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
@@ -59,12 +68,12 @@
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" align="center">
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
@@ -74,7 +83,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="90" align="center">
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -91,7 +100,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<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">
|
||||
@@ -100,7 +118,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
@@ -133,26 +151,9 @@
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
@@ -168,22 +169,22 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>请款开始时间:</span>
|
||||
<span>请款时间区间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -277,7 +278,6 @@ export default {
|
||||
form1: {},
|
||||
supplierName: '',
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
@@ -312,7 +312,6 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
@@ -322,15 +321,18 @@ export default {
|
||||
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.total1 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -356,6 +358,7 @@ export default {
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -383,9 +386,15 @@ export default {
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) {
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else { this.checkRequest = 1 }
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第1次付款时间">
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第2次付款时间">
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第3次付款时间">
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -84,7 +84,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第4次付款时间">
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -97,7 +97,7 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第5次付款时间">
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable>
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small">
|
||||
<el-option
|
||||
v-for="item in payTime"
|
||||
:key="item.value"
|
||||
@@ -251,17 +251,17 @@ export default {
|
||||
contractName: '产品购销合同', // 合同名称
|
||||
supplierName: '', // 供应商名称
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
payMethodValue: '', // 付款方式流水号
|
||||
payMethodValue: 1, // 付款方式流水号
|
||||
payMethodName: '', // 付款方式名称
|
||||
payMethod: [],
|
||||
payTime: [],
|
||||
payTime1Value: '', // 付款时间
|
||||
payTime2Value: '', // 付款时间
|
||||
payTime3Value: '', // 付款时间
|
||||
payTime4Value: '', // 付款时间
|
||||
payTime5Value: '', // 付款时间
|
||||
payTime6Value: '', // 付款时间
|
||||
freight: '', // 运费
|
||||
payTime1Value: 1, // 付款时间
|
||||
payTime2Value: 1, // 付款时间
|
||||
payTime3Value: 1, // 付款时间
|
||||
payTime4Value: 1, // 付款时间
|
||||
payTime5Value: 1, // 付款时间
|
||||
payTime6Value: 1, // 付款时间
|
||||
freight: 0, // 运费
|
||||
taxRate: '0.17', // 税率
|
||||
currencyValue: 1, // 币种
|
||||
currency: [
|
||||
@@ -380,11 +380,13 @@ export default {
|
||||
})
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (parseInt(response.data[i].付款时间节点流水号) !== 0) {
|
||||
this.payTime.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到票情况" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/>
|
||||
<el-progress :status="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?'exception':'success'" :text-inside="true" :stroke-width="18" :percentage="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?100:parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<span style="margin:0">项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
@@ -10,7 +12,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
|
||||
<span>分配情况:</span>
|
||||
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
|
||||
<el-option
|
||||
@@ -25,6 +27,10 @@
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
@@ -39,7 +45,15 @@
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-back"
|
||||
style="margin-left: 10px"
|
||||
@click="executeReturn">退回</el-button>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
@@ -109,7 +123,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
@@ -140,6 +154,7 @@ export default {
|
||||
check2: 0,
|
||||
tableData1: [],
|
||||
standardAndPurchase: [],
|
||||
groupAndPart: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0
|
||||
@@ -187,8 +202,10 @@ export default {
|
||||
},
|
||||
handleSelectionChange1(val) { // 多选
|
||||
this.standardAndPurchase = []
|
||||
this.groupAndPart = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
|
||||
this.groupAndPart.push(val[i].组件零件流水号)
|
||||
}
|
||||
},
|
||||
selectable(row) { // 多选禁用
|
||||
@@ -231,6 +248,29 @@ export default {
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
executeReturn() { // 退回
|
||||
if (this.standardAndPurchase.length === 0) {
|
||||
this.$message.error('请选择需退回的物料')
|
||||
} else {
|
||||
this.$confirm('此操作执行后不可修改,是否确定退回?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
executeReturn(this.standardAndPurchase, this.groupAndPart).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
{{ scope.row.接收人姓名==='请选择' ? '' : scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
|
||||
Reference in New Issue
Block a user