form.vue 48 KB

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