备货单 审核功能
This commit is contained in:
@@ -117,16 +117,47 @@
|
||||
<ElInput v-model="form.email" :disabled="!isEdit" />
|
||||
</ElFormItem>
|
||||
<ElFormItem label="签名" prop="signature" class="right-input">
|
||||
<template v-if="form.signature_pic_full">
|
||||
<img :src="form.signature_pic_full" class="signature-img" />
|
||||
<template v-if="form.sign_img">
|
||||
<img :src="sign_img_url" class="signature-img" />
|
||||
<el-button
|
||||
v-if="isEdit"
|
||||
style="margin-left: 12px"
|
||||
@click="showReSignQR = !showReSignQR"
|
||||
>
|
||||
重新签名
|
||||
</el-button>
|
||||
<div
|
||||
v-if="isEdit && showReSignQR"
|
||||
class="signature-qrcode"
|
||||
style="margin-top: 20px;margin-left: 20px;"
|
||||
>
|
||||
<qrcode-vue
|
||||
:value="qrcodeUrl"
|
||||
:size="120"
|
||||
level="L"
|
||||
render-as="svg"
|
||||
:include-margin="false"
|
||||
background="#ffffff"
|
||||
foreground="#111111"
|
||||
/>
|
||||
<div class="qrcode-tip">手机扫码重新签名</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="signature-qrcode">
|
||||
<qrcode-vue :value="qrcodeUrl" :size="120" level="M" />
|
||||
<qrcode-vue
|
||||
:value="qrcodeUrl"
|
||||
:size="120"
|
||||
level="L"
|
||||
render-as="svg"
|
||||
:include-margin="false"
|
||||
background="#ffffff"
|
||||
foreground="#111111"
|
||||
/>
|
||||
<div class="qrcode-tip">手机扫码进行签名</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-button @click="handleSignature" type="primary">签名</el-button>
|
||||
<!-- <el-button @click="handleSignature" type="primary">签名</el-button> -->
|
||||
<el-input type="hidden" v-model="form.signature" />
|
||||
</ElFormItem>
|
||||
</ElRow>
|
||||
@@ -242,6 +273,7 @@
|
||||
}
|
||||
// const imageUrls = ref(imageUrl)
|
||||
const imageUrlavatar = ref('')
|
||||
const sign_img_url = ref('')
|
||||
// const socialize_pic_full = ref('')
|
||||
// const countryOptions = ref<any>()
|
||||
const form = ref<CustomerInfo>({})
|
||||
@@ -255,16 +287,23 @@
|
||||
// countryOptions.value = res||[]
|
||||
// } catch (error) { countryOptions.value = [] }
|
||||
// }
|
||||
const { getUserInfo } = useUserStore()
|
||||
// const { getUserInfo } = useUserStore()
|
||||
const userInfo = ref<CustomerInfo>({})
|
||||
const getuserInfo = async () => {
|
||||
// const data = await CrmService.userget()
|
||||
userInfo.value = getUserInfo.user
|
||||
form.value = getUserInfo.user
|
||||
imageUrlavatar.value = getUserInfo.user.avatar
|
||||
const data = await UserService.getUserInfo()
|
||||
userInfo.value = data.user
|
||||
form.value = data.user
|
||||
imageUrlavatar.value = data.user.avatar
|
||||
// socialize_pic_full.value = data.socialize_pic_full
|
||||
sign_img_url.value = data.user.sign_img_url
|
||||
// userInfo.value = getUserInfo.user
|
||||
// form.value = getUserInfo.user
|
||||
// imageUrlavatar.value = getUserInfo.user.avatar
|
||||
// sign_img_url.value = getUserInfo.user.sign_img_url
|
||||
// socialize_pic_full.value = data.socialize_pic_full
|
||||
}
|
||||
const isEdit = ref(false)
|
||||
const showReSignQR = ref(false)
|
||||
const isEditPwd = ref(false)
|
||||
const pwdForm = reactive({
|
||||
password: '',
|
||||
@@ -293,28 +332,47 @@
|
||||
await getuserInfo()
|
||||
})
|
||||
const qrcodeUrl = computed(() => {
|
||||
const userStore = useUserStore() as any
|
||||
const userId = form.value?.id || userInfo.value?.id || ''
|
||||
const base = location.origin
|
||||
const token = (useUserStore() as any).accessToken || ''
|
||||
const params = new URLSearchParams({ userId: String(userId) })
|
||||
if (token) params.append('token', token)
|
||||
if (userStore?.accessToken) params.append('accessToken', userStore.accessToken)
|
||||
if (userStore?.language) params.append('lang', userStore.language)
|
||||
if (userStore?.companyabbr) params.append('companyabbr', userStore.companyabbr)
|
||||
if (userStore?.companyid) params.append('companyid', userStore.companyid)
|
||||
|
||||
if (userStore?.loginType) params.append('loginType', userStore.loginType)
|
||||
if (userStore?.systemsabbr) params.append('systemsabbr', userStore.systemsabbr)
|
||||
if (userStore?.systemsid) params.append('systemsid', userStore.systemsid)
|
||||
return `${base}/auth/signature/mobile?${params.toString()}`
|
||||
})
|
||||
const handleSignature = async () => {
|
||||
const userStore = useUserStore() as any
|
||||
const userId = form.value?.id || userInfo.value?.id || ''
|
||||
const base = location.origin
|
||||
const token = (useUserStore() as any).accessToken || ''
|
||||
const params = new URLSearchParams({ userId: String(userId) })
|
||||
if (token) params.append('token', token)
|
||||
if (userStore?.accessToken) params.append('accessToken', userStore.accessToken)
|
||||
if (userStore?.language) params.append('lang', userStore.language)
|
||||
if (userStore?.companyabbr) params.append('companyabbr', userStore.companyabbr)
|
||||
if (userStore?.companyid) params.append('companyid', userStore.companyid)
|
||||
|
||||
if (userStore?.loginType) params.append('loginType', userStore.loginType)
|
||||
if (userStore?.systemsabbr) params.append('systemsabbr', userStore.systemsabbr)
|
||||
if (userStore?.systemsid) params.append('systemsid', userStore.systemsid)
|
||||
window.location.href = `${base}/auth/signature/mobile?${params.toString()}`
|
||||
}
|
||||
const edit = async () => {
|
||||
if (isEdit.value) {
|
||||
const res = await UserService.editUserInfo(form.value)
|
||||
const payload: any = { ...(form.value as any) }
|
||||
delete payload.sign_img_url
|
||||
const res = await UserService.editUserInfo(payload)
|
||||
ElMessage.success(res?.message || '操作成功')
|
||||
getuserInfo()
|
||||
}
|
||||
isEdit.value = !isEdit.value
|
||||
if (isEdit.value === false) {
|
||||
showReSignQR.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const editPwd = async () => {
|
||||
@@ -561,4 +619,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.signature-img {
|
||||
width: 160px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user