Commit 20ecc0a1 by 杨子

feat(盘点): 新增盘点执行功能及相关组件

refactor(出库单): 将"出库人"和"出库时间"改为"操作人"和"操作时间"

style(盘点任务): 移除不必要的表格列和注释

docs(首页): 重写首页为数据看板样式

chore(登录): 移除登录后设备初始化延迟逻辑
parent a6b68aed
import request from '@/utils/request'
/**
* 盘点检查接口
* @param {Object} data - 请求参数
* @param {Long} data.taskId - 盘点任务ID
* @param {Array<String>} data.rfidList - 扫描的RFID列表
* @param {Array<String>} data.batchNoList - 批次号列表
* @param {Long} data.checkerId - 盘点员ID
* @param {String} data.checkerName - 盘点员姓名
* @returns {Promise}
*/
export function inventoryCheck(data) {
return request({
url: '/ware/inventoryCheck/check',
method: 'post',
data
})
}
/**
* 二维码批次号盘点检查接口
* @param {Object} data - 请求参数
* @param {Long} data.taskId - 盘点任务ID
* @param {Array<String>} data.batchNoList - 批次号列表
* @param {Long} data.checkerId - 盘点员ID
* @param {String} data.checkerName - 盘点员姓名
* @returns {Promise}
*/
export function inventoryCheckToBatchNo(data) {
return request({
url: '/ware/inventoryCheck/checkToBatchNo',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -176,14 +176,6 @@ function handleLogin() {
return acc;
}, {});
router.push({ path: redirect.value || "/", query: otherQueryParams });
setTimeout(() => {
if (
(userStore.userInfo && userStore.userInfo.admin) ||
loginForm.value.username === "admin"
) {
useDeviceInit();
}
}, 1000)
}).catch(() => {
loading.value = false;
// 重新获取验证码
......
......@@ -9,7 +9,6 @@
<el-descriptions-item label="任务名称">{{ taskInfo.taskName }}</el-descriptions-item>
<el-descriptions-item label="总盘点数">{{ taskInfo.totalItems }}</el-descriptions-item>
<el-descriptions-item label="已盘数">{{ taskInfo.countedItems }}</el-descriptions-item>
<!-- <el-descriptions-item label="盘点设备">{{ taskInfo.inventoryDevice }}</el-descriptions-item> -->
<el-descriptions-item label="备注" :span="2">{{ taskInfo.remark }}</el-descriptions-item>
</el-descriptions>
</div>
......@@ -39,7 +38,6 @@
<dict-tag :options="check_status" :value="scope.row.checkStatus" />
</template>
</el-table-column>
<el-table-column label="盘点员ID" align="center" prop="checkerId" />
<el-table-column label="盘点员姓名" align="center" prop="checkerName" />
<el-table-column label="盘点时间" align="center" prop="checkTime" width="180">
<template #default="scope">
......@@ -47,8 +45,6 @@
</template>
</el-table-column>
<el-table-column label="RFID标签" align="center" prop="rfidTag" />
<el-table-column label="是否盲区" align="center" prop="isBlindZone" />
<el-table-column label="质量状态" align="center" prop="qualityStatus" />
<el-table-column label="备注" align="center" prop="remark" />
</el-table>
</div>
......
......@@ -41,6 +41,8 @@
v-hasPermi="['ware:wmsInventoryTask:detail']">详情</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['ware:wmsInventoryTask:remove']">删除</el-button>
<el-button link type="primary" icon="Scan" @click="handleExecute(scope.row)"
v-hasPermi="['ware:wmsInventoryTask:execute']">执行盘点</el-button>
</template>
</el-table-column>
</el-table>
......@@ -68,6 +70,9 @@
</div>
</template>
</el-dialog>
<!-- 执行盘点组件 -->
<InventoryExecuteForm ref="inventoryExecuteFormRef" @executeSuccess="getList" />
</div>
</template>
......@@ -75,6 +80,7 @@
import { listWmsInventoryTask, getWmsInventoryTask, delWmsInventoryTask, addWmsInventoryTask, updateWmsInventoryTask } from "@/api/ware/wmsInventoryTask"
import DetailInfo from "./components/DetailInfo.vue"
import AddForm from "./components/AddForm.vue"
import InventoryExecuteForm from "./components/InventoryExecuteForm.vue"
const { proxy } = getCurrentInstance()
......@@ -89,6 +95,9 @@ const total = ref(0)
const title = ref("")
const detailOpen = ref(false)
// 执行盘点对话框
const inventoryExecuteFormRef = ref(null)
const data = reactive({
form: {},
detailForm: {},
......@@ -252,5 +261,11 @@ function handleDetailClose() {
detailForm.value = {}
}
/** 执行盘点按钮操作 */
function handleExecute(row) {
// 传递任务ID到执行盘点组件
inventoryExecuteFormRef.value?.open(row.taskId)
}
getList()
</script>
......@@ -29,10 +29,10 @@
<el-descriptions-item label="总金额">
{{ orderDetail.totalAmount }}
</el-descriptions-item>
<el-descriptions-item label="出库人">
<el-descriptions-item label="操作人">
{{ orderDetail.nickName || orderDetail.applicantName }}
</el-descriptions-item>
<el-descriptions-item label="出库时间">
<el-descriptions-item label="操作时间">
{{ orderDetail.applyTime }}
</el-descriptions-item>
<el-descriptions-item label="预计发货日期">
......@@ -263,11 +263,11 @@ function handlePrint() {
<span>${orderData.totalAmount}</span>
</div>
<div class="info-row">
<span class="info-label">出库人:</span>
<span class="info-label">操作人:</span>
<span>${orderData.applicantUser?.nickName || orderData.nickName || orderData.applicantName || ''}</span>
</div>
<div class="info-row">
<span class="info-label">出库时间:</span>
<span class="info-label">操作时间:</span>
<span>${orderData.applyTime ? new Date(orderData.applyTime).toLocaleDateString() : ''}</span>
</div>
<div class="info-row">
......
......@@ -83,7 +83,7 @@
<dict-tag :options="out_order_status" :value="scope.row.orderStatus" />
</template>
</el-table-column>
<el-table-column label="出库人" align="center" prop="applicantUser.nickName" />
<el-table-column label="操作人" align="center" prop="applicantUser.nickName" />
<el-table-column label="操作时间" align="center" prop="applyTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
......@@ -165,7 +165,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="出库人" prop="applicantId">
<el-form-item label="操作人" prop="applicantId">
<el-input v-model="form.applicantName" placeholder="请输入申请人" />
</el-form-item>
</el-col>
......@@ -870,7 +870,7 @@ function handlePrint(row) {
<span>${orderData.totalAmount}</span>
</div>
<div class="info-row">
<span class="info-label">出库人:</span>
<span class="info-label">操作人:</span>
<span>${orderData.applicantUser?.nickName || orderData.applicantName || orderData.applicantId || ''}</span>
</div>
<div class="info-row">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment