Commit ef6bb62a by linjinhong

修改物流分区和物流报价查询字段

parent d8b80875
...@@ -167,7 +167,6 @@ export default defineComponent({ ...@@ -167,7 +167,6 @@ export default defineComponent({
) : ( ) : (
<div style={styles.wrapper} class="mt-15"> <div style={styles.wrapper} class="mt-15">
<ElForm <ElForm
{...getFormAttrs.value}
ref={(el) => (formRef.value = el)} ref={(el) => (formRef.value = el)}
class="w-full" class="w-full"
inline inline
...@@ -177,6 +176,7 @@ export default defineComponent({ ...@@ -177,6 +176,7 @@ export default defineComponent({
{...{ {...{
onSubmit: handleSubmit, onSubmit: handleSubmit,
}} }}
{...getFormAttrs.value}
> >
<div ref={formWrapperRef} class="formItemWrapper w-full"> <div ref={formWrapperRef} class="formItemWrapper w-full">
<div class="mt--18 flex align-center flex-wrap"> <div class="mt--18 flex align-center flex-wrap">
......
...@@ -67,6 +67,9 @@ ...@@ -67,6 +67,9 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'DeclarationRule',
})
import { import {
getLogisticsCustomsRuleList, getLogisticsCustomsRuleList,
addLogisticsCustomsRule, addLogisticsCustomsRule,
...@@ -126,7 +129,6 @@ const searchConfig = ref([ ...@@ -126,7 +129,6 @@ const searchConfig = ref([
}, },
}, },
]) ])
const platformList = ref([])
const mapData = ref(new Map<number, string[]>()) const mapData = ref(new Map<number, string[]>())
mapData.value.set(1, ['fixedValue', 'fixedWeight']) mapData.value.set(1, ['fixedValue', 'fixedWeight'])
...@@ -396,10 +398,6 @@ const tableConfig = ref([ ...@@ -396,10 +398,6 @@ const tableConfig = ref([
}, },
]) ])
onMounted(() => {
// getAllList()
})
const loading = ref(false) const loading = ref(false)
function cancelFn() { function cancelFn() {
...@@ -536,44 +534,6 @@ async function deleteRule(item) { ...@@ -536,44 +534,6 @@ async function deleteRule(item) {
} }
} }
// async function getAllList() {
// try {
// const res = await Promise.all([
// getWarehouseList(),
// getRuleList(),
// getPlatformList(),
// ])
// res.forEach((item, index) => {
// if (item.code === 200) {
// if (index == 0) {
// warehouseList.value = item.data
// } else if (index == 1) {
// ruleNameList.value = item.data || []
// } else if (index == 2) {
// platformList.value = item.data
// }
// }
// })
// if (
// formConfig.value[2] &&
// formConfig.value[3] &&
// 'attrs' in formConfig.value[2]
// ) {
// // 非空断言强制类型
// ;(formConfig.value[2]!.attrs as Record<string, any>).options = [
// ...warehouseList.value,
// ]
// ;(formConfig.value[3]!.attrs as Record<string, any>).options = [
// ...ruleNameList.value,
// ]
// }
// console.log(545, res)
// } catch (error) {
// console.log(error)
// }
// }
const logList = ref([]) const logList = ref([])
async function showLog(row) { async function showLog(row) {
logDialogVisible.value = true logDialogVisible.value = true
......
...@@ -36,17 +36,14 @@ ...@@ -36,17 +36,14 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'LogisticsCalculate',
})
import { getLogisticsTrialCalculation } from '@/api/logistics' import { getLogisticsTrialCalculation } from '@/api/logistics'
import type { LogisticsMethod } from '@/types/api/logistics'
import SearchForm from '@/components/SearchForm.tsx' import SearchForm from '@/components/SearchForm.tsx'
import LogDialog from './components/LogDialog.tsx'
import CustomizeForm from '@/components/CustomizeForm.tsx'
import CustomizeTable from '@/components/VxeTable.tsx' import CustomizeTable from '@/components/VxeTable.tsx'
import type { VxeTablePropTypes } from 'vxe-table' import type { VxeTablePropTypes } from 'vxe-table'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from './hooks/useValue' import { useValue } from './hooks/useValue'
import { showConfirm } from '@/utils/ui'
import { Edit } from '@element-plus/icons-vue'
const [searchForm] = useValue({ code: '', weight: '' }) const [searchForm] = useValue({ code: '', weight: '' })
......
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'LogisticsMethod',
})
import { import {
getLogisticsWayList, getLogisticsWayList,
addLogisticsWay, addLogisticsWay,
......
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'LogisticsPartition',
})
import { import {
getLogisticsZoneList, getLogisticsZoneList,
addLogisticsZone, addLogisticsZone,
...@@ -82,37 +85,38 @@ import { ...@@ -82,37 +85,38 @@ import {
exportExcelLogisticsZone, exportExcelLogisticsZone,
getlogisticsWayAllList, getlogisticsWayAllList,
} from '@/api/logistics' } from '@/api/logistics'
import type { LogisticsMethod } from '@/types/api/logistics' import type { ElForm } from 'element-plus'
import SearchForm from '@/components/SearchForm.tsx' import SearchForm from '@/components/SearchForm.tsx'
import LogDialog from './components/LogDialog.tsx' import LogDialog from './components/LogDialog.tsx'
import CustomizeForm from '@/components/CustomizeForm.tsx' import CustomizeForm from '@/components/CustomizeForm.tsx'
import CustomizeTable from '@/components/VxeTable.tsx' import CustomizeTable from '@/components/VxeTable.tsx'
import type { VxeTablePropTypes } from 'vxe-table' import type { VxeTablePropTypes } from 'vxe-table'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from './hooks/useValue' import { useValue } from './hooks/useValue'
import { showConfirm } from '@/utils/ui' import { showConfirm } from '@/utils/ui'
import { Edit } from '@element-plus/icons-vue'
import { ElInput } from 'element-plus' import { ElInput } from 'element-plus'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
const [searchForm] = useValue({}) const [searchForm] = useValue<{
logisticsIdList?: string[] | string
codePrefix?: string
}>({ logisticsIdList: [] })
const [editForm, resetEditForm] = useValue({ logisticsList: [] }) const [editForm, resetEditForm] = useValue({ logisticsList: [] })
const dialogVisible = ref(false) const dialogVisible = ref(false)
const editFormRef = ref(null) const editFormRef = ref<InstanceType<typeof ElForm> | null>(null)
const selection = ref([]) const selection = ref([])
const mergeCells = ref<VxeTablePropTypes.MergeCells>([]) const mergeCells = ref<VxeTablePropTypes.MergeCells>([])
const tableData = ref([]) const tableData = ref([])
const searchConfig = ref([ const searchConfig = ref([
{ {
prop: 'logisticsList', prop: 'logisticsIdList',
type: 'select', type: 'select',
label: '物流方式', label: '物流方式',
attrs: { attrs: {
placeholder: '请选择物流方式', placeholder: '请选择物流方式',
multiple: true, multiple: true,
value: 'name', value: 'id',
label: 'name', label: 'name',
collapseTags: true, collapseTags: true,
collapseTagsTooltip: true, collapseTagsTooltip: true,
...@@ -207,16 +211,6 @@ const formConfig = ref([ ...@@ -207,16 +211,6 @@ const formConfig = ref([
const tableConfig = ref([]) const tableConfig = ref([])
watch(
() => searchForm.value,
(val) => {
if (val.logisticsList === '') {
val.logisticsList = []
}
},
{ immediate: true, deep: true },
)
onMounted(() => { onMounted(() => {
// loading.value = true // loading.value = true
getAllList() getAllList()
...@@ -268,7 +262,7 @@ async function checkData() { ...@@ -268,7 +262,7 @@ async function checkData() {
console.log(err) console.log(err)
}) })
}), }),
new Promise<LogisticsMethod>((resolve) => { new Promise<any>((resolve) => {
const params = { ...editForm.value } const params = { ...editForm.value }
resolve(params) resolve(params)
......
...@@ -97,6 +97,9 @@ ...@@ -97,6 +97,9 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'LogisticsQuotation',
})
import { import {
getlogisticsWayAllList, getlogisticsWayAllList,
getlogisticsQuotationList, getlogisticsQuotationList,
...@@ -118,7 +121,7 @@ import { showConfirm } from '@/utils/ui' ...@@ -118,7 +121,7 @@ import { showConfirm } from '@/utils/ui'
import { Edit } from '@element-plus/icons-vue' import { Edit } from '@element-plus/icons-vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
const [searchForm] = useValue({}) const [searchForm] = useValue({ logisticsIdList: [] })
const [editForm, resetEditForm] = useValue({ unit: 'oz' }) const [editForm, resetEditForm] = useValue({ unit: 'oz' })
const { const {
loading, loading,
...@@ -147,14 +150,14 @@ const mergeCells = ref<VxeTablePropTypes.MergeCells>([]) ...@@ -147,14 +150,14 @@ const mergeCells = ref<VxeTablePropTypes.MergeCells>([])
const tableData = ref([]) const tableData = ref([])
const searchConfig = ref([ const searchConfig = ref([
{ {
prop: 'logisticsList', prop: 'logisticsIdList',
type: 'select', type: 'select',
label: '物流方式', label: '物流方式',
attrs: { attrs: {
placeholder: '请选择物流方式', placeholder: '请选择物流方式',
multiple: true, multiple: true,
value: 'name', value: 'id',
label: 'name', label: 'name',
collapseTags: true, collapseTags: true,
collapseTagsTooltip: true, collapseTagsTooltip: true,
...@@ -375,22 +378,14 @@ const tableConfig = ref([ ...@@ -375,22 +378,14 @@ const tableConfig = ref([
}, },
}, },
]) ])
watch(
() => searchForm.value,
(val) => {
if (val.logisticsList === '') {
val.logisticsList = []
}
},
{ immediate: true, deep: true },
)
watch( watch(
() => data.value, () => data.value,
(val) => { (val) => {
try { try {
tableData.value = getTableData(val) tableData.value = getTableData(val)
if (searchForm.value.logisticsList?.length) { if (searchForm.value.logisticsIdList?.length) {
let startRow = 0 let startRow = 0
mergeCells.value = [] mergeCells.value = []
data.value.forEach((item) => { data.value.forEach((item) => {
...@@ -411,8 +406,6 @@ watch( ...@@ -411,8 +406,6 @@ watch(
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} finally {
// loading.value = false
} }
}, },
{ immediate: true, deep: true }, { immediate: true, deep: true },
......
...@@ -171,6 +171,9 @@ ...@@ -171,6 +171,9 @@
</template> </template>
<script setup lang="tsx"> <script setup lang="tsx">
defineOptions({
name: 'ShippingAddress',
})
import { import {
getAddressByIdList, getAddressByIdList,
addAddress, addAddress,
......
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