|
@@ -82,6 +82,7 @@
|
|
|
<el-button type="primary" plain size="small">打印账单</el-button>
|
|
|
<el-button type="success" plain size="small" :disabled="!this.assemblyForm.id" @click="templateClick('D')">应收模板</el-button>
|
|
|
<el-button type="info" plain size="small" @click="feecenterSubmitListfun">保存账单</el-button>
|
|
|
+ <el-button type="primary" plain size="small" @click="copyfun('D')">生成应付</el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="scope">
|
|
|
<el-button type="primary" size="small" icon="el-icon-plus" circle
|
|
@@ -96,12 +97,12 @@
|
|
|
<template slot="corpCnName" slot-scope="{ row }">
|
|
|
<search-query v-if="row.edit"
|
|
|
:datalist="corpCnNameData"
|
|
|
- :selectValue="row.corpId"
|
|
|
+ :selectValue="row.corpCnName"
|
|
|
:filterable="true"
|
|
|
:clearable="true"
|
|
|
:remote="true"
|
|
|
:buttonIf="false"
|
|
|
- :forParameter="{key:'id',label:'cnNamecode',value:'id'}"
|
|
|
+ :forParameter="{key:'id',label:'cnName',value:'cnName'}"
|
|
|
@remoteMethod="getBcorpsListfun($event,'corpCnName')"
|
|
|
@corpChange="corpChange($event,'corpCnName',row)"
|
|
|
@corpFocus="getBcorpsListfun($event,'corpCnName')" >
|
|
@@ -224,6 +225,7 @@
|
|
|
</el-button>
|
|
|
<el-button type="success" plain size="small" :disabled="!this.assemblyForm.id" @click="templateClick('C')">应付模板</el-button>
|
|
|
<el-button type="info" plain size="small" @click="feecenterSubmitListfun">保存账单</el-button>
|
|
|
+ <el-button type="primary" plain size="small" @click="copyfun('C')">生成应收</el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="scope">
|
|
|
<el-button type="primary" size="small" icon="el-icon-plus" circle
|
|
@@ -238,12 +240,12 @@
|
|
|
<template slot="corpCnName" slot-scope="{ row }">
|
|
|
<search-query v-if="row.edit"
|
|
|
:datalist="corpCnNameData"
|
|
|
- :selectValue="row.corpId"
|
|
|
+ :selectValue="row.corpCnName"
|
|
|
:filterable="true"
|
|
|
:clearable="true"
|
|
|
:remote="true"
|
|
|
:buttonIf="false"
|
|
|
- :forParameter="{key:'id',label:'cnNamecode',value:'id'}"
|
|
|
+ :forParameter="{key:'id',label:'cnName',value:'cnName'}"
|
|
|
@remoteMethod="getBcorpsListfun($event,'corpCnName')"
|
|
|
@corpChange="corpChange($event,'corpCnName',row)"
|
|
|
@corpFocus="getBcorpsListfun($event,'corpCnName')" >
|
|
@@ -443,7 +445,7 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="templateVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="templateVisible = false;feesselectionList = [];templateRightData = []">取 消</el-button>
|
|
|
<el-button type="primary" @click="templateExport">导 入</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
@@ -489,7 +491,7 @@
|
|
|
import {getWorkDicts} from "@/api/system/dictbiz";
|
|
|
import {feecenterTemplateImport, losbfeestemplateGetListTemplate} from "@/api/iosBasicData/bills";
|
|
|
import {losbfeestemplateDetail} from "@/api/iosBasicData/losbfeestemplate";
|
|
|
- import {requiredMessage} from "@/util/messageReminder";
|
|
|
+ import {popupReminder, requiredMessage} from "@/util/messageReminder";
|
|
|
|
|
|
export default {
|
|
|
components: {SearchQuery},
|
|
@@ -529,19 +531,21 @@
|
|
|
headerslot:true,
|
|
|
},
|
|
|
{
|
|
|
- label: "是否生成账单",
|
|
|
+ label: "账单",
|
|
|
prop: "accStatus",
|
|
|
- width: "100",
|
|
|
+ width: "60",
|
|
|
},
|
|
|
{
|
|
|
label: "往来单位",
|
|
|
prop: "corpCnName",
|
|
|
width: "160",
|
|
|
+ overHidden:true,
|
|
|
},
|
|
|
{
|
|
|
label: "费用简称",
|
|
|
prop: "feeCnName",
|
|
|
width: "120",
|
|
|
+ overHidden:true,
|
|
|
},
|
|
|
{
|
|
|
label: "预付/到付",
|
|
@@ -559,21 +563,11 @@
|
|
|
width: "120",
|
|
|
},
|
|
|
{
|
|
|
- label: "税率",
|
|
|
- prop: "taxRate",
|
|
|
- width: "100",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "附件税率",
|
|
|
- prop: "surchargeRate",
|
|
|
+ label: "对CNY汇率",
|
|
|
+ prop: "exrate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "单价是否含税",
|
|
|
- prop: "isTax",
|
|
|
- width: "120",
|
|
|
- },
|
|
|
- {
|
|
|
label: "单价",
|
|
|
prop: "price",
|
|
|
width: "120",
|
|
@@ -584,6 +578,16 @@
|
|
|
width: "120",
|
|
|
},
|
|
|
{
|
|
|
+ label: "CNY(含税)",
|
|
|
+ prop: "rmbAmount",
|
|
|
+ width: "100",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "USD(含税)",
|
|
|
+ prop: "usdAmount",
|
|
|
+ width: "100",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "CNY(净额)",
|
|
|
prop: "rmbAmountNet",
|
|
|
width: "100",
|
|
@@ -594,29 +598,29 @@
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "CNY(含税)",
|
|
|
- prop: "rmbAmount",
|
|
|
+ label: "预付地址",
|
|
|
+ prop: "payplace",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "USD(含税)",
|
|
|
- prop: "usdAmount",
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "对CNY汇率",
|
|
|
- prop: "exrate",
|
|
|
+ label: "税率",
|
|
|
+ prop: "taxRate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "预付地址",
|
|
|
- prop: "payplace",
|
|
|
+ label: "附件税率",
|
|
|
+ prop: "surchargeRate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- width: "100",
|
|
|
+ label: "单价是否含税",
|
|
|
+ prop: "isTax",
|
|
|
+ width: "120",
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -646,9 +650,9 @@
|
|
|
headerslot:true,
|
|
|
},
|
|
|
{
|
|
|
- label: "是否生成账单",
|
|
|
+ label: "账单",
|
|
|
prop: "accStatus",
|
|
|
- width: "100",
|
|
|
+ width: "60",
|
|
|
},
|
|
|
{
|
|
|
label: "往来单位",
|
|
@@ -676,21 +680,11 @@
|
|
|
width: "120",
|
|
|
},
|
|
|
{
|
|
|
- label: "税率",
|
|
|
- prop: "taxRate",
|
|
|
- width: "100",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "附件税率",
|
|
|
- prop: "surchargeRate",
|
|
|
+ label: "对CNY汇率",
|
|
|
+ prop: "exrate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "单价是否含税",
|
|
|
- prop: "isTax",
|
|
|
- width: "120",
|
|
|
- },
|
|
|
- {
|
|
|
label: "单价",
|
|
|
prop: "price",
|
|
|
width: "120",
|
|
@@ -701,6 +695,16 @@
|
|
|
width: "120",
|
|
|
},
|
|
|
{
|
|
|
+ label: "CNY(含税)",
|
|
|
+ prop: "rmbAmount",
|
|
|
+ width: "100",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "USD(含税)",
|
|
|
+ prop: "usdAmount",
|
|
|
+ width: "100",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "CNY(净额)",
|
|
|
prop: "rmbAmountNet",
|
|
|
width: "100",
|
|
@@ -711,29 +715,29 @@
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "CNY(含税)",
|
|
|
- prop: "rmbAmount",
|
|
|
+ label: "预付地址",
|
|
|
+ prop: "payplace",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "USD(含税)",
|
|
|
- prop: "usdAmount",
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "对CNY汇率",
|
|
|
- prop: "exrate",
|
|
|
+ label: "税率",
|
|
|
+ prop: "taxRate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "预付地址",
|
|
|
- prop: "payplace",
|
|
|
+ label: "附件税率",
|
|
|
+ prop: "surchargeRate",
|
|
|
width: "100",
|
|
|
},
|
|
|
{
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- width: "100",
|
|
|
+ label: "单价是否含税",
|
|
|
+ prop: "isTax",
|
|
|
+ width: "120",
|
|
|
},
|
|
|
]
|
|
|
},
|
|
@@ -889,6 +893,55 @@
|
|
|
this.getBcorpsListfun()
|
|
|
},
|
|
|
methods:{
|
|
|
+ copyfun(dc){
|
|
|
+ let selection = []
|
|
|
+ if (dc == 'D') {
|
|
|
+ selection = this.selectionDList
|
|
|
+ if (this.selectionDList.length == 0) {
|
|
|
+ this.$message.warning('请先选择要复制的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ selection = this.selectionCList
|
|
|
+ if (this.selectionCList.length == 0) {
|
|
|
+ this.$message.warning('请先选择要复制的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let arr = selection.map(item=>{
|
|
|
+ let obj = {}
|
|
|
+ obj.corpId = item.corpId
|
|
|
+ obj.corpCnName = item.corpCnName
|
|
|
+ obj.corpEnName = item.corpEnName
|
|
|
+ obj.feeId = item.feeId
|
|
|
+ obj.feeCnName = item.feeCnName
|
|
|
+ obj.feeEnName = item.feeEnName
|
|
|
+ obj.feeCode = item.feeCode
|
|
|
+ obj.elementsId = item.elementsId
|
|
|
+ obj.elementsCnName = item.elementsCnName
|
|
|
+ obj.elementsEnName = item.elementsEnName
|
|
|
+ obj.elementsCode = item.elementsCode
|
|
|
+ obj.curCode = item.curCode
|
|
|
+ obj.taxRate = item.taxRate
|
|
|
+ obj.paymode = item.paymode
|
|
|
+ obj.payplace = item.payplace
|
|
|
+ obj.remarks = item.remarks
|
|
|
+ obj.amount = item.amount
|
|
|
+ obj.price = item.price
|
|
|
+ obj.quantity = item.quantity
|
|
|
+ obj.rmbAmount = item.rmbAmount
|
|
|
+ obj.taxRate = item.taxRate
|
|
|
+ obj.unitNo = item.unitNo
|
|
|
+ obj.usdAmount = item.usdAmount
|
|
|
+ obj.edit = item.edit
|
|
|
+ return obj
|
|
|
+ })
|
|
|
+ if (dc == 'D') {
|
|
|
+ this.assemblyForm.feeCenterListC = [...this.assemblyForm.feeCenterListC,...arr]
|
|
|
+ }else {
|
|
|
+ this.assemblyForm.feeCenterListD = [...this.assemblyForm.feeCenterListD,...arr]
|
|
|
+ }
|
|
|
+ },
|
|
|
// 往来单位弹窗开启
|
|
|
corpClick(){
|
|
|
this.corpVisible = true
|
|
@@ -905,6 +958,8 @@
|
|
|
type: "success",
|
|
|
message: "操作成功!"
|
|
|
});
|
|
|
+ this.feesselectionList = [] // 清空多选
|
|
|
+ this.templateRightData = [] // 清空数据
|
|
|
this.$emit('billsDetailfun')
|
|
|
this.templateVisible = false
|
|
|
})
|
|
@@ -935,8 +990,15 @@
|
|
|
},
|
|
|
// 应收新增
|
|
|
addDfun(){
|
|
|
- // 判断数据需要的数据是否有
|
|
|
- if (!requiredMessage(this.assemblyForm,this.messageData)) {
|
|
|
+ // 判断数据需要的数据是否有 有就弹窗
|
|
|
+ if (popupReminder(this.assemblyForm,this.messageData)){
|
|
|
+ this.$confirm(popupReminder(this.assemblyForm,this.messageData), {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (popupReminder(this.assemblyForm,this.messageData)) {
|
|
|
return;
|
|
|
}
|
|
|
// 如果是分单 判断是否有分单号
|
|
@@ -981,7 +1043,15 @@
|
|
|
// 应付新增
|
|
|
addCfun(){
|
|
|
// 判断数据需要的数据是否有
|
|
|
- if (!requiredMessage(this.assemblyForm,this.messageData)) {
|
|
|
+ // 判断数据需要的数据是否有 有就弹窗
|
|
|
+ if (popupReminder(this.assemblyForm,this.messageData)){
|
|
|
+ this.$confirm(popupReminder(this.assemblyForm,this.messageData), {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (popupReminder(this.assemblyForm,this.messageData)) {
|
|
|
return;
|
|
|
}
|
|
|
// 如果是分单 判断是否有分单号
|
|
@@ -1090,6 +1160,8 @@
|
|
|
message: "当前选择的费用已经生成账单了!"
|
|
|
});
|
|
|
return
|
|
|
+ }else {
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
this.finaccbillsGenerateBillfun(this.selectionDList)
|
|
@@ -1191,7 +1263,7 @@
|
|
|
corpChange(value,name,row) {
|
|
|
if (name == 'corpCnName') {
|
|
|
for(let item of this.corpCnNameData) {
|
|
|
- if (item.id == value){
|
|
|
+ if (item.cnName == value){
|
|
|
this.$set(row,'corpCnName',item.cnName)
|
|
|
this.$set(row,'corpEnName',item.enName)
|
|
|
this.$set(row,'corpId',item.id)
|
|
@@ -1225,6 +1297,17 @@
|
|
|
}else if (name == 'curCode') {
|
|
|
for(let item of this.curCodeData) {
|
|
|
if (item.code == value){
|
|
|
+ if (item.code == 'USD') {
|
|
|
+ if (Number(item.exrate) <= 1) {
|
|
|
+ this.$message.warning('当前选择的币别汇率不能小于零')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ if (Number(item.exrate) == 0) {
|
|
|
+ this.$message.warning('当前选择的币别汇率不能为零')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$set(row,'curCode',item.code)
|
|
|
this.$set(row,'exrate',item.exrate)
|
|
|
if (row.curCode == 'CNY') {
|
|
@@ -1298,11 +1381,12 @@
|
|
|
// 获取客户数据
|
|
|
getBcorpsListfun(cnName){
|
|
|
getBcorpsList(1,10,{cnName}).then(res=>{
|
|
|
- this.corpCnNameData = res.data.data.records.map(item=>{
|
|
|
- // 创建自定义参数暂存
|
|
|
- item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
|
|
|
- return item
|
|
|
- })
|
|
|
+ this.corpCnNameData = res.data.data.records
|
|
|
+ // this.corpCnNameData = res.data.data.records.map(item=>{
|
|
|
+ // // 创建自定义参数暂存
|
|
|
+ // item.cnNamecode = item.cnName + ' - ' + item.code + ' - ' + item.shortName
|
|
|
+ // return item
|
|
|
+ // })
|
|
|
})
|
|
|
},
|
|
|
// 获取费用数据
|
|
@@ -1490,6 +1574,8 @@
|
|
|
handleClose(done) {
|
|
|
this.$confirm('确认关闭?')
|
|
|
.then(_ => {
|
|
|
+ this.feesselectionList = [] // 清空多选
|
|
|
+ this.templateRightData = [] // 清空数据
|
|
|
done();
|
|
|
})
|
|
|
.catch(_ => {});
|