|
@@ -96,7 +96,7 @@
|
|
|
</div>
|
|
|
<div class="fast-btn">
|
|
|
<el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-kaidan-confirm')" @click="kaiDanConfirm()">开单确认</el-button>
|
|
|
- <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-diaodu-confirm')" @click="diaoDuConfirm()">调度确认</el-button>
|
|
|
+ <el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-diaodu-confirm')" @click="diaoDuConfirm()">复核确认</el-button>
|
|
|
<el-button class="c-btn" type="success" icon="el-icon" v-if="sa.isAuth('tb-jicha-confirm')" @click="jiChaConfirm()">稽查确认</el-button>
|
|
|
<el-button class="c-btn" type="danger" icon="el-icon" v-if="sa.isAuth('tb-jicha-cancel')" @click="jiChaCancel()">取消确认</el-button>
|
|
|
<slot></slot>
|
|
@@ -106,7 +106,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- ------------- 数据列表 ------------- -->
|
|
|
- <el-table class="data-table" ref="data-table" :data="dataList" >
|
|
|
+ <el-table class="data-table" ref="data-table" :data="dataList" show-summary :summary-method="getSumRol">
|
|
|
<sa-td type="selection"></sa-td>
|
|
|
<!-- <sa-td name="作业类型" prop="feeType" type="enum"-->
|
|
|
<!-- :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>-->
|
|
@@ -117,8 +117,8 @@
|
|
|
<sa-td name="车牌号" prop="carNo" width="90px" ></sa-td>
|
|
|
<sa-td name="重量(kg)" prop="weight" ></sa-td>
|
|
|
<sa-td name="数量" prop="num" ></sa-td>
|
|
|
- <sa-td name="单价" prop="unitPrice" ></sa-td>
|
|
|
- <sa-td name="总价" prop="itemPrice" ></sa-td>
|
|
|
+ <sa-td name="单价(元)" prop="unitPrice" ></sa-td>
|
|
|
+ <sa-td name="总价(元)" prop="itemPrice" ></sa-td>
|
|
|
<sa-td name="结算状态" prop="isSettle" type="enum" :jv="{0: '未结算',1: '已结算'}"></sa-td>
|
|
|
<sa-td name="复核状态" prop="" ></sa-td>
|
|
|
<!-- <sa-td name="税率(%)" prop="taxRate" ></sa-td>-->
|
|
@@ -162,7 +162,7 @@
|
|
|
<sa-td name="付款时间" prop="payTime" width="150px" ></sa-td>
|
|
|
<sa-td name="备注" prop="remark" ></sa-td>
|
|
|
<sa-td name="开单员" prop="kaiDanPerson" width="80px" ></sa-td>
|
|
|
- <sa-td name="现场调度员" prop="diaoDuPerson" width="80px" ></sa-td>
|
|
|
+ <sa-td name="复核员" prop="diaoDuPerson" width="80px" ></sa-td>
|
|
|
<sa-td name="统计稽查员" prop="jiChaPerson" width="80px" ></sa-td>
|
|
|
|
|
|
<!-- <el-table-column label="操作" fixed="right" width="240px">-->
|
|
@@ -262,8 +262,60 @@
|
|
|
}
|
|
|
},
|
|
|
totalPrice: 0,
|
|
|
+ tableSum:{
|
|
|
+ itemPriceSum: 0,
|
|
|
+ taxPriceSum: 0,
|
|
|
+ noTaxPriceSum: 0,
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
+ getSumRol(param){
|
|
|
+ console.log("执行了getSumRol")
|
|
|
+ const columns = param.columns;
|
|
|
+ const sums = [];
|
|
|
+ columns.forEach((column, index) => {
|
|
|
+ if (index === 0) {
|
|
|
+ sums[index] = "合计";
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //根据当前列绑定的字段名进行判断,根据字段名决定展示什么内容
|
|
|
+ switch (column.label) {
|
|
|
+ //金额;
|
|
|
+ case "总价(元)":
|
|
|
+ //在这里你就可以根据需要对数据进行一些处理(保留小数位数,加上单位等)
|
|
|
+ sums[index] = this.tableSum.itemPriceSum;
|
|
|
+ break;
|
|
|
+ //人数
|
|
|
+ case "税款(元)":
|
|
|
+ sums[index] = this.tableSum.taxPriceSum;
|
|
|
+ break;
|
|
|
+ //件数;
|
|
|
+ case "不含税金额(元)":
|
|
|
+ sums[index] = this.tableSum.noTaxPriceSum;
|
|
|
+ break;
|
|
|
+ //不需要计算合计的列就展示‘--’
|
|
|
+ default:
|
|
|
+ sums[index] = "";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;
|
|
|
+ },
|
|
|
+ calcuSum(){
|
|
|
+ var itemPriceSum = 0;
|
|
|
+ var taxPriceSum = 0;
|
|
|
+ var noTaxPriceSum = 0;
|
|
|
+ var len = this.dataList.length;
|
|
|
+ for(var i=0; i<len; i++){
|
|
|
+ itemPriceSum = (itemPriceSum*100 + this.dataList[i].itemPrice*100)/100;
|
|
|
+ taxPriceSum = (taxPriceSum*100 + this.dataList[i].taxPrice*100)/100;
|
|
|
+ noTaxPriceSum = (noTaxPriceSum*100 + this.dataList[i].noTaxPrice*100)/100;
|
|
|
+ }
|
|
|
+ this.tableSum.itemPriceSum = itemPriceSum;
|
|
|
+ this.tableSum.taxPriceSum = Number(taxPriceSum).toFixed(2);
|
|
|
+ this.tableSum.noTaxPriceSum = Number(noTaxPriceSum).toFixed(2);
|
|
|
+
|
|
|
+ },
|
|
|
getTotalPrice(){
|
|
|
if ( this.selectTime != null && this.selectTime.length != 0) {
|
|
|
this.selectTimeRange.beginTime = this.selectTime[0];
|
|
@@ -297,7 +349,7 @@
|
|
|
if(selection.length == 0) {
|
|
|
return sa.msg('请至少选择一条数据')
|
|
|
}
|
|
|
- this.$confirm('确定进行调度确认操作?', '提示', {
|
|
|
+ this.$confirm('确定进行复核确认操作?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
}).then(() => {
|
|
@@ -463,7 +515,8 @@
|
|
|
sa.removeNull(this.p), function(res) {
|
|
|
this.dataList = res.data; // 数据
|
|
|
this.dataCount = res.dataCount; // 数据总数
|
|
|
- sa.f5TableHeight(); // 刷新表格高度
|
|
|
+ sa.f5TableHeight(); // 刷新表格高度
|
|
|
+ this.calcuSum();
|
|
|
}.bind(this));
|
|
|
this.getTotalPrice();
|
|
|
},
|