|
@@ -99,10 +99,45 @@
|
|
|
<template #billXuhao="{ record }">{{ record.uniqueCode || '' }}</template>
|
|
|
<template #licensePlate="{ record }">
|
|
|
<a-badge-ribbon style="top: -20px" v-if="record.licensePlateStatus === 1" color="red" text="错误">
|
|
|
- <div>{{ record.licensePlate }}</div>
|
|
|
+ <JSearchSelect
|
|
|
+ type="list"
|
|
|
+ v-model:value="record.licensePlate"
|
|
|
+ dict="lg_car"
|
|
|
+ :getPopupContainer="
|
|
|
+ () => {
|
|
|
+ return documentBody;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ @change="(v) => handleLicensePlateChange(v, record)"
|
|
|
+ placeholder="请选择"
|
|
|
+ allowClear
|
|
|
+ />
|
|
|
</a-badge-ribbon>
|
|
|
<div v-else>{{ record.licensePlate }}</div>
|
|
|
</template>
|
|
|
+ <template #btype="{ record }">
|
|
|
+ <a-switch
|
|
|
+ v-model:checked="record.btype"
|
|
|
+ checked-value="0"
|
|
|
+ @change="(checked) => handleBtypeChange(checked, record)"
|
|
|
+ checked-children="热坯"
|
|
|
+ un-checked-value="1"
|
|
|
+ un-checked-children="冷坯"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template #destination="{ record }">
|
|
|
+ <JSearchSelect
|
|
|
+ v-if="Number(record.typeConfigId) === 1024"
|
|
|
+ type="list"
|
|
|
+ v-model:value="record.destinationId"
|
|
|
+ :disabled="Number(record.typeConfigId) !== 1024"
|
|
|
+ :options="destinationOptions[record.ccmNo]"
|
|
|
+ placeholder="请选择"
|
|
|
+ allowClear
|
|
|
+ @change="(v) => handleDestinationIdChange(v, record)"
|
|
|
+ />
|
|
|
+ <div v-else>{{ record.destination }}</div>
|
|
|
+ </template>
|
|
|
</BasicTable>
|
|
|
<!-- 表单区域 -->
|
|
|
<!-- 编辑 -->
|
|
@@ -131,9 +166,9 @@
|
|
|
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
|
|
|
import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
import { columns, initDictConfig, queryParam, searchFormSchema, carPosition6, carPosition5 } from './shippingBill.data';
|
|
|
- import { deleteOne, batchDelete } from './shippingBill.api';
|
|
|
+ import { deleteOne, batchDelete, edit } from './shippingBill.api';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
- import { onMounted, ref, reactive } from 'vue';
|
|
|
+ import { onMounted, ref, reactive, h } from 'vue';
|
|
|
// import hotDeliveryModal from './components/hotDeliveryModal.vue';
|
|
|
import editModal from './components/editModal.vue';
|
|
|
import logModel from './components/logModel.vue';
|
|
@@ -144,9 +179,13 @@
|
|
|
import { destinationOptions, getMachineConfig, MachineConfigType, getMachineNum } from '../hotDelivery/common.data';
|
|
|
import rodLine from './components/hotCharging/rodLine.vue';
|
|
|
import stack from './components/hotCharging/stack.vue';
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
+
|
|
|
+ const { createConfirm } = useMessage();
|
|
|
|
|
|
const sandCarLoading = ref(false);
|
|
|
const logRef = ref();
|
|
|
+ const documentBody = document.body;
|
|
|
const labelCol = reactive({
|
|
|
xs: { span: 24 },
|
|
|
sm: { span: 6 },
|
|
@@ -321,6 +360,15 @@
|
|
|
ccmNo: Number(queryParam.value.ccmNo),
|
|
|
});
|
|
|
},
|
|
|
+ afterFetch: (data) => {
|
|
|
+ return data.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ licensePlateOrg: item.licensePlate,
|
|
|
+ destinationId: item.typeConfigId === '1024' ? undefined : item.typeConfigId,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ },
|
|
|
columns,
|
|
|
canResize: false,
|
|
|
showActionColumn: false,
|
|
@@ -419,6 +467,102 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ // 修改类型
|
|
|
+ function handleBtypeChange(v, record) {
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '确认修改',
|
|
|
+ width: '460px',
|
|
|
+ content: () => {
|
|
|
+ return h('div', { style: { fontSize: '16px' } }, [
|
|
|
+ h('span', null, `是否将车牌为`),
|
|
|
+ h('span', { style: { fontSize: '18px', color: '#d48806' } }, `${record.licensePlate}`),
|
|
|
+ h('span', null, `的`),
|
|
|
+ h('span', { style: { fontSize: '18px', color: v === '1' ? '#cd201f' : '#3b5999' } }, `${v === '1' ? ' 热坯 ' : ' 冷坯 '}`),
|
|
|
+ h('span', null, `改为`),
|
|
|
+ h('span', { style: { fontSize: '18px', color: v === '1' ? '#3b5999' : '#cd201f' } }, `${v === '1' ? ' 冷坯 ' : ' 热坯 '}`),
|
|
|
+ h('span', null, `?`),
|
|
|
+ ]);
|
|
|
+ },
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk: () => {
|
|
|
+ return edit({ id: record.id, btype: v }).then(() => {
|
|
|
+ handleSuccess();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ record.btype = v === '1' ? '0' : '1';
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 修改目的地
|
|
|
+ function handleDestinationIdChange(v, record) {
|
|
|
+ if (!v) return;
|
|
|
+ const destinationInfo = destinationOptions[record.ccmNo].find((item) => item.value === v);
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '确认修改',
|
|
|
+ width: '460px',
|
|
|
+ content: () => {
|
|
|
+ return h('div', { style: { fontSize: '16px' } }, [
|
|
|
+ h('span', null, `是否修改目的地为:`),
|
|
|
+ h('span', { style: { fontSize: '18px', color: '#d48806' } }, ` ${destinationInfo.label} `),
|
|
|
+ h('span', null, `?`),
|
|
|
+ ]);
|
|
|
+ },
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk: () => {
|
|
|
+ return edit({
|
|
|
+ id: record.id,
|
|
|
+ typeConfigId: v,
|
|
|
+ destination: destinationInfo.label,
|
|
|
+ btype: record.btype,
|
|
|
+ licensePlate: record.licensePlate,
|
|
|
+ }).then(() => {
|
|
|
+ handleSuccess();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ record.destinationId = record.typeConfigId === '1024' ? undefined : v;
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 修改车号
|
|
|
+ function handleLicensePlateChange(v, record) {
|
|
|
+ if (!v) return;
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '确认修改',
|
|
|
+ width: '460px',
|
|
|
+ content: () => {
|
|
|
+ return h('div', { style: { fontSize: '16px' } }, [
|
|
|
+ h('span', null, `是否修改车辆为:`),
|
|
|
+ h('span', { style: { fontSize: '18px', color: '#d48806' } }, ` ${v} `),
|
|
|
+ h('span', null, `?`),
|
|
|
+ ]);
|
|
|
+ },
|
|
|
+ okText: '确认',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk: () => {
|
|
|
+ return edit({
|
|
|
+ id: record.id,
|
|
|
+ btype: record.btype,
|
|
|
+ licensePlate: record.licensePlate,
|
|
|
+ licensePlateStatus: 0,
|
|
|
+ }).then(() => {
|
|
|
+ handleSuccess();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ record.licensePlate = record.licensePlateOrg;
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
initDictConfig();
|
|
|
// initWebSocket();
|
|
@@ -484,6 +628,18 @@
|
|
|
.jeecg-basic-table-action {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
+
|
|
|
+ .ant-switch {
|
|
|
+ background-color: #3b5999;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ant-switch.ant-switch-checked {
|
|
|
+ background-color: #cd201f;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
|
+ background-color: #e7e7e7;
|
|
|
+ }
|
|
|
}
|
|
|
.form-row {
|
|
|
.ant-form-item {
|
|
@@ -527,7 +683,7 @@
|
|
|
// animation-iteration-count: infinite;
|
|
|
// animation-timing-function: ease-in-out;
|
|
|
content: '';
|
|
|
- z-index: 3;
|
|
|
+ z-index: -1;
|
|
|
// box-shadow: inset 5px -1px 0 var(--vxe-danger-color, #f56c6c);
|
|
|
}
|
|
|
}
|