Commit 1ad6b613 by qinjianhui

Merge branch 'dev' into 'master'

Dev

See merge request !16
parents 926d8f57 7c611b81
...@@ -51,6 +51,7 @@ declare module 'vue' { ...@@ -51,6 +51,7 @@ declare module 'vue' {
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default'] Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default'] ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default'] LogList: typeof import('./src/components/LogList.vue')['default']
......
...@@ -205,6 +205,7 @@ const [editForm, resetEditForm] = useValue<ShippingAddressObj>({ ...@@ -205,6 +205,7 @@ const [editForm, resetEditForm] = useValue<ShippingAddressObj>({
swDefault: false, swDefault: false,
}) })
const { const {
loading,
currentPage, currentPage,
pageSize, pageSize,
total, total,
...@@ -364,7 +365,7 @@ const formConfig = ref<IFormConfig[]>([ ...@@ -364,7 +365,7 @@ const formConfig = ref<IFormConfig[]>([
}, },
]) ])
const loading = ref(false) // const loading = ref(false)
/** /**
* @description: 取消按钮 * @description: 取消按钮
......
...@@ -950,6 +950,7 @@ import useLodop, { LODOPObject } from '@/utils/hooks/useLodop' ...@@ -950,6 +950,7 @@ import useLodop, { LODOPObject } from '@/utils/hooks/useLodop'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import rightMenu from '../pod/rightMenu.vue' import rightMenu from '../pod/rightMenu.vue'
import ResultInfo from './components/ResultInfo.vue' import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
...@@ -1257,6 +1258,10 @@ const handleUpdateRemark = async (item: ProductList) => { ...@@ -1257,6 +1258,10 @@ const handleUpdateRemark = async (item: ProductList) => {
inputPattern: /^.{1,2000}$/, inputPattern: /^.{1,2000}$/,
inputErrorMessage: '请输入备注', inputErrorMessage: '请输入备注',
}).then(async ({ value }) => { }).then(async ({ value }) => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await updateRemarkApi(item.id, value) const res = await updateRemarkApi(item.id, value)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1264,6 +1269,8 @@ const handleUpdateRemark = async (item: ProductList) => { ...@@ -1264,6 +1269,8 @@ const handleUpdateRemark = async (item: ProductList) => {
search() search()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
}) })
} }
...@@ -1288,6 +1295,10 @@ const loadProductionClient = async () => { ...@@ -1288,6 +1295,10 @@ const loadProductionClient = async () => {
} }
const submitConfirm = async () => { const submitConfirm = async () => {
const ids = selection.value.map((item) => item.id) const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await confirmOrderApi( const res = await confirmOrderApi(
ids, ids,
...@@ -1301,6 +1312,8 @@ const submitConfirm = async () => { ...@@ -1301,6 +1312,8 @@ const submitConfirm = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const updateOrder = async () => { const updateOrder = async () => {
...@@ -1317,6 +1330,10 @@ const updateOrder = async () => { ...@@ -1317,6 +1330,10 @@ const updateOrder = async () => {
return return
} }
const ids = selection.value.map((item) => item.id) const ids = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await updateExceptionOrderApi(ids) const res = await updateExceptionOrderApi(ids)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1325,6 +1342,8 @@ const updateOrder = async () => { ...@@ -1325,6 +1342,8 @@ const updateOrder = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const printProductionOrder = async () => { const printProductionOrder = async () => {
...@@ -1332,6 +1351,10 @@ const printProductionOrder = async () => { ...@@ -1332,6 +1351,10 @@ const printProductionOrder = async () => {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const orderIds = selection.value.map((item) => item.id) const orderIds = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await printProductionOrderApi(orderIds) const res = await printProductionOrderApi(orderIds)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1339,6 +1362,8 @@ const printProductionOrder = async () => { ...@@ -1339,6 +1362,8 @@ const printProductionOrder = async () => {
window.open(filePath + res.message) window.open(filePath + res.message)
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const printPickingOrder = async () => { const printPickingOrder = async () => {
...@@ -1346,6 +1371,10 @@ const printPickingOrder = async () => { ...@@ -1346,6 +1371,10 @@ const printPickingOrder = async () => {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const orderIds = selection.value.map((item) => item.id) const orderIds = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await printPrintOrderApi(orderIds) const res = await printPrintOrderApi(orderIds)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1353,6 +1382,8 @@ const printPickingOrder = async () => { ...@@ -1353,6 +1382,8 @@ const printPickingOrder = async () => {
window.open(filePath + res.message) window.open(filePath + res.message)
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const pickingComplete = async () => { const pickingComplete = async () => {
...@@ -1369,6 +1400,10 @@ const pickingComplete = async () => { ...@@ -1369,6 +1400,10 @@ const pickingComplete = async () => {
return return
} }
const orderIds = selection.value.map((item) => item.id) const orderIds = selection.value.map((item) => item.id)
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await printPickingOrderApi(orderIds) const res = await printPickingOrderApi(orderIds)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1377,6 +1412,8 @@ const pickingComplete = async () => { ...@@ -1377,6 +1412,8 @@ const pickingComplete = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
...@@ -1391,6 +1428,10 @@ const changeExceptionOrder = async () => { ...@@ -1391,6 +1428,10 @@ const changeExceptionOrder = async () => {
inputPattern: /^.{1,2000}$/, inputPattern: /^.{1,2000}$/,
inputErrorMessage: '请输入异常原因', inputErrorMessage: '请输入异常原因',
}).then(async ({ value }) => { }).then(async ({ value }) => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await changeExceptionOrderApi(orderIds, value) const res = await changeExceptionOrderApi(orderIds, value)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1399,6 +1440,8 @@ const changeExceptionOrder = async () => { ...@@ -1399,6 +1440,8 @@ const changeExceptionOrder = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
}) })
} }
...@@ -1413,6 +1456,10 @@ const cancelOrder = async () => { ...@@ -1413,6 +1456,10 @@ const cancelOrder = async () => {
inputPattern: /^.{1,2000}$/, inputPattern: /^.{1,2000}$/,
inputErrorMessage: '请输入取消原因', inputErrorMessage: '请输入取消原因',
}).then(async ({ value }) => { }).then(async ({ value }) => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await cancelOrderApi(orderIds, value) const res = await cancelOrderApi(orderIds, value)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1421,6 +1468,8 @@ const cancelOrder = async () => { ...@@ -1421,6 +1468,8 @@ const cancelOrder = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
}) })
} }
...@@ -1489,6 +1538,10 @@ const downloadMaterial = async () => { ...@@ -1489,6 +1538,10 @@ const downloadMaterial = async () => {
offset: window.innerHeight / 2, offset: window.innerHeight / 2,
}) })
} }
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await downloadMaterialApi(selectedIds) const res = await downloadMaterialApi(selectedIds)
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1496,6 +1549,8 @@ const downloadMaterial = async () => { ...@@ -1496,6 +1549,8 @@ const downloadMaterial = async () => {
} catch (e) { } catch (e) {
// showError(e) // showError(e)
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const logList = ref<LogListData[]>([]) const logList = ref<LogListData[]>([])
...@@ -1557,17 +1612,26 @@ const getOrderByIdApi = async (type: string) => { ...@@ -1557,17 +1612,26 @@ const getOrderByIdApi = async (type: string) => {
type: 'warning', type: 'warning',
}) })
const ids = selection.value.map((el) => el.id) const ids = selection.value.map((el) => el.id)
// console.log(Fn)
if (Fn) { if (Fn) {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
const res = await Fn(ids) const res = await Fn(ids)
console.log(res)
if (res.code === 200) { if (res.code === 200) {
resultInfo.value = res.data if (isArray(res.data)) {
resultRefs.value?.showDialog(type) resultInfo.value = res.data
} else if (res.code === 205) { resultRefs.value?.showDialog(type)
window.open(filePath + res.message) } else if (isString(res.data)) {
window.open(filePath + res.data)
}
} else { } else {
ElMessage.error(res.message) ElMessage.error(res.message)
} }
loading.close()
} }
} catch { } catch {
return return
...@@ -1584,7 +1648,10 @@ const stockOutCheck = async () => { ...@@ -1584,7 +1648,10 @@ const stockOutCheck = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const selectedIds = selection.value.map((item) => item.id) const selectedIds = selection.value.map((item) => item.id)
const res = await stockOutCheckApi(selectedIds) const res = await stockOutCheckApi(selectedIds)
...@@ -1627,6 +1694,8 @@ const stockOutCheck = async () => { ...@@ -1627,6 +1694,8 @@ const stockOutCheck = async () => {
}) })
} catch (error) { } catch (error) {
console.error('补货校验失败:', error) console.error('补货校验失败:', error)
} finally {
loading.close()
} }
} }
const toBePicking = async () => { const toBePicking = async () => {
...@@ -1642,6 +1711,10 @@ const toBePicking = async () => { ...@@ -1642,6 +1711,10 @@ const toBePicking = async () => {
} catch (e) { } catch (e) {
return return
} }
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
try { try {
const res = await toBePickingApi(selection.value.map((item) => item.id)) const res = await toBePickingApi(selection.value.map((item) => item.id))
if (res.code !== 200) return if (res.code !== 200) return
...@@ -1650,6 +1723,8 @@ const toBePicking = async () => { ...@@ -1650,6 +1723,8 @@ const toBePicking = async () => {
loadTabData() loadTabData()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
const sheetPrinter = ref('') const sheetPrinter = ref('')
...@@ -1818,6 +1893,10 @@ const downloadPDF = (url: string) => { ...@@ -1818,6 +1893,10 @@ const downloadPDF = (url: string) => {
return strData return strData
} }
const openDetail = async (id: number) => { const openDetail = async (id: number) => {
const loading = ElLoading.service({
fullscreen: true,
text: '加载中...',
})
try { try {
const res = await getOrderDetailById(id) const res = await getOrderDetailById(id)
if (res.code == 200) { if (res.code == 200) {
...@@ -1830,6 +1909,8 @@ const openDetail = async (id: number) => { ...@@ -1830,6 +1909,8 @@ const openDetail = async (id: number) => {
} }
} catch (e) { } catch (e) {
//showError(e) //showError(e)
} finally {
loading.close()
} }
} }
const onFastRefresh = () => { const onFastRefresh = () => {
...@@ -1862,6 +1943,10 @@ const refreshMaterial = async () => { ...@@ -1862,6 +1943,10 @@ const refreshMaterial = async () => {
if (selection.value.length === 0) { if (selection.value.length === 0) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
const loading = ElLoading.service({
fullscreen: true,
text: '刷新中...',
})
try { try {
const res = await refreshMaterialApi( const res = await refreshMaterialApi(
selection.value.map((item) => item.id).join(','), selection.value.map((item) => item.id).join(','),
...@@ -1871,6 +1956,8 @@ const refreshMaterial = async () => { ...@@ -1871,6 +1956,8 @@ const refreshMaterial = async () => {
search() search()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} finally {
loading.close()
} }
} }
onMounted(() => { onMounted(() => {
...@@ -2006,12 +2093,24 @@ onMounted(() => { ...@@ -2006,12 +2093,24 @@ onMounted(() => {
.production-client-table { .production-client-table {
::v-deep(.current-row > td.el-table__cell) { ::v-deep(.current-row > td.el-table__cell) {
background-color: green; background-color: #409eff;
color: white; color: white;
& > td.el-table__cell { & > td.el-table__cell {
color: white !important; color: white !important;
background-color: green; background-color: #409eff;
}
// &:hover {
// color: #808285;
// }
}
:deep() {
.current-row {
&:hover {
td.el-table__cell {
color: #808285;
}
}
} }
} }
} }
......
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