ipqcCheckout.vue 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528
  1. <template>
  2. <gui-page :custom-header="true" :is-header-sized="false"
  3. :header-class="['gui-theme-background-color', isLandscapeScreen?'width: 100vmax;':'']"
  4. :style="[isLandscapeScreen?'width: 100vmax':'']">
  5. <template #gHeader>
  6. <view :style="[isLandscapeScreen?'height:44px;width: 100vmax':'height:44px;']"
  7. class="gui-flex gui-nowrap gui-rows gui-align-items-center">
  8. <!-- 使用组件实现返回按钮及返回首页按钮 -->
  9. <text style="font-size:44rpx;" class="gui-header-leader-btns gui-color-white font-icons"
  10. @tap="goBack">&#xe6c5;</text>
  11. <!-- 导航文本此处也可以是其他自定义内容 -->
  12. <text :style="[isPad?'font-size: 18px':'font-size: 14px']"
  13. class="gui-h4 gui-blod gui-flex1 gui-text-center gui-color-white gui-ellipsis gui-primary-text">IPQC检验</text>
  14. <!-- 此处加一个右侧展位元素与左侧同宽,实现标题居中 -->
  15. <!-- 实际宽度请根据自己情况设置 -->
  16. <view style="width:40px;" />
  17. </view>
  18. </template>
  19. <template #gBody>
  20. <view class="ipqc-checkout">
  21. <view class="bind-button">
  22. <view v-if="!IPQCParams.processNo" class="scan-button"
  23. :style="[isPad?'font-size: 18px':'font-size: 14px']" @click="handleBindIPQCUser">
  24. <text class="font-icons" :style="[isPad?'font-size: 18px':'font-size: 14px']">&#xe6a8;</text>
  25. 绑定产线
  26. </view>
  27. </view>
  28. <view v-if="IPQCParams.processNo" class="card-list-flexbox">
  29. <text class="card-list-title" :style="[isPad?'font-size: 18px':'font-size: 14px']">IPQC检验人信息</text>
  30. <view class="card-list-item">
  31. <text>日期</text>
  32. <text>{{ $parseTime(IPQCParams.createTime) }}</text>
  33. </view>
  34. <view class="card-list-item">
  35. <text>线体</text>
  36. <text>{{ IPQCParams.location }}</text>
  37. </view>
  38. <view class="card-list-item">
  39. <text>生产料号</text>
  40. <text>{{ IPQCParams.materialNo }}</text>
  41. </view>
  42. <view class="card-list-item">
  43. <text>IPQC检验员</text>
  44. <text>{{ IPQCParams.nickName }}</text>
  45. </view>
  46. <view class="card-list-item">
  47. <text>作业员</text>
  48. <text>{{ IPQCParams.operator }}</text>
  49. </view>
  50. <view class="card-list-item">
  51. <text>QC组长审核</text>
  52. <text>{{ IPQCParams.auditor }}</text>
  53. </view>
  54. <view v-if="IPQCParams.firstInspectionControl === true && IPQCParams.timeSplot === 0"
  55. class="card-list-item">
  56. <text>允许生成次数</text>
  57. <text>{{ IPQCParams.firstInspectionRetrialTimes }}</text>
  58. </view>
  59. <view v-if="IPQCParams.firstInspectionControl === true && IPQCParams.timeSplot === 0"
  60. class="card-list-item">
  61. <text>已生成次数</text>
  62. <text>{{ IPQCParams.firstInspectionSubmitTimes }}</text>
  63. </view>
  64. </view>
  65. <view v-if="IPQCParams.processNo" class="scan">
  66. <view class="scan-card">
  67. <uni-easyinput ref="easyinput" v-model="userNumber" :input-border="false" :clearable="false"
  68. type="text" focus placeholder="绑定员工工号" @focus="handleInputFocus" @confirm="confirmUser" />
  69. <text class="font-icons" @click="handleBindUser">&#xe6b7;</text>
  70. </view>
  71. </view>
  72. <view v-if="IPQCParams.processNo" class="select-group">
  73. <view class="select-item">
  74. <text class="store-text">检验时间</text>
  75. <view class="custom-select">
  76. <uni-data-select v-model="IPQCParams.timeSplot" :localdata="IPQCTime"
  77. @change="handleSelectTime" />
  78. </view>
  79. <view v-if="IPQCParams.auditStatus !== -1" style="
  80. width: 75px;
  81. height: 30px;
  82. display: flex;
  83. align-items: center;
  84. justify-content: center;
  85. border: 1px solid gray;
  86. border-radius: 6px;
  87. font-size: 14px;
  88. margin-left: 8px;
  89. color: gray;
  90. ">{{ computedBtnText(timeSelect) }}</view>
  91. <picker v-else mode="time"
  92. style="width: 20%;min-width: 85px;height: 40px;display: flex;justify-content: center;align-items: center;"
  93. :value="timeSelect.time" @change="bindTimeChange($event)">
  94. <view class="uni-input" style="
  95. width: 75px;
  96. height: 30px;
  97. display: flex;
  98. align-items: center;
  99. justify-content: center;
  100. border: 1px solid #6a6a6a;
  101. border-radius: 6px;
  102. font-size: 14px;
  103. ">
  104. {{ computedBtnText(timeSelect) }}
  105. </view>
  106. </picker>
  107. </view>
  108. </view>
  109. <view v-if="IPQCItemList?.length > 0" class="custom-table">
  110. <uni-table border stripe empty-text="暂无更多数据">
  111. <!-- 表头行 -->
  112. <uni-tr class="custom-table-head">
  113. <uni-th align="center" width="60px">序号</uni-th>
  114. <uni-th align="center" width="120px">是否检验</uni-th>
  115. <uni-th align="center" width="240px">{{ IPQCParams.processName }}</uni-th>
  116. <uni-th align="center" width="140px">巡检频次</uni-th>
  117. <uni-th align="center" width="140px">检验工具</uni-th>
  118. </uni-tr>
  119. <!-- 表格数据行 -->
  120. <uni-tr v-for="(item, key) in IPQCItemList" :key="key" @click="handleShowModal(item)">
  121. <uni-td align="center" width="120px">{{ ++key }}</uni-td>
  122. <uni-td align="center">
  123. <view style="display: flex;justify-content: center;align-items: center;">
  124. <text v-if="item.completed" class="font-icons"
  125. :style="[isPad?'font-size: 24px':'font-size: 22px', 'color: #2dc252']">&#xe6dd;</text>
  126. <text v-else class="font-icons"
  127. :style="[isPad?'font-size: 24px':'font-size: 22px', 'color: #6a6a6a']">&#xe6e0;</text>
  128. <text v-if="item.voidOrNot * 1 === 1" style="margin-left: 4px;">报废</text>
  129. <text v-else style="margin-left: 4px;">{{ item.completed? '已检': '未检' }}</text>
  130. </view>
  131. </uni-td>
  132. <uni-td align="center"
  133. :style="[item.voidOrNot * 1 === 1?'text-decoration: line-through;':'']">{{ item.inspectionName }}</uni-td>
  134. <uni-td align="center"
  135. :style="[item.voidOrNot * 1 === 1?'text-decoration: line-through;':'']">{{ item.checkQuantity }}</uni-td>
  136. <uni-td align="center"
  137. :style="[item.voidOrNot * 1 === 1?'text-decoration: line-through;':'']">{{ item.tool }}</uni-td>
  138. </uni-tr>
  139. </uni-table>
  140. </view>
  141. </view>
  142. <uni-popup ref="popup" background-color="#fff" :mask-click="false">
  143. <view class="popup-content">
  144. <view class="card-list-flexbox-popup">
  145. <view class="card-list-item">
  146. <text class="text-1 gui-color-gray">{{ submitIPQCItem.inspectionName }}</text>
  147. </view>
  148. <view class="card-list-item">
  149. <text class="text-1 gui-color-gray">检验方法</text>
  150. <text class="text-2 gui-color-gray">{{ IPQCParams.processName }}</text>
  151. </view>
  152. <view class="card-list-item">
  153. <text class="text-1 gui-color-gray">检验工具</text>
  154. <text class="text-2 gui-color-gray">{{ submitIPQCItem.tool }}</text>
  155. </view>
  156. <view class="card-list-item">
  157. <text class="text-1 gui-color-gray">检验频次</text>
  158. <text class="text-2 gui-color-gray">{{ submitIPQCItem.checkQuantity }}</text>
  159. </view>
  160. <view class="card-list-item">
  161. <text class="text-1 gui-color-gray">检验标准</text>
  162. <text class="text-2 gui-color-gray">{{ submitIPQCItem.standard }}</text>
  163. </view>
  164. <view class="card-list-item">
  165. <text class="text-1 gui-color-gray">是否合格</text>
  166. <text class="text-2 gui-color-gray">
  167. <radio-group style="width: inherit;" @change="radioChange">
  168. <view
  169. style="display: grid;grid-template-rows: 1fr; grid-template-columns: 1fr 1fr;">
  170. <label>
  171. <view style="display: flex;justify-content: center;align-items: center;">
  172. <radio value="1"
  173. :checked="submitIPQCItem.singleResult * 1 === 1?true:false" />
  174. <view>合格</view>
  175. </view>
  176. </label>
  177. <label>
  178. <view style="display: flex;justify-content: center;align-items: center;">
  179. <radio value="0"
  180. :checked="submitIPQCItem.singleResult * 1 === 0?true:false" />
  181. <view>不合格</view>
  182. </view>
  183. </label>
  184. </view>
  185. </radio-group>
  186. </text>
  187. </view>
  188. <view v-if="submitIPQCItem.inspectionModel === 0" class="card-list-item-input">
  189. <view v-for="(item, key) in submitIPQCItem.actualCreateReqVOS" :key="key"
  190. style="margin: 4px 0;">
  191. <textarea v-model="submitIPQCItem.actualCreateReqVOS[key].actual"
  192. class="text-3 gui-color-gray" inputmode="decimal" placeholder="请输入检验内容"
  193. style="border-radius: 4px;border: 1px dotted gray;" auto-height maxlength="14" />
  194. <view v-if="key === submitIPQCItem.actualCreateReqVOS.length - 1" class="operation-icon"
  195. @click="appendRow(item)">
  196. <text class="font-icons"
  197. :style="[isPad?'font-size: 18px':'font-size: 14px']">&#xe664;</text>
  198. </view>
  199. <view v-else class="operation-icon-2" @click="deleteRow(item, key)">
  200. <text class="font-icons"
  201. :style="[isPad?'font-size: 18px':'font-size: 14px']">&#xe677;</text>
  202. </view>
  203. </view>
  204. </view>
  205. <view v-if="submitIPQCItem.inspectionModel === 1" class="card-list-item-input">
  206. <textarea v-model="submitIPQCItem.measuredResults" class="text-3 gui-color-gray"
  207. inputmode="text" placeholder="请输入检验内容"
  208. style="border-radius: 4px;border: 1px dotted gray;margin: 2px 4px;" auto-height
  209. maxlength="14" />
  210. </view>
  211. <view v-if="submitIPQCItem.src?.length > 0" class="card-list-item">
  212. <text class="text-1">上传图片预览:</text>
  213. </view>
  214. <view v-if="submitIPQCItem.src?.length > 0" class="card-list-item grid-image"
  215. style="margin: 12px 0">
  216. <image v-for="(item, key) in submitIPQCItem.src" :key="key" :src="item" mode="scaleToFill"
  217. @click="handleRemoveImage(item, key)" />
  218. </view>
  219. <view v-if="IPQCParams.auditStatus === -1" class="card-list-item">
  220. <button class="text-1 btn-mg" type="primary" @click="takePhoto">拍照</button>
  221. </view>
  222. <view class="card-list-item" style="margin: 12px 0">
  223. <button v-if="IPQCParams.auditStatus === -1" class="text-1 btn-mg" type="primary"
  224. :disabled="reLoading" @click="handleSubmit">提交数据</button>
  225. <button class="text-1 btn-mg" type="default" @click="$refs['popup'].close()">关闭</button>
  226. </view>
  227. </view>
  228. </view>
  229. </uni-popup>
  230. <uni-popup ref="popupProcess" background-color="#fff">
  231. <view class="popup-process-content">
  232. <view class="list-title" style="margin-bottom: 8px;">
  233. <span class="font-icons"
  234. style="font-size: 20px;color: #00a0e9;width: 40px;text-align: center;">&#xe6a3;</span>
  235. <span>工序列表</span>
  236. </view>
  237. <view>
  238. <view class="grid-box">
  239. <view v-for="(item, key) in processList" :key="key" class="box"
  240. @click="handleClickProcessName(item)">{{ item.processName }}</view>
  241. </view>
  242. </view>
  243. </view>
  244. </uni-popup>
  245. <gui-right-menus v-if="IPQCParams.version">
  246. <!-- 扩展按钮 -->
  247. <template #menus-more>
  248. <view v-if="IPQCParams.auditStatus === -1" hover-class="gui-tap"
  249. class="menu-items gui-bg-green gui-flex gui-columns gui-justify-content-center"
  250. @click="handleShowSubmitApprovalModal">
  251. <text class="menu-text gui-block gui-text-center gui-color-white">送审</text>
  252. </view>
  253. <view v-else hover-class="gui-tap"
  254. class="menu-items gui-flex gui-columns gui-justify-content-center"
  255. style="background-color: #717171;">
  256. <text class="menu-text gui-block gui-text-center gui-color-white">送审</text>
  257. </view>
  258. </template>
  259. <!-- 核心按钮 -->
  260. <template #menus-primary>
  261. <view class="menu-items gui-bg-primary gui-flex gui-columns gui-justify-content-center">
  262. <text class="menu-icon gui-color-white gui-block gui-text-center gui-icons">&#xe614;</text>
  263. <text class="menu-text gui-color-white gui-block gui-text-center">操作</text>
  264. </view>
  265. </template>
  266. </gui-right-menus>
  267. <gui-modal ref="modalForm" :custom-class="['gui-bg-white', 'gui-dark-bg-level-3', 'gui-border-radius']"
  268. title="提示">
  269. <template #content>
  270. <view class="gui-padding gui-bg-gray gui-dark-bg-level-2">
  271. <text class="gui-block gui-text-center gui-text gui-color-gray"
  272. style="line-height:100rpx; padding:10rpx;">您确定要立即送审吗?</text>
  273. </view>
  274. </template>
  275. <!-- 利用 flex 布局 可以放置多个自定义按钮哦 -->
  276. <template #btns>
  277. <view class="gui-flex gui-row gui-space-between operation-flex">
  278. <view hover-class="gui-tap" class="modal-btns gui-flex1" @tap="handleCancelApprovalModal">
  279. <text class="modal-btns gui-color-gray">取消</text>
  280. </view>
  281. <view class="line" />
  282. <view hover-class="gui-tap" class="modal-btns gui-flex1" @tap="handleSubmitApprovalModal">
  283. <text class="modal-btns gui-primary-color">确认</text>
  284. </view>
  285. </view>
  286. </template>
  287. </gui-modal>
  288. <uni-popup ref="errorTip" type="dialog">
  289. <uni-popup-dialog type="error" cancel-text="关闭" confirm-text="确认" title="提示" :content="errorTipMessage"
  290. @confirm="handleCloseErrorTipsModal" @close="handleCloseErrorTipsModal" />
  291. </uni-popup>
  292. </template>
  293. </gui-page>
  294. </template>
  295. <script>
  296. import axios from 'axios'
  297. import {
  298. computed,
  299. defineComponent,
  300. onMounted,
  301. ref,
  302. watch
  303. } from 'vue'
  304. export default defineComponent({
  305. onLoad() {
  306. // // #ifdef APP-PLUS
  307. // plus.screen.lockOrientation('default');
  308. // // #endif
  309. },
  310. onUnload() {
  311. // // #ifdef APP-PLUS
  312. // plus.screen.lockOrientation('portrait-primary');
  313. // // #endif
  314. },
  315. onResize() {
  316. if ([90, -90].includes(plus.navigator.getOrientation())) {
  317. this.isLandscapeScreen = true
  318. } else {
  319. this.isLandscapeScreen = false
  320. }
  321. },
  322. setup(options) {
  323. const popup = ref()
  324. const popupProcess = ref()
  325. const modalForm = ref()
  326. const userNumber = ref()
  327. const easyinput = ref()
  328. const errorState = ref(0)
  329. const errorTip = ref('')
  330. const errorTipMessage = ref('')
  331. const isLandscapeScreen = ref(false)
  332. const parentRow = options?.params ?? {}
  333. const processList = ref([])
  334. // 是否禁用提交数据按钮
  335. const reLoading = ref(false)
  336. // 绑定的检查人信息
  337. const IPQCParams = ref({
  338. operator: '',
  339. createTime: '',
  340. location: '',
  341. materialNo: '',
  342. nickName: '',
  343. mesroutingListId: '',
  344. processNo: '',
  345. mesHotPressId: '',
  346. productionCode: '',
  347. ipqcDate: '',
  348. timeSplot: 0,
  349. time: '',
  350. processName: '',
  351. auditStatus: null,
  352. auditor: '',
  353. version: '',
  354. materialLots: '',
  355. erpWorkOrderNo: '',
  356. firstInspectionControl: '',
  357. firstInspectionSubmitTimes: '',
  358. firstInspectionRetrialTimes: '',
  359. erpProductionWorkOrderDetailId: '',
  360. wmsIncomingReceiptInspectionId: ''
  361. })
  362. const IPQCItemList = ref([])
  363. // 待巡检项信息
  364. const submitIPQCItem = ref({
  365. src: [],
  366. singleResult: '',
  367. measuredResults: null,
  368. id: '',
  369. inspectionModel: null,
  370. timeSplot: null,
  371. actualCreateReqVOS: [{
  372. id: '',
  373. actual: 0
  374. }],
  375. fileIds: []
  376. })
  377. // 检验时间右边的按钮存放的信息
  378. const timeSelect = ref({
  379. id: 0,
  380. text: '首件时间',
  381. value: 0,
  382. time: ''
  383. })
  384. const IPQCTime = ref([{
  385. id: 0,
  386. text: '首件时间',
  387. value: 0,
  388. time: ''
  389. },
  390. {
  391. id: 1,
  392. text: '巡检时间',
  393. value: 1,
  394. time: ''
  395. },
  396. {
  397. id: 2,
  398. text: '巡检时间',
  399. value: 2,
  400. time: ''
  401. },
  402. {
  403. id: 3,
  404. text: '巡检时间',
  405. value: 3,
  406. time: ''
  407. },
  408. {
  409. id: 4,
  410. text: '巡检时间',
  411. value: 4,
  412. time: ''
  413. }, {
  414. id: 5,
  415. text: '尾件时间',
  416. value: 5,
  417. time: ''
  418. }
  419. ])
  420. const computedBtnText = computed(() => {
  421. return item => {
  422. const fdIndex = IPQCTime.value.findIndex(opt => opt.id === item.id)
  423. if (fdIndex !== -1 && IPQCTime.value[fdIndex].time) {
  424. return IPQCTime.value[fdIndex].time
  425. }
  426. return '设置时间'
  427. }
  428. })
  429. onMounted(() => {
  430. IPQCParams.value.materialNo = JSON.parse(parentRow)?.materialNo
  431. IPQCParams.value.erpProductionWorkOrderDetailId = JSON.parse(parentRow)?.id
  432. })
  433. // 根据时间选择器选择的数据进行填充
  434. watch([timeSelect.value], ([opt]) => {
  435. const fdIndex = IPQCTime.value.findIndex(item => item.id === opt.id)
  436. if (!['', null, undefined, NaN].includes(opt.id)) {
  437. Object.assign(IPQCTime.value[fdIndex], opt)
  438. }
  439. IPQCParams.value.timeSplot = opt?.id
  440. IPQCParams.value.time = opt?.time
  441. })
  442. const goBack = function() {
  443. uni.$goBack('/pages/workbranch/production/IPQC/ipqcList')
  444. }
  445. const appendRow = function(row) {
  446. submitIPQCItem.value.actualCreateReqVOS.push({
  447. id: '',
  448. actual: ''
  449. })
  450. }
  451. const deleteRow = function(row, index) {
  452. submitIPQCItem.value.actualCreateReqVOS.splice(index, 1)
  453. // if (row?.id) {
  454. // // 走删除接口
  455. // } else {
  456. // submitIPQCItem.value.actualCreateReqVOS.splice(index, 1);
  457. // }
  458. }
  459. const confirmUser = function(e) {
  460. const submitParams = {
  461. wmsIncomingReceiptInspectionId: IPQCParams.value
  462. .wmsIncomingReceiptInspectionId,
  463. timeSplot: IPQCParams.value.timeSplot,
  464. operator: e
  465. }
  466. uni.$reqPost('ipqcBindUserNumber', submitParams)
  467. .then(({
  468. code,
  469. data,
  470. msg
  471. }) => {
  472. if (code === 0) {
  473. uni.showToast({
  474. title: '员工绑定成功',
  475. icon: 'none',
  476. duration: 2000
  477. })
  478. errorState.value = 0;
  479. setInputFocus()
  480. getItemList()
  481. } else {
  482. // #ifdef APP-PLUS
  483. plus.device.beep(2)
  484. // #endif
  485. errorTipMessage.value = msg
  486. errorTip.value.open()
  487. errorState.value = -1
  488. }
  489. })
  490. }
  491. const handleBindUser = function() {
  492. // #ifdef APP-PLUS
  493. const mpaasScanModule = uni.requireNativePlugin('Mpaas-Scan-Module')
  494. mpaasScanModule.mpaasScan({
  495. // 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
  496. 'scanType': ['qrCode', 'barCode'],
  497. // 是否隐藏相册,默认false不隐藏
  498. 'hideAlbum': false
  499. },
  500. (ret) => {
  501. if (ret.resp_code === 1000) {
  502. const submitParams = {
  503. wmsIncomingReceiptInspectionId: IPQCParams.value
  504. .wmsIncomingReceiptInspectionId,
  505. timeSplot: IPQCParams.value.timeSplot,
  506. operator: ret.resp_result
  507. }
  508. uni.$reqPost('ipqcBindUserNumber', submitParams)
  509. .then(({
  510. code,
  511. data,
  512. msg
  513. }) => {
  514. if (code === 0) {
  515. uni.showToast({
  516. title: '员工绑定成功',
  517. icon: 'none',
  518. duration: 2000
  519. })
  520. errorState.value = 0;
  521. setInputFocus()
  522. getItemList()
  523. } else {
  524. // #ifdef APP-PLUS
  525. plus.device.beep(2)
  526. // #endif
  527. errorTipMessage.value = msg
  528. errorTip.value.open()
  529. errorState.value = -1
  530. }
  531. })
  532. }
  533. })
  534. // #endif
  535. // #ifdef H5
  536. const submitParams = {
  537. wmsIncomingReceiptInspectionId: IPQCParams.value
  538. .wmsIncomingReceiptInspectionId,
  539. timeSplot: IPQCParams.value.timeSplot,
  540. operator: 'MTY2OTYwODI3MDg0MTA5ODI0MQ=='
  541. }
  542. uni.$reqPost('ipqcBindUserNumber', submitParams)
  543. .then(({
  544. code,
  545. data,
  546. msg
  547. }) => {
  548. if (code === 0) {
  549. uni.showToast({
  550. title: '员工绑定成功',
  551. icon: 'none',
  552. duration: 2000
  553. })
  554. errorState.value = 0;
  555. setInputFocus()
  556. getItemList()
  557. } else {
  558. // #ifdef APP-PLUS
  559. plus.device.beep(2)
  560. // #endif
  561. errorTipMessage.value = msg
  562. errorTip.value.open()
  563. errorState.value = -1
  564. }
  565. })
  566. // #endif
  567. }
  568. const getItemList = async function() {
  569. if (!['', null, undefined, NaN].includes(IPQCParams.value.timeSplot)) {
  570. const params = JSON.parse(JSON.stringify(IPQCParams.value))
  571. Reflect.deleteProperty(params, 'createTime')
  572. Reflect.deleteProperty(params, 'time')
  573. Reflect.deleteProperty(params, 'nickName')
  574. Reflect.deleteProperty(params, 'location')
  575. Reflect.deleteProperty(params, 'id')
  576. Reflect.deleteProperty(params, 'auditor')
  577. Reflect.deleteProperty(params, 'auditStatus')
  578. Reflect.deleteProperty(params, 'wmsIncomingReceiptInspectionId')
  579. const month = new Date().getMonth() + 1
  580. const day = new Date().getDate()
  581. params.ipqcDate = new Date().getFullYear() + '' + (month < 10 ? ('0' + month) :
  582. month) + '' + (day < 10 ? ('0' + day) : day)
  583. await uni.$reqPost('getIPQCItemList', params)
  584. .then(({ code, data, msg }) => {
  585. IPQCItemList.value = data?.list
  586. IPQCParams.value.wmsIncomingReceiptInspectionId = data
  587. ?.wmsIncomingReceiptInspectionId
  588. IPQCParams.value.operator = data
  589. ?.operator
  590. IPQCParams.value.createTime = data?.createTime
  591. IPQCParams.value.nickName = data?.inspector
  592. IPQCParams.value.time = data?.inspectionTime
  593. IPQCParams.value.auditor = data?.auditor
  594. IPQCParams.value.auditStatus = data?.auditStatus
  595. IPQCParams.value.materialLots = data?.materialLots
  596. IPQCParams.value.version = data?.version
  597. timeSelect.value.time = data?.inspectionTime
  598. })
  599. }
  600. }
  601. // 检验时间下拉框选择事件
  602. const handleSelectTime = function(e) {
  603. const selectItem = IPQCTime.value.find(item => item.id === e)
  604. Object.assign(timeSelect.value, selectItem ?? {})
  605. const month = new Date().getMonth() + 1
  606. const day = new Date().getDate()
  607. const params = {
  608. 'timeSplot': e,
  609. 'ipqcDate': new Date().getFullYear() + '' + (
  610. month < 10 ? ('0' +
  611. month) :
  612. month) + '' + (day < 10 ? ('0' + day) : day),
  613. 'productionCode': IPQCParams.value.productionCode,
  614. 'mesHotPressId': IPQCParams.value.mesHotPressId,
  615. 'processNo': IPQCParams.value.processNo,
  616. 'mesRoutingListId': IPQCParams.value.mesRoutingListId,
  617. 'materialNo': IPQCParams.value.materialNo,
  618. 'erpWorkOrderNo': IPQCParams.value.erpWorkOrderNo ?? '',
  619. 'firstInspectionControl': IPQCParams.value.firstInspectionControl,
  620. 'firstInspectionRetrialTimes': IPQCParams.value.firstInspectionRetrialTimes,
  621. 'erpProductionWorkOrderDetailId': IPQCParams.value.erpProductionWorkOrderDetailId
  622. }
  623. uni.$reqPost('getListRule', params).then(({
  624. code,
  625. data,
  626. msg
  627. }) => {
  628. if (code === 0) {
  629. getItemList()
  630. } else {
  631. // #ifdef APP-PLUS
  632. plus.device.beep(2)
  633. // #endif
  634. errorTipMessage.value = msg
  635. errorTip.value.open()
  636. errorState.value = 0
  637. }
  638. })
  639. }
  640. // 时间选择器选择事件
  641. const bindTimeChange = async function(e) {
  642. if (!['', null, undefined, NaN].includes(IPQCParams.value.timeSplot) && IPQCParams.value
  643. .auditStatus === -1) {
  644. timeSelect.value.time = e.detail.value
  645. const params = {
  646. wmsIncomingReceiptInspectionId: IPQCParams.value
  647. .wmsIncomingReceiptInspectionId,
  648. timeSplot: IPQCParams.value.timeSplot,
  649. inspectionTime: e.detail.value
  650. }
  651. try {
  652. await uni.$reqPost('insertIPQCTimeSplot', params)
  653. } catch (e) {
  654. uni.$grace.msg(e)
  655. }
  656. }
  657. }
  658. // 绑定检验执行人
  659. const handleBindIPQCUser = function() {
  660. uni.$reqGet('scanBindProduction', {
  661. // id: "1668903422169890817"
  662. id: '1605796881528524802'
  663. })
  664. .then(async ({
  665. data
  666. }) => {
  667. await uni.$reqGet('getProductionWorkOrderProcessList', {
  668. id: IPQCParams.value.erpProductionWorkOrderDetailId
  669. })
  670. .then(({
  671. code,
  672. data,
  673. msg
  674. }) => {
  675. if (code === 0) {
  676. processList.value = data
  677. } else {
  678. // #ifdef APP-PLUS
  679. plus.device.beep(2)
  680. // #endif
  681. errorTipMessage.value = msg
  682. errorTip.value.open()
  683. errorState.value = -1
  684. }
  685. })
  686. if (popupProcess.value?.showPopup === false) {
  687. popupProcess.value.open('bottom')
  688. }
  689. })
  690. }
  691. // 选择工序
  692. const handleClickProcessName = async function(data) {
  693. IPQCParams.value.id = data?.id
  694. // IPQCParams.value.location = data?.productionName;
  695. IPQCParams.value.productionCode = data?.productionCode ?? '1605796881528524802'
  696. IPQCParams.value.mesRoutingListId = data?.mesRoutingListId ?? ''
  697. IPQCParams.value.processNo = data?.processNo ?? ''
  698. IPQCParams.value.processName = data?.processName ?? ''
  699. IPQCParams.value.mesHotPressId = data?.mesHotPressId ?? ''
  700. IPQCParams.value.erpWorkOrderNo = data?.erpWorkOrderNo ?? ''
  701. IPQCParams.value.firstInspectionControl = data?.firstInspectionControl ?? ''
  702. IPQCParams.value.firstInspectionRetrialTimes = data?.firstInspectionRetrialTimes ?? ''
  703. const month = new Date().getMonth() + 1
  704. const day = new Date().getDate()
  705. const params = {
  706. 'timeSplot': 0,
  707. 'ipqcDate': new Date().getFullYear() + '' + (
  708. month < 10 ? ('0' +
  709. month) :
  710. month) + '' + (day < 10 ? ('0' + day) : day),
  711. 'productionCode': data?.productionCode ?? '1605796881528524802',
  712. 'mesHotPressId': data?.mesHotPressId,
  713. 'processNo': IPQCParams.value.processNo,
  714. 'mesRoutingListId': IPQCParams.value.mesRoutingListId,
  715. 'materialNo': IPQCParams.value.materialNo,
  716. 'erpWorkOrderNo': data?.erpWorkOrderNo ?? '',
  717. 'firstInspectionControl': data?.firstInspectionControl,
  718. 'firstInspectionRetrialTimes': data?.firstInspectionRetrialTimes,
  719. 'erpProductionWorkOrderDetailId': IPQCParams.value.erpProductionWorkOrderDetailId
  720. }
  721. await uni.$reqPost('getListRule', params).then(({
  722. code,
  723. data,
  724. msg
  725. }) => {
  726. if (code === 0) {
  727. getItemList()
  728. Object.assign(IPQCParams.value, data)
  729. } else {
  730. // #ifdef APP-PLUS
  731. plus.device.beep(2)
  732. // #endif
  733. errorTipMessage.value = msg
  734. errorTip.value.open()
  735. errorState.value = 0
  736. }
  737. popupProcess.value.close()
  738. })
  739. }
  740. const scinumToFloat = function(num) {
  741. // 处理非数字
  742. if (isNaN(num)) {
  743. return num
  744. }
  745. // 处理不需要转换的数字
  746. var str = '' + num
  747. if (!/e/i.test(str)) {
  748. return num
  749. }
  750. return (num).toFixed(18).replace(/\.?0+$/, '')
  751. }
  752. // 开始检验
  753. const handleShowModal = function(opt) {
  754. if (opt?.voidOrNot * 1 !== 1) {
  755. Object.assign(submitIPQCItem.value, opt)
  756. submitIPQCItem.value.id = opt?.id
  757. submitIPQCItem.value.timeSplot = IPQCParams.value?.timeSplot
  758. submitIPQCItem.value.inspectionModel = opt?.inspectionModel
  759. uni.$reqGet('getResult', {
  760. id: opt?.id
  761. })
  762. .then((data) => {
  763. if (data.actualDOS !== null && Object.prototype.toString.call(data
  764. .actualDOS) ===
  765. '[object Array]' && data.actualDOS.length > 0) {
  766. submitIPQCItem.value.actualCreateReqVOS.length = 0
  767. data?.actualDOS.forEach(item => {
  768. const actual = scinumToFloat(item?.actual)
  769. submitIPQCItem.value.actualCreateReqVOS.push({
  770. ...item,
  771. actual
  772. })
  773. })
  774. } else {
  775. submitIPQCItem.value.actualCreateReqVOS = [{
  776. id: '',
  777. actual: ''
  778. }]
  779. }
  780. if (data.fileIds !== null) {
  781. submitIPQCItem.value.fileIds = data?.fileIds ?? []
  782. }
  783. submitIPQCItem.value.measuredResults = data?.measuredResults ?? ''
  784. if (data?.urlList !== null) {
  785. submitIPQCItem.value.src = data?.urlList
  786. } else {
  787. submitIPQCItem.value.src = []
  788. }
  789. })
  790. if (popup.value?.showPopup === false) {
  791. popup.value.open('bottom')
  792. }
  793. }
  794. }
  795. const handleSubmit = async function() {
  796. reLoading.value = true
  797. const actualCreateReqVOS = []
  798. if (submitIPQCItem.value.inspectionModel === 0) {
  799. try {
  800. submitIPQCItem.value
  801. .actualCreateReqVOS.forEach(item => {
  802. if (isNaN(Number(item.actual))) {
  803. throw new Error('请填写正确的数值!')
  804. } else {
  805. actualCreateReqVOS.push({
  806. id: '',
  807. ...item,
  808. actual: item.actual
  809. })
  810. }
  811. })
  812. reLoading.value = false
  813. } catch (e) {
  814. uni.$grace.msg(e.message)
  815. return
  816. }
  817. }
  818. const params = {
  819. fileIds: submitIPQCItem.value.fileIds,
  820. actualCreateReqVOS,
  821. singleResult: submitIPQCItem.value.singleResult,
  822. measuredResults: submitIPQCItem.value.measuredResults,
  823. id: submitIPQCItem.value.id,
  824. materialLots: IPQCParams.value.materialLots,
  825. inspectionModel: submitIPQCItem.value.inspectionModel,
  826. timeSplot: submitIPQCItem.value.timeSplot,
  827. processNo: IPQCParams.value.processNo
  828. }
  829. const data = await uni.$reqPut('submitItem', params)
  830. if (data?.code === 0) {
  831. reLoading.value = false
  832. uni.$grace.msg('数据提交成功!')
  833. popup.value.close()
  834. // 重新获取检验项数据
  835. const month = new Date().getMonth() + 1
  836. const day = new Date().getDate()
  837. const params = {
  838. 'timeSplot': 0,
  839. 'ipqcDate': new Date().getFullYear() + '' + (
  840. month < 10 ? ('0' +
  841. month) :
  842. month) + '' + (day < 10 ? ('0' + day) : day),
  843. 'productionCode': IPQCParams.value.productionCode,
  844. 'mesHotPressId': IPQCParams.value.mesHotPressId,
  845. 'processNo': IPQCParams.value.processNo,
  846. 'mesRoutingListId': IPQCParams.value.mesRoutingListId,
  847. 'materialNo': IPQCParams.value.materialNo,
  848. 'erpWorkOrderNo': IPQCParams.value.erpWorkOrderNo ?? '',
  849. 'firstInspectionControl': IPQCParams.value.firstInspectionControl,
  850. 'firstInspectionRetrialTimes': IPQCParams.value.firstInspectionRetrialTimes,
  851. 'erpProductionWorkOrderDetailId': IPQCParams.value
  852. .erpProductionWorkOrderDetailId
  853. }
  854. setTimeout(async () => {
  855. await uni.$reqPost('getListRule', params)
  856. await getItemList()
  857. }, 500)
  858. } else {
  859. // #ifdef APP-PLUS
  860. plus.device.beep(2)
  861. // #endif
  862. errorTipMessage.value = data?.msg
  863. errorTip.value.open()
  864. errorState.value = -1
  865. }
  866. }
  867. // 拍照
  868. const takePhoto = function() {
  869. uni.chooseImage({
  870. count: 6, // count: 6, //默认9
  871. sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
  872. sourceType: ['album', 'camera'], // 从相册选择
  873. success: function(res) {
  874. res.tempFilePaths.forEach(async item => {
  875. // #ifdef APP-PLUS
  876. // 移动端无法使用FormData类型
  877. // 使用uniapp官方提供的uploadFile函数替代实现文件上传
  878. await uni.uploadFile({
  879. url: uni.$baseUrl +
  880. '/admin-api/minio/files/uploadFiles',
  881. name: 'file',
  882. filePath: item,
  883. header: {
  884. 'Authorization': 'Bearer ' + uni
  885. .getStorageSync('token')
  886. },
  887. success: function(uploadFileRes) {
  888. const resultJSON = JSON.parse(
  889. uploadFileRes.data)
  890. if (submitIPQCItem.value.fileIds ===
  891. null) {
  892. submitIPQCItem.value.fileIds = []
  893. }
  894. submitIPQCItem.value.fileIds.push(
  895. resultJSON.data
  896. .fileId)
  897. }
  898. })
  899. // #endif
  900. submitIPQCItem.value.src.push(item)
  901. })
  902. res.tempFiles.forEach(async (item) => {
  903. // #ifdef H5
  904. const formData = new FormData()
  905. formData.append('file', item)
  906. // 上传文件
  907. const {
  908. data
  909. } = await axios({
  910. url: uni.$baseUrl +
  911. '/admin-api/minio/files/uploadFiles',
  912. name: '上传文件',
  913. method: 'post',
  914. headers: {
  915. 'Authorization': 'Bearer ' + uni
  916. .getStorageSync('token'),
  917. 'Content-Type': 'multipart/form-data;'
  918. },
  919. data: formData
  920. })
  921. if (submitIPQCItem.value.fileIds === null) {
  922. submitIPQCItem.value.fileIds = []
  923. }
  924. submitIPQCItem.value.fileIds.push(data.data.fileId)
  925. // #endif
  926. })
  927. }
  928. })
  929. }
  930. const radioChange = function(item) {
  931. submitIPQCItem.value.singleResult = item?.detail?.value
  932. }
  933. const handleRemoveImage = function(opt, index) {
  934. submitIPQCItem.value.fileIds.splice(index, 1)
  935. submitIPQCItem.value.src.splice(index, 1)
  936. }
  937. const handleShowSubmitApprovalModal = function() {
  938. modalForm.value.open()
  939. }
  940. const handleCancelApprovalModal = function() {
  941. modalForm.value.close()
  942. }
  943. const handleSubmitApprovalModal = function() {
  944. const params = {
  945. version: IPQCParams.value.version,
  946. materialLots: IPQCParams.value.materialLots,
  947. processNo: IPQCParams.value.processNo,
  948. materialNo: IPQCParams.value.materialNo
  949. }
  950. uni.$reqPost('submitApproval', params)
  951. .then(({
  952. code,
  953. data,
  954. msg
  955. }) => {
  956. if (code === 0) {
  957. uni.showToast({
  958. title: '送审成功!',
  959. icon: 'none',
  960. duration: 2000
  961. })
  962. setTimeout(() => {
  963. goBack()
  964. }, 1000)
  965. } else {
  966. // #ifdef APP-PLUS
  967. plus.device.beep(2)
  968. // #endif
  969. errorTipMessage.value = msg
  970. errorTip.value.open()
  971. errorState.value = -1
  972. }
  973. })
  974. .finally(() => {
  975. modalForm.value.close()
  976. })
  977. }
  978. const setInputFocus = function() {
  979. if (errorState.value === 0) {
  980. userNumber.value = ''
  981. easyinput.value.onBlur()
  982. easyinput.value.onFocus()
  983. }
  984. }
  985. // 关闭错误信息弹窗
  986. const handleCloseErrorTipsModal = async function() {
  987. errorTip.value.close()
  988. await setInputFocus()
  989. }
  990. // 禁用软键盘
  991. const handleInputFocus = function() {
  992. setTimeout(() => {
  993. uni.hideKeyboard()
  994. }, 100)
  995. }
  996. return {
  997. popup,
  998. easyinput,
  999. errorTip,
  1000. errorState,
  1001. errorTipMessage,
  1002. popupProcess,
  1003. handleInputFocus,
  1004. goBack,
  1005. IPQCTime,
  1006. reLoading,
  1007. modalForm,
  1008. takePhoto,
  1009. timeSelect,
  1010. IPQCItemList,
  1011. processList,
  1012. appendRow,
  1013. deleteRow,
  1014. userNumber,
  1015. isLandscapeScreen,
  1016. IPQCParams,
  1017. radioChange,
  1018. handleBindIPQCUser,
  1019. handleShowModal,
  1020. bindTimeChange,
  1021. handleSelectTime,
  1022. computedBtnText,
  1023. confirmUser,
  1024. handleBindUser,
  1025. handleSubmit,
  1026. submitIPQCItem,
  1027. handleRemoveImage,
  1028. handleClickProcessName,
  1029. handleShowSubmitApprovalModal,
  1030. handleCancelApprovalModal,
  1031. handleSubmitApprovalModal,
  1032. handleCloseErrorTipsModal
  1033. }
  1034. }
  1035. })
  1036. </script>
  1037. <style lang="scss" scoped>
  1038. .gui-header-leader-btns {
  1039. color: black;
  1040. font-size: 24px !important;
  1041. margin-left: 24rpx;
  1042. }
  1043. .gui-sbody {
  1044. background-color: rgba(234, 239, 242, 1);
  1045. }
  1046. .gui-relative {
  1047. overflow: visible;
  1048. height: 100vh;
  1049. .ipqc-checkout {
  1050. width: 100vw;
  1051. height: calc(100vh - 75px);
  1052. position: absolute;
  1053. top: 95px;
  1054. overflow: hidden;
  1055. .bind-button {
  1056. display: flex;
  1057. justify-content: center;
  1058. .scan-button {
  1059. width: 40vw;
  1060. min-width: 50px;
  1061. height: 35px;
  1062. display: flex;
  1063. justify-content: center;
  1064. align-items: center;
  1065. color: white;
  1066. background-color: rgba(0, 160, 233, 1);
  1067. border-radius: 6px;
  1068. box-shadow: 2px 2px 3px 1px rgba(0, 156, 223, 1.0);
  1069. }
  1070. }
  1071. }
  1072. }
  1073. .card-list-flexbox {
  1074. width: calc(100vw - 24px);
  1075. height: 295px;
  1076. margin: 0 12px;
  1077. display: flex;
  1078. justify-content: center;
  1079. flex-direction: column;
  1080. align-items: center;
  1081. overflow-y: scroll;
  1082. .card-list-title {
  1083. width: 100%;
  1084. height: 35px;
  1085. line-height: 35px;
  1086. margin: 0 4px 0 4px;
  1087. border-radius: 4px 4px 0 0;
  1088. text-align: center;
  1089. color: white;
  1090. background-color: rgba(0, 160, 233, 1.0);
  1091. }
  1092. .card-list-item,
  1093. .card-list-item-operation {
  1094. width: 100%;
  1095. height: 35px;
  1096. margin: 0 4px 3rpx 4px;
  1097. border-radius: 4px;
  1098. display: flex;
  1099. flex-direction: row;
  1100. align-items: center;
  1101. justify-content: space-between;
  1102. background-color: #fff;
  1103. uni-text {
  1104. font-size: 14px;
  1105. height: 50rpx;
  1106. text-align: left;
  1107. padding: 0 8px;
  1108. display: flex;
  1109. flex-direction: row;
  1110. align-items: center;
  1111. }
  1112. .text-1 {
  1113. flex: 1;
  1114. height: 35px;
  1115. justify-content: flex-start;
  1116. }
  1117. .text-2 {
  1118. flex: 3;
  1119. height: 35px;
  1120. justify-content: flex-end;
  1121. margin-right: 4px;
  1122. padding: 2px 6px;
  1123. }
  1124. }
  1125. }
  1126. .popup-content {
  1127. width: 100vw;
  1128. height: 55vh;
  1129. overflow-y: scroll;
  1130. }
  1131. .popup-process-content {
  1132. width: 100vw;
  1133. height: 85vh;
  1134. overflow-y: scroll;
  1135. .list-title {
  1136. position: fixed;
  1137. top: 0;
  1138. left: 0;
  1139. z-index: 99999;
  1140. width: 100%;
  1141. display: flex;
  1142. align-items: center;
  1143. height: 45px;
  1144. line-height: 45px;
  1145. font-size: 16px;
  1146. font-weight: bold;
  1147. border-top-left-radius: 16px;
  1148. border-top-right-radius: 16px;
  1149. border-bottom: 1px solid #d4d4d4;
  1150. background-color: white;
  1151. .block {
  1152. width: 6px;
  1153. height: 60%;
  1154. margin: 0 4px;
  1155. background-color: rgb(0, 160, 233);
  1156. }
  1157. }
  1158. .grid-box {
  1159. margin-top: 45px;
  1160. display: grid;
  1161. grid-template-columns: 1fr 1fr 1fr;
  1162. .box {
  1163. position: relative;
  1164. height: 40px;
  1165. padding: 10px 6px;
  1166. border: 1px solid rgb(250, 250, 251);
  1167. box-sizing: border-box;
  1168. margin: 12px;
  1169. display: flex;
  1170. justify-content: center;
  1171. align-items: center;
  1172. font-size: 14px;
  1173. font-weight: bold;
  1174. border-radius: 4px;
  1175. color: white;
  1176. box-shadow: 0 3px 6px 0 rgba(121, 118, 118, 0.34);
  1177. background-color: rgb(0, 160, 233);
  1178. }
  1179. .box::before {
  1180. content: '';
  1181. position: absolute;
  1182. top: 20px;
  1183. left: 0;
  1184. bottom: 0;
  1185. transform: translate(-50%, -50%);
  1186. width: 12px;
  1187. height: 12px;
  1188. border-radius: 50%;
  1189. z-index: 1;
  1190. background-color: #ffffff;
  1191. }
  1192. }
  1193. }
  1194. .card-list-flexbox-popup {
  1195. width: 100vw;
  1196. display: flex;
  1197. flex-direction: row;
  1198. align-items: center;
  1199. flex-wrap: wrap;
  1200. .card-list-item,
  1201. .card-list-item-input {
  1202. width: 100vw;
  1203. height: 100%;
  1204. min-height: 40px;
  1205. display: flex;
  1206. flex-direction: row;
  1207. align-items: center;
  1208. background-color: #fff;
  1209. uni-text {
  1210. font-size: 14px;
  1211. height: 50rpx;
  1212. text-align: left;
  1213. padding: 0 12px;
  1214. display: flex;
  1215. flex-direction: row;
  1216. align-items: center;
  1217. }
  1218. uni-image {
  1219. width: calc(100vw / 2 - 4px);
  1220. height: calc(100vw / 3.2 - 2px);
  1221. pointer-events: none;
  1222. }
  1223. uni-image::after {
  1224. content: "×";
  1225. width: 22px;
  1226. height: 22px;
  1227. position: absolute;
  1228. top: 5px;
  1229. right: 5px;
  1230. display: flex;
  1231. justify-content: center;
  1232. align-items: center;
  1233. color: rgba(255, 255, 255, 0.9);
  1234. background-color: rgba(0, 0, 0, 0.5);
  1235. border-radius: 50%;
  1236. font-size: 24px;
  1237. /*给伪元素开启鼠标事件,将事件冒泡到父元素的点击事件中*/
  1238. pointer-events: auto;
  1239. }
  1240. .text-1 {
  1241. flex: 1;
  1242. height: 40px;
  1243. justify-content: flex-start;
  1244. }
  1245. .text-2 {
  1246. flex: 3;
  1247. height: 40px;
  1248. justify-content: flex-end;
  1249. margin-right: 4px;
  1250. padding: 2px 6px;
  1251. }
  1252. .text-3 {
  1253. width: calc(100% - 15%);
  1254. min-height: 35px;
  1255. justify-content: flex-end;
  1256. padding: 2px 6px;
  1257. }
  1258. .text-3::before {}
  1259. .btn-mg {
  1260. margin: 0 5px;
  1261. }
  1262. }
  1263. .card-list-item {
  1264. justify-content: center;
  1265. }
  1266. .card-list-item-input {
  1267. margin: 10px 0 10px 2%;
  1268. display: flex;
  1269. flex-direction: column;
  1270. uni-view {
  1271. width: 100%;
  1272. height: 100%;
  1273. display: flex;
  1274. uni-textarea {
  1275. flex: 8;
  1276. }
  1277. uni-view {
  1278. flex: 1;
  1279. }
  1280. .operation-icon,
  1281. .operation-icon-2 {
  1282. height: auto;
  1283. uni-text {
  1284. width: 22px;
  1285. height: 100%;
  1286. padding: 0 !important;
  1287. text-align: center;
  1288. display: flex;
  1289. justify-content: center;
  1290. align-items: center;
  1291. border-top-right-radius: 4px;
  1292. border-bottom-right-radius: 4px;
  1293. color: white;
  1294. background-color: #80b7ff;
  1295. }
  1296. }
  1297. .operation-icon-2 {
  1298. uni-text {
  1299. background-color: #ff5962;
  1300. }
  1301. }
  1302. }
  1303. }
  1304. .grid-image {
  1305. /* 设置容器布局为grid布局 */
  1306. display: grid;
  1307. /* 指定每一行的宽度 每个宽度中间用空格隔开 */
  1308. grid-template-rows: repeat(auto-fill, 1fr);
  1309. /* 指定每一列的宽度 每个宽度中间用空格隔开 */
  1310. grid-template-columns: repeat(2, 1fr);
  1311. padding: 0 4px;
  1312. }
  1313. .card-list-item:nth-of-type(1) {
  1314. .text-1 {
  1315. flex: 9;
  1316. font-weight: bold;
  1317. color: black !important;
  1318. }
  1319. .text-1::before {
  1320. content: "";
  1321. width: 4px;
  1322. height: 20px;
  1323. border-radius: 4px;
  1324. margin-right: 4px;
  1325. background-color: skyblue;
  1326. }
  1327. .text-2 {
  1328. flex: 4;
  1329. display: flex;
  1330. flex-direction: row;
  1331. justify-content: flex-end;
  1332. align-items: center;
  1333. color: limegreen !important;
  1334. }
  1335. }
  1336. }
  1337. .custom-table {
  1338. height: calc(100vh - 485px);
  1339. // min-height: 600px;
  1340. overflow-y: scroll;
  1341. }
  1342. .select-group {
  1343. display: flex;
  1344. flex-direction: column;
  1345. align-items: center;
  1346. flex: 1;
  1347. .select-item {
  1348. width: 100%;
  1349. display: flex;
  1350. flex-direction: row;
  1351. justify-content: center;
  1352. align-items: center;
  1353. margin: 5px 0;
  1354. background-color: white;
  1355. .store-text {
  1356. min-width: 60px;
  1357. margin: 0 7px;
  1358. font-size: 14px;
  1359. }
  1360. }
  1361. }
  1362. .uni-list-cell {
  1363. width: 100vw;
  1364. height: 35px;
  1365. margin: 4px 0;
  1366. display: flex;
  1367. flex-direction: row;
  1368. align-items: center;
  1369. justify-content: space-between;
  1370. border-bottom: 2px solid #eaeff2;
  1371. background-color: #fff;
  1372. view {
  1373. font-size: 14px;
  1374. height: 50rpx;
  1375. text-align: left;
  1376. padding: 0 8px;
  1377. display: flex;
  1378. flex-direction: row;
  1379. align-items: center;
  1380. }
  1381. .uni-list-cell-left {
  1382. flex: 1;
  1383. height: 35px;
  1384. justify-content: flex-start;
  1385. }
  1386. .uni-list-cell-db {
  1387. flex: 3;
  1388. height: 35px;
  1389. justify-content: flex-end;
  1390. margin-right: 4px;
  1391. padding: 2px 6px;
  1392. uni-picker {
  1393. width: 100%;
  1394. display: flex;
  1395. flex-direction: row;
  1396. justify-content: center;
  1397. }
  1398. }
  1399. }
  1400. .modal-btns {
  1401. height: 100rpx;
  1402. line-height: 100rpx;
  1403. display: flex;
  1404. justify-content: center;
  1405. align-items: center;
  1406. }
  1407. .line {
  1408. margin-top: 10rpx;
  1409. height: 80rpx;
  1410. width: 1rpx;
  1411. background-color: #dcdcdc;
  1412. }
  1413. .scan {
  1414. height: 45px;
  1415. width: calc(100% - 24px);
  1416. padding: 0 12px;
  1417. margin-top: 4px;
  1418. display: flex;
  1419. justify-content: space-between;
  1420. align-items: center;
  1421. border-radius: 6px;
  1422. background-color: white;
  1423. .scan-card {
  1424. width: 100%;
  1425. display: grid;
  1426. grid-template-rows: 1fr;
  1427. grid-template-columns: 7fr 2fr;
  1428. align-items: center;
  1429. input {
  1430. height: 35px;
  1431. line-height: 35px;
  1432. }
  1433. text {
  1434. width: 100%;
  1435. text-align: right;
  1436. }
  1437. }
  1438. }
  1439. </style>