| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <template>
- <view class="content-box">
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="入库" background-color="#F7F9FA" color="#000"
- @clickLeft="back">
- </uni-nav-bar>
- <view class="list_box">
- <u-list @scrolltolower="scrolltolower">
- <view class="card_box">
- <workOrderBom :item='objData' v-if='objData' @handleScan='handleScan'></workOrderBom>
- <view class="select_box">
- <zxz-uni-data-select :localdata="warehouseList" placeholder="请选择入库仓库" v-model="warehouseId"
- dataValue='id' dataKey="name" filterable format='{name}'></zxz-uni-data-select>
- </view>
- <view>
-
- <packingBom></packingBom>
-
- </view>
-
- </view>
- </u-list>
- </view>
- <view class="bottom-wrapper">
- <view class="btn_box" @click="save">一键报工</view>
- </view>
- </view>
- </template>
- <script>
- import {
- getByIdReport
- } from '@/api/pda/jobBooking.js'
- import {
- getWarehouseList,
- listPDAToWarehouse,
- } from '@/api/pda/workOrder.js'
- import packingBom from './components/packingBom.vue'
- import workOrderBom from '../feeding/components/workOrderBom.vue'
- export default {
- components: {
- workOrderBom,
- packingBom
- },
- data() {
- return {
- id: null,
- taskId: null,
- objData: {},
- warehouseList: [],
- warehouseId: null,
-
- List: []
- }
- },
- onLoad(options) {
- this.id = options.workOrderId
- this.taskId = options.taskId
- this.workReportId = options.workReportId
- this.getList()
- this.getWarehouseListFn()
- this.getWarehouse()
- },
- methods: {
- getList() {
- getByIdReport(this.id, this.taskId).then(res => {
- this.objData = res
- })
- },
- getWarehouseListFn() {
- getWarehouseList().then(res => {
- this.warehouseList = res
- })
- },
- getWarehouse() {
- let param = {
- workOrderId: this.id,
- taskId: this.taskId,
- workReportId: this.workReportId || '1780209440937308162'
- }
- listPDAToWarehouse(param).then(res => {
- console.log(res)
- this.List = res
-
- })
- },
- handleScan() {
- },
- scrolltolower() {},
- save() {
- if (!this.warehouseId) {
- 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;
- }
- }
- .select_box {
- margin-top: 20rpx;
- }
- </style>
|