Browse Source

调差名称提示修改及后台生成中限制,收方单数据修改

laiguoran 3 years ago
parent
commit
d1627c9943

+ 5 - 0
app/controller/material_controller.js

@@ -125,6 +125,11 @@ module.exports = app => {
                 if (data.s_order === '') {
                     throw '没有选中计量期';
                 }
+                // 调差期是否存在审批或待上报,存在则无法重复添加
+                const doingMaterial = await ctx.service.material.getDataByCondition({ tid: ctx.tender.id, status: [auditConst.status.uncheck, auditConst.status.checking, auditConst.status.checkNo] });
+                if (doingMaterial) {
+                    throw '存在待上报或审批中的调差期,请勿重复生成';
+                }
                 const newMaterial = await ctx.service.material.addMaterial(ctx.tender.id, data);
                 if (!newMaterial) {
                     throw '新增材料调差期失败,请重试';

+ 1 - 1
app/public/js/measure_material.js

@@ -244,7 +244,7 @@ $(function () {
             $(this).removeAttr('disabled');
             return false;
         }
-        $(this).text('添加中,请稍后...');
+        $(this).text('正在生成新一期数据中,请勿刷新本页!...');
         $(this).parents('form').submit();
     })
 });

+ 2 - 2
app/public/js/stage.js

@@ -4449,9 +4449,9 @@ function makeReportData(sfid) {
     const ledger_code = sfInfo.name.split(' / ')[0];
     const pos_name = sfInfo.name.split(' / ')[1] ? sfInfo.name.split(' / ')[1] : '';
     const replace_key_params = {
-        'KEY_标段名称': tender.name,
+        'KEY_标段名称': tenderInfo.deal_info.buildName,
         'KEY_总承包单位': tenderInfo.construction_unit.contract1.company,
-        'KEY_合同段': tenderInfo.deal_info.dealCode,
+        'KEY_合同段': tenderInfo.deal_info.dealName,
         'KEY_监理单位': tenderInfo.construction_unit.supervision1.company,
         'KEY_编号': '',
         'KEY_设计工程数量': 0,