|
|
@@ -4,7 +4,16 @@
|
|
|
<el-input style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
- <tableNewLayout :layout="tablecols" :data="list" :opwidth="200" height="calc(100vh - 376px)" :width="true" :custom="true" fixedName="operation">
|
|
|
+ <div class="mt-10 inline-16">
|
|
|
+ <add @onSuccess="onSuccess" v-if="tool.checkAuth($route.name,'commissionDetails')" :status="data.status"></add>
|
|
|
+ </div>
|
|
|
+ <div class="mt-10 inline-16">
|
|
|
+ <el-button size="small" v-if="tool.checkAuth($route.name,'commissionDetails')" :type="data.status == '审核' || delData.length == 0?'':'primary'" @click="onDel" :disabled="data.status == '审核' || delData.length == 0">删除</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="mt-10 inline-16">
|
|
|
+ <exportFile v-if="tool.checkAuth($route.name,'commissionDetails')" :param="param" :columns="tablecols" fileName="提成明细"></exportFile>
|
|
|
+ </div>
|
|
|
+ <tableNewLayout :checkbox="true" :layout="tablecols" :data="list" :opwidth="200" height="calc(100vh - 376px)" :width="true" :custom="true" fixedName="operation" @selectionChange="selectionChange">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'remarks'">
|
|
|
{{scope.column.data[[scope.column.columnname]]?scope.column.data[[scope.column.columnname]]:'--'}}
|
|
|
@@ -12,16 +21,36 @@
|
|
|
scope.column.data.sourcenote !== ''?'系统备注:' + scope.column.data.sourcenote : scope.column.data.remarks !== ''?'人工备注:' + scope.column.data.remarks:'--'}}-->
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname === 'orderprice'">
|
|
|
- {{tool.formatAmount(scope.column.data[[scope.column.columnname]],2)}}
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname === 'price'">
|
|
|
- {{tool.formatAmount(scope.column.data[[scope.column.columnname]],2)}}
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname === 'rate'">
|
|
|
- {{Math.round((scope.column.data[[scope.column.columnname]]*100)*100)/100}}%
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?Math.round((scope.column.data[[scope.column.columnname]]*100)*100)/100 + '%':'--'}}
|
|
|
</div>
|
|
|
<div v-else-if="scope.column.columnname === 'allocation_rate'">
|
|
|
- {{Math.round((scope.column.data[[scope.column.columnname]]*100)*100)/100}}%
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?Math.round((scope.column.data[[scope.column.columnname]]*100)*100)/100 + '%':'--'}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'amount'">
|
|
|
+ <div v-if="data.status != '审核' && tool.checkAuth($route.name,'commissionDetails')">
|
|
|
+ <el-input v-model="scope.column.data.amount" placeholder="提成金额" @change="amountChange(scope.column.data.amount,scope.column.data)"></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'orderExpectedamount'">
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'rewardamount'">
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'payapplyamount'">
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
+ </div>
|
|
|
+ <div v-else-if="scope.column.columnname === 'unpayapplyamount'">
|
|
|
+ {{scope.column.data[[scope.column.columnname]]?'¥ '+tool.formatAmount(scope.column.data[[scope.column.columnname]],2):'--'}}
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
{{scope.column.data[[scope.column.columnname]] || scope.column.columnname === 'operation'?scope.column.data[[scope.column.columnname]]:'--'}}
|
|
|
@@ -34,8 +63,8 @@
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
- :page-sizes="[20, 20, 100, 200]"
|
|
|
- :page-size="20"
|
|
|
+ :page-sizes="[50, 100, 150, 200]"
|
|
|
+ :page-size="50"
|
|
|
layout="total,sizes, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
@@ -44,8 +73,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import add from '../modules/commissionDetails/add'
|
|
|
+import exportFile from '@/components/export_file/index'
|
|
|
export default {
|
|
|
name: "commissionDetails",
|
|
|
+ props:['data'],
|
|
|
+ components:{add,exportFile},
|
|
|
data(){
|
|
|
return {
|
|
|
param:{
|
|
|
@@ -53,7 +86,7 @@ export default {
|
|
|
"content": {
|
|
|
"sa_hrcashbillid":"",
|
|
|
"pageNumber": 1,
|
|
|
- "pageSize": 20,
|
|
|
+ "pageSize": 50,
|
|
|
"where": {
|
|
|
"condition": ""
|
|
|
}
|
|
|
@@ -62,7 +95,8 @@ export default {
|
|
|
tablecols:[],
|
|
|
list:[],
|
|
|
total:0,
|
|
|
- currentPage:0
|
|
|
+ currentPage:0,
|
|
|
+ delData:[]
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -83,6 +117,61 @@ export default {
|
|
|
this.param.content.pageNumber = val
|
|
|
this.listData()
|
|
|
},
|
|
|
+ onSuccess(){
|
|
|
+ this.listData()
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ },
|
|
|
+ selectionChange(val){
|
|
|
+ this.delData = val.map(item=>item.sa_hrcashbilldetailid)
|
|
|
+ },
|
|
|
+ onDel(){
|
|
|
+ this.$confirm('此操作将永久删除已选明细, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20240111131404,
|
|
|
+ "content": {
|
|
|
+ "sa_hrcashbillid": this.$route.query.id,
|
|
|
+ "sa_hrcashbilldetailids":this.delData
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.listData(this.param.content.pageNumber = 1)
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async amountChange(val,data){
|
|
|
+ if (data.amount < 0){
|
|
|
+ data.amount = -Math.abs(data.amount).toFixed(4)
|
|
|
+ }else {
|
|
|
+ data.amount = data.amount.toFixed(4)
|
|
|
+ }
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20240111131204,
|
|
|
+ "content": {
|
|
|
+ "sa_hrcashbillid": this.$route.query.id,
|
|
|
+ "hrcashbilldetail": [
|
|
|
+ {
|
|
|
+ "sa_hrcashbilldetailid":data.sa_hrcashbilldetailid,
|
|
|
+ "sa_orderitemsid": data.sa_orderitemsid,
|
|
|
+ "remarks":data.remarks,
|
|
|
+ "sa_orderid":data.sa_orderid,
|
|
|
+ "amount":data.amount
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.listData(this.param.content.pageNumber = 1)
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.listData()
|