form.vue 50 KB

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