fix: 个人订单

fix/0524_ch
向文可 2 years ago
parent 2655f6cefa
commit e8f3851e1f

@ -199,7 +199,6 @@
//
const handleOrder = () => {
console.info(unref(currentSession));
router.push({ name: 'OrderManagement', query: { id: currentSession.value.fromId } });
};

@ -65,6 +65,7 @@
import OrderTrack from './track.vue';
const { proxy } = getCurrentInstance();
const router = useRouter();
const route = useRoute();
const store = useStore();
const loading = ref(false);
const code = computed(() => store.state.order.code);
@ -79,6 +80,7 @@
/* 查询订单 */
const state = reactive({
condition: {
userId: null,
orderNo: null,
userPhone: null,
orderSource: null,
@ -89,9 +91,19 @@
},
});
watch(
() => state.condition,
() => route.params.id,
(value) => {
state.condition.userId = value;
},
{ immediate: true, deep: true }
);
watch(
() => state.condition,
(value, old) => {
store.commit('order/setCondition', _.cloneDeep(value));
if (value.userId !== old.userId) {
handleSearch();
}
},
{ immediate: true, deep: true }
);
@ -104,6 +116,7 @@
);
const handleReset = () => {
state.condition = {
userId: null,
orderNo: null,
userPhone: null,
orderSource: null,

Loading…
Cancel
Save