项目初始化
This commit is contained in:
314
pda/pages/warehouse/outbound/confirm.vue
Normal file
314
pda/pages/warehouse/outbound/confirm.vue
Normal file
@@ -0,0 +1,314 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 任务信息 -->
|
||||
<view class="task-info" v-if="taskNo">
|
||||
<text class="task-label">出库任务编号</text>
|
||||
<text class="task-value">{{ taskNo }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 扫码区域 -->
|
||||
<view class="scan-section">
|
||||
<view class="scan-header">
|
||||
<text class="scan-title">扫描出库物料条码</text>
|
||||
<view class="scan-btn" @click="startScan">
|
||||
<uni-icons type="scan" size="18" color="#fa8c16"></uni-icons>
|
||||
<text class="scan-btn-text orange">扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-wrap">
|
||||
<input class="scan-input" v-model="barcode" placeholder="请输入或扫描物料条码"
|
||||
@confirm="handleBarcode" focus />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 出库信息 -->
|
||||
<view class="form-section" v-if="outboundInfo">
|
||||
<text class="form-title">出库信息</text>
|
||||
<view class="info-row">
|
||||
<text class="info-label">物料编码</text>
|
||||
<text class="info-value">{{ outboundInfo.materialCode }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">物料名称</text>
|
||||
<text class="info-value">{{ outboundInfo.materialName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">规格型号</text>
|
||||
<text class="info-value">{{ outboundInfo.spec }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">托盘号</text>
|
||||
<text class="info-value">{{ outboundInfo.trayCode }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">库位</text>
|
||||
<text class="info-value">{{ outboundInfo.locationCode }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">出库数量</text>
|
||||
<text class="info-value highlight">{{ outboundInfo.quantity }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">出库口</text>
|
||||
<text class="info-value">{{ outboundInfo.portName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 确认信息 -->
|
||||
<view class="form-section" v-if="outboundInfo">
|
||||
<text class="form-title">确认信息</text>
|
||||
<view class="form-item">
|
||||
<text class="form-label">实际数量</text>
|
||||
<input class="form-input" v-model="confirmQty" type="number" :placeholder="'出库数量: ' + outboundInfo.quantity" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-label">备注</text>
|
||||
<input class="form-input" v-model="form.remark" placeholder="选填" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="btn-section" v-if="outboundInfo">
|
||||
<button class="btn btn-orange" @click="confirmOutbound">确认出库</button>
|
||||
<button class="btn btn-default" @click="resetForm">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOutboundDetail, confirmOutbound } from '@/api/warehouse/outbound'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskNo: '',
|
||||
barcode: '',
|
||||
outboundInfo: null,
|
||||
confirmQty: '',
|
||||
form: {
|
||||
remark: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.taskNo) {
|
||||
this.taskNo = options.taskNo
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startScan() {
|
||||
var that = this
|
||||
uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
that.barcode = res.result
|
||||
that.handleBarcode()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleBarcode() {
|
||||
if (!this.barcode) {
|
||||
this.$modal.msg('请输入物料条码')
|
||||
return
|
||||
}
|
||||
var that = this
|
||||
var params = { taskNo: this.taskNo, barcode: this.barcode }
|
||||
getOutboundDetail(params).then(function(res) {
|
||||
that.outboundInfo = res.data
|
||||
that.confirmQty = String(res.data.quantity)
|
||||
that.$modal.msgSuccess('出库信息获取成功')
|
||||
}).catch(function() {
|
||||
that.outboundInfo = null
|
||||
})
|
||||
},
|
||||
confirmOutbound() {
|
||||
if (!this.confirmQty) {
|
||||
this.$modal.msg('请输入实际数量')
|
||||
return
|
||||
}
|
||||
var data = {
|
||||
taskNo: this.taskNo,
|
||||
barcode: this.barcode,
|
||||
quantity: this.confirmQty,
|
||||
remark: this.form.remark
|
||||
}
|
||||
var that = this
|
||||
confirmOutbound(data).then(function() {
|
||||
that.$modal.msgSuccess('出库确认成功')
|
||||
that.resetForm()
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.barcode = ''
|
||||
this.outboundInfo = null
|
||||
this.confirmQty = ''
|
||||
this.form = {
|
||||
remark: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.task-info {
|
||||
background: #fff7e6;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.task-label {
|
||||
font-size: 26rpx;
|
||||
color: #fa8c16;
|
||||
}
|
||||
|
||||
.task-value {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.scan-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.scan-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.scan-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.scan-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 20rpx;
|
||||
border: 1rpx solid #fa8c16;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text.orange {
|
||||
color: #fa8c16;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.scan-input {
|
||||
font-size: 28rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
width: 160rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.info-value.highlight {
|
||||
color: #fa8c16;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.btn-section {
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 30rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.btn-orange {
|
||||
background: #fa8c16;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border: 1rpx solid #d9d9d9;
|
||||
}
|
||||
</style>
|
||||
411
pda/pages/warehouse/outbound/exception.vue
Normal file
411
pda/pages/warehouse/outbound/exception.vue
Normal file
@@ -0,0 +1,411 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 任务信息 -->
|
||||
<view class="task-info" v-if="taskNo">
|
||||
<text class="task-label">异常任务编号</text>
|
||||
<text class="task-value">{{ taskNo }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 扫码区域 -->
|
||||
<view class="scan-section">
|
||||
<view class="scan-header">
|
||||
<text class="scan-title">扫描异常物料条码</text>
|
||||
<view class="scan-btn" @click="startScan">
|
||||
<uni-icons type="scan" size="18" color="#f5222d"></uni-icons>
|
||||
<text class="scan-btn-text red">扫码</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="input-wrap">
|
||||
<input class="scan-input" v-model="barcode" placeholder="请输入或扫描物料条码"
|
||||
@confirm="handleBarcode" focus />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 异常信息填写 -->
|
||||
<view class="form-section">
|
||||
<text class="form-title">异常信息</text>
|
||||
<view class="form-item">
|
||||
<text class="form-label">异常类型</text>
|
||||
<picker mode="selector" :range="exceptionTypes" range-key="label" @change="onTypeChange">
|
||||
<view class="picker-value">{{ selectedType ? selectedType.label : '请选择异常类型' }}</view>
|
||||
</picker>
|
||||
<uni-icons type="bottom" size="16" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-label">处理方式</text>
|
||||
<picker mode="selector" :range="handleMethods" range-key="label" @change="onMethodChange">
|
||||
<view class="picker-value">{{ selectedMethod ? selectedMethod.label : '请选择处理方式' }}</view>
|
||||
</picker>
|
||||
<uni-icons type="bottom" size="16" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<text class="form-label">异常描述</text>
|
||||
<input class="form-input" v-model="form.description" placeholder="请描述异常情况" />
|
||||
</view>
|
||||
<view class="form-item column">
|
||||
<text class="form-label">拍照留证</text>
|
||||
<view class="photo-list">
|
||||
<view class="photo-item" v-for="(photo, index) in photos" :key="index"
|
||||
@click="previewPhoto(index)">
|
||||
<image :src="photo" mode="aspectFill" class="photo-img"></image>
|
||||
</view>
|
||||
<view class="photo-add" @click="takePhoto" v-if="photos.length < 3">
|
||||
<uni-icons type="plusempty" size="28" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 出库信息(扫码后显示) -->
|
||||
<view class="form-section" v-if="outboundInfo">
|
||||
<text class="form-title">出库任务信息</text>
|
||||
<view class="info-row">
|
||||
<text class="info-label">物料编码</text>
|
||||
<text class="info-value">{{ outboundInfo.materialCode }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">物料名称</text>
|
||||
<text class="info-value">{{ outboundInfo.materialName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">出库数量</text>
|
||||
<text class="info-value">{{ outboundInfo.quantity }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">出库口</text>
|
||||
<text class="info-value">{{ outboundInfo.portName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="btn-section">
|
||||
<button class="btn btn-danger" @click="submitException">提交异常确认</button>
|
||||
<button class="btn btn-default" @click="resetForm">重置</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOutboundDetail, submitOutboundException } from '@/api/warehouse/outbound'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskNo: '',
|
||||
barcode: '',
|
||||
outboundInfo: null,
|
||||
photos: [],
|
||||
exceptionTypes: [
|
||||
{ value: 'damage', label: '物料损坏' },
|
||||
{ value: 'missing', label: '物料缺失' },
|
||||
{ value: 'wrong', label: '物料错误' },
|
||||
{ value: 'qty_mismatch', label: '数量不符' },
|
||||
{ value: 'other', label: '其他异常' }
|
||||
],
|
||||
handleMethods: [
|
||||
{ value: 'return', label: '退回入库' },
|
||||
{ value: 'replace', label: '更换物料' },
|
||||
{ value: 'skip', label: '跳过本次' },
|
||||
{ value: 'manual', label: '人工处理' }
|
||||
],
|
||||
selectedType: null,
|
||||
selectedMethod: null,
|
||||
form: {
|
||||
description: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.taskNo) {
|
||||
this.taskNo = options.taskNo
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startScan() {
|
||||
var that = this
|
||||
uni.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: ['barCode', 'qrCode'],
|
||||
success: function(res) {
|
||||
that.barcode = res.result
|
||||
that.handleBarcode()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleBarcode() {
|
||||
if (!this.barcode) {
|
||||
this.$modal.msg('请输入物料条码')
|
||||
return
|
||||
}
|
||||
var that = this
|
||||
var params = { taskNo: this.taskNo, barcode: this.barcode }
|
||||
getOutboundDetail(params).then(function(res) {
|
||||
that.outboundInfo = res.data
|
||||
that.$modal.msgSuccess('出库信息获取成功')
|
||||
}).catch(function() {
|
||||
that.outboundInfo = null
|
||||
})
|
||||
},
|
||||
onTypeChange(e) {
|
||||
this.selectedType = this.exceptionTypes[e.detail.value]
|
||||
},
|
||||
onMethodChange(e) {
|
||||
this.selectedMethod = this.handleMethods[e.detail.value]
|
||||
},
|
||||
takePhoto() {
|
||||
var that = this
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sourceType: ['camera', 'album'],
|
||||
success: function(res) {
|
||||
that.photos = that.photos.concat(res.tempFilePaths)
|
||||
}
|
||||
})
|
||||
},
|
||||
previewPhoto(index) {
|
||||
uni.previewImage({
|
||||
current: this.photos[index],
|
||||
urls: this.photos
|
||||
})
|
||||
},
|
||||
submitException() {
|
||||
if (!this.barcode) {
|
||||
this.$modal.msg('请输入物料条码')
|
||||
return
|
||||
}
|
||||
if (!this.selectedType) {
|
||||
this.$modal.msg('请选择异常类型')
|
||||
return
|
||||
}
|
||||
if (!this.selectedMethod) {
|
||||
this.$modal.msg('请选择处理方式')
|
||||
return
|
||||
}
|
||||
var data = {
|
||||
taskNo: this.taskNo,
|
||||
barcode: this.barcode,
|
||||
exceptionType: this.selectedType.value,
|
||||
handleMethod: this.selectedMethod.value,
|
||||
description: this.form.description
|
||||
}
|
||||
var that = this
|
||||
submitOutboundException(data).then(function() {
|
||||
that.$modal.msgSuccess('异常确认提交成功')
|
||||
that.resetForm()
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.barcode = ''
|
||||
this.outboundInfo = null
|
||||
this.photos = []
|
||||
this.selectedType = null
|
||||
this.selectedMethod = null
|
||||
this.form = {
|
||||
description: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.task-info {
|
||||
background: #fff1f0;
|
||||
border-radius: 12rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.task-label {
|
||||
font-size: 26rpx;
|
||||
color: #f5222d;
|
||||
}
|
||||
|
||||
.task-value {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.scan-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.scan-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.scan-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.scan-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8rpx 20rpx;
|
||||
border: 1rpx solid #f5222d;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text {
|
||||
font-size: 24rpx;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.scan-btn-text.red {
|
||||
color: #f5222d;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 8rpx;
|
||||
padding: 4rpx;
|
||||
}
|
||||
|
||||
.scan-input {
|
||||
font-size: 28rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.form-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 16rpx 0;
|
||||
}
|
||||
|
||||
.form-item.column {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
width: 160rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.form-item.column .form-label {
|
||||
width: auto;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
border: 1rpx solid #e8e8e8;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.picker-value {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.photo-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.photo-item {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.photo-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.photo-add {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 12rpx;
|
||||
border: 1rpx dashed #d9d9d9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.btn-section {
|
||||
padding: 24rpx 0;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 30rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background: #f5222d;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
background: #fff;
|
||||
color: #666;
|
||||
border: 1rpx solid #d9d9d9;
|
||||
}
|
||||
</style>
|
||||
312
pda/pages/warehouse/outbound/index.vue
Normal file
312
pda/pages/warehouse/outbound/index.vue
Normal file
@@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<view class="page-container">
|
||||
<!-- 出库管理功能入口 -->
|
||||
<view class="menu-section">
|
||||
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/confirm')">
|
||||
<view class="card-left">
|
||||
<view class="card-icon orange">
|
||||
<uni-icons type="checkmarkempty" size="24" color="#fff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-title">出库确认</text>
|
||||
<text class="card-desc">扫描出库物料条码进行出库确认</text>
|
||||
</view>
|
||||
</view>
|
||||
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
|
||||
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/exception')">
|
||||
<view class="card-left">
|
||||
<view class="card-icon red">
|
||||
<uni-icons type="info" size="24" color="#fff"></uni-icons>
|
||||
</view>
|
||||
<view class="card-info">
|
||||
<text class="card-title">出库异常确认</text>
|
||||
<text class="card-desc">处理出库过程中的异常情况</text>
|
||||
</view>
|
||||
</view>
|
||||
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 待处理任务 -->
|
||||
<view class="task-section">
|
||||
<view class="section-header">
|
||||
<text class="section-title">待处理任务</text>
|
||||
<text class="section-more" @click="refreshTasks">刷新</text>
|
||||
</view>
|
||||
<view v-if="taskList.length === 0" class="empty-state">
|
||||
<text class="empty-text">暂无待处理任务</text>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="task-card" v-for="(item, index) in taskList" :key="index"
|
||||
@click="handleTask(item)">
|
||||
<view class="task-header">
|
||||
<text class="task-type" :class="item.typeClass">{{ item.typeName }}</text>
|
||||
<text class="task-no">{{ item.taskNo }}</text>
|
||||
</view>
|
||||
<view class="task-body">
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">物料编码</text>
|
||||
<text class="info-value">{{ item.materialCode }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">物料名称</text>
|
||||
<text class="info-value">{{ item.materialName }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">出库数量</text>
|
||||
<text class="info-value">{{ item.quantity }}</text>
|
||||
</view>
|
||||
<view class="task-info-item">
|
||||
<text class="info-label">出库口</text>
|
||||
<text class="info-value">{{ item.portName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="task-footer">
|
||||
<text class="task-time">{{ item.createTime }}</text>
|
||||
<view class="task-status" :class="item.statusClass">{{ item.statusName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getOutboundTaskList } from '@/api/warehouse/outbound'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
taskList: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.loadTasks()
|
||||
},
|
||||
onShow() {
|
||||
this.loadTasks()
|
||||
},
|
||||
methods: {
|
||||
navigateTo(url) {
|
||||
this.$tab.navigateTo(url)
|
||||
},
|
||||
loadTasks() {
|
||||
getOutboundTaskList().then(res => {
|
||||
this.taskList = res.data || []
|
||||
}).catch(() => {
|
||||
this.taskList = []
|
||||
})
|
||||
},
|
||||
refreshTasks() {
|
||||
this.loadTasks()
|
||||
this.$modal.showToast('刷新成功')
|
||||
},
|
||||
handleTask(item) {
|
||||
if (item.type === 'confirm') {
|
||||
this.$tab.navigateTo('/pages/warehouse/outbound/confirm?taskNo=' + item.taskNo)
|
||||
} else if (item.type === 'exception') {
|
||||
this.$tab.navigateTo('/pages/warehouse/outbound/exception?taskNo=' + item.taskNo)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f5f7fa;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.menu-section {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.menu-card {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.card-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.card-icon.orange {
|
||||
background: linear-gradient(135deg, #fa8c16, #ffa940);
|
||||
}
|
||||
|
||||
.card-icon.red {
|
||||
background: linear-gradient(135deg, #f5222d, #ff4d4f);
|
||||
}
|
||||
|
||||
.card-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.card-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.task-section {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section-more {
|
||||
font-size: 26rpx;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 80rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.task-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.task-type {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.task-type.confirm {
|
||||
color: #fa8c16;
|
||||
}
|
||||
|
||||
.task-type.exception {
|
||||
color: #f5222d;
|
||||
}
|
||||
|
||||
.task-no {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.task-body {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.task-info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.task-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: 16rpx;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.task-time {
|
||||
font-size: 22rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.task-status {
|
||||
font-size: 22rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.task-status.pending {
|
||||
color: #fa8c16;
|
||||
background: #fff7e6;
|
||||
}
|
||||
|
||||
.task-status.processing {
|
||||
color: #1890ff;
|
||||
background: #e6f7ff;
|
||||
}
|
||||
|
||||
.task-status.completed {
|
||||
color: #52c41a;
|
||||
background: #f6ffed;
|
||||
}
|
||||
|
||||
.task-status.exception {
|
||||
color: #f5222d;
|
||||
background: #fff1f0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user