Commit 418e9c05 authored by 邓春圆's avatar 邓春圆

添加回收客户

parent 9d0cb54b
...@@ -486,3 +486,12 @@ export function deptExportExcel(){ ...@@ -486,3 +486,12 @@ export function deptExportExcel(){
method:'get' method:'get'
}) })
} }
export function recycleUnconfirmedCustomer(data){
return request({
url:'ecw/customer/recycle-unconfirmed-customer',
method:'put',
data
})
}
...@@ -136,7 +136,9 @@ ...@@ -136,7 +136,9 @@
</router-link> </router-link>
<el-button size="mini" type="text" @click="handleUpdate(scope.row)" <el-button size="mini" type="text" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:customer:treat-perfect']">{{$t('完善')}}</el-button> v-hasPermi="['ecw:customer:treat-perfect']">{{$t('完善')}}</el-button>
<el-button v-has-permi="['ecw:customer:treat-recovery']" size="mini" type="text" @click="recovery(scope.row)" > {{$t('回收客户')}} </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
...@@ -360,7 +362,7 @@ import { ...@@ -360,7 +362,7 @@ import {
exportCustomerExcel, exportCustomerExcel,
getWaitForConfirmList, getWaitForConfirmList,
confirm, confirm,
waiteConfirmExportExcel, waiteConfirEexportExcel waiteConfirmExportExcel, waiteConfirEexportExcel, recycleUnconfirmedCustomer
} from "@/api/ecw/customer"; } from "@/api/ecw/customer";
import { listServiceUser } from "@/api/system/user" import { listServiceUser } from "@/api/system/user"
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from '@/utils/dict'
...@@ -455,6 +457,20 @@ export default { ...@@ -455,6 +457,20 @@ export default {
}) })
}, },
methods: { methods: {
recovery(row){
console.log(row,'row')
this.$confirm(this.$t('是否要回收当前{name}',row), '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
recycleUnconfirmedCustomer({customerId:row.id}).then(r =>{
this.$message.success(this.$t('回收成功。'))
})
}).catch(() => {
this.$message.info(this.$t('已取消'))
});
},
getDictDatas, getDictDatas,
countryFormatter(row, column, cellValue) { countryFormatter(row, column, cellValue) {
const country = this.countryList.find((e) => e.id === cellValue) const country = this.countryList.find((e) => e.id === cellValue)
......
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