| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <template>
- <view class="content-box">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
- color="#000" @clickLeft="back">
- </uni-nav-bar>
- <view class="list_box">
- <u-list @scrolltolower="scrolltolower">
- <view class="card_box" v-for="(item,index) in List" :key="index">
- <workOrderBom :item='item' v-if='item' @handleScan='handleWordScan'></workOrderBom>
- <inspectionBom :inspectionList='inspectionList'></inspectionBom>
- </view>
- </u-list>
- </view>
- <view class="bottom-wrapper">
- <view class="btn_box" @click="save">确认</view>
- </view>
- </view>
- </template>
- <script>
- import {
- workorderList,
- getLastTreeByPid
- } from '@/api/pda/workOrder.js'
- import {
- batchSave
- } from '@/api/pda/feeding.js'
- import workOrderBom from '../../feeding/components/workOrderBom.vue'
- import inspectionBom from '../components/inspectionBom.vue'
- export default {
- components: {
- workOrderBom,
- inspectionBom
- },
- data() {
- return {
- title: null,
- id: null,
- taskId: null,
- inspectionId: null,
- inspectionName: null,
- List: [],
- inspectionList: []
- }
- },
- onLoad(options) {
- this.title = options.taskName ? options.taskName + '-' + options.inspectionName : '质检'
- this.id = options.workOrderId
- this.taskId = options.taskId
- this.getList()
- this.getLastTree()
- },
- methods: {
- getList() {
- workorderList({
- ids: [this.id],
- taskId: this.taskId
- }).then(res => {
- this.List = res.map(m => {
- m.workOrderId = m.id
- delete m.id
- return {
- ...m
- }
- })
- })
- },
-
- getLastTree() {
- getLastTreeByPid(this.$route.query.inspectionId).then(res => {
- this.inspectionList = res
- })
- },
-
- scrolltolower() {},
- handleWordScan() {
- uni.showToast({
- icon: 'none',
- title: '不支持换工单'
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .content-box {
- height: 100vh;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
- .list_box {
- flex: 1;
- overflow: hidden;
- padding: 4rpx 0;
- .u-list {
- height: 100% !important;
- }
- .card_box {
- padding: 16rpx 24rpx;
- }
- }
- .bottom-wrapper {
- .btn_box {
- width: 750rpx;
- height: 88rpx;
- line-height: 88rpx;
- background: $theme-color;
- text-align: center;
- font-size: 36rpx;
- font-style: normal;
- font-weight: 400;
- color: #fff;
- }
- }
- .operate_box {
- padding: 10rpx 160rpx;
- /deep/ .u-button {
- width: 160rpx;
- }
- }
- </style>
|