缺少上传文件组件的完整代码,期待获取,完成签到页的全面优化

This commit is contained in:
2024-12-15 21:41:23 +08:00
parent 9fd16697d5
commit ba0d565424
27 changed files with 1102 additions and 57 deletions

View File

@@ -28,12 +28,12 @@
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span v-if="!data.isAdd">{{ node.label }}</span>
<span class="node-label" v-if="!data.isAdd">{{ node.label }}</span>
<el-input
v-model="newChildNode"
v-if="data.isAdd"
ref="addRef"
class="add-new-child-node">
v-model="newChildNode"
v-if="data.isAdd"
ref="addRef"
class="add-new-child-node">
</el-input>
<span>
<el-button
@@ -53,7 +53,7 @@
<el-button
type="text"
size="mini"
@click="() => remove(node, data)" v-if="data.parentId===-1">
@click="() => remove(node, data)" v-if="data.parentId===-1">
删除
</el-button>
</span>
@@ -579,7 +579,8 @@
</el-table-column>
<el-table-column label="金额" prop="price">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入金额"/>
<el-input v-model="scope.row.price" placeholder="请输入金额"
@input="updateBigPrice(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="大写金额(零壹贰叁肆伍陆柒捌玖万仟佰拾亿元角分)" prop="bigPrice">
@@ -619,6 +620,7 @@ import {
listOaReceiveAccount,
updateOaReceiveAccount
} from "../../../api/oa/oaReceiveAccount";
import {numberToCNY} from "../../../utils/currencyFormatter";
export default {
name: "Finance",
@@ -656,7 +658,7 @@ export default {
lableBg: "background: #f0f9eb; width:150px; text-align: center;",
//弹出层出入账类型
type: '',
nowTab:"0",
nowTab: "0",
// 查询参数
queryParams: {
pageNum: 1,
@@ -676,8 +678,8 @@ export default {
//明细总价
priceSum: 0,
//全新节点
newChildNode:"",
receiveAccountName:"",
newChildNode: "",
receiveAccountName: "",
//选项卡标签
activeName: 'first',
@@ -729,6 +731,7 @@ export default {
}
};
},
created() {
/*this.getListOut();*/
// this.getListEnter();
@@ -741,14 +744,29 @@ export default {
},
methods: {
updateBigPrice(index, row) {
if (row.price !== '') {
row.bigPrice = numberToCNY(parseFloat(row.price) || 0);
} else {
row.bigPrice = ''; // 如果价格为空,则大写金额也清空
}
},
append(data) {
let newChild = { id: this.receiveAccountList[this.receiveAccountList.length-1].id++, label: '输入名称', children: [],receiveAccountName:"",isAdd:true };
let newChild = {
id: this.receiveAccountList[this.receiveAccountList.length - 1].id++,
label: '输入名称',
children: [],
receiveAccountName: "",
isAdd: true
};
if (!data.children) {
this.$set(data, 'children', []);
}
newChild.receiveAccountName = newChild.label;
newChild.parentId = -1;
addOaReceiveAccount(newChild).then(res=>{
addOaReceiveAccount(newChild).then(res => {
console.log(res)
newChild.receiveAccountId = res.data.receiveAccountId
})
@@ -773,10 +791,10 @@ export default {
handleNodeClick(data) {
this.queryParams.receiveAccountId = data.receiveAccountId;
if (this.nowTab==="2"){
if (this.nowTab === "2") {
return;
}
let type = this.nowTab=="1"?'0':'1'
let type = this.nowTab == "1" ? '0' : '1'
this.handleQuery(type);
},
@@ -1412,11 +1430,18 @@ export default {
}
.custom-tree-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
padding-right: 8px;
}
.node-label{
width: 130px;
overflow: hidden;
text-overflow: ellipsis;
}
</style>