Commit fcb85524 by linjinhong

fix:修改问题

parent 1bb29430
......@@ -69,7 +69,6 @@ import { PodCnOrderListData, LogisticsData } from '@/types/api/podCnOrder'
const isChangeWay = ref(false)
const isChangeWayLoading = ref(false)
const changeWayRow = ref<LogisticsData>({} as LogisticsData)
const currentItem = ref<PodCnOrderListData | null>(null)
const logisticsWayData = ref([])
const changeWayRef = ref()
......@@ -118,6 +117,9 @@ const cancelWayDialog = () => {
}
//确认物流
const changeWaySubmit = async (title: string) => {
console.log('title', title)
console.log('changeWayRow', changeWayRow.value)
console.log('rowData', props.rowData)
const { changeLogisticsApi, submitFn } = props
if (!changeWayRow.value?.logisticsWayId) {
......@@ -128,7 +130,7 @@ const changeWaySubmit = async (title: string) => {
}
let Fn
if (title !== '创建物流订单') {
if (changeWayRow.value.logisticsWayId === props.rowData?.logisticsWayId) {
if (changeWayRow.value?.logisticsWayId === props.rowData?.logisticsWayId) {
return ElMessage.warning('更改的物流方式不能相同')
}
Fn = changeLogisticsApi
......@@ -139,8 +141,8 @@ const changeWaySubmit = async (title: string) => {
try {
const params = {
updateByIdParam: {
id: currentItem.value?.id || '',
dataVersion: currentItem.value?.version as number,
id: props.rowData?.id || '',
dataVersion: props.rowData?.version as number,
},
logisticsTrialCalculation: { ...changeWayRow.value },
}
......@@ -165,11 +167,14 @@ const showDialog = async () => {
rowData.logisticsWayName || '空'
})`
isChangeWay.value = true
isChangeWayLoading.value = true
const { data } = await getTableFn(rowData.id as number)
logisticsWayData.value = data
}
} catch (error) {
console.error(error)
} finally {
isChangeWayLoading.value = false
}
}
const emits = defineEmits<{
......@@ -181,4 +186,30 @@ defineExpose({
})
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.production-client-table {
::v-deep(.current-row > td.el-table__cell) {
background-color: #409eff;
color: white;
& > td.el-table__cell {
color: white !important;
background-color: #409eff;
}
// &:hover {
// color: #808285;
// }
}
:deep() {
.current-row {
&:hover {
td.el-table__cell {
color: #808285;
}
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment