weekEdit.vue 86 KB

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