index.vue 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715
  1. <template>
  2. <div>
  3. <van-nav-bar title="填写日报" left-text="返回" @click-left="back" fixed left-arrow/>
  4. <van-form class="login_form" @submit="submitReport">
  5. <div>
  6. <van-field readonly clickable name="datetimePicker" :value="form.createDate" label="时间选择" placeholder="点击选择时间"
  7. @click="showPicker = true" :rules="rules.createDate" />
  8. <div v-if="report.time" class="attendanceRecord">
  9. <i class="iconfont firerock-icondakajilu" style="font-size:0.35rem;margin-right:0.12rem"></i>
  10. <span v-if="user.timeType.syncDingding==1&&!report.time">暂无考勤记录</span>
  11. <span v-else>{{report.time.startTime}}-{{report.time.endTime}}, {{report.time.workHours}}小时</span>
  12. </div>
  13. </div>
  14. <van-popup v-model="showPicker" position="bottom">
  15. <van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="changeTime" @cancel="showPicker = false"/>
  16. </van-popup>
  17. <van-cell title="总时长(h)" v-if="reportTimeType.type == 3">
  18. <template>
  19. <van-stepper :disabled="!canEdit" v-model="reportTimeType.allday" @change="changeAllTime" min="0.5" max="12" step="0.5" :decimal-length="1" />
  20. </template>
  21. </van-cell>
  22. <!-- <van-cell title="待分配时长" :value="report.time + 'h'" size="large"></van-cell> -->
  23. <div class="form_domains" v-for="(item,index) in form.domains" :key="item.id">
  24. <div style="float:right;margin-top:10px;margin-right:10px;">
  25. <!-- <van-tag v-if="canEdit&&item.projectName.length>0" color="#fff"
  26. @click="copyProject(index)" style="border: 1px solid #20a0ff;padding:5px;"
  27. icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">复制项目</span></van-tag> -->
  28. <van-tag v-if="index>0&&canEdit" color="#fff"
  29. @click="delPro(index)" style="border: 1px solid #ff0000;padding:5px;margin-left:10px;"
  30. icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">删除</span></van-tag>
  31. </div>
  32. <!-- <van-icon v-if="index>0&&canEdit" class="form_del" name="delete" @click="delPro(index)" /> -->
  33. <van-cell-group :title="(user.companyId==781?'任务':'项目') + (index+1)">
  34. <!-- <div>请选择投入项目</div> -->
  35. <van-field readonly name="projectId" clickable :value="item.projectName" :label="user.companyId==781?'工作任务':'投入项目'" :placeholder="user.companyId==781?'请选择工作任务':'请选择项目'" @click="clickPicker(index, item)"
  36. :rules="[{ required: true, message: user.companyId==781?'请选择任务':'请选择项目' }]" />
  37. <van-field readonly name="subProjectId" v-if="item.subProjectList != null && item.subProjectList.length > 0" clickable
  38. :value="item.subProjectName" label="子项目" placeholder="请选择子项目"
  39. @click="clickPickSubProject(index, item)" />
  40. <van-popup v-model="item.showPickerSubProject" position="bottom">
  41. <van-picker show-toolbar :columns="item.subProjectList" value-key="name" @confirm="choseSubProject"
  42. @cancel="item.showPickerSubProject = false;$forceUpdate();" />
  43. </van-popup>
  44. <!--任务分组 -->
  45. <van-field readonly name="groupId" v-if="item.taskGpIncharge == 1 || (user.company.packageProject==1&&item.taskGroups != null && item.taskGroups.length > 0)" clickable
  46. :value="item.groupName" label="任务分组" placeholder="请选择任务分组"
  47. @click="clickPickTaskGroup(index, item)" />
  48. <van-popup v-model="item.showPickerTaskGroup" position="bottom">
  49. <van-picker show-toolbar :columns="item.taskGroups" value-key="name" @confirm="choseTaskGroup"
  50. @cancel="item.showPickerTaskGroup = false;$forceUpdate();" />
  51. </van-popup>
  52. <!--任务阶段 -->
  53. <van-field readonly name="stage" v-if="user.company.packageProject==1&&item.stages != null && item.stages.length > 0" clickable
  54. :value="item.stage" label="投入阶段" placeholder="请选择投入阶段"
  55. @click="clickPickStage(index, item)" />
  56. <van-popup v-model="item.showPickerStage" position="bottom">
  57. <van-picker show-toolbar :columns="item.stages" value-key="stagesName" @confirm="choseStage"
  58. @cancel="item.showPickerStage = false;$forceUpdate();" />
  59. </van-popup>
  60. <!-- 审核人 -->
  61. <van-field readonly name="projectAuditorId" v-if="item.auditUserList != null && item.auditUserList.length > 0" clickable
  62. :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人"
  63. @click="clickPickAuditor(index, item)" />
  64. <van-popup v-model="item.showPickerAuditor" position="bottom">
  65. <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor"
  66. @cancel="item.showPickerAuditor = false;$forceUpdate();" />
  67. </van-popup>
  68. <!-- 相关维度 -->
  69. <van-field :value="item.weiduName" v-if="item.projectId && user.timeType.customDegreeActive == 1" readonly name="id" clickable :label="user.timeType.customDegreeName" placeholder="请选择" @click="clickPickers(index)"/>
  70. <van-popup v-model="item.showPickDegree" position="bottom">
  71. <van-picker show-toolbar :columns="item.wuduList" value-key="name" @confirm="choseProjects" @cancel="item.showPickDegree = false;$forceUpdate()" />
  72. </van-popup>
  73. <!-- 自定义数值 -->
  74. <van-field v-if="user.timeType.customDataActive==1" type="number" :disabled="!canEdit" v-model="item.customData" :label="user.timeType.customDataName"
  75. placeholder="请输入数字" ></van-field>
  76. <!-- 自定义文本 -->
  77. <van-field v-if="user.timeType.customTextActive==1" :disabled="!canEdit" v-model="item.customText" :label="user.timeType.customTextName"
  78. placeholder="请输入" maxlength="25"></van-field>
  79. <van-cell title="专业进度" v-if="user.company.packageEngineering == 1">
  80. </van-cell>
  81. <van-field :disabled="!canEdit"
  82. type="number" :name="'progress_'+pItem.professionId" input-align="right"
  83. v-for="pItem in item.professionProgress" :key="pItem.professionId"
  84. :label="'-- '+pItem.professionName"
  85. >
  86. <template slot="input">
  87. <van-stepper v-model="pItem.progress" integer min="0" max="100" />%
  88. </template>
  89. </van-field>
  90. <van-field v-if="user.company.packageProject == 1" readonly name="taskId" :value="item.taskName" label="关联任务" placeholder="请选择关联任务" @click="clickPickerTask(index)"
  91. ></van-field>
  92. <van-field name="taskFinish" label="是否已完成" v-if="item.taskId != null">
  93. <template #input>
  94. <van-checkbox :disabled="!canEdit" v-model="item.taskFinish" shape="square">已完成</van-checkbox>
  95. </template>
  96. </van-field>
  97. <van-popup v-model="item.showPickerTask" position="bottom">
  98. <van-picker show-toolbar :columns="item.taskList" value-key="taskName" @confirm="choseTask" @cancel="item.showPickerTask = false;$forceUpdate()" />
  99. </van-popup>
  100. <!-- <van-field readonly clickable class="form_input" :value="item.workingTime" name="workingTime" label="工作时长" placeholder="请输入工作时长(单位:小时)"
  101. :rules="[{ required: true, message: '请输入工作时长(单位:小时)' }]" @touchstart.native.stop="showNumberKey = true"/>
  102. <van-number-keyboard v-model="item.workingTime" :show="showNumberKey" close-button-text="完成" extra-key="." :maxlength="4" @blur="showNumberKey = false" /> -->
  103. <!-- 常规选择时间的方式 -->
  104. <!-- 全天上下午模式 -->
  105. <div v-if="reportTimeType.multiWorktime==0">
  106. <van-field v-if="reportTimeType.type < 2" readonly clickable :value="reportTimeType.type==0?item.label:(parseFloat(item.workingTime).toFixed(1)+'h')" label="工作时长" placeholder="请选择工作时长(小时)" @click="clickTimePicker(index)"
  107. :rules="[{ required: true, message: '请选择工作时长' }]"/>
  108. <van-popup v-model="showPickerTime" position="bottom">
  109. <van-picker show-toolbar :columns="timeType" value-key="label" @confirm="choseTimePick" @cancel="showPickerTime = false" />
  110. </van-popup>
  111. <!-- 选择数字时间长度模式 -->
  112. <van-popup v-model="showPickerHours" position="bottom">
  113. <van-picker show-toolbar :columns="timeRange"
  114. :default-index="15"
  115. @confirm="choseTimePick" @cancel="showPickerHours = false" />
  116. </van-popup>
  117. <!-- 时间段选择模式 -->
  118. <van-field readonly v-if="reportTimeType.type == 2" clickable name="datetimePicker" :value="item.startTime" label="开始时间" placeholder="点击选择时间"
  119. @click="canEdit?showStartTime = true:''" :disabled="!canEdit"
  120. :rules="[{ required: true, message: '请选择开始时间' }]"
  121. />
  122. <van-popup v-model="showStartTime" position="bottom">
  123. <van-datetime-picker
  124. v-model="startTime"
  125. type="time"
  126. @confirm="confirmTime(item,0);"
  127. @cancel="showStartTime = false"
  128. :min-hour="0"
  129. :max-hour="23"
  130. />
  131. <!-- :filter="filter" 原本这个属性在里面 -->
  132. </van-popup>
  133. <van-field v-if="reportTimeType.type == 2" readonly clickable name="datetimePicker" :value="item.endTime" label="结束时间" placeholder="点击选择时间"
  134. @click="canEdit?showEndTime = true:''" :disabled="!canEdit"
  135. :rules="[{ required: true, message: '请选择结束时间' }]" />
  136. <van-popup v-model="showEndTime" position="bottom" >
  137. <van-datetime-picker
  138. v-model="endTime"
  139. type="time"
  140. :min-hour="0"
  141. :max-hour="23"
  142. @confirm="confirmTime(item,1)"
  143. @cancel="showEndTime = false"
  144. />
  145. <!-- :filter="filter" 原本这个属性在里面 -->
  146. </van-popup>
  147. <van-cell v-if="reportTimeType.type == 3" >
  148. <template >
  149. <div>
  150. <span>用时占比</span>
  151. <van-slider :disabled="!canEdit" :min="10" :step="10" style="width:120px;display:inline-block;margin-left:50px;" v-model="item.progress" :value="100" @change="item.workingTime = (reportTimeType.allday*item.progress/100).toFixed(1)" >
  152. <template #button>
  153. <div class="custom-button">{{ item.progress }}%</div>
  154. </template>
  155. </van-slider>
  156. <span style="margin-left:10px;float:right;">{{item.workingTime}}小时</span>
  157. </div>
  158. </template>
  159. </van-cell>
  160. <van-field class="form_input" :disabled = "!canEdit"
  161. v-model="item.content" name="content" type="textarea" :label="user.companyId==781?'具体内容与结果':'工作事项'" placeholder="请输入"
  162. rows="3" autosize />
  163. </div>
  164. <!-- 多个时间和工作事项的选择方式 -->
  165. <div v-if="reportTimeType.multiWorktime==1">
  166. <div v-for="(timeItem, tindex) in item.worktimeList" :key="tindex" style="position:relative;border:#ccc 0.5px solid;margin:7px;">
  167. <van-tag v-if="tindex>0 && canEdit" style="position:absolute; right:-7px;top:-7px;z-index:10;"
  168. @click="removeTimeItem(item,tindex)">X</van-tag>
  169. <!-- 时间段选择模式 -->
  170. <van-field readonly v-if="reportTimeType.type == 2" :clickable="canEdit" name="datetimePicker"
  171. :value="timeItem.startTime" label="开始时间" placeholder="点击选择时间"
  172. :rules="[{ required: true, message: '必填项' }]"
  173. @click="canEdit?showStartDialog(timeItem):''" />
  174. <van-field v-if="reportTimeType.type == 2" readonly :clickable="canEdit" name="datetimePicker"
  175. :value="timeItem.endTime" label="结束时间" placeholder="点击选择时间"
  176. :rules="[{ required: true, message: '必填项' }]"
  177. @click="canEdit?showEndDialog(timeItem):''" />
  178. <van-field class="form_input" :disabled="!canEdit" style="color:#333;-webkit-text-fill-color:#646566;"
  179. v-model="timeItem.content" name="content" type="textarea" label="工作事项" placeholder="请输入工作事项"
  180. :rules="[{ required: true, message: '必填项' }]"
  181. rows="1" autosize />
  182. </div>
  183. <!--时间选择器 , 做统一处理,不能放到循环里,不然会有多个公用showStartTime,最后一个会现在最上层UI,导致BUG -->
  184. <van-popup v-model="showWorkStartTime" position="bottom">
  185. <van-datetime-picker
  186. v-model="startTime"
  187. type="time"
  188. @confirm="confirmWorkTime(0);"
  189. @cancel="showWorkStartTime = false"
  190. :min-hour="0"
  191. :max-hour="23"
  192. />
  193. <!-- :filter="filter" 原本这个属性在里面 -->
  194. </van-popup>
  195. <van-popup v-model="showWorkEndTime" position="bottom" >
  196. <van-datetime-picker
  197. v-model="endTime"
  198. type="time"
  199. :min-hour="0"
  200. :max-hour="23"
  201. @confirm="confirmWorkTime(1)"
  202. @cancel="showWorkEndTime = false"
  203. />
  204. <!-- :filter="filter" 原本这个属性在里面 -->
  205. </van-popup>
  206. </div>
  207. <div style="width:100%;" v-if="canEdit&&reportTimeType.multiWorktime==1">
  208. <van-tag style="text-align:center;padding:5px;margin-left:15px;border: 1px solid #20a0ff;"
  209. :disabled="!canEdit" @click="addNewWorktime(index, item)"
  210. icon="plus" color="#ffffff" ><span style="color:#999;text-align:center;padding: 0 5px;"> 添加工时 </span></van-tag>
  211. </div>
  212. <div class="overtime" >
  213. <div class="overTimeClas">
  214. <van-checkbox :disabled="!canEdit" v-model="item.isOvertime" style="width: 4.3rem;">含加班</van-checkbox>
  215. <van-field v-model="item.overtimeHours" type="number" :disabled="!canEdit || item.isOvertime==null||item.isOvertime==0"
  216. placeholder="请输入加班时长" style="width: 5rem"></van-field>
  217. <span :class="canEdit ? 'overListTime' : 'overListTime hoveOver'">小时</span>
  218. </div>
  219. <van-tag style="position:absolute;right:10px;" v-if="isCorpWX&&canEdit" type="primary" size="large" @click="takePhoto(index)">拍照上传</van-tag>
  220. <!-- <van-tag style="position:absolute;right:10px;" type="primary" size="large" @click="takePhoto(index)">拍照上传</van-tag> -->
  221. <!-- <van-tag style="position:absolute;right:10px;" type="primary" size="large" @click="takePhoto(index)">拍照上传</van-tag> -->
  222. </div>
  223. <div style="padding:5px;text-align:center;" v-if="!isIOSystem">
  224. <span v-for="(p, index) in item.pics" :key="p" style="margin-right:15px;">
  225. <div class="imgList">
  226. <van-icon v-if="canEdit && user.companyId==7" size="20" name="clear" @click="deleteImg(item, index)" class="imgList_i"/>
  227. <img :src="p" style="width:100px; height:100px;" @click="showLargeImg(item.pics, index)"/>
  228. </div>
  229. </span>
  230. </div>
  231. <div style="padding:5px;text-align:center;" v-if="isIOSystem">
  232. <span v-for="(p, index) in item.iospics" :key="p" style="margin-right:15px;">
  233. <div class="imgList">
  234. <van-icon v-if="canEdit && user.companyId==7" size="20" name="clear" @click="deleteImg(item, index)" class="imgList_i"/>
  235. <img :src="p" style="width:100px; height:100px;" @click="showLargeImg(item.iospics, index)"/>
  236. </div>
  237. </span>
  238. </div>
  239. <van-popup v-model="imgShow" position="bottom" closeable >
  240. <van-swipe class="my-swipe" indicator-color="white">
  241. <van-swipe-item v-for="(picItem, index) in tmpPics" :key="index">
  242. <img :src="picItem" style="width:100%;" />
  243. </van-swipe-item>
  244. </van-swipe>
  245. </van-popup>
  246. </van-cell-group>
  247. </div>
  248. <div style="text-align:center;" >
  249. <van-tag v-if="canEdit" size="large" style="text-align:center;margin:10px;padding:12px;margin-bottom:120px;border: 1px solid #20a0ff;"
  250. :disabled="!canEdit" @click="addNewPro"
  251. icon="plus" color="#ffffff" ><span style="color:#999;text-align:center;padding: 0 50px;"> + 新增{{user.companyId==781?'任务':'项目'}} </span></van-tag>
  252. </div>
  253. <div class="form_btn" style="position:fixed; bottom:0px;width:100%;">
  254. <div style="padding-bottom:10px;">
  255. <van-button v-if="canEdit" square block type="info" @click="isDraft=0" native-type="submit" style="width:50%;float:left;">
  256. <div v-if="flgLg">提交</div>
  257. <van-loading type="spinner" v-if="!flgLg" />
  258. </van-button>
  259. <van-button v-if="canEdit" square block type="default" @click="isDraft=1" native-type="submit" style="width:50%;float:left;">
  260. <div v-if="flgLg">暂存</div>
  261. <van-loading type="spinner" v-if="!flgLg" />
  262. </van-button>
  263. </div>
  264. <van-button v-if="canEdit&&form.domains.length>0 && form.domains[0].id != null"
  265. square block type="default" @click="deleteReport" native-type="button"
  266. style=""> 删除 </van-button>
  267. <!-- <div v-if="canEdit&&form.domains.length>0 && form.domains[0].id != null"
  268. style="display:block;padding-top:30px;font-size:15px;color:#666;margin:0 auto;text-align:center;padding-bottom:10px;background:#ffffff;"
  269. @click="deleteReport"> 删除 </div> -->
  270. <!-- <van-button v-if="canEdit" square block type="default" @click="deleteReport" native-type="button"
  271. style="margin-top:10px;"> 删除 </van-button> -->
  272. </div>
  273. </van-form>
  274. <div style="position:fixed; bottom:0px;width:100%;">
  275. <van-button v-if="canCancel" block type="default" @click="cancel"> 撤销 </van-button>
  276. </div>
  277. <div class="form_tip" v-if="!canEdit && !canCancel"> 已审核无法修改 </div>
  278. <!-- 选择项目弹窗 -->
  279. <van-popup v-model="showPickerUserddp" position="bottom" style="height: 80%">
  280. <!-- <van-search v-model="userName" placeholder="输入项目名称搜索" @clear="sea()" @blur="sea()" @search="sea()"></van-search> -->
  281. <van-search v-model="userName" placeholder="请输入项目名称/编号" @clear="sea()" @blur="sea()" @search="sea()" @input="sea()"/>
  282. <div style="minHeight:300px;">
  283. <div v-for="(item, index) in projectss" :key="item.id" class="ryuan" @click="fZr(item, index)">
  284. <p>{{item.projectName}}</p>
  285. <p style="margin-top: 5px;color: #9697B2;">{{item.projectCode}}</p>
  286. </div>
  287. </div>
  288. </van-popup>
  289. </div>
  290. </template>
  291. <script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  292. <script>
  293. import wx from 'weixin-js-sdk'
  294. // Vue.prototype.$wx = wx
  295. export default {
  296. data() {
  297. return {
  298. showPickerStage: false,
  299. showPickerTaskGroup: false,
  300. showPickerSubProject: false,
  301. isDraft:0,
  302. showWorkStartTime:false,
  303. showWorkEndTime:false,
  304. curWorktime:null,
  305. isIOSystem:false,
  306. imgShow: false,
  307. isCorpWX:false,
  308. isWX: false,
  309. showPickerTask:false,
  310. canCancel:false,
  311. canEdit:false,
  312. showEndTime: false,
  313. showStartTime: false,
  314. startTime:'09:00',
  315. endTime: '18:00',
  316. nowTime:new Date(),
  317. showPickerHours: false,
  318. timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.5,13.0,13.5,14.0,14.5,15.0],
  319. selectTime:null,
  320. reportTimeType:{},
  321. user: JSON.parse(localStorage.userInfo),
  322. minDate: new Date(2010, 0, 1),
  323. maxDate: new Date(),
  324. currentDate: new Date(),
  325. showPickerTime: false,
  326. showPicker: false,
  327. showPickerProject: false,
  328. showPickDegree: false,
  329. clickIndex: 0,
  330. clickTimeIndex: 0,
  331. showNumberKey: false,
  332. canClick: 2,
  333. timeType:[],
  334. form: {
  335. createDate: this.format(new Date(new Date()),"yyyy-MM-dd"),
  336. domains: [{
  337. id: null,
  338. projectId: "",
  339. projectName: "",
  340. workingTime: "",
  341. content: "",
  342. state: 2,
  343. multiWorktime:0,
  344. worktimeList:{},
  345. degreeId: ''
  346. // pics:["https://worktime.ttkuaiban.com/upload/bc4df504fa724e6cab69872e2c1cfb35.png",
  347. // "https://worktime.ttkuaiban.com/upload/bc4df504fa724e6cab69872e2c1cfb35.png",
  348. // "https://worktime.ttkuaiban.com/upload/bc4df504fa724e6cab69872e2c1cfb35.png",]
  349. }],
  350. },
  351. rules: {
  352. createDate: [{ required: true, message: '请选择填报日期' }],
  353. },
  354. project: [],
  355. report: "",
  356. loading: false,
  357. finished: false,
  358. // isOvertime: false
  359. tmpPics:[],
  360. dateAr: [],
  361. showPickerUserddp: false, // 选择项目弹窗
  362. projectss: [],
  363. proads: [],
  364. userName: '',
  365. proIdx: '',
  366. flgLg: true
  367. };
  368. },
  369. created() {
  370. },
  371. methods: {
  372. //获取项目审核人
  373. getProjectAuditorList(domainItem) {
  374. this.$axios.post("/project-auditor/getList", {projectId: domainItem.projectId})
  375. .then(res => {
  376. if(res.code == "ok") {
  377. domainItem.auditUserList = res.data;
  378. if (res.data.length==1) {
  379. domainItem.projectAuditorId = domainItem.auditUserList[0].auditorId;
  380. domainItem.projectAuditorName = domainItem.auditUserList[0].auditorName;
  381. }
  382. this.$forceUpdate();
  383. } else {
  384. this.$toast.fail('获取失败:'+res.msg);
  385. }
  386. }).catch(err=> {this.$toast.clear();});
  387. },
  388. updateTxt() {
  389. this.$forceUpdate();
  390. },
  391. // 获取项目
  392. getPeoject() {
  393. this.$axios.post("/project/getProjectList", {})
  394. .then(res => {
  395. if(res.code == "ok") {
  396. for(var i in res.data) {
  397. if(res.data[i].projectCode == 'null' || res.data[i].projectCode == null) {
  398. res.data[i].projectCode = ' '
  399. }
  400. }
  401. this.projectss = res.data;
  402. this.projectss = this.projectss.filter(p=>p.status == 1);
  403. this.proads = res.data
  404. } else {
  405. this.$toast.fail('获取失败:'+res.msg);
  406. }
  407. }).catch(err=> {this.$toast.clear();});
  408. },
  409. sea() {
  410. // console.log(this.userName.length)
  411. if(this.userName.length > 0) {
  412. // let text = this.userName
  413. // let reg = new RegExp(text)
  414. // let data = this.proads.filter(item => reg.test(item.projectName)) //返回
  415. // let datas = this.proads.filter(item => reg.test(item.projectCode))
  416. // let dataTree = data.concat(datas)
  417. // let arrList = Array.from(new Set(dataTree))
  418. // this.projectss = arrList
  419. // console.log(this.userName.toUpperCase())
  420. let data = this.proads.filter(item => {return item.projectName.indexOf(this.userName.toUpperCase()) != '-1'});
  421. let dataList = this.proads.filter(item => {return item.projectCode.indexOf(this.userName.toUpperCase()) != '-1'});
  422. let dataTree = data.concat(dataList)
  423. let arrList = Array.from(new Set(dataTree))
  424. this.projectss = arrList
  425. } else {
  426. // console.log(456)
  427. this.projectss = this.proads
  428. }
  429. },
  430. fZr(item,index) {
  431. var domainItem = this.form.domains[this.proIdx];
  432. domainItem.projectId = item.id;
  433. domainItem.projectName = item.projectName;
  434. //清空子项目
  435. domainItem.subProjectId = null;
  436. domainItem.subProjectName = null;
  437. //清空任务
  438. domainItem.taskId = null;
  439. domainItem.taskName = null;
  440. //清空分组和阶段
  441. domainItem.stage = null;
  442. domainItem.groupId = null;
  443. this.showPickerUserddp = false;
  444. //获取子项目
  445. this.getSubprojectList(this.form.domains[this.proIdx]);
  446. //加载项目相关的工程进度
  447. if (this.user.company.packageEngineering == 1){
  448. this.getProjectProfessions(this.form.domains[this.proIdx],index);
  449. }
  450. //获取任务分组
  451. this.getTaskGroups(this.form.domains[this.proIdx], this.proIdx);
  452. // 获取1相关维度
  453. this.getTaskList(domainItem.projectId)
  454. //获取相关日报提交选择人
  455. domainItem.projectAuditorId = null;
  456. domainItem.projectAuditorName = null;
  457. domainItem.auditUserList = null;
  458. //获取项目审核人
  459. var curProject = this.project.filter(p=>p.id == domainItem.projectId)[0];
  460. if (curProject.taskGpIncharge == 0) {
  461. this.getProjectAuditorList(domainItem, index);
  462. }
  463. domainItem.taskGpIncharge = curProject.taskGpIncharge;
  464. },
  465. //获取项目下的任务分组
  466. getTaskGroups(domainItem, index) {
  467. domainItem.groupId=null;
  468. domainItem.groupName=null;
  469. this.$axios.post("/task-group/listMyJoinGroup", {projectId: domainItem.projectId})
  470. .then(res => {
  471. if(res.code == "ok") {
  472. domainItem.taskGroups = res.data;
  473. }
  474. this.$forceUpdate();
  475. }).catch(err=> {this.$toast.clear();});
  476. },
  477. getSubprojectList(domainItem) {
  478. domainItem.subProjectList = [];
  479. this.$axios.post("/sub-project/list", {projectId: domainItem.projectId})
  480. .then(res => {
  481. if(res.code == "ok") {
  482. domainItem.subProjectList = res.data;
  483. }
  484. this.$forceUpdate();
  485. }).catch(err=> {this.$toast.clear();});
  486. },
  487. showEndDialog(timeItem) {
  488. this.curWorktime = timeItem;
  489. this.showWorkEndTime = true;
  490. },
  491. showStartDialog(timeItem) {
  492. this.curWorktime = timeItem;
  493. this.showWorkStartTime = true;
  494. },
  495. removeTimeItem(item, index) {
  496. item.worktimeList.splice(index, 1);
  497. },
  498. isIOS(){
  499. var u = navigator.userAgent;
  500. var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
  501. return isiOS;
  502. },
  503. showLargeImg(item, index) {
  504. this.imgShow = true;
  505. this.tmpPics = item;
  506. },
  507. //拍照上传
  508. takePhoto(index) {
  509. var that = this;
  510. wx.chooseImage({
  511. count: 9, // 默认9
  512. sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
  513. sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
  514. defaultCameraMode: "batch", //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
  515. isSaveToAlbum: 0, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
  516. success: function (res) {
  517. var localIds = res.localIds; // 返回选定照片的本地ID列表,
  518. // andriod中localId可以作为img标签的src属性显示图片;
  519. // iOS应当使用 getLocalImgData 获取图片base64数据,从而用于img标签的显示(在img标签内使用 wx.chooseImage 的 localid 显示可能会不成功)
  520. if (that.form.domains[index].pics == null) {
  521. that.form.domains[index].pics = [];
  522. that.form.domains[index].iospics = [];
  523. }
  524. if (that.isIOSystem) {
  525. for (var i=0;i<localIds.length; i++) {
  526. wx.getLocalImgData({
  527. localId: localIds[i], // 图片的localID
  528. success: function (res) {
  529. var localData = res.localData; // localData是图片的base64数据,可以用img标签显示
  530. that.form.domains[index].iospics.push(localData);
  531. that.$forceUpdate();
  532. }
  533. });
  534. }
  535. if (that.user.companyId == 7) {
  536. that.form.domains[index].pics = that.form.domains[index].pics.concat(localIds);
  537. } else {
  538. that.form.domains[index].pics = localIds;
  539. }
  540. } else {
  541. if (that.user.companyId == 7) {
  542. that.form.domains[index].pics = that.form.domains[index].pics.concat(localIds);
  543. } else {
  544. that.form.domains[index].pics = localIds;
  545. }
  546. that.$forceUpdate();
  547. }
  548. // var serverIdList = [];
  549. if (that.form.domains[index].serverPics == null) {
  550. that.form.domains[index].serverPics = [];
  551. }
  552. //立即就上传到企业微信服务器
  553. for (var i=0;i<localIds.length; i++) {
  554. wx.uploadImage({
  555. localId: localIds[i], // 需要上传的图片的本地ID,由chooseImage接口获得
  556. isShowProgressTips: 1, // 默认为1,显示进度提示
  557. success: function (res) {
  558. var serverId = res.serverId; // 返回图片的服务器端ID
  559. // serverIdList.push(serverId);
  560. that.form.domains[index].serverPics.push(serverId);
  561. }
  562. });
  563. }
  564. }
  565. });
  566. },
  567. copyProject(index) {
  568. var leftProgress = 10;
  569. if (this.reportTimeType.type == 3) {
  570. //计算已经待分配工时比例
  571. let array = this.form.domains;
  572. let totalProgress = 0;
  573. for (var i=0;i<array.length; i++) {
  574. totalProgress += array[i].progress;
  575. }
  576. if (totalProgress < 100) {
  577. leftProgress = 100 - totalProgress;
  578. }
  579. }
  580. var newIndex = index+1;
  581. var pName = "";
  582. if (this.form.domains[index].projectId != '') {
  583. pName = this.project.filter(p=>p.id == this.form.domains[index].projectId)[0].projectName;
  584. }
  585. var itemDomain = {
  586. id: null,
  587. projectId: this.form.domains[index].projectId,
  588. projectName: pName,
  589. workingTime: this.reportTimeType.type==3?(leftProgress*this.reportTimeType.allday/100).toFixed(1):"",
  590. progress:leftProgress,
  591. content: "",
  592. state: 2,
  593. isOvertime:false,
  594. };
  595. this.form.domains.splice(newIndex, 0,itemDomain);
  596. },
  597. //删除日报
  598. deleteReport() {
  599. this.$dialog.confirm({
  600. title: '删除日报',
  601. message: '确定要删除当天日报吗?'
  602. }).then(() => {
  603. const toast = this.$toast.loading({
  604. forbidClick: true,
  605. duration: 0
  606. });
  607. this.$axios.post("/report/delete", {userId: this.user.id, date:this.form.createDate})
  608. .then(res => {
  609. if(res.code == "ok") {
  610. this.$toast.clear();
  611. this.$toast.success('删除成功');
  612. window.location.reload();
  613. } else {
  614. this.$toast.clear();
  615. this.$toast.fail('删除失败');
  616. }
  617. }).catch(err=> {this.$toast.clear();});
  618. }).catch(() => {});
  619. },
  620. changeAllTime() {
  621. //总时长发生改变,自动按比例计算
  622. this.form.domains.forEach(d=>{
  623. d.workingTime = (d.progress*this.reportTimeType.allday/100).toFixed(1);
  624. });
  625. },
  626. cancel() {
  627. const toast = this.$toast.loading({
  628. forbidClick: true,
  629. duration: 0
  630. });
  631. var ids = '';
  632. var data = this.form.domains;
  633. data.forEach(element => {
  634. if (element.id != null && element.id != '') {
  635. ids +=(element.id+',');
  636. }
  637. });
  638. this.$axios.post("/report/cancel", {userId: this.user.id, reportIds:ids})
  639. .then(res => {
  640. if(res.code == "ok") {
  641. this.$toast.clear();
  642. this.$toast.success('撤销成功');
  643. this.getReport();
  644. } else {
  645. this.$toast.clear();
  646. this.$toast.fail('获取失败');
  647. }
  648. }).catch(err=> {this.$toast.clear();});
  649. },
  650. confirmWorkTime(field) {
  651. if (field == 0) {
  652. this.curWorktime.startTime = this.startTime;
  653. this.showWorkStartTime = false;
  654. } else {
  655. this.curWorktime.endTime = this.endTime;
  656. this.showWorkEndTime = false;
  657. }
  658. },
  659. confirmTime(item, field) {
  660. if (field == 0) {
  661. item.startTime = this.startTime;
  662. this.showStartTime = false;
  663. } else {
  664. item.endTime = this.endTime;
  665. this.showEndTime = false;
  666. }
  667. },
  668. filter(type, options) {
  669. if (type === 'minute') {
  670. return options.filter(option => option % 30 === 0);
  671. }
  672. return options;
  673. },
  674. choseTimePick(value, index) {
  675. //选中时间
  676. if (this.reportTimeType.type == 0) {
  677. this.form.domains[this.clickTimeIndex].timeType = value.value;
  678. this.form.domains[this.clickTimeIndex].workingTime = value.hours;
  679. this.form.domains[this.clickTimeIndex].label = value.label;
  680. this.showPickerTime = false;
  681. } else if (this.reportTimeType.type == 1) {
  682. // console.log('this.reportTimeType.type=='+value,this.form.domains);
  683. this.form.domains[this.clickTimeIndex].workingTime = value;
  684. this.form.domains[this.clickTimeIndex].label = value.toFixed(1)+'小时';
  685. this.showPickerHours = false;
  686. let allhour = 0
  687. for(let i in this.form.domains){
  688. this.form.domains[i].isOvertime = false
  689. delete this.form.domains[i].overtimeHours
  690. allhour += this.form.domains[i].workingTime
  691. }
  692. if(allhour > this.user.timeType.allday){
  693. this.form.domains[this.clickTimeIndex].isOvertime = true
  694. this.form.domains[this.clickTimeIndex].overtimeHours = allhour - this.user.timeType.allday
  695. }
  696. }
  697. },
  698. clickTimePicker(i) {
  699. if (!this.canEdit) {
  700. return;
  701. }
  702. this.clickTimeIndex = i;
  703. if (this.reportTimeType.type == 0) {
  704. this.showPickerTime = true;
  705. } else if (this.reportTimeType.type == 1) {
  706. this.showPickerHours = true;
  707. }
  708. },
  709. getTimeType() {
  710. this.$axios.post('/time-type/getCompanyTimeSetting', { companyId: this.user.companyId})
  711. .then(res => {
  712. if(res.code == "ok") {
  713. var t = res.data;
  714. this.reportTimeType = t;
  715. //转化时间格式
  716. if (t.allday != null) {
  717. this.timeType.push({value:0, label:'全天 - '+t.allday+'小时', hours:t.allday});
  718. }
  719. if (t.am != null) {
  720. this.timeType.push({value:1, label:'上午 - '+t.am+'小时', hours: t.am});
  721. }
  722. if (t.pm != null) {
  723. this.timeType.push({value:2, label:'下午 - '+t.pm+'小时', hours: t.pm});
  724. }
  725. } else {
  726. this.$toast.clear();
  727. this.$toast.fail(res.msg);
  728. }
  729. }).catch(err=> {this.$toast.clear();});
  730. },
  731. // 返回
  732. back() {
  733. history.back();
  734. },
  735. // 时间转换
  736. format(date, pattern) {
  737. pattern = pattern || "yyyy-MM-dd";
  738. var _this = this;
  739. return pattern.replace(/([yMdhsm])(\1*)/g, function ($0) {
  740. switch ($0.charAt(0)) {
  741. case 'y': return _this.padding(date.getFullYear(), $0.length);
  742. case 'M': return _this.padding(date.getMonth() + 1, $0.length);
  743. case 'd': return _this.padding(date.getDate(), $0.length);
  744. case 'w': return date.getDay() + 1;
  745. case 'h': return _this.padding(date.getHours(), $0.length);
  746. case 'm': return _this.padding(date.getMinutes(), $0.length);
  747. case 's': return _this.padding(date.getSeconds(), $0.length);
  748. }
  749. });
  750. },
  751. padding(s, len) {
  752. var len = len - (s + '').length;
  753. for (var i = 0; i < len; i++) { s = '0' + s; }
  754. return s;
  755. },
  756. // 获取项目
  757. getProject() {
  758. const toast = this.$toast.loading({
  759. forbidClick: true,
  760. duration: 0
  761. });
  762. this.$axios.post("/project/getProjectList", {})
  763. .then(res => {
  764. if(res.code == "ok") {
  765. this.$toast.clear();
  766. this.project = res.data;
  767. // if (this.project.length > 0) {
  768. // console.log('this.project[0].id=='+this.project[0].id);
  769. // this.getTaskList(this.project[0].id);
  770. // }
  771. } else {
  772. this.$toast.clear();
  773. this.$toast.fail('获取失败:'+res.msg);
  774. }
  775. }).catch(err=> {this.$toast.clear();});
  776. },
  777. // 获取日报
  778. getReport() {
  779. const toast = this.$toast.loading({
  780. forbidClick: true,
  781. duration: 0
  782. });
  783. this.$axios.post("/report/getReport", {date: this.form.createDate})
  784. .then(res => {
  785. if(res.code == "ok") {
  786. this.$toast.clear();
  787. this.report = res.data;
  788. var t = res.data.timeType;
  789. var timeType=[];
  790. //转化时间格式
  791. if (t.allday != null) {
  792. timeType.push({value:0, label:'全天 - '+t.allday+'小时', hours:t.allday});
  793. }
  794. if (t.am != null) {
  795. timeType.push({value:1, label:'上午 - '+t.am+'小时', hours: t.am});
  796. }
  797. if (t.pm != null) {
  798. timeType.push({value:2, label:'下午 - '+t.pm+'小时', hours: t.pm});
  799. }
  800. var list = res.data.report;
  801. if(list.length != 0) {
  802. this.canEdit = false;
  803. this.canCancel = false;
  804. let array = [];
  805. for(var i in list) {
  806. var projectName = "";
  807. var flg = (list[i].isOvertime == 1);
  808. for(var j in this.project) {
  809. if(this.project[j].id == list[i].projectId) {
  810. projectName = this.project[j].projectName;
  811. }
  812. }
  813. let tname = '';
  814. if (list[i].taskId != null && list[i].taskList.length > 0) {
  815. let filterList = list[i].taskList.filter(t=>t.taskId == list[i].taskId);
  816. if (filterList.length > 0) {
  817. tname = filterList[0].taskName;
  818. }
  819. }
  820. let mmm = list[i].degreeId
  821. let sss = list[i].degreeList
  822. let wuduName = ''
  823. for (var s in sss) {
  824. if(sss[s].id == mmm) {
  825. wuduName = sss[s].name
  826. }
  827. }
  828. let serverPicArray = [];
  829. // console.log('picArray=='+list[i].picStr);
  830. if (list[i].picStr != null && list[i].picStr != '@') {
  831. serverPicArray = JSON.parse(list[i].picStr.replace(/@/g,","));
  832. }
  833. var subProjectName = null;
  834. if (list[i].subProjectId) {
  835. subProjectName = list[i].subProjectList.filter(s=>s.id==list[i].subProjectId)[0].name;
  836. }
  837. array.push({
  838. id: list[i].id,
  839. projectId: list[i].projectId,
  840. projectName: projectName,
  841. workingTime: String(list[i].workingTime),
  842. content: list[i].content,
  843. state: list[i].state,
  844. timeType: list[i].timeType,
  845. label: timeType[list[i].timeType].label,
  846. startTime: list[i].startTime,
  847. endTime: list[i].endTime,
  848. isOvertime: flg,
  849. progress: list[i].progress,
  850. taskList: list[i].taskList,
  851. taskId: list[i].taskId,
  852. taskName:tname,
  853. professionProgress:list[i].professionProgressList,
  854. pics: list[i].pics,
  855. iospics:list[i].pics,
  856. serverPics:serverPicArray,
  857. multiWorktime:t.multiWorktime,
  858. worktimeList:list[i].worktimeList,
  859. wuduList: list[i].degreeList,
  860. weiduName: wuduName,
  861. degreeId: list[i].degreeId,
  862. subProjectId: list[i].subProjectId,
  863. subProjectName: subProjectName,
  864. subProjectList: list[i].subProjectList,
  865. groupId: list[i].groupId == 0?null:list[i].groupId,
  866. groupName: list[i].groupName,
  867. taskGroups:list[i].taskGroups,
  868. stages:list[i].stages,
  869. stage:list[i].stage == '-'?null:list[i].stage,
  870. customData: list[i].customData,
  871. projectAuditorId: list[i].projectAuditorId,
  872. projectAuditorName: list[i].projectAuditorName,
  873. auditUserList: list[i].auditUserList,
  874. overtimeHours: list[i].overtimeHours,
  875. customText: list[i].customText
  876. })
  877. if (list[i].state >= 2) {
  878. this.canEdit = true;
  879. } else if (list[i].state == 0) {
  880. this.canCancel = true;
  881. }
  882. }
  883. this.form.domains = array;
  884. } else {
  885. this.canCancel = false;
  886. this.canEdit = true;
  887. var shuzhi = this.user.timeType.allday + ''
  888. //没有填报的可以点击提交
  889. this.form.domains = [{
  890. id: null,
  891. projectId: "",
  892. projectName: "",
  893. // workingTime: t.type==3?(t.allday).toFixed(1):"8.0",
  894. workingTime: t.type==3?(t.allday).toFixed(1):shuzhi.indexOf('.') == '-1' ? shuzhi + '.0' : shuzhi,
  895. content: "",
  896. state: 2,
  897. progress:100,
  898. isOvertime:false,
  899. professionProgress:[],
  900. multiWorktime:t.multiWorktime,
  901. worktimeList:[{}],
  902. }]
  903. this.canEdit = true;
  904. }
  905. } else {
  906. this.$toast.clear();
  907. this.$toast.fail('获取失败:'+res.msg);
  908. }
  909. if(localStorage.getItem("formVal")) {
  910. // console.log('触发了')
  911. var obj = localStorage.getItem("formVal")
  912. this.form = JSON.parse(obj)
  913. localStorage.removeItem('formVal')
  914. }
  915. }).catch(err=> {this.$toast.clear();});
  916. },
  917. // 改变时间
  918. changeTime(time) {
  919. this.form.createDate = this.format(new Date(time),"yyyy-MM-dd");
  920. this.currentDate = time;
  921. this.showPicker = false;
  922. this.getReport();
  923. },
  924. //点击选择审核人
  925. clickPickAuditor(i, item) {
  926. if (!this.canEdit) return;
  927. if (item.auditUserList.length<=1) return;
  928. this.clickIndex = i;
  929. item.showPickerAuditor = true;
  930. this.$forceUpdate();
  931. },
  932. choseAuditor(value, index) {
  933. this.form.domains[this.clickIndex].projectAuditorId = value.auditorId;
  934. this.form.domains[this.clickIndex].projectAuditorName = value.auditorName;
  935. this.form.domains[this.clickIndex].showPickerAuditor = false;
  936. this.$forceUpdate();
  937. },
  938. //点击选择子项目
  939. clickPickSubProject(i, item) {
  940. if (!this.canEdit) return;
  941. this.clickIndex = i;
  942. item.showPickerSubProject = true;
  943. this.$forceUpdate();
  944. },
  945. clickPickTaskGroup(i, item) {
  946. if (!this.canEdit) return;
  947. this.clickIndex = i;
  948. item.showPickerTaskGroup = true;
  949. this.$forceUpdate();
  950. },
  951. clickPickStage(i, item) {
  952. if (!this.canEdit) return;
  953. this.clickIndex = i;
  954. item.showPickerStage = true;
  955. this.$forceUpdate();
  956. },
  957. // 选择项目
  958. clickPicker(i, item) {
  959. if (!this.canEdit) return;
  960. // this.clickIndex = i;
  961. // this.showPickerProject = true;
  962. // console.log(i, item, this.form)
  963. this.proIdx = i
  964. this.showPickerUserddp = true
  965. // this.$router.push({
  966. // path: '/search',
  967. // query: {
  968. // // from: JSON.stringify(this.form)
  969. // from: this.form,
  970. // idx: i
  971. // }
  972. // });
  973. },
  974. clickPickers(i) {
  975. if (!this.canEdit) return;
  976. this.clickIndex = i;
  977. this.form.domains[this.clickIndex].showPickDegree = true;
  978. var proId = this.form.domains[this.clickIndex].projectId
  979. this.dimension(proId)
  980. },
  981. //选择任务
  982. clickPickerTask(i) {
  983. if (!this.canEdit) return;
  984. // console.log(i);
  985. this.clickIndex = i;
  986. // var proId = this.form.domains[this.clickIndex].projectId
  987. // this.getTaskList(proId)
  988. this.form.domains[this.clickIndex].showPickerTask = true;
  989. this.$forceUpdate();
  990. },
  991. choseTask(value, index) {
  992. this.form.domains[this.clickIndex].taskId = value.taskId;
  993. this.form.domains[this.clickIndex].taskName = value.taskName;
  994. this.form.domains[this.clickIndex].showPickerTask = false;
  995. this.$forceUpdate();
  996. },
  997. choseProjects(value, index) {
  998. // console.log(value)
  999. this.form.domains[this.clickIndex].weiduName = value.name;
  1000. this.form.domains[this.clickIndex].degreeId = value.id;
  1001. this.form.domains[this.clickIndex].showPickDegree = false;
  1002. this.$forceUpdate();
  1003. },
  1004. choseSubProject(value, index) {
  1005. this.form.domains[this.clickIndex].subProjectId = value.id;
  1006. this.form.domains[this.clickIndex].subProjectName = value.name;
  1007. this.form.domains[this.clickIndex].showPickerSubProject = false;
  1008. this.$forceUpdate();
  1009. },
  1010. choseTaskGroup(value, index) {
  1011. this.form.domains[this.clickIndex].groupId = value.id;
  1012. this.form.domains[this.clickIndex].groupName = value.name;
  1013. this.form.domains[this.clickIndex].showPickerTaskGroup = false;
  1014. var domainItem = this.form.domains[this.clickIndex];
  1015. this.getGroupStages(this.form.domains[this.clickIndex], index);
  1016. //检查当前的项目是否需要获取分组的负责人
  1017. var curProject = this.project.filter(p=>p.id == this.form.domains[this.clickIndex].projectId)[0];
  1018. if (curProject.taskGpIncharge == 1) {
  1019. this.$axios.post("/task-group/getGroupIncharger", {groupId: domainItem.groupId})
  1020. .then(res => {
  1021. if(res.code == "ok") {
  1022. domainItem.auditUserList = res.data;
  1023. if (res.data.length==1) {
  1024. domainItem.projectAuditorId = domainItem.auditUserList[0].auditorId;
  1025. domainItem.projectAuditorName = domainItem.auditUserList[0].auditorName;
  1026. }
  1027. this.$forceUpdate();
  1028. } else {
  1029. this.$toast.fail('获取失败:'+res.msg);
  1030. }
  1031. }).catch(err=> {this.$toast.clear();});
  1032. }
  1033. },
  1034. choseStage(value, index) {
  1035. this.form.domains[this.clickIndex].stage = value.stagesName;
  1036. this.form.domains[this.clickIndex].showPickerStage = false;
  1037. this.$forceUpdate();
  1038. },
  1039. getGroupStages(domain, index) {
  1040. this.$axios.post("/stages/getProjectStagesByGroup", {groupId: domain.groupId})
  1041. .then(res => {
  1042. if(res.code == "ok") {
  1043. domain.stage = '';
  1044. domain.stages = res.data;
  1045. this.$forceUpdate();
  1046. } else {
  1047. this.$toast.fail('获取失败');
  1048. }
  1049. }).catch(err=> {this.$toast.clear();});
  1050. },
  1051. getProjectProfessions(domain, index) {
  1052. // console.log(domain, '数据')
  1053. this.$axios.post("/project-profession/getMyProfession", {projectId: domain.projectId})
  1054. .then(res => {
  1055. if(res.code == "ok") {
  1056. this.form.domains[this.clickIndex].professionProgress = res.data;
  1057. // console.log(this.form.domains)
  1058. this.$forceUpdate();
  1059. } else {
  1060. this.$toast.fail('获取失败');
  1061. }
  1062. }).catch(err=> {this.$toast.clear();});
  1063. },
  1064. // 获取维度
  1065. dimension(projectId) {
  1066. this.$axios.post("/project/getDegreeList", {projectId: projectId})
  1067. .then(res => {
  1068. if(res.code == "ok") {
  1069. this.form.domains[this.clickIndex].wuduList = res.data;
  1070. this.$forceUpdate();
  1071. } else {
  1072. this.$toast.fail('获取失败');
  1073. }
  1074. }).catch(err=> {this.$toast.clear();});
  1075. },
  1076. getTaskList(projectId) {
  1077. //如果是专业版,需要列出任务列表
  1078. if (this.user.company.packageProject == 1) {
  1079. this.$axios.post("/task/getRecentTask", {projectId: projectId})
  1080. .then(res => {
  1081. if(res.code == "ok") {
  1082. this.form.domains[this.clickIndex].taskList = res.data;
  1083. this.form = this.form;
  1084. // this.$forceUpdate();
  1085. } else {
  1086. this.$toast.fail('获取失败');
  1087. }
  1088. }).catch(err=> {this.$toast.clear();});
  1089. }
  1090. },
  1091. //添加工时
  1092. addNewWorktime(index, item) {
  1093. item.worktimeList.push({});
  1094. },
  1095. // 添加项目
  1096. addNewPro() {
  1097. var leftProgress = 10;
  1098. if (this.reportTimeType.type == 3) {
  1099. //计算已经待分配工时比例
  1100. let array = this.form.domains;
  1101. let totalProgress = 0;
  1102. for (var i=0;i<array.length; i++) {
  1103. totalProgress += array[i].progress;
  1104. }
  1105. if (totalProgress < 100) {
  1106. leftProgress = 100 - totalProgress;
  1107. }
  1108. }
  1109. this.form.domains.push({
  1110. id: null,
  1111. projectId: "",
  1112. projectName: "",
  1113. workingTime: this.reportTimeType.type==3?(leftProgress*this.reportTimeType.allday/100).toFixed(1):"4.0",
  1114. progress:leftProgress,
  1115. content: "",
  1116. state: 2,
  1117. isOvertime:false,
  1118. multiWorktime: this.reportTimeType.multiWorktime,
  1119. worktimeList:[{}],
  1120. degreeId: null
  1121. })
  1122. },
  1123. // 移除项目
  1124. delPro(i) {
  1125. this.$dialog.confirm({
  1126. title: '',
  1127. message: '是否移除当前项目'
  1128. }).then(() => {
  1129. this.form.domains.splice(i,1);
  1130. }).catch(() => {
  1131. });
  1132. },
  1133. // 判断时间段
  1134. fns() {
  1135. for (let k in this.dateAr) {
  1136. if (!this.judege(k)) {
  1137. return false
  1138. }
  1139. }
  1140. return true
  1141. },
  1142. judege(idx){
  1143. for (let k in this.dateAr) {
  1144. if (idx !== k) {
  1145. if (this.dateAr[k].s <= this.dateAr[idx].s && this.dateAr[k].e > this.dateAr[idx].s) {
  1146. return false
  1147. }
  1148. if (this.dateAr[k].s < this.dateAr[idx].e && this.dateAr[k].e >= this.dateAr[idx].e) {
  1149. return false
  1150. }
  1151. }
  1152. }
  1153. return true
  1154. },
  1155. // 提交日报
  1156. submitReport() {
  1157. this.dateAr = []
  1158. let alp = []
  1159. if(this.user.timeType.multiWorktime == 1) {
  1160. for(var p in this.form.domains) {
  1161. var slll = this.form.domains[p]
  1162. for(var o in slll.worktimeList) {
  1163. if(slll.worktimeList[o].startTime || slll.worktimeList[o].endTime) {
  1164. let objs = {}
  1165. objs.s = slll.worktimeList[o].startTime
  1166. objs.e = slll.worktimeList[o].endTime
  1167. alp.push(objs)
  1168. }
  1169. }
  1170. }
  1171. this.dateAr = alp
  1172. if(this.dateAr.length > 0) {
  1173. let trus = this.fns()
  1174. if(!trus) {
  1175. this.$toast('填写的时间段重叠')
  1176. return
  1177. }
  1178. }
  1179. }
  1180. // return
  1181. const toast = this.$toast.loading({
  1182. forbidClick: true,
  1183. duration: 0
  1184. });
  1185. // let formData = new FormData();
  1186. let formData = new URLSearchParams()
  1187. formData.append("draft", this.isDraft);
  1188. if (this.reportTimeType.type == 0) {
  1189. var alldayNum = 0;
  1190. var amNum = 0;
  1191. var pmNum = 0;
  1192. for(var i in this.form.domains) {
  1193. if (this.form.domains[i].timeType == 0) {
  1194. alldayNum ++;
  1195. } else if (this.form.domains[i].timeType == 1) {
  1196. amNum++;
  1197. } else if (this.form.domains[i].timeType == 2) {
  1198. pmNum++;
  1199. }
  1200. }
  1201. if (alldayNum > 1) {
  1202. this.$toast.fail("工作时间-全天,只能选择一次");
  1203. return;
  1204. }
  1205. if (amNum > 1) {
  1206. this.$toast.fail("工作时间-上午,只能选择一次");
  1207. return;
  1208. }
  1209. if (pmNum > 1) {
  1210. this.$toast.fail("工作时间-下午,只能选择一次");
  1211. return;
  1212. }
  1213. if (alldayNum == 1 && (amNum > 0 || pmNum > 0)) {
  1214. this.$toast.fail("工作时间-全天,不能和上下午同时存在");
  1215. return;
  1216. }
  1217. } else if (this.reportTimeType.type == 3) {
  1218. //总百分比不能超过100%
  1219. let total = 0;
  1220. this.form.domains.forEach(w=>{total += w.progress});
  1221. if (total > 100) {
  1222. this.$toast.fail("用时比例之和不能超过100%");
  1223. return;
  1224. } else if (total < 100) {
  1225. this.$toast.fail("工时尚未完全分配,无法提交");
  1226. return;
  1227. }
  1228. }
  1229. if (this.reportTimeType.type == 1 && this.report.time) {
  1230. var totalTime = 0;
  1231. for (var t=0;t<this.form.domains.length; t++) {
  1232. totalTime += parseFloat(this.form.domains[t].workingTime);
  1233. }
  1234. if (this.report.time.workHours && totalTime > parseFloat(this.report.time.workHours)) {
  1235. this.$toast.fail("填报工时之和"+(totalTime)+"h不能超过考勤总工时("+this.report.time.workHours.toFixed(1)+"h)");
  1236. return;
  1237. }
  1238. }
  1239. //填字段
  1240. for(var i in this.form.domains) {
  1241. if (this.user.timeType.customDegreeActive == 1) {
  1242. if(this.form.domains[i].degreeId) {
  1243. formData.append("degreeId", this.form.domains[i].degreeId);
  1244. } else {
  1245. formData.append("degreeId", -1);
  1246. }
  1247. } else {
  1248. formData.append("degreeId", -1);
  1249. }
  1250. if(this.form.domains[i].customData) {
  1251. formData.append("customData", this.form.domains[i].customData);
  1252. } else {
  1253. formData.append("customData", "0");
  1254. }
  1255. if(this.form.domains[i].customText) {
  1256. formData.append("customText", this.form.domains[i].customText);
  1257. } else {
  1258. formData.append("customText", "-");
  1259. }
  1260. if (this.form.domains[i].id) {
  1261. formData.append("id", this.form.domains[i].id);
  1262. } else {
  1263. formData.append("id", -1);
  1264. }
  1265. formData.append("projectId", parseFloat(this.form.domains[i].projectId));
  1266. if (this.form.domains[i].subProjectId) {
  1267. formData.append("subProjectId", this.form.domains[i].subProjectId);
  1268. } else {
  1269. formData.append("subProjectId", 0);
  1270. }
  1271. if (this.form.domains[i].groupId) {
  1272. formData.append("groupId", this.form.domains[i].groupId);
  1273. } else {
  1274. formData.append("groupId", 0);
  1275. }
  1276. if (this.form.domains[i].stage) {
  1277. formData.append("stage", this.form.domains[i].stage);
  1278. } else {
  1279. formData.append("stage", '-');
  1280. }
  1281. formData.append("reportTimeType", this.reportTimeType.type);
  1282. formData.append("multiWorktime", this.reportTimeType.multiWorktime);
  1283. if (this.reportTimeType.type == 0) {
  1284. formData.append("timeType", this.form.domains[i].timeType);
  1285. formData.append("workingTime", parseFloat(this.form.domains[i].workingTime));
  1286. } else if (this.reportTimeType.type == 1) {
  1287. formData.append("workingTime", parseFloat(this.form.domains[i].workingTime));
  1288. } else if (this.reportTimeType.type == 2) {
  1289. formData.append("startTime", this.form.domains[i].startTime);
  1290. formData.append("endTime",this.form.domains[i].endTime);
  1291. } else if (this.reportTimeType.type == 3) {
  1292. formData.append("progress", this.form.domains[i].progress);
  1293. formData.append("workingTime",this.form.domains[i].workingTime);
  1294. }
  1295. if (this.form.domains[i].taskId) {
  1296. formData.append("taskId", this.form.domains[i].taskId);
  1297. } else {
  1298. formData.append("taskId", 0);
  1299. }
  1300. if (this.form.domains[i].taskFinish == true) {
  1301. formData.append("taskFinish", 1);
  1302. } else {
  1303. formData.append("taskFinish", 0);
  1304. }
  1305. formData.append("createDate", this.form.createDate);
  1306. formData.append("isOvertime", this.form.domains[i].isOvertime?1:0);
  1307. if (this.form.domains[i].overtimeHours && this.form.domains[i].isOvertime == 1) {
  1308. formData.append("overtimeHours", this.form.domains[i].overtimeHours);
  1309. } else {
  1310. formData.append("overtimeHours", 0);
  1311. }
  1312. //项目专业进度
  1313. if (this.form.domains[i].professionProgress) {
  1314. let m = JSON.stringify(this.form.domains[i].professionProgress);
  1315. m = m.replace(/,/g,"@");//replaceAll(',','@');企业微信不兼容replaceAll
  1316. formData.append("professionProgress", m);
  1317. } else {
  1318. formData.append("professionProgress", "[]");
  1319. }
  1320. //图片的处理,serverPic是当前所有的照片
  1321. if (this.form.domains[i].serverPics) {
  1322. let m = JSON.stringify(this.form.domains[i].serverPics);
  1323. m = m.replace(/,/g,"@");//replaceAll(',','@');企业微信不兼容replaceAll
  1324. formData.append("pics", m);
  1325. } else {
  1326. formData.append("pics", "@");
  1327. }
  1328. //处理多个时间事项
  1329. if (this.reportTimeType.multiWorktime == 1) {
  1330. //检查时间是否有重叠
  1331. var workList = this.form.domains[i].worktimeList;
  1332. for (var j=0;j<workList.length; j++) {
  1333. var curItem = workList[j];
  1334. if (curItem.startTime == null || curItem.endTime == null) {
  1335. this.$toast.fail("请设置工作时间");
  1336. return;
  1337. }
  1338. //检查开始时间是否大于结束时间
  1339. if (curItem.startTime >= curItem.endTime) {
  1340. this.$toast.fail("时间段"+curItem.startTime+'-'+curItem.endTime+"有误:"+
  1341. "结束时间必须大于开始时间");
  1342. return;
  1343. }
  1344. for (var p = j+1;p<workList.length; p++) {
  1345. var jItem = workList[p];
  1346. if ((jItem.startTime>=curItem.startTime&&jItem.startTime < curItem.endTime)
  1347. || (jItem.endTime>curItem.startTime&&jItem.endTime <= curItem.endTime)) {
  1348. this.$toast.fail("时间段"+curItem.startTime+'-'+curItem.endTime+"与"+
  1349. jItem.startTime+'-'+jItem.endTime+ "存在重叠,请修改。");
  1350. return;
  1351. }
  1352. }
  1353. }
  1354. let m = JSON.stringify(this.form.domains[i].worktimeList);
  1355. m = m.replace(/,/g,"@");//replaceAll(',','@');企业微信不兼容replaceAll
  1356. formData.append("content", m);
  1357. } else {
  1358. if (this.form.domains[i].content) {
  1359. formData.append("content", this.form.domains[i].content);
  1360. } else {
  1361. formData.append("content", '-');
  1362. }
  1363. }
  1364. //审核人
  1365. if (this.form.domains[i].projectAuditorId) {
  1366. formData.append("projectAuditorId", this.form.domains[i].projectAuditorId);
  1367. } else {
  1368. if (this.form.domains[i].taskGpIncharge == 0) {
  1369. this.$toast.fail("请指定["+this.form.domains[i].projectName+']项目的审核人');
  1370. } else if (this.form.domains[i].taskGroups.length == 0) {
  1371. this.$toast.fail("您在["+this.form.domains[i].projectName+"]项目上尚无参与的任务分组");
  1372. }
  1373. return;
  1374. }
  1375. }
  1376. if(!this.flgLg) {
  1377. return
  1378. }
  1379. this.flgLg = false
  1380. this.$axios.post("/report/editReport", formData)
  1381. .then(res => {
  1382. this.flgLg = true
  1383. if(res.code == "ok") {
  1384. this.$toast.clear();
  1385. this.$toast.success(this.isDraft==0?'提交成功':'暂存成功');
  1386. this.$router.push("/index");
  1387. } else {
  1388. this.$toast.clear();
  1389. this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);
  1390. }
  1391. }).catch(err=> {this.$toast.clear(); this.flgLg = true});
  1392. },
  1393. //初始化参数
  1394. initWxConfig() {
  1395. var curUrl=location.href.split("#")[0];
  1396. this.$axios.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id})
  1397. .then(res => {
  1398. if(res.code == "ok") {
  1399. var data=res.data;
  1400. wx.config({
  1401. beta: true,
  1402. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  1403. appId: data.appid, // 必填,公众号的唯一标识
  1404. timestamp: data.timestamp, // 必填,生成签名的时间戳
  1405. nonceStr: data.noncestr, // 必填,生成签名的随机串
  1406. signature: data.sign, // 必填,签名,见附录1
  1407. jsApiList: [
  1408. 'chooseImage',
  1409. 'previewImage',
  1410. 'uploadImage',
  1411. 'downloadImage',
  1412. 'previewFile',
  1413. 'getLocation',
  1414. ]
  1415. });
  1416. var that = this;
  1417. wx.ready(function(){
  1418. // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
  1419. // if (that.user.companyId == 7) {
  1420. // that.$toast('wx init success==7 ');
  1421. // that.getLocation();
  1422. // }
  1423. });
  1424. } else {
  1425. this.$toast.fail('获取失败');
  1426. }
  1427. }).catch(err=> {this.$toast.fail('发生异常'+err);console.log(err)});
  1428. },
  1429. deleteImg(item, index) {
  1430. //删除添加的图片
  1431. if (this.isIOSystem) {
  1432. item.iospics.splice(index,1);
  1433. item.iospics = item.iospics;
  1434. }
  1435. item.pics.splice(index,1);
  1436. item.pics = item.pics;
  1437. //传递到后台的数据也要做同步删除
  1438. item.serverPics.splice(index,1);
  1439. this.$forceUpdate();
  1440. },
  1441. //企业微信获取定位
  1442. getLocation() {
  1443. wx.getLocation({
  1444. type: 'wgs84', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
  1445. success: function (res) {
  1446. var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90
  1447. var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
  1448. alert(JSON.stringify(res));
  1449. }
  1450. });
  1451. }
  1452. },
  1453. mounted() {
  1454. console.log('user',this.user)
  1455. var ua = navigator.userAgent.toLowerCase();
  1456. this.isIOSystem = this.isIOS();
  1457. if (ua.indexOf("wxwork") > 0) {
  1458. this.isCorpWX = true;
  1459. } else if (ua.indexOf("micromessenger") > 0) {
  1460. this.isWX = true;
  1461. }
  1462. this.getPeoject() // 获取项目
  1463. //获取传递过来的日期
  1464. var passDate = this.$route.query.date;
  1465. if (passDate != null) {
  1466. this.form.createDate = this.$route.query.date;
  1467. }
  1468. this.getProject();
  1469. this.getReport();
  1470. this.getTimeType();
  1471. //初始化微信js-sdk参数
  1472. if (this.isCorpWX) {
  1473. this.initWxConfig();
  1474. }
  1475. if(this.user.timeType.lockWorktime){
  1476. this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
  1477. }
  1478. // if(localStorage.getItem("formVal")) {
  1479. // var obj = localStorage.getItem("formVal")
  1480. // this.form = JSON.parse(obj)
  1481. // localStorage.removeItem('formVal')
  1482. // }
  1483. },
  1484. beforeDestroy() {
  1485. localStorage.removeItem('formVal')
  1486. }
  1487. };
  1488. </script>
  1489. <style lang="less" scope>
  1490. .my-swipe .van-swipe-item {
  1491. color: #fff;
  1492. font-size: 20px;
  1493. line-height: 150px;
  1494. text-align: center;
  1495. background-color: #39a9ed;
  1496. }
  1497. .van-field__control:disabled {
  1498. -webkit-text-fill-color:#646566;
  1499. }
  1500. .login_form {
  1501. margin-top: 46px;
  1502. position: relative;
  1503. }
  1504. .attendanceRecord{
  1505. position: absolute;
  1506. top: 0.26667rem;
  1507. right: 0.42667rem;
  1508. color: #969799;
  1509. font-size: 0.35rem;
  1510. line-height: 0.64rem;
  1511. }
  1512. .form_domains {
  1513. position: relative;
  1514. .form_copy {
  1515. position: absolute;
  1516. right: 85px;
  1517. top: 10px;
  1518. }
  1519. .form_addNew {
  1520. text-align: center;
  1521. margin:10px;
  1522. }
  1523. .form_del {
  1524. position: absolute;
  1525. right: 10px;
  1526. top: 10px;
  1527. }
  1528. // .form_del {
  1529. // color: #ff0000;
  1530. // font-size: 22px;
  1531. // position: absolute;
  1532. // right: 15px;
  1533. // top: 10px;
  1534. // }
  1535. }
  1536. .form_tip {
  1537. text-align: center;
  1538. margin-top: 20px;
  1539. color: #afafaf;
  1540. font-size: 14px;
  1541. }
  1542. .card__footer {
  1543. padding-top: 10px;
  1544. }
  1545. .card__tags {
  1546. .van-tag {
  1547. margin-right: 5px;
  1548. }
  1549. }
  1550. .overTimeClas{
  1551. display: flex;
  1552. width: 7.4rem;
  1553. // justify-content: space-between;
  1554. align-items: center;
  1555. }
  1556. </style>
  1557. <style lang="less">
  1558. .van-nav-bar .van-icon , .van-nav-bar__text {
  1559. color: #20a0ff;
  1560. }
  1561. .overtime {
  1562. height: 50px;
  1563. box-sizing: border-box;
  1564. padding-left: 10px;
  1565. display: flex;
  1566. align-items: center;
  1567. }
  1568. .custom-button {
  1569. width: 40px;
  1570. color: #fff;
  1571. font-size: 10px;
  1572. line-height: 16px;
  1573. text-align: center;
  1574. background-color: #1989fa;
  1575. border-radius: 100px;
  1576. }
  1577. .imgList {
  1578. position: relative;
  1579. width: 100px;
  1580. height: 100px;
  1581. display: inline-block;
  1582. }
  1583. .imgList_i {
  1584. position: absolute;
  1585. top: -8px;
  1586. right: -6px;
  1587. z-index: 999;
  1588. }
  1589. .ryuan {
  1590. padding: 0.3rem 0.53333rem;
  1591. // line-height: 40px;
  1592. // height: 40px;
  1593. color: #333;
  1594. border-bottom: 2px solid #f6f6f6;
  1595. width: 100%;
  1596. overflow: hidden;
  1597. text-overflow:ellipsis;
  1598. white-space: nowrap;
  1599. }
  1600. .overListTime {
  1601. margin-left:5px;
  1602. display: inline-block;
  1603. width: 2rem;
  1604. color: #646566;
  1605. }
  1606. .hoveOver {
  1607. color: #C8C9CC;
  1608. }
  1609. .van-checkbox__label {
  1610. color: #646566 !important;
  1611. }
  1612. .van-checkbox__label--disabled {
  1613. color: #c8c9cc !important;
  1614. }
  1615. </style>