Commit c3641923 authored by 邓春圆's avatar 邓春圆

客户详情添加删除 功能

parent 859b4cd3
......@@ -9,7 +9,7 @@
<el-button @click="$router.push('/offer/create')" type="primary" size="small">{{$t('报价')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerFollow'].customerFollow.dialogVisible = true">{{$t('跟进')}}</el-button>
<el-button type="primary" size="small" @click="$refs['customerComplaint'].handleAdd()">{{$t('客诉')}}</el-button>
<el-button type="danger" size="small">{{$t('删除')}}</el-button>
<el-button v-hasPermi="['ecw:customer:delete']" type="danger" size="small" @click="deleteCustomerFn()">{{$t('删除')}}</el-button>
</div>
</div>
<el-card style="margin-top: 15px;">
......@@ -414,7 +414,8 @@ import {
orderStatistics,
creditLogCreate,
creditScoreStatistic,
infoListReceiptPage, userMemberUserList, memberUserList
infoListReceiptPage, userMemberUserList, memberUserList, deleteCustomer,
} from '@/api/ecw/customer'
import { DICT_TYPE, getDictDataLabel, getDictDatas2 } from '@/utils/dict'
import { getProductTypeList } from '@/api/ecw/productType'
......@@ -710,8 +711,21 @@ export default {
this.infoListReceiptTotal = r.data.total;
}
})
},
deleteCustomerFn(){
this.$confirm(`${this.$t('是否要删除当前客户')}《${this.customer.name}》?`, `${this.$t('提示')}`, {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
deleteCustomer(this.customerId).then(r => {
this.$modal.msgSuccess(this.$t('删除成功'));
this.$router.back()
})
})
}
}
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment