Commit 793eed6a by 胡悦

修复bug

1 parent 1997c55c
...@@ -247,16 +247,26 @@ export default { ...@@ -247,16 +247,26 @@ export default {
}) })
break break
case 'delete': case 'delete':
deleteSpecialShop({ shopId }).then(res => { this.$confirm('是否要删除?', '提示', {
const { code, message } = res; confirmButtonText: '确定',
if (code == 200) { cancelButtonText: '取消',
this.$refs.shopTable.refreshTable() type: 'warning'
} else { }).then(() => {
this.$message({ deleteSpecialShop({ shopId }).then(res => {
message, const { code, message } = res;
type: 'error' if (code == 200) {
}); this.$message({
} type: 'success',
message: '删除成功!'
})
this.$refs.shopTable.refreshTable()
} else {
this.$message({
message,
type: 'error'
});
}
})
}) })
break break
} }
......
...@@ -194,13 +194,13 @@ import store from '@/store' ...@@ -194,13 +194,13 @@ 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();
} }
} }
return { return {
searchForm: {}, searchForm: {},
vehicleFormList: [ vehicleFormList: [
...@@ -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 => {
this.$message({ const { code, message } = res;
type: 'success', if (code == 200) {
message: '删除成功!' this.$message({
}) type: 'success',
this.$refs.vehicleForm.refreshTable() message: '删除成功!'
})
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 => {
this.$message({ const { code, message } = res;
type: 'success', if (code == 200) {
message: '解绑成功!' this.$message({
}) type: 'success',
this.$refs.vehicleForm.refreshTable() message: '解绑成功!'
})
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!