|
@@ -26,17 +26,7 @@
|
|
|
<a-select style="width: 120px" :options="shortSizeOptions" @change="changeShortLength" />
|
|
|
</div>
|
|
|
<div style="margin-right: 6px">
|
|
|
- <a-button
|
|
|
- type="primary"
|
|
|
- @click="
|
|
|
- () => {
|
|
|
- stop();
|
|
|
- reload();
|
|
|
- }
|
|
|
- "
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </a-button>
|
|
|
+ <a-button type="primary" @click="() => refresh()"> 刷新 </a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -155,6 +145,78 @@
|
|
|
</div>
|
|
|
<!-- 打印 -->
|
|
|
<rollLinePrint @register="registerPrintModal" />
|
|
|
+ <!-- 炉次调根数 -->
|
|
|
+ <a-modal
|
|
|
+ v-model:open="openLuciModal"
|
|
|
+ :title="`调整炉次支数【${adjustCurHeat.heatNo}】`"
|
|
|
+ centered
|
|
|
+ width="1400px"
|
|
|
+ ok-text="确认"
|
|
|
+ :okButtonProps="{ loading: okLoading }"
|
|
|
+ cancel-text="取消"
|
|
|
+ @ok="confirmChangeHeat"
|
|
|
+ @cancel="
|
|
|
+ () => {
|
|
|
+ openLuciModal = false;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="flex flex-col justify-center items-center change-heat" style="margin: 20px 0">
|
|
|
+ <div style="width: 100%; padding: 0 20px">
|
|
|
+ <a-radio-group button-style="solid" size="large">
|
|
|
+ <a-radio-button disabled>{{ adjustCurHeat.heatNo }}</a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <BasicTable @register="registerShiftTableTable" :dataSource="[adjustCurHeat]" />
|
|
|
+ <div style="width: 100%; padding: 10px 20px 0">
|
|
|
+ <span style="padding: 0; color: #f50">调拨至:</span>
|
|
|
+ <a-radio-group v-model:value="adjustHeatNo" button-style="solid" @change="changeHeatNum" size="large">
|
|
|
+ <template v-for="item in currentShiftTableData">
|
|
|
+ <a-radio-button :value="item.heatNo" v-if="item.heatNo !== adjustCurHeat.heatNo">{{ item.heatNo }}</a-radio-button>
|
|
|
+ </template>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ <BasicTable style="min-height: 160px" @register="registerShiftTableTable" :dataSource="[{ ...adjustSelectedHeat, columnIndex: '' }]" />
|
|
|
+ <div class="flex items-center justify-end" style="width: 100%; margin-bottom: 20px; padding-right: 30px">
|
|
|
+ <div style="width: 72px">棒一:</div>
|
|
|
+ <div style="width: 100px">
|
|
|
+ <a-switch v-model:checked="isGotoRollOne" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="flex items-center justify-end" style="width: 100%; margin-bottom: 20px; padding-right: 30px">
|
|
|
+ <div style="width: 72px">调整支数:</div>
|
|
|
+ <div style="width: 100px">
|
|
|
+ <a-input-number size="large" v-if="isGotoRollOne" :defaultValue="1" :step="1" v-model:value="adjustHeatNum" :min="1" />
|
|
|
+ <a-input-number size="large" v-else :defaultValue="4" :step="4" v-model:value="adjustHeatNum" :min="4" @change="handleChangeNum" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <!-- 热装堆垛选择定尺 -->
|
|
|
+ <a-modal
|
|
|
+ v-model:open="openHotSelectedModal"
|
|
|
+ title="选择定尺"
|
|
|
+ centered
|
|
|
+ width="400px"
|
|
|
+ ok-text="确认"
|
|
|
+ :okButtonProps="{ loading: okLoading }"
|
|
|
+ cancel-text="取消"
|
|
|
+ @ok="() => (opType === 'hot' ? doHotCharge(opRecord) : doStack(opRecord))"
|
|
|
+ @cancel="
|
|
|
+ () => {
|
|
|
+ openHotSelectedModal = false;
|
|
|
+ selectedSize = undefined;
|
|
|
+ opRecord = null;
|
|
|
+ opType = '';
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div class="flex justify-center items-center" style="margin: 20px 0">
|
|
|
+ <div>选择定尺:</div>
|
|
|
+ <a-select v-model:value="selectedSize" placeholder="请选择" allowClear style="width: 277px" :options="selectedSizeOptions"></a-select>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" name="billetLiftingBill" setup>
|
|
@@ -171,6 +233,7 @@
|
|
|
addHeatBillet,
|
|
|
queryChangeShortLength,
|
|
|
addRollOneBilletBasic,
|
|
|
+ adjustHeatBillet,
|
|
|
} from '../operator.api';
|
|
|
import { h, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
|
import { mapTableTotalSummary } from '/@/utils/common/compUtils';
|
|
@@ -245,6 +308,9 @@
|
|
|
const isAllHeat = ref<boolean>(false); // 是否是整炉添加
|
|
|
const isRollOne = ref<string>('default'); // 是否是去棒一,不是整炉添加时有效
|
|
|
const cuttolengthStatus = ref<string | number>(props.cuttolength); // 1 手动定尺 2 自动定尺
|
|
|
+
|
|
|
+ // 调整炉次支数
|
|
|
+ const openLuciModal = ref(false);
|
|
|
const columns = getColumns({
|
|
|
clickCb: ({ record, size, strandNo }) => {
|
|
|
newSizeNum.value = size;
|
|
@@ -329,8 +395,82 @@
|
|
|
}
|
|
|
isRollOne.value = 'default';
|
|
|
},
|
|
|
+ heatNoClick: (record) => {
|
|
|
+ openLuciModal.value = true;
|
|
|
+ adjustCurHeat.value = record;
|
|
|
+ adjustHeatNo.value = '';
|
|
|
+ adjustHeatNum.value = 4;
|
|
|
+ isGotoRollOne.value = false;
|
|
|
+ adjustSelectedHeat.value = {};
|
|
|
+ okLoading.value = false;
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
+ // 调整炉次支数
|
|
|
+ const adjustCurHeat = ref({});
|
|
|
+ const adjustHeatNo = ref('');
|
|
|
+ const adjustSelectedHeat = ref<any>({});
|
|
|
+ const isGotoRollOne = ref(false); // 是否去棒一
|
|
|
+ const adjustHeatNum = ref(); // 需要调整的支数
|
|
|
+ const confirmChangeHeat = async () => {
|
|
|
+ try {
|
|
|
+ if (!adjustSelectedHeat.value.heatNo) {
|
|
|
+ createMessage.error('请选择要调整的炉次!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!adjustHeatNum.value) {
|
|
|
+ createMessage.error('请输入要调整的支数!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!isGotoRollOne.value && adjustHeatNum.value % 4 !== 0) {
|
|
|
+ createMessage.error('调整支数请输入4的倍数!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const { totalInfo } = adjustSelectedHeat.value;
|
|
|
+ if (totalInfo) {
|
|
|
+ const obj = JSON.parse(totalInfo);
|
|
|
+ if (obj.totalCount < adjustHeatNum.value) {
|
|
|
+ createMessage.error('支数不能大于总支数!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const params = {
|
|
|
+ ccmNo: props.ccmNo,
|
|
|
+ originalHeatNo: adjustCurHeat.value.heatNo,
|
|
|
+ changeHeatNo: adjustSelectedHeat.value.heatNo,
|
|
|
+ number: adjustHeatNum.value,
|
|
|
+ changeType: isGotoRollOne.value ? 1 : 2,
|
|
|
+ };
|
|
|
+ okLoading.value = true;
|
|
|
+ await adjustHeatBillet(params);
|
|
|
+
|
|
|
+ refresh();
|
|
|
+ okLoading.value = false;
|
|
|
+ openLuciModal.value = false;
|
|
|
+ } catch (error) {
|
|
|
+ okLoading.value = false;
|
|
|
+ openLuciModal.value = false;
|
|
|
+ }
|
|
|
+ };
|
|
|
+ const changeHeatNum = (v) => {
|
|
|
+ if (v.target.value) {
|
|
|
+ adjustSelectedHeat.value = currentShiftTableData.value.find((item) => item.heatNo === v.target.value);
|
|
|
+ } else {
|
|
|
+ adjustSelectedHeat.value = {};
|
|
|
+ }
|
|
|
+ };
|
|
|
+ // 不去棒一必须是4的倍数
|
|
|
+ const handleChangeNum = async (value) => {
|
|
|
+ if (!isGotoRollOne.value) {
|
|
|
+ if (value % 4 !== 0) {
|
|
|
+ adjustHeatNum.value = value - (value % 4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
// 补录钢坯
|
|
|
const openCompensateModal = ref(false);
|
|
|
// 补录钢坯信息 sum 数量 size 定尺 status 状态 no 流号
|
|
@@ -461,7 +601,7 @@
|
|
|
|
|
|
const fetchFn = isAllHeat.value ? addHeatBillet : isRollOne.value === 'rollOne' ? addRollOneBilletBasic : addBilletBasic;
|
|
|
await fetchFn(params);
|
|
|
- reload();
|
|
|
+ refresh();
|
|
|
closeCompensateModal();
|
|
|
okLoading.value = false;
|
|
|
} catch (error) {
|
|
@@ -558,6 +698,21 @@
|
|
|
},
|
|
|
});
|
|
|
|
|
|
+ // 调整炉次时展示的数据
|
|
|
+ const { tableContext: otherShiftTableContext } = useListPage({
|
|
|
+ tableProps: {
|
|
|
+ columns: getColumns({ clickCb: () => {} }),
|
|
|
+ showIndexColumn: false,
|
|
|
+ canResize: false,
|
|
|
+ striped: true,
|
|
|
+ showTableSetting: false,
|
|
|
+ pagination: false,
|
|
|
+ showActionColumn: false,
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ const [registerShiftTableTable] = otherShiftTableContext;
|
|
|
+
|
|
|
/**
|
|
|
* 计算合计
|
|
|
* @param tableData
|
|
@@ -684,6 +839,39 @@
|
|
|
stop();
|
|
|
});
|
|
|
|
|
|
+ // 获取所有的定尺
|
|
|
+ const openHotSelectedModal = ref(false);
|
|
|
+ const selectedSize = ref(undefined);
|
|
|
+ const selectedSizeOptions = ref([]);
|
|
|
+ const opType = ref('');
|
|
|
+ const opRecord = ref(null);
|
|
|
+ const getSize = (record, type) => {
|
|
|
+ opType.value = type;
|
|
|
+ opRecord.value = record;
|
|
|
+ const { length } = record;
|
|
|
+ let lengthArr: any = [];
|
|
|
+ if (length) {
|
|
|
+ const obj = JSON.parse(length);
|
|
|
+
|
|
|
+ lengthArr = Object.keys(obj).map((key) => ({
|
|
|
+ label: key,
|
|
|
+ value: key,
|
|
|
+ }));
|
|
|
+ }
|
|
|
+
|
|
|
+ selectedSize.value = undefined;
|
|
|
+ if (lengthArr.length > 0) {
|
|
|
+ openHotSelectedModal.value = true;
|
|
|
+ selectedSizeOptions.value = lengthArr;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (type === 'hot') {
|
|
|
+ doHotCharge(record);
|
|
|
+ } else {
|
|
|
+ doStack(record);
|
|
|
+ }
|
|
|
+ };
|
|
|
// 热装
|
|
|
const doHotCharge = async (record) => {
|
|
|
try {
|
|
@@ -704,12 +892,12 @@
|
|
|
storageId: chargeInfo.id,
|
|
|
shift: record.shift,
|
|
|
shiftGroup: record.shiftGroup,
|
|
|
+ length: !selectedSize.value ? 0 : Number(selectedSize.value),
|
|
|
};
|
|
|
|
|
|
setLoading(true);
|
|
|
await addHotCharge(params);
|
|
|
- stop();
|
|
|
- reload();
|
|
|
+ refresh();
|
|
|
props.carRef.refreshCarList && props.carRef.refreshCarList();
|
|
|
} catch (error) {
|
|
|
} finally {
|
|
@@ -755,12 +943,12 @@
|
|
|
stackingAndLoadingVehiclesIds: sortedStackList.map((item) => item.id),
|
|
|
shift: record.shift,
|
|
|
shiftGroup: record.shiftGroup,
|
|
|
+ length: !selectedSize.value ? 0 : Number(selectedSize.value),
|
|
|
};
|
|
|
|
|
|
setLoading(true);
|
|
|
await stackingUpAdd(params);
|
|
|
- stop();
|
|
|
- reload();
|
|
|
+ refresh();
|
|
|
props.carRef.refreshCarList && props.carRef.refreshCarList();
|
|
|
} catch (error) {
|
|
|
} finally {
|
|
@@ -882,7 +1070,7 @@
|
|
|
disabled: !chargeInfo.id || !!chargeInfo.outTime,
|
|
|
type: 'primary',
|
|
|
onClick: () => {
|
|
|
- doHotCharge(record);
|
|
|
+ getSize(record, 'hot');
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -890,18 +1078,21 @@
|
|
|
color: 'warning',
|
|
|
type: 'primary',
|
|
|
onClick: () => {
|
|
|
- doStack(record);
|
|
|
+ getSize(record, 'stack');
|
|
|
},
|
|
|
},
|
|
|
...printAction,
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ const refresh = async () => {
|
|
|
+ stop();
|
|
|
+ await reload();
|
|
|
+ start();
|
|
|
+ };
|
|
|
+
|
|
|
defineExpose({
|
|
|
- reload: () => {
|
|
|
- stop();
|
|
|
- reload();
|
|
|
- },
|
|
|
+ reload: refresh,
|
|
|
});
|
|
|
</script>
|
|
|
|
|
@@ -995,4 +1186,19 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // .change-heat {
|
|
|
+ // :deep(.ant-table-row-level-0) {
|
|
|
+ // .ant-table-cell {
|
|
|
+ // background-color: #9eceff !important;
|
|
|
+ // }
|
|
|
+ // &:not(.jeecg-basic-table-row__striped) {
|
|
|
+ // background-color: rgba(51, 51, 51, 0.04) !important;
|
|
|
+ // .ant-table-cell {
|
|
|
+ // background-color: rgba(51, 51, 51, 0.04) !important;
|
|
|
+ // border-color: #d9d9d9;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
</style>
|