diff --git a/api/user.js b/api/user.js
index ef4df6f..5c254d2 100644
--- a/api/user.js
+++ b/api/user.js
@@ -1524,6 +1524,19 @@ export function getWarehouseTask(data) {
});
}
+/**
+ * 查询盘点数据详情
+ * @param {Object} data
+ */
+export function getWarehouseTaskgetTaskConInfo(data) {
+
+ return request({
+ url: `logpm-warehouse/api/WarehouseTask/getTaskConInfo`,
+ method: "get",
+ data
+ });
+}
+
/**
* 库位盘点库位详情信息
* @param {Object} data
@@ -1675,6 +1688,31 @@ export function postqueryupdateQuestDetailAllocation(data) {
});
}
+/**
+ * 盘点 -- 查看库位信息
+ * @param {Object} data
+ */
+export function postWarehouseTaskQuestDetailAllocation(data) {
+ return request({
+ url: `logpm-warehouse/api/WarehouseTask/questScanAllcation`,
+ method: "get",
+ data
+ });
+}
+
+/**
+ * 盘点 -- 提交盘点
+ * @param {Object} data
+ */
+export function postWarehouseTaskAddDataInfo(data) {
+ return request({
+ url: `logpm-warehouse/api/WarehouseTask/addDataInfo`,
+ method: "post",
+ data
+ });
+}
+
+
/**
* 合同盘点详情信息
* @param {Object} data
diff --git a/compoment/PopUp/PopUp.vue b/compoment/PopUp/PopUp.vue
index 5ce16a1..9402683 100644
--- a/compoment/PopUp/PopUp.vue
+++ b/compoment/PopUp/PopUp.vue
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 包条码: {{item.orderPackageCode || '暂无数据'}}
+
+
+ 合同号: {{item.orderCode || '暂无数据'}}
+
+
-
-
-
+
+
+ 库位: {{item.positionCode || '暂无数据'}}
+
+
+ 状态: {{details.stateArr.find(val => val.code === (item.cargoName)).title || '暂无数据'}}
+
+
-
-
-
-
-
-
+
+
+ 类型: {{details.typeArr.find(val => val.code === Number(item.state)).title}}
+
+
+ 盘点状态:
+
+ {{details.checkStatus.find(val => val.code === Number(item.questStatus)).title}}
+
+
+
+
+ 处理
+
+
+ 上架
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 包条码: {{item.orderPackageCode || '暂无数据'}}
+
+
+ 合同号: {{item.orderCode || '暂无数据'}}
+
+
-
-
+
+
+ 库位: {{item.positionCode || '暂无数据'}}
+
+
+ 状态: {{details.stateArr.find(val => val.code === (item.cargoName)).title || '暂无数据'}}
+
+
-
+
+
+ 类型: {{details.typeArr.find(val => val.code === Number(item.state)).title}}
+
+
+ 盘点状态:
+
+ {{details.checkStatus.find(val => val.code === Number(item.questStatus)).title}}
+
+
+
+
+ 处理
+
+
+ 上架
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
@@ -128,78 +261,779 @@
onLoad,
onHide
} from '@dcloudio/uni-app'
- import { reactive, toRefs } from "vue";
+ import { reactive, toRefs, ref, onMounted } from "vue";
+ import utils from '@/utils/utils.js';
+ import {
+ getWarehouseTaskgetTaskConInfo,
+ postWarehouseTaskSelectPackageInfo,
+ postWarehouseTaskQuestDetailAllocation,
+ postWarehouseTaskAddDataInfo
+ } from '@/api/user.js';
import useSystemSettingsStore from '@/store/useSystemSettingsStore';
import { storeToRefs } from 'pinia';
const { scanState } = storeToRefs(useSystemSettingsStore())
const option = reactive({
-
+ /** 页面标题 */
+ title: '',
+ /** 页面是否有数据, 默认为有 (暂时没用) */
+ haveData: true,
+ /** 页面数据是否加载完毕, (暂时无用) */
+ isEnd: true,
+ /** 页面刷新 */
+ async pullDownRefreshInitPage() {
+ details.scanNum = 0
+ return await initPage()
+ }
})
const details = reactive({
- // 页面标题
- title: '',
- // 页面类型 1: 随机盘点; 2: 按库位盘点; 3: 按合同号盘点; 4: 按托盘盘点;
+ /** 页面级数据 */
+ pageInfos: {},
+ /** 页面类型 1: 随机盘点; 2: 按库位盘点; 3: 按合同号盘点; 4: 按托盘盘点; */
pageType: 1,
- // 选项卡页码
+ /** 选项卡页码 */
tabBarCode: 1,
- // 是否显示控件
+ /** 搜索的码值 */
+ searchCode: '',
+ /** 是否显示控件 */
showControl: false,
- // 扫描后的值
- scancode: ''
+ /** 扫描后的值 */
+ scancode: '',
+ /** 页面渲染数组 */
+ renderList: [],
+ /** 有包条数据的数组 -- 定制品 + 部分库存品 */
+ orderList: [],
+ /** 无包条数据的数组 -- 零担 + 部分库存品 */
+ stockList: [{
+ cargoName: 10, questStatus: 0, state: 2
+ }],
+ /** 批量处理类型 1: 状态修改; 2: 批量删除; 3: 批量上架; 4: 批量盘点 */
+ handleType: 1,
+ /** 是否扫描 */
+ isScan: true,
+ /** 上架扫描 */
+ upScan: false,
+ /** 在库状态字典 */
+ stateArr: [
+ {
+ title: '在库',
+ isCheck: true,
+ value: 1,
+ code: 10,
+ disabled: true,
+ name: 'stockNum'
+ },
+ {
+ title: '破损',
+ isCheck: false,
+ value: 0,
+ code: 20,
+ disabled: true,
+ name: 'wornNum'
+ },
+ {
+ title: '丢失',
+ isCheck: false,
+ value: 0,
+ code: 30,
+ disabled: true,
+ name: 'lossNum'
+ },
+ {
+ title: '不可修复',
+ isCheck: false,
+ value: 0,
+ code: 40,
+ disabled: true,
+ name: 'noRepairNum'
+ },
+ {
+ title: '配送',
+ isCheck: false,
+ value: 0,
+ code: 50,
+ disabled: true,
+ name: 'deliveNum'
+ },
+ {
+ title: '未入库',
+ isCheck: false,
+ value: 0,
+ code: 60,
+ disabled: true,
+ name: 'noReceivedNum'
+ }
+ ],
+ /** 盘点状态字典表 */
+ checkStatus: [
+ { code: 0, title: '待盘点' },
+ { code: 1, title: '已盘点' },
+ { code: 2, title: '未盘点' },
+ { code: 3, title: '已排除' },
+ ],
+ /** 类型字典表 */
+ typeArr: [
+ { code: 1, title: '定制品' },
+ { code: 2, title: '库存品' },
+ { code: 3, title: '零担' },
+ ],
+ /** 总数 */
+ totalNum: 0,
+ /** 已扫数量 */
+ scanNum: 0,
+ /** 上架时的库位信息 */
+ positionInfo: {
+ /** 库位码 */
+ positionCode: '',
+ /** 库位ID */
+ allocationId: ''
+ },
+ /** 新增内容 */
+ addInfo: {
+ /** 合同号 */
+ orderCode: ''
+ }
})
+ // 获取组件实例
+ /** 基本组件 */
+ const basicContainer = ref(null)
+ /** 弹出层 -- 上架 */
+ const popUp_Up = ref(null)
+ /** 弹出层 -- 状态修改 */
+ const popUp_EditState = ref(null)
+ /** 弹出层 -- 删除 / 盘点 */
+ const popUp_Handle = ref(null)
+ /** 弹出层 -- 新增 */
+ const popUp_Add = ref(null)
+
// 页面初始化执行回调
onLoad((info) => {
- const { pageType, data } = JSON.parse(info.data)
- details.title = data.title
- details.pageType = pageType
-
+ console.log('info :>> ', info);
+ const infos = JSON.parse(info.info)
+ console.log('object :>> ', JSON.parse(info.info));
+ option.title = infos.title
+ details.pageType = infos.pageType
+ details.pageInfos = infos
})
- // 开启监听扫描
onShow(() => {
// #ifdef APP
+ // 开启监听扫描
uni.$off('scancodedate')
uni.$on('scancodedate', function (code) {
if (code) {
- // console.log(code);
+ // 获取扫描的值
details.scancode = code
- scandata()
+
+ // 是否进行上架扫描
+ if (details.upScan) scanUp()
+
+ // 是否匹配数据
+ else if (details.isScan) scandata()
+
}
})
// #endif
// 初始化请求页面数据
- initPage()
+ // initPage()
+ const timer = setTimeout(() => {
+ basicContainer.value.startPullDownRefresh()
+ // 清除定时器
+ clearTimeout(timer)
+ }, 200)
})
- // 关闭扫描监听
- // onHide(() => {
- // uni.$off('scancodedate')
- // })
+ /** 请求页面数据 */
+ async function initPage() {
+ try {
+ const queryData = {
+ typeState: 1,
+ type: 2,
+ questType: details.pageType,
+ code: details.pageInfos.trayCode,
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum,
+ }
+ const res = await getWarehouseTaskgetTaskConInfo(queryData)
+ const { code, data } = res
+ if (code !== 200) return
+ data.list.forEach(val => {
+ if (!val.cargoName) val.cargoName = 10
+ })
+ details.orderList = data.list || []
+ details.renderList = details.orderList
+ console.log('res :>> ', res);
+ } catch (e) {
+ //TODO handle the exception
+ } finally {
+ return null
+ }
+ }
- // 请求页面数据
- function initPage() { }
+ /** 扫描后执行的回调 -- 对比包件码 */
+ async function scandata() {
+ // 是否扫描到已有包条
+ let _flag = false
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i]
+ console.log(i)
+ // 匹配包条码, 包条码一致时更改状态
+ if (details.scancode === _item.orderPackageCode) {
+ if (Number(_item.questStatus) === 1) {
+ uni.showToast({
+ title: '重复扫描',
+ icon: 'none'
+ })
+ // #ifdef APP
+ utils.ttsspke('重复扫描')
+ // #endif
+ _flag = true
+ break
+ }
+ _item.questStatus = 1
+ _flag = true
+ details.scanNum++
+ // #ifdef APP
+ utils.ttsspke(details.scanNum + '件')
+ // #endif
+ // 退出循环
+ break
+ }
+ }
+ // 扫到已有包条退出函数
+ if (_flag) return
- // 扫描后执行的回调
- function scandata() { }
+ try {
+ uni.showLoading({
+ title: '数据加载中',
+ mask: true
+ });
+
+ const queryData = {
+ code: details.scancode,
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum
+ }
+
+ // 查询包条码
+ const res = await postWarehouseTaskSelectPackageInfo(queryData)
+ console.log('res :>> ', res);
+ const { code, data } = res
+
+ // 当后台查询出数据时直接添加
+ if (code === 200 && data && data.length !== 0) {
+ data.forEach(val => {
+ val.questStatus = 1
+ details.scanNum++
+ val.isNew = true
+ if (!val.cargoName) val.cargoName = 10
+ })
+ details.orderList = [...data, ...details.orderList]
+ details.renderList = details.orderList
+ // #ifdef APP
+ utils.ttsspke(details.scanNum + '件')
+ // #endif
+ } else {
+ details.addInfo.orderCode = ''
+ // 手动录入新增
+ popUp_Add.value.setDetails({
+ title: '新增',
+ showPopUp: true,
+ success() {
+ const _order = {
+ orderPackageCode: details.scancode,
+ questStatus: 1,
+ orderCode: details.addInfo.orderCode,
+ positionCode: '',
+ cargoName: 10,
+ isChoose: false,
+ /** 为手动添加 */
+ isManuallyAdd: true
+ }
+ details.orderList.push(_order)
+ details.renderList = details.orderList
+ details.scanNum++
+ popUp_Add.value.details.showPopUp = false
+ }
+ })
+ }
+ } catch (err) {
+ console.log('err :>> ', err);
+ //TODO handle the exception
+ } finally {
+ uni.hideLoading()
+ }
+ }
+
+ /** 扫描后执行的回调 -- 上架时扫描货位码 */
+ async function scanUp() {
+ try {
+ uni.showLoading({
+ title: '数据加载中',
+ mask: true
+ });
+ const queryData = {
+ questId: details.pageInfos.questId,
+ allocationId: details.scancode
+ }
+ const res = await postWarehouseTaskQuestDetailAllocation(queryData)
+ const { code, data } = res
+ if (code === 200 && data) details.positionInfo = data
+ else {
+ details.positionInfo.positionCode = ''
+ details.positionInfo.allocationId = ''
+ }
+ } catch (e) {
+ //TODO handle the exception
+ } finally {
+ uni.hideLoading()
+ }
+ }
// 改变选项卡激活状态
function handleTabBarCode(code : number) {
details.tabBarCode = code
}
- /**
- * 提交盘点
- */
- function submitCheck() { }
+ /** 搜索 */
+ const handleSearch = () => {
+ details.scancode = details.searchCode
+ scandata()
+ }
- // 随机盘点
- function randomCheck() { }
+ /** 修改合同号 */
+ const editOrderCode = (item : any) => {
+ // 是否为手动添加, 手动添加才能更改
+ if (!item.isManuallyAdd) return
+ details.addInfo.orderCode = item.orderCode
+ popUp_Add.value.setDetails({
+ title: '修改合同号',
+ showPopUp: true,
+ success() {
+ item.orderCode = details.addInfo.orderCode
+ details.addInfo.orderCode = ''
+ popUp_Add.value.details.showPopUp = false
+ }
+ })
+ }
+
+ /** 开启控件区 */
+ const handleShowControl = (_type : number) => {
+ details.showControl = true
+ // 更改控件区操控类型
+ details.handleType = _type
+ // #ifdef APP
+ switch (_type) {
+ case 1:
+ utils.ttsspke('状态修改')
+ break
+ case 2:
+ utils.ttsspke('批量删除')
+ break
+ case 3:
+ utils.ttsspke('批量上架')
+ break
+ case 4:
+ utils.ttsspke('批量盘点')
+ break
+ }
+ // #endif
+ }
+
+ /** 重置处理状态 */
+ const initState = (cargoName ?: number) => {
+ if (cargoName) {
+ // 根据指定值激活状态
+ details.stateArr.forEach((val) => {
+ if (val.code === cargoName) {
+ val.isCheck = true
+ val.value = 1
+ } else {
+ val.isCheck = false
+ val.value = 0
+ }
+ })
+ } else {
+ // 没有传入指定值, 重置处理状态
+ details.stateArr.forEach((val, index) => {
+ if (index === 0) {
+ val.isCheck = true
+ val.value = 1
+ } else {
+ val.isCheck = false
+ val.value = 0
+ }
+ })
+ }
+ }
- const { title,
+ /** 取消当前操作 */
+ const handleClose = () => {
+ details.showControl = false
+ // #ifdef APP
+ utils.ttsspke('取消当前操作')
+ // #endif
+ }
+
+ /** 批量修改状态 */
+ const batchEditState = () => {
+ console.log('修改')
+ // 重置状态
+ initState()
+ // details.showControl = true
+ popUp_EditState.value.setDetails({
+ title: '状态修改',
+ confirmText: '确认修改',
+ showPopUp: true,
+ success() {
+ const _value = details.stateArr.find(val => val.isCheck)
+
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i]
+ if (_item.isChoose) {
+ _item.cargoName = _value.code
+ // 改变盘点状态
+ _item.questStatus = 1
+ details.scanNum++
+ }
+ // 重置选中状态
+ _item.isChoose = false
+ }
+ // 关闭弹窗
+ popUp_EditState.value.details.showPopUp = false
+ // 改变盘点状态
+ details.showControl = false
+ console.log('111 :>> ', 111);
+ }
+ })
+ }
+
+ /** 批量删除 */
+ const batchDelete = () => {
+ // 开启弹窗
+ popUp_Handle.value.setDetails({
+ title: '批量删除',
+ showPopUp: true,
+ confirmText: '确认删除',
+ success() {
+ details.renderList = details.renderList.filter(val => !val.isChoose)
+ details.orderList = details.renderList
+ details.scanNum = details.renderList.reduce((curr, item) => {
+ if (item.questStatus === 1) return curr += 1
+ return curr
+ }, 0)
+ popUp_Handle.value.details.showPopUp = false
+ details.showControl = false
+ }
+ })
+ }
+
+ /** 批量上架 */
+ const batchUp = () => {
+ // 清空扫描的值
+ details.scancode = ''
+ // 开启上架扫描
+ details.upScan = true
+
+ // 开启弹窗
+ popUp_Up.value.setDetails({
+ title: '批量上架',
+ showPopUp: true,
+ confirmText: '确认上架',
+ success() {
+ const { positionCode, allocationId } = details.positionInfo
+ let content = ''
+ if (positionCode) {
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i]
+ if (_item.isChoose) {
+ // 改变库位信息
+ _item.allocationId = allocationId
+ _item.positionCode = positionCode
+
+ // 改变盘点状态
+ details.renderList[i].questStatus = 1
+
+ // 改变已盘点数
+ details.scanNum++
+ }
+ // 重置选中状态
+ _item.isChoose = false
+ }
+ content = '上架成功'
+ } else content = '上架失败, 库位数据有误'
+
+ uni.showToast({
+ title: content,
+ icon: 'none'
+ })
+ // #ifdef APP
+ utils.ttsspke(content)
+ // #endif
+
+ // 重置库位信息
+ details.positionInfo.allocationId = ''
+ details.positionInfo.positionCode = ''
+
+ // 关闭弹出层
+ popUp_Up.value.details.showPopUp = false
+ details.showControl = false
+ details.upScan = false
+ },
+ close() {
+ popUp_Up.value.details.showPopUp = false
+ details.upScan = false
+ }
+ })
+ }
+
+ /** 批量盘点 */
+ const batchCheck = () => {
+ // 开启弹窗
+ popUp_Handle.value.setDetails({
+ title: '批量盘点',
+ showPopUp: true,
+ confirmText: '确认盘点',
+ success() {
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i]
+ if (_item.isChoose) {
+ // 改变盘点状态
+ details.renderList[i].questStatus = 1
+
+ // 改变已盘点数
+ details.scanNum++
+ }
+ // 重置选中状态
+ _item.isChoose = false
+ }
+ popUp_Handle.value.details.showPopUp = false
+ details.showControl = false
+ }
+ })
+ }
+
+ /** 全选 */
+ const handleCheckAll = () => {
+ if (details.renderList.length === 0) return
+ for (let i = 0; i < details.renderList.length; i++) {
+ details.renderList[i].isChoose = true
+ }
+ }
+
+ /** 反选 */
+ const handleInvertSelection = () => {
+ if (details.renderList.length === 0) return
+ for (let i = 0; i < details.renderList.length; i++) {
+ details.renderList[i].isChoose = !details.renderList[i].isChoose
+ }
+ }
+
+ /** 复选框 */
+ const handleItemChoose = (_item : any) => {
+ _item.isChoose = !_item.isChoose
+ }
+
+ /** 状态修改弹窗内按钮点击 -- 单选 */
+ const handleCheck = (_item : any) => {
+ if (details.tabBarCode === 1) {
+ // 有数据的情况
+ for (let i = 0; i < details.stateArr.length; i++) {
+ const _value = details.stateArr[i]
+ _value.value = 0
+ _value.isCheck = false
+ }
+ _item.isCheck = true
+ _item.value = 1
+ if (_item.title === '破损' || _item.title === '不可修复') details.stateArr[0].value = 1
+ } else {
+ console.log('details.stateArr[0].value :>> ', details.stateArr[0].value);
+ // 无数据
+ // 当在库数为0时, 不能选择破损或不可修复
+ if (details.stateArr[0].value === 0 && _item.title === '破损' || details.stateArr[0].value === 0 && _item.title === '不可修复') return
+
+ _item.isCheck = !_item.isCheck
+ _item.disabled = !_item.isCheck
+ if (_item.disabled && _item.code !== details.stateArr[0].code) _item.value = 0
+ }
+ }
+
+ /** 处理 */
+ const handleState = (_item : any) => {
+ // 重置状态
+ initState(_item.cargoName)
+ popUp_EditState.value.setDetails({
+ title: '状态修改',
+ confirmText: '确认修改',
+ showPopUp: true,
+ success() {
+ const _value = details.stateArr.find(val => val.isCheck)
+ if (tabBarCode.value === 1) {
+ _item.cargoName = _value.code
+ // 改变盘点状态
+ } else {
+ details.stateArr.forEach(val => {
+ if (val.isCheck && Number(val.value) !== 0) _value[val.name] = Number(val.value)
+ })
+ console.log('_value :>> ', _value);
+ }
+ _item.questStatus = 1
+ // 改变已盘点数
+ details.scanNum++
+ // 关闭弹窗
+ popUp_EditState.value.details.showPopUp = false
+ console.log('111 :>> ', 111);
+ }
+ })
+ }
+
+ /** 上架 */
+ const handleItemUp = (_item : any) => {
+ // 获取库位码
+ details.scancode = _item.allocationId
+ details.positionInfo.positionCode = _item.positionCode
+ // 开启上架扫描
+ details.upScan = true
+ popUp_Up.value.setDetails({
+ title: '上架',
+ confirmText: '确认上架',
+ showPopUp: true,
+ success() {
+ let content = ''
+ const { allocationId, positionCode } = details.positionInfo
+
+ if (positionCode) {
+ _item.allocationId = allocationId
+ _item.positionCode = positionCode
+ // 更改上架状态
+ _item.questStatus = 1
+ // 改变已盘点数
+ details.scanNum++
+ content = '上架成功'
+ } else content = '上架失败, 库位数据有误'
+
+ uni.showToast({
+ title: content,
+ icon: 'none'
+ })
+ // #ifdef APP
+ utils.ttsspke(content)
+ // #endif
+
+ // 重置库位数据
+ details.positionInfo.positionCode = ''
+ details.positionInfo.allocationId = ''
+ // 关闭上架扫描
+ popUp_Up.value.details.showPopUp = false
+ details.upScan = false
+ },
+ close() {
+ popUp_Up.value.details.showPopUp = false
+ details.upScan = false
+ }
+ })
+ }
+
+ /** 左侧返回按钮 */
+ const leftClick = () => {
+ popUp_Handle.value.setDetails({
+ title: '有数据未提交, 是否返回',
+ showPopUp: true,
+ confirmText: '确认返回 ',
+ success() {
+ uni.navigateBack()
+ }
+ })
+ }
+
+ /** 确认 */
+ const handleConFirm = () => {
+ switch (details.handleType) {
+ case 1: // 批量修改状态
+ batchEditState()
+ break;
+
+ case 2: // 批量删除
+ batchDelete()
+ break;
+
+ case 3: // 批量上架
+ batchUp()
+ break;
+
+ case 4: // 批量盘点
+ batchCheck()
+ break;
+ }
+ }
+
+ /** 提交盘点*/
+ const submitCheck = async () => {
+ try {
+ // 开启loading动画
+ uni.showLoading({
+ title: '提交中',
+ mask: true
+ })
+ // 提交信息
+ const submitData = {
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum,
+ // 在库的ids数组
+ questDetailIds: [],
+ // 其它类型组成的数组
+ questDetailList: []
+ }
+ details.orderList.forEach(val => {
+ // 不是新增的且状态为在库
+ if (!val.isManuallyAdd && !val.isNew && Number(val.cargoName) === 10) {
+ submitData.questDetailIds.push(val.id)
+ } else {
+ const _item = {
+ /** 在库数量 */
+ stockNum: 1,
+ /** 丢失数量 */
+ lossNum: 0,
+ /** 配送数量 */
+ deliveNum: 0,
+ /** 破损数量 */
+ wornNum: 0,
+ /** 不可修复数量 */
+ noRepairNum: 0,
+ /** 未入库数量 */
+ noReceivedNum: 0,
+ /** 上架后的库位id */
+ allocationId: val.allocationId,
+ questId: details.pageInfos.questId,
+ orderCode: val.orderCode,
+ orderId: val.orderId,
+ questType: details.pageType,
+ questTarget: val.state
+ }
+ const _whiteCodeArr = [10, 20, 40]
+
+ if (!_whiteCodeArr.includes(Number(val.cargoName))) _item.stockNum = 0
+ const _key = details.stateArr.find(value => value.code === val.cargoName).name
+ // 对状态赋值
+ _item[_key] = 1
+ submitData.questDetailList.push(_item)
+ }
+ })
+ console.log('details.orderList :>> ', details.orderList);
+ // postWarehouseTaskAddDataInfo()
+ } catch (err) {
+ console.log('err :>> ', err);
+ //TODO handle the exception
+ } finally {
+ // 关闭Loading动画
+ uni.hideLoading()
+ }
+ }
+
+ const {
pageType,
showControl,
tabBarCode
@@ -217,14 +1051,20 @@
background-color: #fff;
color: #d3832a;
border-radius: 5upx;
+ // zoom: 90%;
}
- .main {
+ .main,
+ .head {
padding: 10upx;
font-size: 28upx; // 本页字体大小
}
- .main_top {
+ .head {
+ background: #fff;
+ }
+
+ .head_top {
display: flex;
// align-items: center;
justify-content: space-between;
@@ -271,7 +1111,8 @@
display: block;
width: 0;
box-sizing: border-box;
- border: 1upx solid #d3832a;
+ background: #d3832a;
+ height: 4upx;
transition: all 0.5s;
}
@@ -284,6 +1125,7 @@
// 控件区
.control {
+ margin-top: 20upx;
display: flex;
justify-content: space-between;
@@ -300,14 +1142,182 @@
}
}
+ // 盘点数据
+ .checkInfo {
+ font-size: 28upx;
+ zoom: 0.9;
+ margin: 20upx 0 10upx;
+ display: flex;
+ color: #666;
+
+ &_item {
+ width: 40%;
+ display: inline-flex;
+ align-items: center;
+
+ >text:first-child {
+ margin-right: 10upx;
+ }
+ }
+ }
+
+ // 渲染
+ .main_render {
+ display: flex;
+ background: #fff;
+ padding: 10upx;
+ zoom: 0.85;
+ overflow: hidden;
+ position: relative;
+ margin-bottom: 10upx;
+ border-radius: 10upx;
+
+ $renderWidth: 80upx;
+
+ // 已盘状态
+ &.active {
+ border: 1upx solid #16d46b;
+ box-shadow: 0 0 10upx #16d46b;
+ }
+
+ // 删除状态
+ &.delete {
+ border: 1upx solid #f55;
+ box-shadow: 0 0 10upx #f55;
+ }
+
+ // 修改状态
+ &.edit {
+ border: 1upx solid #3c9cff;
+ box-shadow: 0 0 10upx #3c9cff;
+ }
+
+ // main_render_checkImg
+ &_checkImg {
+ width: 64upx;
+ height: 64upx;
+ }
+
+ // main_render_container
+ &_container {
+ flex: 1;
+ }
+
+ // main_render_item
+ &_item {
+ display: flex;
+ justify-content: space-between;
+ align-items: flex-start;
+ margin-top: 20upx;
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ &>view {
+ flex: 1;
+ flex-basis: 1;
+ word-break: break-all
+ }
+
+ // main_render_item_type
+ &_type {
+ display: inline-block;
+ background: #3c9cff;
+ color: #fff;
+ padding: 5upx 10upx;
+ border-radius: 5upx;
+
+ &.active {
+ background: #f55;
+ }
+ }
+
+ .button_box {
+ display: inline-flex;
+ justify-content: space-evenly;
+ }
+
+ .button {
+ zoom: 0.9;
+ }
+ }
+ }
+
+ // 弹出层提示信息
+ .popUpTitle {
+ font-size: 28upx;
+ color: #666;
+ zoom: 0.9;
+ }
+
+ // 弹出层内的输入框
+ .popUpInput {
+ border: 4upx solid #eee;
+ padding: 10upx;
+ border-radius: 10upx;
+ margin-top: 30upx;
+ }
+
+ // 上架货位信息
+ .popUpInfo {
+ margin-top: 20upx;
+ font-size: 28upx;
+ color: #666;
+ zoom: 0.9;
+ }
+
+ .popUp_EditState_container {
+ // height: 40vh;
+ margin-top: 60upx;
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ }
+
+ // 状态处理
+ .popUp_row {
+ width: 50%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-size: 28upx;
+ zoom: 0.9;
+ margin-bottom: 20upx;
+
+ // popUp_row_item
+ &_item {
+ width: 50%;
+ display: flex;
+ }
+
+ // popUp_row_checkImg
+ &_checkImg {
+ width: 40upx;
+ height: 40upx;
+ }
+
+ // popUp_row_title
+ &_title {
+ flex: 1;
+ padding-left: 10upx;
+ }
+
+ .input {
+ width: 50%;
+ height: 32upx;
+ }
+ }
+
// 提交按钮
.submitButton {
position: fixed;
color: #fff;
background-color: $buttonColor;
- width: 50%;
+ width: 40%;
bottom: 30upx;
left: 50%;
transform: translateX(-50%);
+ font-size: 30upx;
}
\ No newline at end of file
diff --git a/unpackage/dist/dev/app-plus/app-service.js b/unpackage/dist/dev/app-plus/app-service.js
index e1a1b59..e0c85ff 100644
--- a/unpackage/dist/dev/app-plus/app-service.js
+++ b/unpackage/dist/dev/app-plus/app-service.js
@@ -3064,6 +3064,13 @@ if (uni.restoreGlobal) {
data
});
}
+ function getWarehouseTaskgetTaskConInfo(data) {
+ return service({
+ url: `logpm-warehouse/api/WarehouseTask/getTaskConInfo`,
+ method: "get",
+ data
+ });
+ }
function getWarehouseTaskAllocationList(data) {
return service({
url: `logpm-warehouse/api/WarehouseTask/allocationList`,
@@ -3148,6 +3155,13 @@ if (uni.restoreGlobal) {
data
});
}
+ function postWarehouseTaskQuestDetailAllocation(data) {
+ return service({
+ url: `logpm-warehouse/api/WarehouseTask/questScanAllcation`,
+ method: "get",
+ data
+ });
+ }
function pcontractQuestDetailList(data) {
return service({
url: `logpm-warehouse/api/WarehouseTask/contractQuestDetail`,
@@ -13226,7 +13240,7 @@ This will fail in production if not fixed.`);
}
});
const PagesHomePagesSigninScanSigninScan = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["__file", "D:/workSpace/logpm/pagesHome/pages/signinScan/signinScan.vue"]]);
- const _imports_0$1 = "/assets/cha.b7e7843e.png";
+ const _imports_0$2 = "/assets/cha.b7e7843e.png";
const _sfc_main$19 = {
props: {
data: {
@@ -13412,7 +13426,7 @@ This will fail in production if not fixed.`);
key: 1,
class: "arrow-clear"
}, [
- vue.createElementVNode("image", { src: _imports_0$1 })
+ vue.createElementVNode("image", { src: _imports_0$2 })
])) : vue.createCommentVNode("v-if", true)
])
],
@@ -34299,7 +34313,7 @@ This will fail in production if not fixed.`);
} else if (details.pageType === 3) {
res = await pgetContractList({
...details.page,
- taskId: infodata.value.id,
+ questId: infodata.value.id,
warehouseId: infodata.value.warehouseId,
questNum: details.questNum
});
@@ -34335,7 +34349,7 @@ This will fail in production if not fixed.`);
formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:371", "details.id :>> ", details.id);
const submitData = {
...details.page,
- taskId: details.id,
+ questId: details.id,
questNum: details.questNum
};
submitData.trayCode = details.scancode;
@@ -34385,27 +34399,23 @@ This will fail in production if not fixed.`);
return;
}
if (details.pageType === 4) {
- const res = await initPage();
+ const res = await getTaryList();
formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:431", "res :>> ", res);
- const { msg, code: code2, data } = res;
- uni.showToast({
- title: msg,
- icon: "none"
- });
+ const { code: code2, data } = res;
if (code2 === 200 && data) {
const info = {
trayCode: data[0].trayCode,
- taskId: details.id,
+ questId: details.id,
trayId: data[0].trayId,
type: data[0].goodsType,
marketName: details.marketName,
- // 是否阻止初始化请求
- holdBackFirstPost: true,
- questNum: details.questNum
+ questNum: details.questNum,
+ pageType: details.pageType,
+ title: details.title
};
formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:448", "info :>> ", info);
uni.navigateTo({
- url: `/pagesTask/pages/trayCheckDetails/trayCheckDetails?info=${JSON.stringify(info)}`
+ url: `/pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails?info=${JSON.stringify(info)}`
});
}
}
@@ -34455,8 +34465,6 @@ This will fail in production if not fixed.`);
type: item.goodsType,
// 商城数组
marketName: details.marketName,
- // 是否阻止初始化请求
- holdBackFirstPost: false,
questNum: details.questNum
};
uni.navigateTo({
@@ -34477,7 +34485,7 @@ This will fail in production if not fixed.`);
incomingBatch: details.scancode,
questNum: details.questNum
}).then((res) => {
- formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:552", res, "res===");
+ formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:550", res, "res===");
utils.ttsspke(res.audio);
if (res.code != 3001) {
details.renderList = res.data;
@@ -34485,7 +34493,7 @@ This will fail in production if not fixed.`);
});
};
const handleInputChange = () => {
- formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:562", details.searchText.taryText);
+ formatAppLog("log", "at pagesTask/pages/checkTaskList/checkTaskList.vue:560", details.searchText.taryText);
if (!details.scancode) {
pgetContractList({
taskId: infodata.value.id,
@@ -34554,7 +34562,7 @@ This will fail in production if not fixed.`);
{
type: "text",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => details.scancode = $event),
- placeholder: "请输入库位码",
+ placeholder: "请扫描或输入库位码",
class: "main_top_search"
},
null,
@@ -34743,7 +34751,7 @@ This will fail in production if not fixed.`);
{
type: "text",
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.scancode = $event),
- placeholder: "请输入托盘码",
+ placeholder: "请扫描或输入托盘码",
class: "main_top_search"
},
null,
@@ -34836,213 +34844,1093 @@ This will fail in production if not fixed.`);
}
});
const PagesTaskPagesCheckTaskListCheckTaskList = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ab53b22c"], ["__file", "D:/workSpace/logpm/pagesTask/pages/checkTaskList/checkTaskList.vue"]]);
+ const _imports_0$1 = "/static/ck.png";
+ const _imports_1$1 = "/static/nock.png";
+ const _imports_1 = "/static/check.png";
+ const _imports_0 = "/static/nocheck.png";
const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
__name: "dynamicCheckDetails",
setup(__props) {
const { scanState } = storeToRefs(useSystemSettingsStore());
- const details = vue.reactive({
- // 页面标题
+ const option = vue.reactive({
+ /** 页面标题 */
title: "",
- // 页面类型 1: 随机盘点; 2: 按库位盘点; 3: 按合同号盘点; 4: 按托盘盘点;
+ /** 页面是否有数据, 默认为有 (暂时没用) */
+ haveData: true,
+ /** 页面数据是否加载完毕, (暂时无用) */
+ isEnd: true,
+ /** 页面刷新 */
+ async pullDownRefreshInitPage() {
+ details.scanNum = 0;
+ return await initPage();
+ }
+ });
+ const details = vue.reactive({
+ /** 页面级数据 */
+ pageInfos: {},
+ /** 页面类型 1: 随机盘点; 2: 按库位盘点; 3: 按合同号盘点; 4: 按托盘盘点; */
pageType: 1,
- // 选项卡页码
+ /** 选项卡页码 */
tabBarCode: 1,
- // 是否显示控件
+ /** 搜索的码值 */
+ searchCode: "",
+ /** 是否显示控件 */
showControl: false,
- // 扫描后的值
- scancode: ""
+ /** 扫描后的值 */
+ scancode: "",
+ /** 页面渲染数组 */
+ renderList: [],
+ /** 有包条数据的数组 -- 定制品 + 部分库存品 */
+ orderList: [],
+ /** 无包条数据的数组 -- 零担 + 部分库存品 */
+ stockList: [],
+ /** 批量处理类型 1: 状态修改; 2: 批量删除; 3: 批量上架; 4: 批量盘点 */
+ handleType: 1,
+ /** 是否扫描 */
+ isScan: true,
+ /** 上架扫描 */
+ upScan: false,
+ /** 在库状态字典 */
+ stateArr: [
+ {
+ title: "在库",
+ isCheck: true,
+ value: 1,
+ code: 10,
+ disabled: true
+ },
+ {
+ title: "破损",
+ isCheck: false,
+ value: 0,
+ code: 20,
+ disabled: true
+ },
+ {
+ title: "丢失",
+ isCheck: false,
+ value: 0,
+ code: 30,
+ disabled: true
+ },
+ {
+ title: "不可修复",
+ isCheck: false,
+ value: 0,
+ code: 40,
+ disabled: true
+ },
+ {
+ title: "配送",
+ isCheck: false,
+ value: 0,
+ code: 50,
+ disabled: true
+ },
+ {
+ title: "未入库",
+ isCheck: false,
+ value: 0,
+ code: 60,
+ disabled: true
+ }
+ ],
+ /** 盘点状态字典表 */
+ checkStatus: [
+ { code: 0, title: "待盘点" },
+ { code: 1, title: "已盘点" },
+ { code: 2, title: "未盘点" },
+ { code: 3, title: "已排除" }
+ ],
+ /** 总数 */
+ totalNum: 0,
+ /** 已扫数量 */
+ scanNum: 0,
+ /** 上架时的库位信息 */
+ positionInfo: {
+ /** 库位码 */
+ positionCode: "",
+ /** 库位ID */
+ allocationId: ""
+ },
+ /** 新增内容 */
+ addInfo: {
+ /** 合同号 */
+ orderCode: ""
+ }
});
+ const basicContainer = vue.ref(null);
+ const popUp_Up = vue.ref(null);
+ const popUp_EditState = vue.ref(null);
+ const popUp_Handle = vue.ref(null);
+ const popUp_Add = vue.ref(null);
onLoad((info) => {
- const { pageType: pageType2, data } = JSON.parse(info.data);
- details.title = data.title;
- details.pageType = pageType2;
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:326", "info :>> ", info);
+ const infos = JSON.parse(info.info);
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:328", "object :>> ", JSON.parse(info.info));
+ option.title = infos.title;
+ details.pageType = infos.pageType;
+ details.pageInfos = infos;
});
onShow(() => {
uni.$off("scancodedate");
uni.$on("scancodedate", function(code2) {
if (code2) {
details.scancode = code2;
+ if (details.upScan)
+ scanUp();
+ else if (details.isScan)
+ scandata();
}
});
+ const timer = setTimeout(() => {
+ basicContainer.value.startPullDownRefresh();
+ clearTimeout(timer);
+ }, 200);
});
+ async function initPage() {
+ try {
+ const queryData = {
+ typeState: 1,
+ type: 2,
+ questType: details.pageType,
+ code: details.pageInfos.trayCode,
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum
+ };
+ const res = await getWarehouseTaskgetTaskConInfo(queryData);
+ const { code: code2, data } = res;
+ if (code2 !== 200)
+ return;
+ data.list.forEach((val) => {
+ if (!val.cargoName)
+ val.cargoName = 10;
+ });
+ details.orderList = data.list || [];
+ details.renderList = details.orderList;
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:381", "res :>> ", res);
+ } catch (e) {
+ } finally {
+ return null;
+ }
+ }
+ async function scandata() {
+ let _flag = false;
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i];
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:395", i);
+ if (details.scancode === _item.orderPackageCode) {
+ if (Number(_item.questStatus) === 1) {
+ uni.showToast({
+ title: "重复扫描",
+ icon: "none"
+ });
+ utils.ttsspke("重复扫描");
+ _flag = true;
+ break;
+ }
+ _item.questStatus = 1;
+ _flag = true;
+ details.scanNum++;
+ utils.ttsspke(details.scanNum + "件");
+ break;
+ }
+ }
+ if (_flag)
+ return;
+ try {
+ uni.showLoading({
+ title: "数据加载中",
+ mask: true
+ });
+ const queryData = {
+ code: details.scancode,
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum
+ };
+ const res = await postWarehouseTaskSelectPackageInfo(queryData);
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:436", "res :>> ", res);
+ const { code: code2, data } = res;
+ if (code2 === 200 && data && data.length !== 0) {
+ data.forEach((val) => {
+ val.questStatus = 1;
+ details.scanNum++;
+ val.isNew = true;
+ if (!val.cargoName)
+ val.cargoName = 10;
+ });
+ details.orderList = [...data, ...details.orderList];
+ details.renderList = details.orderList;
+ utils.ttsspke(details.scanNum + "件");
+ } else {
+ details.addInfo.orderCode = "";
+ popUp_Add.value.setDetails({
+ title: "新增",
+ showPopUp: true,
+ success() {
+ const _order = {
+ orderPackageCode: details.scancode,
+ questStatus: 1,
+ orderCode: details.addInfo.orderCode,
+ positionCode: "",
+ cargoName: 10,
+ isChoose: false,
+ /** 为手动添加 */
+ isManuallyAdd: true
+ };
+ details.orderList.push(_order);
+ details.renderList = details.orderList;
+ details.scanNum++;
+ popUp_Add.value.details.showPopUp = false;
+ }
+ });
+ }
+ } catch (err) {
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:477", "err :>> ", err);
+ } finally {
+ uni.hideLoading();
+ }
+ }
+ async function scanUp() {
+ try {
+ uni.showLoading({
+ title: "数据加载中",
+ mask: true
+ });
+ const queryData = {
+ questId: details.pageInfos.questId,
+ allocationId: details.scancode
+ };
+ const res = await postWarehouseTaskQuestDetailAllocation(queryData);
+ const { code: code2, data } = res;
+ if (code2 === 200 && data)
+ details.positionInfo = data;
+ else {
+ details.positionInfo.positionCode = "";
+ details.positionInfo.allocationId = "";
+ }
+ } catch (e) {
+ } finally {
+ uni.hideLoading();
+ }
+ }
function handleTabBarCode(code2) {
details.tabBarCode = code2;
}
- function submitCheck() {
- }
+ const handleSearch = () => {
+ details.scancode = details.searchCode;
+ scandata();
+ };
+ const editOrderCode = (item) => {
+ if (!item.isManuallyAdd)
+ return;
+ details.addInfo.orderCode = item.orderCode;
+ popUp_Add.value.setDetails({
+ title: "修改合同号",
+ showPopUp: true,
+ success() {
+ item.orderCode = details.addInfo.orderCode;
+ details.addInfo.orderCode = "";
+ popUp_Add.value.details.showPopUp = false;
+ }
+ });
+ };
+ const handleShowControl = (_type) => {
+ details.showControl = true;
+ details.handleType = _type;
+ switch (_type) {
+ case 1:
+ utils.ttsspke("状态修改");
+ break;
+ case 2:
+ utils.ttsspke("批量删除");
+ break;
+ case 3:
+ utils.ttsspke("批量上架");
+ break;
+ case 4:
+ utils.ttsspke("批量盘点");
+ break;
+ }
+ };
+ const initState = (cargoName) => {
+ if (cargoName) {
+ details.stateArr.forEach((val) => {
+ if (val.code === cargoName) {
+ val.isCheck = true;
+ val.value = 1;
+ } else {
+ val.isCheck = false;
+ val.value = 0;
+ }
+ });
+ } else {
+ details.stateArr.forEach((val, index2) => {
+ if (index2 === 0) {
+ val.isCheck = true;
+ val.value = 1;
+ } else {
+ val.isCheck = false;
+ val.value = 0;
+ }
+ });
+ }
+ };
+ const handleClose = () => {
+ details.showControl = false;
+ utils.ttsspke("取消当前操作");
+ };
+ const batchEditState = () => {
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:596", "修改");
+ initState();
+ popUp_EditState.value.setDetails({
+ title: "状态修改",
+ confirmText: "确认修改",
+ showPopUp: true,
+ success() {
+ const _value = details.stateArr.find((val) => val.isCheck);
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i];
+ if (_item.isChoose) {
+ _item.cargoName = _value.code;
+ _item.questStatus = 1;
+ details.scanNum++;
+ }
+ _item.isChoose = false;
+ }
+ popUp_EditState.value.details.showPopUp = false;
+ details.showControl = false;
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:622", "111 :>> ", 111);
+ }
+ });
+ };
+ const batchDelete = () => {
+ popUp_Handle.value.setDetails({
+ title: "批量删除",
+ showPopUp: true,
+ confirmText: "确认删除",
+ success() {
+ details.renderList = details.renderList.filter((val) => !val.isChoose);
+ details.orderList = details.renderList;
+ details.scanNum = details.renderList.reduce((curr, item) => {
+ if (item.questStatus === 1)
+ return curr += 1;
+ return curr;
+ }, 0);
+ popUp_Handle.value.details.showPopUp = false;
+ details.showControl = false;
+ }
+ });
+ };
+ const batchUp = () => {
+ details.scancode = "";
+ details.upScan = true;
+ popUp_Up.value.setDetails({
+ title: "批量上架",
+ showPopUp: true,
+ confirmText: "确认上架",
+ success() {
+ const { positionCode, allocationId } = details.positionInfo;
+ let content = "";
+ if (positionCode) {
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i];
+ if (_item.isChoose) {
+ _item.allocationId = allocationId;
+ _item.positionCode = positionCode;
+ details.renderList[i].questStatus = 1;
+ details.scanNum++;
+ }
+ _item.isChoose = false;
+ }
+ content = "上架成功";
+ } else
+ content = "上架失败, 库位数据有误";
+ uni.showToast({
+ title: content,
+ icon: "none"
+ });
+ utils.ttsspke(content);
+ details.positionInfo.allocationId = "";
+ details.positionInfo.positionCode = "";
+ popUp_Up.value.details.showPopUp = false;
+ details.showControl = false;
+ details.upScan = false;
+ },
+ close() {
+ popUp_Up.value.details.showPopUp = false;
+ details.upScan = false;
+ }
+ });
+ };
+ const batchCheck = () => {
+ popUp_Handle.value.setDetails({
+ title: "批量盘点",
+ showPopUp: true,
+ confirmText: "确认盘点",
+ success() {
+ for (let i = 0; i <= details.renderList.length - 1; i++) {
+ const _item = details.renderList[i];
+ if (_item.isChoose) {
+ details.renderList[i].questStatus = 1;
+ details.scanNum++;
+ }
+ _item.isChoose = false;
+ }
+ popUp_Handle.value.details.showPopUp = false;
+ details.showControl = false;
+ }
+ });
+ };
+ const handleCheckAll = () => {
+ if (details.renderList.length === 0)
+ return;
+ for (let i = 0; i < details.renderList.length; i++) {
+ details.renderList[i].isChoose = true;
+ }
+ };
+ const handleInvertSelection = () => {
+ if (details.renderList.length === 0)
+ return;
+ for (let i = 0; i < details.renderList.length; i++) {
+ details.renderList[i].isChoose = !details.renderList[i].isChoose;
+ }
+ };
+ const handleItemChoose = (_item) => {
+ _item.isChoose = !_item.isChoose;
+ };
+ const handleCheck = (_item) => {
+ for (let i = 0; i < details.stateArr.length; i++) {
+ const _value = details.stateArr[i];
+ _value.value = 0;
+ _value.isCheck = false;
+ }
+ _item.isCheck = true;
+ _item.value = 1;
+ if (_item.title === "破损" || _item.title === "不可修复")
+ details.stateArr[0].value = 1;
+ };
+ const handleState = (_item) => {
+ initState(_item.cargoName);
+ popUp_EditState.value.setDetails({
+ title: "状态修改",
+ confirmText: "确认修改",
+ showPopUp: true,
+ success() {
+ const _value = details.stateArr.find((val) => val.isCheck);
+ _item.cargoName = _value.code;
+ _item.questStatus = 1;
+ details.scanNum++;
+ popUp_EditState.value.details.showPopUp = false;
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:782", "111 :>> ", 111);
+ }
+ });
+ };
+ const handleItemUp = (_item) => {
+ details.scancode = _item.allocationId;
+ details.positionInfo.positionCode = _item.positionCode;
+ details.upScan = true;
+ popUp_Up.value.setDetails({
+ title: "上架",
+ confirmText: "确认上架",
+ showPopUp: true,
+ success() {
+ let content = "";
+ const { allocationId, positionCode } = details.positionInfo;
+ if (positionCode) {
+ _item.allocationId = allocationId;
+ _item.positionCode = positionCode;
+ _item.questStatus = 1;
+ details.scanNum++;
+ content = "上架成功";
+ } else
+ content = "上架失败, 库位数据有误";
+ uni.showToast({
+ title: content,
+ icon: "none"
+ });
+ utils.ttsspke(content);
+ details.positionInfo.positionCode = "";
+ details.positionInfo.allocationId = "";
+ popUp_Up.value.details.showPopUp = false;
+ details.upScan = false;
+ },
+ close() {
+ popUp_Up.value.details.showPopUp = false;
+ details.upScan = false;
+ }
+ });
+ };
+ const leftClick = () => {
+ popUp_Handle.value.setDetails({
+ title: "有数据未提交, 是否返回",
+ showPopUp: true,
+ confirmText: "确认返回 ",
+ success() {
+ uni.navigateBack();
+ }
+ });
+ };
+ const handleConFirm = () => {
+ switch (details.handleType) {
+ case 1:
+ batchEditState();
+ break;
+ case 2:
+ batchDelete();
+ break;
+ case 3:
+ batchUp();
+ break;
+ case 4:
+ batchCheck();
+ break;
+ }
+ };
+ const submitCheck = async () => {
+ try {
+ uni.showLoading({
+ title: "提交中",
+ mask: true
+ });
+ const submitData = {
+ questId: details.pageInfos.questId,
+ questNum: details.pageInfos.questNum,
+ // 在库的ids数组
+ questDetailIds: [],
+ // 其它类型组成的数组
+ questDetailList: []
+ };
+ details.orderList.forEach((val) => {
+ if (!val.isManuallyAdd && !val.isChange) {
+ }
+ });
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:888", "details.orderList :>> ", details.orderList);
+ } catch (err) {
+ formatAppLog("log", "at pagesTask/pages/dynamicCheckDetails/dynamicCheckDetails.vue:891", "err :>> ", err);
+ } finally {
+ uni.hideLoading();
+ }
+ };
const {
- title,
pageType,
showControl,
tabBarCode
} = vue.toRefs(details);
return (_ctx, _cache) => {
- const _component_u_navbar = resolveEasycom(vue.resolveDynamicComponent("u-navbar"), __easycom_0);
+ const _component_BasicContainer = vue.resolveComponent("BasicContainer");
+ const _component_PopUp = vue.resolveComponent("PopUp");
const _component_saomiao2 = vue.resolveComponent("saomiao2");
return vue.openBlock(), vue.createElementBlock(
vue.Fragment,
null,
[
- vue.createElementVNode("view", null, [
- vue.createCommentVNode(" 顶部导航栏 "),
- vue.createVNode(_component_u_navbar, {
- title: vue.unref(title),
- placeholder: "",
- autoBack: true,
- leftIconSize: "35",
- bgColor: "#d3832a",
- leftIconColor: "#ffffff",
- titleStyle: "color:#ffffff"
- }, null, 8, ["title"])
- ]),
- vue.createElementVNode("view", { class: "12312" }, " 2313213123213 "),
- vue.createCommentVNode(" 主体内容 "),
- vue.createElementVNode("view", { class: "main" }, [
- vue.createCommentVNode(" 顶部 "),
- vue.createElementVNode("view", { class: "main_top" }, [
- vue.createElementVNode("input", {
- type: "text",
- placeholder: "请输入包条码",
- class: "main_top_search"
- }),
- vue.createElementVNode("view", { class: "button" }, "搜索")
+ vue.createVNode(_component_BasicContainer, {
+ ref_key: "basicContainer",
+ ref: basicContainer,
+ option,
+ leftClick
+ }, {
+ head: vue.withCtx(() => [
+ vue.createElementVNode("view", { class: "head" }, [
+ vue.createCommentVNode(" 顶部 "),
+ vue.createElementVNode("view", { class: "head_top" }, [
+ vue.withDirectives(vue.createElementVNode(
+ "input",
+ {
+ type: "text",
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => details.searchCode = $event),
+ placeholder: "请输入包条码",
+ class: "head_top_search"
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vModelText, details.searchCode]
+ ]),
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: handleSearch
+ }, "确认")
+ ]),
+ vue.createCommentVNode(" tabBar选项卡 "),
+ vue.createElementVNode("view", { class: "tabBar" }, [
+ vue.createElementVNode(
+ "view",
+ {
+ class: vue.normalizeClass({ "tabBar-item": true, "active": vue.unref(tabBarCode) === 1 }),
+ onClick: _cache[1] || (_cache[1] = ($event) => handleTabBarCode(1))
+ },
+ " 有数据 ",
+ 2
+ /* CLASS */
+ ),
+ vue.createElementVNode(
+ "view",
+ {
+ class: vue.normalizeClass({ "tabBar-item": true, "active": vue.unref(tabBarCode) === 2 }),
+ onClick: _cache[2] || (_cache[2] = ($event) => handleTabBarCode(2))
+ },
+ " 无数据 ",
+ 2
+ /* CLASS */
+ )
+ ]),
+ vue.createCommentVNode(" 控件 "),
+ vue.createElementVNode("view", { class: "control" }, [
+ !vue.unref(showControl) ? (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 0 },
+ [
+ vue.withDirectives(vue.createElementVNode(
+ "view",
+ {
+ class: "button",
+ onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => handleShowControl(1), ["stop"]))
+ },
+ "状态修改",
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !vue.unref(showControl)]
+ ]),
+ vue.withDirectives(vue.createElementVNode(
+ "view",
+ {
+ class: "button",
+ onClick: _cache[4] || (_cache[4] = vue.withModifiers(($event) => handleShowControl(2), ["stop"]))
+ },
+ "批量删除",
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !vue.unref(showControl)]
+ ]),
+ vue.withDirectives(vue.createElementVNode(
+ "view",
+ {
+ class: "button",
+ onClick: _cache[5] || (_cache[5] = vue.withModifiers(($event) => handleShowControl(3), ["stop"]))
+ },
+ "批量上架",
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !vue.unref(showControl)]
+ ]),
+ vue.withDirectives(vue.createElementVNode(
+ "view",
+ {
+ class: "button",
+ onClick: _cache[6] || (_cache[6] = vue.withModifiers(($event) => handleShowControl(4), ["stop"]))
+ },
+ "批量盘点",
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !vue.unref(showControl)]
+ ])
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ )) : (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 1 },
+ [
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: vue.withModifiers(handleCheckAll, ["stop"])
+ }, "全选", 8, ["onClick"]),
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: vue.withModifiers(handleInvertSelection, ["stop"])
+ }, "反选", 8, ["onClick"]),
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: vue.withModifiers(handleClose, ["stop"])
+ }, " 取消 ", 8, ["onClick"]),
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: vue.withModifiers(handleConFirm, ["stop"])
+ }, " 确认 ", 8, ["onClick"])
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ ))
+ ]),
+ vue.createElementVNode("view", { class: "checkInfo" }, [
+ vue.createElementVNode("view", { class: "checkInfo_item" }, [
+ vue.createElementVNode("text", null, "已盘数量/总数:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(details.scanNum + "/" + details.renderList.length),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "checkInfo_item" }, [
+ vue.createCommentVNode(" 随机盘点 "),
+ details.pageType === 1 ? (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 0 },
+ [
+ vue.createElementVNode("text", null, "订单号:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(details.scanNum + "/" + details.totalNum),
+ 1
+ /* TEXT */
+ )
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ )) : details.pageType === 2 ? (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 1 },
+ [
+ vue.createCommentVNode(" 按库位盘点 "),
+ vue.createElementVNode("text", null, "订单号:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(details.scanNum + "/" + details.totalNum),
+ 1
+ /* TEXT */
+ )
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ )) : details.pageType === 3 ? (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 2 },
+ [
+ vue.createCommentVNode(" 按合同号盘点 "),
+ vue.createElementVNode("text", null, "合同号:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(details.scanNum + "/" + details.totalNum),
+ 1
+ /* TEXT */
+ )
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ )) : details.pageType === 4 ? (vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: 3 },
+ [
+ vue.createCommentVNode(" 按托盘盘点 "),
+ vue.createElementVNode("text", null, "托盘码:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString(details.pageInfos.trayCode),
+ 1
+ /* TEXT */
+ )
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ )) : vue.createCommentVNode("v-if", true)
+ ])
+ ])
+ ])
]),
- vue.createCommentVNode(" tabBar选项卡 "),
- vue.createElementVNode("view", { class: "tabBar" }, [
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass({ "tabBar-item": true, "active": vue.unref(tabBarCode) === 1 }),
- onClick: _cache[0] || (_cache[0] = ($event) => handleTabBarCode(1))
- },
- " 定制品 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass({ "tabBar-item": true, "active": vue.unref(tabBarCode) === 2 }),
- onClick: _cache[1] || (_cache[1] = ($event) => handleTabBarCode(2))
- },
- " 库存品 ",
- 2
- /* CLASS */
- ),
- vue.createElementVNode(
- "view",
- {
- class: vue.normalizeClass({ "tabBar-item": true, "active": vue.unref(tabBarCode) === 3 }),
- onClick: _cache[2] || (_cache[2] = ($event) => handleTabBarCode(3))
- },
- " 零担 ",
- 2
- /* CLASS */
- )
+ body: vue.withCtx(() => [
+ vue.createCommentVNode(" 主体内容 "),
+ vue.createElementVNode("view", { class: "main" }, [
+ (vue.openBlock(true), vue.createElementBlock(
+ vue.Fragment,
+ null,
+ vue.renderList(details.renderList, (item) => {
+ return vue.openBlock(), vue.createElementBlock(
+ vue.Fragment,
+ { key: item },
+ [
+ vue.createCommentVNode(" 订制品 "),
+ vue.createElementVNode("view", {
+ class: vue.normalizeClass({
+ "main_render": true,
+ "active": false,
+ "delete": false,
+ "edit": false
+ })
+ }, [
+ vue.withDirectives(vue.createElementVNode("view", {
+ onClick: vue.withModifiers(($event) => handleItemChoose(item), ["stop"])
+ }, [
+ vue.createCommentVNode(" 被选中 "),
+ vue.withDirectives(vue.createElementVNode(
+ "image",
+ {
+ src: _imports_0$1,
+ class: "main_render_checkImg",
+ mode: ""
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, item.isChoose]
+ ]),
+ vue.createCommentVNode(" 不被选中 "),
+ vue.withDirectives(vue.createElementVNode(
+ "image",
+ {
+ src: _imports_1$1,
+ class: "main_render_checkImg",
+ mode: ""
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !item.isChoose]
+ ])
+ ], 8, ["onClick"]), [
+ [vue.vShow, vue.unref(showControl)]
+ ]),
+ vue.createElementVNode("view", { class: "main_render_container" }, [
+ vue.createElementVNode("view", { class: "main_render_item" }, [
+ vue.createElementVNode(
+ "view",
+ null,
+ " 包条码: " + vue.toDisplayString(item.orderPackageCode || "暂无数据"),
+ 1
+ /* TEXT */
+ ),
+ vue.createElementVNode("view", {
+ style: vue.normalizeStyle({ color: item.isManuallyAdd ? "#f00" : "#000" }),
+ onClick: ($event) => editOrderCode(item)
+ }, " 合同号: " + vue.toDisplayString(item.orderCode || "暂无数据"), 13, ["onClick"])
+ ]),
+ vue.createElementVNode("view", { class: "main_render_item" }, [
+ vue.createElementVNode(
+ "view",
+ null,
+ " 库位: " + vue.toDisplayString(item.positionCode || "暂无数据"),
+ 1
+ /* TEXT */
+ ),
+ vue.createElementVNode(
+ "view",
+ null,
+ " 状态: " + vue.toDisplayString(details.stateArr.find((val) => val.code === item.cargoName).title || "暂无数据"),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "main_render_item" }, [
+ vue.createElementVNode("view", { class: "" }, [
+ vue.createTextVNode(" 类型: "),
+ vue.createElementVNode(
+ "text",
+ { class: "main_render_item_type" },
+ vue.toDisplayString(Number(item.state) === 1 ? "定制品" : "库存品"),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "" }, [
+ vue.createTextVNode(" 盘点状态: "),
+ vue.createElementVNode(
+ "text",
+ {
+ class: vue.normalizeClass({
+ "main_render_item_type": true,
+ "active": Number(item.questStatus) !== 1
+ })
+ },
+ vue.toDisplayString(details.checkStatus.find((val) => val.code === Number(item.questStatus)).title),
+ 3
+ /* TEXT, CLASS */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "button_box" }, [
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: ($event) => handleState(item)
+ }, " 处理 ", 8, ["onClick"]),
+ vue.createElementVNode("view", {
+ class: "button",
+ onClick: ($event) => handleItemUp(item)
+ }, " 上架 ", 8, ["onClick"])
+ ])
+ ])
+ ])
+ ])
+ ],
+ 64
+ /* STABLE_FRAGMENT */
+ );
+ }),
+ 128
+ /* KEYED_FRAGMENT */
+ )),
+ vue.createCommentVNode(" 提交 "),
+ vue.createElementVNode("button", {
+ onClick: submitCheck,
+ class: "submitButton",
+ type: "primary"
+ }, "提交盘点")
+ ])
]),
- vue.createCommentVNode(" 控件 "),
- vue.unref(pageType) === 1 || vue.unref(pageType) === 2 ? (vue.openBlock(), vue.createElementBlock("view", {
- key: 0,
- class: "control"
- }, [
- vue.withDirectives(vue.createElementVNode(
- "view",
- {
- class: "button",
- onClick: _cache[3] || (_cache[3] = ($event) => showControl.value = true)
- },
- "批量操作",
- 512
- /* NEED_PATCH */
- ), [
- [vue.vShow, !vue.unref(showControl)]
+ _: 1
+ /* STABLE */
+ }, 8, ["option"]),
+ vue.createCommentVNode(" 弹出层 -- 上架 "),
+ vue.createVNode(
+ _component_PopUp,
+ {
+ ref_key: "popUp_Up",
+ ref: popUp_Up
+ },
+ {
+ default: vue.withCtx(() => [
+ vue.createElementVNode("view", { class: "popUpTitle" }, " 请扫描新的库位码,如果该货物已在其它库位,使用该功能会重新绑定库位 "),
+ vue.withDirectives(vue.createElementVNode(
+ "input",
+ {
+ class: "popUpInput",
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => details.scancode = $event),
+ type: "text",
+ placeholder: "请扫描货位码",
+ disabled: ""
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vModelText, details.scancode]
+ ]),
+ vue.createElementVNode(
+ "view",
+ { class: "popUpInfo" },
+ " 货位信息: " + vue.toDisplayString(details.positionInfo.positionCode || "暂无数据"),
+ 1
+ /* TEXT */
+ )
]),
- vue.unref(showControl) ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 0 },
- [
- vue.createElementVNode("view", { class: "button" }, "反选"),
- vue.createElementVNode("view", { class: "controlList" }, [
- vue.createElementVNode("view", { class: "button" }, " 批量删除 "),
- vue.createElementVNode("view", { class: "button" }, " 批量删除 "),
- vue.createElementVNode("view", { class: "button" }, " 状态修改 ")
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true)
- ])) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 随机盘点 "),
- vue.unref(pageType) === 1 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 1 },
- [
- vue.createCommentVNode(" 表格 "),
- vue.createElementVNode("view", { class: "table" }, [
- vue.createCommentVNode(" 表格头部 "),
- vue.createElementVNode("view", { class: "thead" }),
- vue.createCommentVNode(" 表格主体 "),
- vue.createElementVNode("view", { class: "tbody" })
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 按库位盘点 "),
- vue.unref(pageType) === 2 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 2 },
- [
- vue.createCommentVNode(" 表格 "),
- vue.createElementVNode("view", { class: "table" }, [
- vue.createCommentVNode(" 表格头部 "),
- vue.createElementVNode("view", { class: "thead" }),
- vue.createCommentVNode(" 表格主体 "),
- vue.createElementVNode("view", { class: "tbody" })
- ])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 按合同号盘点 "),
- vue.unref(pageType) === 3 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 3 },
- [
- vue.createCommentVNode(" 表格 "),
- vue.createElementVNode("view", { class: "table" }, [
- vue.createCommentVNode(" 表格头部 "),
- vue.createElementVNode("view", { class: "thead" }),
- vue.createCommentVNode(" 表格主体 "),
- vue.createElementVNode("view", { class: "tbody" })
+ _: 1
+ /* STABLE */
+ },
+ 512
+ /* NEED_PATCH */
+ ),
+ vue.createCommentVNode(" 弹出层 -- 状态修改 "),
+ vue.createVNode(
+ _component_PopUp,
+ {
+ ref_key: "popUp_EditState",
+ ref: popUp_EditState
+ },
+ {
+ default: vue.withCtx(() => [
+ vue.createElementVNode("view", { class: "popUp_EditState_container" }, [
+ (vue.openBlock(true), vue.createElementBlock(
+ vue.Fragment,
+ null,
+ vue.renderList(details.stateArr, (item) => {
+ return vue.openBlock(), vue.createElementBlock("view", {
+ key: item,
+ class: "popUp_row",
+ onClick: vue.withModifiers(($event) => handleCheck(item), ["stop"])
+ }, [
+ vue.createCommentVNode(" 被选中 "),
+ vue.withDirectives(vue.createElementVNode(
+ "image",
+ {
+ src: _imports_1,
+ class: "popUp_row_checkImg",
+ mode: ""
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, item.isCheck]
+ ]),
+ vue.createCommentVNode(" 不被选中 "),
+ vue.withDirectives(vue.createElementVNode(
+ "image",
+ {
+ src: _imports_0,
+ class: "popUp_row_checkImg",
+ mode: ""
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vShow, !item.isCheck]
+ ]),
+ vue.createElementVNode(
+ "view",
+ { class: "popUp_row_title" },
+ vue.toDisplayString(item.title),
+ 1
+ /* TEXT */
+ ),
+ vue.createCommentVNode(" 输入框 "),
+ vue.createCommentVNode(' ')
+ ], 8, ["onClick"]);
+ }),
+ 128
+ /* KEYED_FRAGMENT */
+ ))
])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 按托盘盘点 "),
- vue.unref(pageType) === 4 ? (vue.openBlock(), vue.createElementBlock(
- vue.Fragment,
- { key: 4 },
- [
- vue.createCommentVNode(" 表格 "),
- vue.createElementVNode("view", { class: "table" }, [
- vue.createCommentVNode(" 表格头部 "),
- vue.createElementVNode("view", { class: "thead" }),
- vue.createCommentVNode(" 表格主体 "),
- vue.createElementVNode("view", { class: "tbody" })
+ ]),
+ _: 1
+ /* STABLE */
+ },
+ 512
+ /* NEED_PATCH */
+ ),
+ vue.createCommentVNode(" 弹出层 -- 删除 / 盘点 "),
+ vue.createVNode(
+ _component_PopUp,
+ {
+ ref_key: "popUp_Handle",
+ ref: popUp_Handle
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ),
+ vue.createCommentVNode(" 弹出层 -- 新增 "),
+ vue.createVNode(
+ _component_PopUp,
+ {
+ ref_key: "popUp_Add",
+ ref: popUp_Add
+ },
+ {
+ default: vue.withCtx(() => [
+ vue.withDirectives(vue.createElementVNode(
+ "input",
+ {
+ class: "popUpInput",
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => details.addInfo.orderCode = $event),
+ type: "text",
+ placeholder: "请输入合同号"
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [vue.vModelText, details.addInfo.orderCode]
])
- ],
- 64
- /* STABLE_FRAGMENT */
- )) : vue.createCommentVNode("v-if", true),
- vue.createCommentVNode(" 提交 "),
- vue.createElementVNode("button", {
- onClick: submitCheck,
- class: "submitButton",
- type: "primary"
- }, "提交盘点")
- ]),
+ ]),
+ _: 1
+ /* STABLE */
+ },
+ 512
+ /* NEED_PATCH */
+ ),
vue.createVNode(_component_saomiao2, {
ishidestop: vue.unref(scanState) !== 0
}, null, 8, ["ishidestop"])
@@ -36361,10 +37249,11 @@ This will fail in production if not fixed.`);
formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:244", "下拉刷新");
details.renderList = [];
details.pages.current = 1;
+ option.isEnd = false;
return await initPage();
},
reachBottomInitPage() {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:254", "触底加载");
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:255", "触底加载");
}
});
const details = vue.reactive({
@@ -36393,8 +37282,6 @@ This will fail in production if not fixed.`);
"red"
],
showUpData: false,
- // 阻止首页刷新
- holdBackFirstPost: true,
pages: {
size: 10,
current: 1
@@ -36417,25 +37304,22 @@ This will fail in production if not fixed.`);
const tiplists = vue.ref(null);
const basicContainer = vue.ref(null);
onLoad((data) => {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:316", "data :>> ", data);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:315", "data :>> ", data);
details.pageInfo = JSON.parse(data.info);
info.trayCode = details.pageInfo.trayCode;
info.goodsType = details.pageInfo.type;
- details.holdBackFirstPost = details.pageInfo.holdBackFirstPost;
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:322", "pageInfo :>> ", details.pageInfo);
});
onShow(() => {
uni.$off("scancodedate");
uni.$on("scancodedate", function(code2) {
if (code2) {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:333", "code :>> ", code2);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:328", "code :>> ", code2);
details.scancode = code2;
scandata();
}
});
- if (details.holdBackFirstPost)
- return;
const timer = setTimeout(() => {
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:336", "123 :>> ", 123);
basicContainer.value.startPullDownRefresh();
clearTimeout(timer);
}, 200);
@@ -36448,7 +37332,7 @@ This will fail in production if not fixed.`);
title: "数据已加载完毕"
});
}
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:362", "antiShake :>> ", antiShake);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:358", "antiShake :>> ", antiShake);
if (antiShake) {
uni.hideLoading();
clearTimeout(antiShake);
@@ -36459,7 +37343,7 @@ This will fail in production if not fixed.`);
mask: true
});
antiShake = setTimeout(async () => {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:376", "触底");
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:372", "触底");
details.pages.current += 1;
await initPage();
uni.hideLoading();
@@ -36470,23 +37354,26 @@ This will fail in production if not fixed.`);
async function initPage() {
try {
const submitForm = {
+ ...details.pages,
taskId: details.pageInfo.taskId,
trayId: details.pageInfo.trayId,
questNum: details.pageInfo.questNum
};
const res = await getWarehousetrayListInfo(submitForm);
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:398", "res :>> ", res);
- const { code: code2 } = res;
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:395", "res :>> ", res);
+ const { code: code2, data } = res;
if (code2 === 200) {
- const dataInfo = res.data;
- details.renderList = [...details.renderList, ...dataInfo.list];
- info.total = dataInfo.total;
- info.unTotal = dataInfo.unTotal;
- if (dataInfo.list)
- details.checkList = dataInfo.list.map(() => false);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:398", "data :>> ", data);
+ details.renderList = [...details.renderList, ...data.list];
+ info.total = data.total;
+ info.unTotal = data.unTotal;
+ if (details.renderList.length >= info.total)
+ option.isEnd = true;
+ if (data.list)
+ details.checkList = data.list.map(() => false);
}
} catch (err) {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:408", "err :>> ", err);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:407", "err :>> ", err);
} finally {
return true;
}
@@ -36496,7 +37383,7 @@ This will fail in production if not fixed.`);
return;
details.scancode;
const flag2 = details.renderList.find((val) => val.ordePackageCode === details.scancode);
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:420", "flag :>> ", flag2);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:419", "flag :>> ", flag2);
if (flag2) {
const questDetailList = [{
id: flag2.id,
@@ -36515,14 +37402,14 @@ This will fail in production if not fixed.`);
}];
const res = await getWarehouseUpdateQuestDetail({ questDetailList, questId: details.pageInfo.taskId, questNum: details.pageInfo.questNum });
const { code: code2, msg } = res;
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:440", "res :>> ", res);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:439", "res :>> ", res);
if (code2 === 200) {
basicContainer.value.startPullDownRefresh();
utils.ttsspke(msg);
}
} else {
const res = await postWarehouseTaskSelectPackageInfo({ orderPackageCode: details.scancode, questId: details.pageInfo.taskId, questNum: details.pageInfo.questNum });
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:447", "res :>> ", res);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:446", "res :>> ", res);
}
}
function submitSearch() {
@@ -36540,7 +37427,7 @@ This will fail in production if not fixed.`);
icon: "none"
});
const arr = details.renderList.filter((v) => v.questStatus !== 3);
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:477", "arr :>> ", arr);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:476", "arr :>> ", arr);
const questDetailList = arr.map((val) => {
return { id: val.id };
});
@@ -36557,7 +37444,7 @@ This will fail in production if not fixed.`);
details.checkList = details.checkList.map((val) => !val);
}
function handleBatchDel() {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:506", "details :>> ", details.checkList);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:505", "details :>> ", details.checkList);
if (!details.checkList.some((val) => val)) {
return uni.showToast({
icon: "none",
@@ -36577,7 +37464,7 @@ This will fail in production if not fixed.`);
confirmTxt: "确认删除",
isonecheck: true,
success: (deta) => {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:525", "111 :>> ", 111);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:524", "111 :>> ", 111);
try {
getWarehouseDeleteQuestDetail({ questDetailList, questId: details.pageInfo.taskId, questNum: details.pageInfo.questNum }).then((res) => {
basicContainer.value.startPullDownRefresh();
@@ -36740,7 +37627,7 @@ This will fail in production if not fixed.`);
}
function grounding() {
const marketName = Array.from(details.pageInfo.marketName);
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:704", "marketName :>> ", marketName);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:703", "marketName :>> ", marketName);
tiplists.value.setdetails({
title: "新增",
isshow: true,
@@ -36773,7 +37660,7 @@ This will fail in production if not fixed.`);
if (info.goodsType === "库存品")
submitData = stockAdd(deta);
const res = await getWarehouseSaveNewQuestDetail(submitData);
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:737", "res :>> ", res);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:736", "res :>> ", res);
const { code: code2 } = res;
if (code2 === 200) {
basicContainer.value.startPullDownRefresh();
@@ -36821,9 +37708,9 @@ This will fail in production if not fixed.`);
function zeroAdd(deta) {
}
function stockAdd(deta) {
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:791", "deta :>> ", deta);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:790", "deta :>> ", deta);
const { upform: { stock: { orderCode, stockNum, marketName, incomingBatch } } } = deta;
- formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:793", "data :>> ", deta);
+ formatAppLog("log", "at pagesTask/pages/trayCheckDetails/trayCheckDetails.vue:792", "data :>> ", deta);
const submitData = {
questDetail: {
orderCode,
@@ -42349,7 +43236,7 @@ This will fail in production if not fixed.`);
}, null, 8, ["src", "onClick"]),
vue.createElementVNode("image", {
onClick: ($event) => remove(index2, i, item.dictKey),
- src: _imports_0$1
+ src: _imports_0$2
}, null, 8, ["onClick"])
]);
}),
@@ -42954,7 +43841,7 @@ This will fail in production if not fixed.`);
/**
* 内容高度
*/
- height: "60%",
+ height: "auto",
/**
* 标题
*/
@@ -42994,7 +43881,7 @@ This will fail in production if not fixed.`);
vue.unref(showPopUp) ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "popUpMask",
- onClick: _cache[3] || (_cache[3] = ($event) => showPopUp.value = false)
+ onClick: _cache[3] || (_cache[3] = (...args) => details.close && details.close(...args))
}, [
vue.createElementVNode(
"view",
@@ -43048,8 +43935,6 @@ This will fail in production if not fixed.`);
}
};
const PopUp = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-385736e8"], ["__file", "D:/workSpace/logpm/compoment/PopUp/PopUp.vue"]]);
- const _imports_0 = "/static/nocheck.png";
- const _imports_1 = "/static/check.png";
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
__name: "BluetoothList",
setup(__props, { expose }) {
@@ -43340,8 +44225,7 @@ This will fail in production if not fixed.`);
details.intentFilter.addAction(pdaBroadcastList[brand].broadcastAction);
details.receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", {
onReceive: function(context, intent) {
- formatAppLog("log", "at compoment/saomiao2.vue:81", "111 :>> ", 111);
- formatAppLog("log", "at compoment/saomiao2.vue:82", "intent", intent);
+ formatAppLog("log", "at compoment/saomiao2.vue:81", "intent", intent);
plus.android.importClass(intent);
let content = intent.getStringExtra(pdaBroadcastList[brand].broadcastTag);
uni.$emit("scancodedate", content.replace(/\n/g, ""));
diff --git a/unpackage/dist/dev/app-plus/app.css b/unpackage/dist/dev/app-plus/app.css
index d408608..b7cf279 100644
--- a/unpackage/dist/dev/app-plus/app.css
+++ b/unpackage/dist/dev/app-plus/app.css
@@ -1156,7 +1156,6 @@ uni-view[data-v-f631659b], uni-scroll-view[data-v-f631659b], uni-swiper-item[dat
}
.container[data-v-385736e8] {
width: 90%;
- height: 60%;
border-radius: 0.3125rem;
background: #fff;
}
@@ -1165,17 +1164,18 @@ uni-view[data-v-f631659b], uni-scroll-view[data-v-f631659b], uni-swiper-item[dat
margin-bottom: 0.3125rem;
}
.container .scoolv[data-v-385736e8] {
- height: 80%;
+ max-height: 40vh;
padding: 0.625rem;
padding-bottom: 0;
box-sizing: border-box;
}
.container .buttonContainer[data-v-385736e8] {
- height: 20%;
+ height: 12vh;
flex: 1;
display: flex;
- justify-content: space-around;
+ justify-content: space-evenly;
align-items: center;
+ zoom: 0.9;
}
.container .buttonContainer > uni-view[data-v-385736e8] {
padding: 0.46875rem 1.5625rem;