| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311 |
- <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" key="dataList" v-if='status == 1'>
- <view class="card_box cx-sc" v-for="(item, index) in dataList" :key="index">
- <view class="content_table">
- <view class="item">
- <view class="lable rx-cc" style="color:#157A2C ;">领料单号</view>
- <view class="content" style="color:#157A2C;">
- {{ item.code }}
- </view>
- </view>
- </view>
- <view v-for="(it,idx) in item.orderInfoList" :key='idx'>
- <view class="word_order ">工单编号:{{it.code}}</view>
- <view v-if='it.arr.length == 0' style='margin-top: 10px;'>
- <u-empty iconSize='80' textSize='32' text='未领料'>
- </u-empty>
- </view>
- <instanceBom :list='it.arr' :isDetails='true'></instanceBom>
- </view>
- </view>
- <u-list-item v-if="dataList.length === 0" style='margin-top: 20vh;'>
- <u-empty iconSize='150' textSize='32' text='暂无数据'>
- </u-empty>
- </u-list-item>
- </u-list>
- <u-list @scrolltolower="scrolltolower" key="dataList2" v-if='status == 2'>
- <view class="card_box cx-sc">
- <outInstanceBom :list='dataList' :isDetails='true'></outInstanceBom>
- </view>
- <u-list-item v-if="dataList.length === 0" style='margin-top: 20vh;'>
- <u-empty iconSize='150' textSize='32' text='暂无数据'>
- </u-empty>
- </u-list-item>
- </u-list>
- </view>
- <view class="bottom-wrapper">
- <!-- <view class="btn_box" @click="save">一键报工</view> -->
- </view>
- </view>
- </template>
- <script>
- import {
- tableHeader
- } from '../../common.js'
- import {
- workorderPage
- } from '@/api/pda/workOrder.js'
- import {
- pickDetails,
- pickOutInOrder
- } from '@/api/pda/picking.js'
- import instanceBom from './components/instanceBom.vue'
- import outInstanceBom from './components/outInstanceBom.vue'
- export default {
- components: {
- instanceBom,
- outInstanceBom
- },
- data() {
- return {
- ids: [],
- dataList: [],
- title: null,
- status: 1,
- }
- },
- onLoad(option) {
- this.status = option.status || 1
- this.title = option.status == 1 ? '领料单' : option.status == 2 ? ' 出库单' : ''
- this.ids = [option.id]
- this.getList()
- },
- methods: {
- async getList() {
- let list = []
- if (this.status == 1) {
- const res = await pickDetails(this.ids)
- list = res
- list.forEach(m => {
- if (m.orderInfoList.length > 0) {
- m.orderInfoList.forEach(o => {
- let _arr = []
- _arr = [...o.bomDetailDTOS, ...o.instanceList]
- _arr = _arr.sort((a, b) => a.rootCategoryLevelId - b
- .rootCategoryLevelId)
- o['arr'] = _arr
- })
- }
- })
- this.dataList = list
- } else if (this.status == 2) {
- const res = await pickOutInOrder({
- workOrderIds: this.ids
- })
- this.dataList = res
- }
- },
- scrolltolower() {
- },
- tableH(type) {
- return tableHeader(type)
- },
- save() {},
- }
- }
- </script>
- <style lang="scss" scoped>
- .content-box {
- height: 100vh;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- }
- .list_box {
- flex: 1;
- overflow: hidden;
- padding: 16rpx 0;
- .u-list {
- height: 100% !important;
- }
- }
- .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;
- }
- }
- .card_box {
- margin-top: 10rpx;
- .word_order {
- height: 64rpx;
- width: 706rpx;
- background: $theme-color;
- font-size: 28rpx;
- color: #fff;
- line-height: 64rpx;
- padding-left: 40rpx;
- box-sizing: border-box;
- }
- .content_table {
- margin-top: 10rpx;
- width: 702rpx;
- border: 2rpx solid $border-color;
- .item {
- display: flex;
- border-bottom: 2rpx solid $border-color;
- .lable {
- width: 132rpx;
- text-align: center;
- background-color: #F7F9FA;
- font-size: 26rpx;
- border-right: 2rpx solid $border-color;
- flex-shrink: 0;
- }
- .ww80 {
- width: 80rpx;
- }
- .content {
- width: 518rpx;
- min-height: 64rpx;
- font-size: 28rpx;
- line-height: 28rpx;
- font-style: normal;
- font-weight: 400;
- padding: 18rpx 8rpx;
- box-sizing: border-box;
- word-wrap: break-word;
- flex-grow: 1 !important;
- }
- .content_num {
- display: flex;
- align-items: center;
- padding: 0 4rpx;
- /deep/ .uni-input-input {
- width: 480rpx;
- border: 2rpx solid #F0F8F2;
- background: #F0F8F2;
- color: $theme-color;
- }
- .unit {
- padding: 0 4rpx;
- font-size: 24rpx;
- color: #404446;
- }
- }
- .pd4 {
- padding: 4rpx 8rpx;
- }
- &:last-child {
- border-bottom: none;
- }
- }
- .ww55 {
- width: 55%;
- }
- .ww45 {
- width: 45%;
- }
- }
- }
- </style>
|