Commit 63e91d11 by linjinhong

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

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