现场调试更改

This commit is contained in:
lsymicc
2026-09-08 22:20:47 +08:00
parent 5353351520
commit 7c3ee78d41
140 changed files with 4488 additions and 4311 deletions

View File

@@ -56,9 +56,13 @@
<uni-icons type="scan" size="22" color="#1890ff"></uni-icons>
<text class="quick-label">入库绑盘</text>
</view>
<view class="quick-item" @click="navigateTo('/pages/warehouse/inbound/supply')">
<!-- <view class="quick-item" @click="navigateTo('/pages/warehouse/inbound/supply')">
<uni-icons type="plus" size="22" color="#52c41a"></uni-icons>
<text class="quick-label">补料入库</text>
</view> -->
<view class="quick-item" @click="navigateTo('/pages/warehouse/inbound/emptyTray')">
<uni-icons type="plus" size="22" color="#52c41a"></uni-icons>
<text class="quick-label">空托入库</text>
</view>
<view class="quick-item" @click="navigateTo('/pages/warehouse/outbound/confirm')">
<uni-icons type="checkmarkempty" size="22" color="#fa8c16"></uni-icons>

View File

@@ -14,17 +14,17 @@
<view class="iconfont icon-password icon"></view>
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
</view>
<view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<!-- <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
<view class="iconfont icon-code icon"></view>
<input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
<view class="login-code">
<image :src="codeUrl" @click="getCode" class="login-code-img"></image>
</view>
</view>
</view> -->
<view class="action-btn">
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
</view>
<view class="reg text-center" v-if="register">
<!-- <view class="reg text-center" v-if="register">
<text class="text-grey1">没有账号?</text>
<text @click="handleUserRegister" class="text-blue">立即注册</text>
</view>
@@ -32,7 +32,7 @@
<text class="text-grey1">登录即代表同意</text>
<text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
<text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
</view>
</view> -->
</view>
</view>
@@ -99,9 +99,11 @@
this.$modal.msgError("请输入账号")
} else if (this.loginForm.password === "") {
this.$modal.msgError("请输入密码")
} else if (this.loginForm.code === "" && this.captchaEnabled) {
this.$modal.msgError("请输入验证码")
} else {
}
// else if (this.loginForm.code === "" && this.captchaEnabled) {
// this.$modal.msgError("请输入验证码")
// }
else {
this.$modal.loading("登录中,请耐心等待...")
this.pwdLogin()
}
@@ -120,9 +122,9 @@
// 登录成功后,处理函数
loginSuccess(result) {
// 设置用户信息
this.$store.dispatch('GetInfo').then(res => {
// this.$store.dispatch('GetInfo').then(res => {
this.$tab.reLaunch('/pages/index')
})
// })
}
}
}

View File

@@ -8,24 +8,35 @@
<!-- 托盘信息 -->
<view class="form-section">
<text class="form-title">托盘信息</text>
<view class="form-item">
<!-- <text class="form-title">托盘信息</text> -->
<!-- <view class="form-item">
<text class="form-label">托盘号</text>
<input class="form-input" v-model="trayCode" placeholder="请输入托盘号" />
</view>
</view>
<!-- 扫码添加物料 -->
<view class="scan-section">
</view> -->
<view class="scan-header">
<text class="scan-title">扫描入库子单号</text>
<text class="scan-title">托盘信息</text>
<view class="scan-btn" @click="startScan">
<uni-icons type="scan" size="18" color="#1890ff"></uni-icons>
<text class="scan-btn-text">扫码</text>
</view>
</view>
<view class="input-wrap">
<input class="scan-input" v-model="barcode" placeholder="请输入或扫描入库子单号"
<input class="scan-input" v-model="trayCode" placeholder="请输入或扫描托盘条码"
@confirm="handleBarcode" />
</view>
</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="#1890ff"></uni-icons>
<text class="scan-btn-text">扫码</text>
</view>
</view>
<view class="input-wrap">
<input class="scan-input" v-model="barcode" placeholder="请输入或扫描版辊编号"
@confirm="handleBarcode" />
</view>
</view>
@@ -33,13 +44,25 @@
<!-- 当前扫码物料信息(待添加) -->
<view class="form-section" v-if="currentMaterial">
<text class="form-title">物料信息</text>
<view class="info-row">
<!-- <view class="info-row">
<text class="info-label">物料编码</text>
<text class="info-value">{{ currentMaterial.productId }}</text>
</view>
<view class="info-row">
<text class="info-label">物料名称</text>
<text class="info-value">{{ currentMaterial.productName }}</text>
</view> -->
<view class="info-row">
<text class="info-label">辊号</text>
<text class="info-value">{{ currentMaterial.rollerNumber }}</text>
</view>
<view class="info-row">
<text class="info-label">颜色</text>
<text class="info-value">{{ currentMaterial.color }}</text>
</view>
<view class="info-row">
<text class="info-label">色序</text>
<text class="info-value">{{ currentMaterial.colorSequence }}</text>
</view>
<view class="info-row">
<text class="info-label">子单号</text>
@@ -47,7 +70,7 @@
</view>
<view class="form-item">
<text class="form-label">绑定数量</text>
<input class="form-input" v-model="currentQty" type="number" placeholder="请输入绑定数量" />
<input class="form-input" v-model="currentQty" disabled type="number" placeholder="请输入绑定数量" />
</view>
<button class="btn-add" @click="addItem">
<uni-icons type="plus" size="16" color="#fff"></uni-icons>
@@ -62,13 +85,30 @@
</view>
<view class="item-card" v-for="(item, index) in items" :key="index">
<view class="item-body">
<view class="item-row">
<!-- <view class="item-row">
<text class="item-label">物料编码</text>
<text class="item-value">{{ item.productId }}</text>
</view>
<view class="item-row">
<text class="item-label">物料名称</text>
<text class="item-value">{{ item.productName }}</text>
</view> -->
<view class="item-row">
<text class="item-label">辊号</text>
<text class="item-value">{{ item.rollerNumber }}</text>
</view>
<view class="item-row">
<text class="item-label">色序</text>
<text class="item-value">{{ item.colorSequence }}</text>
</view>
<view class="item-row">
<text class="item-label">颜色</text>
<text class="item-value">{{ item.color }}</text>
</view>
<view class="item-row">
<text class="item-label">规格</text>
<text class="item-value">{{ item.spec }}</text>
</view>
<view class="item-row">
<text class="item-label">绑定数量</text>
@@ -83,7 +123,7 @@
<!-- 空状态提示 -->
<view class="empty-state" v-if="items.length === 0">
<text class="empty-text">请扫码添加物料</text>
<text class="empty-text">请扫码添加版辊信息</text>
</view>
<!-- 操作按钮 -->
@@ -92,16 +132,16 @@
确认绑盘({{ items.length }} 种物料)
</button>
<button class="btn btn-success" :disabled="items.length === 0 || !trayCode" @click="submitAddInJobAction">
<!-- <button class="btn btn-success" :disabled="!trayCode" @click="submitAddInJobAction">
生成入库作业
</button>
</button> -->
<button class="btn btn-default" @click="resetAll">全部重置</button>
</view>
</view>
</template>
<script>
import { getMaterialByDetailId, submitBindTray,submitAddInJob } from '@/api/warehouse/inbound'
import { getMaterialByDetailId, getMaterialByRollerNumber, submitBindTray, submitBindTrayMsg, submitAddInJob } from '@/api/warehouse/inbound'
export default {
data() {
@@ -138,18 +178,21 @@
// 根据入库明细ID查询物料
handleBarcode() {
if (!this.barcode) {
this.$modal.msg('请输入入库子单号')
// this.$modal.msg('请输入入库子单号')
this.$modal.msg('请输入版辊信息')
return
}
var that = this
getMaterialByDetailId(this.barcode).then(function(res) {
// getMaterialByDetailId(this.barcode).then(function(res) {
getMaterialByRollerNumber(this.barcode).then(function(res) {
that.currentMaterial = res.data
that.currentQty = res.data.quantity ? String(res.data.quantity) : ''
that.$modal.msgSuccess('物料信息获取成功')
}).catch(function() {
that.currentMaterial = null
that.currentQty = ''
that.$modal.msg('未找到该入库子单信息')
// that.$modal.msg('未找到该入库子单信息')
that.$modal.msg('未找到该版辊信息,可能是无单据明细或已绑定完成')
})
},
@@ -173,8 +216,12 @@
}
this.items.push({
stockinDetailId: this.currentMaterial.stockinDetailId,
productId: this.currentMaterial.productId,
productName: this.currentMaterial.productName,
productId: this.currentMaterial.rollerNumber,
// productName: this.currentMaterial.productName,
rollerNumber: this.currentMaterial.rollerNumber,
colorSequence: this.currentMaterial.colorSequence,
color: this.currentMaterial.color,
spec: this.currentMaterial.spec,
quantity: Number(this.currentQty)
})
// 清空当前扫码区,继续扫下一个
@@ -195,22 +242,29 @@
this.$modal.msg('请输入托盘号')
return
}
if (this.items.length === 0) {
this.$modal.msg('请至少添加一种物料')
return
}
var data = {
trayCode: this.trayCode,
items: this.items.map(function(i) {
return {
stockinDetailId: i.stockinDetailId,
productId: i.productId,
productId: i.rollerNumber,
rollerNumber: i.rollerNumber,
colorSequence: i.colorSequence,
color: i.color,
spec: i.spec,
quantity: i.quantity
}
})
}
var that = this
submitBindTray(data).then(function(res) {
// submitBindTray(data).then(function(res) {
submitBindTrayMsg(data).then(function(res) {
that.$modal.msgSuccess(res.msg || '入库绑盘成功')
that.resetAll()
}).catch(function() {})
@@ -221,13 +275,16 @@
this.$modal.msg('请输入托盘号')
return
}
if (this.items.length === 0) {
this.$modal.msg('请至少添加一种物料')
return
}
// if (this.items.length === 0) {
// this.$modal.msg('请至少添加一种物料')
// return
// }
var data = {
trayCode: this.trayCode,
}
var that = this
submitAddInJob(data).then(function(res) {
that.$modal.msgSuccess(res.msg || '生成入库作业成功')
@@ -504,7 +561,7 @@
}
.btn-success {
background: #0fe825;
background: #0cca1f;
color: #fff;
}

View File

@@ -14,8 +14,34 @@
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
<view class="menu-card" @click="navigateTo('/pages/warehouse/inbound/cancelBindTray')">
<view class="card-left">
<view class="card-icon orange">
<uni-icons type="scan" 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/inbound/supply')">
<view class="menu-card" @click="navigateTo('/pages/warehouse/inbound/emptyTray')">
<view class="card-left">
<view class="card-icon green">
<uni-icons type="plus" 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/inbound/supply')">
<view class="card-left">
<view class="card-icon green">
<uni-icons type="plus" size="24" color="#fff"></uni-icons>
@@ -26,7 +52,7 @@
</view>
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
</view> -->
</view>
<!-- 待处理单据 -->
@@ -41,7 +67,21 @@
<view v-else>
<view class="task-card" v-for="(item, index) in taskList" :key="index"
@click="handleTask(item)">
<view class="task-header">
<view class="task-header">
<text class="task-type">{{ item.typeName }}</text>
<text class="task-no">{{ item.instockinId }}</text>
</view>
<view class="task-body">
<view class="task-info-item">
<text class="info-label">单据编号</text>
<text class="info-value">{{ item.stockinId }}</text>
</view>
<view class="task-info-item">
<text class="info-label">单据状态</text>
<!-- <text class="info-value">{{ item.status }}</text> -->
<text class="info-value">{{ stockStatusMap[item.status] || '未知状态' }}</text>
</view>
<!-- <view class="task-header">
<text class="task-type">{{ item.typeName }}</text>
<text class="task-no">{{ item.taskNo }}</text>
</view>
@@ -57,7 +97,7 @@
<view class="task-info-item">
<text class="info-label">数量</text>
<text class="info-value">{{ item.quantity - item.assignNum }}</text>
</view>
</view> -->
</view>
<view class="task-footer">
<text class="task-time">{{ item.createTime }}</text>
@@ -70,14 +110,22 @@
</template>
<script>
import { getInboundTaskList } from '@/api/warehouse/inbound'
import { getInboundTaskList, getInboundStockList } from '@/api/warehouse/inbound'
import UniIcons from "../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
export default {
components: {UniIcons},
dicts: ['in_stockin_status'],
data() {
return {
taskList: []
taskList: [],
stockStatusMap: {
1: '创建',
2: '已审核',
3: '执行中',
4: '已完成',
5: '已作废'
},
}
},
onLoad() {
@@ -91,7 +139,8 @@
this.$tab.navigateTo(url)
},
loadTasks() {
getInboundTaskList().then(res => {
// getInboundTaskList().then(res => {
getInboundStockList().then(res => {
this.taskList = res.rows || []
}).catch(() => {
this.taskList = []
@@ -161,6 +210,10 @@
background: linear-gradient(135deg, #52c41a, #73d13d);
}
.card-icon.orange {
background: linear-gradient(135deg, #f8b12e, #f5eb69);
}
.card-info {
display: flex;
flex-direction: column;

View File

@@ -20,11 +20,42 @@
@confirm="handleBarcode" focus />
</view>
</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.rollerNumber }}</text>
</view>
<view class="info-row">
<text class="info-label">颜色</text>
<text class="info-value">{{ outboundInfo.color }}</text>
</view>
<view class="info-row">
<text class="info-label">色序</text>
<text class="info-value">{{ outboundInfo.colorSequence }}</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.materialCode }}</text>
</view>
@@ -51,7 +82,7 @@
<view class="info-row">
<text class="info-label">出库口</text>
<text class="info-value">{{ outboundInfo.portName }}</text>
</view>
</view> -->
</view>
<!-- 确认信息 -->
@@ -68,8 +99,8 @@
</view>
<!-- 操作按钮 -->
<view class="btn-section" v-if="outboundInfo">
<button class="btn btn-orange" @click="confirmOutbound">确认出库</button>
<view class="btn-section" >
<button class="btn btn-orange" v-if="outboundInfo" @click="confirmOutbound">确认出库</button>
<button class="btn btn-default" @click="resetForm">重置</button>
</view>
</view>
@@ -83,6 +114,7 @@
return {
taskNo: '',
barcode: '',
traCode: '',
outboundInfo: null,
confirmQty: '',
form: {
@@ -112,21 +144,31 @@
this.$modal.msg('请输入物料条码')
return
}
var that = this
var params = { taskNo: this.taskNo, barcode: this.barcode }
getOutboundDetail(params).then(function(res) {
// var params = { taskNo: this.taskNo, barcode: this.barcode }
var params = { barcode: this.barcode }
getOutboundDetail(this.barcode).then(function(res) {
that.outboundInfo = res.data
that.confirmQty = String(res.data.quantity)
that.$modal.msgSuccess('出库信息获取成功')
}).catch(function() {
that.outboundInfo = null
that.$modal.msg('未找到该版辊信息,可能是无单据明细或已出库确认完成')
})
},
confirmOutbound() {
if (!this.barcode) {
this.$modal.msg('请输入版辊号')
return
}
if (!this.confirmQty) {
this.$modal.msg('请输入实际数量')
return
}
var data = {
taskNo: this.taskNo,
barcode: this.barcode,
@@ -229,6 +271,10 @@
.scan-input {
font-size: 28rpx;
padding: 16rpx;
word-break: break-all;
width: 100%;
height: auto;
line-height: 1.4;
}
.form-section {
@@ -267,6 +313,9 @@
border: 1rpx solid #e8e8e8;
border-radius: 8rpx;
padding: 16rpx;
width: 100%;
height: auto;
line-height: 1.4;
}
.info-row {

View File

@@ -14,6 +14,32 @@
</view>
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
</view>
<view class="menu-card" @click="navigateTo('/pages/warehouse/outbound/trayConfirm')">
<view class="card-left">
<view class="card-icon green">
<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/container')">
<view class="card-left">
<view class="card-icon blue">
<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 class="menu-card" @click="navigateTo('/pages/warehouse/outbound/exception')">
<view class="card-left">
@@ -43,10 +69,15 @@
@click="handleTask(item)">
<view class="task-header">
<text class="task-type" :class="item.typeClass">{{ item.typeName }}</text>
<text class="task-no">{{ item.taskNo }}</text>
<!-- <text class="task-no">{{ item.taskNo }}</text> -->
<text class="task-no">{{ item.jobId }}</text>
</view>
<view class="task-body">
<view class="task-info-item">
<view class="task-info-item">
<text class="info-label">托盘条码</text>
<text class="info-value">{{ item.trayCode }}</text>
</view>
<!-- <view class="task-info-item">
<text class="info-label">物料编码</text>
<text class="info-value">{{ item.materialCode }}</text>
</view>
@@ -61,7 +92,24 @@
<view class="task-info-item">
<text class="info-label">出库口</text>
<text class="info-value">{{ item.portName }}</text>
</view> -->
<!-- <view class="task-info-item">
<view class="task-info-item">
<text class="info-label">版辊编号</text>
<text class="info-value">{{ item.rollerNumber }}</text>
</view>
<view class="task-info-item">
<text class="info-label">颜色</text>
<text class="info-value">{{ item.color }}</text>
</view>
<view class="task-info-item">
<text class="info-label">色序</text>
<text class="info-value">{{ item.colorSequence }}</text>
</view>
<view class="task-info-item">
<text class="info-label">规格</text>
<text class="info-value">{{ item.spec }}</text>
</view> -->
</view>
<view class="task-footer">
<text class="task-time">{{ item.createTime }}</text>
@@ -94,7 +142,9 @@
},
loadTasks() {
getOutboundTaskList().then(res => {
this.taskList = res.data || []
console.log('接口返回的完整数据:', res)
// this.taskList = res.data || []
this.taskList = res.rows || []
}).catch(() => {
this.taskList = []
})
@@ -158,6 +208,14 @@
.card-icon.orange {
background: linear-gradient(135deg, #fa8c16, #ffa940);
}
.card-icon.blue {
background: linear-gradient(135deg, #3462fa, #3462fa);
}
.card-icon.green {
background: linear-gradient(135deg, #78d01a, #78d01a);
}
.card-icon.red {
background: linear-gradient(135deg, #f5222d, #ff4d4f);