diff --git a/src/views/order/components/orderDia.vue b/src/views/order/components/orderDia.vue index b75505d..c7eed38 100644 --- a/src/views/order/components/orderDia.vue +++ b/src/views/order/components/orderDia.vue @@ -194,7 +194,7 @@ {{ work_order_source.find(item => item.value == row.orderSource)?.label || row.orderSource }} - + @@ -106,7 +106,7 @@ // visible: true, title: '工单详情', }); - +const orderId = ref(''); const total = ref(0); const loading = ref(false); const queryParams = ref({ @@ -164,7 +164,8 @@ }, ]); -const handleDetail = () => { +const handleDetail = row => { + orderId.value = row.id; dialogConfig.value.visible = true; }; diff --git a/src/views/order/components/orderDia.vue b/src/views/order/components/orderDia.vue index b75505d..c7eed38 100644 --- a/src/views/order/components/orderDia.vue +++ b/src/views/order/components/orderDia.vue @@ -194,7 +194,7 @@ {{ work_order_source.find(item => item.value == row.orderSource)?.label || row.orderSource }} - + @@ -106,7 +106,7 @@ // visible: true, title: '工单详情', }); - +const orderId = ref(''); const total = ref(0); const loading = ref(false); const queryParams = ref({ @@ -164,7 +164,8 @@ }, ]); -const handleDetail = () => { +const handleDetail = row => { + orderId.value = row.id; dialogConfig.value.visible = true; }; diff --git a/src/views/order/workOrderProcessing/components/registerOrder.vue b/src/views/order/workOrderProcessing/components/registerOrder.vue index d005f3a..2bb4f7a 100644 --- a/src/views/order/workOrderProcessing/components/registerOrder.vue +++ b/src/views/order/workOrderProcessing/components/registerOrder.vue @@ -4,7 +4,7 @@
基本情况
-
+
@@ -128,7 +128,7 @@ const orderFormRef = ref(); const value = ref(''); - +const uploading = ref(false); const orderData = reactive({ rules: { name: [ @@ -157,7 +157,8 @@ reportPerson: '', reportPersonPhone: '', alarmTime: '', - registerTime: '', + registerTime: proxy.moment().format('YYYY-MM-DD HH:mm:ss'), + customFinishTime: '', reportLocation: '', requireFinishTime: '', message: '', @@ -172,24 +173,33 @@ if (!formEl) return; formEl.validate(valid => { if (valid) { - addWorkOrder(orderForm.value).then(response => { - proxy.$modal.msgSuccess('提交成功'); + uploading.value = true; + orderForm.value.customFinishTime = orderForm.value.registerTime; + addWorkOrder(orderForm.value) + .then(response => { + proxy.$modal.msgSuccess('提交成功'); - // open.value = false; - // queryParams.value.areaId = ''; - // getList(); - orderForm.value = { - ...orderForm.value, - orderNumber: '', - reportPerson: '', - reportPersonPhone: '', - alarmTime: '', - registerTime: '', - reportLocation: '', - requireFinishTime: '', - message: '', - }; - }); + // open.value = false; + // queryParams.value.areaId = ''; + // getList(); + orderForm.value = { + ...orderForm.value, + orderNumber: '', + reportPerson: '', + reportPersonPhone: '', + alarmTime: '', + registerTime: '', + customFinishTime: '', + reportLocation: '', + requireFinishTime: '', + message: '', + }; + uploading.value = false; + }) + .catch(() => { + uploading.value = false; + // proxy.$modal.msgError('提交失败'); + }); // if (addForm.value.id != undefined) { // editPatrolPoint(addForm.value).then(response => { // proxy.$modal.msgSuccess('修改成功');