现场问题修改..................

This commit is contained in:
liuhanqing
2026-03-19 08:46:24 +08:00
parent de868075e9
commit 7638eedd1b
24 changed files with 379 additions and 116 deletions

View File

@@ -44,21 +44,6 @@
placeholder="请选择结束日期">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="仓库" prop="warehouseId">&lt;!&ndash;仓库&ndash;&gt;-->
<!-- <el-select-->
<!-- v-model="queryParams.warehouseId"-->
<!-- placeholder="请选择仓库"-->
<!-- clearable-->
<!-- @change="handleQuery"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in warehouseOptions"-->
<!-- :key="item.warehouseId"-->
<!-- :label="item.warehouseName"-->
<!-- :value="item.warehouseId"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -96,6 +81,16 @@
@click="openEditTrayDialog"
>修改托盘码</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="openEditDeptDialog"
>修改部门</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -141,35 +136,6 @@
<el-table-column label="任务ID" align="left" prop="jobId" width="160" />
<el-table-column label="单据ID" align="left" prop="inOrOutId" width="160" />
<el-table-column label="子单据ID" align="left" prop="inOrOutDId" width="160" />
<!-- <el-table-column label="来源" align="left" prop="spare1" >&lt;!&ndash;来源&ndash;&gt;
<template slot-scope="scope">
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>
</template>
</el-table-column>
<el-table-column label="状态" align="left" prop="spare2" >&lt;!&ndash;用途&ndash;&gt;
<template slot-scope="scope">
<dict-tag :options="dict.type.turnover_type" :value="scope.row.spare2"/>
</template>
</el-table-column>
<el-table-column label="套账" align="left" prop="spare3" >&lt;!&ndash;用途&ndash;&gt;
<template slot-scope="scope">
<dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>
</template>
</el-table-column>
<el-table-column label="用途" align="left" prop="spare4" >&lt;!&ndash;用途&ndash;&gt;
<template slot-scope="scope">
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare4"/>
</template>
</el-table-column>-->
<!-- <el-table-column label="批号" align="left" prop="lotNo" />-->
<!-- <el-table-column label="生产图号" align="left" prop="cargoNo" width="160"/>-->
<!-- <el-table-column label="单价" align="left" prop="printDate" />-->
<!-- <el-table-column label="质量等级" align="left" prop="spare8" >&lt;!&ndash;用途&ndash;&gt;
<template slot-scope="scope">
<dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>
</template>
</el-table-column>-->
<el-table-column label="合同号" align="left" prop="spare6" />
<el-table-column label="产品号" align="left" prop="spare7" />
<el-table-column label="代号" align="left" prop="spare9" />
@@ -207,6 +173,28 @@
</div>
</el-dialog>
<el-dialog :title="deptTitle" :visible.sync="deptOpen" width="400px" append-to-body>
<el-form ref="deptForm" :model="deptForm" :rules="deptRules" label-width="80px">
<el-form-item label="任务ID">
<el-input v-model="deptForm.jobId" disabled />
</el-form-item>
<el-form-item label="部门" prop="departmentId">
<el-select v-model="deptForm.departmentId" placeholder="请选择部门">
<el-option
v-for="dict in getDeptDictOptions(deptForm)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDeptForm">确 定</el-button>
<el-button @click="cancelDept">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -218,7 +206,7 @@ import {listWarehouse} from "@/api/bas/warehouse";
export default {
name: "MydoJob",
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type','sl_dept','el_dept'],
data() {
return {
// 遮罩层
@@ -295,6 +283,15 @@ export default {
{ required: true, message: "托盘码不能为空", trigger: "blur" }
]
},
// 部门修改弹窗
deptOpen: false,
deptTitle: "",
deptForm: {},
deptRules: {
departmentId: [
{ required: true, message: "部门不能为空", trigger: "change" }
]
},
}
},
created() {
@@ -312,6 +309,16 @@ export default {
}
});
},
getDeptDictOptions(row) {
const wid = String(row && row.warehouseId != null ? row.warehouseId : "").padStart(2, "0")
if (wid === "01" ) {
return this.dict.type.sl_dept || []
}
if (wid === "02" || wid === "03") {
return this.dict.type.el_dept || []
}
return this.dict.type.sl_dept || []
},
/** 查询任务表列表 */
getList() {
this.loading = true
@@ -466,6 +473,62 @@ export default {
...this.queryParams
}, `mydoJob_${new Date().getTime()}.xlsx`)
},
openEditDeptDialog() {
if (this.ids.length === 0) {
this.$modal.msgError("请选择要修改的任务");
return;
}
if (this.ids.length > 1) {
this.$modal.msgError("一次只能修改一条任务");
return;
}
const jobId = this.ids[0];
const row = this.mydoJobList.find(item => item.jobId === jobId);
if (!row) {
this.$modal.msgError("未找到选中任务数据");
return;
}
if (row.status !== '1') {
this.$modal.msgError("只能修改未执行的任务");
return;
}
this.deptForm = {
jobId: row.jobId,
departmentId: row.departmentId,
warehouseId: row.warehouseId
};
this.deptTitle = "修改任务部门";
this.deptOpen = true;
},
cancelDept() {
this.deptOpen = false;
this.resetDeptForm();
},
resetDeptForm() {
this.deptForm = {
jobId: null,
departmentId: null,
warehouseId: null
};
this.resetForm("deptForm");
},
submitDeptForm() {
this.$refs["deptForm"].validate(valid => {
if (!valid) {
return;
}
const row = this.mydoJobList.find(item => item.jobId === this.deptForm.jobId);
// 构造更新对象,只包含需要更新的字段和主键,或者根据后端要求传全量
// 这里为了安全起见,我们拷贝原对象并覆盖 departmentId
const updatedRow = Object.assign({}, row, { departmentId: this.deptForm.departmentId });
updateMydoJob(updatedRow).then(() => {
this.$modal.msgSuccess("修改成功");
this.deptOpen = false;
this.getList();
});
});
},
/** 行点击事件处理 */
handleRowClick(row) {
// 设置当前选中行

View File

@@ -136,7 +136,7 @@
<!-- <el-table-column :label="$t('outJobManagement.customerId')" align="left" prop="customerId" /> &lt;!&ndash; 客户ID &ndash;&gt;-->
<el-table-column label="托盘码" align="left" prop="trayCode" /> <!-- 托盘码 -->
<el-table-column label="巷道" align="left" prop="roadwayId" /> <!-- 巷道ID -->
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="120"/> <!-- 货位ID -->
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140"/> <!-- 货位ID -->
<!-- <el-table-column label="订单号" align="left" prop="lineId" /> &lt;!&ndash; 结束时间 &ndash;&gt;-->
<el-table-column label="优先级" align="left" prop="priority" /> <!-- 优先级 -->
<el-table-column label="执行阶段" align="left" prop="executionPhase"> <!-- 执行阶段 -->

View File

@@ -4,7 +4,7 @@
<el-form :model="queryParams" ref="queryForm" :inline="true">
<!-- 仓库 -->
<el-form-item label="仓库" prop="warehouseId">
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" @change="handleWarehouseChange">
<el-select v-model="queryParams.warehouseId" placeholder="请选择仓库" @change="handleWarehouseChange">
<el-option
v-for="dict in warehouseOptions"
:key="dict.warehouseId"
@@ -36,9 +36,8 @@
<script>
import * as echarts from 'echarts'
import {getRoadways, getPlatoons, getChartData, getChartMag} from "@/api/kpi/spacePlan"
import {getChartData, getChartMag, getPlatoons, getRoadways} from "@/api/kpi/spacePlan"
import {listWarehouse} from "@/api/bas/warehouse";
import VueI18n from 'vue-i18n';
export default {
name: 'SpacePlan',
@@ -46,10 +45,10 @@ export default {
return {
// 查询参数
queryParams: {
warehouseId: '01',
roadwayId: '1',
warehouseId: '',
roadwayId: '',
thePlatoon: '',
platoon: '1',
platoon: '',
specifications: '',
quantity_x: '',
quantity_j: '',
@@ -86,17 +85,17 @@ export default {
outCargo: [],
theLocked: []
},
queryWarehouseParam:{
queryWarehouseParam: {
pageNum: 1,
pageSize: 99,
typeData:[1]
typeData: [1]
}
}
},
mounted() {
this.getWarehouseList()
this.getWarehouseList()
this.initCharts()
this.handleWarehouseChange()
//this.handleWarehouseChange()
},
methods: {
/** 查询仓库列表 */
@@ -104,8 +103,17 @@ this.getWarehouseList()
listWarehouse(this.queryWarehouseParam).then(response => {
this.warehouseOptions = response.rows;
this.queryParams.warehouseId = response.rows[0].warehouseId
// 获取巷道列表
getRoadways(this.queryParams).then(response => {
const roadways = response.data.data
if (roadways && roadways.length > 0) {
this.roadwayOptions = roadways
this.queryParams.roadwayId = roadways[0].value
this.handleRoadwayChange()
}
})
});
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
},
// 初始化图表
initCharts() {
@@ -215,32 +223,32 @@ this.getWarehouseList()
{
// 图例:空位
name: '空位',
itemStyle: { color: '#AEEEEE' }
itemStyle: {color: '#AEEEEE'}
},
{
// 图例:满位
name: '满位',
itemStyle: { color: '#FF9900' }
itemStyle: {color: '#FF9900'}
},
{
// 图例:入库分配
name: '入库分配',
itemStyle: { color: '#FFFF00' }
itemStyle: {color: '#FFFF00'}
},
{
// 图例:出库分配
name: '出库分配',
itemStyle: { color: '#FF0000' }
itemStyle: {color: '#FF0000'}
},
{
// 图例:入库需盘点
name: '入库需盘点',
itemStyle: { color: '#FF0000' }
itemStyle: {color: '#FF0000'}
},
{
// 图例:出库需盘点
name: '出库需盘点',
itemStyle: { color: '#0000FF' }
itemStyle: {color: '#0000FF'}
}
],
textStyle: {
@@ -326,10 +334,9 @@ this.getWarehouseList()
formatTooltip(params) {
if (params.seriesName !== '满位') {
// 排
if (this.$i18n.locale ==='zh-cn') {
if (this.$i18n.locale === 'zh-cn') {
return params.seriesName + '<br>排' + this.queryParams.thePlatoon + '列' + (params.data[0] + 1) + '层' + (params.data[1] + 1);
}
else{
} else {
return params.seriesName + '<br>' + this.queryParams.thePlatoon + '排 ' + (params.data[0] + 1) + '列 ' + (params.data[1] + 1) + '层';
}
@@ -371,8 +378,8 @@ this.getWarehouseList()
tooltip: {
formatter: (p) => {
if (p.seriesName === params.seriesName &&
p.data[0] === params.data[0] &&
p.data[1] === params.data[1]) {
p.data[0] === params.data[0] &&
p.data[1] === params.data[1]) {
return str;
}
return this.formatTooltip(p);

View File

@@ -112,6 +112,8 @@
</template>
</el-table-column>
<el-table-column label="托盘条码" align="center" prop="trayCode" width="100" />
<el-table-column label="部门" align="center" prop="deptName" width="100" />
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="140" />
<el-table-column label="合同号" align="center" prop="contract" />
<el-table-column label="产品号" align="center" prop="cases" />
<el-table-column label="代号" align="center" prop="managementNo" />

View File

@@ -168,6 +168,14 @@
/>
</el-select>
</el-form-item>-->
<el-form-item label="部门" prop="deptName">
<el-input
v-model="queryParams.deptName"
placeholder="请输入部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="起始时间" prop="inDateStart">
<el-date-picker clearable
v-model="queryParams.inDateStart"
@@ -225,14 +233,7 @@
</el-select>
</el-form-item>-->
<!-- <el-form-item label="库外" prop="outside">
<el-input
v-model="queryParams.outside"
placeholder="请输入库外"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item>
@@ -310,6 +311,8 @@
<el-table-column label="物料名称" align="center" prop="productName" width="160" />
<el-table-column label="规格" align="center" prop="spec" width="160"/>
<el-table-column label="数量" align="center" prop="quantity"/>
<el-table-column label="部门" align="center" prop="deptName" width="120"/>
<!-- <el-table-column label="单价" align="center" prop="price"/>-->
<!-- <el-table-column label="金额" align="center" prop="spare6"/>-->
<!-- <el-table-column label="物料状态" align="center" prop="productType">

View File

@@ -89,14 +89,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="规格型号" prop="spec">
<el-form-item label="部门" prop="deptName">
<el-input
v-model="queryParams.spec"
placeholder="请输入规格型号"
v-model="queryParams.deptName"
placeholder="请输入部门"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button><!-- 搜索 -->
@@ -115,7 +115,7 @@
>
<el-table-column label="仓库名称" align="center" prop="warehouseName"/>
<!-- <el-table-column label="库存编码" align="center" prop="stockId" width="160"/>-->
<el-table-column label="库位" align="center" prop="cargoSpaceId" />
<el-table-column label="库位" align="center" prop="cargoSpaceName" />
<el-table-column label="托盘" align="center" prop="trayCode"/>
<el-table-column label="巷道" align="center" prop="roadwayId"/>
<el-table-column label="排" align="center" prop="thePlatoon"/>

View File

@@ -66,6 +66,20 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="托盘列表" prop="trayCodeList">
<el-select
v-model="queryParams.trayCodeList"
multiple
filterable
allow-create
default-first-option
placeholder="输入条码后回车"
style="width: 240px"
@change="handleQuery"
>
<el-option v-for="item in []" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="物料名称" prop="productName"><!-- 物料描述 -->
<el-input
v-model="queryParams.productName"
@@ -81,7 +95,7 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@@ -89,7 +103,17 @@
size="mini"
@click="pointOut"
v-hasPermi="['job:outmydoJob:pointOut']"
>指定货位出库 <!-- 指定货位出库 --></el-button>
>指定货位出库</el-button>
</el-col>-->
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-download"
size="mini"
@click="handleNormalOut"
v-hasPermi="['job:outmydoJob:pointOut']"
>出来看看</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@@ -97,9 +121,19 @@
plain
icon="el-icon-download"
size="mini"
@click="pointOut1"
v-hasPermi="['job:outmydoJob:pointOut']"
>出来看看 <!-- 指定货位出库 --></el-button>
@click="handleSouthOut"
v-hasPermi="['job:outmydoJob:pointOut1']"
>出库端出库</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-download"
size="mini"
@click="handleNorthOut"
v-hasPermi="['job:outmydoJob:pointOut2']"
>入库端出库</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -112,7 +146,7 @@
</template>
</el-table-column>
<el-table-column label="库存编码" align="center" prop="stockId" width="140"/>
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="120"/>
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" width="140"/>
<el-table-column label="巷道" align="center" prop="roadwayId" width="80"/>
<el-table-column label="排" align="center" prop="thePlatoon" />
<el-table-column label="列" align="center" prop="theColumn" />
@@ -268,6 +302,7 @@ export default {
quantity: null,
jobId: null,
trayCode: null,
trayCodeList: [],
outQuantity: null,
stockinDetailId: null,
stockinId: null,
@@ -319,8 +354,9 @@ export default {
}
},
created() {
this.getList()
this.getWarehouseList();
//this.getList()
//this.getWarehouseList();
this.loading = false
},
methods: {
/** 获取仓库列表 */
@@ -332,11 +368,12 @@ export default {
/** 查询库存信息列表 */
getList() {
this.loading = true
listManagement(this.queryParams).then(response => {
this.managementList = response.rows
this.total = response.total
this.loading = false
})
// 直接传递 queryParams,axios 会将 trayCodeList 数组正确序列化
listManagement(this.queryParams).then(response => {
this.managementList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
@@ -382,7 +419,10 @@ export default {
resetQuery() {
this.resetForm("queryForm")
this.queryParams.inDate = null
this.handleQuery()
this.queryParams.trayCodeList = []
this.managementList = []
this.total = 0
//this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
@@ -436,14 +476,34 @@ export default {
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 出库端出库按钮操作 */
handleSouthOut() {
if (this.ids.length === 0) {
this.$modal.msgError("请至少选择一行数据");
return;
}
this.doPointOut('2', '2'); // 出库端出库 exitId: '2', type: '2'
},
/*二联合出库按钮*/
handleNormalOut() {
if (this.ids.length === 0) {
this.$modal.msgError("请至少选择一行数据");
return;
}
this.doPointOut('1', '2');
},
/** 入库端出库按钮操作 */
handleNorthOut() {
if (this.ids.length === 0) {
this.$modal.msgError("请至少选择一行数据");
return;
}
this.doPointOut('1', '2'); // 入库端出库 exitId: '1', type: '2'
},
/** 指定货位出库按钮操作 */
pointOut() {
this.handlePointOutOperation('1');
},
/** 出来看看按钮操作 */
pointOut1() {
this.handlePointOutOperation('2');
},
handlePointOutOperation(type) {
this.currentOperationType = type;