|
@@ -42,14 +42,14 @@
|
|
|
<span v-else>出库量: 0 吨</span>
|
|
|
<span v-if="orderList.unitContractPrice">合同单价: {{ orderList.unitContractPrice }} 元/吨</span>
|
|
|
<span v-else>合同单价: 0 元/吨</span>
|
|
|
- <span v-if="amountReceivable">应收: {{ amountReceivable.toFixed(2) }} 元</span>
|
|
|
+ <span v-if="amountReceivable">应收: {{ amountReceivable }} 元</span>
|
|
|
<span v-else>应收: 0 元</span>
|
|
|
- <span v-if="amountReceived">已收: {{ amountReceived.toFixed(2) }} 元
|
|
|
+ <span v-if="amountReceived">已收: {{ amountReceived }} 元
|
|
|
<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
|
|
|
src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
|
|
|
</span>
|
|
|
<span v-else>已收: 0 元</span>
|
|
|
- <span v-if="uncollectedAmount">未收: {{ uncollectedAmount.toFixed(2) }} 元</span>
|
|
|
+ <span v-if="uncollectedAmount">未收: {{ uncollectedAmount }} 元</span>
|
|
|
<span v-else>未收: 0 元</span>
|
|
|
<span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元
|
|
|
<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
|
|
@@ -192,7 +192,7 @@
|
|
|
<el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
|
|
|
<el-form :model="form">
|
|
|
<el-form-item label="未收金额(元)" :label-width="formLabelWidth" prop="amountNotReceivable">
|
|
|
- <span>{{ uncollectedAmount }}</span>
|
|
|
+ <span>{{ uncollectedAmount1 }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
|
|
|
<el-input v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
|
|
@@ -292,6 +292,7 @@
|
|
|
allmoney1: 0,
|
|
|
deptCircularPage: {},
|
|
|
deptBudgetTotal: 0,
|
|
|
+ uncollectedAmount1:0,
|
|
|
stockSaleReceiptReportList: [],
|
|
|
stockSaleReceiptReport: {
|
|
|
stockSaleReceiptReportList: [],
|
|
@@ -327,10 +328,10 @@
|
|
|
deposit: '0',
|
|
|
depositUrl: [],
|
|
|
saleList: [],
|
|
|
- amountReceivable: '',
|
|
|
- amountReceived: '',
|
|
|
- uncollectedAmount: '',
|
|
|
- outboundVolume: '',
|
|
|
+ amountReceivable: 0,
|
|
|
+ amountReceived: 0,
|
|
|
+ uncollectedAmount: 0,
|
|
|
+ outboundVolume: 0,
|
|
|
collectionDate: '',
|
|
|
collectionScreenshot: '',
|
|
|
amountEdCollectionable: '',
|
|
@@ -368,7 +369,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
tableRowClassName({row, rowIndex}) {
|
|
|
- console.log(row)
|
|
|
+ // console.log(row)
|
|
|
if (row.returnFlag==1) {
|
|
|
return 'warning-row';
|
|
|
} else {
|
|
@@ -557,7 +558,7 @@
|
|
|
const values = data.map((item) => Number(item[column.property]))
|
|
|
if (!values.every((value) => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr)
|
|
|
+ const value = Number(curr).toFixed(2)
|
|
|
if (!isNaN(value)) {
|
|
|
return prev + curr
|
|
|
} else {
|
|
@@ -583,7 +584,7 @@
|
|
|
const values = data.map((item) => Number(item[column.property]))
|
|
|
if (!values.every((value) => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr)
|
|
|
+ const value = Number(curr).toFixed(2)
|
|
|
if (!isNaN(value)) {
|
|
|
return prev + curr
|
|
|
} else {
|
|
@@ -608,7 +609,7 @@
|
|
|
const values = data.map((item) => Number(item[column.property]))
|
|
|
if (!values.every((value) => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr)
|
|
|
+ const value = Number(curr).toFixed(2)
|
|
|
if (!isNaN(value)) {
|
|
|
return prev + curr
|
|
|
} else {
|
|
@@ -633,7 +634,7 @@
|
|
|
const values = data.map((item) => Number(item[column.property]))
|
|
|
if (!values.every((value) => isNaN(value))) {
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr)
|
|
|
+ const value = Number(curr).toFixed(2)
|
|
|
if (!isNaN(value)) {
|
|
|
return prev + curr
|
|
|
} else {
|
|
@@ -650,7 +651,14 @@
|
|
|
}
|
|
|
|
|
|
})
|
|
|
- console.log(sums[sums.length - 1],sums[sums.length - 2])
|
|
|
+ for (let i = 0; i < sums.length; i++) {
|
|
|
+ // console.log(typeof sums[i])
|
|
|
+ if(typeof sums[i]=='number'){
|
|
|
+ sums[i]=sums[i].toFixed(2)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ // console.log(sums)
|
|
|
// sums[sums.length - 1] = sums[sums.length - 1].toFixed(2)
|
|
|
// sums[sums.length - 2] = sums[sums.length - 2].toFixed(2)
|
|
|
return sums
|
|
@@ -732,10 +740,23 @@
|
|
|
},
|
|
|
//收款
|
|
|
handlecollect() {
|
|
|
- this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
|
|
|
- this.amountNotReceivable = this.saleList.records[0].amountNotReceivable
|
|
|
- this.stockSaleReceiptReportList = this.saleList.records
|
|
|
- this.dialogFormVisible1 = true
|
|
|
+ if(this.modification.length>0){
|
|
|
+ this.uncollectedAmount1=0
|
|
|
+ for (let i = 0; i < this.modification.length; i++) {
|
|
|
+ this.uncollectedAmount1+=Number(this.modification[i].amountNotReceivable)
|
|
|
+ }
|
|
|
+ this.uncollectedAmount1=this.uncollectedAmount1.toFixed(3)
|
|
|
+ this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
|
|
|
+ this.amountNotReceivable = this.saleList.records[0].amountNotReceivable
|
|
|
+ this.stockSaleReceiptReportList = this.saleList.records
|
|
|
+ this.dialogFormVisible1 = true
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '请至少选择一个条目',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
collectment() {
|
|
|
this.stockSaleReceiptReport.money = this.money
|
|
@@ -831,10 +852,18 @@
|
|
|
let num = []
|
|
|
for (var i = 0; i < response.records.length; i++) {
|
|
|
response.records[i].identification = 'false'
|
|
|
- this.amountReceivable += response.records[i].amountIngReceivable
|
|
|
- this.amountReceived += response.records[i].amountEdReceivable
|
|
|
- this.uncollectedAmount += response.records[i].amountNotReceivable
|
|
|
- this.outboundVolume += response.records[i].settlementWeight
|
|
|
+ if(response.records[i].amountIngReceivable){
|
|
|
+ this.amountReceivable += Number(response.records[i].amountIngReceivable.toFixed(2))
|
|
|
+ }
|
|
|
+ if(response.records[i].amountEdReceivable){
|
|
|
+ this.amountReceived += Number(response.records[i].amountEdReceivable.toFixed(2))
|
|
|
+ }
|
|
|
+ if(response.records[i].amountNotReceivable){
|
|
|
+ this.uncollectedAmount += Number(response.records[i].amountNotReceivable.toFixed(2))
|
|
|
+ }
|
|
|
+ if(response.records[i].settlementWeight){
|
|
|
+ this.outboundVolume += Number(response.records[i].settlementWeight.toFixed(2))
|
|
|
+ }
|
|
|
// this.addressUrlArray1.push(response.records[i].collectionScreenshot.split('$'))
|
|
|
if (response.records[i].collectionScreenshot != null) {
|
|
|
num = response.records[i].collectionScreenshot.split('$')
|