bottomBtn.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div class="bottomBtn">
  3. <div style="color: #999; font-size: 12px; margin: 0 10px">
  4. <!-- 昨日新增的数据统一在上午9点更新.-->
  5. <span v-if="reportInfoData.newUser">
  6. <van-icon name="info-o" />
  7. &nbsp;新人入职后5个工作日不用提交日报.
  8. </span>
  9. </div>
  10. <div class="lineGrey"></div>
  11. <div v-if="approvalButton" class="contentborder">
  12. <van-cell class="homeTitle" title="汇报审批" to="/dailyApprovalList">
  13. <template #title>
  14. <span class="custom-title">汇报审批&nbsp;&nbsp;</span>
  15. <van-tag v-if="approvalPendingNum > 0" type="danger">{{ approvalPendingNum }}</van-tag>
  16. </template>
  17. <template #right-icon>
  18. <van-icon class="homeCellIcon" name="arrow" size="16" />
  19. </template>
  20. </van-cell>
  21. <div class="lineGrey"></div>
  22. </div>
  23. <!-- <div class="contentborder" v-if="todayGoal.storeAddressCheckNum>0">
  24. <van-cell class="homeTitle" title="待规范门店地址" to="/storeAddress">
  25. <template #title><span class="custom-title">待规范门店地址</span>&nbsp<van-tag type="danger">{{ todayGoal.storeAddressCheckNum }}</van-tag></template>
  26. <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16"/></template>
  27. </van-cell>
  28. <div class="lineGrey"></div>
  29. </div> -->
  30. <div class="contentborder">
  31. <van-cell class="homeTitle" title="流程审批" to="/signApprovalList">
  32. <template #title>
  33. <span class="custom-title">流程审批</span>&nbsp
  34. <van-tag v-if="proccessPendingNum > 0" type="danger">{{ proccessPendingNum }}</van-tag>
  35. </template>
  36. <template #right-icon><van-icon class="homeCellIcon" name="arrow" size="16" /></template>
  37. </van-cell>
  38. <div class="lineGrey"></div>
  39. </div>
  40. <!-- 同城店建店审批 -->
  41. <div
  42. class="contentborder"
  43. v-if="reportInfoData.storeApprovalNum != null && reportInfoData.storeApprovalNum > 0">
  44. <van-cell class="homeTitle" title="同城店建店审批" to="/newStoreApprovalList">
  45. <template #title>
  46. <span class="custom-title">同城店建店审批&nbsp;&nbsp;</span>
  47. <van-tag type="danger">{{ reportInfoData.storeApprovalNum }}</van-tag>
  48. </template>
  49. <template #right-icon>
  50. <van-icon class="homeCellIcon" name="arrow" size="16" />
  51. </template>
  52. </van-cell>
  53. <div class="lineGrey"></div>
  54. </div>
  55. <div class="contentborder">
  56. <van-button
  57. v-if="reportType == 3 && showButton"
  58. class="Btn1"
  59. plain
  60. size="small"
  61. type="info"
  62. @click="doubleWeeklyLink"
  63. >填写半月报</van-button
  64. >
  65. <van-button
  66. v-if="reportType == 2 && showButton"
  67. class="Btn1"
  68. plain
  69. size="small"
  70. type="info"
  71. @click="weeklyLink"
  72. >填写周报</van-button
  73. >
  74. <van-button
  75. v-if="reportType == 1 && showButton"
  76. class="Btn1"
  77. plain
  78. size="small"
  79. type="info"
  80. @click="dailyLink"
  81. >填写日报</van-button
  82. >
  83. <van-button
  84. v-if="reportType < 4 && isCommit"
  85. class="Btn1"
  86. plain
  87. size="small"
  88. type="info"
  89. @click="dailyLinks"
  90. >查看我的历史汇报</van-button
  91. >
  92. </div>
  93. <!-- <p class="updataTime" v-if="type != 4 && tabVal != '-1'">更新时间:{{ updataTime }}</p> -->
  94. <div class="ownerBirthdayReminds" v-if="ownerBirthdayBoxFlag && ownerBirthdayReminds">
  95. <div class="ownerBirthdayBox">
  96. <div class="title"><img :src="require('@/assets/hua.png')" />金牌店生日提醒</div>
  97. <div class="content">{{ this.ownerBirthdayReminds }},将在3日后生日,请及时送上生日祝福!</div>
  98. <img class="dangao" :src="require('@/assets/dangao.png')" />
  99. </div>
  100. <div class="close" @click="ownerBirthdayBoxFlag = false">
  101. <img :src="require('@/assets/close.png')" />
  102. </div>
  103. </div>
  104. </div>
  105. </template>
  106. <script>
  107. import { getReportInfo } from '@/api/index';
  108. export default {
  109. props: {
  110. tabVal: {
  111. type: [String, Number],
  112. default: '-1',
  113. },
  114. },
  115. data() {
  116. return {
  117. reportInfoData: {},
  118. approvalButton: false,
  119. JZQuota: false,
  120. GZdata: false,
  121. approvalPendingNum: 0,
  122. proccessPendingNum: 0,
  123. powerGrade: '2',
  124. showButton: false,
  125. isCommit: null,
  126. updataTime: '',
  127. type: '-1',
  128. ownerBirthdayBoxFlag: false,
  129. ownerBirthdayReminds: null,
  130. reportType: null,
  131. };
  132. },
  133. activated() {
  134. this.getReportInfo();
  135. },
  136. methods: {
  137. getReportInfo() {
  138. getReportInfo({ isContent: false }).then((res) => {
  139. if (res.code == 200) {
  140. if (res.data.postType == 'GZ') {
  141. this.GZdata = true;
  142. } else {
  143. this.GZdata = false;
  144. }
  145. if (res.data.postType == 'JZ') {
  146. this.JZQuota = true;
  147. } else {
  148. this.JZQuota = false;
  149. }
  150. localStorage.setItem('powerGrade', res.data.positionId);
  151. localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
  152. localStorage.setItem('isDiy', res.data.diy);
  153. localStorage.setItem('uType', res.data.userType);
  154. localStorage.setItem('jzType', res.data.jzType);
  155. localStorage.setItem('customerVisits', res.data.customerManagerVisits);
  156. localStorage.setItem('postType', res.data.postType);
  157. localStorage.setItem('reportType', res.data.reportType);
  158. this.proccessPendingNum = res.data.proccessPendingNum;
  159. this.reportInfoData = res.data;
  160. this.approvalButton = res.data.approvalButton;
  161. this.powerGrade = res.data.positionId;
  162. this.showButton = res.data.showButton;
  163. this.reportType = res.data.reportType;
  164. if (res.data.reportTargetAll != null) {
  165. this.updataTime = res.data.reportTargetAll.updateTime;
  166. }
  167. this.approvalPendingNum = res.data.approvalPendingNum;
  168. this.type = res.data.userType;
  169. // 金牌店老板生日提醒
  170. if (res.data.ownerBirthdayReminds && res.data.ownerBirthdayReminds.length) {
  171. this.ownerBirthdayBoxFlag = true;
  172. this.ownerBirthdayReminds = res.data.ownerBirthdayReminds.join(',');
  173. }
  174. } else {
  175. this.$toast(res.msg);
  176. }
  177. });
  178. },
  179. dailyLink() {
  180. if (!this.isAllow()) return;
  181. this.$router.push('/daily');
  182. },
  183. weeklyLink() {
  184. if (!this.isAllow()) return;
  185. this.$router.push('/weekly');
  186. },
  187. doubleWeeklyLink() {
  188. if (!this.isAllow()) return;
  189. this.$router.push('/doubleWeekly');
  190. },
  191. dailyLinks() {
  192. if (!this.isAllow()) return;
  193. this.$router.push('/myHistoricalDaily');
  194. },
  195. // 是否允许填写汇报
  196. isAllow() {
  197. let reportRemark = this.reportInfoData.reportRemark;
  198. if (reportRemark) {
  199. this.$dialog
  200. .alert({
  201. message: reportRemark,
  202. })
  203. .then(() => {});
  204. return false;
  205. } else {
  206. return true;
  207. }
  208. },
  209. },
  210. };
  211. </script>
  212. <style scoped lang="scss">
  213. .bottomBtn {
  214. .ownerBirthdayReminds {
  215. width: 100%;
  216. height: 100%;
  217. position: fixed;
  218. top: 0;
  219. z-index: 999999;
  220. background: rgba(0, 0, 0, 0.5);
  221. display: flex;
  222. align-items: center;
  223. justify-content: center;
  224. flex-direction: column;
  225. .ownerBirthdayBox {
  226. width: 90%;
  227. // height: 369px;
  228. background: url('../../assets/ownerBirthdayBG.png') no-repeat center center;
  229. background-size: 100% 100%;
  230. display: flex;
  231. flex-direction: column;
  232. align-items: center;
  233. .title {
  234. text-align: center;
  235. font-size: 20px;
  236. color: #99443b;
  237. font-weight: bold;
  238. display: flex;
  239. align-items: flex-end;
  240. padding-top: 40px;
  241. position: relative;
  242. img {
  243. width: 35px;
  244. height: 35px;
  245. position: absolute;
  246. left: -55px;
  247. }
  248. }
  249. .content {
  250. width: 80%;
  251. line-height: 30px;
  252. font-size: 16px;
  253. color: #555555;
  254. text-align: center;
  255. margin-top: 20px;
  256. }
  257. .dangao {
  258. width: 80%;
  259. height: 160px;
  260. margin-top: 20px;
  261. margin-bottom: 35px;
  262. }
  263. }
  264. .close {
  265. img {
  266. width: 35px;
  267. height: 35px;
  268. margin-top: 20px;
  269. }
  270. }
  271. }
  272. }
  273. </style>