|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view class="content-area">
|
|
<view class="content-area">
|
|
- <view class="content-area-title font12 mtb5 plr10">实时保存,保存时间 {{ saveTime }}</view>
|
|
|
|
|
|
+ <!-- <view class="content-area-title font12 mtb5 plr10">实时保存,保存时间 {{ saveTime }}</view> -->
|
|
|
|
|
|
<view class="content-area-item p10 bg-white">
|
|
<view class="content-area-item p10 bg-white">
|
|
<view class="font14 weight mb10 required">工作内容</view>
|
|
<view class="font14 weight mb10 required">工作内容</view>
|
|
@@ -68,7 +68,7 @@
|
|
<view class="content-area-item mt10 p10 bg-white">
|
|
<view class="content-area-item mt10 p10 bg-white">
|
|
<view class="font14 weight mb10">抄送到人</view>
|
|
<view class="font14 weight mb10">抄送到人</view>
|
|
<avatarList :userList="userList" @deleteUsers="deleteUsers" />
|
|
<avatarList :userList="userList" @deleteUsers="deleteUsers" />
|
|
- <u-button class="mt20" type="primary" style="width: 100px; height: 25px" @click="insertUsers()" shape="circle" icon="plus" size="mini"> 选择人员 </u-button>
|
|
|
|
|
|
+ <u-button class="mt20" type="primary" style="width: 100px; height: 25px" @click="insertUsers()" shape="circle" icon="plus" size="mini" :disabled="form.reportStatus==1"> 选择人员 </u-button>
|
|
</view>
|
|
</view>
|
|
<view class="content-area-item mt10 p10 bg-white">
|
|
<view class="content-area-item mt10 p10 bg-white">
|
|
<view class="flex">
|
|
<view class="flex">
|
|
@@ -78,13 +78,14 @@
|
|
:modelValue="form.sendDingTalk == 0 ? false : true"
|
|
:modelValue="form.sendDingTalk == 0 ? false : true"
|
|
:ctiveColor="proxy.$settingStore.themeColor.color"
|
|
:ctiveColor="proxy.$settingStore.themeColor.color"
|
|
size="20"
|
|
size="20"
|
|
|
|
+ :disabled="form.reportStatus==1"
|
|
@change="(event) => switchChage(event, 'sendDingTalk')"
|
|
@change="(event) => switchChage(event, 'sendDingTalk')"
|
|
asyncChange
|
|
asyncChange
|
|
></u-switch>
|
|
></u-switch>
|
|
</view>
|
|
</view>
|
|
<view class="flex"> </view>
|
|
<view class="flex"> </view>
|
|
</view>
|
|
</view>
|
|
- <view class="content-area-item mt10 p10 bg-white">
|
|
|
|
|
|
+ <view class="content-area-item mt10 p10 bg-white" v-if="form.reportStatus != 1">
|
|
<view class="flex">
|
|
<view class="flex">
|
|
<view class="font14 weight">定时发送</view>
|
|
<view class="font14 weight">定时发送</view>
|
|
<u-switch
|
|
<u-switch
|
|
@@ -178,7 +179,7 @@ const state = reactive({
|
|
sendDingTalk: 1,
|
|
sendDingTalk: 1,
|
|
isRegularlySend: 0,
|
|
isRegularlySend: 0,
|
|
timingTime: null,
|
|
timingTime: null,
|
|
- reportStatus: null,
|
|
|
|
|
|
+ // reportStatus: null,
|
|
},
|
|
},
|
|
projectsCheck: [],
|
|
projectsCheck: [],
|
|
projectsList: [],
|
|
projectsList: [],
|
|
@@ -228,6 +229,10 @@ function insertUsers() {
|
|
|
|
|
|
/** 删除人员按钮事件 */
|
|
/** 删除人员按钮事件 */
|
|
function deleteUsers(index) {
|
|
function deleteUsers(index) {
|
|
|
|
+ if(state.form.reportStatus==1){
|
|
|
|
+ console.log('已发送不可修改抄送人')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
state.userList.splice(index, 1);
|
|
state.userList.splice(index, 1);
|
|
realTimeSaving();
|
|
realTimeSaving();
|
|
}
|
|
}
|
|
@@ -272,12 +277,13 @@ function modalConfirm() {
|
|
|
|
|
|
/** 提交 */
|
|
/** 提交 */
|
|
function handleSubmit() {
|
|
function handleSubmit() {
|
|
|
|
+ state.form.sendDingTalk==true?1:0;
|
|
|
|
+ state.form.id=state.form.id?Number(state.form.id):'';
|
|
state.form.ccTo = state.userList.map((obj) => `${obj.id}`).join(",");
|
|
state.form.ccTo = state.userList.map((obj) => `${obj.id}`).join(",");
|
|
state.form.reportDate = proxy.$time.formatterDate(new Date(), "yyyy-MM-dd");
|
|
state.form.reportDate = proxy.$time.formatterDate(new Date(), "yyyy-MM-dd");
|
|
state.form.workContents.forEach((e) => {
|
|
state.form.workContents.forEach((e) => {
|
|
e.workTime = Number(e.workTime);
|
|
e.workTime = Number(e.workTime);
|
|
});
|
|
});
|
|
-
|
|
|
|
projectApi()
|
|
projectApi()
|
|
.ReportInsert(state.form)
|
|
.ReportInsert(state.form)
|
|
.then((requset) => {
|
|
.then((requset) => {
|
|
@@ -305,26 +311,28 @@ watch(
|
|
state.form.workContents.forEach((e) => {
|
|
state.form.workContents.forEach((e) => {
|
|
state.projectsCheck.push(e.projectId);
|
|
state.projectsCheck.push(e.projectId);
|
|
});
|
|
});
|
|
-
|
|
|
|
- var ccTo = state.form.ccTo.length > 0 ? state.form.ccTo.split(",").map((num) => Number(num)) : [];
|
|
|
|
- state.userDate.forEach((e) => {
|
|
|
|
- if (ccTo.includes(e.userId)) {
|
|
|
|
- state.userList.push({
|
|
|
|
- address: e.address,
|
|
|
|
- avatar: e.avatar,
|
|
|
|
- deptId: e.deptId,
|
|
|
|
- email: e.email,
|
|
|
|
- id: e.userId,
|
|
|
|
- label: e.nickName,
|
|
|
|
- nickName: e.nickName,
|
|
|
|
- phonenumber: e.phonenumber,
|
|
|
|
- post: e.post,
|
|
|
|
- sex: e.sex,
|
|
|
|
- userId: e.userId,
|
|
|
|
- userName: e.userName,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ var ccTo = state.form.ccTo.length > 0 ? state.form.ccTo.split(",").map((num) => Number(num)) : [];
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ state.userDate.forEach((e) => {
|
|
|
|
+ if (ccTo.includes(e.userId)) {
|
|
|
|
+ state.userList.push({
|
|
|
|
+ address: e.address,
|
|
|
|
+ avatar: e.avatar,
|
|
|
|
+ deptId: e.deptId,
|
|
|
|
+ email: e.email,
|
|
|
|
+ id: e.userId,
|
|
|
|
+ label: e.nickName,
|
|
|
|
+ nickName: e.nickName,
|
|
|
|
+ phonenumber: e.phonenumber,
|
|
|
|
+ post: e.post,
|
|
|
|
+ sex: e.sex,
|
|
|
|
+ userId: e.userId,
|
|
|
|
+ userName: e.userName,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },300)
|
|
|
|
+
|
|
|
|
|
|
projectApi()
|
|
projectApi()
|
|
.ProjectsSelect()
|
|
.ProjectsSelect()
|
|
@@ -340,20 +348,30 @@ onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
//循环将缓存数据遍历
|
|
//循环将缓存数据遍历
|
|
- var storages = storageSystem.get("project");
|
|
|
|
- Object.keys(storages).forEach((key) => {
|
|
|
|
- state[key] = storages[key];
|
|
|
|
- });
|
|
|
|
|
|
+ // var storages = storageSystem.get("project");
|
|
|
|
+ // Object.keys(storages).forEach((key) => {
|
|
|
|
+ // state[key] = storages[key];
|
|
|
|
+ // });
|
|
|
|
|
|
//监听组件返回数据
|
|
//监听组件返回数据
|
|
- uni.$on("UserMall", function (value) {
|
|
|
|
- state.userList = value;
|
|
|
|
- realTimeSaving();
|
|
|
|
- });
|
|
|
|
|
|
+ // uni.$on("UserMall", function (value) {
|
|
|
|
+ // state.userList = value;
|
|
|
|
+ // realTimeSaving();
|
|
|
|
+ // });
|
|
});
|
|
});
|
|
|
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
init();
|
|
init();
|
|
|
|
+ if(options.id){
|
|
|
|
+ state.form.id=options.id
|
|
|
|
+ }else{
|
|
|
|
+ state.form.id=''
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
});
|
|
});
|
|
|
|
|
|
onUnload(() => {
|
|
onUnload(() => {
|