Commit 63e91d11 by linjinhong

Merge remote-tracking branch 'origin/master' into linjinhong

parents 14d40114 18b22a43
......@@ -32,7 +32,6 @@ declare module 'vue' {
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
......@@ -51,7 +50,6 @@ declare module 'vue' {
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload']
Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default']
......
......@@ -292,9 +292,9 @@ getLogisticsList()
<span>{{ item.description }}</span>
</div>
</LogDialog>
<el-dialog v-model="createData.show" :close-on-click-modal="false" width="700px" :title="createData.title">
<el-form v-if="createData.show" ref="formRef" label-width="110px" :rules="rules" :model="form">
<el-form-item label="物流公司编码" prop="code">
<el-dialog v-model="createData.show" :close-on-click-modal="false" width="900px" :title="createData.title">
<el-form v-if="createData.show" ref="formRef" style="padding: 30px" label-width="110px" :rules="rules" :model="form" class="el-row">
<el-form-item class="el-col-12" label="物流公司编码" prop="code">
<el-select v-model="form.code" clearable filterable @change="codeChange">
<el-option
v-for="it in logisticsList" :key="it.code" :label="it.basicsName"
......@@ -306,22 +306,22 @@ getLogisticsList()
</el-option>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-form-item class="el-col-12" label="名称" prop="name">
<el-input v-model="form.name" clearable placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="联系人" prop="contact">
<el-form-item class="el-col-12" label="联系人" prop="contact">
<el-input v-model="form.contact" clearable placeholder="请输入联系人"></el-input>
</el-form-item>
<el-form-item label="电话/手机" prop="phone">
<el-form-item class="el-col-12" label="电话/手机" prop="phone">
<el-input v-model="form.phone" clearable placeholder="请输入电话/手机"></el-input>
</el-form-item>
<el-form-item label="网址" prop="siteUrl">
<el-form-item class="el-col-12" label="网址" prop="siteUrl">
<el-input v-model="form.siteUrl" clearable placeholder="请输入网址"></el-input>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-form-item class="el-col-12" label="地址" prop="address">
<el-input v-model="form.address" clearable placeholder="请输入地址"></el-input>
</el-form-item>
<el-form-item v-for="o in otherFields" :key="o" required :label="o" :prop="`apiData.${o}`">
<el-form-item v-for="o in otherFields" :key="o" class="el-col-12" required :label="o" :prop="`apiData.${o}`">
<el-input v-model="form.apiData[o]" clearable :placeholder="`请输入${o}`"></el-input>
</el-form-item>
</el-form>
......
......@@ -300,7 +300,6 @@ const boxChange = ref<boolean>(false)
const boxIndex = ref<number | null>(null)
const orderStore = useOrderStore()
const isLock = ref<boolean>(false)
const renderLock = ref<boolean>(false)
const productionOrderRef = ref()
const socketConnect = computed(() => orderStore.socketConnect)
const podBoxList = computed(() => orderStore.podBoxList)
......@@ -372,6 +371,9 @@ watch(
{ deep: true },
)
const podBoxIndex = computed(() => orderStore.podBoxIndex)
let renderLock = false
const renderItemBox = (bool: boolean) => {
if (
!podBoxList.value ||
......@@ -380,13 +382,13 @@ const renderItemBox = (bool: boolean) => {
(bool && boxIndex.value !== podBoxIndex.value)
)
return
if (renderLock.value) return
renderLock.value = true
if (renderLock) return
renderLock = true
let boxItem = podBoxList.value.find((item) => item.box === boxIndex.value)
if (!boxItem) boxItem = { data: { productList: [] } }
const { data } = boxItem
if (!data) {
renderLock.value = false
renderLock = false
currentCode = ''
podOrderDetailsData.value = {}
return
......@@ -416,9 +418,12 @@ const renderItemBox = (bool: boolean) => {
}
podOrderDetailsData.value = data
if (productList.every((item) => item.power)) {
print(data)
print(data, false, () => {
renderLock = false
})
} else {
renderLock = false
}
renderLock.value = false
}
const messageChange = (data: WebSocketMessage) => {
if (!data) return
......@@ -443,7 +448,7 @@ const setPodBoxList = (data: WebSocketMessage) => {
const obj = data.txt
if (obj && typeof obj === 'string') {
const parsedData = JSON.parse(obj)
useOrderStore().setPodBoxList(parsedData)
orderStore.setPodBoxList(parsedData)
}
}
const initPrintDevice = () => {
......@@ -657,7 +662,7 @@ const initOrderDetailBox = async () => {
})
}
renderLock.value = false
renderLock = false
productionOrder.value = ''
isLock.value = false
productionOrderRef.value.focus()
......@@ -792,12 +797,16 @@ const handlePrinterChange = (value: string) => {
emit('set-printer', value)
}
const print = (data: OrderData, forcePrint = false) => {
const print = (data: OrderData, forcePrint = false, callback?: () => void) => {
const _boxIndex = boxIndex.value
if (!forcePrint && data.printResult) return
if (!forcePrint && data.printResult) {
callback && callback()
return
}
props.printOrder(data, (status: boolean) => {
callback && callback()
const item = podBoxList.value?.find((item) => item.box === _boxIndex)
if (item && item.data) {
if (status) {
......
......@@ -1332,6 +1332,7 @@ const handleUpdateRemark = async (item: ProductList) => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await updateRemarkApi(item.id, value)
......@@ -1369,6 +1370,7 @@ const submitConfirm = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await confirmOrderApi(
......@@ -1404,6 +1406,7 @@ const updateOrder = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await updateExceptionOrderApi(ids)
......@@ -1425,6 +1428,7 @@ const printProductionOrder = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await printProductionOrderApi(orderIds)
......@@ -1445,6 +1449,7 @@ const printPickingOrder = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await printPrintOrderApi(orderIds)
......@@ -1474,6 +1479,7 @@ const pickingComplete = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await printPickingOrderApi(orderIds)
......@@ -1502,6 +1508,7 @@ const changeExceptionOrder = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await changeExceptionOrderApi(orderIds, value)
......@@ -1530,6 +1537,7 @@ const cancelOrder = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await cancelOrderApi(orderIds, value)
......@@ -1612,6 +1620,7 @@ const downloadMaterial = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await downloadMaterialApi(selectedIds)
......@@ -1783,7 +1792,8 @@ const stockOutCheck = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
})
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const selectedIds = selection.value.map((item) => item.id)
const res = await stockOutCheckApi(selectedIds)
......@@ -1846,6 +1856,7 @@ const toBePicking = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '操作中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await toBePickingApi(selection.value.map((item) => item.id))
......@@ -2028,6 +2039,7 @@ const openDetail = async (id: number) => {
const loading = ElLoading.service({
fullscreen: true,
text: '加载中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await getOrderDetailById(id)
......@@ -2078,6 +2090,7 @@ const refreshMaterial = async () => {
const loading = ElLoading.service({
fullscreen: true,
text: '刷新中...',
background: 'rgba(0, 0, 0, 0.3)',
})
try {
const res = await refreshMaterialApi(
......@@ -2217,6 +2230,16 @@ onMounted(() => {
gap: 10px;
font-size: 12px;
margin-top: 10px;
.grid-item {
display: flex;
overflow: hidden;
.grid-item-value {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.factory-sub-order-number {
......
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