form.vue 23 KB

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