|
|
@@ -2053,6 +2053,39 @@ $(document).ready(() => {
|
|
|
return readOnly || stage.revising || stage.status !== auditConst.status.uncheck;
|
|
|
},
|
|
|
},
|
|
|
+ exportTestData: {
|
|
|
+ name: '导出测试数据',
|
|
|
+ callback: function (key, opt, menu, e) {
|
|
|
+ const data = stageTree.nodes.map(x => {
|
|
|
+ const parent = stageTree.getParent(x);
|
|
|
+ return {
|
|
|
+ id: x.id, parentId: parent ? parent.id : '-1', seq: x.order,
|
|
|
+ code: x.code || '', b_code: x.b_code || '', name: x.name || '', unit: x.unit || '', unit_price: x.unit_price || 0,
|
|
|
+ quantity: x.quantity || 0, total_price: x.total_price || 0,
|
|
|
+ is_tp: x.is_tp || 0,
|
|
|
+ contract_qty: x.contract_qty || 0, contract_tp: x.contract_tp || 0,
|
|
|
+ qc_qty: x.qc_qty || 0, qc_tp: x.qc_tp || 0,
|
|
|
+ gather_qty: x.gather_qty || 0, gather_tp: x.gather_tp || 0,
|
|
|
+ pre_contract_qty: x.pre_contract_qty || 0, pre_contract_tp: x.pre_contract_tp || 0,
|
|
|
+ pre_qc_qty: x.pre_qc_qty || 0, pre_qc_tp: x.pre_qc_tp || 0,
|
|
|
+ pre_gather_qty: x.pre_gather_qty || 0, pre_gather_tp: x.pre_gather_tp || 0,
|
|
|
+ end_contract_qty: x.end_contract_qty || 0, end_contract_tp: x.end_contract_tp || 0,
|
|
|
+ end_qc_qty: x.end_qc_qty || 0, end_qc_tp: x.end_qc_tp || 0,
|
|
|
+ end_gather_qty: x.end_gather_qty || 0, end_gather_tp: x.end_gather_tp || 0,
|
|
|
+
|
|
|
+ memo: x.memo || '',
|
|
|
+ gxby_status: x.gxby_status || 0, gxby_url: x.gxby_status || '',
|
|
|
+ dagl_status: x.gxby_status || 0, dagl_url: x.dagl_url || '',
|
|
|
+ wbs_url: x.wbs_url || '',
|
|
|
+ };
|
|
|
+ });
|
|
|
+ const blob = new Blob([JSON.stringify(data, '', '\t')], { type: 'application/text'});
|
|
|
+ saveAs(blob, 'test.json');
|
|
|
+ },
|
|
|
+ visible: function() {
|
|
|
+ return is_debug || false;
|
|
|
+ }
|
|
|
+ },
|
|
|
sumLoadSpr: '---',
|
|
|
importStageGcl: {
|
|
|
name: '导入(其他标段)工程量清单计量数据',
|