ipqcCheckout.vue 42 KB

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