|
@@ -2,7 +2,7 @@
|
|
|
* @Author: liuzhenlin 461480418@qq.ocm
|
|
* @Author: liuzhenlin 461480418@qq.ocm
|
|
|
* @Date: 2023-05-17 14:03:04
|
|
* @Date: 2023-05-17 14:03:04
|
|
|
* @LastEditors: liuzhenlin
|
|
* @LastEditors: liuzhenlin
|
|
|
- * @LastEditTime: 2023-05-19 17:18:12
|
|
|
|
|
|
|
+ * @LastEditTime: 2023-05-22 09:55:59
|
|
|
* @Description: file content
|
|
* @Description: file content
|
|
|
* @FilePath: \订单全流程管理系统\src\views\base\agent\components\BusinessTarget.vue
|
|
* @FilePath: \订单全流程管理系统\src\views\base\agent\components\BusinessTarget.vue
|
|
|
-->
|
|
-->
|
|
@@ -50,15 +50,15 @@
|
|
|
{{ row.totalAmount.toFixed(2) }}
|
|
{{ row.totalAmount.toFixed(2) }}
|
|
|
</span>
|
|
</span>
|
|
|
<span v-else-if="item.prop === 'totalRate'">
|
|
<span v-else-if="item.prop === 'totalRate'">
|
|
|
- {{ row.totalAmount == 0 ? 0 : ((row.totalAmount.toFixed(2) / row.q4) * 100).toFixed(2) }} %
|
|
|
|
|
|
|
+ {{ row.totalAmount == 0 ? 0 : ((row.totalAmount.toFixed(2) / row.total) * 100).toFixed(2) }} %
|
|
|
</span>
|
|
</span>
|
|
|
<span v-else>{{ row[item.prop] }}</span>
|
|
<span v-else>{{ row[item.prop] }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" fixed="right" label="操作" show-overflow-tooltip width="85">
|
|
<el-table-column align="center" fixed="right" label="操作" show-overflow-tooltip width="85">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
- <el-button v-permissions="['base:distributor:edit']" type="text">编辑</el-button>
|
|
|
|
|
- <el-button v-permissions="['base:distributor:delete']" type="text" @click="handleDelete(row)">删除</el-button>
|
|
|
|
|
|
|
+ <el-button type="text" @click="$refs.target.open(row)">编辑</el-button>
|
|
|
|
|
+ <el-button type="text" @click="handleDelete(row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -197,25 +197,14 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
- if (row.id) {
|
|
|
|
|
- this.$baseConfirm('你确定要删除当前项吗', null, async () => {
|
|
|
|
|
- const { msg } = await distrApi.doDelete({ ids: [row.id] })
|
|
|
|
|
- this.$baseMessage(msg, 'success', 'vab-hey-message-success')
|
|
|
|
|
- await this.fetchData()
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- if (this.selectRows.length > 0) {
|
|
|
|
|
- const ids = this.selectRows.map((item) => parseInt(item.id))
|
|
|
|
|
- console.log(ids)
|
|
|
|
|
- this.$baseConfirm('你确定要删除选中项吗', null, async () => {
|
|
|
|
|
- const { msg } = await distrApi.doDelete({ ids })
|
|
|
|
|
- this.$baseMessage(msg, 'success', 'vab-hey-message-success')
|
|
|
|
|
- await this.fetchData()
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$baseMessage('未选中任何行', 'error', 'vab-hey-message-error')
|
|
|
|
|
|
|
+ this.$baseConfirm('你确定要删除当前项吗', null, async () => {
|
|
|
|
|
+ const [err, res] = await to(distrApi.delProxyIndex({ id: [row.id] }))
|
|
|
|
|
+ if (err) return
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.$baseMessage('删除成功', 'success', 'vab-hey-message-success')
|
|
|
|
|
+ await this.queryData()
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|