|
@@ -84,7 +84,7 @@ module.exports = app => {
|
|
|
throw '数据错误';
|
|
|
}
|
|
|
delete data.in_time;
|
|
|
- delete data.m_tp;
|
|
|
+ // delete data.m_tp;
|
|
|
// 判断是否可修改
|
|
|
// 判断t_type是否为费用
|
|
|
const transaction = await this.db.beginTransaction();
|
|
@@ -114,7 +114,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
for (const data of datas) {
|
|
|
delete data.in_time;
|
|
|
- delete data.m_tp;
|
|
|
+ // delete data.m_tp;
|
|
|
// console.log(data);
|
|
|
await transaction.update(this.tableName, data);
|
|
|
}
|
|
@@ -212,7 +212,7 @@ module.exports = app => {
|
|
|
// 更改计算总金额并返回值
|
|
|
async calcMaterialMTp(transaction) {
|
|
|
// 金额发生变化,则重新计算本期金额
|
|
|
- const sql = 'SELECT SUM(`m_spread`*`quantity`) as total_price FROM ' + this.tableName + ' WHERE `tid` = ?';
|
|
|
+ const sql = 'SELECT SUM(`m_tp`) as total_price FROM ' + this.tableName + ' WHERE `tid` = ?';
|
|
|
const sqlParam = [this.ctx.tender.id];
|
|
|
const tp = await transaction.queryOne(sql, sqlParam);
|
|
|
console.log(tp);
|