Commit 793eed6a by 胡悦

修复bug

1 parent 1997c55c
...@@ -247,9 +247,18 @@ export default { ...@@ -247,9 +247,18 @@ export default {
}) })
break break
case 'delete': case 'delete':
this.$confirm('是否要删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteSpecialShop({ shopId }).then(res => { deleteSpecialShop({ shopId }).then(res => {
const { code, message } = res; const { code, message } = res;
if (code == 200) { if (code == 200) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.$refs.shopTable.refreshTable() this.$refs.shopTable.refreshTable()
} else { } else {
this.$message({ this.$message({
...@@ -258,6 +267,7 @@ export default { ...@@ -258,6 +267,7 @@ export default {
}); });
} }
}) })
})
break break
} }
}, },
......
...@@ -194,10 +194,10 @@ import store from '@/store' ...@@ -194,10 +194,10 @@ import store from '@/store'
import { getList, getSpecialShopList, addVehicle, editVehicle, downloadtemplate, deleteVehicle, unbindVehicle, importVehicle, exportVehicle, infoVehicle } from 'services/vehicle' import { getList, getSpecialShopList, addVehicle, editVehicle, downloadtemplate, deleteVehicle, unbindVehicle, importVehicle, exportVehicle, infoVehicle } from 'services/vehicle'
export default { export default {
data() { data() {
let checkShopName = (rule, vaule, cb)=>{ let checkShopName = (rule, vaule, cb) => {
if(this.vehicleForm.shopName==""){ if (this.vehicleForm.shopName == "") {
cb(new Error('请选择特约店名称')) cb(new Error('请选择特约店名称'))
}else{ } else {
cb(); cb();
} }
} }
...@@ -439,11 +439,19 @@ export default { ...@@ -439,11 +439,19 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteVehicle({ tempId: scope.tempId }).then(res => { deleteVehicle({ tempId: scope.tempId }).then(res => {
const { code, message } = res;
if (code == 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}) })
this.$refs.vehicleForm.refreshTable() this.$refs.vehicleForm.refreshTable()
} else {
this.$message({
message,
type: 'error'
});
}
}) })
}) })
break break
...@@ -454,11 +462,19 @@ export default { ...@@ -454,11 +462,19 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
unbindVehicle({ tempId: scope.tempId }).then(res => { unbindVehicle({ tempId: scope.tempId }).then(res => {
const { code, message } = res;
if (code == 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '解绑成功!' message: '解绑成功!'
}) })
this.$refs.vehicleForm.refreshTable() this.$refs.vehicleForm.refreshTable()
} else {
this.$message({
message,
type: 'error'
});
}
}) })
}) })
break break
...@@ -551,7 +567,7 @@ export default { ...@@ -551,7 +567,7 @@ export default {
}, },
filterConfirm() { filterConfirm() {
const { label, id, children } = this.$refs.tree.getCurrentNode(); const { label, id, children } = this.$refs.tree.getCurrentNode();
if(children) { if (children) {
this.$message({ this.$message({
message: '请选择下级特约店', message: '请选择下级特约店',
type: 'error' type: 'error'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!