Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -96,3 +96,14 @@ export function unbindAnnealPlanCoil(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新钢卷绑定信息
|
||||||
|
*/
|
||||||
|
export function updateAnnealPlanCoil(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/furnacePlanCoil',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
<div class="material-sub">入场:{{ item.enterCoilNo || '-' }}</div>
|
<div class="material-sub">入场:{{ item.enterCoilNo || '-' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" size="mini" @click="handleAddToPlan(item)"
|
<el-button type="primary" size="mini" @click="handleAddToPlan(item)"
|
||||||
:disabled="!currentPlan.planId || currentPlan.status !== 0">加入计划</el-button>
|
:disabled="!currentPlan.planId">加入计划</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="material-body">
|
<div class="material-body">
|
||||||
<div class="material-row">厂家:{{ item.supplierCoilNo || '-' }}</div>
|
<div class="material-row">厂家:{{ item.supplierCoilNo || '-' }}</div>
|
||||||
@@ -154,14 +154,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-table :data="coilList" v-loading="coilLoading" class="light-table">
|
<el-table :data="coilList" v-loading="coilLoading" class="light-table">
|
||||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" />
|
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
|
<el-date-picker style="width: 185px" v-model="scope.row.createTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择创建时间" @change="handlePLanCoilChange(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实际库位" align="center" width="220">
|
<el-table-column label="钢卷去向" align="center" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.actualWarehouseName || '-' }}</span>
|
<WarehouseSelect v-model="scope.row.logicWarehouseId" @change="handlePLanCoilChange(scope.row)"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="钢卷层级" align="center" width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="scope.row.furnaceLevel" placeholder="请输入钢卷层级" @change="handlePLanCoilChange(scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
@@ -244,7 +250,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listAnnealPlan, getAnnealPlan, addAnnealPlan, updateAnnealPlan, delAnnealPlan, changeAnnealPlanStatus, inFurnace, completeAnnealPlan, listAnnealPlanCoils, bindAnnealPlanCoils, unbindAnnealPlanCoil } from "@/api/wms/annealPlan";
|
import { listAnnealPlan, updateAnnealPlanCoil, getAnnealPlan, addAnnealPlan, updateAnnealPlan, delAnnealPlan, changeAnnealPlanStatus, inFurnace, completeAnnealPlan, listAnnealPlanCoils, bindAnnealPlanCoils, unbindAnnealPlanCoil } from "@/api/wms/annealPlan";
|
||||||
import { listAnnealFurnace } from "@/api/wms/annealFurnace";
|
import { listAnnealFurnace } from "@/api/wms/annealFurnace";
|
||||||
import { listMaterialCoil } from "@/api/wms/coil";
|
import { listMaterialCoil } from "@/api/wms/coil";
|
||||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||||
@@ -328,6 +334,13 @@ export default {
|
|||||||
this.currentPlan = row;
|
this.currentPlan = row;
|
||||||
this.loadPlanCoils();
|
this.loadPlanCoils();
|
||||||
},
|
},
|
||||||
|
handlePLanCoilChange(row) {
|
||||||
|
updateAnnealPlanCoil(row).then(() => {
|
||||||
|
this.$message.success('已更新');
|
||||||
|
}).finally(() => {
|
||||||
|
this.loadPlanCoils();
|
||||||
|
});
|
||||||
|
},
|
||||||
getMaterialCoils() {
|
getMaterialCoils() {
|
||||||
this.materialLoading = true;
|
this.materialLoading = true;
|
||||||
listMaterialCoil(this.materialQueryParams).then(response => {
|
listMaterialCoil(this.materialQueryParams).then(response => {
|
||||||
@@ -361,7 +374,7 @@ export default {
|
|||||||
this.completeCoils = (response.data || []).map(item => ({
|
this.completeCoils = (response.data || []).map(item => ({
|
||||||
coilId: item.coilId,
|
coilId: item.coilId,
|
||||||
enterCoilNo: item.enterCoilNo,
|
enterCoilNo: item.enterCoilNo,
|
||||||
actualWarehouseId: item.actualWarehouseId || null
|
warehouseId: item.logicWarehouseId || null
|
||||||
}));
|
}));
|
||||||
this.completeLoading = false;
|
this.completeLoading = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@@ -395,7 +408,8 @@ export default {
|
|||||||
}
|
}
|
||||||
this.coilLoading = true;
|
this.coilLoading = true;
|
||||||
listAnnealPlanCoils(this.currentPlan.planId).then(response => {
|
listAnnealPlanCoils(this.currentPlan.planId).then(response => {
|
||||||
this.coilList = response.data || [];
|
// 按照层级排序,数字大的考前
|
||||||
|
this.coilList = response.data.sort((a, b) => b.furnaceLevel - a.furnaceLevel) || [];
|
||||||
this.coilLoading = false;
|
this.coilLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -526,9 +540,9 @@ export default {
|
|||||||
submitComplete() {
|
submitComplete() {
|
||||||
const locations = (this.completeCoils || []).map(item => ({
|
const locations = (this.completeCoils || []).map(item => ({
|
||||||
coilId: item.coilId,
|
coilId: item.coilId,
|
||||||
actualWarehouseId: item.actualWarehouseId
|
warehouseId: item.warehouseId
|
||||||
}));
|
}));
|
||||||
const missing = locations.filter(item => !item.actualWarehouseId);
|
const missing = locations.filter(item => !item.warehouseId);
|
||||||
if (missing.length > 0) {
|
if (missing.length > 0) {
|
||||||
this.$message.warning('请先为所有钢卷分配实际库位');
|
this.$message.warning('请先为所有钢卷分配实际库位');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user