Commit da894e8f by linjinhong

feat:【工厂端】POD订单(US)实现自动排单#1000468

parent 99f0e989
import axios from '@/api/axios.ts'
import { BasePaginationData, BaseRespData } from '@/types/api'
// 新增规则
interface BaseForm {
id?: number
}
type ParamKey = `param${number}`
type ParamValue = string | number | boolean | null | undefined
type PostData = BaseForm & Record<ParamKey, ParamValue>
export function usArrangeRuleApi(data: PostData) {
return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderUs/usArrangeRule',
data,
)
}
// 编辑规则
export function updateRuleByIdApi(data: PostData) {
return axios.post<never, BasePaginationData<never>>(
'factory/podJomallOrderUsArrangeRule/updateRuleById',
data,
)
}
// us规则列表
export function getByFactoryNoApi(data: { factoryNo: number }) {
return axios.get<never, BaseRespData<never>>(
'/factory/podJomallOrderUsArrangeRule/getByFactoryNo',
{ params: data },
)
}
......@@ -88,7 +88,15 @@ const router = createRouter({
},
component: () => import('@/views/order/orderTracking/index.vue'),
},
{
{
path: '/pod-us-order/podUsSchedulingRules',
meta: {
title: 'POD(US)排单规则',
},
component: () =>
import('@/views/order/podUsSchedulingRules/index.vue'),
},
{
path: '/pod-cn-order/orderTracking',
meta: {
title: 'POD(CN)订单跟踪',
......
......@@ -137,6 +137,11 @@ const menu: MenuItem[] = [
id: 10,
label: 'POD(US)订单跟踪',
},
{
index: '/pod-us-order/podUsSchedulingRules',
id: 11,
label: 'POD(US)排单规则',
},
],
},
......
import { defineComponent, ref } from 'vue'
import { ElDialog } from 'element-plus'
export default defineComponent({
name: 'CustomizeForm',
props: {
modelValue: {
type: Boolean,
default: false,
},
title: {
type: String,
default: '',
},
dialogWidth: {
type: String,
default: '600px',
},
},
emits: ['update:modelValue', 'close'],
setup(props, { emit, attrs, slots }) {
const formRef = ref<InstanceType<typeof ElDialog> | null>(null)
const isShow = ref(false)
watch(
() => props.modelValue,
(val) => {
isShow.value = val
},
{ immediate: true },
)
return () => {
return (
<ElDialog
ref={formRef}
v-model={isShow.value}
title={props.title}
width={props.dialogWidth}
onClose={() => {
emit('close')
}}
destroy-on-close={true}
close-on-click-modal={false}
{...attrs}
>
<div class="dialog-form">
{slots.default?.()}
{slots.footer?.()}
</div>
</ElDialog>
)
}
},
})
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