|
|
@ -112,6 +112,7 @@ |
|
|
|
<!-- 表格 --> |
|
|
|
<!-- 表格 --> |
|
|
|
<!-- 列表模块 --> |
|
|
|
<!-- 列表模块 --> |
|
|
|
<tablecmt |
|
|
|
<tablecmt |
|
|
|
|
|
|
|
ref="tableNode" |
|
|
|
:columnList="details.packageListColumnList" |
|
|
|
:columnList="details.packageListColumnList" |
|
|
|
:tableData="details.data" |
|
|
|
:tableData="details.data" |
|
|
|
:loading="loadingObj.packageListLoading" |
|
|
|
:loading="loadingObj.packageListLoading" |
|
|
@ -123,9 +124,7 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
<template #default="slotProps"> |
|
|
|
<template #default="slotProps"> |
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)"> |
|
|
|
<el-text @click="handleShowPackageOrderList(slotProps.scope)"> 查看详情 </el-text> |
|
|
|
查看详情 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
<!-- <el-button type="text" @click="handleShowFlowNode(slotProps.scope)"> |
|
|
|
<!-- <el-button type="text" @click="handleShowFlowNode(slotProps.scope)"> |
|
|
|
在库明细 |
|
|
|
在库明细 |
|
|
|
</el-button> --> |
|
|
|
</el-button> --> |
|
|
@ -189,11 +188,8 @@ import dayjs from 'dayjs'; |
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
/** 获取字典 */ |
|
|
|
/** 获取字典 */ |
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
import { getopenOrderAdvancePageList } from '@/api/waybill/TemporaryStorageList'; |
|
|
|
|
|
|
|
import { postFindListByWaybillId } from '@/api/waybill/orderDetails'; |
|
|
|
import { postFindListByWaybillId } from '@/api/waybill/orderDetails'; |
|
|
|
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
|
|
|
import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util'; |
|
|
|
import { downloadXls, setNodeHeight, getHtmls } from '@/utils/util'; |
|
|
|
import { packageDetailColumnList, flowNodeColumnList } from '@/option/waybill/orderPackageList'; |
|
|
|
|
|
|
|
import { packageListColumnList } from '@/option/waybill/orderDetails'; |
|
|
|
import { packageListColumnList } from '@/option/waybill/orderDetails'; |
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
import print from '@/utils/print'; |
|
|
|
import print from '@/utils/print'; |
|
|
@ -203,6 +199,9 @@ import { ElMessage, ElMessageBox } from 'element-plus'; |
|
|
|
const $router = useRouter(); |
|
|
|
const $router = useRouter(); |
|
|
|
const $route = useRoute(); |
|
|
|
const $route = useRoute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表格实例 |
|
|
|
|
|
|
|
const tableNode = ref(); |
|
|
|
|
|
|
|
|
|
|
|
const details = reactive<any>({ |
|
|
|
const details = reactive<any>({ |
|
|
|
/** 是否开启搜索 */ |
|
|
|
/** 是否开启搜索 */ |
|
|
|
search: true, |
|
|
|
search: true, |
|
|
@ -240,16 +239,6 @@ const details = reactive<any>({ |
|
|
|
], |
|
|
|
], |
|
|
|
/** 时间选择器数据 */ |
|
|
|
/** 时间选择器数据 */ |
|
|
|
stockupDate: [], |
|
|
|
stockupDate: [], |
|
|
|
/** 包明细数据 */ |
|
|
|
|
|
|
|
packageListData: [{}], |
|
|
|
|
|
|
|
/** 包内产品表头 */ |
|
|
|
|
|
|
|
packageDetailColumnList, |
|
|
|
|
|
|
|
/** 包内产品数据 */ |
|
|
|
|
|
|
|
packageDetailData: [{}], |
|
|
|
|
|
|
|
/** 流转节点表头 */ |
|
|
|
|
|
|
|
flowNodeColumnList, |
|
|
|
|
|
|
|
/** 流转节点数据 */ |
|
|
|
|
|
|
|
flowNodeData: [{}], |
|
|
|
|
|
|
|
/** 数据 */ |
|
|
|
/** 数据 */ |
|
|
|
data: [], |
|
|
|
data: [], |
|
|
|
/** 包明细表头 */ |
|
|
|
/** 包明细表头 */ |
|
|
@ -305,14 +294,9 @@ const { search, query, shortcuts, stockupDate, loadingObj, selectionList, drawer |
|
|
|
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); |
|
|
|
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList'])); |
|
|
|
console.log('permission :>> ', permission); |
|
|
|
console.log('permission :>> ', permission); |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(async () => { |
|
|
|
const timer = setTimeout(() => { |
|
|
|
await nextTick(); |
|
|
|
details.listNode = document.querySelector('.maboxhi'); |
|
|
|
setNodeHeight(tableNode.value.$el, ''); |
|
|
|
console.log('details.listNode :>> ', details.listNode); |
|
|
|
|
|
|
|
details.listNode.style.transition = 'all .5s ease-out'; |
|
|
|
|
|
|
|
console.log('details.listNode :>> ', details.listNode); |
|
|
|
|
|
|
|
clearTimeout(timer); |
|
|
|
|
|
|
|
}, 100); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/** 请求页面数据 */ |
|
|
|
/** 请求页面数据 */ |
|
|
@ -349,7 +333,7 @@ const showdrawer = (_flag?: boolean) => { |
|
|
|
const searchHide = () => { |
|
|
|
const searchHide = () => { |
|
|
|
details.search = !details.search; |
|
|
|
details.search = !details.search; |
|
|
|
|
|
|
|
|
|
|
|
setNodeHeight(details.listNode, '', true); |
|
|
|
setNodeHeight(tableNode.value.$el, '', true); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** 表格表头输入框搜索 */ |
|
|
|
/** 表格表头输入框搜索 */ |
|
|
@ -417,166 +401,20 @@ const setnewcolum = (newarr, headarr, type) => { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** 弹出层开启前清除数据 */ |
|
|
|
|
|
|
|
const beforeClose = done => { |
|
|
|
|
|
|
|
done(); |
|
|
|
|
|
|
|
details.form = {}; |
|
|
|
|
|
|
|
details.selectionList = []; |
|
|
|
|
|
|
|
details.view = false; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 查看包内产品 */ |
|
|
|
|
|
|
|
const handleShowPackageOrderList = ({ row }) => { |
|
|
|
|
|
|
|
details.popUpShow.packageDetailColumnListVisited = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
// 获取弹窗内表格元素节点, 并设置高度 |
|
|
|
|
|
|
|
const _node: any = document.querySelector('.packageDetailColumnListVisited .maboxhi'); |
|
|
|
|
|
|
|
if (!_node) return; |
|
|
|
|
|
|
|
_node.style.height = '550px'; |
|
|
|
|
|
|
|
console.log('_node :>> ', _node); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 订单转运单 */ |
|
|
|
|
|
|
|
const handleCreateOrder = () => { |
|
|
|
|
|
|
|
$router.push('/distribution/inventory/CreateOrder'); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 修改客户信息 */ |
|
|
|
|
|
|
|
const editClientInfo = () => { |
|
|
|
|
|
|
|
if (details.selectionList.length !== 0) { |
|
|
|
|
|
|
|
return ElMessage({ |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
message: '最少选择一条数据', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// editClientInfoVisible; |
|
|
|
|
|
|
|
details.popUpShow.editClientInfoVisible = true; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量删除 */ |
|
|
|
|
|
|
|
const handleDelete = () => { |
|
|
|
|
|
|
|
if (details.selectionList.length === 0) { |
|
|
|
|
|
|
|
return ElMessage({ |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
message: '最少选择一条数据', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量发车 */ |
|
|
|
|
|
|
|
const handleDepart = () => { |
|
|
|
|
|
|
|
if (details.selectionList.length === 0) { |
|
|
|
|
|
|
|
return ElMessage({ |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
message: '最少选择一条数据', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 批量冻结 */ |
|
|
|
|
|
|
|
const handleFreeze = () => { |
|
|
|
|
|
|
|
if (details.selectionList.length === 0) { |
|
|
|
|
|
|
|
return ElMessage({ |
|
|
|
|
|
|
|
type: 'warning', |
|
|
|
|
|
|
|
message: '最少选择一条数据', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 是否开启全屏 |
|
|
|
|
|
|
|
* @params(_type) 开启或关闭 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
const handleFullScrean = (_type: 'open' | 'close', _name: string) => { |
|
|
|
|
|
|
|
let _node = ''; |
|
|
|
|
|
|
|
if (_name) _node = document.querySelector(`.${_name} .maboxhi`); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (_name) { |
|
|
|
|
|
|
|
// 包内产品 |
|
|
|
|
|
|
|
case 'packageDetailColumnListVisited': |
|
|
|
|
|
|
|
details.fullscreenObj.packageDetailColumnListVisited = |
|
|
|
|
|
|
|
!details.fullscreenObj.packageDetailColumnListVisited; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_type === 'close') { |
|
|
|
|
|
|
|
if (_node) setNodeHeight(_node, '500px'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (_node) setNodeHeight(_node); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
details.fullscreenObj[_name] = !details.fullscreenObj[_name]; |
|
|
|
|
|
|
|
if (_type === 'close') { |
|
|
|
|
|
|
|
if (_node) setNodeHeight(_node, '500px'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (_node) setNodeHeight(_node); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 单列查看包条码 */ |
|
|
|
|
|
|
|
const printOrder = ({ row }) => { |
|
|
|
|
|
|
|
let qr = { |
|
|
|
|
|
|
|
ids: row.id, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
details.html = ''; |
|
|
|
|
|
|
|
showOrderPackgeCode(qr).then(res => { |
|
|
|
|
|
|
|
// this.orderPackageCode = res.data |
|
|
|
|
|
|
|
if (res.data.code !== 200) return; |
|
|
|
|
|
|
|
console.log(res.data); |
|
|
|
|
|
|
|
details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 单列查看包条码 */ |
|
|
|
|
|
|
|
const batchPrintOrder = ({ row }) => { |
|
|
|
|
|
|
|
let qr = { |
|
|
|
|
|
|
|
ids: row.id, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
showOrderPackgeCode(qr).then(res => { |
|
|
|
|
|
|
|
// this.orderPackageCode = res.data |
|
|
|
|
|
|
|
if (res.data.code !== 200) return; |
|
|
|
|
|
|
|
console.log(res.data); |
|
|
|
|
|
|
|
details.html = ''; |
|
|
|
|
|
|
|
details.html = getHtmls(res.data.data.dataList, res.data.data.templateHtml); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 打印包条码 */ |
|
|
|
/** 打印包条码 */ |
|
|
|
const printTemplate = () => { |
|
|
|
const printTemplate = () => { |
|
|
|
const orderNodeList = document.querySelectorAll('.el-dialog-QRCode .el-dialog__body>div>div>div'); |
|
|
|
const orderNodeList = document.querySelectorAll('.el-dialog-QRCode .el-dialog__body>div>div>div'); |
|
|
|
print(orderNodeList); |
|
|
|
print(orderNodeList); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** 入库 */ |
|
|
|
/** 查看包明细 */ |
|
|
|
const handlePutInStorage = row => { |
|
|
|
const handleShowPackageOrderList = ({ row }) => { |
|
|
|
ElMessageBox.confirm('确认直接入库吗?', '警告', { |
|
|
|
$router.push({ |
|
|
|
confirmButtonText: '确认', |
|
|
|
path: '/waybill/orderPackageListDetails?name=包明细', |
|
|
|
cancelButtonText: '取消', |
|
|
|
query: { |
|
|
|
type: 'warning', |
|
|
|
id: row.id, |
|
|
|
}) |
|
|
|
name: `订单 -- ${row.orderCode} 包明细`, |
|
|
|
.then(() => { |
|
|
|
}, |
|
|
|
ElMessage({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '入库成功', |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => {}); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 显示流转节点 */ |
|
|
|
|
|
|
|
const handleShowFlowNode = ({ row }) => { |
|
|
|
|
|
|
|
details.popUpShow.flowNodeColumnListVisited = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
// 获取弹窗内表格元素节点, 并设置高度 |
|
|
|
|
|
|
|
const _node: any = document.querySelector('.flowNodeColumnListVisited .maboxhi'); |
|
|
|
|
|
|
|
if (!_node) return; |
|
|
|
|
|
|
|
_node.style.height = '550px'; |
|
|
|
|
|
|
|
console.log('_node :>> ', _node); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|