This commit is contained in:
liushuai
2020-03-11 18:09:35 +08:00
parent b6c062607f
commit c099ccf0be
14 changed files with 312 additions and 140 deletions

View File

@@ -193,7 +193,7 @@
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
<el-input v-positive="'float'" v-model="form1.money" type="number" class="editWorkTime" size="small" placeholder="开票金额" @change="Keeptwodecimalplaces"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
@@ -245,7 +245,7 @@
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
<el-input v-positive="'float'" v-model="form1.money" type="number" class="editWorkTime" size="small" placeholder="开票金额" @change="Keeptwodecimalplaces"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
@@ -257,7 +257,7 @@
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" title="关联到货单" center style="min-height: 200px" width="35%">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" title="关联到货单" center style="min-height: 200px" width="25%">
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="到货单编号" align="center">
@@ -276,8 +276,8 @@
</template>
</el-table-column>
</el-table>
<span>合计<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">关联到货单</el-button>
<span>合计<el-input v-positive="'float'" v-model="SUM" size="mini" type="number" style="width: 80px; margin: 10px 10px 0 10px" @change="Keeptwodecimalplaces"/></span>
<el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">货票关联</el-button>
</el-dialog>
</div>
</template>
@@ -377,6 +377,10 @@ export default {
this.searchTable1()
},
methods: {
Keeptwodecimalplaces() {
this.form1.money = Number(this.form1.money).toFixed(2)
this.SUM = this.SUM * 1.00
},
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
@@ -513,7 +517,7 @@ export default {
this.dialogVisible2 = true
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额
this.form1.money = row.开票金额.toFixed(2)
this.form1.Number = row.发票号
this.form1.remark = row.备注
this.form1.supplierNameValue = parseInt(row.供应商)
@@ -567,8 +571,9 @@ export default {
handleSelectionChange(val) {
this.SUM = 0
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].到货金额).toFixed(2)
this.SUM += parseFloat(val[i].到货金额)
}
console.log(this.SUM, 11)
this.arrest = val
},
// 选入
@@ -708,6 +713,14 @@ function saveAs(blob, filename = '下载文件.xls') {
margin-top: 1px;
margin-bottom: 1px;
}
.editWorkTime input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
text-align: center;
}
.editWorkTime input[type="number"]{
-moz-appearance: textfield;
text-align: center;
}
</style>
<style lang="scss">
.subTableHeader {
@@ -725,6 +738,13 @@ function saveAs(blob, filename = '下载文件.xls') {
background-color: #e9f0f9;
}
}
.editWorkTime input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
text-align: center;
}
.editWorkTime input[type="number"]{
-moz-appearance: textfield;
}
</style>
<style lang="scss">
.button111{