Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2026-05-19 15:34:25 +08:00
2 changed files with 63 additions and 3 deletions

View File

@@ -462,3 +462,14 @@ export function getDeliveryOrderInfo(coilId) {
timeout: 600000,
})
}
/**
* 解除钢卷的锁定状态
*/
export function excludeLock(coilId) {
return request({
url: `/wms/materialCoil/unlock/${coilId}`,
method: 'put',
timeout: 600000,
})
}

View File

@@ -5,6 +5,8 @@
<el-radio-button label="missing">类型缺失</el-radio-button>
<el-radio-button label="rawMaterialMissing">原料类型缺失</el-radio-button>
<el-radio-button label="mismatch">匹配异常</el-radio-button>
<el-radio-button label="splitlock">分条锁定</el-radio-button>
<el-radio-button label="anneallock">退火锁定</el-radio-button>
</el-radio-group>
<el-button type="success" plain size="mini" icon="el-icon-refresh" @click="handleRefresh">刷新</el-button>
@@ -48,8 +50,10 @@
打印标签
</el-button>
<el-button size="mini" type="text" icon="el-icon-search" @click="handleTrace(scope.row)">追溯</el-button>
<el-button v-if="activeTab === 'mismatch'" size="mini" type="text" icon="el-icon-close"
<el-button :loading="buttonLoading" v-if="activeTab === 'mismatch'" size="mini" type="text" icon="el-icon-close"
@click="handleFixType(scope.row)">一键修复类型</el-button>
<el-button :loading="buttonLoading" v-if="activeTab === 'splitlock' || activeTab === 'anneallock'" size="mini" type="text" icon="el-icon-close"
@click="handleExcludeLock(scope.row)">解除锁定</el-button>
</template>
</el-table-column>
</KLPTable>
@@ -165,7 +169,7 @@
</template>
<script>
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple, listMismatchedItemCoil, fixMismatchedItemCoil, listMaterialCoil } from "@/api/wms/coil";
import { listTypeErrorCoil, getMaterialCoilTrace, getMaterialCoil, updateMaterialCoilSimple, listMismatchedItemCoil, fixMismatchedItemCoil, listMaterialCoil, excludeLock } from "@/api/wms/coil";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import ProductSelect from "@/components/KLPService/ProductSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
@@ -313,6 +317,10 @@ export default {
} else if (this.activeTab === 'rawMaterialMissing') {
// this.getListRawMaterialMissing();
this.getListRawMaterialMissing();
} else if (this.activeTab === 'splitlock') {
this.getListSplitlock();
} else if (this.activeTab === 'anneallock') {
this.getListAnneallock();
}
},
/** 查询类型不匹配的钢卷列表 */
@@ -342,6 +350,24 @@ export default {
this.loading = false;
});
},
// 查询分条锁定的钢卷列表
getListSplitlock() {
this.loading = true;
listMaterialCoil({ ...this.queryParams, exclusiveStatus: 1 }).then(response => {
this.materialCoilList = response.rows || [];
this.total = response.total || 0;
this.loading = false;
});
},
// 查询退火锁定的钢卷列表
getListAnneallock() {
this.loading = true;
listMaterialCoil({ ...this.queryParams, exclusiveStatus: 2 }).then(response => {
this.materialCoilList = response.rows || [];
this.total = response.total || 0;
this.loading = false;
});
},
/** 修复原料材质与钢卷类型不匹配的钢卷 */
handleFixType(row) {
this.buttonLoading = true;
@@ -505,6 +531,26 @@ export default {
};
this.resetForm("form");
},
// 解除钢卷的锁定状态
handleExcludeLock(row) {
this.$confirm('确认解除该钢卷的锁定状态吗?请先检查该钢卷是否有其他操作在进行中,否则可能会导致系统数据异常', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
this.buttonLoading = true;
excludeLock(row.coilId).then(res => {
this.buttonLoading = false;
this.$message({
message: '解除锁定成功',
type: 'success',
});
this.handleRefresh();
})
}).catch(() => {
// 取消操作
});
},
/** 提交表单 */
submitForm() {
this.$refs.form.validate((valid) => {
@@ -518,7 +564,10 @@ export default {
});
this.open = false;
this.getList();
})
}).catch(() => {
// 取消操作
this.buttonLoading = false;
});
} else {
return false;
}