|
|
|
@ -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,
|
|
|
|
|