|
@@ -4,6 +4,7 @@
|
|
|
<div style="text-align: center; position: relative">
|
|
|
<div class="noprint" style="position: absolute">
|
|
|
<a-button type="primary" @click="addHeatNo">添加炉号</a-button>
|
|
|
+ <a-button type="primary" style="margin-left: 20px" @click="addRollLine">添加棒线</a-button>
|
|
|
</div>
|
|
|
<p style="font-size: 24px; font-weight: 800; display: inline-block; margin-bottom: 16px; line-height: 30px">
|
|
|
<span class="ccmno">{{ hostNumber }}</span> #机推钢室生产原始记录
|
|
@@ -154,6 +155,17 @@
|
|
|
<a-input size="large" v-model:value="newHeatNo"></a-input>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
+
|
|
|
+ <!-- 添加棒线 -->
|
|
|
+ <a-modal v-model:open="opeBanLine" title="添加棒线" centered width="500px" :zIndex="1000" @ok="confirmAddBanLine">
|
|
|
+ <div style="padding: 30px; font-size: 16px">
|
|
|
+ <div class="flex" style="margin-bottom: 30px">
|
|
|
+ <a-select size="large" class="flex-1" v-model:value="banLineVal" allowClear :options="getAddBanLine" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <a-input-number size="large" placeholder="请输入定尺" style="width: 100%" v-model:value="banLineSizeVal" :min="1" :controls="false" />
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import { ref, computed, h, onMounted } from 'vue';
|
|
@@ -169,11 +181,12 @@
|
|
|
import { initDictOptions } from '/@/utils/dict';
|
|
|
import { useTimeoutFn } from '/@/hooks/core/useTimeout';
|
|
|
import { getMachineConfig, MachineConfigType } from '../../hotDelivery/common.data';
|
|
|
- import { steelPlateFormula } from '../operator.data';
|
|
|
+ import { steelPlateFormula, getBandBaseData, getHotColumns } from '../operator.data';
|
|
|
+ import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
|
|
|
|
|
|
const emits = defineEmits(['statistics']);
|
|
|
|
|
|
- const { createMessage } = useMessage();
|
|
|
+ const { createMessage, createConfirm } = useMessage();
|
|
|
const printKey = ref(dayjs().unix());
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -186,6 +199,8 @@
|
|
|
const renderDictTag = (value: string, dictCode: string) => {
|
|
|
return render.renderDict(value, dictCode);
|
|
|
};
|
|
|
+
|
|
|
+ const paiHao = ref('5');
|
|
|
// 主机号
|
|
|
const hostNumber = ref('5');
|
|
|
const defaultColumns: TableColumnsType = [
|
|
@@ -209,8 +224,47 @@
|
|
|
align: 'center',
|
|
|
dataIndex: 'brandNum',
|
|
|
key: 'brandNum',
|
|
|
- customRender: ({ text }) => {
|
|
|
- return render.renderDict(text, 'billet_spec');
|
|
|
+ customRender: ({ text, index, record }) => {
|
|
|
+ if (!record.heatNo) return '';
|
|
|
+ const { orgData } = record;
|
|
|
+ return h(
|
|
|
+ JSearchSelect,
|
|
|
+ {
|
|
|
+ key: orgData.heatNo + record.keyDate,
|
|
|
+ type: 'list',
|
|
|
+ bordered: false,
|
|
|
+ value: text,
|
|
|
+ dict: 'billet_spec',
|
|
|
+ onChange: (v) => {
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '交班确认',
|
|
|
+ content: `确定修改【${record.heatNo}】的牌号吗?`,
|
|
|
+ onOk: () => {
|
|
|
+ return editBilletRecord({
|
|
|
+ ...orgData,
|
|
|
+ grade: v,
|
|
|
+ }).then(() => {
|
|
|
+ getHeatList({
|
|
|
+ ccmNo: hostNumber.value,
|
|
|
+ queryType: fetchQueryType.value,
|
|
|
+ changeShiftId: fetchChangeShiftId.value,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ getHeatList({
|
|
|
+ ccmNo: hostNumber.value,
|
|
|
+ queryType: fetchQueryType.value,
|
|
|
+ changeShiftId: fetchChangeShiftId.value,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ placeholder: '请选择',
|
|
|
+ },
|
|
|
+ ''
|
|
|
+ );
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -228,7 +282,6 @@
|
|
|
},
|
|
|
class: 'noprint',
|
|
|
onClick: () => {
|
|
|
- console.log('点击了');
|
|
|
const rollOnrColumn: any = columns.value.find((item: any) => item.dataIndex === 'rollOne');
|
|
|
let newSize: string | number = '';
|
|
|
rollOnrColumn.children.push({
|
|
@@ -339,12 +392,10 @@
|
|
|
const isSpinning = ref(false);
|
|
|
// 字段映射
|
|
|
const headText = {
|
|
|
- rollClubTwoCount: '二',
|
|
|
- rollClubThreeCount: '三',
|
|
|
- rollClubShippCount: '上',
|
|
|
roll_club_two: '棒二',
|
|
|
roll_club_three: '棒三',
|
|
|
roll_out_shipp: '上若',
|
|
|
+ roll_deputy_cross: '付跨',
|
|
|
};
|
|
|
const changeLoading = (b) => {
|
|
|
isSpinning.value = b;
|
|
@@ -465,16 +516,21 @@
|
|
|
// 棒一
|
|
|
const rollOneColumns: TableColumnsType = [];
|
|
|
const rollOneSize = {};
|
|
|
- // 棒二
|
|
|
- const rollTwoSize = {};
|
|
|
- // 棒三
|
|
|
- const rollThreeSize = {};
|
|
|
- // 上若
|
|
|
- const rollShippSize = {};
|
|
|
- // 冷装
|
|
|
- const rollTwoColdSize = {};
|
|
|
- const rollThreeColdSize = {};
|
|
|
- const rollShippColdSize = {};
|
|
|
+ // 棒线热装和冷装
|
|
|
+ const rollOneHotAndColdSize = {
|
|
|
+ '1': {
|
|
|
+ roll_club_two: {},
|
|
|
+ roll_club_three: {},
|
|
|
+ roll_out_shipp: {},
|
|
|
+ roll_deputy_cross: {},
|
|
|
+ },
|
|
|
+ '0': {
|
|
|
+ roll_club_two: {},
|
|
|
+ roll_club_three: {},
|
|
|
+ roll_out_shipp: {},
|
|
|
+ roll_deputy_cross: {},
|
|
|
+ },
|
|
|
+ };
|
|
|
// 装车按热装和冷装分组
|
|
|
const rollChargeSizeType = {
|
|
|
'0': {},
|
|
@@ -572,39 +628,10 @@
|
|
|
};
|
|
|
});
|
|
|
|
|
|
- const hotChargeColumns: any = {
|
|
|
- // 棒二字段
|
|
|
- roll_club_two: {
|
|
|
- title: '棒二',
|
|
|
- dataIndex: 'roll_club_two',
|
|
|
- key: 'roll_club_two',
|
|
|
- // width: 100,
|
|
|
- children: [],
|
|
|
- },
|
|
|
- // 棒三字段
|
|
|
- roll_club_three: {
|
|
|
- title: '棒三',
|
|
|
- dataIndex: 'roll_club_three',
|
|
|
- key: 'roll_club_three',
|
|
|
- // width: 100,
|
|
|
- children: [],
|
|
|
- },
|
|
|
- // 上若字段
|
|
|
- roll_out_shipp: {
|
|
|
- title: '上若',
|
|
|
- dataIndex: 'roll_out_shipp',
|
|
|
- key: 'roll_out_shipp',
|
|
|
- // width: 100,
|
|
|
- children: [],
|
|
|
- },
|
|
|
- };
|
|
|
+ const hotChargeColumns: any = getBandBaseData();
|
|
|
|
|
|
// 热装字段
|
|
|
- let columnsHotCharge: any = {
|
|
|
- roll_club_two: [],
|
|
|
- roll_club_three: [],
|
|
|
- roll_out_shipp: [],
|
|
|
- };
|
|
|
+ let columnsHotCharge: any = getHotColumns();
|
|
|
|
|
|
const dataOrgSource = defaultSourceData.map((item, index) => {
|
|
|
if (!newArr[index]) return item;
|
|
@@ -613,10 +640,6 @@
|
|
|
// 棒一
|
|
|
let rollOneNum = '';
|
|
|
let rollOneSizesObj = {};
|
|
|
- // if (hotSend) {
|
|
|
- // const obj = JSON.parse(hotSend);
|
|
|
- // rollOneNum = obj.hotSendTotalCount || '';
|
|
|
- // }
|
|
|
if (rollClubOneDetails) {
|
|
|
const obj = JSON.parse(rollClubOneDetails);
|
|
|
rollOneNum = obj.directRollingTotalCount || '';
|
|
@@ -710,99 +733,23 @@
|
|
|
const dataKey = sizeFormat + k.hotChargeDestination + k.hotChargeBtype;
|
|
|
sizeArr[dataKey] = k.totalCount;
|
|
|
// 热送统计
|
|
|
- // 棒二
|
|
|
- if (k.hotChargeDestination === 'roll_club_two' && k.totalCount > 0) {
|
|
|
- // 添加定尺
|
|
|
- columnsHotCharge.roll_club_two.push(sizeFormat);
|
|
|
-
|
|
|
- if (k.hotChargeBtype === '0') {
|
|
|
- if (!rollTwoSize[k.hotChargeLength]) {
|
|
|
- rollTwoSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollTwoSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollTwoSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!rollTwoColdSize[k.hotChargeLength]) {
|
|
|
- rollTwoColdSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollTwoColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollTwoColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 棒三
|
|
|
- if (k.hotChargeDestination === 'roll_club_three' && k.totalCount > 0) {
|
|
|
- // 添加定尺
|
|
|
- columnsHotCharge.roll_club_three.push(sizeFormat);
|
|
|
-
|
|
|
- if (k.hotChargeBtype === '0') {
|
|
|
- if (!rollThreeSize[k.hotChargeLength]) {
|
|
|
- rollThreeSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollThreeSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollThreeSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!rollThreeColdSize[k.hotChargeLength]) {
|
|
|
- rollThreeColdSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollThreeColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollThreeColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 上若
|
|
|
- if (k.hotChargeDestination === 'roll_out_shipp' && k.totalCount > 0) {
|
|
|
- // 添加定尺
|
|
|
- columnsHotCharge.roll_out_shipp.push(sizeFormat);
|
|
|
-
|
|
|
- if (k.hotChargeBtype === '0') {
|
|
|
- if (!rollShippSize[k.hotChargeLength]) {
|
|
|
- rollShippSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollShippSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollShippSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!rollShippColdSize[k.hotChargeLength]) {
|
|
|
- rollShippColdSize[k.hotChargeLength] = {
|
|
|
- type: k.hotChargeBtype,
|
|
|
- size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
- amount: k.totalCount,
|
|
|
- weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
- };
|
|
|
- } else {
|
|
|
- rollShippColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollShippColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
- }
|
|
|
+ if (k.totalCount > 0) {
|
|
|
+ if (!rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength]) {
|
|
|
+ rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength] = {
|
|
|
+ type: k.hotChargeBtype,
|
|
|
+ size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
+ amount: 0,
|
|
|
+ weight: 0,
|
|
|
+ };
|
|
|
}
|
|
|
+
|
|
|
+ rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength].amount += k.totalCount;
|
|
|
+ rollOneHotAndColdSize[k.hotChargeBtype][k.hotChargeDestination][k.hotChargeLength].weight += steelPlateFormula(
|
|
|
+ k.hotChargeLength,
|
|
|
+ k.totalCount
|
|
|
+ );
|
|
|
}
|
|
|
+ columnsHotCharge[k.hotChargeDestination].push(sizeFormat);
|
|
|
|
|
|
// 热装按类型分组,分热装和冷装
|
|
|
if (!rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength]) {
|
|
@@ -906,6 +853,7 @@
|
|
|
return {
|
|
|
...item,
|
|
|
heatNo: newArr[index].heatNo,
|
|
|
+ keyDate: new Date().getTime(),
|
|
|
brandNum: newArr[index].grade,
|
|
|
oneFlow: newArr[index].oneStrandSum || '',
|
|
|
twoFlow: newArr[index].twoStrandSum || '',
|
|
@@ -996,6 +944,7 @@
|
|
|
},
|
|
|
};
|
|
|
});
|
|
|
+
|
|
|
otherColumnsNums = otherColumnsNums + (childSizesColumn.length ? childSizesColumn.length : 1);
|
|
|
return {
|
|
|
...hotChargeColumns[item],
|
|
@@ -1026,36 +975,45 @@
|
|
|
hotSendList.value['一'] = Object.values(rollOneSize);
|
|
|
hotSendList.value['一'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
- if (Object.values(rollTwoSize).length) {
|
|
|
- hotSendList.value['二'] = Object.values(rollTwoSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['0']['roll_club_two']).length) {
|
|
|
+ hotSendList.value['二'] = Object.values(rollOneHotAndColdSize['0']['roll_club_two']);
|
|
|
hotSendList.value['二'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
- if (Object.values(rollThreeSize).length) {
|
|
|
- hotSendList.value['三'] = Object.values(rollThreeSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['0'].roll_club_three).length) {
|
|
|
+ hotSendList.value['三'] = Object.values(rollOneHotAndColdSize['0'].roll_club_three);
|
|
|
hotSendList.value['三'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
- if (Object.values(rollShippSize).length) {
|
|
|
- hotSendList.value['上'] = Object.values(rollShippSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['0'].roll_out_shipp).length) {
|
|
|
+ hotSendList.value['上'] = Object.values(rollOneHotAndColdSize['0'].roll_out_shipp);
|
|
|
hotSendList.value['上'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
+ if (Object.values(rollOneHotAndColdSize['0'].roll_deputy_cross).length) {
|
|
|
+ hotSendList.value['付'] = Object.values(rollOneHotAndColdSize['0'].roll_deputy_cross);
|
|
|
+ hotSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
|
|
|
+ }
|
|
|
+
|
|
|
if (Object.values(stackingSize)) {
|
|
|
stackingList.value = Object.values(stackingSize);
|
|
|
stackingList.value.forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
|
|
|
// 冷装统计
|
|
|
- if (Object.values(rollTwoColdSize).length) {
|
|
|
- coldSendList.value['二'] = Object.values(rollTwoColdSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['1'].roll_club_two).length) {
|
|
|
+ coldSendList.value['二'] = Object.values(rollOneHotAndColdSize['1'].roll_club_two);
|
|
|
coldSendList.value['二'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
- if (Object.values(rollThreeColdSize).length) {
|
|
|
- coldSendList.value['三'] = Object.values(rollThreeColdSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['1'].roll_club_three).length) {
|
|
|
+ coldSendList.value['三'] = Object.values(rollOneHotAndColdSize['1'].roll_club_three);
|
|
|
coldSendList.value['三'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
- if (Object.values(rollShippColdSize).length) {
|
|
|
- coldSendList.value['上'] = Object.values(rollShippColdSize);
|
|
|
+ if (Object.values(rollOneHotAndColdSize['1'].roll_out_shipp).length) {
|
|
|
+ coldSendList.value['上'] = Object.values(rollOneHotAndColdSize['1'].roll_out_shipp);
|
|
|
coldSendList.value['上'].forEach((ele) => (allWeight += ele.weight));
|
|
|
}
|
|
|
+ if (Object.values(rollOneHotAndColdSize['1'].roll_deputy_cross).length) {
|
|
|
+ coldSendList.value['付'] = Object.values(rollOneHotAndColdSize['1'].roll_deputy_cross);
|
|
|
+ coldSendList.value['付'].forEach((ele) => (allWeight += ele.weight));
|
|
|
+ }
|
|
|
|
|
|
emits('statistics', {
|
|
|
chargeList: rollChargeSizeType,
|
|
@@ -1075,23 +1033,6 @@
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- const openJSModal = ref(false);
|
|
|
- const xiShu = ref(0.2265);
|
|
|
- const sizeNum = ref();
|
|
|
- const weightNum = ref();
|
|
|
- // 重量计算按钮
|
|
|
- const weightCalc = computed(() => {
|
|
|
- const w = Number(weightNum.value);
|
|
|
- const x = Number(xiShu.value);
|
|
|
- const s = Number(sizeNum.value);
|
|
|
- if (isNumber(w) && isNumber(x) && isNumber(s)) {
|
|
|
- const r = w * x * s;
|
|
|
-
|
|
|
- return !isNaN(r) ? r.toFixed(6) : '';
|
|
|
- }
|
|
|
- return '';
|
|
|
- });
|
|
|
-
|
|
|
// 修改合计
|
|
|
const handleTotalChange = throttle((e: any, record) => {
|
|
|
const val = Number(e.target.value);
|
|
@@ -1589,6 +1530,116 @@
|
|
|
changeLoading(false);
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ // 添加棒线
|
|
|
+ const opeBanLine = ref(false);
|
|
|
+ const banLineVal = ref(undefined);
|
|
|
+ const banLineSizeVal = ref<number>();
|
|
|
+ const getAddBanLine = computed(() => {
|
|
|
+ const options = Object.values(getBandBaseData()).map((item) => {
|
|
|
+ return {
|
|
|
+ label: item.title,
|
|
|
+ value: item.key,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ return options;
|
|
|
+ });
|
|
|
+ const addRollLine = async () => {
|
|
|
+ opeBanLine.value = true;
|
|
|
+ };
|
|
|
+ const confirmAddBanLine = async () => {
|
|
|
+ if (!banLineVal.value) {
|
|
|
+ createMessage.warning('请选择棒线');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!banLineSizeVal.value) {
|
|
|
+ createMessage.warning('请选择定尺');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const size = banLineSizeVal.value <= 20 ? banLineSizeVal.value : banLineSizeVal.value / 1000;
|
|
|
+ const getSizeChild = (sizes) => {
|
|
|
+ const niubiGls: any[] = [];
|
|
|
+ sizes.forEach((ele) => {
|
|
|
+ niubiGls.push(
|
|
|
+ {
|
|
|
+ hotChargeLength: Number(ele) * 1000,
|
|
|
+ hotChargeDestination: banLineVal.value,
|
|
|
+ totalWeight: 0,
|
|
|
+ hotChargeBtype: '0',
|
|
|
+ totalCount: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ hotChargeLength: Number(ele) * 1000,
|
|
|
+ hotChargeDestination: banLineVal.value,
|
|
|
+ totalWeight: 0,
|
|
|
+ hotChargeBtype: '1',
|
|
|
+ totalCount: 0,
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+
|
|
|
+ return {
|
|
|
+ title: size,
|
|
|
+ dataIndex: `${banLineVal.value}.${size}`,
|
|
|
+ key: `${banLineVal.value}.${size}`,
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ customRender: ({ record }) => {
|
|
|
+ return h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ class: 'size-st-wrapper',
|
|
|
+ onClick: () => {
|
|
|
+ // if (!record[hotKey] && !record[coldKey]) return;
|
|
|
+ const { orgData } = record;
|
|
|
+ if (!orgData) return;
|
|
|
+ const { hotChargeLength } = orgData;
|
|
|
+
|
|
|
+ const hotChargeInfoArr = hotChargeLength ? JSON.parse(hotChargeLength) : [];
|
|
|
+
|
|
|
+ const itemsHotArr = niubiGls.map((v) => {
|
|
|
+ const hasVal = hotChargeInfoArr.find((j) => j.hotChargeLength == v.hotChargeLength && j.hotChargeBtype == v.hotChargeBtype);
|
|
|
+ return {
|
|
|
+ ...v,
|
|
|
+ totalCount: hasVal ? hasVal.totalCount : 0,
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ editSizeNumRecord.value = {
|
|
|
+ ...orgData,
|
|
|
+ hotChargeLengthArr: itemsHotArr,
|
|
|
+ };
|
|
|
+ openSetSizeNumModal.value = true;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ },
|
|
|
+ };
|
|
|
+ };
|
|
|
+ // 判断是否有该棒线
|
|
|
+ const hasRoll: any = (columns.value as TableColumnsType[]).find((col: any) => col.dataIndex === banLineVal.value);
|
|
|
+ if (hasRoll) {
|
|
|
+ const hasSize = hasRoll.children.find((k) => k.dataIndex === `${banLineVal.value}.${size}`);
|
|
|
+
|
|
|
+ if (hasSize) {
|
|
|
+ createMessage.error('该棒线定尺已存在!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const sizesArr = hasRoll.children.map((j) => j.title);
|
|
|
+ const sizeColums = getSizeChild([...sizesArr, size]);
|
|
|
+ hasRoll.children.push(sizeColums);
|
|
|
+ } else {
|
|
|
+ const newsColumn: any = getBandBaseData()[banLineVal.value];
|
|
|
+ const sizeColums = getSizeChild([size]);
|
|
|
+ newsColumn.children.push(sizeColums);
|
|
|
+ columns.value.splice(4, 0, newsColumn);
|
|
|
+ }
|
|
|
+
|
|
|
+ opeBanLine.value = false;
|
|
|
+ };
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.orgData-info-spin {
|
|
@@ -1776,10 +1827,13 @@
|
|
|
|
|
|
.ant-select-selector {
|
|
|
padding: 0;
|
|
|
+ color: rgba(255, 255, 255, 0.8);
|
|
|
+ font-size: 20px;
|
|
|
|
|
|
.ant-select-selection-item,
|
|
|
.ant-select-selection-placeholder {
|
|
|
padding-inline-end: 0;
|
|
|
+ color: rgba(255, 255, 255, 0.8);
|
|
|
}
|
|
|
}
|
|
|
.ant-select-arrow {
|