Commit fcb85524 by linjinhong

fix:修改问题

parent 1bb29430
...@@ -69,7 +69,6 @@ import { PodCnOrderListData, LogisticsData } from '@/types/api/podCnOrder' ...@@ -69,7 +69,6 @@ import { PodCnOrderListData, LogisticsData } from '@/types/api/podCnOrder'
const isChangeWay = ref(false) const isChangeWay = ref(false)
const isChangeWayLoading = ref(false) const isChangeWayLoading = ref(false)
const changeWayRow = ref<LogisticsData>({} as LogisticsData) const changeWayRow = ref<LogisticsData>({} as LogisticsData)
const currentItem = ref<PodCnOrderListData | null>(null)
const logisticsWayData = ref([]) const logisticsWayData = ref([])
const changeWayRef = ref() const changeWayRef = ref()
...@@ -118,6 +117,9 @@ const cancelWayDialog = () => { ...@@ -118,6 +117,9 @@ const cancelWayDialog = () => {
} }
//确认物流 //确认物流
const changeWaySubmit = async (title: string) => { const changeWaySubmit = async (title: string) => {
console.log('title', title)
console.log('changeWayRow', changeWayRow.value)
console.log('rowData', props.rowData)
const { changeLogisticsApi, submitFn } = props const { changeLogisticsApi, submitFn } = props
if (!changeWayRow.value?.logisticsWayId) { if (!changeWayRow.value?.logisticsWayId) {
...@@ -128,7 +130,7 @@ const changeWaySubmit = async (title: string) => { ...@@ -128,7 +130,7 @@ const changeWaySubmit = async (title: string) => {
} }
let Fn let Fn
if (title !== '创建物流订单') { if (title !== '创建物流订单') {
if (changeWayRow.value.logisticsWayId === props.rowData?.logisticsWayId) { if (changeWayRow.value?.logisticsWayId === props.rowData?.logisticsWayId) {
return ElMessage.warning('更改的物流方式不能相同') return ElMessage.warning('更改的物流方式不能相同')
} }
Fn = changeLogisticsApi Fn = changeLogisticsApi
...@@ -139,8 +141,8 @@ const changeWaySubmit = async (title: string) => { ...@@ -139,8 +141,8 @@ const changeWaySubmit = async (title: string) => {
try { try {
const params = { const params = {
updateByIdParam: { updateByIdParam: {
id: currentItem.value?.id || '', id: props.rowData?.id || '',
dataVersion: currentItem.value?.version as number, dataVersion: props.rowData?.version as number,
}, },
logisticsTrialCalculation: { ...changeWayRow.value }, logisticsTrialCalculation: { ...changeWayRow.value },
} }
...@@ -165,11 +167,14 @@ const showDialog = async () => { ...@@ -165,11 +167,14 @@ const showDialog = async () => {
rowData.logisticsWayName || '空' rowData.logisticsWayName || '空'
})` })`
isChangeWay.value = true isChangeWay.value = true
isChangeWayLoading.value = true
const { data } = await getTableFn(rowData.id as number) const { data } = await getTableFn(rowData.id as number)
logisticsWayData.value = data logisticsWayData.value = data
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} finally {
isChangeWayLoading.value = false
} }
} }
const emits = defineEmits<{ const emits = defineEmits<{
...@@ -181,4 +186,30 @@ defineExpose({ ...@@ -181,4 +186,30 @@ defineExpose({
}) })
</script> </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