|
@@ -137,29 +137,45 @@
|
|
|
<span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+ <el-table-column label="操作" width="100" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['finance:charge:edit']"
|
|
|
+ v-if="scope.row.fBillstatus <= 3"
|
|
|
+ >修改
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['finance:charge:remove']"
|
|
|
+ v-if="scope.row.fBillstatus <= 3"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="scope.row.fBillstatus === 6"
|
|
|
+ >查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"
|
|
|
+ >查看审批流
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<!-- <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
|
|
|
<!-- <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
|
|
|
- <el-table-column label="操作" width="100" align="center" class-name="small-padding fixed-width">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['finance:charge:edit']"
|
|
|
- >修改
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['finance:charge:remove']"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -479,10 +495,11 @@ import {
|
|
|
addCharge,
|
|
|
exportCharge,
|
|
|
search,
|
|
|
- listCorps
|
|
|
+ listCorps,
|
|
|
+ delCharge_s
|
|
|
} from '@/api/finance/charge'
|
|
|
import { listFees } from '@/api/basicdata/fees'
|
|
|
-import print from "print-js"
|
|
|
+import print from 'print-js'
|
|
|
|
|
|
export default {
|
|
|
name: 'Charge',
|
|
@@ -615,25 +632,25 @@ export default {
|
|
|
methods: {
|
|
|
//打印功能
|
|
|
printing() {
|
|
|
- if(this.increase_s.length !== 0){
|
|
|
+ if (this.increase_s.length !== 0) {
|
|
|
this.printStatus = true
|
|
|
this.printObject = this.increase_s
|
|
|
- }else {
|
|
|
- this.$message.error('无数据,请检查是否有数据');
|
|
|
+ } else {
|
|
|
+ this.$message.error('无数据,请检查是否有数据')
|
|
|
}
|
|
|
},
|
|
|
//确认打印
|
|
|
printSomething() {
|
|
|
- console.log("22222");
|
|
|
+ console.log('22222')
|
|
|
// 此处的style即为打印时的样式
|
|
|
const style =
|
|
|
- "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
|
|
|
+ '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
|
|
|
print({
|
|
|
- printable: "print_area2",
|
|
|
- type: "html",
|
|
|
+ printable: 'print_area2',
|
|
|
+ type: 'html',
|
|
|
style: style, // 亦可使用引入的外部css;
|
|
|
- scanStyles: false,
|
|
|
- });
|
|
|
+ scanStyles: false
|
|
|
+ })
|
|
|
},
|
|
|
//关闭打印弹窗
|
|
|
closePrinting() {
|
|
@@ -891,7 +908,7 @@ export default {
|
|
|
fRemarks: null,
|
|
|
fAccbilldate: null,
|
|
|
fDeptid: null
|
|
|
- },
|
|
|
+ }
|
|
|
this.resetForm('queryParams')
|
|
|
this.open = true
|
|
|
this.title = '添加财务数据主'
|
|
@@ -960,7 +977,33 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const fIds = row.fId || this.ids
|
|
|
- this.$confirm('是否确认删除财务数据主编号为"' + fIds + '"的数据项?', '警告', {
|
|
|
+ console.log(fIds)
|
|
|
+ let tips = ''
|
|
|
+ delCharge_s(fIds).then(data => {
|
|
|
+ console.log(data)
|
|
|
+ switch (data.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
|
|
|
+ }
|
|
|
+ default:{
|
|
|
+ return this.$message.error('未知错误,无状态')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ delete_S(fIds, tips) {
|
|
|
+ this.$confirm(tips, '警告', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|