|
@@ -6,10 +6,10 @@
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
<div class="info">
|
|
|
- <p> 尊敬的<span class="blue">张先生</span>: </p>
|
|
|
+ <p> 尊敬的<span class="blue">{{info.name}}</span>: </p>
|
|
|
<p>
|
|
|
您送修的
|
|
|
- <span class="blue">iPhone 14 Pro Max</span>
|
|
|
+ <span class="blue">{{info.device}}</span>
|
|
|
已维修完毕。如已拿到货物,请在下方进行签收,感谢您的配合!
|
|
|
</p>
|
|
|
</div>
|
|
@@ -38,26 +38,40 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { ref, onMounted, unref } from 'vue';
|
|
|
+ import { ref, onMounted, unref, computed } from 'vue';
|
|
|
import { signFor } from '/@/api/feedback'
|
|
|
import { showLoadingToast, showToast } from 'vant';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
+ import { useUserStore } from '/@/store/modules/user';
|
|
|
+ import { repairList, repairDetails } from '/@/api';
|
|
|
import axios from 'axios';
|
|
|
import SignatureModal from './popup/SignatureModal.vue';
|
|
|
+ const userStore = useUserStore();
|
|
|
const canvasRef = ref(null);
|
|
|
const signaturePad = ref(null);
|
|
|
const isEmpty = ref(true);
|
|
|
const isShowSignature = ref(false);
|
|
|
const signatureModalRef = ref(null);
|
|
|
+ const router = useRouter();
|
|
|
+ const { id } = unref(router.currentRoute)?.params;
|
|
|
+ const wxOpenId = computed(() => {
|
|
|
+ return userStore.getWxOpenId;
|
|
|
+ });
|
|
|
const signatureImg = ref({
|
|
|
file: '',
|
|
|
url: ''
|
|
|
});
|
|
|
- onMounted(() => {
|
|
|
+ const info = ref({
|
|
|
+ name: '',
|
|
|
+ device: '',
|
|
|
+ })
|
|
|
+ onMounted(async () => {
|
|
|
+ const { data } = await repairDetails(id);
|
|
|
+ info.value.name = data.customer.customerName;
|
|
|
+ info.value.device = data.repairerVo.cameraSnCode;
|
|
|
+ console.log('data', info.value, data);
|
|
|
});
|
|
|
|
|
|
- const router = useRouter();
|
|
|
- const { id } = unref(router.currentRoute)?.params;
|
|
|
|
|
|
function startSign() {
|
|
|
// 触发canvas签名
|
|
@@ -77,6 +91,7 @@
|
|
|
|
|
|
function onClose() {
|
|
|
// 关闭弹窗逻辑
|
|
|
+ router.replace('/home');
|
|
|
}
|
|
|
function clearSign() {
|
|
|
isEmpty.value = true
|