fix: 修复钢卷管理相关页面问题和优化功能
- 修复钢卷历史页面控制显示问题 - 在交货报表中添加dataType参数 - 修改checkCoilNo接口支持coilId参数 - 优化镀锌报表查询逻辑,使用Promise.all并行请求 - 修复轧硬报表仓库ID错误问题 - 移除钢卷入库页面的只读限制 - 修复钢卷删除功能,支持删除带coilId的记录
This commit is contained in:
@@ -194,13 +194,14 @@ export function cancelExportCoil(coilId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检查入场钢卷号或当前钢卷号是否合法(是否存在)
|
// 检查入场钢卷号或当前钢卷号是否合法(是否存在)
|
||||||
export function checkCoilNo({ currentCoilNo, enterCoilNo }) {
|
export function checkCoilNo({ currentCoilNo, enterCoilNo, coilId }) {
|
||||||
return request({
|
return request({
|
||||||
url: '/wms/materialCoil/checkCoilNoDuplicate',
|
url: '/wms/materialCoil/checkCoilNoDuplicate',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
currentCoilNo,
|
currentCoilNo,
|
||||||
enterCoilNo
|
enterCoilNo,
|
||||||
|
coilId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,7 @@
|
|||||||
<el-row v-if="form.materialType === '成品'">
|
<el-row v-if="form.materialType === '成品'">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="质量状态" prop="qualityStatus">
|
<el-form-item label="质量状态" prop="qualityStatus">
|
||||||
<el-select v-model="form.qualityStatus" placeholder="请选择质量状态" style="width: 100%"
|
<el-select v-model="form.qualityStatus" placeholder="请选择质量状态" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<!-- <el-option label="A+" value="A+" />
|
<!-- <el-option label="A+" value="A+" />
|
||||||
<el-option label="A" value="A" />
|
<el-option label="A" value="A" />
|
||||||
<el-option label="A-" value="A-" />
|
<el-option label="A-" value="A-" />
|
||||||
@@ -79,8 +78,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="切边要求" prop="trimmingRequirement">
|
<el-form-item label="切边要求" prop="trimmingRequirement">
|
||||||
<el-select v-model="form.trimmingRequirement" placeholder="请选择切边要求" style="width: 100%"
|
<el-select v-model="form.trimmingRequirement" placeholder="请选择切边要求" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<el-option label="净边料" value="净边料" />
|
<el-option label="净边料" value="净边料" />
|
||||||
<el-option label="毛边料" value="毛边料" />
|
<el-option label="毛边料" value="毛边料" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -94,8 +92,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="包装要求" prop="packagingRequirement">
|
<el-form-item label="包装要求" prop="packagingRequirement">
|
||||||
<el-select v-model="form.packagingRequirement" placeholder="请选择包装要求" style="width: 100%"
|
<el-select v-model="form.packagingRequirement" placeholder="请选择包装要求" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<el-option label="裸包" value="裸包" />
|
<el-option label="裸包" value="裸包" />
|
||||||
<el-option label="普包" value="普包" />
|
<el-option label="普包" value="普包" />
|
||||||
<el-option label="简包" value="简包" />
|
<el-option label="简包" value="简包" />
|
||||||
@@ -204,7 +201,7 @@
|
|||||||
@click="openReceiptModal(scope.row)" v-loading="buttonLoading">签收</el-button>
|
@click="openReceiptModal(scope.row)" v-loading="buttonLoading">签收</el-button>
|
||||||
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
|
<el-button v-if="scope.row.actionStatus == 0 || scope.row.actionStatus == 1" type="danger"
|
||||||
@click="handleReject(scope.row)" v-loading="buttonLoading">拒签</el-button>
|
@click="handleReject(scope.row)" v-loading="buttonLoading">拒签</el-button>
|
||||||
<el-button v-if="scope.row.actionStatus == 3" type="warning" v-loading="buttonLoading"
|
<el-button type="warning" v-loading="buttonLoading"
|
||||||
@click="handleDelete(scope.row)">删除</el-button>
|
@click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -285,8 +282,7 @@
|
|||||||
<div v-else>请先选择材料类型</div>
|
<div v-else>请先选择材料类型</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="质量状态" prop="qualityStatus">
|
<el-form-item label="质量状态" prop="qualityStatus">
|
||||||
<el-select v-model="editCoil.form.qualityStatus" placeholder="请选择质量状态" style="width: 100%"
|
<el-select v-model="editCoil.form.qualityStatus" placeholder="请选择质量状态" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<!-- <el-option label="A+" value="A+" />
|
<!-- <el-option label="A+" value="A+" />
|
||||||
<el-option label="A" value="A" />
|
<el-option label="A" value="A" />
|
||||||
<el-option label="A-" value="A-" />
|
<el-option label="A-" value="A-" />
|
||||||
@@ -302,21 +298,19 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="切边要求" prop="trimmingRequirement">
|
<el-form-item label="切边要求" prop="trimmingRequirement">
|
||||||
<el-select v-model="editCoil.form.trimmingRequirement" placeholder="请选择切边要求" style="width: 100%"
|
<el-select v-model="editCoil.form.trimmingRequirement" placeholder="请选择切边要求" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<el-option label="净边料" value="净边料" />
|
<el-option label="净边料" value="净边料" />
|
||||||
<el-option label="毛边料" value="毛边料" />
|
<el-option label="毛边料" value="毛边料" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="打包状态" prop="packingStatus">
|
<el-form-item label="打包状态" prop="packingStatus">
|
||||||
<el-input v-model="editCoil.form.packingStatus" placeholder="请输入打包状态" :disabled="readonly">
|
<el-input v-model="editCoil.form.packingStatus" placeholder="请输入打包状态">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="包装要求" prop="packagingRequirement">
|
<el-form-item label="包装要求" prop="packagingRequirement">
|
||||||
<el-select v-model="editCoil.form.packagingRequirement" placeholder="请选择包装要求" style="width: 100%"
|
<el-select v-model="editCoil.form.packagingRequirement" placeholder="请选择包装要求" style="width: 100%">
|
||||||
:disabled="readonly">
|
|
||||||
<el-option label="裸包" value="裸包" />
|
<el-option label="裸包" value="裸包" />
|
||||||
<el-option label="普包" value="普包" />
|
<el-option label="普包" value="普包" />
|
||||||
<el-option label="简包" value="简包" />
|
<el-option label="简包" value="简包" />
|
||||||
@@ -344,7 +338,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getMaterialCoil, listMaterialCoil, updateMaterialCoilSimple, getMaxCoilNo, checkCoilNo } from '@/api/wms/coil'
|
import { getMaterialCoil, listMaterialCoil, updateMaterialCoilSimple, getMaxCoilNo, checkCoilNo, delMaterialCoil } from '@/api/wms/coil'
|
||||||
import { listPendingAction, delPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
|
import { listPendingAction, delPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
|
||||||
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||||
@@ -421,6 +415,11 @@ export default {
|
|||||||
// 远程校验,检查钢卷号是否存在
|
// 远程校验,检查钢卷号是否存在
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
|
if (this.form.coilId) {
|
||||||
|
// 新增时触发校验
|
||||||
|
console.log('新增时触发校验');
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
checkCoilNo({ enterCoilNo: value }).then(res => {
|
checkCoilNo({ enterCoilNo: value }).then(res => {
|
||||||
const { duplicateType } = res.data;
|
const { duplicateType } = res.data;
|
||||||
if (duplicateType === 'enter' || duplicateType === 'both') {
|
if (duplicateType === 'enter' || duplicateType === 'both') {
|
||||||
@@ -430,6 +429,7 @@ export default {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}, trigger: 'blur'
|
}, trigger: 'blur'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -698,12 +698,18 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
console.log(row.coilId)
|
||||||
this.$modal.confirm("确认删除吗?", "删除确认", {
|
this.$modal.confirm("确认删除吗?", "删除确认", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning"
|
type: "warning"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
|
if (row.coilId) {
|
||||||
|
delMaterialCoil(row.coilId).catch(err => {
|
||||||
|
this.$message.error(err.message || '删除钢卷失败')
|
||||||
|
})
|
||||||
|
}
|
||||||
delPendingAction(row.actionId).then(response => {
|
delPendingAction(row.actionId).then(response => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default {
|
|||||||
querys: {
|
querys: {
|
||||||
dataType: 0,
|
dataType: 0,
|
||||||
},
|
},
|
||||||
showControl: false,
|
showControl: true,
|
||||||
labelType: '2',
|
labelType: '2',
|
||||||
hideType: false
|
hideType: false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
status: 1,
|
status: 1,
|
||||||
|
dataType: 1,
|
||||||
byExportTimeStart: startTime,
|
byExportTimeStart: startTime,
|
||||||
byExportTimeEnd: endTime,
|
byExportTimeEnd: endTime,
|
||||||
selectType: 'product',
|
selectType: 'product',
|
||||||
|
|||||||
@@ -90,9 +90,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCoilWithIds } from "@/api/wms/coil";
|
import { listCoilWithIds } from "@/api/wms/coil";
|
||||||
import {
|
|
||||||
listPendingAction,
|
|
||||||
} from '@/api/wms/pendingAction';
|
|
||||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||||
@@ -175,16 +172,16 @@ export default {
|
|||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
dataType: 1,
|
// dataType: 1,
|
||||||
createBy: 'suanzhakuguan',
|
createBy: 'suanzhakuguan',
|
||||||
warehouseId: '1988150323162836993'
|
warehouseId: '1988150099140866050'
|
||||||
}),
|
}),
|
||||||
// 镀锌原料库
|
// 镀锌原料库
|
||||||
listCoilWithIds({
|
listCoilWithIds({
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
dataType: 1,
|
// dataType: 1,
|
||||||
selectType: 'raw_material',
|
selectType: 'raw_material',
|
||||||
createBy: 'suanzhakuguan',
|
createBy: 'suanzhakuguan',
|
||||||
warehouseId: '1988150263284953089'
|
warehouseId: '1988150263284953089'
|
||||||
@@ -194,7 +191,7 @@ export default {
|
|||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
dataType: 1,
|
// dataType: 1,
|
||||||
selectType: 'raw_material',
|
selectType: 'raw_material',
|
||||||
createBy: 'suanzhakuguan',
|
createBy: 'suanzhakuguan',
|
||||||
warehouseId: '1988150545175736322'
|
warehouseId: '1988150545175736322'
|
||||||
@@ -204,7 +201,7 @@ export default {
|
|||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
dataType: 1,
|
// dataType: 1,
|
||||||
selectType: 'raw_material',
|
selectType: 'raw_material',
|
||||||
createBy: 'suanzhakuguan',
|
createBy: 'suanzhakuguan',
|
||||||
warehouseId: '1988150150521090049'
|
warehouseId: '1988150150521090049'
|
||||||
|
|||||||
@@ -166,15 +166,30 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
// 镀锌原料库,镀锌纵剪分条原料库
|
Promise.all([
|
||||||
|
// 镀锌成品库
|
||||||
listCoilWithIds({
|
listCoilWithIds({
|
||||||
...this.queryParams,
|
...this.queryParams,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
dataType: 1,
|
// dataType: 1,
|
||||||
warehouseIds: '1988150263284953089,1988150487185289217'
|
selectType: 'product',
|
||||||
}).then(res => {
|
// createBy: 'suanzhakuguan',
|
||||||
const list = [...res.rows];
|
warehouseId: '1988150323162836993'
|
||||||
|
}),
|
||||||
|
// 镀锌纵剪分条原料库
|
||||||
|
listCoilWithIds({
|
||||||
|
...this.queryParams,
|
||||||
|
pageSize: 9999,
|
||||||
|
pageNum: 1,
|
||||||
|
// dataType: 1,
|
||||||
|
selectType: 'raw_material',
|
||||||
|
// createBy: 'suanzhakuguan',
|
||||||
|
warehouseId: '1988150487185289217'
|
||||||
|
}),
|
||||||
|
]).then(([res1, res2]) => {
|
||||||
|
console.log(res1, res2)
|
||||||
|
const list = [...res1.rows, ...res2.rows]
|
||||||
// 按照createTime 降序排序
|
// 按照createTime 降序排序
|
||||||
this.list = list.sort(
|
this.list = list.sort(
|
||||||
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
||||||
|
|||||||
Reference in New Issue
Block a user