|
@@ -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" v-if="!state.form.id">{{state.form.id}}实时保存,保存时间 {{ 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>
|
|
@@ -65,10 +65,15 @@
|
|
@change="realTimeSaving()"
|
|
@change="realTimeSaving()"
|
|
></u-textarea>
|
|
></u-textarea>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- <view class="content-area-item mt10 p10 bg-white">
|
|
|
|
+ <view class="font14 weight mb10">图片上传</view>
|
|
|
|
+ <oa-upload :uploadCount="5" :uploadList="form.imageList" :uploadListSrc="'url'" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
|
|
|
|
+ </view> -->
|
|
|
|
+
|
|
<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 +83,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
|
|
@@ -124,7 +130,43 @@
|
|
|
|
|
|
<u-modal :show="modalShow" title="" :confirmText="'确定'" :cancelText="'取消'" :zoom="false" :showCancelButton="true" @confirm="modalConfirm" @cancel="modalShow = false">
|
|
<u-modal :show="modalShow" title="" :confirmText="'确定'" :cancelText="'取消'" :zoom="false" :showCancelButton="true" @confirm="modalConfirm" @cancel="modalShow = false">
|
|
<view class="slot-content" style="max-height: 80vh">
|
|
<view class="slot-content" style="max-height: 80vh">
|
|
- <u-checkbox-group v-model="projectsCheck" placement="row" :size="14" v-if="projectsList.length > 0" style="max-height: 100%; overflow: auto">
|
|
|
|
|
|
+
|
|
|
|
+ <view v-if="projectsList.length > 0">
|
|
|
|
+
|
|
|
|
+ <u-checkbox-group v-model="projectsCheck" placement="row" :size="14" style="max-height: 100%; overflow: auto">
|
|
|
|
+ <view class="checkbox-group-title">最近使用</view>
|
|
|
|
+ <block v-for="(item, index) in projectsList">
|
|
|
|
+ <u-checkbox v-if="item.submissions>0"
|
|
|
|
+ :customStyle="{ marginBottom: '8px', width: '50%' }"
|
|
|
|
+ :label="item.projectName+' ('+item.submissions+'次)'"
|
|
|
|
+ :name="item.id"
|
|
|
|
+ :activeColor="proxy.$settingStore.themeColor.color"
|
|
|
|
+ >
|
|
|
|
+ </u-checkbox>
|
|
|
|
+ </block>
|
|
|
|
+ <u-line class="u-line" color="info" style="margin:10px 0"></u-line>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <view class="checkbox-group-title">其他</view>
|
|
|
|
+
|
|
|
|
+ <block v-for="(item, index) in projectsList">
|
|
|
|
+ <u-checkbox v-if="!item.submissions"
|
|
|
|
+ :customStyle="{ marginBottom: '8px', width: '50%' }"
|
|
|
|
+ :label="item.projectName"
|
|
|
|
+ :name="item.id"
|
|
|
|
+ :activeColor="proxy.$settingStore.themeColor.color"
|
|
|
|
+ >
|
|
|
|
+ </u-checkbox>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </block>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </u-checkbox-group>
|
|
|
|
+
|
|
|
|
+ <!-- <u-checkbox-group v-else v-model="projectsCheck" placement="row" :size="14" style="max-height: 100%; overflow: auto">
|
|
<u-checkbox
|
|
<u-checkbox
|
|
:customStyle="{ marginBottom: '8px', width: '50%' }"
|
|
:customStyle="{ marginBottom: '8px', width: '50%' }"
|
|
v-for="(item, index) in projectsList"
|
|
v-for="(item, index) in projectsList"
|
|
@@ -134,7 +176,9 @@
|
|
:activeColor="proxy.$settingStore.themeColor.color"
|
|
:activeColor="proxy.$settingStore.themeColor.color"
|
|
>
|
|
>
|
|
</u-checkbox>
|
|
</u-checkbox>
|
|
- </u-checkbox-group>
|
|
|
|
|
|
+ </u-checkbox-group> -->
|
|
|
|
+ </view>
|
|
|
|
+
|
|
<view v-else>请联系项目管理人员给您分配项目后重试!</view>
|
|
<view v-else>请联系项目管理人员给您分配项目后重试!</view>
|
|
</view>
|
|
</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
@@ -178,7 +222,8 @@ const state = reactive({
|
|
sendDingTalk: 1,
|
|
sendDingTalk: 1,
|
|
isRegularlySend: 0,
|
|
isRegularlySend: 0,
|
|
timingTime: null,
|
|
timingTime: null,
|
|
- reportStatus: null,
|
|
|
|
|
|
+ // reportStatus: null,
|
|
|
|
+ imageList: [],
|
|
},
|
|
},
|
|
projectsCheck: [],
|
|
projectsCheck: [],
|
|
projectsList: [],
|
|
projectsList: [],
|
|
@@ -223,11 +268,16 @@ function switchChage(e, key) {
|
|
function insertUsers() {
|
|
function insertUsers() {
|
|
//将人员选中数据传入store中
|
|
//将人员选中数据传入store中
|
|
systemStore.mallList.activeUserList = state.userList;
|
|
systemStore.mallList.activeUserList = state.userList;
|
|
- proxy.$tab.navigateTo(`/pages/business/common/projectMange/mall/index?number=200`);
|
|
|
|
|
|
+
|
|
|
|
+ proxy.$tab.navigateTo(`/pages/business/common/projectMange/mall/index?number=200&type=3`);
|
|
}
|
|
}
|
|
|
|
|
|
/** 删除人员按钮事件 */
|
|
/** 删除人员按钮事件 */
|
|
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();
|
|
}
|
|
}
|
|
@@ -235,12 +285,19 @@ function deleteUsers(index) {
|
|
/** 添加项目按钮事件 */
|
|
/** 添加项目按钮事件 */
|
|
function insertProjects() {
|
|
function insertProjects() {
|
|
modal.modalShow = true;
|
|
modal.modalShow = true;
|
|
|
|
+ projectApi()
|
|
|
|
+ .ProjectsSelect()
|
|
|
|
+ .then((requset) => {
|
|
|
|
+ state.projectsList = requset.data;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/** 实时保存填写数据 */
|
|
/** 实时保存填写数据 */
|
|
function realTimeSaving() {
|
|
function realTimeSaving() {
|
|
- state.saveTime = proxy.$time.formatterDate(new Date(), "hh:mm");
|
|
|
|
- storageSystem.set("project", state);
|
|
|
|
|
|
+ if(!state.form.id){
|
|
|
|
+ state.saveTime = proxy.$time.formatterDate(new Date(), "hh:mm");
|
|
|
|
+ storageSystem.set("project", state);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/** 弹窗确定 */
|
|
/** 弹窗确定 */
|
|
@@ -267,17 +324,38 @@ function modalConfirm() {
|
|
});
|
|
});
|
|
|
|
|
|
modal.modalShow = false;
|
|
modal.modalShow = false;
|
|
- realTimeSaving();
|
|
|
|
|
|
+ // realTimeSaving();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @图片上传成功回调
|
|
|
|
+ */
|
|
|
|
+ function uploadSuccessChange(e) {
|
|
|
|
+
|
|
|
|
+ state.form.imageList.push({
|
|
|
|
+ name: e.name,
|
|
|
|
+ url: e.url,
|
|
|
|
+ })
|
|
|
|
+ realTimeSaving()
|
|
|
|
+}
|
|
|
|
+/**
|
|
|
|
+ * @图片删除回调
|
|
|
|
+ */
|
|
|
|
+ function uploadDeleteChange(e) {
|
|
|
|
+ state.form.imageList = e;
|
|
|
|
+ realTimeSaving()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/** 提交 */
|
|
/** 提交 */
|
|
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) => {
|
|
@@ -287,7 +365,7 @@ function handleSubmit() {
|
|
state.form.coordinateWork = null;
|
|
state.form.coordinateWork = null;
|
|
state.form.isRegularlySend = 0;
|
|
state.form.isRegularlySend = 0;
|
|
state.form.timingTime = null;
|
|
state.form.timingTime = null;
|
|
- storageSystem.set("project", state);
|
|
|
|
|
|
+ // storageSystem.set("project", state);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -297,6 +375,7 @@ watch(
|
|
state.userList = [];
|
|
state.userList = [];
|
|
state.projectsCheck = [];
|
|
state.projectsCheck = [];
|
|
state.projectsList = [];
|
|
state.projectsList = [];
|
|
|
|
+ state.form.imageList = [];
|
|
|
|
|
|
Object.keys(props.projectList).forEach((key) => {
|
|
Object.keys(props.projectList).forEach((key) => {
|
|
state.form[key] = props.projectList[key];
|
|
state.form[key] = props.projectList[key];
|
|
@@ -305,55 +384,74 @@ 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)) : [];
|
|
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,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ // 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()
|
|
.then((requset) => {
|
|
.then((requset) => {
|
|
state.projectsList = requset.data;
|
|
state.projectsList = requset.data;
|
|
});
|
|
});
|
|
-
|
|
|
|
- storageSystem.set("project", state);
|
|
|
|
|
|
+ if(!state.form.id){
|
|
|
|
+ storageSystem.set("project", state);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
onReady(() => {});
|
|
onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
|
|
+
|
|
|
|
+ init();
|
|
|
|
+
|
|
|
|
+
|
|
//循环将缓存数据遍历
|
|
//循环将缓存数据遍历
|
|
- var storages = storageSystem.get("project");
|
|
|
|
- Object.keys(storages).forEach((key) => {
|
|
|
|
- state[key] = storages[key];
|
|
|
|
- });
|
|
|
|
|
|
|
|
- //监听组件返回数据
|
|
|
|
|
|
+ if(!state.form.id){
|
|
|
|
+ var storages = storageSystem.get("project");
|
|
|
|
+ Object.keys(storages).forEach((key) => {
|
|
|
|
+ state[key] = storages[key];
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 监听组件返回数据
|
|
uni.$on("UserMall", function (value) {
|
|
uni.$on("UserMall", function (value) {
|
|
state.userList = value;
|
|
state.userList = value;
|
|
- realTimeSaving();
|
|
|
|
|
|
+ if(!state.form.id){
|
|
|
|
+ realTimeSaving();
|
|
|
|
+ }
|
|
|
|
+
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
init();
|
|
init();
|
|
|
|
+ if (options.id) {
|
|
|
|
+ state.form.id = options.id;
|
|
|
|
+ } else {
|
|
|
|
+ state.form.id = "";
|
|
|
|
+ }
|
|
});
|
|
});
|
|
|
|
|
|
onUnload(() => {
|
|
onUnload(() => {
|
|
@@ -362,22 +460,31 @@ onUnload(() => {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
-:deep(.u-cell__body) {
|
|
|
|
- color: #000000;
|
|
|
|
- font-size: 12px;
|
|
|
|
- padding: 10px 0px !important;
|
|
|
|
|
|
+.checkbox-group-title{
|
|
|
|
+ display:block;width:100%;
|
|
|
|
+ font-size:16px;
|
|
|
|
+ font-weight:bold;
|
|
|
|
+ note-color: #909399;
|
|
|
|
+ margin-bottom:10px;
|
|
}
|
|
}
|
|
|
|
+:deep() {
|
|
|
|
+ .u-cell__body {
|
|
|
|
+ color: #000000;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ padding: 10px 0px !important;
|
|
|
|
+ }
|
|
|
|
|
|
-:deep(.u-collapse-item__content) {
|
|
|
|
- overflow: auto;
|
|
|
|
-}
|
|
|
|
|
|
+ .u-collapse-item__content {
|
|
|
|
+ overflow: auto;
|
|
|
|
+ }
|
|
|
|
|
|
-:deep(.u-collapse-item__content__text) {
|
|
|
|
- padding: 0;
|
|
|
|
-}
|
|
|
|
|
|
+ .u-collapse-item__content__text {
|
|
|
|
+ padding: 0;
|
|
|
|
+ }
|
|
|
|
|
|
-:deep(.u-cell__left-icon-wrap) {
|
|
|
|
- margin: 0;
|
|
|
|
|
|
+ .u-cell__left-icon-wrap {
|
|
|
|
+ margin: 0;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.content-area {
|
|
.content-area {
|