|
@@ -231,21 +231,31 @@
|
|
|
<span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+
|
|
|
<!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
|
|
|
<el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
- width="140"
|
|
|
+ width="200"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
+ icon="el-icon-view"
|
|
|
+ @click="check(scope.row)"
|
|
|
+ v-hasPermi="['finance:contrast:edit']"
|
|
|
+ v-if="scope.row.fBillstatus == 1 "
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['finance:contrast:edit']"
|
|
|
+ v-if="scope.row.fBillstatus <= 3"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
<el-button
|
|
@@ -254,6 +264,7 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['finance:contrast:remove']"
|
|
|
+ v-if="scope.row.fBillstatus <= 3"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
</template>
|
|
@@ -289,6 +300,7 @@
|
|
|
clearable
|
|
|
size="small"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
+ :disabled="notChange"
|
|
|
placeholder="请输入客户名称"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -300,6 +312,7 @@
|
|
|
filterable
|
|
|
remote
|
|
|
clearable
|
|
|
+ :disabled="notChange"
|
|
|
style="width: 200px"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
:remote-method="corpsRemoteMethod"
|
|
@@ -324,6 +337,7 @@
|
|
|
style="width: 200px"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
+ :disabled="notChange"
|
|
|
placeholder="选择账单日期"
|
|
|
>
|
|
|
</el-date-picker>
|
|
@@ -355,17 +369,16 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="备注" prop="fRemarks">
|
|
|
- <el-input v-model="queryParams.fRemarks"/>
|
|
|
+ <el-input v-model="queryParams.fRemarks" :disabled="notChange"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<div style="width: 100%">
|
|
|
- <el-button type="warning" size="small" @click="reconciliation"
|
|
|
- >对账</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" size="small" @click="confirmReconciliation">确认对账</el-button>
|
|
|
- <el-button type="success" size="small">导出</el-button>
|
|
|
- <el-button type="info" size="small" @click="openPrint=true">打印</el-button>
|
|
|
- <el-button type="danger" size="small">删除</el-button>
|
|
|
+ <el-button type="warning" size="small" @click="reconciliation" :disabled="notChange"
|
|
|
+ >对账</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="confirmReconciliation" :disabled="notChange">确认对账</el-button>
|
|
|
+ <el-button type="success" size="small" :disabled="notChange" @click="backrRconciliation" v-show="hide !== true">撤销对账</el-button>
|
|
|
+ <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
|
|
|
+ <el-button type="danger" size="small" :disabled="notChange" v-show="hide !== true">撤销审批</el-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
|
@@ -374,7 +387,7 @@
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
|
:data="DzfeeList"
|
|
|
- @selection-change="handleSelectionChanGe"
|
|
|
+ @selection-change="handleSelectionChange_s"
|
|
|
>
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
|
|
<!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
|
|
@@ -409,6 +422,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
+ :disabled="notChange"
|
|
|
@click.native.prevent="deleteRow(scope.$index,DzfeeList)"
|
|
|
>删除
|
|
|
</el-button>
|
|
@@ -417,7 +431,10 @@
|
|
|
</el-table>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">保 存</el-button>
|
|
|
+ <el-button v-if="approve">审批</el-button>
|
|
|
+ <el-button type="info" v-if="notChange" @click="">查看审批流</el-button>
|
|
|
+ <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :dataForm="editModel"></add-or-update>
|
|
|
+ <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
|
|
@@ -501,7 +518,7 @@
|
|
|
<el-form-item label="是否对账" prop="fReconciliation">
|
|
|
<el-col :span="8">
|
|
|
<el-select
|
|
|
- v-model="TWareHouseFees.fReconciliation"
|
|
|
+ v-model="TWareHouseFees.fReconciliation"
|
|
|
style="width: 200px"
|
|
|
>
|
|
|
<el-option label="是" value="1" />
|
|
@@ -676,16 +693,16 @@
|
|
|
<!-- 打印页面 -->
|
|
|
<el-dialog
|
|
|
:visible.sync="openPrint"
|
|
|
- width="70%"
|
|
|
+ width="80%"
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
title="对账单"
|
|
|
>
|
|
|
<el-table
|
|
|
- border="true"
|
|
|
+ id="print_area2"
|
|
|
v-loading="loading"
|
|
|
- :data="DzfeeList"
|
|
|
- @selection-change="handleSelectionChanGe">
|
|
|
+ :data="printObject"
|
|
|
+ @selection-change="handleSelectionChange_s">
|
|
|
|
|
|
<el-table-column label="行号" align="center" type="index" />
|
|
|
<el-table-column label="提单号" align="center" prop="fMblno" />
|
|
@@ -713,26 +730,41 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-button style="marginTop:10px">打印</el-button>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button style="marginTop:10px" @click="printSomething">打印</el-button>
|
|
|
+ <el-button @click="openPrint = false">取消</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
|
|
|
+import { backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
|
|
|
import { listCorps } from '@/api/basicdata/corps'
|
|
|
import { listFees } from '@/api/basicdata/fees'
|
|
|
+import AddOrUpdate from '@/views/viewApproval'
|
|
|
import { queryUserVal } from '@/api/warehouseBusiness/agreement'
|
|
|
import moment from 'moment'
|
|
|
+import print from "print-js"
|
|
|
export default {
|
|
|
name: "Fee",
|
|
|
components: {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ addOrUpdateVisible: false,
|
|
|
+ components: {
|
|
|
+ AddOrUpdate
|
|
|
+ },
|
|
|
+ contrastId:210,
|
|
|
+ // 审批状态
|
|
|
+ approve:'',
|
|
|
+ // 打印表
|
|
|
+ printObject:[],
|
|
|
openPrint:false,
|
|
|
statrGo:true,
|
|
|
state_s: true,
|
|
|
+ notChange:false,
|
|
|
browseStatus:false,
|
|
|
options:'',
|
|
|
value1:"",
|
|
@@ -785,6 +817,7 @@ export default {
|
|
|
fFeesName:'', //结算单位
|
|
|
fCorpid:'' //结算单位ID
|
|
|
},
|
|
|
+ hide:false,
|
|
|
// 传值对象
|
|
|
TWareHouseFees:{
|
|
|
fCorpid:'',
|
|
@@ -882,6 +915,50 @@ export default {
|
|
|
this.register()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查看审批流
|
|
|
+ // addOrUpdateHandle(){
|
|
|
+ // this.addOrUpdateVisible = true
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.addOrUpdate.init(this.fId,this.contrastId)
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // 撤销对账
|
|
|
+ backrRconciliation(){
|
|
|
+ this.queryParams.fBillstatus = '1'
|
|
|
+ let formDate = new window.FormData()
|
|
|
+ formDate.append('tFee',JSON.stringify(this.queryParams))
|
|
|
+ formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
|
|
|
+
|
|
|
+ backFee(formDate).then(response=>{
|
|
|
+ console.log(response)
|
|
|
+ this.msgSuccess("撤回成功")
|
|
|
+
|
|
|
+ })
|
|
|
+ this.open = false
|
|
|
+ },
|
|
|
+
|
|
|
+ // 打印功能
|
|
|
+ printing() {
|
|
|
+ if(this.DzfeeList.length !== 0){
|
|
|
+ this.openPrint = true
|
|
|
+ this.printObject = this.DzfeeList
|
|
|
+ }else {
|
|
|
+ this.$message.error('无数据,请检查是否有数据');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 确认打印
|
|
|
+ printSomething() {
|
|
|
+ console.log("22222");
|
|
|
+ // 此处的style即为打印时的样式
|
|
|
+ const style =
|
|
|
+ "@media print {} }";
|
|
|
+ print({
|
|
|
+ printable: "print_area2",
|
|
|
+ type: "html",
|
|
|
+ style: style, // 亦可使用引入的外部css;
|
|
|
+ scanStyles: false,
|
|
|
+ });
|
|
|
+ },
|
|
|
// 确认对账按钮功能
|
|
|
confirmReconciliation(){
|
|
|
this.queryParams.fBillstatus = '4'
|
|
@@ -892,7 +969,7 @@ export default {
|
|
|
Cfee(formDate).then(response=>{
|
|
|
console.log(response)
|
|
|
this.msgSuccess("操作成功")
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
this.open = false
|
|
|
},
|
|
@@ -911,7 +988,7 @@ export default {
|
|
|
console.log(response.user.userName)
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
getSummaries(param) {
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
@@ -960,11 +1037,11 @@ export default {
|
|
|
console.log(valid)
|
|
|
if (valid){
|
|
|
importFee(this.TWareHouseFees).then(response =>{
|
|
|
- console.log(response)
|
|
|
+ console.log(response)
|
|
|
this.feeList = response.rows
|
|
|
})
|
|
|
}
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
/** 打开导入表弹窗 */
|
|
@@ -986,7 +1063,7 @@ export default {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -1053,20 +1130,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
- handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.fId)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
- },
|
|
|
- handleSelectionChanGe(selection){
|
|
|
- if(selection.length > 0) {
|
|
|
- this.statrGo = false
|
|
|
- }else{
|
|
|
- this.statrGo = true
|
|
|
- }
|
|
|
+ // handleSelectionChange(selection) {
|
|
|
+ // this.ids = selection.map(item => item.fId)
|
|
|
+ // this.single = selection.length!==1
|
|
|
+ // this.multiple = !selection.length
|
|
|
+ // },
|
|
|
+ // 导入多选框
|
|
|
+ handleSelectionChange_s(selection) {
|
|
|
+ this.selection = selection
|
|
|
},
|
|
|
+ // handleSelectionChanGe(selection){
|
|
|
+ // if(selection.length > 0) {
|
|
|
+ // this.statrGo = false
|
|
|
+ // }else{
|
|
|
+ // this.statrGo = true
|
|
|
+ // }
|
|
|
+ // },
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
+ this.notChange = false
|
|
|
+ this.hide = true
|
|
|
this.reset();
|
|
|
this.DzfeeList = []
|
|
|
this.pass={
|
|
@@ -1120,8 +1203,37 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 查看按钮
|
|
|
+ check(row) {
|
|
|
+ this.notChange = true
|
|
|
+ this.reset();
|
|
|
+ this.pass={
|
|
|
+ fAmtdr:'', //应收合计
|
|
|
+ fAmtcr:'', //应付合计
|
|
|
+ fMblno:'', //提单号
|
|
|
+ fName:'', //货权方
|
|
|
+ fFeesName:'', //结算单位
|
|
|
+ fCorpid:'' //结算单位ID
|
|
|
+ }
|
|
|
+ const fId = row.fId || this.ids
|
|
|
+ console.log(fId)
|
|
|
+ getFee(fId).then(response => {
|
|
|
+ console.log(this.DzfeeList)
|
|
|
+ console.log(response)
|
|
|
+ this.DzfeeList = response.data.feeDoList
|
|
|
+ this.fWbuOptions = response.data.feesList
|
|
|
+ this.queryParams = response.data.tFee
|
|
|
+ console.log(this.queryParams)
|
|
|
+ this.fMblnoOptions = response.data.corps
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改财务数据主";
|
|
|
+ });
|
|
|
+ console.log(this.queryParams)
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
+ this.notChange = false
|
|
|
+ this.hide = false
|
|
|
this.reset();
|
|
|
this.pass={
|
|
|
fAmtdr:'', //应收合计
|
|
@@ -1157,7 +1269,7 @@ export default {
|
|
|
this.KHblnoOptions = response.rows;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
console.log(this.queryParams)
|
|
@@ -1171,7 +1283,7 @@ export default {
|
|
|
let formDate = new window.FormData()
|
|
|
formDate.append('tFee',JSON.stringify(this.queryParams))
|
|
|
formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
|
|
|
-
|
|
|
+
|
|
|
|
|
|
updateFee(formDate).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
@@ -1179,7 +1291,7 @@ export default {
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
this.queryParams.fBillstatus = '1'
|
|
|
let formDate = new window.FormData()
|
|
@@ -1196,11 +1308,8 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 导入多选框
|
|
|
- handleSelectionChange_s(selection) {
|
|
|
- this.selection = selection
|
|
|
- },
|
|
|
- // 多选框选中数据
|
|
|
+
|
|
|
+ // // 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.fId)
|
|
|
this.single = selection.length !== 1
|
|
@@ -1208,6 +1317,7 @@ export default {
|
|
|
},
|
|
|
/* 添加财务数据主 导入*/
|
|
|
confirmImport(){
|
|
|
+ this.hide = true
|
|
|
for (let item in this.selection) {
|
|
|
this.pass.fAmtcr = Number(this.pass.fAmtcr)
|
|
|
this.pass.fAmtdr = Number(this.pass.fAmtdr)
|
|
@@ -1263,7 +1373,7 @@ export default {
|
|
|
this.DzfeeList = this.selection
|
|
|
this.queryParams.tMblno = this.pass.fMblno //提单号
|
|
|
// this.queryParams.fCorpid = this.pass.fFeesName
|
|
|
-
|
|
|
+
|
|
|
this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid
|
|
|
this.queryParams.fCtrlcorpid = this.pass.fName
|
|
|
console.log(this.queryParams.fCorpid)
|
|
@@ -1290,24 +1400,48 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}else if(this.state_s == false){
|
|
|
- this.$message.error('本次金额不能大于原定金额');
|
|
|
+ this.$message.error('本次金额不能大于原定金额');
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const fIds = row.fId || this.ids;
|
|
|
- this.$confirm('是否确认删除财务数据主编号为"' + fIds + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delFee(fIds);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
+ let tips = ''
|
|
|
+ detailFee(fIds).then(res => {
|
|
|
+ console.log(res.msg)
|
|
|
+
|
|
|
+ switch (res.msg) {
|
|
|
+ case '0':
|
|
|
+ this.$message.error("当前数据已被其他操作员操作,请刷新页面")
|
|
|
+ break
|
|
|
+ case '1':
|
|
|
+ tips="当前主表有数据,从表无数据,确认是否删除?"
|
|
|
+ this.delete_s(fIds,tips)
|
|
|
+ break
|
|
|
+ case '2':
|
|
|
+ tips="当前主要有数据,从表有数据,确认是否删除?"
|
|
|
+ this.delete_s(fIds,tips)
|
|
|
+ break
|
|
|
+ case '3':
|
|
|
+ tips="当前主要有数据,从表有数据,确认是否删除?"
|
|
|
+ this.delete_s(fIds,tips)
|
|
|
+ break
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
+ delete_s(fIds,tips){
|
|
|
+ this.$confirm(tips, "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return delFee(fIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ },
|
|
|
// 远程模糊查询费用名称
|
|
|
fWRemoteMethod(name) {
|
|
|
this.fWbuOptions = []
|