|
@@ -73,6 +73,10 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ _checkCanUpdate(ctx) {
|
|
|
+ if (ctx.tender.isTourist) throw '您无权修改数据';
|
|
|
+ }
|
|
|
+
|
|
|
async _billsBase(relaService, type, data) {
|
|
|
if (isNaN(data.id) || data.id <= 0) throw '数据错误';
|
|
|
if (type !== 'add') {
|
|
@@ -131,6 +135,7 @@ module.exports = app => {
|
|
|
async update(ctx) {
|
|
|
try {
|
|
|
if (!ctx.tender) throw '项目数据错误';
|
|
|
+ this._checkCanUpdate(ctx);
|
|
|
|
|
|
const relaService = this.ctx.service.controlPrice;
|
|
|
const data = JSON.parse(ctx.request.body.data);
|
|
@@ -169,6 +174,7 @@ module.exports = app => {
|
|
|
async uploadExcel(ctx) {
|
|
|
try {
|
|
|
if (!ctx.tender) throw '项目数据错误';
|
|
|
+ this._checkCanUpdate(ctx);
|
|
|
|
|
|
const ueType = ctx.params.ueType;
|
|
|
const compressData = ctx.request.body.data;
|