index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. <template>
  2. <view v-if="isMaskShow" class="mask">
  3. </view>
  4. <view class="uni-column" style="height: 100%; background-color: #f5f5f5;">
  5. <view class="box-bg uni-row">
  6. <view class="input-view uni-row">
  7. <uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
  8. <input class="nav-bar-input" type="text" v-model="keywords" placeholder="请输入批次号/箱号" />
  9. </view>
  10. <view class="search" @click="handleSearch">
  11. 搜索
  12. </view>
  13. </view>
  14. <view class="list-title uni-row">
  15. <!-- <div class="list-title uni-row"> -->
  16. <text class="label">是否正常批次</text>
  17. <text>{{ normalStatus ? '是' : '否' }}</text>
  18. <switch class="switch" :checked="normalStatus" @change="switchChange" color="rgba(103, 195, 55, 1.0)" />
  19. <!-- <text>{{ }}</text> -->
  20. <!-- </div> -->
  21. <!-- <text class="label">是否正常批次</text><text>是</text>
  22. <switch class="switch" @change="switchChange" color="rgba(255,85,85,1)" />
  23. <text>否</text> -->
  24. </view>
  25. <view class="scroll-container" style="padding-bottom: 150rpx">
  26. <view v-if="listData.length == 0" style="color: #999;margin: 50% auto;">
  27. <text>暂无批次</text>
  28. </view>
  29. <!-- 批次列表 -->
  30. <view v-else v-for="(item, index) in listData" :key="index" class="list-item"
  31. @click="handleToreportingForWork(item)">
  32. <view class="title-container uni-row" style="justify-content: flex-start;">
  33. <view class="title uni-row">
  34. <text class="label">批次号:</text>
  35. <text class="label code">{{ item['lotCode'] }}</text>
  36. </view>
  37. <view class=" uni-row" style="margin-left: 16rpx;">
  38. <view v-if="item['status'] == 1" class="tag"><text class="label">进行中</text></view>
  39. <view v-else-if="item['status'] == 3" class="tag turnover "><text class="label">待领取</text>
  40. </view>
  41. <view v-else-if="item['status'] == 2" class="tag turnover "><text class="label">待周转</text>
  42. </view>
  43. <view v-else-if="item['status'] == 0" class="tag finished "><text class="label">未开始</text>
  44. </view>
  45. <view v-else-if="item['status'] == 4" type="default finished" class="tag finished"><text
  46. class="label">已完成</text></view>
  47. </view>
  48. </view>
  49. <view class="item-info uni-row">
  50. <text class="label">产品描述</text>
  51. <text class="label right">{{ curPlan['productDescription'] }}</text>
  52. </view>
  53. <view class="item-info uni-row">
  54. <text class="label">材质</text>
  55. <text
  56. class="label right">{{ item['furnaceNoInfo'] && item['furnaceNoInfo'].firstTechnicalRequirement != '' ? item['furnaceNoInfo'].firstTechnicalRequirement + ";" + item['furnaceNoInfo'].secondTechnicalRequirement : '-' }}</text>
  57. </view>
  58. <view class="item-info uni-row">
  59. <text class="label">箱号</text>
  60. <text class="label right">{{ item['carrierName'] ? item['carrierName'] : '-' }}</text>
  61. </view>
  62. <!-- <view class="item-info uni-row">
  63. <text class="label">总工时</text>
  64. <text class="label right">{{ item['totalWorkingHours']}}</text>
  65. </view> -->
  66. <view class="item-info uni-row">
  67. <text class="label">投入数</text>
  68. <text
  69. class="label right">{{ item.prevProcess == null ? item['productionQuantity'] : item['processQualifiedNum']}}</text>
  70. </view>
  71. <view class="item-info uni-row">
  72. <text class="label">上道工序</text>
  73. <text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
  74. </view>
  75. <view class="item-info uni-row">
  76. <text class="label">当前工序</text>
  77. <!-- <text
  78. class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text> -->
  79. <text
  80. class="label right">{{ item.currentProcess ? item['currentProcess'].processAlias : '-'}}</text>
  81. </view>
  82. <view class="item-info uni-row">
  83. <text class="label">下道工序</text>
  84. <view class="label right uni-row">
  85. {{ item.nextProcess ? item['nextProcess'].processAlias : '-' }}
  86. (<view style="color: #1684fc;" @click.stop="handleClickProcessList(item)">&nbsp;工艺列表&nbsp;
  87. </view>)
  88. </view>
  89. </view>
  90. <!-- <view class="item-info uni-row">
  91. <text class="label">设备</text>
  92. <text class="label right">{{ curPlan['equipmentName'] }}</text>
  93. </view> -->
  94. <view v-if="notPreProcess" class="item-info uni-row">
  95. <text class="label">所在区域</text>
  96. <text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
  97. </view>
  98. <view v-if="item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3" class="item-info uni-row">
  99. <text class="label">目标工段</text>
  100. <text class="label right">{{ item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3 ? item['dayworkItemList'][0].deptName : '-' }}</text>
  101. </view>
  102. <view v-if="item['dayworkItemList'] && item['dayworkItemList'].length >0 && item['dayworkItemList'][0].status >3" class="item-info uni-row">
  103. <text class="label">目标车间</text>
  104. <text class="label right">{{ item['workshopName']}}</text>
  105. </view>
  106. <view v-if="item.protemResourceGroupDetailList && item.protemResourceGroupDetailList.length>0"
  107. class="item-info uni-row">
  108. <text class="label">邀请者</text>
  109. <text
  110. class="label right">{{ item['protemResourceGroupDetailList'] && item['protemResourceGroupDetailList'].length>0 ? item['protemResourceGroupDetailList'][0].protemCreatorName : '-' }}</text>
  111. </view>
  112. <view v-if="item.protemResourceGroupDetailList&& item.protemResourceGroupDetailList.length>0"
  113. class="item-info uni-row">
  114. <text class="label">已完成数量</text>
  115. <text class="label right">{{ item['totalQuantity'] ? item['totalQuantity'] : 0 }}</text>
  116. </view>
  117. <view class="status-btn uni-row">
  118. <view v-if="item['status'] == 2" class=" uni-row">
  119. <button class="turnover-tag" size="mini"
  120. @click.stop="handleShowTurnoverApplication(item)">周转申请</button>
  121. <!-- <button class="reporting-tag" size="mini" @click="handleToreportingForWork">去报工</button> -->
  122. </view>
  123. <view v-else-if="item['status'] == 3" class=" uni-row">
  124. <button class="turnover-tag" size="mini" @click.stop="handleCancelTurnover(item)"
  125. style="background-color: rgba(255, 85, 85, 1);">取消周转</button>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <!-- 抽屉 -->
  131. <uni-drawer ref="showRight" mode="right" :mask-click="true">
  132. <view style="text-align: center; font-size: 48rpx; padding: 48rpx 0 24rpx 0;">工艺列表</view>
  133. <view style="font-size: 24rpx;text-align: center;color: red; margin-bottom: 16rpx;">
  134. 仅显示当前工序后面工艺
  135. </view>
  136. <scroll-view scroll-y="true" style="height: 82%;" @touchmove.stop>
  137. <view v-for="(item,index) in curProcessAfte" :key="index"
  138. style="padding: 8rpx 5% 8rpx 14%; border-top: 1px solid #cccccc">
  139. <text>{{ index + 1 }}.{{item.processAlias}}</text>
  140. </view>
  141. </scroll-view>
  142. <view><button v-if="!editStatus" class="view-end-btn" type="primary"
  143. @click="handleOpenDrawing">查看本工序图纸</button></view>
  144. </uni-drawer>
  145. <!-- <view v-if="bottomStatus" class="bottom uni-row">
  146. <button class="start-batch-btn" type="primary" @click="handleStartNewBatch">开始新批次</button>
  147. </view>
  148. <view v-if="!bottomStatus" class="bottom uni-row">
  149. <button class="start-batch-btn" type="primary" @click="handleScanCode">扫一扫开始新批次</button>
  150. </view> -->
  151. <view class="bottom uni-row">
  152. <button v-if="bottomStatus" class="start-batch-btn" style="margin-right: 10rpx;" type="primary"
  153. @click="handleStartNewBatch">开始新批次</button>
  154. <button class="start-batch-btn" style="margin-right: 10rpx;" type="primary"
  155. @click="handleScanCode">扫码开始批次</button>
  156. <button class="start-batch-btn" type="primary" @click="handleSearchCode">查箱号</button>
  157. </view>
  158. <dialog-lot ref="lotDialog" @submit="handleDoIt" />
  159. <dialog-turnoverApplication ref="turnoverApplicationDialog" @reflushDaywork="handleDoTurnoverAfter" />
  160. <dialog-selectProduction ref="selectProduction"></dialog-selectProduction>
  161. </view>
  162. </template>
  163. <script setup>
  164. import {
  165. normalizeProps,
  166. reactive,
  167. onMounted,
  168. ref
  169. } from 'vue'
  170. import {
  171. onLoad,
  172. onReady,
  173. onUnload,
  174. onShow
  175. } from '@dcloudio/uni-app'
  176. import {
  177. getDayWorkList,
  178. showDaywork,
  179. showDayworkSave,
  180. turnoverDelete
  181. } from '@/api/business/dayWork.js'
  182. import{isTakeStock} from '@/api/business/taksStackLot.js'
  183. import {
  184. getAbnormalityLot
  185. } from '@/api/business/lot.js'
  186. import {
  187. carrierFinishedCheck
  188. } from '@/api/business/carrier.js'
  189. import {
  190. store
  191. } from '@/store/index.js'
  192. import {
  193. toHHmmss
  194. } from '@/utils/common.js'
  195. import {
  196. onPullDownRefresh
  197. } from "@dcloudio/uni-app"
  198. const turnoverApplicationDialog = ref(null)
  199. const selectProduction = ref(null)
  200. const lotDialog = ref(null)
  201. const listData = ref([])
  202. const curPlan = ref(null)
  203. const bizDayworkObj = ref({})
  204. const bottomStatus = ref(false) // 底部按钮显示
  205. const paging = ref();
  206. const reqParam = ref(null);
  207. const normalStatus = ref(true)
  208. const isLoding = ref(false);
  209. const curDayworkItem = ref({}) // 当前报工记录,回显是否显示取消周转的状态
  210. const keywords = ref(null)
  211. const tempList = ref([])
  212. const wasteRecyclingList = ref([]) //废品回用批次
  213. // 在数据中定义一个变量来控制遮罩层的显示
  214. const isMaskShow = ref(false);
  215. //打开图纸
  216. //选中的daywork
  217. const currentDaywork = ref({})
  218. const editStatus = ref(false)
  219. const notPreProcess = ref(true)
  220. const curProcessAfte = ref([])
  221. const showRight = ref(null) // 抽屉
  222. onLoad(() => {
  223. curPlan.value = store.planDetails;
  224. normalStatus.value = true;
  225. console.log(curPlan.value)
  226. //废品回用的领料部门如果是当前工段,也要可以开始新批次
  227. //查找当前计划单下的批次废品回用是当前工段
  228. getAbnormalityLot({
  229. productionPlanDetailId: store.planDetails.id,
  230. requisitionDepartmentId: store.curDeptDetails.deptId
  231. }).then(res => {
  232. wasteRecyclingList.value = res.rows
  233. if (store.planDetails.requisitionDepartmentId == store.curDeptDetails.deptId ||
  234. wasteRecyclingList.value.length > 0) {
  235. bottomStatus.value = true;
  236. store.isPreProcess = true;
  237. } else {
  238. bottomStatus.value = false;
  239. store.isPreProcess = false;
  240. }
  241. })
  242. console.log(wasteRecyclingList.value.length)
  243. })
  244. // 页面下拉刷新操作
  245. onPullDownRefresh(() => {
  246. uni.stopPullDownRefresh();
  247. reflush();
  248. })
  249. onShow(() => {
  250. reflush();
  251. })
  252. ;
  253. function reflush() {
  254. init(store.planDetails.id);
  255. }
  256. function handleShowTurnoverApplication(data) {
  257. console.log(data)
  258. //如果这批废了,则不能周转申请
  259. if (data.isWaste == 1) {
  260. uni.showToast({
  261. icon: 'none',
  262. title: '此批已废,不能申请周转',
  263. duration: 2000
  264. })
  265. } else {
  266. isTakeStock().then(response =>{
  267. if(response.data) {
  268. uni.showToast({
  269. icon: 'none',
  270. title: '正在盘点,不能申请周转',
  271. duration: 2000
  272. })
  273. }else{
  274. let _data = data ?? {}
  275. carrierFinishedCheck(data).then(res => {
  276. if (res.code === 200) {
  277. // 调用子组件中的方法
  278. turnoverApplicationDialog.value.open(_data)
  279. } else {
  280. uni.showToast({
  281. icon: 'none',
  282. title: res.msg
  283. })
  284. }
  285. })
  286. }
  287. })
  288. }
  289. }
  290. function handleStartNewBatch() {
  291. store.normalStatus = normalStatus.value;
  292. // console.log(normalStatus.value)
  293. uni.navigateTo({
  294. url: "/pages/addNewBatch/index"
  295. })
  296. }
  297. function init(id) {
  298. uni.showLoading({
  299. title: '加载中'
  300. });
  301. let reqData = {
  302. productionPlanDetailId: id,
  303. deptId: store.curDeptDetails.deptId,
  304. keywords: keywords.value
  305. };
  306. // console.log(normalStatus.value)
  307. getDayWorkList(reqData).then(res => {
  308. console.log(res.data)
  309. if (res.code == 200) {
  310. res.data.forEach(item => {
  311. let quantitySum = 0;
  312. item.dayworkItemList.forEach(info => {
  313. if (info.status < 4 && item.currentProcess.processStepNumber == info
  314. .processStepNumber) {
  315. quantitySum += info.qualifiedNum;
  316. }
  317. });
  318. item.totalQuantity = quantitySum;
  319. });
  320. tempList.value = res.data
  321. // console.log(res)
  322. if (normalStatus.value) {
  323. listData.value = res.data.filter(item => {
  324. return item.isWasteRecycling == 0 && item.isAmend == 0;
  325. });
  326. } else {
  327. listData.value = res.data.filter(item => {
  328. return item.isWasteRecycling == 1 || item.isAmend == 1;
  329. })
  330. }
  331. // 20240614 分批投产数量不按照上到序的完成数量来。
  332. // for (let i = 0; i < listData.value.length; i++) {
  333. // if (listData.value[i].prevProcess) {
  334. // let sum = 0;
  335. // for (let j = 0; j < listData.value[i].dayworkItemList.length; j++) {
  336. // if (listData.value[i].dayworkItemList[j].processId == listData.value[i]
  337. // .prevProcess
  338. // .id && (listData.value[i].dayworkItemList[j].status == 2 || listData
  339. // .value[i]
  340. // .dayworkItemList[j].status == 3)) {
  341. // sum += listData.value[i].dayworkItemList[j].qualifiedNum;
  342. // }
  343. // }
  344. // listData.value[i].processQualifiedNum = sum;
  345. // }
  346. // }
  347. }
  348. uni.hideLoading();
  349. })
  350. }
  351. function handleSearch() {
  352. init(store.planDetails.id);
  353. }
  354. function handleToreportingForWork(item) {
  355. store.dayworkInfo = item
  356. uni.navigateTo({
  357. url: "/pages/reportingForWork/index"
  358. })
  359. }
  360. function handleClickProcessList(item) {
  361. let curProcessAfterList = [];
  362. console.log("工序列表", item)
  363. currentDaywork.value = item
  364. if (item.isWasteRecycling == 1 || item.isAmend == 1) {
  365. editStatus.value = true
  366. } else {
  367. editStatus.value = false
  368. }
  369. let nextIndex = 0;
  370. for (let i = 0; i < item.processSequence.length; i++) {
  371. if (item.nextProcess) {
  372. if (item.nextProcess.processStepNumber == item.processSequence[i].processStepNumber) {
  373. nextIndex = i;
  374. }
  375. } else {
  376. nextIndex = item.processSequence.length
  377. }
  378. }
  379. for (let i = 0; i < item.processSequence.length; i++) {
  380. if (i >= nextIndex) {
  381. curProcessAfterList.push(item.processSequence[i]);
  382. }
  383. }
  384. if (item.status == 3) {
  385. curProcessAfterList.splice(0, 1)
  386. }
  387. console.log(curProcessAfterList)
  388. curProcessAfte.value = curProcessAfterList;
  389. showRight.value.open();
  390. }
  391. function handleSearchCode() {
  392. // console.log(normalStatus.value)
  393. selectProduction.value.open(normalStatus.value);
  394. }
  395. function switchChange(event) {
  396. console.log(event)
  397. //异常批
  398. if (normalStatus.value) {
  399. listData.value = tempList.value.filter(item => {
  400. return item.isWasteRecycling == 1 || item.isAmend == 1;
  401. });
  402. normalStatus.value = false
  403. } else {
  404. listData.value = tempList.value.filter(item => {
  405. return item.isWasteRecycling == 0 && item.isAmend == 0;
  406. });
  407. normalStatus.value = true
  408. }
  409. }
  410. function handleScanCode() {
  411. // 引入原生插件
  412. const mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module");
  413. if (mpaasScanModule) {
  414. // 调用插件的 mpaasScan 方法
  415. mpaasScanModule.mpaasScan({
  416. // 扫码识别类型,参数可多选,qrCode、barCode,
  417. // 如不设置,默认识别所有扫码类型,可能有些许影响识别效率
  418. scanType: ["qrCode", "barCode"],
  419. // 是否隐藏相册,默认false不隐藏
  420. hideAlbum: false,
  421. },
  422. (ret) => {
  423. console.log(ret);
  424. /* 原有代码,之前二维码中存的信息比较多,用一个JSON格式存储。
  425. let vehicleObj = JSON.parse(ret.resp_result);
  426. if (!vehicleObj.carrierId || vehicleObj.carrierId == "") {
  427. uni.showToast({
  428. icon: "none",
  429. title: "请扫载具码",
  430. duration: 1000
  431. })
  432. return;
  433. }
  434. */
  435. let vehicleObj = {
  436. carrierCode: ret.resp_result
  437. };
  438. if (!vehicleObj.carrierCode || vehicleObj.carrierCode == "") {
  439. uni.showToast({
  440. icon: "none",
  441. title: "请扫载具码",
  442. duration: 1000
  443. })
  444. return;
  445. }
  446. showDaywork({
  447. carrierId: '0', // 不传递箱子id
  448. carrierCode: vehicleObj.carrierCode,
  449. status: 7
  450. }).then(response => {
  451. if (response.code == 200) {
  452. console.log(response)
  453. console.log(response.data[0].productionPlanDetailId)
  454. console.log(store.planDetails.id)
  455. console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
  456. if (response.data[0].deptId !== store.curDeptDetails.deptId) {
  457. uni.showToast({
  458. icon: 'none',
  459. title: '该批次不在当前工段',
  460. duration: 2000
  461. })
  462. return
  463. }
  464. if (response.data[0].productionPlanDetailId == store.planDetails.id) {
  465. console.log(response.data)
  466. lotDialog.value.open(response.data);
  467. } else {
  468. uni.showToast({
  469. icon: 'none',
  470. title: '该批次不在此计划单内',
  471. duration: 2000
  472. })
  473. }
  474. } else {
  475. uni.showToast({
  476. icon: 'none',
  477. title: response.msg,
  478. duration: 2000
  479. })
  480. }
  481. })
  482. }
  483. );
  484. } else {
  485. // 测试时用
  486. showDaywork({
  487. carrierId: '1780467398971187210',
  488. carrierCode: '',
  489. status: 7
  490. }).then(response => {
  491. if (response.code == 200) {
  492. console.log(response)
  493. console.log(response.data[0].productionPlanDetailId)
  494. console.log(store.planDetails.id)
  495. console.log(response.data[0].deptId !== store.curDeptDetails.deptId)
  496. if (response.data[0].deptId !== store.curDeptDetails.deptId) {
  497. uni.showToast({
  498. icon: 'none',
  499. title: '该批次已转至其他工段',
  500. duration: 2000
  501. })
  502. return
  503. }
  504. if (response.data[0].productionPlanDetailId == store.planDetails.id) {
  505. console.log(response.data)
  506. lotDialog.value.open(response.data);
  507. } else {
  508. uni.showToast({
  509. icon: 'none',
  510. title: '该批次不在此计划单内',
  511. duration: 2000
  512. })
  513. }
  514. } else {
  515. uni.showToast({
  516. icon: 'none',
  517. title: response.msg,
  518. duration: 2000
  519. })
  520. }
  521. })
  522. }
  523. }
  524. function handleAddDaywork(data) {
  525. console.log(data)
  526. let reqParam = [];
  527. for (var i = 0; i < data.length; i++) {
  528. reqParam.push(data[i].daywork)
  529. }
  530. console.log(data)
  531. data.forEach(item => {
  532. item.isSort = 0
  533. })
  534. showDayworkSave(data).then(res => {
  535. console.log(res)
  536. init(store.planDetails.id);
  537. })
  538. }
  539. function handleDoIt(data) {
  540. handleAddDaywork(data);
  541. }
  542. function handleOpenDrawing() {
  543. console.log(currentDaywork.value, "444")
  544. var filteredProcess = currentDaywork.value.processSequence.filter(item => item.processStepNumber == currentDaywork
  545. .value.currentProcess.processStepNumber);
  546. // 检查 filteredProcess 是否有元素,并选择第一个元素
  547. if (filteredProcess.length > 0) {
  548. var firstMatch = filteredProcess[0]; // 获取第一个匹配的对象
  549. // 对 technologicalProcessDetailId 进行URL编码
  550. var encodedId = encodeURIComponent(currentDaywork.value.productId);
  551. var enTechnologicalProcessId = encodeURIComponent(currentDaywork.value.technologicalProcessId);
  552. var enprocessCode = encodeURIComponent(firstMatch.processCode);
  553. var encodeCode = encodeURIComponent(currentDaywork.value.lotCode);
  554. var enProcessAlias = encodeURIComponent(firstMatch.processAlias);
  555. // 构建查询参数字符串
  556. var queryParam =
  557. `param1=${encodedId}&param2=${encodeCode}&param3=${enprocessCode}&param4=${enTechnologicalProcessId}&param5=${enProcessAlias}`;
  558. // 使用模板字符串构建完整的URL
  559. var navigateUrl = `/pages/drawingMenu/index?${queryParam}`;
  560. // 导航到指定页面
  561. uni.navigateTo({
  562. url: navigateUrl
  563. });
  564. } else {
  565. console.log('No process matched the current process step number.');
  566. }
  567. }
  568. function handleDoTurnoverAfter() {
  569. reflush();
  570. }
  571. function handleCancelTurnover(data) {
  572. isTakeStock().then(response =>{
  573. if(response.data) {
  574. uni.showToast({
  575. icon: 'none',
  576. title: '正在盘点,不能取消周转',
  577. duration: 2000
  578. })
  579. }else{
  580. isMaskShow.value = true; // 显示遮罩层
  581. uni.showLoading({
  582. title: '加载中'
  583. });
  584. turnoverDelete(data).then(res => {
  585. isMaskShow.value = false
  586. if (res.code == 200) {
  587. uni.showToast({
  588. icon: "success",
  589. title: "取消成功",
  590. duration: 2000
  591. })
  592. isLoding.value = false;
  593. setTimeout(() => {
  594. init(store.planDetails.id);
  595. }, 1000);
  596. } else {
  597. uni.showToast({
  598. icon: "none",
  599. title: "取消失败",
  600. duration: 2000
  601. })
  602. isLoding.value = false;
  603. setTimeout(() => {
  604. init(store.planDetails.id);
  605. }, 1000);
  606. }
  607. })
  608. }
  609. })
  610. }
  611. </script>
  612. <style lang="scss">
  613. $nav-height: 60rpx;
  614. /* 遮罩层样式 */
  615. .mask {
  616. position: fixed;
  617. /* 固定定位,覆盖整个屏幕 */
  618. top: 0;
  619. left: 0;
  620. right: 0;
  621. bottom: 0;
  622. background-color: rgba(0, 0, 0, 0.3);
  623. /* 黑色背景,透明度30% */
  624. display: flex;
  625. justify-content: center;
  626. /* 水平居中 */
  627. align-items: center;
  628. /* 垂直居中 */
  629. z-index: 1000;
  630. /* 确保遮罩层在其他元素之上 */
  631. }
  632. .box-bg {
  633. width: 94%;
  634. background-color: #F5F5F5;
  635. padding: 5rpx 16rpx;
  636. justify-content: space-around;
  637. align-items: center;
  638. margin: 24rpx auto 0;
  639. .input-view {
  640. width: 100%;
  641. flex: 4;
  642. background-color: #f8f8f8;
  643. height: $nav-height;
  644. border: 1rpx solid #999;
  645. border-radius: 15rpx;
  646. padding: 0 15rpx;
  647. flex-wrap: nowrap;
  648. margin: 0 10rpx 0;
  649. line-height: $nav-height;
  650. .input-uni-icon {
  651. line-height: $nav-height;
  652. }
  653. .nav-bar-input {
  654. width: 80%;
  655. height: $nav-height;
  656. line-height: $nav-height;
  657. padding: 0 5rpx;
  658. background-color: #f8f8f8;
  659. }
  660. }
  661. .search {
  662. width: 20%;
  663. text-align: center;
  664. color: #808080;
  665. }
  666. }
  667. .list-title {
  668. width: 100%;
  669. margin-top: 16rpx;
  670. height: 64rpx;
  671. line-height: 64rpx;
  672. align-items: center;
  673. margin-left: 32rpx;
  674. .label {
  675. font-size: 32rpx;
  676. margin-right: 24rpx;
  677. }
  678. .icon-gear {
  679. font-size: 56rpx;
  680. }
  681. }
  682. .switch {
  683. margin-top: -8rpx;
  684. transform: scale(0.7);
  685. }
  686. .scroll-container {
  687. width: 92%;
  688. margin: 24rpx auto 0 auto;
  689. height: calc(90% - 100rpx);
  690. overflow: auto;
  691. }
  692. .list-item {
  693. background-color: #fff;
  694. position: relative;
  695. padding: 16rpx;
  696. padding-bottom: 24rpx;
  697. margin-bottom: 24rpx;
  698. border-radius: 24rpx;
  699. .title-container {
  700. margin-top: 8rpx;
  701. margin-bottom: 16rpx;
  702. .title {
  703. height: 48rpx;
  704. align-items: center;
  705. .label {
  706. font-size: 32rpx;
  707. font-weight: bold;
  708. &.code {
  709. margin-left: 8rpx;
  710. }
  711. }
  712. }
  713. .tag {
  714. border: 1px solid #1CE5B0;
  715. background-color: #F6FFFD;
  716. padding: 8rpx;
  717. border-radius: 8rpx;
  718. .label {
  719. color: #1CE5B0;
  720. font-size: 24rpx;
  721. }
  722. &.finished {
  723. border: 1px solid #BBBBBB;
  724. background-color: #F5F5F5;
  725. .label {
  726. color: #BBBBBB;
  727. }
  728. }
  729. &.turnover {
  730. border: 1px solid #FF7901;
  731. background-color: #F6FFFD;
  732. .label {
  733. color: #FF7901;
  734. }
  735. }
  736. }
  737. }
  738. .item-info {
  739. margin-bottom: 8rpx;
  740. .label {
  741. font-size: 28rpx;
  742. width: 220rpx;
  743. color: #808080;
  744. &.right {
  745. flex: 1;
  746. color: #000000;
  747. }
  748. }
  749. }
  750. .status-btn {
  751. justify-content: flex-end;
  752. align-items: center;
  753. .turnover-tag {
  754. padding-right: 12rpx;
  755. padding-left: 12rpx;
  756. border-radius: 8rpx;
  757. border: 1rpx solid #FF7901;
  758. background-color: #FF7901;
  759. font-size: 28rpx;
  760. color: #FFFFFF;
  761. }
  762. .reporting-tag {
  763. padding-right: 12rpx;
  764. padding-left: 12rpx;
  765. border-radius: 8rpx;
  766. margin-left: 16rpx;
  767. border: 1rpx solid #1684fc;
  768. background-color: #1684fc;
  769. font-size: 28rpx;
  770. color: #FFFFFF;
  771. }
  772. }
  773. }
  774. .bottom {
  775. height: 10%;
  776. position: fixed;
  777. right: 0;
  778. bottom: 0;
  779. left: 0;
  780. height: 100rpx;
  781. border-top: 1px solid #999999;
  782. padding: 16rpx 32rpx;
  783. align-items: center;
  784. background-color: #fff;
  785. justify-content: space-evenly;
  786. .start-batch-btn {
  787. flex: 1;
  788. height: 80rpx;
  789. line-height: 80rpx;
  790. border-radius: 8rpx;
  791. color: #FFFFFF;
  792. font-size: 28rpx;
  793. }
  794. .view-end-btn {
  795. flex: 1;
  796. height: 80rpx;
  797. line-height: 80rpx;
  798. border-radius: 8rpx;
  799. color: #FFFFFF;
  800. font-size: 28rpx;
  801. }
  802. }
  803. </style>