Переглянути джерело

企业微信调整及调差清单设置调整

laiguoran 2 роки тому
батько
коміт
1dc9030759

+ 1 - 1
app/lib/wechat.js

@@ -433,7 +433,7 @@ class WX {
                         break;
                 }
                 if (title !== '') {
-                    console.log(userids, c, title, desc, content, url, btntxt);
+                    // console.log(userids, c, title, desc, content, url, btntxt);
                     // await qywx.sendTextCard(userids, c, title, msgData, url, btntxt);
                     await qywx.sendTemplateCard(userids, c, title, desc, content, url, btntxt);
                 }

+ 0 - 2
app/lib/wx_work.js

@@ -215,7 +215,6 @@ class wxWork {
                 agentid: corpInfo.agentid,
                 template_card: templateCard,
             });
-            console.log(data);
             return data;
         } catch (e) {
             console.log(e);
@@ -243,7 +242,6 @@ class wxWork {
                 agentid: corpInfo.agentid,
                 textcard: textCard,
             });
-            console.log(data);
             return data;
         } catch (e) {
             console.log(e);

+ 5 - 5
app/public/js/material_checklist.js

@@ -419,7 +419,7 @@ $(document).ready(() => {
         const sheet = ledgerSpread.getActiveSheet();
         const select = SpreadJsObj.getSelectObject(sheet);
         const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price });
-        const gcl = gclGatherData[gclIndex].leafXmjs;
+        const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
         const ms_id = isStageSelf ? materialStageData[0].id : null;
         const index = materialChecklistData.indexOf(select);
         const datas = [];
@@ -481,7 +481,7 @@ $(document).ready(() => {
                 const select = SpreadJsObj.getSelectObject(sheet);
                 const index = materialChecklistData.indexOf(select);
                 const gclIndex = _.findIndex(gclGatherData, { b_code: select.b_code, name: select.name, unit: select.unit, unit_price: select.unit_price });
-                const gcl = gclGatherData[gclIndex].leafXmjs;
+                const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                 const datas = [];
                 const ms_id = isStageSelf ? materialStageData[0].id : null;
                 for (const xmj of gcl) {
@@ -591,7 +591,7 @@ $(document).ready(() => {
                     const ledgerSheet = ledgerSpread.getActiveSheet();
                     const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet);
                     const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price });
-                    const gcl = gclGatherData[gclIndex].leafXmjs;
+                    const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                     const datas = [];
                     const ms_id = isStageSelf ? materialStageData[0].id : null;
                     for (const xmj of gcl) {
@@ -713,7 +713,7 @@ $(document).ready(() => {
                 const ledgerSheet = ledgerSpread.getActiveSheet();
                 const ledgerSelect = SpreadJsObj.getSelectObject(ledgerSheet);
                 const gclIndex = _.findIndex(gclGatherData, { b_code: ledgerSelect.b_code, name: ledgerSelect.name, unit: ledgerSelect.unit, unit_price: ledgerSelect.unit_price });
-                const gcl = gclGatherData[gclIndex].leafXmjs;
+                const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                 const datas = [];
                 const ms_id = isStageSelf ? materialStageData[0].id : null;
                 for (const xmj of gcl) {
@@ -1311,7 +1311,7 @@ $(document).ready(() => {
                 }
 
                 const gclIndex = _.findIndex(gclGatherData, { b_code: t.b_code, name: t.name, unit: t.unit, unit_price: t.unit_price ? parseFloat(t.unit_price) : null });
-                const gcl = gclGatherData[gclIndex].leafXmjs;
+                const gcl = gclGatherData[gclIndex].leafXmjs.filter(item => item.gather_qty !== null && item.gather_qty !== undefined);
                 const ms_id = isStageSelf ? materialStageData[0].id : null;
                 // const index = materialChecklistData.indexOf(select);
                 const datas = [];

+ 2 - 2
config/config.default.js

@@ -211,8 +211,8 @@ module.exports = appInfo => {
 
     // 企业微信代开发模板信息
     config.qywx = {
-        suiteID: 'dk10a5f6b6a68d6ed4',
-        suiteSecret: 'TWmb3K-74VGv-X-ugox3T3yGPc_aa0ci4uNkIlmMaRA',
+        suiteID: 'dk1f00b68c19d825ba',
+        suiteSecret: 'xYP1oRNDa5BcdNXxJXgZjvWpwuECWki5RLdA-xhdeRo',
         token: 'NRPyXeKObE3Nesc',
         encodingAESKey: 'a6zuXvcHQlgdyY8465AbVpMpSKF0HMf0aMMxRthuOiq',
     };

+ 1 - 1
sql/update.sql

@@ -11,5 +11,5 @@ CREATE TABLE `zh_wx_work` (
   `auth_user_info` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '授权人信息json',
   `in_time` datetime NOT NULL,
   PRIMARY KEY (`id`),
-  NIQUE KEY `corpid` (`corpid`)
+  UNIQUE KEY `corpid` (`corpid`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='企业微信信息表';