fix(wms): 修正合卷操作状态查询参数并添加绑定钢卷列表功能

将actionStatus从0改为-1以正确查询不为2的记录
添加listBoundCoil接口用于查询已绑定发货的钢卷列表
在基础面板中显示单据状态标签并优化仓库查询逻辑
This commit is contained in:
砂糖
2026-03-05 11:15:34 +08:00
parent ffc42d110a
commit 15e59c10da
4 changed files with 33 additions and 12 deletions

View File

@@ -50,4 +50,13 @@ export function batchAddDeliveryWaybillDetail(data) {
method: 'post',
data: data
})
}
// 查询已绑定发货的钢卷列表
export function listBoundCoil(query) {
return request({
url: '/wms/deliveryWaybillDetail/boundCoilList',
method: 'get',
params: query
})
}

View File

@@ -309,7 +309,7 @@ export default {
if (!value) {
this.queryParams.actionStatus = null;
} else {
this.queryParams.actionStatus = 0;
this.queryParams.actionStatus = '-1';
}
this.getList()
},

View File

@@ -447,7 +447,7 @@ export default {
// 分别查询待处理和处理中的记录
const responses = await listPendingAction({
actionType: 200, // 合卷操作
actionStatus: 0, // 只要传递了actionStatus就会查询不为2的
actionStatus: '-1', // -1表示只查询不为2的记录
pageNum: 1,
pageSize: 1000
});

View File

@@ -138,7 +138,7 @@
<span v-else></span>
</template>
</el-table-column>
<el-table-column v-if="showGrade" label="质量状态" align="center" prop="qualityStatus">
<template slot-scope="scope">
<el-select v-model="scope.row.qualityStatus" placeholder="请选择质量状态" @change="handleGradeChange(scope.row)">
@@ -149,7 +149,8 @@
</el-table-column>
<el-table-column label="逻辑库位" align="center" prop="warehouseId" v-if="editWarehouse">
<template slot-scope="scope">
<warehouse-select @change="handleWarehouseChange(scope.row)" v-model="scope.row.warehouseId" placeholder="请选择仓库/库区/库位" style="width: 100%;" clearable />
<warehouse-select @change="handleWarehouseChange(scope.row)" v-model="scope.row.warehouseId"
placeholder="请选择仓库/库区/库位" style="width: 100%;" clearable />
</template>
</el-table-column>
@@ -187,6 +188,13 @@
<el-descriptions-item label="负责人">
{{ scope.row.bindPrincipal || '-' }}
</el-descriptions-item>
<el-descriptions-item label="单据状态">
<el-tag v-if="scope.row.bindWaybillStatus === 0" type="info" size="mini">未发货</el-tag>
<el-tag v-else-if="scope.row.bindWaybillStatus === 1" type="info" size="mini">已发货</el-tag>
<el-tag v-else-if="scope.row.bindWaybillStatus === 2" type="info" size="mini">未打印</el-tag>
<el-tag v-else-if="scope.row.bindWaybillStatus === 3" type="info" size="mini">已打印</el-tag>
<el-tag v-else type="danger" size="mini">未知状态</el-tag>
</el-descriptions-item>
</el-descriptions>
</div>
<div slot="reference" class="text-ellipsis" v-text>{{ scope.row.bindLicensePlate || '-' }}</div>
@@ -217,7 +225,7 @@
@click="handleCancelExport(scope.row)">
撤回发货
</el-button>
<el-button size="mini" v-if="showExportTime" type="text" icon="el-icon-sold-out"
<el-button size="mini" v-if="showExportTime" type="text" icon="el-icon-sold-out"
@click="handleReturnCoil(scope.row)">
退货钢卷
</el-button>
@@ -375,6 +383,7 @@ import {
checkCoilNo,
returnCoil
} from "@/api/wms/coil";
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import QRCode from "../../print/components/QRCode.vue";
import * as XLSX from 'xlsx'
@@ -727,7 +736,7 @@ export default {
}
},
/** 查询钢卷物料列表 */
getList() {
async getList() {
this.loading = true;
const { updateTime, ...query } = {
...this.queryParams,
@@ -736,13 +745,16 @@ export default {
}
// 如果没有设置itemType则设置为raw_material
query.selectType = this.querys.materialType === '原料' ? 'raw_material' : 'product';
if (this.showWaybill) {
listBoundCoil(query).then(res => {
this.materialCoilList = res.rows || [];
this.total = res.total;
this.loading = false;
})
return;
}
listMaterialCoil(query).then(response => {
if (this.querys.warehouseId != 111) {
// 排除掉111仓库的
this.materialCoilList = response.rows.filter(item => item.warehouseId != 111)
} else {
this.materialCoilList = response.rows;
}
this.materialCoilList = response.rows
this.total = response.total;
this.loading = false;
});