update.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. <template>
  2. <view>
  3. <!-- 顶部 -->
  4. <cu-custom bgColor="bg-blue" :isBack="true">
  5. <block slot="backText">编辑施工日志</block>
  6. <block slot="content"></block>
  7. <block slot="right">
  8. <view class=" flex justify-center">
  9. <template v-if="dateList[0].taskStatus == '0' || dateList[0].taskStatus == '1'">
  10. <button @click="repeal()" class="margin-top-ssm cu-btn line-blue round text-white" style="width: 130rpx;height: 66rpx;padding: 0;">废除</button>
  11. </template>
  12. <template v-else>
  13. <button @click="save(2)" class="margin-top-ssm cu-btn line-blue round text-white" style="width: 130rpx;height: 66rpx;padding: 0;">上报</button>
  14. </template>
  15. <!-- <button @click="save()" class="margin-top-ssm cu-btn line-blue round text-white" style="width: 160rpx;height: 66rpx;padding: 0;">保存</button> -->
  16. <button class="margin-top-ssm cu-btn round line-blue text-white">
  17. <button class="cu-btn line-blue " style="padding:0 20rpx 0 10rpx" @click="save(1)">
  18. <text class="text-white">预览</text>
  19. </button>
  20. <template v-if="!(dateList[0].taskStatus == '0' || dateList[0].taskStatus == '1')">
  21. <text class="bg-white" style="width: 1rpx;height: 30rpx;"></text>
  22. <button class=" cu-btn line-blue " style="padding:0 10rpx 0 20rpx" @click="save()">
  23. <text class="text-white">保存</text>
  24. </button>
  25. </template>
  26. </button>
  27. </view>
  28. </block>
  29. </cu-custom>
  30. <!-- 项目合同段信息 -->
  31. <!-- <view style="background-color: #fff;padding: 22rpx;margin-bottom: 20rpx;">
  32. <view style="font-size: 30rpx;color: #101010;font-weight: bold;">{{project.project_name}}</view>
  33. <view style="font-size: 28rpx;color: #101010;margin-top: 10rpx;">{{project.contractName}}</view>
  34. </view> -->
  35. <view v-for="(data,cur) in dateList" :key="cur" class="bg-white">
  36. <view class="cu-form-group_1 flex justify-between">
  37. <view>
  38. <text class="title">日志{{cur+1}}</text>
  39. <button class="cu-btn round sm margin-left-sm" v-if="!(data.taskStatus==0 || data.taskStatus==1)" @click="addNow(cur)">复制当前</button>
  40. </view>
  41. <button class="cu-btn round sm" @click="delOne(cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)&&(cur != 0)">删除</button>
  42. </view>
  43. <template v-if="isZJ">
  44. <form>
  45. <view class="cu-form-group_1">
  46. <view class="title">施工日期</view>
  47. <input placeholder-style="color:#AEAEAE" placeholder="请输入" disabled="" v-model="data.date" name="input"></input>
  48. </view>
  49. <!-- <view class="cu-form-group_1">
  50. <view class="title" style="width: 260rpx;">检测,记录日期</view>
  51. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.jzWorkDate" name="input"></input>
  52. </view> -->
  53. <view class="cu-form-group_1">
  54. <view class="title">复查日期</view>
  55. <picker mode="date" :value="data.jzWorkDate" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" @change="bindDateChange($event,cur)" style="width: 100%;padding-left: 36rpx;">
  56. <view style="color: rgb(138, 138, 138);">{{data.jzWorkDate}}</view>
  57. </picker>
  58. </view>
  59. <view class="cu-form-group_1">
  60. <view class="title">天气</view>
  61. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.weather" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  62. </view>
  63. <view class="cu-form-group_1">
  64. <view class="title">最低气温</view>
  65. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.minimumTemperature" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  66. </view>
  67. <view class="cu-form-group_1">
  68. <view class="title">最高气温</view>
  69. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.highestTemperature" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  70. </view>
  71. <view class="cu-form-group_1">
  72. <view class="title">编号</view>
  73. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.jzNumber" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  74. </view>
  75. </form>
  76. <form>
  77. <view class="cu-form-group_2">
  78. <view class="title">单位工程</view>
  79. <view>
  80. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.unitProject" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  81. </view>
  82. </view>
  83. <view class="cu-form-group_2">
  84. <view class="title">分项工程</view>
  85. <view>
  86. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.processName" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  87. </view>
  88. </view>
  89. <view class="cu-form-group_2">
  90. <view class="title">分部工程</view>
  91. <view>
  92. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.subproject" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  93. </view>
  94. </view>
  95. <view class="cu-form-group_2">
  96. <view class="title">桩号、部位</view>
  97. <view>
  98. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.buildParts" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  99. </view>
  100. </view>
  101. <view class="cu-form-group_2">
  102. <view class="title flex justify-between">
  103. <text>关联工序</text>
  104. <button class="cu-btn round line-blue sm" v-if="!(data.taskStatus==0 || data.taskStatus==1)" @click="toSelectProcess(cur)" style="font-size: 26rpx;">
  105. <text class="cuIcon-add"></text>新增
  106. </button>
  107. </view>
  108. <view>
  109. <view class="text-gray" v-if="data.processList && data.processList.length < 1">可多选,添加关联工序后可在资料填报页面查看关联的施工日志</view>
  110. <template v-else>
  111. <view v-for="(process,index) in data.processList" :key="process.id" style="margin-bottom: 10rpx;">
  112. <text class="text-gray process-line" style="position: relative;">{{process.pathName || process.name}}
  113. <image src="/static/index/delete-blue.png" style="width: 32rpx;height: 32rpx;position: absolute;bottom: 0;" @click="deleProcess(index,cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)"></image>
  114. </text>
  115. <!-- <text class="text-blue cuIcon-roundclose" style="margin-left: 6rpx;font-size: 32rpx;font-weight: bold;top: 4rpx;position: relative;" @click="deleProcess(index)"></text> -->
  116. </view>
  117. </template>
  118. </view>
  119. </view>
  120. <view class="cu-form-group_2">
  121. <view class="title">重要记事</view>
  122. <view>
  123. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.importantEvents" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  124. </view>
  125. </view>
  126. <view class="cu-form-group_2">
  127. <view class="title">质量检查</view>
  128. <view>
  129. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.qualityInspection" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  130. </view>
  131. </view>
  132. <view class="cu-form-group_2">
  133. <view class="title">施工技术交底</view>
  134. <view>
  135. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.zjBuild" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  136. </view>
  137. </view>
  138. <view class="cu-form-group_2">
  139. <view class="title">安全技术交底</view>
  140. <view>
  141. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.security" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  142. </view>
  143. </view>
  144. </form>
  145. </template>
  146. <template v-else-if="isCQ">
  147. <form>
  148. <view class="cu-form-group_1">
  149. <view class="title">日期</view>
  150. <input placeholder-style="color:#AEAEAE" placeholder="请输入" disabled="" v-model="data.date" name="input"></input>
  151. </view>
  152. <view class="cu-form-group_1">
  153. <view class="title">天气</view>
  154. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.weather" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  155. </view>
  156. <view class="cu-form-group_1">
  157. <view class="title">气温</view>
  158. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.averageTemperature" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  159. </view>
  160. <view class="cu-form-group_2">
  161. <view class="title flex justify-between">
  162. <text>关联工序</text>
  163. <button class="cu-btn round line-blue sm" @click="toSelectProcess(cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)" style="font-size: 26rpx;">
  164. <text class="cuIcon-add"></text>新增
  165. </button>
  166. </view>
  167. <view>
  168. <view class="text-gray" v-if="data.processList && data.processList.length < 1">可多选,添加关联工序后可在资料填报页面查看关联的施工日志</view>
  169. <template v-else>
  170. <view v-for="(process,index) in data.processList" :key="process.id" style="margin-bottom: 10rpx;">
  171. <text class="text-gray process-line" style="position: relative;">{{process.pathName || process.name}}
  172. <image src="/static/index/delete-blue.png" style="width: 32rpx;height: 32rpx;position: absolute;bottom: 0;" @click="deleProcess(index,cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)"></image>
  173. </text>
  174. <!-- <text class="text-blue cuIcon-roundclose" style="margin-left: 6rpx;font-size: 32rpx;font-weight: bold;top: 4rpx;position: relative;" @click="deleProcess(index)"></text> -->
  175. </view>
  176. </template>
  177. </view>
  178. </view>
  179. <view class="cu-form-group_1">
  180. <view class="title">编号</view>
  181. <view>
  182. <input placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.jzNumber" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></input>
  183. </view>
  184. </view>
  185. <view class="cu-form-group_1">
  186. <view class="title">工程桩号</view>
  187. <view>
  188. <input placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.buildParts" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></input>
  189. </view>
  190. </view>
  191. <view class="cu-form-group_1">
  192. <view class="title">工程部位</view>
  193. <view>
  194. <input placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.unitProject" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></input>
  195. </view>
  196. </view>
  197. <view class="cu-form-group_2">
  198. <view class="title">请描述当前施工情况、持续时间、工程完成情况、存在问题及处理情况,工程验收与变更及试验等</view>
  199. <view>
  200. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" placeholder="请描述当前施工情况、持续时间、工程完成情况、存在问题及处理情况,工程验收与变更及试验等" v-model="data.problem" :disabled="(data.taskStatus==0)||(data.taskStatus==1)"></textarea>
  201. </view>
  202. </view>
  203. <view v-for="(people,index) in data.constructionPeopleList" :key="index">
  204. <view class="cu-form-group_1 group-mar">
  205. <view class="title">工种</view>
  206. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.federationOfTradeUnions" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  207. </view>
  208. <view class="cu-form-group_1 group-mar">
  209. <view class="title">作业部位</view>
  210. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.workSite" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  211. </view>
  212. <view class="cu-form-group_1 group-mar">
  213. <view class="title">数量</view>
  214. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.number" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  215. </view>
  216. <view class="cu-form-group_1 group-mar">
  217. <view class="title">作业部位</view>
  218. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.workSiteTwo" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  219. </view>
  220. <view class="cu-form-group_1 group-mar">
  221. <view class="title">数量</view>
  222. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.numberTwo" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  223. </view>
  224. <view class="cu-form-group_1 group-mar">
  225. <view class="title">总数</view>
  226. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="people.sum" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  227. </view>
  228. </view>
  229. <view class="cu-form-group_1">
  230. <view class="title">总计</view>
  231. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.total" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  232. </view>
  233. <view class="cu-form-group_2">
  234. <view v-for="(device,index) in data.constructionEquipmentList" :key="index">
  235. <view class="title flex justify-between">
  236. <text>设备信息</text>
  237. <template v-if="!((data.taskStatus==0)||(data.taskStatus==1))">
  238. <template v-if="index == 0">
  239. <button class="cu-btn round line-blue sm" @click="addNewInfo(data.constructionEquipmentList)" v-if="data.constructionEquipmentList.length < 5" style="font-size: 26rpx;">
  240. <text class="cuIcon-add"></text>新增
  241. </button>
  242. <button class="cu-btn round line-blue sm" @click="deleInfo(data.constructionEquipmentList,index)" v-else style="font-size: 26rpx;">
  243. <text class="cuIcon-roundclose"></text>删除
  244. </button>
  245. </template>
  246. <template v-else>
  247. <button class="cu-btn round line-blue sm" @click="deleInfo(data.constructionEquipmentList,index)" style="font-size: 26rpx;">
  248. <text class="cuIcon-roundclose"></text>删除
  249. </button>
  250. </template>
  251. </template>
  252. </view>
  253. <view>
  254. <view class="cu-form-group_1 group-mar">
  255. <view class="title">主要设备</view>
  256. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.primaryDeviceName" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  257. </view>
  258. <view class="cu-form-group_1 group-mar">
  259. <view class="title">型号</view>
  260. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.model" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  261. </view>
  262. <view class="cu-form-group_1 group-mar">
  263. <view class="title">在场数量</view>
  264. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.numberOfPeoplePresent" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  265. </view>
  266. <view class="cu-form-group_1 group-mar">
  267. <view class="title">工作数量</view>
  268. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.numberOfJobs" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  269. </view>
  270. <view class="cu-form-group_1 group-mar">
  271. <view class="title">停置数量</view>
  272. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.numberOfStops" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  273. </view>
  274. <view class="cu-form-group_1 group-mar">
  275. <view class="title">停止原因</view>
  276. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.stopReason" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  277. </view>
  278. <view class="cu-form-group_1 group-mar">
  279. <view class="title">备注</view>
  280. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="device.remark" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  281. </view>
  282. </view>
  283. </view>
  284. </view>
  285. <view class="cu-form-group_2">
  286. <view class="title">质量安全</view>
  287. <view>
  288. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.quality" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  289. </view>
  290. </view>
  291. <view class="cu-form-group_2">
  292. <view class="title">材料进场与试验情况</view>
  293. <view>
  294. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.entrance" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  295. </view>
  296. </view>
  297. </form>
  298. </template>
  299. <template v-else-if="isTH">
  300. <form>
  301. <view class="cu-form-group_1">
  302. <view class="title">日期</view>
  303. <input placeholder-style="color:#AEAEAE" placeholder="请输入" disabled="" v-model="data.date" name="input"></input>
  304. </view>
  305. <view class="cu-form-group_1">
  306. <view class="title">天气</view>
  307. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.weather" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  308. </view>
  309. <view class="cu-form-group_1">
  310. <view class="title">平均气温</view>
  311. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.averageTemperature" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  312. </view>
  313. </form>
  314. <form>
  315. <view class="cu-form-group_2">
  316. <view class="title">工程部位</view>
  317. <view>
  318. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.processName" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  319. </view>
  320. </view>
  321. <view class="cu-form-group_2">
  322. <view class="title flex justify-between">
  323. <text>关联工序</text>
  324. <button class="cu-btn round line-blue sm" @click="toSelectProcess(cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)" style="font-size: 26rpx;">
  325. <text class="cuIcon-add"></text>新增
  326. </button>
  327. </view>
  328. <view>
  329. <view class="text-gray" v-if="data.processList && data.processList.length < 1">可多选,添加关联工序后可在资料填报页面查看关联的施工日志</view>
  330. <template v-else>
  331. <view v-for="(process,index) in data.processList" :key="process.id" style="margin-bottom: 10rpx;">
  332. <text class="text-gray process-line" style="position: relative;">{{process.pathName || process.name}}
  333. <image src="/static/index/delete-blue.png" style="width: 32rpx;height: 32rpx;position: absolute;bottom: 0;" @click="deleProcess(index,cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)"></image>
  334. </text>
  335. <!-- <text class="text-blue cuIcon-roundclose" style="margin-left: 6rpx;font-size: 32rpx;font-weight: bold;top: 4rpx;position: relative;" @click="deleProcess(index)"></text> -->
  336. </view>
  337. </template>
  338. </view>
  339. </view>
  340. <view class="cu-form-group_2">
  341. <view class="title">施工部位及内容/人员设备情况/劳务工种及人数</view>
  342. <view>
  343. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.buildContent" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  344. </view>
  345. </view>
  346. <view class="cu-form-group_1">
  347. <view class="title">工班长</view>
  348. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.monitor" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  349. </view>
  350. <view class="cu-form-group_2">
  351. <view class="title">设计施工图内容</view>
  352. <view>
  353. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.designContent" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  354. </view>
  355. </view>
  356. <view class="cu-form-group_2">
  357. <view class="title">技术及安全交底</view>
  358. <view>
  359. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.technologySecurity" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  360. </view>
  361. </view>
  362. <view class="cu-form-group_2">
  363. <view class="title">测量及试验情况</view>
  364. <view>
  365. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.measurement" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  366. </view>
  367. </view>
  368. <view class="cu-form-group_2">
  369. <view class="title">检查及验收情况</view>
  370. <view>
  371. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.acceptance" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  372. </view>
  373. </view>
  374. <view class="cu-form-group_2">
  375. <view class="title">质量及安全施工情况</view>
  376. <view>
  377. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.quality" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  378. </view>
  379. </view>
  380. <view class="cu-form-group_2">
  381. <view class="title">材料构件设备进场情况</view>
  382. <view>
  383. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.entrance" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  384. </view>
  385. </view>
  386. <view class="cu-form-group_2">
  387. <view class="title">存在问题及其他</view>
  388. <view>
  389. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.problem" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  390. </view>
  391. </view>
  392. </form>
  393. </template>
  394. <template v-else>
  395. <form>
  396. <view class="cu-form-group_1">
  397. <view class="title">日期</view>
  398. <input placeholder-style="color:#AEAEAE" placeholder="请输入" disabled="" v-model="data.date" name="input"></input>
  399. </view>
  400. <view class="cu-form-group_1">
  401. <view class="title">天气</view>
  402. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.weather" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  403. </view>
  404. <view class="cu-form-group_1">
  405. <view class="title">平均气温</view>
  406. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.averageTemperature" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  407. </view>
  408. </form>
  409. <form>
  410. <view class="cu-form-group_2">
  411. <view class="title">分项工程</view>
  412. <view>
  413. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.processName" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  414. </view>
  415. </view>
  416. <view class="cu-form-group_2">
  417. <view class="title">施工部位</view>
  418. <view>
  419. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.buildParts" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  420. </view>
  421. </view>
  422. <view class="cu-form-group_2">
  423. <view class="title flex justify-between">
  424. <text>关联工序</text>
  425. <button class="cu-btn round line-blue sm" @click="toSelectProcess(cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)" style="font-size: 26rpx;">
  426. <text class="cuIcon-add"></text>新增
  427. </button>
  428. </view>
  429. <view>
  430. <view class="text-gray" v-if="data.processList && data.processList.length < 1">可多选,添加关联工序后可在资料填报页面查看关联的施工日志</view>
  431. <template v-else>
  432. <view v-for="(process,index) in data.processList" :key="process.id" style="margin-bottom: 10rpx;">
  433. <text class="text-gray process-line" style="position: relative;">{{process.pathName || process.name}}
  434. <image src="/static/index/delete-blue.png" style="width: 32rpx;height: 32rpx;position: absolute;bottom: 0;" @click="deleProcess(index,cur)" v-if="!(data.taskStatus==0 || data.taskStatus==1)"></image>
  435. </text>
  436. <!-- <text class="text-blue cuIcon-roundclose" style="margin-left: 6rpx;font-size: 32rpx;font-weight: bold;top: 4rpx;position: relative;" @click="deleProcess(index)"></text> -->
  437. </view>
  438. </template>
  439. </view>
  440. </view>
  441. <view class="cu-form-group_2">
  442. <view class="title">施工内容</view>
  443. <view>
  444. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.buildContent" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  445. </view>
  446. </view>
  447. <view class="cu-form-group_2">
  448. <view class="title">人员设备情况/劳务工种及人数</view>
  449. <view>
  450. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.peopleAndFacility" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  451. </view>
  452. </view>
  453. <view class="cu-form-group_1">
  454. <view class="title">工班长</view>
  455. <input placeholder-style="color:#AEAEAE" placeholder="请输入" v-model="data.monitor" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" name="input"></input>
  456. </view>
  457. <view class="cu-form-group_2">
  458. <view class="title">设计施工图内容</view>
  459. <view>
  460. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.designContent" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  461. </view>
  462. </view>
  463. <view class="cu-form-group_2">
  464. <view class="title">技术及安全交底</view>
  465. <view>
  466. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.technologySecurity" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  467. </view>
  468. </view>
  469. <view class="cu-form-group_2">
  470. <view class="title">测量及试验情况</view>
  471. <view>
  472. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.measurement" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  473. </view>
  474. </view>
  475. <view class="cu-form-group_2">
  476. <view class="title">检查及验收情况</view>
  477. <view>
  478. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.acceptance" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  479. </view>
  480. </view>
  481. <view class="cu-form-group_2">
  482. <view class="title">质量及安全施工情况</view>
  483. <view>
  484. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.quality" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  485. </view>
  486. </view>
  487. <view class="cu-form-group_2">
  488. <view class="title">材料构件设备进场情况</view>
  489. <view>
  490. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.entrance" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  491. </view>
  492. </view>
  493. <view class="cu-form-group_2">
  494. <view class="title">存在问题及其他</view>
  495. <view>
  496. <textarea placeholder-style="color:#AEAEAE" maxlength="-1" v-model="data.problem" :disabled="(data.taskStatus==0)||(data.taskStatus==1)" placeholder="请输入"></textarea>
  497. </view>
  498. </view>
  499. </form>
  500. </template>
  501. </view>
  502. <view class="cu-bar bg-white tabbar" style="border: none;"></view>
  503. <view class="cu-bar bg-white tabbar border shop" style="position: fixed;bottom: 0;left: 0;width: 100%;border-top: 1rpx solid #EAEAEA;">
  504. <view class="flex solid-bottom padding justify-between" style="width: 100%;">
  505. <text></text>
  506. <button class="cu-btn round" @click="addOne" v-if="!(dateList[0].taskStatus == '0' || dateList[0].taskStatus == '1')">新增</button>
  507. </view>
  508. </view>
  509. <!-- <form>
  510. <view class="cu-form-group_1" @click="navTo(2)" style="justify-content: space-between;">
  511. <view class="title">监理员</view>
  512. <input placeholder-style="color:#AEAEAE" placeholder="请选择" v-model="data.supervisionWorker" disabled="" style="width: 520rpx;"></input>
  513. <text class='cuIcon-right'></text>
  514. </view>
  515. <view class="cu-form-group_1" @click="navTo(1)" style="justify-content: space-between;">
  516. <view class="title">施工员</view>
  517. <input placeholder-style="color:#AEAEAE" placeholder="请选择" v-model="data.constructionWorker" disabled="" style="width: 520rpx;"></input>
  518. <text class='cuIcon-right'></text>
  519. </view>
  520. </form> -->
  521. <!-- 时间弹窗 -->
  522. <view class="cu-modal bottom-modal" :class="modalShow?'show':''" >
  523. <view class="cu-dialog" style="background-color: white;border-radius: 20rpx 20rpx 0 0;">
  524. <view class="cu-bar bg-white">
  525. <view class="action text-gray"></view>
  526. <view class="action text-black text-bold" style="color: #101010;">选择时间</view>
  527. <view class="action text-gray" @tap="showdialog()">取消</view>
  528. </view>
  529. <view style="padding-bottom: 10rpx;">
  530. <calendar @selected-change="datechange" :showBack="false" :dotStyle="dotStyle"></calendar>
  531. </view>
  532. </view>
  533. </view>
  534. </view>
  535. </template>
  536. <script>
  537. export default {
  538. data() {
  539. return {
  540. dotStyle:{color: 'black'},
  541. project:"",
  542. time:"",
  543. constructionList:[],
  544. supervisionList:[],
  545. modalShow:false,
  546. // data:{
  547. // },
  548. dateList:[{
  549. pageNumber:1,
  550. recorderId:uni.getStorageSync("userInfo").id,
  551. contractId:uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id).contractId,
  552. processList:[],
  553. constructionPeopleList:[{},{},{}],
  554. constructionEquipmentList:[{}],
  555. }],
  556. curIndex:0,
  557. rules:[
  558. {name: 'date', required: true, type: 'required', errmsg: '请填写填报日期'},
  559. {name: 'averageTemperature', required: true, type: 'required', errmsg: '请填写平均气温'},
  560. {name: 'weather', required: true, type: 'required', errmsg: '请填写天气'},
  561. {name: 'startTime', required: true, type: 'required', errmsg: '请填写开工时间'},
  562. {name: 'itemName', required: true, type: 'required', errmsg: '请填写工程名称'},
  563. {name: 'site', required: true, type: 'required', errmsg: '请填写施工部位'},
  564. {name: 'orgPlan', required: true, type: 'required', errmsg: '请填写施工组织计划'},
  565. {name: 'safetyDegree', required: true, type: 'required', errmsg: '请填写安全交底'},
  566. {name: 'technologyDegree', required: true, type: 'required', errmsg: '请填写技术交底'},
  567. {name: 'releaseTask', required: true, type: 'required', errmsg: '请填写下达施工任务'},
  568. {name: 'importantNote', required: true, type: 'required', errmsg: '请填写重记事'},
  569. {name: 'supervisionWorker', required: true, type: 'required', errmsg: '请选择监理员'},
  570. {name: 'constructionWorker', required: true, type: 'required', errmsg: '请填写施工员'},
  571. ],
  572. updateOrInsert:0,//0为新增 , 1为编辑
  573. upId:null,
  574. // processList:[],
  575. isZJ:0,
  576. isCQ:false,
  577. isTH:false,
  578. contractId : uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id).contractId,
  579. project:uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id),
  580. recorderId:uni.getStorageSync("userInfo").id,
  581. }
  582. },
  583. onLoad(e) {
  584. this.dateList[0].date = e.time;
  585. this.dateList[0].jzWorkDate = e.time;
  586. this.project= uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id);
  587. this.updateOrInsert=e.type;
  588. this.upId = e.id;
  589. if(this.project.id == 'fa7d50a0c01a4a568f123bff0d91' || this.project.id == 'a140fd60f08941e8851d90e86960'){
  590. this.isCQ = true;
  591. }
  592. if(this.project.id == 'fe2655f6012a41148ee39209c405'){
  593. this.isTH = true;
  594. }
  595. if(this.updateOrInsert==1){//获取日志信息进行绑定
  596. //this.findData(this.upId);
  597. this.getDataByDate(e.time);
  598. }else{
  599. //获取合同段的地址,根据地址获取温度和天气
  600. var that =this;
  601. var cityName = uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id).project_place;
  602. console.log(that.project)
  603. that.http.request("/app/diary/getWeather",{
  604. projectId:that.project.id,
  605. contractId:that.contractId,
  606. date:e.time
  607. }).then((res)=>{
  608. that.$set(that.dateList[0],'averageTemperature',res.tempSection);
  609. let arr = res.tempSection.split('~');
  610. if(arr.length == 2){
  611. that.$set(that.dateList[0], 'minimumTemperature', arr[0]);
  612. that.$set(that.dateList[0], 'highestTemperature', arr[1]);
  613. }
  614. that.$set(that.dateList[0], 'weather', res.weather);
  615. //that.data.averageTemperature =res.tempSection;
  616. //that.data.weather = res.weather
  617. })
  618. }
  619. this.getIsZJ();
  620. //监听选择工序
  621. uni.$on('selectProcess',this.selectProcess)
  622. uni.$on('report',this.reportSuccess)
  623. },
  624. onUnload(){
  625. uni.$off('selectProcess',this.selectProcess)
  626. uni.$off('report',this.reportSuccess)
  627. },
  628. methods: {
  629. showdialog(){
  630. this.modalShow= !this.modalShow;
  631. },
  632. datechange(e) {
  633. this.data.startTime=e.fullDate
  634. this.showdialog();
  635. },
  636. navTo(value){
  637. uni.navigateTo({
  638. url:"/pages/constructionLog/personnel/personnel?type="+value
  639. })
  640. },
  641. //获取该日志的数据,编辑
  642. findData(id){
  643. var that =this;
  644. that.http.request('/app/working/getDataById', {id:id}).then((result)=>{
  645. that.data = result.data;
  646. if(that.data.proList){
  647. that.processList = that.data.proList;
  648. }
  649. that.$delete(that.data,'prefix');
  650. })
  651. },
  652. // save(){
  653. // var that =this;
  654. // /* let result= that.$formValidate.validate(this.data,this.rules)//表单验证
  655. // if(result.isOk){ */
  656. // let param =that.data;
  657. // param.contractId= this.project.contractId;
  658. // param.creator= uni.getStorageSync("userInfo").id;
  659. // param.state= that.data.state==null ? 0 : that.data.state;
  660. // param.deleted= that.data.deleted==null ? 0 : that.data.deleted;
  661. // param.createTime=new Date();
  662. // that.http.request('/app/diary/addOrUpdate', param).then((result)=>{
  663. // if(result.result=="1"){
  664. // that.$prompt.none(result.msg);
  665. // setTimeout(function(){
  666. // uni.navigateBack({
  667. // delta:1
  668. // })
  669. // },500)
  670. // }else{
  671. // that.$prompt.Error("保存失败");
  672. // }
  673. // })
  674. // /* }else{
  675. // that.$prompt.none(result.errmsg)
  676. // } */
  677. // }
  678. save(type){
  679. if(!this.verification()){
  680. uni.showToast({
  681. title: '每份日志至少要填写一项内容',
  682. icon:'none',
  683. duration: 2000
  684. });
  685. return;
  686. }
  687. var isjzWorkDate = true;
  688. //this.data.contractId = this.project.contractId;
  689. //this.data.recorderId = uni.getStorageSync("userInfo").id;
  690. for (let j=0; j < this.dateList.length; j++){
  691. let arr = [];
  692. if(this.dateList[j].processList){
  693. for (let i = 0; i < this.dateList[j].processList.length; i++) {
  694. arr.push(this.dateList[j].processList[i].id);
  695. }
  696. }
  697. this.dateList[j].processId = arr.join(',');
  698. if(this.isZJ && !this.dateList[j].jzWorkDate){
  699. isjzWorkDate = false;
  700. }
  701. }
  702. if(this.isZJ && !isjzWorkDate){
  703. uni.showToast({
  704. title: '每份日志都要填写复查日期',
  705. icon:'none',
  706. duration: 2000
  707. });
  708. return;
  709. }
  710. //this.http.request('/app/working/addEntity.json',JSON.stringify(this.dateList),1).then((res)=>{
  711. this.http.request('/app/working/addEntity.json',{voStr:JSON.stringify(this.dateList),storeName:uni.getStorageSync("storeName")}).then((res)=>{
  712. if(res.result=="1"){
  713. let urlArr = [];
  714. for (let i = 0; i < res.datas.length; i++) {
  715. this.dateList[i].id = res.datas[i].id;
  716. this.dateList[i].outUrl = res.datas[i].outUrl;
  717. urlArr.push(res.datas[i].outUrl);
  718. }
  719. this.$prompt.none(res.msg);
  720. setTimeout(()=>{
  721. if(type == 1){
  722. //跳去预览
  723. uni.navigateTo({
  724. url: "/pages/view/preview/preview?previews=" + urlArr.join(',')
  725. })
  726. }else if(type == 2){
  727. getApp().globalData.diary = res.datas[0];
  728. uni.navigateTo({
  729. url:"/pages/dataReport/dailyReport?urlName="+"working"+"&isZJ="+this.isZJ
  730. })
  731. }else{
  732. uni.navigateBack({
  733. delta:1
  734. })
  735. }
  736. },500)
  737. }else{
  738. this.$prompt.Error("保存失败,"+res.msg);
  739. }
  740. })
  741. },
  742. //跳转选择工序
  743. toSelectProcess(index){
  744. this.curIndex = index;
  745. uni.navigateTo({
  746. url:"/pages/constructionLog2/selectProcess/selectProcess"
  747. })
  748. },
  749. //选择工序
  750. selectProcess(process){
  751. //console.log(process);
  752. //console.log(this.dateList[this.curIndex]);
  753. if(!this.dateList[this.curIndex].processList){
  754. this.dateList[this.curIndex].processList = [];
  755. }
  756. this.dateList[this.curIndex].processList.push(process);
  757. },
  758. //移除工序
  759. deleProcess(index,curIndex){
  760. this.dateList[curIndex].processList.splice(index,1);
  761. },
  762. verification(){
  763. let verify = true;
  764. if(this.isZJ){
  765. for (let i = 0; i < this.dateList.length; i++) {
  766. if(!this.dateList[i].jzWorkDate && !this.dateList[i].unitProject &&
  767. !(this.dateList[i].processList && this.dateList[i].processList.length > 0) && !this.dateList[i].processName && !this.dateList[i].subproject && !this.dateList[i].buildParts && !this.dateList[i].importantEvents && !this.dateList[i].qualityInspection && !this.dateList[i].zjBuild && !this.dateList[i].security
  768. ){
  769. verify = false;
  770. }else{
  771. verify = true;
  772. }
  773. }
  774. }else if(this.isCQ){
  775. verify = true;
  776. }else if(this.isTH){
  777. for (let i = 0; i < this.dateList.length; i++) {
  778. if(!this.dateList[i].processName &&
  779. !(this.dateList[i].processList && this.dateList[i].processList.length > 0) && !this.dateList[i].buildContent &&
  780. !this.dateList[i].monitor && !this.dateList[i].designContent &&
  781. !this.dateList[i].technologySecurity && !this.dateList[i].measurement &&
  782. !this.dateList[i].acceptance && !this.dateList[i].quality && !this.dateList[i].entrance &&
  783. !this.dateList[i].problem
  784. ){
  785. verify = false;
  786. }else{
  787. verify = true;
  788. }
  789. }
  790. }else{
  791. for (let i = 0; i < this.dateList.length; i++) {
  792. if(!this.dateList[i].processName && !this.dateList[i].buildParts &&
  793. !(this.dateList[i].processList && this.dateList[i].processList.length > 0) && !this.dateList[i].buildContent &&
  794. !this.dateList[i].peopleAndFacility && !this.dateList[i].monitor && !this.dateList[i].designContent &&
  795. !this.dateList[i].technologySecurity && !this.dateList[i].measurement &&
  796. !this.dateList[i].acceptance && !this.dateList[i].quality && !this.dateList[i].entrance &&
  797. !this.dateList[i].problem
  798. ){
  799. verify = false;
  800. }else{
  801. verify = true;
  802. }
  803. }
  804. }
  805. return verify
  806. },
  807. addOne(){
  808. let constructionPeopleList = null;
  809. let constructionEquipmentList = null;
  810. if(this.isCQ){
  811. constructionPeopleList=[{},{},{}];
  812. constructionEquipmentList=[{}];
  813. }
  814. this.dateList.push({
  815. date:this.dateList[0].date,//日期
  816. jzWorkDate:this.dateList[0].jzWorkDate,
  817. weather:this.dateList[0].weather,//天气
  818. averageTemperature:this.dateList[0].averageTemperature,//
  819. minimumTemperature:this.dateList[0].minimumTemperature,//
  820. highestTemperature:this.dateList[0].highestTemperature,//
  821. zj:this.isZJ,
  822. pageNumber:this.dateList[this.dateList.length-1].pageNumber+1,
  823. processList:[],
  824. recorderId:this.dateList[0].recorderId,
  825. contractId:this.dateList[0].contractId,
  826. constructionPeopleList:constructionPeopleList,
  827. constructionEquipmentList:constructionEquipmentList
  828. })
  829. },
  830. addNow(index){
  831. let addObj = Object.assign({},this.dateList[index]);
  832. addObj.pageNumber = addObj.pageNumber+1;
  833. if(addObj.processList){
  834. addObj.processList = [].concat(addObj.processList);
  835. }
  836. addObj.id = '';
  837. if(this.isCQ){
  838. let arr = [];
  839. addObj.constructionPeopleList.forEach(element => {
  840. arr.push(Object.assign({},element));
  841. })
  842. addObj.constructionPeopleList = arr;
  843. let arr2 = [];
  844. addObj.constructionEquipmentList.forEach(element => {
  845. arr2.push(Object.assign({},element));
  846. })
  847. addObj.constructionEquipmentList = arr2;
  848. }
  849. for (let i = index+1; i < this.dateList.length; i++) {
  850. this.dateList[i].pageNumber += 1;
  851. }
  852. //console.log(addObj)
  853. this.dateList.splice(index+1,0,addObj);
  854. //console.log(this.dateList)
  855. },
  856. delOne(index){
  857. uni.showModal({
  858. title: '删除',
  859. content: '是否删除 日志'+(index+1)+' ?'+'删除后无法还原',
  860. success:(res) => {
  861. if (res.confirm) {
  862. //console.log('用户点击确定');
  863. //没保存过直接删
  864. if(!this.dateList[index].id){
  865. this.dateList.splice(index,1);
  866. return;
  867. }
  868. //保存过的需要请求
  869. this.http.request('/app/working/del', {
  870. id: this.dateList[index].id,
  871. }).then((result) => {
  872. if(result.result ==1){
  873. this.dateList.splice(index,1);
  874. }else{
  875. this.$prompt.Error("删除失败");
  876. }
  877. })
  878. } else if (res.cancel) {
  879. //console.log('用户点击取消');
  880. }
  881. }
  882. });
  883. },
  884. getDataByDate(date){
  885. this.http.request('/app/working/getDataByDate', {
  886. date: date,
  887. recorderId:this.recorderId,
  888. contractId:this.contractId,
  889. }).then((result) => {
  890. if(result.result ==1){
  891. if(result.datas){
  892. for (let i = 0; i < result.datas.length; i++) {
  893. result.datas[i].contractId = this.contractId;
  894. result.datas[i].processList = result.datas[i].proList;
  895. }
  896. this.dateList =result.datas;
  897. }else{
  898. this.$prompt.Error(result.msg);
  899. }
  900. }else{
  901. this.$prompt.Error(result.msg);
  902. }
  903. })
  904. },
  905. getPageNumber(){
  906. let max = 1;
  907. for (let i = 0; i < this.dateList.length; i++) {
  908. if(this.dateList[i].pageNumber > max){
  909. max = this.dateList[i].pageNumber;
  910. }
  911. }
  912. return max+1;
  913. },
  914. bindDateChange(e,index){
  915. this.dateList[index].jzWorkDate = e.detail.value;
  916. },
  917. getIsZJ(){
  918. this.http.request('/app/working/checkProjectIsZj', {
  919. projectId:this.project.id
  920. }).then((result)=>{
  921. if(result.result == '1'){
  922. this.isZJ = 1;
  923. this.dateList[0].zj = 1;
  924. }else{
  925. this.isZJ = 0;
  926. this.dateList[0].zj = 0;
  927. }
  928. })
  929. },
  930. addNewInfo(list){
  931. if(list.length>5){
  932. return;
  933. }
  934. list.push({})
  935. },
  936. deleInfo(list,index){
  937. list.splice(index,1);
  938. },
  939. repeal(){
  940. let { account } = uni.getStorageSync('userInfo')
  941. uni.showModal({
  942. title: '废除',
  943. content: '是否废除任务?',
  944. success:(res) => {
  945. if (res.confirm) {
  946. this.http.request('/app/task/repeal', {
  947. taskId: this.dateList[0].taskId,
  948. opUserName: account ? account : '',
  949. }).then((result) => {
  950. console.log(result)
  951. if(result.result ==1){
  952. this.$prompt.none("废除成功");
  953. this.getDataByDate(this.dateList[0].date);
  954. }else{
  955. this.$prompt.Error("废除失败");
  956. }
  957. })
  958. } else if (res.cancel) {
  959. //console.log('用户点击取消');
  960. }
  961. }
  962. });
  963. },
  964. reportSuccess(){
  965. //上报成功,刷新
  966. this.getDataByDate(this.dateList[0].date);
  967. }
  968. },
  969. onShow(){
  970. /* 监听选择施工人员页面的handleFun方法 */
  971. // uni.$on("handleFun", res => {
  972. // this.data.constructionWorker="";
  973. // this.constructionList=res;
  974. // res.forEach((item)=>{
  975. // this.data.constructionWorker+=item.user_name
  976. // })
  977. // })
  978. /* 监听选择监理人员页面的handleFun方法 */
  979. // uni.$on("handleFunBy", res => {
  980. // this.data.supervisionWorker="";
  981. // this.supervisionList=res;
  982. // res.forEach((item)=>{
  983. // this.data.supervisionWorker+=item.user_name
  984. // })
  985. // })
  986. },
  987. }
  988. </script>
  989. <style>
  990. .solid-top-type{
  991. border-top: 0px solid #eee;
  992. }
  993. .cu-form-group_1{display: flex;align-items: center;padding:0 22rpx;background-color: #fff;border-bottom: 2rpx solid #EAEAEA;height: 88rpx;}
  994. .cu-form-group_1 .title{font-size: 30rpx;color: #101010;width: 154rpx;}
  995. .cu-form-group_1 input{font-size: 30rpx;color: #8a8a8a;}
  996. .cu-form-group_2{padding: 22rpx;background-color: #fff;border-bottom: 2rpx solid #EAEAEA;}
  997. .cu-form-group_2 .title{font-size: 30rpx;color: #101010;padding-bottom: 18rpx;}
  998. .cu-form-group_2 textarea{font-size: 30rpx;color: #8a8a8a;width: 100%;}
  999. .cu-modal.show {
  1000. overflow-y: auto;
  1001. pointer-events: auto;
  1002. }
  1003. .process-line{
  1004. text-decoration:underline;
  1005. }
  1006. .cuIcon-roundclose:before{
  1007. font-weight: bold;
  1008. }
  1009. .group-mar{padding: 0;margin:0 36rpx;}
  1010. </style>