多物料以逗号分隔
This commit is contained in:
parent
5e88f7afe6
commit
2d12eac2ed
|
|
@ -188,6 +188,15 @@ const downloadWorkSummaryExcel = (data) => {
|
||||||
timeout: 600000
|
timeout: 600000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const downloadWorkFlowExcel = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/excel/downloadWorkFlowExcel',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob',
|
||||||
|
data: data,
|
||||||
|
timeout: 600000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
uploadExcelStock,
|
uploadExcelStock,
|
||||||
|
|
@ -209,5 +218,6 @@ export {
|
||||||
uploadExcelBaseGoods,
|
uploadExcelBaseGoods,
|
||||||
uploadExcelKanban,
|
uploadExcelKanban,
|
||||||
uploadWorkFlow,
|
uploadWorkFlow,
|
||||||
uploadExcelWorkDate
|
uploadExcelWorkDate,
|
||||||
|
downloadWorkFlowExcel
|
||||||
}
|
}
|
||||||
|
|
@ -68,36 +68,36 @@
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="小盒子" prop="smallBox">
|
<el-form-item label="小盒子" prop="smallBox">
|
||||||
<el-input v-model="configFormEntity.smallBox" disabled />
|
<el-input v-model="configFormEntity.smallBox" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="机型" prop="model">
|
<el-form-item label="机型" prop="model">
|
||||||
<el-input v-model="configFormEntity.model" disabled />
|
<el-input v-model="configFormEntity.model" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="工位" prop="workCenter">
|
<el-form-item label="工位" prop="workCenter">
|
||||||
<el-input v-model="configFormEntity.workCenter" disabled />
|
<el-input v-model="configFormEntity.workCenter" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="工位大盒子" prop="bigBox">
|
<el-form-item label="工位大盒子" prop="bigBox">
|
||||||
<el-input v-model="configFormEntity.bigBox" disabled />
|
<el-input v-model="configFormEntity.bigBox" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="车辆" prop="vehicle">
|
<el-form-item label="车辆" prop="vehicle">
|
||||||
<el-input v-model="configFormEntity.vehicle" disabled />
|
<el-input v-model="configFormEntity.vehicle" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="线边架/车位置" prop="vehicleLocation">
|
<el-form-item label="线边架/车位置" prop="vehicleLocation">
|
||||||
<el-input v-model="configFormEntity.vehicleLocation" disabled />
|
<el-input v-model="configFormEntity.vehicleLocation" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-select-v2 v-model="goodsTypeQuery" style="width: 158px; margin-right: 10px;" placeholder="物料类型"
|
<el-select-v2 v-model="goodsTypeQuery" style="width: 158px; margin-right: 10px;" placeholder="物料类型"
|
||||||
:options="goodsTypeOptions" @change="search()"></el-select-v2>
|
:options="goodsTypeOptions" @change="search()"></el-select-v2>
|
||||||
|
<el-select-v2 v-model="stockStatusQuery" style="width: 158px; margin-right: 10px;" placeholder="库存状态"
|
||||||
|
:options="stockStatusSearchOptions" @change="search()"></el-select-v2>
|
||||||
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择上架日期" :shortcuts="shortcuts"
|
<el-date-picker v-model="createTimeQuery" type="date" placeholder="选择上架日期" :shortcuts="shortcuts"
|
||||||
style="width: 158px; margin-right: 10px;" clearable />
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
|
|
@ -222,6 +224,7 @@ export default {
|
||||||
vehicleIdQuery: '',
|
vehicleIdQuery: '',
|
||||||
locationIdQuery: '',
|
locationIdQuery: '',
|
||||||
goodsTypeQuery: '',
|
goodsTypeQuery: '',
|
||||||
|
stockStatusQuery: -99,
|
||||||
createTimeQuery: null,
|
createTimeQuery: null,
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
|
|
@ -296,6 +299,40 @@ export default {
|
||||||
label: '库存锁定'
|
label: '库存锁定'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
stockStatusSearchOptions: [
|
||||||
|
{
|
||||||
|
value: -99,
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '库存正常'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '出库中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '盘点中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: '移库中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: '拣选中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '回库中'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 9,
|
||||||
|
label: '库存锁定'
|
||||||
|
}
|
||||||
|
],
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
goodsTypeOptions: [
|
goodsTypeOptions: [
|
||||||
{
|
{
|
||||||
|
|
@ -427,6 +464,7 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsType: this.goodsTypeQuery.trim(),
|
||||||
|
stockStatus: this.stockStatusQuery == -99 ? null : this.stockStatusQuery,
|
||||||
createTime: timeFormatter(this.createTimeQuery),
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
|
|
@ -448,6 +486,8 @@ export default {
|
||||||
this.goodsIdQuery = ''
|
this.goodsIdQuery = ''
|
||||||
this.vehicleIdQuery = ''
|
this.vehicleIdQuery = ''
|
||||||
this.locationIdQuery = ''
|
this.locationIdQuery = ''
|
||||||
|
this.goodsTypeQuery = ''
|
||||||
|
this.stockStatusQuery = -99
|
||||||
this.createTimeQuery = null
|
this.createTimeQuery = null
|
||||||
this.search()
|
this.search()
|
||||||
},
|
},
|
||||||
|
|
@ -461,6 +501,7 @@ export default {
|
||||||
vehicleId: this.vehicleIdQuery.trim(),
|
vehicleId: this.vehicleIdQuery.trim(),
|
||||||
locationId: this.locationIdQuery.trim(),
|
locationId: this.locationIdQuery.trim(),
|
||||||
goodsType: this.goodsTypeQuery.trim(),
|
goodsType: this.goodsTypeQuery.trim(),
|
||||||
|
stockStatus: this.stockStatusQuery == -99 ? null : this.stockStatusQuery,
|
||||||
createTime: timeFormatter(this.createTimeQuery),
|
createTime: timeFormatter(this.createTimeQuery),
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
|
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工单号"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
|
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工位/小盒子"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
<el-input v-model="goodsIdQuery" type="textarea" :rows="1" style="width: 158px; margin-right: 10px; height: 32px;"
|
||||||
:suffix-icon="Search"/>
|
placeholder="请输入料号,多个料号请换行输入" class="goods-id-textarea" />
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="站台号"
|
||||||
:suffix-icon="Search"/>
|
:suffix-icon="Search"/>
|
||||||
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
|
<el-select-v2 v-model="lightStatusQuery" style="width: 158px; margin-right: 10px;"
|
||||||
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
|
placeholder="请选择灯光状态" :options="lightStatusOptions" @change="search()"></el-select-v2>
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-button style="background-color: #32CD32; color: #000;" @click="exportExcel()">导出</el-button>
|
||||||
<el-button style="background-color: #00CED1; color: #000;"
|
<el-button style="background-color: #00CED1; color: #000;"
|
||||||
@click="openUploadDialog()">导入
|
@click="openUploadDialog()">导入
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -121,7 +122,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="任务状态" prop="lightStatus">
|
<el-form-item label="亮灯状态" prop="lightStatus">
|
||||||
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
<el-select-v2 v-model="workFlowFormEntity.lightStatus" placeholder="请选择亮灯状态"
|
||||||
:options="lightStatusOptions"></el-select-v2>
|
:options="lightStatusOptions"></el-select-v2>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -203,7 +204,7 @@ import {ref, reactive} from 'vue'
|
||||||
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
|
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
|
||||||
import {Search} from '@element-plus/icons-vue'
|
import {Search} from '@element-plus/icons-vue'
|
||||||
import UploadExcelWorkFlow from '@/excel/UploadExcelWorkFlow.vue'
|
import UploadExcelWorkFlow from '@/excel/UploadExcelWorkFlow.vue'
|
||||||
import {queryUploadRecord} from '@/api/excel.js'
|
import {queryUploadRecord, downloadWorkFlowExcel} from '@/api/excel.js'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -303,7 +304,7 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
||||||
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
||||||
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
||||||
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
||||||
|
|
@ -445,6 +446,41 @@ export default {
|
||||||
})
|
})
|
||||||
this.uploadDialogVisible = true
|
this.uploadDialogVisible = true
|
||||||
},
|
},
|
||||||
|
exportExcel() {
|
||||||
|
const request = {
|
||||||
|
workStation: this.standIdQuery.trim(),
|
||||||
|
workOrder: this.workOrderQuery.trim(),
|
||||||
|
workCenter: this.workCenterQuery.trim(),
|
||||||
|
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
||||||
|
lightStatus: this.lightStatusQuery == -99 ? null : this.lightStatusQuery,
|
||||||
|
workStatus: this.workStatusQuery == -99 ? null : this.workStatusQuery,
|
||||||
|
machineType: this.machineTypeQuery == -99 ? null : this.machineTypeQuery,
|
||||||
|
userName: store.getters.getUserName
|
||||||
|
}
|
||||||
|
downloadWorkFlowExcel(request).then(res => {
|
||||||
|
const link = document.createElement('a');//创建a标签
|
||||||
|
try {
|
||||||
|
let blob = res.data //如果后台返回的直接是blob对象类型,直接获取数据
|
||||||
|
let _fileName = "工作流报表" + dateFormatter(new Date) + ".xlsx"
|
||||||
|
link.style.display = 'none'//隐藏
|
||||||
|
|
||||||
|
// 兼容不同浏览器的URL对象
|
||||||
|
const url = window.URL || window.webkitURL || window.moxURL
|
||||||
|
link.href = url.createObjectURL(blob)
|
||||||
|
link.setAttribute('download', _fileName.substring(_fileName.lastIndexOf('_') + 1))
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
document.body.removeChild(link)
|
||||||
|
url.revokeObjectURL(link.href)//移除url对象
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
errorBox('下载文件失败')
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
errorBox('导出失败')
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -494,4 +530,28 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 专门为料号文本域添加样式 */
|
||||||
|
.goods-id-textarea {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-id-textarea :deep(.el-textarea__inner) {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.2;
|
||||||
|
padding: 5px;
|
||||||
|
height: 32px !important;
|
||||||
|
min-height: 32px !important;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 确保其他输入框保持一致的高度 */
|
||||||
|
.el-input {
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input :deep(.el-input__wrapper) {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
<el-config-provider :locale="zhCn">
|
<el-config-provider :locale="zhCn">
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px;" placeholder="工单号"
|
<el-input v-model="workOrderQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工单号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px;" placeholder="工位/小盒子"
|
<el-input v-model="workCenterQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="工位/小盒子"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-input v-model="goodsIdQuery" style="width: 158px; margin-right: 10px;" placeholder="料号"
|
<el-input v-model="goodsIdQuery" type="textarea" :rows="1" style="width: 158px; margin-right: 10px; height: 32px;"
|
||||||
:suffix-icon="Search" />
|
placeholder="请输入料号,多个料号请换行输入" class="goods-id-textarea" />
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px; height: 32px;" placeholder="站台号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search" />
|
||||||
<el-date-picker v-model="workDateQuery" type="date" placeholder="工作起始日期" :shortcuts="shortcuts"
|
<el-date-picker v-model="workDateQuery" type="date" placeholder="工作起始日期" :shortcuts="shortcuts"
|
||||||
style="width: 158px; margin-right: 10px;" clearable />
|
style="width: 158px; margin-right: 10px;" clearable />
|
||||||
|
|
@ -129,7 +129,7 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
||||||
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
||||||
workDate: timeFormatter(this.workDateQuery),
|
workDate: timeFormatter(this.workDateQuery),
|
||||||
workEndDate: timeFormatter(this.workEndDateQuery),
|
workEndDate: timeFormatter(this.workEndDateQuery),
|
||||||
|
|
@ -193,7 +193,7 @@ export default {
|
||||||
workStation: this.standIdQuery.trim(),
|
workStation: this.standIdQuery.trim(),
|
||||||
workOrder: this.workOrderQuery.trim(),
|
workOrder: this.workOrderQuery.trim(),
|
||||||
workCenter: this.workCenterQuery.trim(),
|
workCenter: this.workCenterQuery.trim(),
|
||||||
goodsId: this.goodsIdQuery.trim(),
|
goodsId: this.goodsIdQuery.trim().split('\n').filter(id => id.trim() !== '').join(','),
|
||||||
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
lackStatus: this.lackStatusQuery == -99 ? null : this.lackStatusQuery,
|
||||||
workDate: timeFormatter(this.workDateQuery),
|
workDate: timeFormatter(this.workDateQuery),
|
||||||
workEndDate: timeFormatter(this.workEndDateQuery),
|
workEndDate: timeFormatter(this.workEndDateQuery),
|
||||||
|
|
@ -274,4 +274,33 @@ export default {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 专门为料号文本域添加样式 */
|
||||||
|
.goods-id-container {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-id-textarea {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-id-textarea :deep(.el-textarea__inner) {
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1.2;
|
||||||
|
padding: 5px;
|
||||||
|
height: 32px !important;
|
||||||
|
min-height: 32px !important;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 确保其他输入框保持一致的高度 */
|
||||||
|
.el-input {
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input :deep(.el-input__wrapper) {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user