浏览代码

关联台账相关

MaiXinRong 3 年之前
父节点
当前提交
e83da379ca
共有 4 个文件被更改,包括 25 次插入3 次删除
  1. 1 1
      app/public/js/shares/cs_tools.js
  2. 1 0
      app/public/js/sr_detail.js
  3. 2 2
      app/service/stage_rela.js
  4. 21 0
      app/view/stage_rela/detail_modal.ejs

+ 1 - 1
app/public/js/shares/cs_tools.js

@@ -686,7 +686,7 @@ const showSelectTab = function(select, spread, afterShow) {
             tagHtml.push('<div class="pull-right edit-tag-btn">');
             const lid = tag.node ? tag.node.ledger_id : -1;
             tagHtml.push(`<a class="mr-1" name="bills-tag-locate" href="javascript: void(0);" lid="${lid}"><i class="fa fa-crosshairs"></i> 定位</a>`);
-            if (tag.uid === userID) tagHtml.push(`<a href="javascript: void(0);" name="bills-tag-edit" tag-id="${tag.id}"><i class="fa fa-edit"></i> 编辑</a>`);
+            if (tag.uid === userID && !setting.readOnly) tagHtml.push(`<a href="javascript: void(0);" name="bills-tag-edit" tag-id="${tag.id}"><i class="fa fa-edit"></i> 编辑</a>`);
             tagHtml.push('</div>');
             tagHtml.push('<div class="card-body p-2">', '<p class="card-text">', tag.comment, '</p>', '</div>');
             tagHtml.push('</div>');

+ 1 - 0
app/public/js/sr_detail.js

@@ -328,6 +328,7 @@ $(document).ready(() => {
         selector: '#bills-tag',
         relaSpread: slSpread,
         updateUrl: window.location.pathname + '/tag',
+        readOnly: true,
         afterModify: function (nodes) {
             SpreadJsObj.repaintNodesRowHeader(slSpread.getActiveSheet(), nodes);
         },

+ 2 - 2
app/service/stage_rela.js

@@ -170,7 +170,7 @@ class srCache {
                 this.stagePos.push({
                     tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
                     rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,
-                    pid: t.pid, lid: t.id,
+                    pid: t.id, lid: t.id,
                     contract_qty: t.contract_qty, contract_expr: t.contract_expr, qc_qty: t.qc_qty, postil: t.postil,
                 });
             }
@@ -178,7 +178,7 @@ class srCache {
                 this.stagePosFinal.push({
                     tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
                     rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,
-                    pid: t.pid, lid: t.lid,
+                    pid: t.id, lid: t.lid,
                     contract_qty: t.end_contract_qty, qc_qty: t.end_qc_qty
                 })
             }

+ 21 - 0
app/view/stage_rela/detail_modal.ejs

@@ -0,0 +1,21 @@
+<!--草图预览-->
+<div class="modal fade" id="imgview" data-backdrop="static">
+    <div class="modal-dialog modal-lgx" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">查看草图</h5>
+            </div>
+            <div class="modal-body">
+                <img src="" id="view-calc-img">
+                <div class="mt-2">
+                    <textarea id="view-calc-remark" class="form-control form-control-sm" placeholder="草图备注" rows="3">
+                    </textarea>
+                </div>
+            </div>
+
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
+            </div>
+        </div>
+    </div>
+</div>