From 6a70e2f5c45e376d14177e1fdb605a346701faa7 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期四, 28 三月 2024 14:32:26 +0800
Subject: [PATCH] #周计划
---
src/main/resources/mapper/WeeklyDailyPlanMapper.xml | 2
src/main/webapp/views/weekly/weekly.html | 26 ++++++++
src/main/java/com/zy/crm/manager/entity/WeeklyDailyPlan.java | 14 ++++
src/main/webapp/static/js/weekly/weekly.js | 96 ++++++++++++++++++++++++++-----
src/main/java/com/zy/crm/manager/controller/WeeklyController.java | 4
src/main/java/com/zy/crm/manager/entity/WeeklyDailyReality.java | 14 ++++
src/main/resources/mapper/WeeklyDailyRealityMapper.xml | 2
7 files changed, 138 insertions(+), 20 deletions(-)
diff --git a/src/main/java/com/zy/crm/manager/controller/WeeklyController.java b/src/main/java/com/zy/crm/manager/controller/WeeklyController.java
index 087bba8..2e66b58 100644
--- a/src/main/java/com/zy/crm/manager/controller/WeeklyController.java
+++ b/src/main/java/com/zy/crm/manager/controller/WeeklyController.java
@@ -187,8 +187,8 @@
weekly.setStatus(0);
break;
default:
- log.error("鍙傛暟寮傚父锛歐eekly="+param.getType());
- throw new CoolException("鍙傛暟寮傚父锛歐eekly="+param.getType());
+ log.error("璇烽�夋嫨鏃ユ湡锛氬弬鏁板紓甯革細Weekly="+param.getWeeklyType());
+ throw new CoolException("璇烽�夋嫨鏃ユ湡");
}
Integer weeklyRepeatCount = weeklyService.selectUserStartAndEnd(dateList, getUserId());
diff --git a/src/main/java/com/zy/crm/manager/entity/WeeklyDailyPlan.java b/src/main/java/com/zy/crm/manager/entity/WeeklyDailyPlan.java
index 8178326..f346569 100644
--- a/src/main/java/com/zy/crm/manager/entity/WeeklyDailyPlan.java
+++ b/src/main/java/com/zy/crm/manager/entity/WeeklyDailyPlan.java
@@ -101,6 +101,20 @@
private String comment;
/**
+ * 宸ヤ綔鍐呭
+ */
+ @ApiModelProperty(value= "宸ヤ綔鍐呭")
+ @TableField("work_content")
+ private String workContent;
+
+ /**
+ * 宸ヤ綔鐩殑
+ */
+ @ApiModelProperty(value= "宸ヤ綔鐩殑")
+ @TableField("work_purpose")
+ private String workPurpose;
+
+ /**
* 娣诲姞浜哄憳
*/
@ApiModelProperty(value= "娣诲姞浜哄憳")
diff --git a/src/main/java/com/zy/crm/manager/entity/WeeklyDailyReality.java b/src/main/java/com/zy/crm/manager/entity/WeeklyDailyReality.java
index 74e3a48..bfb4674 100644
--- a/src/main/java/com/zy/crm/manager/entity/WeeklyDailyReality.java
+++ b/src/main/java/com/zy/crm/manager/entity/WeeklyDailyReality.java
@@ -99,6 +99,20 @@
private String comment;
/**
+ * 宸ヤ綔鍐呭
+ */
+ @ApiModelProperty(value= "宸ヤ綔鍐呭")
+ @TableField("work_content")
+ private String workContent;
+
+ /**
+ * 宸ヤ綔鐩殑
+ */
+ @ApiModelProperty(value= "宸ヤ綔鐩殑")
+ @TableField("work_purpose")
+ private String workPurpose;
+
+ /**
* 娣诲姞浜哄憳
*/
@ApiModelProperty(value= "娣诲姞浜哄憳")
diff --git a/src/main/resources/mapper/WeeklyDailyPlanMapper.xml b/src/main/resources/mapper/WeeklyDailyPlanMapper.xml
index ee68f97..4d36a8a 100644
--- a/src/main/resources/mapper/WeeklyDailyPlanMapper.xml
+++ b/src/main/resources/mapper/WeeklyDailyPlanMapper.xml
@@ -13,6 +13,8 @@
<result column="settle" property="settle" />
<result column="settle_msg" property="settleMsg" />
<result column="comment" property="comment" />
+ <result column="work_content" property="workContent" />
+ <result column="work_purpose" property="workPurpose" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
diff --git a/src/main/resources/mapper/WeeklyDailyRealityMapper.xml b/src/main/resources/mapper/WeeklyDailyRealityMapper.xml
index 3a288ea..21f6951 100644
--- a/src/main/resources/mapper/WeeklyDailyRealityMapper.xml
+++ b/src/main/resources/mapper/WeeklyDailyRealityMapper.xml
@@ -13,6 +13,8 @@
<result column="settle" property="settle" />
<result column="settle_msg" property="settleMsg" />
<result column="comment" property="comment" />
+ <result column="work_content" property="workContent" />
+ <result column="work_purpose" property="workPurpose" />
<result column="create_by" property="createBy" />
<result column="create_time" property="createTime" />
<result column="update_by" property="updateBy" />
diff --git a/src/main/webapp/static/js/weekly/weekly.js b/src/main/webapp/static/js/weekly/weekly.js
index 655fbc8..1dd5c67 100644
--- a/src/main/webapp/static/js/weekly/weekly.js
+++ b/src/main/webapp/static/js/weekly/weekly.js
@@ -1,6 +1,8 @@
var pageCurr;
var admin;
var treeCond;
+var htmlCstme;
+var htmlCstmrData;
layui.config({
base: baseUrl + "/static/layui/lay/modules/"
}).extend({
@@ -71,6 +73,35 @@
}
})
}
+
+ // // 娓叉煋鎼滅储妯℃澘
+ // $.ajax({
+ // url: baseUrl+"/cstmr/all/get/kv",
+ // headers: {'token': localStorage.getItem('token')},
+ // data: {
+ // limit: 9999
+ // },
+ // method: 'POST',
+ // // async: false, // 璁剧疆涓哄悓姝ユ墽琛�
+ // success: function (res) {
+ // htmlCstme = "<select id=\"select_cstmr\" name=\"select_cstmr\" lay-vertype=\"tips\" lay-verify=\"required\" required=\"\">"
+ // htmlCstme = htmlCstme +
+ // " <option style=\"display: none\"></option>\n"
+ // if (res.code === 200){
+ // for (var val in res.data) {
+ // var cstmrVal = res.data[val]
+ // console.log(cstmrVal)
+ // htmlCstme = htmlCstme +
+ // " <option value = \""+cstmrVal.value+"\"+\n" +
+ // " > "+cstmrVal.name+" </option>\n"
+ // }
+ // } else {
+ // htmlCstme = htmlCstme +
+ // "<option value=\"0\">寮傚父</option>"
+ // }
+ // htmlCstme = htmlCstme + "\n" + " </select>";
+ // }
+ // })
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -393,9 +424,9 @@
success: function (layero, dIndex) {
$(layero).children('.layui-layer-content').css('overflow', 'visible');
var isExpAdd = !expTpe;
- // if (expTpe){
- // document.getElementById('weeklyDisplay').style.display = 'none';
- // }
+ if (expTpe){
+ document.getElementById('weeklyDisplay').style.display = 'none';
+ }
// 鍥炴樉鏁版嵁
form.val('editForm', expTpe);
console.log(expTpe)
@@ -456,18 +487,29 @@
cols: [[
{type: 'numbers', title: '#'}
,{field: 'weeklyDay$', align: 'center',title: '鏄熸湡'}
- ,{field: 'comment', title: '璇勮', width: 100, style: 'color: blue;font-weight: bold', edit:true}
- ,{field: 'weeklyMatter', title: '闇�鍗忓姪浜嬮」', width: 100, style: 'color: blue;font-weight: bold', edit:true}
- ,{field: 'dailyTime$', align: 'center',title: '鏃ユ姤鏃ユ湡'}
- ,{field: 'settleMsg', align: 'center',title: '瀹℃牳杩涘害'}
- ,{field: 'director', align: 'center',title: '璐熻矗浜�'}
- ,{field: 'settleSize', align: 'center',title: '娴佺▼闀垮害'}
- ,{field: 'settleCurrent', align: 'center',title: '褰撳墠杩涘害'}
- ,{field: 'cstmrId', align: 'center',title: '鐢叉柟鍗曚綅ID'}
+ ,{field: 'workContent', title: '宸ヤ綔鍐呭', style: 'color: blue;font-weight: bold', edit:true}
+ ,{field: 'workPurpose', title: '宸ヤ綔鐩殑', style: 'color: blue;font-weight: bold', edit:true}
+ ,{field: 'comment', title: '璇勮', style: 'color: blue;font-weight: bold', edit:true}
+ ,{field: 'weeklyMatter', title: '闇�鍗忓姪浜嬮」', style: 'color: blue;font-weight: bold', edit:true}
+ // ,{field: 'dailyTime$', align: 'center',title: '鏃ユ姤鏃ユ湡'}
+ // ,{field: 'settleMsg', align: 'center',title: '瀹℃牳杩涘害'}
+ // ,{field: 'director', align: 'center',title: '璐熻矗浜�'}
+ // ,{field: 'settleSize', align: 'center',title: '娴佺▼闀垮害'}
+ // ,{field: 'settleCurrent', align: 'center',title: '褰撳墠杩涘害'}
+ ,{field: 'cstmrId', align: 'center',title: '鐢叉柟鍗曚綅ID', style: 'color: blue;font-weight: bold', templet: '#cstmrId'}//, templet: function () { return htmlCstme;}
,{field: 'memo', align: 'center',title: '澶囨敞', width: 100, style: 'color: blue;font-weight: bold', edit:true}
,{align: 'center', title: '鎿嶄綔', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'}
]],
+ parseData: function (res) {
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records
+ }
+ },
done: function (res, curr, count) {
+ $(".layui-table-cell").css('overflow', 'visible');//瑙e喅layui鏁版嵁琛ㄦ牸涓祵濂椾笅鎷夋鏄剧ず闂
$(layero).find('.layui-table-view').css('margin', '0');
var options = this;
@@ -477,18 +519,40 @@
return table.cache[options.id][index] || {};
};
- $('.input-occupation').on('text', function(){
+ $('.select-cstmr').on('change', function(){
+ console.log("cstmrId")
var value = this.value; // 鑾峰彇閫変腑椤� value
var data = table.getRowData(this);
- console.log(value);
- console.log("value------===");
xxDataList.forEach(res => {
- if (data.id === res.id){
+ if (data.LAY_TABLE_INDEX === res.LAY_TABLE_INDEX){
console.log(res)
- res.occupation = value;
+ // console.log(data)
+ res.cstmrId = value;
}
})
+ });
+ $(document).ready(function () {
+ $.ajax({
+ url: baseUrl + "/cstmr/all/get/kv",
+ headers: { 'token': localStorage.getItem('token') },
+ data: {
+ limit: 9999
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ console.log("res111111111111")
+ console.log(res)
+ var template = $('#cstmrId').html(); // 鑾峰彇妯℃澘鍐呭
+ var compiledTemplate = Handlebars.compile(template); // 缂栬瘧妯℃澘
+ var html = compiledTemplate(res.data); // 灏嗘暟鎹簲鐢ㄥ埌妯℃澘涓�
+ $('.select-cstmr').html(html); // 娓叉煋妯℃澘鍒伴〉闈�
+ } else {
+ // 澶勭悊寮傚父鎯呭喌
+ }
+ }
+ });
});
},
size: ''
diff --git a/src/main/webapp/views/weekly/weekly.html b/src/main/webapp/views/weekly/weekly.html
index 800b12e..bc8fd28 100644
--- a/src/main/webapp/views/weekly/weekly.html
+++ b/src/main/webapp/views/weekly/weekly.html
@@ -123,10 +123,10 @@
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
- <div class="layui-form-item">
+ <div class="layui-form-item" style="display: block" id="weeklyDisplay">
<label class="layui-form-label layui-form-required">鏃ユ湡: </label>
<div class="layui-input-inline">
- <select class="layui-input" name="weeklyType" lay-vertype="tips" lay-verify="required">
+ <select class="layui-input" name="weeklyType" lay-vertype="tips">
<option style="display: none"></option>
<option value="1">涓婂懆</option>
<option value="2">鏈懆</option>
@@ -186,6 +186,28 @@
</form>
</script>
+<!--<script type="text/template" id="cstmrTpl">-->
+<!-- <option value="">閫夋嫨绫诲瀷</option>-->
+<!-- {{#each records}}-->
+<!-- <option value="{{docId}}">{{docName}}</option>-->
+<!-- {{/each}}-->
+<!-- <option value="">閫夋嫨鐢叉柟鍗曚綅</option>-->
+<!-- {{#each records}}-->
+<!-- <option value="{{value}}">{{name}}</option>-->
+<!-- {{/each}}-->
+<!--</script>-->
+
+<script type="text/template" id="cstmrId">
+ <select id="select-cstmr" style="width: 100%" class="layui-border select-cstmr" lay-ignore >
+ <option value="1">浠撳偍</option>
+ <option value="0">浠i噰</option>
+ </select>
+</script>
+
+<script>
+
+</script>
+
<!--<!– 琛ㄥ崟寮圭獥 –>-->
<!--<script type="text/html" id="editDialog">-->
<!-- <form id="detail" lay-filter="detail" class="layui-form admin-form model-form">-->
--
Gitblit v1.9.1