|
@@ -33,13 +33,13 @@
|
|
|
:disabled="disabled || selectionList.length == 0"
|
|
|
v-if="selectTab === 1"
|
|
|
>生成账单</el-button>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="info"
|
|
|
size="small"
|
|
|
@click.stop="rowAdd"
|
|
|
:disabled="disabled || selectionList.length == 0"
|
|
|
v-if="selectTab === 1"
|
|
|
- >查看生成记录</el-button>
|
|
|
+ >查看生成记录</el-button>-->
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
size="small"
|
|
@@ -47,13 +47,13 @@
|
|
|
:disabled="disabled || selectionList.length == 0"
|
|
|
v-if="selectTab === 2"
|
|
|
>申请货款</el-button>
|
|
|
- <el-button
|
|
|
+ <!-- <el-button
|
|
|
type="info"
|
|
|
size="small"
|
|
|
@click.stop="rowAdd"
|
|
|
:disabled="disabled || selectionList.length == 0"
|
|
|
v-if="selectTab === 2"
|
|
|
- >查看申请记录</el-button>
|
|
|
+ >查看申请记录</el-button>-->
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button
|
|
@@ -208,25 +208,6 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<crop-dialog ref="cropDialog" @importCorp="importCorp"></crop-dialog>
|
|
|
- <el-dialog
|
|
|
- append-to-body
|
|
|
- title="账单"
|
|
|
- class="el-dialogDeep"
|
|
|
- :visible.sync="applyPaymentDialog"
|
|
|
- width="70%"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :destroy-on-close="true"
|
|
|
- :close-on-press-escape="false"
|
|
|
- v-dialog-drag
|
|
|
- >
|
|
|
- <apply-payment
|
|
|
- :billType="billType"
|
|
|
- :billData="billData"
|
|
|
- :arrList="arrList"
|
|
|
- @choceFun="choceFun"
|
|
|
- >
|
|
|
- </apply-payment>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -240,6 +221,7 @@ import { isPercentage, micrometerFormat } from "@/util/validate";
|
|
|
import cropDialog from "@/components/crop-dialog/main";
|
|
|
import _ from "lodash";
|
|
|
import ApplyPayment from "../finance/applyPayment";
|
|
|
+import {applyLoan,paymentApply} from "@/api/financialManagement/paymentRequest";
|
|
|
|
|
|
export default {
|
|
|
name: "feeInfo",
|
|
@@ -287,9 +269,6 @@ export default {
|
|
|
feeData: [],
|
|
|
selectionList: [],
|
|
|
reData: null,
|
|
|
- billData:{
|
|
|
- optionType:'JK'
|
|
|
- },
|
|
|
currencyList: [],
|
|
|
breakConfiguration:{
|
|
|
multipleChoices:false,
|
|
@@ -301,6 +280,7 @@ export default {
|
|
|
placeholder:'请点击右边按钮选择',
|
|
|
dicData:[]
|
|
|
},
|
|
|
+ isUpdata:true,//是否需要触发监听
|
|
|
allData:[],
|
|
|
data_one:[],
|
|
|
data_two:[],
|
|
@@ -308,9 +288,6 @@ export default {
|
|
|
activeName:"first",
|
|
|
tab1:true,
|
|
|
tab2:false,
|
|
|
- applyPaymentDialog:false,
|
|
|
- billType:'',
|
|
|
- arrList:[],
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -322,6 +299,9 @@ export default {
|
|
|
},
|
|
|
feeUrl: {
|
|
|
type: String
|
|
|
+ },
|
|
|
+ feeCommit:{
|
|
|
+ type: Boolean
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -364,8 +344,7 @@ export default {
|
|
|
|
|
|
this.selectTab = 1
|
|
|
this.feeData = this.data_one //切换数据
|
|
|
- this.selectionList = [];
|
|
|
- this.arrList = [];
|
|
|
+ // this.selectionList = [];
|
|
|
|
|
|
} else if(tab.name == "second") {
|
|
|
this.tab1 = false;
|
|
@@ -375,8 +354,7 @@ export default {
|
|
|
}
|
|
|
this.selectTab = 2
|
|
|
this.feeData = this.data_two
|
|
|
- this.selectionList = [];
|
|
|
- this.arrList = [];
|
|
|
+ // this.selectionList = [];
|
|
|
}
|
|
|
},
|
|
|
cellStyle() {
|
|
@@ -567,10 +545,17 @@ export default {
|
|
|
//保存时 将所出的tab页数据赋值到相应 data上
|
|
|
if(this.selectTab == 1){
|
|
|
this.data_one = this.feeData
|
|
|
+ this.data_one.map(item =>{
|
|
|
+ delete item.$cellEdit
|
|
|
+ delete item.$index
|
|
|
+ })
|
|
|
}else{
|
|
|
this.data_two = this.feeData
|
|
|
+ this.data_two.map(item =>{
|
|
|
+ delete item.$cellEdit
|
|
|
+ delete item.$index
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
this.allData.push(...this.data_one,...this.data_two)
|
|
|
|
|
|
return this.allData;
|
|
@@ -585,52 +570,69 @@ export default {
|
|
|
return this.$message.error('批量操作结算单位必须一致')
|
|
|
}
|
|
|
}
|
|
|
- this.billType = type
|
|
|
+ this.isUpdata = false
|
|
|
if(type === '申请'){
|
|
|
- this.selectionList.map(item =>{
|
|
|
- delete item.id
|
|
|
- item.corpsName = item.corpName
|
|
|
- item.srcFeesId = item.id
|
|
|
- item.costType = item.itemId
|
|
|
- item.itemType = '采购'
|
|
|
- item.optionType = 'JK'
|
|
|
- item.srcType = 2 //费用明细申请
|
|
|
- let form = {
|
|
|
- form:{
|
|
|
- ...item,
|
|
|
- }
|
|
|
+ this.$confirm("您确定申请货款吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(()=>{
|
|
|
+ this.selectionList.map(item =>{
|
|
|
+ item.srcOrderno = params.srcOrderno
|
|
|
+ item.srcParentId = params.parentId
|
|
|
+ item.corpsName = item.corpName
|
|
|
+ item.srcFeesId = item.id
|
|
|
+ item.costType = item.itemId
|
|
|
+ item.itemType = '采购'
|
|
|
+ item.optionType = 'JK'
|
|
|
+ item.srcType = 2 //费用明细申请
|
|
|
+ })
|
|
|
+ let data = {
|
|
|
+ billType: type,
|
|
|
+ itemsList : this.selectionList
|
|
|
}
|
|
|
- this.arrList.push(form)
|
|
|
+ applyLoan(data).then(res=>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(()=>{
|
|
|
+ this.isUpdata = true
|
|
|
})
|
|
|
}else{
|
|
|
- this.selectionList.map(item =>{
|
|
|
- delete item.id
|
|
|
- item.corpsName = item.corpName
|
|
|
- item.srcFeesId = item.id
|
|
|
- item.costType = item.itemId
|
|
|
- item.itemType = '采购'
|
|
|
- item.optionType = 'JK'
|
|
|
- item.srcType = 2 //费用明细申请
|
|
|
- let form = {
|
|
|
- form:{
|
|
|
- ...item,
|
|
|
- }
|
|
|
+ this.$confirm("您确定生成账单吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(()=>{
|
|
|
+ this.selectionList.map(item =>{
|
|
|
+ item.srcOrderno = params.srcOrderno
|
|
|
+ item.srcParentId = params.parentId
|
|
|
+ item.corpsName = item.corpName
|
|
|
+ item.srcFeesId = item.id
|
|
|
+ item.costType = item.itemId
|
|
|
+ item.itemType = '采购'
|
|
|
+ item.optionType = 'JK'
|
|
|
+ item.srcType = 2 //费用明细申请
|
|
|
+ })
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ billType: type,
|
|
|
+ itemsList : this.selectionList
|
|
|
}
|
|
|
- this.arrList.push(form)
|
|
|
+
|
|
|
+ paymentApply(data).then(res=>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).finally(()=>{
|
|
|
+ this.isUpdata = true
|
|
|
})
|
|
|
}
|
|
|
- this.openApplyPayment()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- //打开账单
|
|
|
- openApplyPayment(){
|
|
|
- this.applyPaymentDialog = true;
|
|
|
- },
|
|
|
- //关闭账单
|
|
|
- choceFun(){
|
|
|
-
|
|
|
- },
|
|
|
summaryMethod({ columns, data }) {
|
|
|
const sums = [];
|
|
|
if (columns.length > 0) {
|
|
@@ -674,13 +676,15 @@ export default {
|
|
|
if(this.allData.length !=0){
|
|
|
this.data_one=this.allData.filter(item=>item.feesType === 1) //应收
|
|
|
this.data_two=this.allData.filter(item=>item.feesType === 2) //应付
|
|
|
-
|
|
|
- if( this.feeData.length != 0){
|
|
|
- this.feeData = this.data_one
|
|
|
+ if(this.isUpdata){
|
|
|
+ if(this.selectTab == 1){
|
|
|
+ this.feeData = this.data_one
|
|
|
+ }else{
|
|
|
+ this.feeData = this.data_two
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
}
|
|
|
};
|
|
|
</script>
|