Browse Source

3213

master
lichong 8 months ago
parent
commit
4191ee9cb6
  1. 19
      src/renderer/src/App.vue

19
src/renderer/src/App.vue

@ -25,18 +25,18 @@
</el-row>
<el-row style="padding: 18px;">
<el-col>
<el-table :data="tableData" style="width: 100%">
<el-table :data="tableData" style="width: 100%" height="calc(100vh - 95px)">
<el-table-column v-for="(headerItem, headerIndex) in tableHeader" :prop="headerItem.prop" :key="headerIndex"
:label="headerItem.label" :width="headerItem.width">
:label="headerItem.label" :min-width="headerItem.minWidth" :width="headerItem.width">
<template #default="scope">
<div>
<div v-if="headerItem.type === 'text'">
<el-input v-model="scope.row[headerItem.prop]" :placeholder="`请输入${headerItem.label}`"
:disabled="headerItem.disabled"></el-input>
</div>
<div v-else style="width: 90%;">
<div v-else>
<el-input-number v-model="scope.row[headerItem.prop]" :placeholder="`请输入${headerItem.label}`"
:style="`width: ${(headerItem.width || 160) - 20}px`" :disabled="headerItem.disabled" :min="0"
style="width:100%" :disabled="headerItem.disabled" :min="0"
controls-position="right"></el-input-number>
</div>
</div>
@ -90,43 +90,48 @@ export default {
label: "名称",
type: "text",
disabled: false,
width: 200,
minWidth: 1,
},
{
prop: "zongzhang",
label: "总账",
type: "number",
disabled: false,
width: 200,
minWidth: 1,
},
{
prop: "xiazhang",
label: "下账",
type: "number",
width: 150,
disabled: false,
},
{
prop: "yue",
label: "余额",
type: "number",
width: 150,
disabled: true,
},
{
prop: "shuxin",
label: "0.47倍 树心戈壁",
type: "number",
minWidth: 1,
disabled: false,
},
{
prop: "mimeng",
label: "0.倍 迷梦沼泽火山",
type: "number",
minWidth: 1,
disabled: false,
},
{
prop: "dan",
label: "5倍 蛋",
type: "number",
width: 150,
disabled: false,
}
],
@ -150,7 +155,7 @@ export default {
let element = this.tableData[index];
if ((element.zongzhang - element.xiazhang) >= 0) {
element.yue = element.zongzhang - element.xiazhang
element.zongzhang = element.xiazhang * (element.shuxin + element.mimeng + element.dan) + element.yue
element.zongzhang = element.xiazhang * (element.shuxin * 0.47 + element.mimeng * 0.6 + element.dan * 5) + element.yue
} else {
elMsg.push(index + 1)
}

Loading…
Cancel
Save