Commit 6fc9b90a authored by houjn@hikoon.cn's avatar houjn@hikoon.cn

新增区域管理

parent 1a8d1143
......@@ -18,6 +18,16 @@ export function updateBankAccount(data) {
})
}
// 更新银行账户
export function updateBankAccountStatus(data) {
return request({
url: '/ecw/bank-account/updateStatus',
method: 'put',
data: data
})
}
// 删除银行账户
export function deleteBankAccount(id) {
return request({
......
......@@ -18,6 +18,15 @@ export function updateCurrency(data) {
})
}
// 更新
export function updateCurrencyStatus(data) {
return request({
url: '/ecw/currency/updateStatus',
method: 'put',
data: data
})
}
// 删除
export function deleteCurrency(id) {
return request({
......
import request from '@/utils/request'
// 创建区域设置
export function createRegion(data) {
return request({
url: '/ecw/region/create',
method: 'post',
data: data
})
}
// 更新区域设置
export function updateRegion(data) {
return request({
url: '/ecw/region/update',
method: 'put',
data: data
})
}
// 更新区域设置
export function updateRegionStatus(data) {
return request({
url: '/ecw/region/updateStatus',
method: 'put',
data: data
})
}
// 删除区域设置
export function deleteRegion(id) {
return request({
url: '/ecw/region/delete?id=' + id,
method: 'delete'
})
}
// 获得区域设置
export function getRegion(id) {
return request({
url: '/ecw/region/get?id=' + id,
method: 'get'
})
}
// 获得区域设置分页
export function getRegionPage(query) {
return request({
url: '/ecw/region/page',
method: 'get',
params: query
})
}
// 获得区域设置分页
export function getRegionList(query) {
return request({
url: '/ecw/region/list',
method: 'get',
params: query
})
}
// 导出区域设置 Excel
export function exportRegionExcel(query) {
return request({
url: '/ecw/region/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -18,6 +18,15 @@ export function updateUnit(data) {
})
}
// 更新计量单位
export function updateUnitStatus(data) {
return request({
url: '/ecw/unit/updateStatus',
method: 'put',
data: data
})
}
// 删除计量单位
export function deleteUnit(id) {
return request({
......
......@@ -155,7 +155,15 @@
</template>
<script>
import { createBankAccount, updateBankAccount, deleteBankAccount, getBankAccount, getBankAccountPage, exportBankAccountExcel } from "@/api/ecw/bankAccount";
import {
createBankAccount,
updateBankAccount,
deleteBankAccount,
getBankAccount,
getBankAccountPage,
exportBankAccountExcel,
updateBankAccountStatus
} from "@/api/ecw/bankAccount";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
......@@ -279,7 +287,7 @@ export default {
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '编号为' + row.id + '的数据吗?').then(function() {
return changeUserStatus(row.id, row.status);
return updateBankAccountStatus({id:row.id,status:!row.status?CommonStatusEnum.DISABLE:CommonStatusEnum.ENABLE});
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
......
......@@ -121,10 +121,19 @@
</template>
<script>
import { createCurrency, updateCurrency, deleteCurrency, getCurrency, getCurrencyPage, exportCurrencyExcel } from "@/api/ecw/currency";
import {
createCurrency,
updateCurrency,
deleteCurrency,
getCurrency,
getCurrencyPage,
exportCurrencyExcel,
updateCurrencyStatus
} from "@/api/ecw/currency";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {updateBankAccount} from "@/api/ecw/bankAccount";
export default {
name: "Currency",
......@@ -224,7 +233,9 @@ export default {
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '"' + row.titleZh + '"吗?').then(function() {
return changeUserStatus(row.id, row.status);
// return changeUserStatus(row.id, row.status);
return updateCurrencyStatus({id:row.id,status:!row.status?CommonStatusEnum.DISABLE:CommonStatusEnum.ENABLE});
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
......
This diff is collapsed.
......@@ -108,10 +108,19 @@
</template>
<script>
import { createUnit, updateUnit, deleteUnit, getUnit, getUnitPage, exportUnitExcel } from "@/api/ecw/unit";
import {
createUnit,
updateUnit,
deleteUnit,
getUnit,
getUnitPage,
exportUnitExcel,
updateUnitStatus
} from "@/api/ecw/unit";
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import {CommonStatusEnum} from "@/utils/constants";
import {changeUserStatus} from "@/api/system/user";
import {updateBankAccount} from "@/api/ecw/bankAccount";
export default {
name: "Unit",
......@@ -203,7 +212,9 @@ export default {
handleStatusChange(row) {
let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
this.$modal.confirm('确认要' + text + '"' + row.titleZh + '"吗?').then(function() {
return changeUserStatus(row.id, row.status);
// return changeUserStatus(row.id, row.status);
return updateUnitStatus({id:row.id,status:!row.status?CommonStatusEnum.DISABLE:CommonStatusEnum.ENABLE});
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
......
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