| | |
| | | "matDirectDelivery":"生产直送", |
| | | "productDirectDelivery":"成品直出", |
| | | "matPreparation":"生产备料", |
| | | "preparation": "备货出库", |
| | | "containerRebinding": "备货容器换绑", |
| | | "other":"综合" |
| | | |
| | | |
| | |
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/outbound/orderOut/outLocView",
|
| | | "style": {
|
| | | "navigationBarTitleText": "出库库位视图"
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/outbound/orderOutView/order_out_type",
|
| | | "style": {
|
| | | "navigationBarTitleText": "单据类型"
|
| | |
| | | "navigationBarTitleText": "单据明细列表"
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/outbound/orderOut/outLocView",
|
| | | "style": {
|
| | | "navigationBarTitleText": "出库库位视图"
|
| | | }
|
| | | },
|
| | |
|
| | | {
|
| | | "path": "pages/emptyTray/outBound",
|
| | | "style": {
|
| | |
| | | "style": {
|
| | | "navigationBarTitleText": "组托解绑"
|
| | | }
|
| | | },
|
| | | {
|
| | | "path": "pages/outbound/container_rebinding/container_rebinding",
|
| | | "style": {
|
| | | "navigationBarTitleText": "备货容器换绑"
|
| | | }
|
| | | }
|
| | | ],
|
| | | "globalStyle": {
|
| New file |
| | |
| | | <template> |
| | | <view class="has-foot"> |
| | | <form> |
| | | <view class="cu-form-group margin-top"> |
| | | <view class="title">容器号</view> |
| | | <input |
| | | placeholder="请扫容器条码" |
| | | v-model="container" |
| | | /> |
| | | <!-- <text class='cuIcon-search text-blue' @click="search"></text> --> |
| | | </view> |
| | | <view class="cu-form-group"> |
| | | <view class="title">新容器号</view> |
| | | <input |
| | | placeholder="请扫描新容器号" |
| | | v-model="newContainer" |
| | | /> |
| | | </view> |
| | | </form> |
| | | |
| | | <view class="cu-list det menu sm-border padding"> |
| | | <block |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | > |
| | | <view class="cu-bar bg-white solid-bottom margin-top-sm"> |
| | | <view class="action"> |
| | | <view class="index"> |
| | | {{ index + 1 }} |
| | | </view> |
| | | <view class="text-blue"> |
| | | {{ `${item.maktx}` }} |
| | | </view> |
| | | </view> |
| | | <!-- <view class="action" > |
| | | <text @click="remove(index)" class="cuIcon-close text-red" style="font-size: 24px;"></text> |
| | | </view> --> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">ASN:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.asnCode }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">批次:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.batch }}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">收货数量:</text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-grey">{{ item.anfme }}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </view> |
| | | |
| | | <view class="cu-bar btn-group foot"> |
| | | <button |
| | | v-if="hasButtonPermission('reset')" |
| | | class="cu-btn text-blue line-blue shadow" |
| | | @click="clear" |
| | | > |
| | | 清空 |
| | | </button> |
| | | <button |
| | | v-if="hasButtonPermission('submit')" |
| | | class="cu-btn bg-blue shadow-blur" |
| | | @click="confirm" |
| | | > |
| | | 换绑 |
| | | </button> |
| | | </view> |
| | | |
| | | <uni-popup |
| | | ref="popup" |
| | | class="cu-popup" |
| | | > |
| | | <view class="popup-content"> |
| | | <view class="head"> |
| | | <text>推荐</text> |
| | | <text |
| | | class="cuIcon-close text-red close" |
| | | @click="close" |
| | | ></text> |
| | | </view> |
| | | |
| | | <div class="body"> |
| | | <view class="cu-list grid col-3 no-border"> |
| | | <view |
| | | class="item" |
| | | v-for="el in range" |
| | | > |
| | | <view |
| | | class="cu-btn round sm" |
| | | :class="[ |
| | | el === curCode ? 'bg-blue' : 'line-blue' |
| | | ]" |
| | | @click="itemChange(el)" |
| | | > |
| | | {{ el }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </div> |
| | | |
| | | <view class="cu-bar btn-group"> |
| | | <button |
| | | class="cu-btn bg-blue shadow-blur" |
| | | @click="popupSubmit" |
| | | > |
| | | 提交 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { request } from '@/common/request.js' |
| | | import { mapState, mapMutations, mapActions, mapGetters } from 'vuex' |
| | | export default { |
| | | data() { |
| | | return { |
| | | barcode: '', |
| | | areaName: '', |
| | | locCode: '', |
| | | container: '', |
| | | newContainer: '', |
| | | list: [], |
| | | range: [], |
| | | curCode: '', |
| | | agvStationInput: '', // AGV站点输入值 |
| | | agvStationName: '', |
| | | buttonPermissions: [] // 按钮权限列表 |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapState('user', ['dynamicFields']) |
| | | }, |
| | | mounted() { |
| | | // 获取按钮权限 |
| | | this.buttonPermissions = uni.getStorageSync('buttonPermissions') || [] |
| | | console.log('当前页面按钮权限:', this.buttonPermissions) |
| | | }, |
| | | methods: { |
| | | async checkAgvStation() { |
| | | const that = this |
| | | if (this.container === '' || this.container === null) { |
| | | uni.showToast({ |
| | | title: '容器码为空', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request('/check/agvStation', { |
| | | transferStationNo: this.agvStationInput |
| | | }) |
| | | if (code === 200) { |
| | | this.agvStationName = data.stationName |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(function () { |
| | | that.agvStationName = '' |
| | | that.agvStationInput = '' |
| | | }, 200) |
| | | } |
| | | }, |
| | | async search() { |
| | | const { code, data, msg } = await request('/stock/operate/list', { |
| | | barcode: this.container, |
| | | sta: this.barcode |
| | | }) |
| | | if (code === 200) { |
| | | // const find = this.list.find(el => el.id === data.id); |
| | | // !find && |
| | | this.list = data |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | // 检查按钮权限 |
| | | hasButtonPermission(route) { |
| | | return this.buttonPermissions.includes(route) |
| | | }, |
| | | |
| | | remove(index) { |
| | | this.list.splice(index, 1) |
| | | }, |
| | | clear() { |
| | | this.list = [] |
| | | |
| | | this.container = '' |
| | | this.newContainer = '' |
| | | }, |
| | | |
| | | open() { |
| | | this.$refs.popup.open() |
| | | }, |
| | | |
| | | close() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | |
| | | popupSubmit() { |
| | | this.$refs.popup.close() |
| | | }, |
| | | itemChange(el) { |
| | | this.curCode = el |
| | | }, |
| | | |
| | | async confirm() { |
| | | if (this.container === '' || this.container === null) { |
| | | uni.showToast({ |
| | | title: '容器码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | if (this.newContainer === '' || this.newContainer === null) { |
| | | uni.showToast({ |
| | | title: '新容器码不能为空', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/containerRebinding', |
| | | { |
| | | containerNo: this.container, |
| | | newContainerNo: this.newContainer |
| | | } |
| | | ) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | | title: '换绑完成' |
| | | }) |
| | | this.clear() |
| | | } else { |
| | | uni.showToast({ |
| | | title: msg, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .index { |
| | | border: 1px solid #e54d42; |
| | | color: #e54d42; |
| | | border-radius: 50%; |
| | | display: block; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | | line-height: 48rpx; |
| | | text-align: center; |
| | | margin-right: 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .text-blue { |
| | | color: #0081ff !important; |
| | | } |
| | | |
| | | .item { |
| | | position: relative; |
| | | display: flex; |
| | | min-height: 80upx; |
| | | align-items: center; |
| | | } |
| | | |
| | | .uni-file-picker { |
| | | width: 100%; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .uni-select__selector { |
| | | z-index: 999; |
| | | } |
| | | |
| | | .tj { |
| | | height: auto; |
| | | padding: 6px 8px; |
| | | display: inline-block; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .item .cu-btn { |
| | | font-size: 26upx; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="page-container"> |
| | | <!-- 订单信息头部 --> |
| | | <view class="order-header" v-if="order"> |
| | | <view |
| | | class="order-header" |
| | | v-if="order" |
| | | > |
| | | <view class="header-content"> |
| | | <view class="header-row"> |
| | | <text class="header-label">单据号</text> |
| | |
| | | |
| | | <!-- 明细列表 --> |
| | | <view class="padding-lr margin-top-sm"> |
| | | <block v-for="(item, index) in filterList" :key="index"> |
| | | <view class="cu-list menu sm-border margin-bottom-sm" @click="chose(item)"> |
| | | <block |
| | | v-for="(item, index) in filterList" |
| | | :key="index" |
| | | > |
| | | <view |
| | | class="cu-list menu sm-border margin-bottom-sm" |
| | | @click="chose(item)" |
| | | > |
| | | <view class="cu-bar bg-white solid-bottom"> |
| | | <view class="action"> |
| | | <view class="index">{{index+1}}</view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="action"> |
| | | <text :class="getRemaining(item) > 0 ? 'text-blue' : 'text-green'"> |
| | | {{getRemaining(item) > 0 ? '剩余 ' + getRemaining(item) : '已完成'}} |
| | | <text |
| | | :class=" |
| | | getRemaining(item) > 0 |
| | | ? 'text-blue' |
| | | : 'text-green' |
| | | " |
| | | > |
| | | {{ |
| | | getRemaining(item) > 0 |
| | | ? '剩余 ' + getRemaining(item) |
| | | : '已完成' |
| | | }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">物料名称:</text> |
| | | <text class="text-grey text-sm margin-left-xs">{{item.maktx || '-'}}</text> |
| | | <text class="text-grey text-sm margin-left-xs"> |
| | | {{ item.maktx || '-' }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">规格:</text> |
| | | <text class="text-grey margin-left-xs">{{item.specs || '-'}}</text> |
| | | <text class="text-grey margin-left-xs"> |
| | | {{ item.specs || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-black">批次:</text> |
| | | <text class="text-grey margin-left-xs">{{item.splrBatch || '-'}}</text> |
| | | <text class="text-grey margin-left-xs"> |
| | | {{ item.splrBatch || '-' }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="cu-item"> |
| | | <view class="content"> |
| | | <text class="text-black">订单数量:</text> |
| | | <text class="text-blue margin-left-xs">{{item.anfme}}</text> |
| | | <text class="text-blue margin-left-xs"> |
| | | {{ item.anfme }} |
| | | </text> |
| | | </view> |
| | | <view class="action"> |
| | | <text class="text-black">已完成:</text> |
| | | <text class="text-green margin-left-xs">{{item.qty}}</text> |
| | | <text class="text-green margin-left-xs"> |
| | | {{ item.qty }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <!-- 空状态 --> |
| | | <view class="empty-state" v-if="filterList.length === 0 && !loading"> |
| | | <uni-icons type="info" size="60" color="#CCCCCC"></uni-icons> |
| | | <view |
| | | class="empty-state" |
| | | v-if="filterList.length === 0 && !loading" |
| | | > |
| | | <uni-icons |
| | | type="info" |
| | | size="60" |
| | | color="#CCCCCC" |
| | | ></uni-icons> |
| | | <text class="empty-text">暂无明细数据</text> |
| | | </view> |
| | | |
| | | <!-- 统计信息 --> |
| | | <view class="stats-bar" v-if="menuList.length > 0"> |
| | | <view |
| | | class="stats-bar" |
| | | v-if="menuList.length > 0" |
| | | > |
| | | <view class="stats-item"> |
| | | <text class="stats-value">{{menuList.length}}</text> |
| | | <text class="stats-label">总明细</text> |
| | |
| | | condition: '', |
| | | menuList: [], |
| | | order: '', |
| | | loading: false, |
| | | loading: false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | if (!this.condition.trim()) { |
| | | // 排序:有剩余数量的排前面 |
| | | return [...this.menuList].sort((a, b) => { |
| | | if (a.ableQty > 0 && b.ableQty <= 0) return -1; |
| | | if (a.ableQty <= 0 && b.ableQty > 0) return 1; |
| | | return 0; |
| | | }); |
| | | if (a.ableQty > 0 && b.ableQty <= 0) return -1 |
| | | if (a.ableQty <= 0 && b.ableQty > 0) return 1 |
| | | return 0 |
| | | }) |
| | | } |
| | | const keyword = this.condition.toLowerCase(); |
| | | return this.menuList.filter(item => { |
| | | return (item.matnr && item.matnr.toLowerCase().includes(keyword)) || |
| | | (item.maktx && item.maktx.toLowerCase().includes(keyword)) || |
| | | (item.batch && item.batch.toLowerCase().includes(keyword)); |
| | | }); |
| | | const keyword = this.condition.toLowerCase() |
| | | return this.menuList.filter((item) => { |
| | | return ( |
| | | (item.matnr && |
| | | item.matnr.toLowerCase().includes(keyword)) || |
| | | (item.maktx && |
| | | item.maktx.toLowerCase().includes(keyword)) || |
| | | (item.batch && item.batch.toLowerCase().includes(keyword)) |
| | | ) |
| | | }) |
| | | }, |
| | | // 待处理数量 |
| | | pendingCount() { |
| | | return this.menuList.filter(item => item.enableQty > 0).length; |
| | | return this.menuList.filter((item) => item.enableQty > 0).length |
| | | }, |
| | | // 已完成数量 |
| | | completedCount() { |
| | | return this.menuList.filter(item => item.enableQty <= 0).length; |
| | | return this.menuList.filter((item) => item.enableQty <= 0).length |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let that = this; |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | let that = this |
| | | const eventChannel = this.getOpenerEventChannel() |
| | | if (eventChannel) { |
| | | eventChannel.on('data', function(data) { |
| | | that.order = data.data; |
| | | that.getOrderNoList(that.order); |
| | | }); |
| | | that.order = data.data |
| | | that.getOrderNoList(that.order) |
| | | }) |
| | | } |
| | | }, |
| | | onShow() { |
| | | if (this.order) { |
| | | this.getOrderNoList(this.order); |
| | | this.getOrderNoList(this.order) |
| | | } |
| | | }, |
| | | methods: { |
| | | // 获取剩余数量 |
| | | getRemaining(item) { |
| | | if (item.ableQty !== undefined && item.ableQty !== null) { |
| | | return Number(item.ableQty); |
| | | return Number(item.ableQty) |
| | | } |
| | | // 降级逻辑:订单数量 - 已完成数量 |
| | | return Number(item.anfme || 0) - Number(item.qty || 0); |
| | | return Number(item.anfme || 0) - Number(item.qty || 0) |
| | | }, |
| | | // 搜索 |
| | | async search() { |
| | | if (!this.condition.trim()) { |
| | | this.getOrderNoList(this.order); |
| | | return; |
| | | this.getOrderNoList(this.order) |
| | | return |
| | | } |
| | | this.loading = true; |
| | | this.loading = true |
| | | try { |
| | | const res = await request('/orderDetl/search/pda/auth', { |
| | | const res = await request( |
| | | '/orderDetl/search/pda/auth', |
| | | { |
| | | condition: this.condition, |
| | | order: this.order.code |
| | | }, 'POST', true); |
| | | }, |
| | | 'POST', |
| | | true |
| | | ) |
| | | |
| | | if (res.code === 200) { |
| | | let list = res.data || []; |
| | | list.forEach(item => { |
| | | if (item.enableQty === undefined || item.enableQty === null) { |
| | | item.enableQty = Number(item.anfme || 0) - Number(item.qty || 0); |
| | | let list = res.data || [] |
| | | list.forEach((item) => { |
| | | if ( |
| | | item.ableQty === undefined || |
| | | item.ableQty === null |
| | | ) { |
| | | item.ableQty = |
| | | Number(item.anfme || 0) - Number(item.qty || 0) |
| | | } |
| | | }); |
| | | this.menuList = list; |
| | | }) |
| | | this.menuList = list |
| | | } else if (res.code === 403) { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ url: '../login/login' }); |
| | | }, 1000); |
| | | uni.reLaunch({ url: '../login/login' }) |
| | | }, 1000) |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | // request.js 已经处理了错误提示 |
| | | } finally { |
| | | this.loading = false; |
| | | this.loading = false |
| | | } |
| | | }, |
| | | // 取消搜索 |
| | | onCancelSearch() { |
| | | this.condition = ''; |
| | | this.getOrderNoList(this.order); |
| | | this.condition = '' |
| | | this.getOrderNoList(this.order) |
| | | }, |
| | | // 获取订单明细列表 |
| | | async getOrderNoList(order) { |
| | | if (!order || !order.code) return; |
| | | this.loading = true; |
| | | if (!order || !order.code) return |
| | | this.loading = true |
| | | try { |
| | | const res = await request('/orderOut/detlList', { |
| | | const res = await request( |
| | | '/orderOut/detlList', |
| | | { |
| | | orderNo: order.code |
| | | }, 'GET', true); |
| | | }, |
| | | 'GET', |
| | | true |
| | | ) |
| | | |
| | | if (res.code === 200) { |
| | | let list = res.data || []; |
| | | list.forEach(item => { |
| | | if (item.enableQty === undefined || item.enableQty === null) { |
| | | item.enableQty = Number(item.anfme || 0) - Number(item.qty || 0); |
| | | let list = res.data || [] |
| | | list.forEach((item) => { |
| | | if ( |
| | | item.enableQty === undefined || |
| | | item.enableQty === null |
| | | ) { |
| | | item.enableQty = |
| | | Number(item.anfme || 0) - Number(item.qty || 0) |
| | | } |
| | | }); |
| | | this.menuList = list; |
| | | }) |
| | | this.menuList = list |
| | | } else { |
| | | this.menuList = res.data || []; |
| | | this.menuList = res.data || [] |
| | | } |
| | | } catch (err) { |
| | | // request.js 已经处理了错误提示 |
| | | } finally { |
| | | this.loading = false; |
| | | this.loading = false |
| | | } |
| | | }, |
| | | // 选择明细进行出库 |
| | | chose(item) { |
| | | if (item.enableQty <= 0) { |
| | | uni.showToast({ title: '该明细已完成', icon: "none", position: 'top' }); |
| | | return; |
| | | if (item.ableQty <= 0) { |
| | | uni.showToast({ |
| | | title: '该明细已完成', |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | return |
| | | } |
| | | let that = this; |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: "./outLocView", |
| | | url: './outLocView', |
| | | success: function(res) { |
| | | res.eventChannel.emit('orderItem', { |
| | | item: item |
| | | }); |
| | | }) |
| | | }, |
| | | events: { |
| | | acceptDataFromOpenedPage: function(data) { |
| | | // 返回后刷新数据 |
| | | }, |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <view class="page-container"> |
| | | <!-- 搜索框 --> |
| | | <view class="search-bar"> |
| | | <uni-search-bar v-model="condition" placeholder=" 扫码 / 输入" bgColor="#F5F5F5" @confirm="search" @cancel="onCancelSearch" /> |
| | | <uni-search-bar |
| | | v-model="condition" |
| | | placeholder=" 扫码 / 输入" |
| | | bgColor="#F5F5F5" |
| | | @confirm="search" |
| | | @cancel="onCancelSearch" |
| | | /> |
| | | </view> |
| | | |
| | | <!-- 订单列表 --> |
| | | <view class="order-list"> |
| | | <view class="order-card" v-for="(item,i) in matList" :key="i" @click="toPrint(item)"> |
| | | <view |
| | | class="order-card" |
| | | v-for="(item, i) in matList" |
| | | :key="i" |
| | | @click="toPrint(item)" |
| | | > |
| | | <!-- 卡片头部 --> |
| | | <view class="card-header"> |
| | | <view class="order-badge" :class="getSettleClass(item.exceStatus)"> |
| | | <text class="badge-text">{{item.exceStatus$ || '未知'}}</text> |
| | | <view |
| | | class="order-badge" |
| | | :class="getSettleClass(item.exceStatus)" |
| | | > |
| | | <text class="badge-text"> |
| | | {{ item.exceStatus$ || '未知' }} |
| | | </text> |
| | | </view> |
| | | <view class="order-no"> |
| | | <text class="order-no-label">单据号</text> |
| | |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <text class="info-label">单据类型</text> |
| | | <text class="info-value">{{item.wkType$ || '-'}}</text> |
| | | <text class="info-value"> |
| | | {{ item.wkType$ || '-' }} |
| | | </text> |
| | | </view> |
| | | <!-- <view class="info-item"> |
| | | <text class="info-label">应出数量</text> |
| | |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | | <text class="info-label">应出数量</text> |
| | | <text class="info-value">{{item.anfme || '-'}}</text> |
| | | <text class="info-value"> |
| | | {{ item.anfme || '-' }} |
| | | </text> |
| | | </view> |
| | | <view class="info-item"> |
| | | <text class="info-label">完成数量</text> |
| | | <text class="info-value">{{item.qty || '-'}}</text> |
| | | <text class="info-value"> |
| | | {{ item.qty || '-' }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 卡片底部 --> |
| | | <view class="card-footer"> |
| | | <text class="view-detail">查看详情</text> |
| | | <uni-icons type="right" size="14" color="#999"></uni-icons> |
| | | <uni-icons |
| | | type="right" |
| | | size="14" |
| | | color="#999" |
| | | ></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 空状态 --> |
| | | <view class="empty-state" v-if="matList.length === 0 && !loading"> |
| | | <uni-icons type="search" size="60" color="#CCCCCC"></uni-icons> |
| | | <view |
| | | class="empty-state" |
| | | v-if="matList.length === 0 && !loading" |
| | | > |
| | | <uni-icons |
| | | type="search" |
| | | size="60" |
| | | color="#CCCCCC" |
| | | ></uni-icons> |
| | | <text class="empty-text">暂无订单数据</text> |
| | | <text class="empty-hint">下拉刷新试试</text> |
| | | </view> |
| | | |
| | | <!-- 加载更多 --> |
| | | <uni-load-more v-show="matList.length !== 0" :status="status" :icon-size="16" :content-text="contentText" /> |
| | | <uni-load-more |
| | | v-show="matList.length !== 0" |
| | | :status="status" |
| | | :icon-size="16" |
| | | :content-text="contentText" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // 下拉刷新 |
| | | onPullDownRefresh() { |
| | | this.refreshData(); |
| | | if (this.loading) { |
| | | uni.stopPullDownRefresh() |
| | | return |
| | | } |
| | | this.refreshData() |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.status !== 'noMore') { |
| | | this.status = 'loading'; |
| | | this.loadMoreData(); |
| | | if (this.status !== 'noMore' && !this.loading) { |
| | | this.status = 'loading' |
| | | this.loadMoreData() |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let that = this |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | const eventChannel = this.getOpenerEventChannel() |
| | | if (eventChannel) { |
| | | eventChannel.on('orderTypeId', function(data) { |
| | | that.orderTypeId = data.orderTypeId |
| | |
| | | }, |
| | | onShow() { |
| | | // 每次进入页面重新加载 |
| | | this.refreshData(); |
| | | this.refreshData() |
| | | }, |
| | | methods: { |
| | | // 刷新数据 |
| | | refreshData() { |
| | | this.curr = 1; |
| | | this.matList = []; |
| | | this.status = 'more'; |
| | | this.loading = true; |
| | | this.fetchOrderList(true); |
| | | if (this.loading) return |
| | | this.curr = 1 |
| | | this.matList = [] |
| | | this.status = 'more' |
| | | this.loading = true |
| | | this.fetchOrderList(true) |
| | | }, |
| | | // 加载更多数据 |
| | | loadMoreData() { |
| | | this.fetchOrderList(false); |
| | | if (this.loading) return |
| | | this.loading = true |
| | | this.fetchOrderList(false) |
| | | }, |
| | | // 获取订单列表 |
| | | async fetchOrderList(isRefresh) { |
| | | try { |
| | | const res = await request('/orderOut/list', { |
| | | const res = await request( |
| | | '/orderOut/list', |
| | | { |
| | | curr: this.curr, |
| | | limit: this.limit, |
| | | orderNo: this.condition, |
| | | orderType: this.orderTypeId |
| | | }, 'GET', true); |
| | | }, |
| | | 'GET', |
| | | true |
| | | ) |
| | | |
| | | if (res.code === 200) { |
| | | let records = res.data.records || []; |
| | | let records = res.data.records || [] |
| | | if (records.length > 0) { |
| | | if (isRefresh) { |
| | | this.matList = records; |
| | | this.matList = records |
| | | } else { |
| | | this.matList = this.matList.concat(records); |
| | | this.matList = this.matList.concat(records) |
| | | } |
| | | this.curr = this.curr + 1; |
| | | this.status = 'more'; |
| | | this.curr = this.curr + 1 |
| | | this.status = 'more' |
| | | } else { |
| | | this.status = 'noMore'; |
| | | this.status = 'noMore' |
| | | } |
| | | } else if (res.code === 403) { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ url: '../login/login' }); |
| | | }, 1000); |
| | | uni.reLaunch({ url: '../login/login' }) |
| | | }, 1000) |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | // request.js 已经处理了错误提示 |
| | | } finally { |
| | | this.loading = false; |
| | | uni.stopPullDownRefresh(); |
| | | this.loading = false |
| | | uni.stopPullDownRefresh() |
| | | } |
| | | }, |
| | | // 搜索 |
| | | async search() { |
| | | if (!this.condition.trim()) { |
| | | this.refreshData(); |
| | | return; |
| | | this.refreshData() |
| | | return |
| | | } |
| | | this.loading = true; |
| | | this.loading = true |
| | | try { |
| | | const res = await request('/orderOut/list', { |
| | | const res = await request( |
| | | '/orderOut/list', |
| | | { |
| | | curr: this.curr, |
| | | limit: this.limit, |
| | | orderNo: this.condition |
| | | }, 'GET', true); |
| | | }, |
| | | 'GET', |
| | | true |
| | | ) |
| | | |
| | | if (res.code === 200) { |
| | | this.matList = res.data || []; |
| | | this.status = 'noMore'; |
| | | this.matList = res.data || [] |
| | | this.status = 'noMore' |
| | | } else if (res.code === 403) { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | setTimeout(() => { |
| | | uni.reLaunch({ url: '../login/login' }); |
| | | }, 1000); |
| | | uni.reLaunch({ url: '../login/login' }) |
| | | }, 1000) |
| | | } else { |
| | | uni.showToast({ title: res.msg, icon: "none", position: 'top' }); |
| | | uni.showToast({ |
| | | title: res.msg, |
| | | icon: 'none', |
| | | position: 'top' |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | // request.js 已经处理了错误提示 |
| | | } finally { |
| | | this.loading = false; |
| | | this.loading = false |
| | | } |
| | | }, |
| | | // 取消搜索 |
| | | onCancelSearch() { |
| | | this.condition = ''; |
| | | this.refreshData(); |
| | | this.condition = '' |
| | | this.refreshData() |
| | | }, |
| | | // 根据状态返回样式类名 |
| | | getSettleClass(settle) { |
| | |
| | | 2: 'badge-processing', |
| | | 3: 'badge-completed', |
| | | 4: 'badge-cancelled' |
| | | }; |
| | | return classMap[settle] || 'badge-default'; |
| | | } |
| | | return classMap[settle] || 'badge-default' |
| | | }, |
| | | // 跳转到订单详情 |
| | | toPrint(item) { |
| | | let that = this; |
| | | let that = this |
| | | uni.navigateTo({ |
| | | url: "./orderDetlList", |
| | | url: './orderDetlList', |
| | | success: function(res) { |
| | | res.eventChannel.emit('data', { |
| | | data: item |
| | | }); |
| | | }) |
| | | }, |
| | | events: { |
| | | acceptDataFromOpenedPage: function(data) { |
| | | that.matnr = data.data; |
| | | that.findMat(that.matnr); |
| | | }, |
| | | }, |
| | | }); |
| | | that.matnr = data.data |
| | | that.findMat(that.matnr) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item" v-if="index === locList.length - 1 && (item.anfme === 0 || !item.anfme)"> |
| | | <view class="content"> |
| | | <text class="text-red text-bold">库存不足</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="cu-item" v-if="item.anfme"> |
| | | <view class="content"> |
| | | <text class="text-blue">出库数量:</text> |
| | |
| | | } |
| | | const { code, data, msg } = await request('/check/agvStation', { |
| | | transferStationNo: item.outStaInput |
| | | }) |
| | | }, 'POST', false) |
| | | if (code === 200) { |
| | | item.agvStationName = data.stationName |
| | | } else { |
| | |
| | | } |
| | | const { code, data, msg } = await request( |
| | | '/orderOut/getOutLocRun', |
| | | requestData |
| | | requestData, |
| | | 'POST', |
| | | false |
| | | ) |
| | | if (code === 200) { |
| | | uni.showToast({ |
| | |
| | | try { |
| | | const res = await request('/orderOut/getOutLocView', { |
| | | orderItemId: item.id |
| | | }, 'POST', true); |
| | | }, 'POST', false); |
| | | |
| | | if (res.code === 200) { |
| | | this.locList = res.data || []; |