Commit ef6bb62a by linjinhong

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

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