instrumentRoomForm.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. <template>
  2. <view class="page-container uni-column">
  3. <view class="carrier-info uni-column">
  4. <view class="carrier-code uni-row">
  5. <text>箱号</text>
  6. <text style="margin-left: 24rpx;">{{processInspecion.lot.allCarrierName}}</text>
  7. </view>
  8. <view class="info-row uni-row">
  9. <view class="label">图号</view>
  10. <view class="value">{{ processInspecion.lot.drawingNumber }}</view>
  11. </view>
  12. <view class="info-row uni-row">
  13. <view class="label">批次号</view>
  14. <view class="value">{{ processInspecion.lot.lotCode }}</view>
  15. </view>
  16. <view class="info-row uni-row">
  17. <view class="label">工艺版本</view>
  18. <view class="value">{{ processInspecion.lot.technologyVersion }}</view>
  19. </view>
  20. <view class="info-row uni-row">
  21. <view class="label">产品描述</view>
  22. <view class="value">{{processInspecion.lot. productDescription }}</view>
  23. </view>
  24. <view class="info-row uni-row">
  25. <view class="label">当前工序</view>
  26. <view class="value">{{ processInspecion.lot.processAlias }}</view>
  27. </view>
  28. <view class="info-row uni-row">
  29. <view class="label">操作者</view>
  30. <view class="value">{{ processInspecion.lot.nickName }}</view>
  31. </view>
  32. <view class="info-row uni-row">
  33. <view class="label">设备</view>
  34. <view class="value">{{ processInspecion.lot.equipmentDetailCode }}</view>
  35. </view>
  36. <view class="info-row uni-row">
  37. <view class="label">检查载具</view>
  38. <view class="value">{{ processInspecion.lot.inspectionCarrierCode }}
  39. {{ processInspecion.isInspectionCarrierChanged == 1 ? '(已解绑)' : ''}}
  40. </view>
  41. </view>
  42. <view class="info-row uni-row">
  43. <view class="drawing-btn" @click="handleDrawingMenu">图纸信息</view>
  44. </view>
  45. </view>
  46. <!-- 废品信息 -->
  47. <view class="title unfit-title uni-row">
  48. <text>检查信息</text>
  49. <view class="add-btn" @click="handleAddWaste">添加</view>
  50. </view>
  51. <view class="unfit-container">
  52. <view class="unfit-item-container uni-column" v-for="(item, index) in unfitInfos" :key="index">
  53. <view class="resu uni-row">
  54. <view class="label">检查标准</view>
  55. <view class="value" style="margin-left:16rpx;width: 400rpx;">{{ item.checkStandard }}</view>
  56. <uni-icons type="trash" size="24" style="margin-left: 55rpx;" color="#fc6565"
  57. @click="handleDelWaste(index)" />
  58. </view>
  59. <view class="resu uni-row">
  60. <view class="label">检查结果</view>
  61. <input v-if="editable()" v-model="item.checkResult" placeholder="请输入检查结果" maxlength="50" />
  62. <view v-else class="value" style="margin-left:16rpx;">{{ item.checkResult }}</view>
  63. </view>
  64. <view class="resu uni-row">
  65. <view class="label">超差范围</view>
  66. <input v-if="editable()" v-model="item.exceedLimits" placeholder="请输入超差范围" maxlength="50" />
  67. <view v-else class="value" style="margin-left:16rpx;">{{ item.exceedLimits }}</view>
  68. </view>
  69. <view class="resu uni-row">
  70. <view :class="!editable() ? 'label' : ''">检查量</view>
  71. <input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
  72. v-model="item.examiningNum" placeholder="" />
  73. <view v-else class="number value" style="margin-left:16rpx;">{{ item.examiningNum }}</view>
  74. <view :class="!editable() ? 'label' : ''" style="margin-left: 16rpx;">不良品量</view>
  75. <input v-if="editable()" class="number" type="number" @blur="rejectNumberChange"
  76. v-model="item.disqualificationNum" placeholder="" />
  77. <view v-else class="value" style="margin-left:16rpx;">{{ item.disqualificationNum }}</view>
  78. </view>
  79. </view>
  80. </view>
  81. <!-- 拍照上传部分 -->
  82. <view class="title unfit-title uni-row">
  83. <text>拍照上传</text>
  84. </view>
  85. <view class=" uni-row" style="padding: 24rpx;
  86. margin: 0 16rpx;
  87. background-color: #ffffff;
  88. border-radius: 12rpx;">
  89. <uni-file-picker v-model="photoList" :readonly="!editable()" return-type="array" :image-styles="imageStyles"
  90. @select="select" file-mediatype="image" class="my-files" @delete="handleDeletedPhoto"></uni-file-picker>
  91. </view>
  92. <!-- 咨询部分 -->
  93. <view class="title unfit-title uni-row">
  94. <text>咨询</text>
  95. </view>
  96. <view class="consultation-container uni-column">
  97. <view class="consultation-item-container" v-for="(item, index) in consultations" :key="index">
  98. <view class="question uni-column">
  99. <view class="label uni-row">
  100. <text>问题描述</text>
  101. <text :style="selectType(item)">{{item.consultDepartment == 0?'技术':'品管'}}
  102. {{ selectText(item) }}</text>
  103. </view>
  104. <view class="content">{{ item.content }}</view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 报工部分 -->
  109. <view class="daywork-container">
  110. <view class="result uni-row">
  111. <view class="label" style="margin-top: 20rpx; width: 170rpx;">仪器检状态</view>
  112. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;" v-model="processInspecion.inspectionStatus"
  113. :localdata="range"></uni-data-checkbox>
  114. </view>
  115. <view class="result uni-row">
  116. <view class="label" style="margin-top: 20rpx; margin-right: 10rpx;">放行状态</view>
  117. <uni-data-checkbox :disabled="true" style="margin-top: 20rpx;" v-model="processInspecion.status"
  118. :localdata="range"></uni-data-checkbox>
  119. </view>
  120. <view v-if="editable()" class="remark uni-row">
  121. <view class="label">备注</view>
  122. <textarea :disabled="true" v-model="processInspecion.remark" maxlength="999" />
  123. </view>
  124. <view class="btns-container uni-row">
  125. <view class="finished-btn" @click="endWork">提交</view>
  126. <!-- <view class="question-btn uni-column" @click.stop="handleAddConsultation">
  127. <uni-icons type="headphones" size="24" />
  128. <text>咨询</text>
  129. </view> -->
  130. </view>
  131. </view>
  132. <dialog-inspectionChamber ref='selectInspectionChamber'
  133. @handleSelectInspectionChamber='handleSelectInspectionChamber'></dialog-inspectionChamber>
  134. </view>
  135. </template>
  136. <script setup>
  137. import {
  138. ref,
  139. onMounted,
  140. getCurrentInstance
  141. } from 'vue'
  142. import {
  143. onLoad,
  144. onReady,
  145. onUnload,
  146. onShow
  147. } from '@dcloudio/uni-app'
  148. import {
  149. store
  150. } from '@/store/index.js'
  151. import {
  152. saveFirstInstrumentRoomInspection,
  153. selectInspecion,
  154. getInstrumentRoomInspection
  155. } from '@/api/business/processInspection.js'
  156. import {
  157. getInspectionStandardsList
  158. } from '@/api/business/inspectionStandards.js'
  159. import {
  160. getURL
  161. } from '@/api/sys/user.js'
  162. const lot = ref({})
  163. const isEventTriggered = ref(false); // 创建一个标志位
  164. const unfitInfos = ref([]) //废品信息
  165. const consultations = ref([]) //咨询信息
  166. const flag = ref(false)
  167. const showTransfer = ref(true)
  168. const selectInspectionChamber = ref(null)
  169. // 创建一个引用来存储最后一次请求的时间戳
  170. const lastRequestTimestamp = ref(0);
  171. const processInspecion = ref({
  172. remark: "",
  173. rejectNum: 0,
  174. examiningNum: 0,
  175. status: 0,
  176. inspectionStatus:0
  177. })
  178. const urlList = JSON.parse(uni.getStorageSync('baseUrl'))
  179. const webHost = ref(urlList.baseUrl)
  180. const photoList = ref([])
  181. const selected = ref([]);
  182. const selectedPhotos = ref([])
  183. const imageStyles = {
  184. width: 60,
  185. height: 60
  186. }
  187. const initStatus = ref(0)
  188. const editable = () => {
  189. if (store.userInfo.roles.some(item => item.roleKey == 'firstArticleInspection')) {
  190. return true
  191. } else {
  192. return false
  193. }
  194. }
  195. const consul = [{
  196. value: 0,
  197. text: "待确认",
  198. type: "color: #fcab53"
  199. }, {
  200. value: 2,
  201. text: "合格",
  202. type: "color: #55ff7f"
  203. }, {
  204. value: 1,
  205. text: "不合格",
  206. type: "color: #ff0c2c"
  207. }]
  208. const range = [{
  209. value: 0,
  210. text: "待确认",
  211. type: "color: #fcab53"
  212. }, {
  213. value: 1,
  214. text: "合格",
  215. type: "color: #55ff7f"
  216. }, {
  217. value: 2,
  218. text: "不合格",
  219. type: "color: #ff0c2c"
  220. }]
  221. /***************************** 页面生命周期函数 *****************************/
  222. function init() {
  223. const instance = getCurrentInstance().proxy
  224. const eventChannel = instance.getOpenerEventChannel();
  225. eventChannel.on('firstInspectionFrom', function(data) {
  226. if (data && data.data) {
  227. processInspecion.value.lot = data.data;
  228. console.log(processInspecion.value.lot)
  229. //getOringicalList()
  230. }
  231. })
  232. }
  233. onShow(() => {
  234. console.log(store.processInspection)
  235. console.log(flag.value)
  236. if (!flag.value) {
  237. if (store.processInspection != null) {
  238. uni.showLoading({
  239. title: '加载中'
  240. });
  241. processInspecion.value = store.processInspection
  242. selectInspecion(processInspecion.value).then(res => {
  243. if (res.code == 200) {
  244. processInspecion.value = res.data;
  245. processInspecion.value.flag = false
  246. unfitInfos.value = res.data.processInspectionDetails;
  247. initStatus.value = res.data.inspectionStatus
  248. consultations.value = res.data.dayworkItemConsults;
  249. selectedPhotos.value = res.data.processInspectionPictureList
  250. photoList.value = res.data.processInspectionPictureList.map(item => {
  251. return {
  252. ...item,
  253. url: webHost.value + item.url
  254. };
  255. });
  256. console.log("res", res);
  257. console.log(processInspecion.value)
  258. //判断是否移交到了仪器室
  259. getInstrumentRoomInspectionList()
  260. uni.hideLoading();
  261. // getInspecion();
  262. } else {
  263. uni.showToast({
  264. icon: 'none',
  265. title: res.msg,
  266. duration: 2000
  267. })
  268. }
  269. });
  270. } else {
  271. init()
  272. }
  273. }
  274. })
  275. function getInstrumentRoomInspectionList() {
  276. getInstrumentRoomInspection(processInspecion.value).then(res => {
  277. if (res.data.length > 0) {
  278. showTransfer.value = false
  279. } else {
  280. showTransfer.value = true
  281. }
  282. })
  283. }
  284. function getOringicalList() {
  285. console.log(processInspecion.value)
  286. //查询该产品,当前工序,当前检查绑定的检查
  287. getInspectionStandardsList({
  288. productId: processInspecion.value.lot.productId,
  289. processId: processInspecion.value.lot.processId,
  290. inspectionCode: "firstArticleInspection"
  291. }).then(res => {
  292. unfitInfos.value = res.rows.map(item => {
  293. // 映射新的数组,包含 inspectionStandardsId 和 checkStandard 属性
  294. return {
  295. inspectionStandardsId: item.id, // 从 item 中获取 id
  296. checkStandard: item.standard // 从 item 中获取 standard
  297. };
  298. });
  299. })
  300. }
  301. /***************************** 定义了一些方法 *****************************/
  302. //咨询文本
  303. function selectText(item) {
  304. // for (var i = 0; i < consul.length; i++) {
  305. // if (item.status == consul[i].value) {
  306. // return consul[i].text
  307. // }
  308. // }
  309. if(item.consultResultId == 0) {
  310. return '待确认'
  311. }else{
  312. return item.result
  313. }
  314. }
  315. function upLoadImageHandler(arg) {
  316. getURL(arg).then(res => {
  317. let data = JSON.parse(res)
  318. selectedPhotos.value.push({
  319. url: data.fileName,
  320. pictureName: data.originalFilename,
  321. tenantId: store.tenantId
  322. })
  323. console.log(selectedPhotos.value)
  324. })
  325. }
  326. function select(e) {
  327. console.log(e)
  328. const {
  329. tempFilePaths,
  330. tempFiles
  331. } = e
  332. tempFiles.forEach((item, index) => {
  333. upLoadImageHandler({
  334. filePath: tempFilePaths[index],
  335. name: item.name
  336. })
  337. })
  338. }
  339. function handleDeletedPhoto(e) {
  340. let fileName = selectedPhotos.value.map(info => info.pictureName)
  341. const firstSlashIndex = e.tempFile.url.lastIndexOf('/');
  342. const lastSlashIndex = e.tempFile.url.lastIndexOf('_');
  343. const type = e.tempFile.url.substring(firstSlashIndex + 1, lastSlashIndex)
  344. const pictureName = e.tempFile.url.substring(firstSlashIndex + 1, lastSlashIndex) + e.tempFile.url.substring(e
  345. .tempFile.url.lastIndexOf('.') - 1 + 1);;
  346. let index = -1; // 初始化 index 为 -1,表示未找到
  347. // 首先检查 e.tempFile.name 是否存在
  348. if (fileName.findIndex(name => name === e.tempFile.name) !== -1) {
  349. index = fileName.findIndex(name => name === e.tempFile.name);
  350. }
  351. // 如果 e.tempFile.name 不存在,检查 e.tempFile.pictureName 是否存在
  352. else if (fileName.findIndex(name => name === e.tempFile.pictureName) !== -1) {
  353. index = fileName.findIndex(name => name === e.tempFile.pictureName);
  354. }
  355. // 如果以上两个都不存在,检查 pictureName 是否存在
  356. else if (fileName.findIndex(name => name === pictureName) !== -1) {
  357. index = fileName.findIndex(name => name === pictureName);
  358. }
  359. selectedPhotos.value.splice(index, 1)
  360. }
  361. function handleDrawingMenu() {
  362. // 对 technologicalProcessDetailId 进行URL编码
  363. var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
  364. var enTechnologicalProcessId = encodeURIComponent(processInspecion.value.lot.technologicalProcessId);
  365. var enprocessCode = encodeURIComponent(processInspecion.value.lot.processCode);
  366. var encodeCode = encodeURIComponent(processInspecion.value.lot.lotCode);
  367. var enProcessAlias = encodeURIComponent(processInspecion.value.lot.processAlias);
  368. var enIsWasteRecycling = encodeURIComponent(processInspecion.value.lot.isWasteRecycling);
  369. var enIsAmend = encodeURIComponent(processInspecion.value.lot.isAmend);
  370. // 构建查询参数字符串
  371. var queryParam =
  372. `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}&param6=${enIsWasteRecycling}&param7=${enIsAmend}`;
  373. // 使用模板字符串构建完整的URL
  374. var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
  375. // 导航到指定页面
  376. uni.navigateTo({
  377. url: navigateUrl
  378. });
  379. }
  380. const rejectNumberChange = () => {
  381. let sumDisqualificationNum = 0
  382. let sumExaminingNum = 0
  383. unfitInfos.value.forEach(v => {
  384. sumDisqualificationNum += (v.disqualificationNum != null ? Number(v.disqualificationNum) : 0)
  385. sumExaminingNum += (v.examiningNum != null ? Number(v.examiningNum) : 0)
  386. })
  387. processInspecion.value.disqualificationNum = sumDisqualificationNum
  388. processInspecion.value.examiningNum = sumExaminingNum
  389. console.log(processInspecion.value)
  390. }
  391. //查询咨询列表
  392. function getInspecion() {
  393. processInspecion.value = store.processInspection
  394. selectInspecion(processInspecion.value).then(res => {
  395. console.log("咨询", res);
  396. if (res.code == 200) {
  397. console.log("res", res);
  398. } else {
  399. uni.showToast({
  400. icon: 'none',
  401. title: res.msg,
  402. duration: 2000
  403. })
  404. }
  405. });
  406. }
  407. //结束报工按钮
  408. function endWork() {
  409. // let unf = unfitInfos.value;
  410. // for (var i = 0; i < unfitInfos.value.length; i++) {
  411. // if (unf[i].examiningNum < 0 || unf[i].disqualificationNum < 0) {
  412. // uni.showToast({
  413. // icon: 'none',
  414. // title: '检查量,不良品量不能小于0',
  415. // duration: 2000
  416. // })
  417. // return
  418. // }
  419. // if (unf[i].examiningNum > processInspecion.value.lot.pudName) {
  420. // uni.showToast({
  421. // icon: 'none',
  422. // title: '检查量不能大于投产量'
  423. // })
  424. // return
  425. // }
  426. // }
  427. // if (processInspecion.value.disqualificationNum > processInspecion.value.lot.pudName) {
  428. // uni.showToast({
  429. // icon: 'none',
  430. // title: '不良品量不能大于投产量'
  431. // })
  432. // return
  433. // }
  434. save();
  435. }
  436. function save() {
  437. const currentTime = Date.now();
  438. // 检查是否已经过去了 2 秒
  439. if (currentTime - lastRequestTimestamp.value < 2000) {
  440. // 如果在 2 秒 内已经点击,那么不执行
  441. uni.showToast({
  442. icon: 'none',
  443. title: `请勿重复点击`,
  444. duration: 2000
  445. })
  446. return;
  447. }
  448. lastRequestTimestamp.value = currentTime;
  449. let pages = getCurrentPages();
  450. processInspecion.value.dayworkItemConsults = consultations.value;
  451. processInspecion.value.processInspectionDetails = unfitInfos.value;
  452. processInspecion.value.user = store.userInfo;
  453. processInspecion.value.tenantId = store.tenantId
  454. processInspecion.value.inspectionChamberId = processInspecion.value.lot.inspectionChamberId
  455. processInspecion.value.inspectionCarrierId = processInspecion.value.lot.inspectionCarrierId
  456. processInspecion.value.inspectionCarrierCode = processInspecion.value.lot.inspectionCarrierCode
  457. processInspecion.value.processInspectionPictureList = selectedPhotos.value
  458. console.log(processInspecion.value)
  459. saveFirstInstrumentRoomInspection(processInspecion.value).then(res => {
  460. if (res.code == 200) {
  461. let index = 0;
  462. for (let i = 0; i < pages.length; i++) {
  463. if (pages[i].$page.fullPath == "/pages/reportingForWork/index") {
  464. index = pages.length - i - 1;
  465. }
  466. }
  467. console.log("index", index);
  468. uni.navigateBack({
  469. delta: index
  470. });
  471. } else {
  472. uni.showToast({
  473. icon: 'none',
  474. title: res.msg,
  475. duration: 2000
  476. })
  477. }
  478. });
  479. }
  480. function handleSelectInspectionChamber(data) {
  481. processInspecion.value.inspectionChamberId = data
  482. console.log(processInspecion.value)
  483. saveOnSiteInspecion(processInspecion.value).then(res => {
  484. if (res.code == 200) {
  485. let index = 0;
  486. let pages = getCurrentPages();
  487. for (let i = 0; i < pages.length; i++) {
  488. if (pages[i].$page.fullPath == "/pages/firstInspection/index") {
  489. index = pages.length - i - 1;
  490. }
  491. }
  492. console.log("index", index);
  493. uni.navigateBack({
  494. delta: index
  495. });
  496. } else {
  497. uni.showToast({
  498. icon: 'none',
  499. title: res.msg,
  500. duration: 2000
  501. })
  502. }
  503. });
  504. }
  505. //咨询样式
  506. function selectType(item) {
  507. for (var i = 0; i < consul.length; i++) {
  508. if (item.status == consul[i].value) {
  509. return consul[i].type
  510. }
  511. }
  512. }
  513. const addWasteInfo = (data) => {
  514. console.log(data, "55555555")
  515. flag.value = true
  516. var info = {
  517. inspectionStandardsId: data.id,
  518. checkStandard: data.standard
  519. }
  520. unfitInfos.value.push(info)
  521. console.log(data)
  522. }
  523. const addConsultation = (data) => {
  524. let info = data
  525. info.forEach(item => {
  526. item.status = 0
  527. })
  528. consultations.value = info
  529. isEventTriggered.value = true; // 更新标志位状态
  530. }
  531. /***************************** 定义了一些事件 *****************************/
  532. // 添加不合格信息
  533. const handleAddWaste = () => {
  534. // 监听事件,暂时不用,后续会使用
  535. uni.$on('addWasteInfoEvent', (data) => {
  536. addWasteInfo(data)
  537. })
  538. var encodedId = encodeURIComponent(processInspecion.value.lot.productId);
  539. var enprocessId = encodeURIComponent(processInspecion.value.lot.processId);
  540. // 构建查询参数字符串
  541. var queryParam = `param1=${encodedId}&param2=${enprocessId}`;
  542. // 使用模板字符串构建完整的URL
  543. var navigateUrl = `/pages/firstInspection/instrumentOptions?${queryParam}`;
  544. // 导航到指定页面
  545. uni.navigateTo({
  546. url: navigateUrl
  547. });
  548. }
  549. // 删除不合格信息
  550. const handleDelWaste = (index) => {
  551. uni.showModal({
  552. title: '提示',
  553. content: '确定删除该项?',
  554. success: function(res) {
  555. if (res.confirm) {
  556. unfitInfos.value.splice(index, 1)
  557. } else if (res.cancel) {
  558. return
  559. }
  560. }
  561. })
  562. }
  563. // 咨询
  564. const handleAddConsultation = () => {
  565. console.log("9999")
  566. isEventTriggered.value = false;
  567. // 监听事件
  568. uni.$once('addWasteConsultationEvent', (data) => {
  569. if (!isEventTriggered.value) {
  570. // 如果事件尚未触发,则执行事件触发逻辑
  571. addConsultation(data)
  572. }
  573. })
  574. uni.navigateTo({
  575. url: "/pages/firstInspection/consultation",
  576. success: (res) => {
  577. // 通过eventChannel向被打开页面传送数据
  578. res.eventChannel.emit("firstInpsectionConsultation", {
  579. data: processInspecion.value.lot
  580. })
  581. }
  582. })
  583. }
  584. </script>
  585. <style lang="scss">
  586. .page-container {
  587. // height: 100%;
  588. background-color: #ececec;
  589. font-size: 28rpx;
  590. >.title {
  591. font-weight: 700;
  592. margin: 24rpx 16rpx;
  593. }
  594. }
  595. .carrier-info {
  596. margin: 32rpx 16rpx 0 16rpx;
  597. padding: 24rpx;
  598. background-color: #ffffff;
  599. border-radius: 8rpx;
  600. .carrier-code {
  601. font-size: 32rpx;
  602. font-weight: 700;
  603. }
  604. .info-row {
  605. margin-top: 16rpx;
  606. color: #767676;
  607. .label {
  608. width: 160rpx;
  609. }
  610. .drawing-btn {
  611. padding: 12rpx 32rpx;
  612. background-color: #0055ff;
  613. color: #ffffff;
  614. border-radius: 12rpx;
  615. margin-left: auto;
  616. font-size: 28rpx;
  617. }
  618. .value {
  619. flex: 1;
  620. textarea {
  621. flex: 1;
  622. border: 1px solid #888888;
  623. box-sizing: border-box;
  624. padding: 16rpx;
  625. }
  626. }
  627. }
  628. }
  629. .unfit-title {
  630. margin-bottom: 24rpx;
  631. justify-content: space-between;
  632. align-items: center;
  633. text {
  634. font-size: 28rpx;
  635. font-weight: 700;
  636. }
  637. .add-btn {
  638. padding: 12rpx 32rpx;
  639. background-color: #a4adb3;
  640. color: #ffffff;
  641. border-radius: 12rpx;
  642. font-size: 24rpx;
  643. }
  644. }
  645. .unfit-container {
  646. padding: 24rpx;
  647. margin: 0 16rpx;
  648. background-color: #ffffff;
  649. border-radius: 12rpx;
  650. .unfit-item-container {
  651. position: relative;
  652. >* {
  653. margin-bottom: 24rpx;
  654. }
  655. .title {
  656. font-weight: 700;
  657. justify-content: space-between;
  658. align-items: center;
  659. image {
  660. width: 40rpx;
  661. height: 40rpx;
  662. }
  663. }
  664. .standard {}
  665. .resu {
  666. width: 100%;
  667. align-items: center;
  668. input {
  669. margin-left: 20rpx;
  670. width: 200rpx;
  671. height: 56rpx;
  672. flex: 1;
  673. border: 1px solid #9f9f9f;
  674. font-size: 28rpx;
  675. }
  676. }
  677. .result {
  678. align-items: center;
  679. border-bottom: 1px solid #9f9f9f;
  680. padding-bottom: 32rpx;
  681. .label {
  682. flex: 1;
  683. }
  684. input {
  685. width: 280rpx;
  686. height: 56rpx;
  687. border: 1px solid #9f9f9f;
  688. font-size: 28rpx;
  689. &.number {
  690. width: 104rpx;
  691. text-align: center;
  692. }
  693. }
  694. }
  695. }
  696. .unfit-item-container:last-child {
  697. .result {
  698. border-bottom: none;
  699. padding-bottom: 0;
  700. }
  701. }
  702. }
  703. .consultation-container {
  704. margin: 0 16rpx;
  705. padding: 24rpx;
  706. background-color: #ffffff;
  707. border-radius: 8rpx;
  708. .consultation-item-container {
  709. margin-bottom: 24rpx;
  710. border-bottom: 2px solid #888888;
  711. padding-bottom: 24rpx;
  712. }
  713. .consultation-item-container:last-child {
  714. margin-bottom: 0;
  715. border-bottom: 0;
  716. padding-bottom: 0;
  717. }
  718. .question,
  719. .answer {
  720. .label {
  721. justify-content: space-between;
  722. margin-bottom: 16rpx;
  723. font-weight: 700;
  724. }
  725. .content {
  726. line-height: 40rpx;
  727. }
  728. }
  729. .answer {
  730. margin-top: 24rpx;
  731. }
  732. }
  733. .daywork-container {
  734. margin-top: 24rpx;
  735. padding: 24rpx;
  736. background-color: #ffffff;
  737. border: 1px solid #bcbcbc;
  738. .switch {
  739. margin-top: -4px;
  740. //align-items: center;
  741. }
  742. .result {
  743. align-items: center;
  744. .label {
  745. width: 112rpx;
  746. }
  747. input {
  748. flex: 1;
  749. height: 56rpx;
  750. border: 1px solid #9f9f9f;
  751. font-size: 28rpx;
  752. text-align: center;
  753. }
  754. }
  755. .remark {
  756. margin-top: 24rpx;
  757. .label {
  758. width: 112rpx;
  759. }
  760. textarea {
  761. flex: 1;
  762. border: 1px solid #9f9f9f;
  763. height: 168rpx;
  764. }
  765. }
  766. .btns-container {
  767. margin-top: 24rpx;
  768. .finished-btn {
  769. display: flex;
  770. flex: 1;
  771. height: 80rpx;
  772. background-color: #fc6565;
  773. color: #ffffff;
  774. text-align: center;
  775. justify-content: center;
  776. align-items: center;
  777. border-radius: 8rpx;
  778. }
  779. .question-btn {
  780. width: 80rpx;
  781. align-items: flex-end;
  782. image {
  783. width: 48rpx;
  784. height: 48rpx;
  785. }
  786. text {
  787. font-size: 24rpx;
  788. }
  789. }
  790. }
  791. .switch {
  792. margin-top: -8rpx;
  793. align-items: center;
  794. transform: scale(0.7);
  795. }
  796. }
  797. .uni-input-input:disabled {
  798. background-color: #f5f7fa;
  799. }
  800. .my-files {
  801. display: flex;
  802. justify-content: center;
  803. :deep(.uni-file-picker__container) {
  804. flex-direction: row;
  805. }
  806. }
  807. </style>