form.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  1. <template>
  2. <view class="page-container uni-column">
  3. <view class="tab-container">
  4. <view v-for="(item, index) in processInspectionTypeList" :key="index"
  5. :class="{ 'tab-item': true, 'active': isActived === item }">
  6. <text @click="selectedStatus(item)">{{ item.label }}</text>
  7. </view>
  8. </view>
  9. <!-- 交检 -->
  10. <view v-if="isActived.label == '交检' " style="margin-bottom: 130rpx;margin-top: 16px;">
  11. <view class="carrier-info uni-column">
  12. <view class="carrier-code uni-row">
  13. <text>箱号</text>
  14. <text
  15. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].carrierCode}}</text>
  16. <text style="margin-left: 150px;color: aquamarine">交检</text>
  17. </view>
  18. <view class="info-row uni-row">
  19. <view class="label">图号</view>
  20. <view class="value">
  21. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].drawingNumber }}
  22. </view>
  23. </view>
  24. <view class="info-row uni-row">
  25. <view class="label">批次号</view>
  26. <view class="value">
  27. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].lotCode }}
  28. </view>
  29. </view>
  30. <view class="info-row uni-row">
  31. <view class="label">工艺版本</view>
  32. <view class="value">
  33. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].technologyVersion }}
  34. </view>
  35. </view>
  36. <view class="info-row uni-row">
  37. <view class="label">产品描述</view>
  38. <view class="value">
  39. {{inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')]. productDescription }}
  40. </view>
  41. </view>
  42. <view class="info-row uni-row">
  43. <view class="label">当前工序</view>
  44. <view class="value">
  45. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].processAlias }}
  46. </view>
  47. </view>
  48. <view class="info-row uni-row">
  49. <view class="label">操作者</view>
  50. <view class="value">
  51. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].nickName }}
  52. </view>
  53. </view>
  54. <view class="info-row uni-row">
  55. <view class="label">设备</view>
  56. <view class="value">
  57. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].equipmentDetailCode }}
  58. </view>
  59. </view>
  60. <view class="info-row uni-row">
  61. <view class="label">检查载具</view>
  62. <view class="value">
  63. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].inspectionCarrierCode }}
  64. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  65. </view>
  66. </view>
  67. <view class="info-row uni-row">
  68. <view class="drawing-btn"
  69. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')])">
  70. 图纸信息</view>
  71. </view>
  72. </view>
  73. <!-- 废品信息 -->
  74. <view class="title unfit-title uni-row">
  75. <text>检查信息</text>
  76. </view>
  77. <view class="unfit-container">
  78. <view class="unfit-item-container uni-column"
  79. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].processInspectionDetails"
  80. :key="index">
  81. <view class="resu uni-row">
  82. <view class="label">检查标准</view>
  83. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  84. </view>
  85. <view class="resu uni-row">
  86. <view class="label">检查结果</view>
  87. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  88. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  89. </view>
  90. <view class="resu uni-row">
  91. <view class="label">超差范围</view>
  92. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  93. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  94. </view>
  95. <view class="resu uni-row">
  96. <view :class="!editable() ? 'label' : ''">检查量</view>
  97. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  98. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  99. <view :class="!editable() ? 'label' : ''">不良品量</view>
  100. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  101. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 拍照上传部分 -->
  106. <view class="title unfit-title uni-row">
  107. <text>拍照上传</text>
  108. </view>
  109. <view class=" uni-row" style="padding: 24rpx;
  110. margin: 0 16rpx;
  111. background-color: #ffffff;
  112. border-radius: 12rpx;">
  113. <uni-file-picker
  114. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].processInspectionPictureList"
  115. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  116. class="my-files"></uni-file-picker>
  117. </view>
  118. <!-- 咨询部分 -->
  119. <view class="title unfit-title uni-row">
  120. <text>咨询</text>
  121. </view>
  122. <view class="consultation-container uni-column">
  123. <view class="consultation-item-container"
  124. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].dayworkItemConsults"
  125. :key="index">
  126. <view class="question uni-column">
  127. <view class="label uni-row">
  128. <text>问题描述</text>
  129. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  130. {{ selectText(item) }}</text>
  131. </view>
  132. <view class="content">{{ item.content }}</view>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- 报工部分 -->
  137. <view class="daywork-container">
  138. <view class="result uni-row">
  139. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">交检状态</view>
  140. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  141. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].inspectionStatus"
  142. :localdata="range"></uni-data-checkbox>
  143. </view>
  144. <view class="result uni-row">
  145. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  146. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  147. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].status"
  148. :localdata="range"></uni-data-checkbox>
  149. </view>
  150. <view class="remark uni-row">
  151. <view class="label">备注</view>
  152. <textarea v-if="editable()"
  153. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].remark" />
  154. <view v-else class="value">
  155. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'deliveryInspection')].remark }}
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. <!-- 巡检 -->
  161. <view v-if="isActived.label == '巡检' " style="margin-bottom: 130rpx;margin-top: 16px;">
  162. <view class="carrier-info uni-column">
  163. <view class="carrier-code uni-row">
  164. <text>箱号</text>
  165. <text
  166. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].carrierCode}}</text>
  167. <text style="margin-left: 150px;color: aquamarine">巡检</text>
  168. </view>
  169. <view class="info-row uni-row">
  170. <view class="label">图号</view>
  171. <view class="value">
  172. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].drawingNumber }}
  173. </view>
  174. </view>
  175. <view class="info-row uni-row">
  176. <view class="label">批次号</view>
  177. <view class="value">
  178. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].lotCode }}
  179. </view>
  180. </view>
  181. <view class="info-row uni-row">
  182. <view class="label">工艺版本</view>
  183. <view class="value">
  184. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].technologyVersion }}
  185. </view>
  186. </view>
  187. <view class="info-row uni-row">
  188. <view class="label">产品描述</view>
  189. <view class="value">
  190. {{inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')]. productDescription }}
  191. </view>
  192. </view>
  193. <view class="info-row uni-row">
  194. <view class="label">当前工序</view>
  195. <view class="value">
  196. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].processAlias }}
  197. </view>
  198. </view>
  199. <view class="info-row uni-row">
  200. <view class="label">操作者</view>
  201. <view class="value">
  202. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].nickName }}
  203. </view>
  204. </view>
  205. <view class="info-row uni-row">
  206. <view class="label">设备</view>
  207. <view class="value">
  208. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].equipmentDetailCode }}
  209. </view>
  210. </view>
  211. <view class="info-row uni-row">
  212. <view class="label">检查载具</view>
  213. <view class="value">
  214. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].inspectionCarrierCode }}
  215. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  216. </view>
  217. </view>
  218. <view class="info-row uni-row">
  219. <view class="drawing-btn"
  220. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')])">
  221. 图纸信息</view>
  222. </view>
  223. </view>
  224. <!-- 废品信息 -->
  225. <view class="title unfit-title uni-row">
  226. <text>检查信息</text>
  227. </view>
  228. <view class="unfit-container">
  229. <view class="unfit-item-container uni-column"
  230. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].processInspectionDetails"
  231. :key="index">
  232. <view class="resu uni-row">
  233. <view class="label">检查标准</view>
  234. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  235. </view>
  236. <view class="resu uni-row">
  237. <view class="label">检查结果</view>
  238. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  239. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  240. </view>
  241. <view class="resu uni-row">
  242. <view class="label">超差范围</view>
  243. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  244. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  245. </view>
  246. <view class="resu uni-row">
  247. <view :class="!editable() ? 'label' : ''">检查量</view>
  248. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  249. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  250. <view :class="!editable() ? 'label' : ''">不良品量</view>
  251. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  252. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  253. </view>
  254. </view>
  255. </view>
  256. <!-- 拍照上传部分 -->
  257. <view class="title unfit-title uni-row">
  258. <text>拍照上传</text>
  259. </view>
  260. <view class=" uni-row" style="padding: 24rpx;
  261. margin: 0 16rpx;
  262. background-color: #ffffff;
  263. border-radius: 12rpx;">
  264. <uni-file-picker
  265. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].processInspectionPictureList"
  266. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  267. class="my-files"></uni-file-picker>
  268. </view>
  269. <!-- 咨询部分 -->
  270. <view class="title unfit-title uni-row">
  271. <text>咨询</text>
  272. </view>
  273. <view class="consultation-container uni-column">
  274. <view class="consultation-item-container"
  275. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].dayworkItemConsults"
  276. :key="index">
  277. <view class="question uni-column">
  278. <view class="label uni-row">
  279. <text>问题描述</text>
  280. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  281. {{ selectText(item) }}</text>
  282. </view>
  283. <view class="content">{{ item.content }}</view>
  284. </view>
  285. </view>
  286. </view>
  287. <!-- 报工部分 -->
  288. <view class="daywork-container">
  289. <view class="result uni-row">
  290. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">巡检状态</view>
  291. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  292. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].inspectionStatus"
  293. :localdata="range"></uni-data-checkbox>
  294. </view>
  295. <view class="result uni-row">
  296. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  297. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  298. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].status"
  299. :localdata="range"></uni-data-checkbox>
  300. </view>
  301. <view class="remark uni-row">
  302. <view class="label">备注</view>
  303. <textarea v-if="editable()"
  304. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].remark" />
  305. <view v-else class="value">
  306. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'patrolInspection')].remark }}
  307. </view>
  308. </view>
  309. </view>
  310. </view>
  311. <!-- 仪器室 -->
  312. <view v-if="isActived.label == '仪器室' " style="margin-bottom: 130rpx;margin-top: 16px;">
  313. <view class="carrier-info uni-column">
  314. <view class="carrier-code uni-row">
  315. <text>箱号</text>
  316. <text
  317. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].carrierCode}}</text>
  318. <text style="margin-left: 150px;color: aquamarine">仪器室</text>
  319. </view>
  320. <view class="info-row uni-row">
  321. <view class="label">图号</view>
  322. <view class="value">
  323. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].drawingNumber }}
  324. </view>
  325. </view>
  326. <view class="info-row uni-row">
  327. <view class="label">批次号</view>
  328. <view class="value">
  329. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].lotCode }}
  330. </view>
  331. </view>
  332. <view class="info-row uni-row">
  333. <view class="label">工艺版本</view>
  334. <view class="value">
  335. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].technologyVersion }}
  336. </view>
  337. </view>
  338. <view class="info-row uni-row">
  339. <view class="label">产品描述</view>
  340. <view class="value">
  341. {{inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')]. productDescription }}
  342. </view>
  343. </view>
  344. <view class="info-row uni-row">
  345. <view class="label">当前工序</view>
  346. <view class="value">
  347. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].processAlias }}
  348. </view>
  349. </view>
  350. <view class="info-row uni-row">
  351. <view class="label">操作者</view>
  352. <view class="value">
  353. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].nickName }}
  354. </view>
  355. </view>
  356. <view class="info-row uni-row">
  357. <view class="label">设备</view>
  358. <view class="value">
  359. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].equipmentDetailCode }}
  360. </view>
  361. </view>
  362. <view class="info-row uni-row">
  363. <view class="label">检查载具</view>
  364. <view class="value">
  365. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].inspectionCarrierCode }}
  366. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  367. </view>
  368. </view>
  369. <view class="info-row uni-row">
  370. <view class="drawing-btn"
  371. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')])">
  372. 图纸信息</view>
  373. </view>
  374. </view>
  375. <!-- 废品信息 -->
  376. <view class="title unfit-title uni-row">
  377. <text>检查信息</text>
  378. </view>
  379. <view class="unfit-container">
  380. <view class="unfit-item-container uni-column"
  381. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].processInspectionDetails"
  382. :key="index">
  383. <view class="resu uni-row">
  384. <view class="label">检查标准</view>
  385. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  386. </view>
  387. <view class="resu uni-row">
  388. <view class="label">检查结果</view>
  389. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  390. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  391. </view>
  392. <view class="resu uni-row">
  393. <view class="label">超差范围</view>
  394. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  395. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  396. </view>
  397. <view class="resu uni-row">
  398. <view :class="!editable() ? 'label' : ''">检查量</view>
  399. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  400. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  401. <view :class="!editable() ? 'label' : ''">不良品量</view>
  402. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  403. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  404. </view>
  405. </view>
  406. </view>
  407. <!-- 拍照上传部分 -->
  408. <view class="title unfit-title uni-row">
  409. <text>拍照上传</text>
  410. </view>
  411. <view class=" uni-row" style="padding: 24rpx;
  412. margin: 0 16rpx;
  413. background-color: #ffffff;
  414. border-radius: 12rpx;">
  415. <uni-file-picker
  416. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].processInspectionPictureList"
  417. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  418. class="my-files"></uni-file-picker>
  419. </view>
  420. <!-- 咨询部分 -->
  421. <view class="title unfit-title uni-row">
  422. <text>咨询</text>
  423. </view>
  424. <view class="consultation-container uni-column">
  425. <view class="consultation-item-container"
  426. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].dayworkItemConsults"
  427. :key="index">
  428. <view class="question uni-column">
  429. <view class="label uni-row">
  430. <text>问题描述</text>
  431. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  432. {{ selectText(item) }}</text>
  433. </view>
  434. <view class="content">{{ item.content }}</view>
  435. </view>
  436. </view>
  437. </view>
  438. <!-- 报工部分 -->
  439. <view class="daywork-container">
  440. <view class="result uni-row">
  441. <view class="label" style="margin-top: 20rpx; width: 170rpx;">仪器室检状态</view>
  442. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  443. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].inspectionStatus"
  444. :localdata="range"></uni-data-checkbox>
  445. </view>
  446. <view class="result uni-row">
  447. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  448. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  449. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].status"
  450. :localdata="range"></uni-data-checkbox>
  451. </view>
  452. <view class="remark uni-row">
  453. <view class="label">备注</view>
  454. <textarea v-if="editable()"
  455. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].remark" />
  456. <view v-else class="value">
  457. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'instrumentRoomInspection')].remark }}
  458. </view>
  459. </view>
  460. </view>
  461. </view>
  462. <!-- 外协检 -->
  463. <view v-if="isActived.label == '外协检查' " style="margin-bottom: 130rpx;margin-top: 16px;">
  464. <view class="carrier-info uni-column">
  465. <view class="carrier-code uni-row">
  466. <text>箱号</text>
  467. <text
  468. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].carrierCode}}</text>
  469. <text style="margin-left: 150px;color: aquamarine">外协检</text>
  470. </view>
  471. <view class="info-row uni-row">
  472. <view class="label">图号</view>
  473. <view class="value">
  474. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].drawingNumber }}
  475. </view>
  476. </view>
  477. <view class="info-row uni-row">
  478. <view class="label">批次号</view>
  479. <view class="value">
  480. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].lotCode }}
  481. </view>
  482. </view>
  483. <view class="info-row uni-row">
  484. <view class="label">工艺版本</view>
  485. <view class="value">
  486. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].technologyVersion }}
  487. </view>
  488. </view>
  489. <view class="info-row uni-row">
  490. <view class="label">产品描述</view>
  491. <view class="value">
  492. {{inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')]. productDescription }}
  493. </view>
  494. </view>
  495. <view class="info-row uni-row">
  496. <view class="label">当前工序</view>
  497. <view class="value">
  498. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].processAlias }}
  499. </view>
  500. </view>
  501. <view class="info-row uni-row">
  502. <view class="label">检查载具</view>
  503. <view class="value">
  504. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].inspectionCarrierCode }}
  505. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  506. </view>
  507. </view>
  508. <view class="info-row uni-row">
  509. <view class="drawing-btn"
  510. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')])">
  511. 图纸信息</view>
  512. </view>
  513. </view>
  514. <!-- 废品信息 -->
  515. <view class="title unfit-title uni-row">
  516. <text>检查信息</text>
  517. </view>
  518. <view class="unfit-container">
  519. <view class="unfit-item-container uni-column"
  520. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].processInspectionDetails"
  521. :key="index">
  522. <view class="resu uni-row">
  523. <view class="label">检查标准</view>
  524. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  525. </view>
  526. <view class="resu uni-row">
  527. <view class="label">检查结果</view>
  528. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  529. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  530. </view>
  531. <view class="resu uni-row">
  532. <view class="label">超差范围</view>
  533. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  534. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  535. </view>
  536. <view class="resu uni-row">
  537. <view :class="!editable() ? 'label' : ''">检查量</view>
  538. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  539. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  540. <view :class="!editable() ? 'label' : ''">不良品量</view>
  541. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  542. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  543. <view :class="!editable() ? 'label' : ''">废品量</view>
  544. <input v-if="editable()" class="number" type="number" v-model="item.rejectNum" />
  545. <view v-else class="value" style="margin-left:16rpx;">{{ item.rejectNum }}</view>
  546. </view>
  547. </view>
  548. </view>
  549. <!-- 拍照上传部分 -->
  550. <view class="title unfit-title uni-row">
  551. <text>拍照上传</text>
  552. </view>
  553. <view class=" uni-row" style="padding: 24rpx;
  554. margin: 0 16rpx;
  555. background-color: #ffffff;
  556. border-radius: 12rpx;">
  557. <uni-file-picker
  558. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].processInspectionPictureList"
  559. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  560. class="my-files"></uni-file-picker>
  561. </view>
  562. <!-- 咨询部分 -->
  563. <view class="title unfit-title uni-row">
  564. <text>咨询</text>
  565. </view>
  566. <view class="consultation-container uni-column">
  567. <view class="consultation-item-container"
  568. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].dayworkItemConsults"
  569. :key="index">
  570. <view class="question uni-column">
  571. <view class="label uni-row">
  572. <text>问题描述</text>
  573. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  574. {{ selectText(item) }}</text>
  575. </view>
  576. <view class="content">{{ item.content }}</view>
  577. </view>
  578. </view>
  579. </view>
  580. <!-- 报工部分 -->
  581. <view class="daywork-container">
  582. <view class="result uni-row">
  583. <view class="label" style="margin-top: 20rpx; width: 170rpx;">外协检状态</view>
  584. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  585. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].inspectionStatus"
  586. :localdata="range"></uni-data-checkbox>
  587. </view>
  588. <view class="result uni-row">
  589. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  590. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  591. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].status"
  592. :localdata="range"></uni-data-checkbox>
  593. </view>
  594. <view class="remark uni-row">
  595. <view class="label">备注</view>
  596. <textarea v-if="editable()"
  597. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].remark" />
  598. <view v-else class="value">
  599. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'outsourcedInspector')].remark }}
  600. </view>
  601. </view>
  602. </view>
  603. </view>
  604. <!-- 出厂检 -->
  605. <view v-if="isActived.label == '出厂检' " style="margin-bottom: 130rpx;margin-top: 16px;">
  606. <view class="carrier-info uni-column">
  607. <view class="carrier-code uni-row">
  608. <text>箱号</text>
  609. <text
  610. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].carrierCode}}</text>
  611. <text style="margin-left: 150px;color: aquamarine">出厂检</text>
  612. </view>
  613. <view class="info-row uni-row">
  614. <view class="label">图号</view>
  615. <view class="value">
  616. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].drawingNumber }}
  617. </view>
  618. </view>
  619. <view class="info-row uni-row">
  620. <view class="label">批次号</view>
  621. <view class="value">
  622. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].lotCode }}
  623. </view>
  624. </view>
  625. <view class="info-row uni-row">
  626. <view class="label">工艺版本</view>
  627. <view class="value">
  628. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].technologyVersion }}
  629. </view>
  630. </view>
  631. <view class="info-row uni-row">
  632. <view class="label">产品描述</view>
  633. <view class="value">
  634. {{inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')]. productDescription }}
  635. </view>
  636. </view>
  637. <view class="info-row uni-row">
  638. <view class="label">当前工序</view>
  639. <view class="value">
  640. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].processAlias }}
  641. </view>
  642. </view>
  643. <view class="info-row uni-row">
  644. <view class="label">检查载具</view>
  645. <view class="value">
  646. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].inspectionCarrierCode }}
  647. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  648. </view>
  649. </view>
  650. <view class="info-row uni-row">
  651. <view class="drawing-btn"
  652. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')])">
  653. 图纸信息</view>
  654. </view>
  655. </view>
  656. <!-- 废品信息 -->
  657. <view class="title unfit-title uni-row">
  658. <text>检查信息</text>
  659. </view>
  660. <view class="unfit-container">
  661. <view class="unfit-item-container uni-column"
  662. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].processInspectionDetails"
  663. :key="index">
  664. <view class="resu uni-row">
  665. <view class="label">检查标准</view>
  666. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  667. </view>
  668. <view class="resu uni-row">
  669. <view class="label">检查结果</view>
  670. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  671. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  672. </view>
  673. <view class="resu uni-row">
  674. <view class="label">超差范围</view>
  675. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  676. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  677. </view>
  678. <view class="resu uni-row">
  679. <view :class="!editable() ? 'label' : ''">检查量</view>
  680. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  681. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  682. <view :class="!editable() ? 'label' : ''">不良品量</view>
  683. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  684. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  685. </view>
  686. </view>
  687. </view>
  688. <!-- 拍照上传部分 -->
  689. <view class="title unfit-title uni-row">
  690. <text>拍照上传</text>
  691. </view>
  692. <view class=" uni-row" style="padding: 24rpx;
  693. margin: 0 16rpx;
  694. background-color: #ffffff;
  695. border-radius: 12rpx;">
  696. <uni-file-picker
  697. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].processInspectionPictureList"
  698. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  699. class="my-files"></uni-file-picker>
  700. </view>
  701. <!-- 咨询部分 -->
  702. <view class="title unfit-title uni-row">
  703. <text>咨询</text>
  704. </view>
  705. <view class="consultation-container uni-column">
  706. <view class="consultation-item-container"
  707. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].dayworkItemConsults"
  708. :key="index">
  709. <view class="question uni-column">
  710. <view class="label uni-row">
  711. <text>问题描述</text>
  712. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  713. {{ selectText(item) }}</text>
  714. </view>
  715. <view class="content">{{ item.content }}</view>
  716. </view>
  717. </view>
  718. </view>
  719. <!-- 报工部分 -->
  720. <view class="daywork-container">
  721. <view class="result uni-row">
  722. <view class="label" style="margin-top: 20rpx; width: 170rpx;">出厂检状态</view>
  723. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  724. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].inspectionStatus"
  725. :localdata="range"></uni-data-checkbox>
  726. </view>
  727. <view class="result uni-row">
  728. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  729. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  730. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].status"
  731. :localdata="range"></uni-data-checkbox>
  732. </view>
  733. <view class="remark uni-row">
  734. <view class="label">备注</view>
  735. <textarea v-if="editable()"
  736. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].remark" />
  737. <view v-else class="value">
  738. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'factoryInspection')].remark }}
  739. </view>
  740. </view>
  741. </view>
  742. </view>
  743. <!-- 首件检 -->
  744. <view v-if="isActived.label == '首件检' " style="margin-bottom: 130rpx;margin-top: 16px;">
  745. <view class="carrier-info uni-column">
  746. <view class="carrier-code uni-row">
  747. <text>箱号</text>
  748. <text
  749. style="margin-left: 24rpx;">{{inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].carrierCode}}</text>
  750. <text style="margin-left: 150px;color: aquamarine">首件检</text>
  751. </view>
  752. <view class="info-row uni-row">
  753. <view class="label">图号</view>
  754. <view class="value">
  755. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].drawingNumber }}
  756. </view>
  757. </view>
  758. <view class="info-row uni-row">
  759. <view class="label">批次号</view>
  760. <view class="value">
  761. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].lotCode }}
  762. </view>
  763. </view>
  764. <view class="info-row uni-row">
  765. <view class="label">工艺版本</view>
  766. <view class="value">
  767. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].technologyVersion }}
  768. </view>
  769. </view>
  770. <view class="info-row uni-row">
  771. <view class="label">产品描述</view>
  772. <view class="value">
  773. {{inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')]. productDescription }}
  774. </view>
  775. </view>
  776. <view class="info-row uni-row">
  777. <view class="label">当前工序</view>
  778. <view class="value">
  779. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].processAlias }}
  780. </view>
  781. </view>
  782. <view class="info-row uni-row">
  783. <view class="label">操作者</view>
  784. <view class="value">
  785. {{inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].nickName }}
  786. </view>
  787. </view>
  788. <view class="info-row uni-row">
  789. <view class="label">设备</view>
  790. <view class="value">
  791. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].equipmentDetailCode }}
  792. </view>
  793. </view>
  794. <view class="info-row uni-row">
  795. <view class="label">检查载具</view>
  796. <view class="value">
  797. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].inspectionCarrierCode }}
  798. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  799. </view>
  800. </view>
  801. <view class="info-row uni-row">
  802. <view class="drawing-btn"
  803. @click="handleDrawingMenu(inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')])">
  804. 图纸信息</view>
  805. </view>
  806. </view>
  807. <!-- 废品信息 -->
  808. <view class="title unfit-title uni-row">
  809. <text>检查信息</text>
  810. </view>
  811. <view class="unfit-container">
  812. <view class="unfit-item-container uni-column"
  813. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].processInspectionDetails"
  814. :key="index">
  815. <view class="resu uni-row">
  816. <view class="label">检查标准</view>
  817. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  818. </view>
  819. <view class="resu uni-row">
  820. <view class="label">检查结果</view>
  821. <input v-if="editable()" v-model="item.checkResult" maxlength="50" />
  822. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  823. </view>
  824. <view class="resu uni-row">
  825. <view class="label">超差范围</view>
  826. <input v-if="editable()" v-model="item.exceedLimits" maxlength="50" />
  827. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  828. </view>
  829. <view class="resu uni-row">
  830. <view :class="!editable() ? 'label' : ''">检查量</view>
  831. <input v-if="editable()" class="number" type="number" v-model="item.examiningNum" />
  832. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  833. <view :class="!editable() ? 'label' : ''">不良品量</view>
  834. <input v-if="editable()" class="number" type="number" v-model="item.disqualificationNum" />
  835. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  836. </view>
  837. </view>
  838. </view>
  839. <!-- 拍照上传部分 -->
  840. <view class="title unfit-title uni-row">
  841. <text>拍照上传</text>
  842. </view>
  843. <view class=" uni-row" style="padding: 24rpx;
  844. margin: 0 16rpx;
  845. background-color: #ffffff;
  846. border-radius: 12rpx;">
  847. <uni-file-picker
  848. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].processInspectionPictureList"
  849. :readonly="true" return-type="array" :image-styles="imageStyles" file-mediatype="image"
  850. class="my-files"></uni-file-picker>
  851. </view>
  852. <!-- 咨询部分 -->
  853. <view class="title unfit-title uni-row">
  854. <text>咨询</text>
  855. </view>
  856. <view class="consultation-container uni-column">
  857. <view class="consultation-item-container"
  858. v-for="(item, index) in inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].dayworkItemConsults"
  859. :key="index">
  860. <view class="question uni-column">
  861. <view class="label uni-row">
  862. <text>问题描述</text>
  863. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  864. {{ selectText(item) }}</text>
  865. </view>
  866. <view class="content">{{ item.content }}</view>
  867. </view>
  868. </view>
  869. </view>
  870. <!-- 报工部分 -->
  871. <view class="daywork-container">
  872. <view class="result uni-row">
  873. <view class="label" style="margin-top: 20rpx; width: 170rpx;">首件检状态</view>
  874. <uni-data-checkbox disabled="true" style="margin-top: 20rpx;"
  875. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].inspectionStatus"
  876. :localdata="range"></uni-data-checkbox>
  877. </view>
  878. <view class="result uni-row">
  879. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  880. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;"
  881. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].status"
  882. :localdata="range"></uni-data-checkbox>
  883. </view>
  884. <view class="remark uni-row">
  885. <view class="label">备注</view>
  886. <textarea v-if="editable()"
  887. v-model="inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].remark" />
  888. <view v-else class="value">
  889. {{ inspectionList[inspectionList.findIndex(item =>item.type === 'firstArticleInspection')].remark }}
  890. </view>
  891. </view>
  892. </view>
  893. </view>
  894. <view class="bottom uni-row">
  895. <button class="start-batch-btn" style="margin-right: 10rpx;" type="primary"
  896. @click="handleConfirm">确定领取</button>
  897. </view>
  898. </view>
  899. </template>
  900. <script setup>
  901. import {
  902. ref,
  903. onMounted,
  904. getCurrentInstance
  905. } from 'vue'
  906. import {
  907. onLoad,
  908. onReady,
  909. onUnload,
  910. onShow
  911. } from '@dcloudio/uni-app'
  912. import {
  913. store
  914. } from '@/store/index.js'
  915. import {
  916. unbindInspectionCarrier,
  917. getInspectionInfoByInspectionCarrierCode
  918. } from '@/api/business/processInspection.js'
  919. const lot = ref({})
  920. const isEventTriggered = ref(false); // 创建一个标志位
  921. const unfitInfos = ref([]) //废品信息
  922. const consultations = ref([]) //咨询信息
  923. // 创建一个引用来存储最后一次请求的时间戳
  924. const lastRequestTimestamp = ref(0);
  925. const processInspecion = ref({
  926. remark: "",
  927. rejectNum: 0,
  928. examiningNum: 0,
  929. status: 0,
  930. })
  931. const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
  932. const webHost = ref(urlList.baseUrl)
  933. const inspectionList = ref([])
  934. const processInspectionTypeList = ref([])
  935. const isActived = ref(null)
  936. const initStatus = ref(0)
  937. const carrierCode = ref(null)
  938. const editable = () => {
  939. return false
  940. }
  941. const imageStyles = {
  942. width: 60,
  943. height: 60
  944. }
  945. const consul = [{
  946. value: 0,
  947. text: "待确认",
  948. type: "color: #fcab53"
  949. }, {
  950. value: 2,
  951. text: "合格",
  952. type: "color: #55ff7f"
  953. }, {
  954. value: 1,
  955. text: "不合格",
  956. type: "color: #ff0c2c"
  957. }]
  958. const range = [{
  959. value: 0,
  960. text: "待确认",
  961. type: "color: #fcab53"
  962. }, {
  963. value: 1,
  964. text: "合格",
  965. type: "color: #55ff7f"
  966. }, {
  967. value: 2,
  968. text: "不合格",
  969. type: "color: #ff0c2c"
  970. }]
  971. /***************************** 页面生命周期函数 *****************************/
  972. function init() {
  973. const instance = getCurrentInstance().proxy
  974. const eventChannel = instance.getOpenerEventChannel();
  975. eventChannel.on('inspecionCarrierCode', function(data) {
  976. if (data && data.carrierCode) {
  977. carrierCode.value = data.carrierCode;
  978. getInspectionInfoByInspectionCarrierCode({
  979. carrierCode: carrierCode.value
  980. }).then(res => {
  981. processInspectionTypeList.value = res.data.map(v => {
  982. if (v.type === "deliveryInspection") {
  983. return {
  984. id: v.id,
  985. text: v.type,
  986. label: '交检'
  987. };
  988. } else if (v.type === "firstArticleInspection") {
  989. return {
  990. id: v.id,
  991. text: v.type,
  992. label: '首件检'
  993. };
  994. } else if (v.type === "patrolInspection") {
  995. return {
  996. id: v.id,
  997. text: v.type,
  998. label: '巡检'
  999. };
  1000. } else if (v.type === "outsourcedInspector") {
  1001. return {
  1002. id: v.id,
  1003. text: v.type,
  1004. label: '外协检查'
  1005. };
  1006. } else if (v.type === "factoryInspection") {
  1007. return {
  1008. id: v.id,
  1009. text: v.type,
  1010. label: '出厂检'
  1011. };
  1012. } else {
  1013. return {
  1014. id: v.id,
  1015. text: v.type,
  1016. label: '仪器室'
  1017. };
  1018. }
  1019. });
  1020. res.data.forEach(item => {
  1021. item.processInspectionPictureList.forEach(i => {
  1022. i.url = webHost.value + i.url
  1023. })
  1024. })
  1025. console.log(res.data)
  1026. inspectionList.value = res.data
  1027. isActived.value = processInspectionTypeList.value[0]
  1028. console.log(processInspectionTypeList.value)
  1029. })
  1030. }
  1031. })
  1032. }
  1033. onShow(() => {
  1034. init()
  1035. })
  1036. /***************************** 定义了一些方法 *****************************/
  1037. //咨询文本
  1038. function selectText(item) {
  1039. // for (var i = 0; i < consul.length; i++) {
  1040. // if (item.status == consul[i].value) {
  1041. // return consul[i].text
  1042. // }
  1043. // }
  1044. if (item.consultResultId == 0) {
  1045. return '待确认'
  1046. } else {
  1047. return item.result
  1048. }
  1049. }
  1050. //确定领取
  1051. function handleConfirm() {
  1052. unbindInspectionCarrier({
  1053. carrierCode: carrierCode.value
  1054. }).then(res => {
  1055. if (res.code == 200) {
  1056. let pages = getCurrentPages();
  1057. let index = 0
  1058. for (let i = 0; i < pages.length; i++) {
  1059. if (pages[i].$page.fullPath == "/pages/dashboard/index") {
  1060. index = pages.length - i - 1;
  1061. }
  1062. }
  1063. console.log("index", index);
  1064. uni.navigateBack({
  1065. delta: index
  1066. });
  1067. } else {
  1068. uni.showToast({
  1069. icon: 'none',
  1070. title: res.msg,
  1071. duration: 2000
  1072. })
  1073. }
  1074. })
  1075. }
  1076. //图纸
  1077. function handleDrawingMenu(data) {
  1078. console.log(data)
  1079. // 对 technologicalProcessDetailId 进行URL编码
  1080. var encodedId = encodeURIComponent(data.productId);
  1081. var enTechnologicalProcessId = encodeURIComponent(data.technologicalProcessId);
  1082. var enprocessCode = encodeURIComponent(data.processCodeLabel);
  1083. var encodeCode = encodeURIComponent(data.lotCode);
  1084. var enProcessAlias = encodeURIComponent(data.processAlias);
  1085. var enIsWasteRecycling = encodeURIComponent(data.isWasteRecycling);
  1086. var enIsAmend = encodeURIComponent(data.isAmend);
  1087. // 构建查询参数字符串
  1088. var queryParam =
  1089. `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}&param6=${enIsWasteRecycling}&param7=${enIsAmend}`;
  1090. // 使用模板字符串构建完整的URL
  1091. var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
  1092. // 导航到指定页面
  1093. uni.navigateTo({
  1094. url: navigateUrl
  1095. });
  1096. }
  1097. function selectedStatus(item) {
  1098. isActived.value = item
  1099. }
  1100. //咨询样式
  1101. function selectType(item) {
  1102. for (var i = 0; i < consul.length; i++) {
  1103. if (item.status == consul[i].value) {
  1104. return consul[i].type
  1105. }
  1106. }
  1107. }
  1108. </script>
  1109. <style lang="scss">
  1110. .page-container {
  1111. // height: 100%;
  1112. background-color: #ececec;
  1113. font-size: 28rpx;
  1114. >.title {
  1115. font-weight: 700;
  1116. margin: 24rpx 16rpx;
  1117. }
  1118. }
  1119. // .tab-container {
  1120. // display: flex;
  1121. // flex-direction: row;
  1122. // height: 32px;
  1123. // background-color: #ffffff;
  1124. // margin-bottom: 16rpx;
  1125. // .tab-item {
  1126. // display: flex;
  1127. // flex-direction: row;
  1128. // flex: 1;
  1129. // font-size: 14px;
  1130. // color: #666;
  1131. // align-items: center;
  1132. // justify-content: center;
  1133. // }
  1134. // }
  1135. .tab-container {
  1136. position: fixed;
  1137. /* 固定定位 */
  1138. top: 44px;
  1139. /* 距离顶部0,即页面顶部 */
  1140. left: 0;
  1141. /* 距离左侧0,即页面左侧 */
  1142. right: 0;
  1143. /* 宽度充满整个页面宽度 */
  1144. display: flex;
  1145. flex-direction: row;
  1146. height: 32px;
  1147. background-color: #ffffff;
  1148. z-index: 999;
  1149. /* 确保.tab-container在页面最上层 */
  1150. padding: 8rpx 0;
  1151. /* 根据需要添加一些内边距 */
  1152. box-sizing: border-box;
  1153. /* 边框计算在宽度内 */
  1154. }
  1155. .tab-item {
  1156. display: flex;
  1157. flex-direction: row;
  1158. flex: 1;
  1159. font-size: 14px;
  1160. color: #666;
  1161. align-items: center;
  1162. justify-content: center;
  1163. }
  1164. .carrier-info {
  1165. margin: 32rpx 16rpx 0 16rpx;
  1166. padding: 24rpx;
  1167. background-color: #ffffff;
  1168. border-radius: 8rpx;
  1169. .carrier-code {
  1170. font-size: 32rpx;
  1171. font-weight: 700;
  1172. }
  1173. .info-row {
  1174. margin-top: 16rpx;
  1175. color: #767676;
  1176. .label {
  1177. width: 160rpx;
  1178. }
  1179. .drawing-btn {
  1180. padding: 12rpx 32rpx;
  1181. background-color: #0055ff;
  1182. color: #ffffff;
  1183. border-radius: 12rpx;
  1184. margin-left: auto;
  1185. font-size: 28rpx;
  1186. }
  1187. .value {
  1188. flex: 1;
  1189. textarea {
  1190. flex: 1;
  1191. border: 1px solid #888888;
  1192. box-sizing: border-box;
  1193. padding: 16rpx;
  1194. }
  1195. }
  1196. }
  1197. }
  1198. .unfit-title {
  1199. margin-bottom: 24rpx;
  1200. justify-content: space-between;
  1201. align-items: center;
  1202. margin: 24rpx 16rpx;
  1203. text {
  1204. font-size: 28rpx;
  1205. font-weight: 700;
  1206. }
  1207. .add-btn {
  1208. padding: 12rpx 32rpx;
  1209. background-color: #a4adb3;
  1210. color: #ffffff;
  1211. border-radius: 12rpx;
  1212. font-size: 24rpx;
  1213. }
  1214. }
  1215. .unfit-container {
  1216. padding: 24rpx;
  1217. margin: 0 16rpx;
  1218. background-color: #ffffff;
  1219. border-radius: 12rpx;
  1220. .unfit-item-container {
  1221. position: relative;
  1222. >* {
  1223. margin-bottom: 24rpx;
  1224. }
  1225. .title {
  1226. font-weight: 700;
  1227. justify-content: space-between;
  1228. align-items: center;
  1229. image {
  1230. width: 40rpx;
  1231. height: 40rpx;
  1232. }
  1233. }
  1234. .standard {}
  1235. .resu {
  1236. width: 100%;
  1237. align-items: center;
  1238. input {
  1239. margin-left: 20rpx;
  1240. width: 200rpx;
  1241. height: 56rpx;
  1242. flex: 1;
  1243. border: 1px solid #9f9f9f;
  1244. font-size: 28rpx;
  1245. }
  1246. }
  1247. .result {
  1248. align-items: center;
  1249. border-bottom: 1px solid #9f9f9f;
  1250. padding-bottom: 32rpx;
  1251. .label {
  1252. flex: 1;
  1253. }
  1254. input {
  1255. width: 280rpx;
  1256. height: 56rpx;
  1257. border: 1px solid #9f9f9f;
  1258. font-size: 28rpx;
  1259. &.number {
  1260. width: 104rpx;
  1261. text-align: center;
  1262. }
  1263. }
  1264. }
  1265. }
  1266. .unfit-item-container:last-child {
  1267. .result {
  1268. border-bottom: none;
  1269. padding-bottom: 0;
  1270. }
  1271. }
  1272. }
  1273. .consultation-container {
  1274. margin: 0 16rpx;
  1275. padding: 24rpx;
  1276. background-color: #ffffff;
  1277. border-radius: 8rpx;
  1278. .consultation-item-container {
  1279. margin-bottom: 24rpx;
  1280. border-bottom: 2px solid #888888;
  1281. padding-bottom: 24rpx;
  1282. }
  1283. .consultation-item-container:last-child {
  1284. margin-bottom: 0;
  1285. border-bottom: 0;
  1286. padding-bottom: 0;
  1287. }
  1288. .question,
  1289. .answer {
  1290. .label {
  1291. justify-content: space-between;
  1292. margin-bottom: 16rpx;
  1293. font-weight: 700;
  1294. }
  1295. .content {
  1296. line-height: 40rpx;
  1297. }
  1298. }
  1299. .answer {
  1300. margin-top: 24rpx;
  1301. }
  1302. }
  1303. .daywork-container {
  1304. margin-top: 24rpx;
  1305. padding: 24rpx;
  1306. background-color: #ffffff;
  1307. border: 1px solid #bcbcbc;
  1308. .result {
  1309. align-items: center;
  1310. .label {
  1311. width: 112rpx;
  1312. }
  1313. input {
  1314. flex: 1;
  1315. height: 56rpx;
  1316. border: 1px solid #9f9f9f;
  1317. font-size: 28rpx;
  1318. text-align: center;
  1319. }
  1320. }
  1321. .remark {
  1322. margin-top: 24rpx;
  1323. .label {
  1324. width: 112rpx;
  1325. }
  1326. textarea {
  1327. flex: 1;
  1328. border: 1px solid #9f9f9f;
  1329. height: 168rpx;
  1330. }
  1331. }
  1332. .btns-container {
  1333. margin-top: 24rpx;
  1334. .finished-btn {
  1335. display: flex;
  1336. flex: 1;
  1337. height: 80rpx;
  1338. background-color: #fc6565;
  1339. color: #ffffff;
  1340. text-align: center;
  1341. justify-content: center;
  1342. align-items: center;
  1343. border-radius: 8rpx;
  1344. }
  1345. .question-btn {
  1346. width: 80rpx;
  1347. align-items: flex-end;
  1348. image {
  1349. width: 48rpx;
  1350. height: 48rpx;
  1351. }
  1352. text {
  1353. font-size: 24rpx;
  1354. }
  1355. }
  1356. }
  1357. }
  1358. .active {
  1359. color: rgba(25, 137, 250, 1);
  1360. border-bottom: solid 1rpx #0055ff;
  1361. font-weight: 700;
  1362. }
  1363. .bottom {
  1364. height: 10%;
  1365. position: fixed;
  1366. right: 0;
  1367. bottom: 0;
  1368. left: 0;
  1369. height: 100rpx;
  1370. border-top: 1px solid #999999;
  1371. padding: 16rpx 32rpx;
  1372. align-items: center;
  1373. background-color: #fff;
  1374. justify-content: space-evenly;
  1375. .start-batch-btn {
  1376. flex: 1;
  1377. height: 80rpx;
  1378. line-height: 80rpx;
  1379. border-radius: 8rpx;
  1380. color: #FFFFFF;
  1381. font-size: 28rpx;
  1382. }
  1383. .view-end-btn {
  1384. flex: 1;
  1385. height: 80rpx;
  1386. line-height: 80rpx;
  1387. border-radius: 8rpx;
  1388. color: #FFFFFF;
  1389. font-size: 28rpx;
  1390. }
  1391. }
  1392. .my-files {
  1393. display: flex;
  1394. justify-content: center;
  1395. :deep(.uni-file-picker__container) {
  1396. flex-direction: row;
  1397. }
  1398. }
  1399. </style>