|
@@ -1031,6 +1031,7 @@ import {
|
|
ElNotification,
|
|
ElNotification,
|
|
ElMessage,
|
|
ElMessage,
|
|
ElIcon,
|
|
ElIcon,
|
|
|
|
+ ElMessageBox,
|
|
} from 'element-plus'
|
|
} from 'element-plus'
|
|
import { CirclePlus, Close, CircleCloseFilled } from '@element-plus/icons-vue'
|
|
import { CirclePlus, Close, CircleCloseFilled } from '@element-plus/icons-vue'
|
|
import debounce from 'lodash.debounce'
|
|
import debounce from 'lodash.debounce'
|
|
@@ -1039,6 +1040,7 @@ import { $t } from '@/i18n/index'
|
|
import imageUpload from '@/components/ImageUpload.vue'
|
|
import imageUpload from '@/components/ImageUpload.vue'
|
|
// 用来对oss的图片、视频等媒体数据的url进行匹配替换
|
|
// 用来对oss的图片、视频等媒体数据的url进行匹配替换
|
|
import { getVendorList, createQuote } from '@/api/indent'
|
|
import { getVendorList, createQuote } from '@/api/indent'
|
|
|
|
+import userAPI from '@/api/user'
|
|
|
|
|
|
defineComponent({
|
|
defineComponent({
|
|
name: 'EditInfo',
|
|
name: 'EditInfo',
|
|
@@ -1329,6 +1331,22 @@ const changeVenderSelect = function (value: string | number, index: number) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const auditUser = ref('')
|
|
|
|
+const getCurrentAuditUser = () => {
|
|
|
|
+ userAPI.getAuditUser().then((res: any) => {
|
|
|
|
+ // console.log(res, 'res')
|
|
|
|
+ if (
|
|
|
|
+ res.code === 1 &&
|
|
|
|
+ Array.isArray(res.result.data) &&
|
|
|
|
+ res.result.data.length
|
|
|
|
+ ) {
|
|
|
|
+ const temp = res.result.data.filter((i: any) => i.type === 1)
|
|
|
|
+ // console.log(temp, 'temp')
|
|
|
|
+ if (temp.length) auditUser.value = temp[0].email
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+getCurrentAuditUser()
|
|
const createQuoteFunc = function () {
|
|
const createQuoteFunc = function () {
|
|
const params = {
|
|
const params = {
|
|
file: '', // 疑似永远为空
|
|
file: '', // 疑似永远为空
|
|
@@ -1336,7 +1354,7 @@ const createQuoteFunc = function () {
|
|
if (parentId) {
|
|
if (parentId) {
|
|
params.parent_id = parentId
|
|
params.parent_id = parentId
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ let notiList: string[] = []
|
|
let temp = cloneDeep(forms.value)
|
|
let temp = cloneDeep(forms.value)
|
|
temp = temp.map((item, index) => {
|
|
temp = temp.map((item, index) => {
|
|
const result = { ...item }
|
|
const result = { ...item }
|
|
@@ -1361,12 +1379,26 @@ const createQuoteFunc = function () {
|
|
return i.url.replace($mediaRegExp, '/')
|
|
return i.url.replace($mediaRegExp, '/')
|
|
})
|
|
})
|
|
.join(',')
|
|
.join(',')
|
|
|
|
+ if (result.vendor_id && result.vendor_name === result.vendor_id) {
|
|
|
|
+ notiList.push(result.vendor_name)
|
|
|
|
+ }
|
|
return result
|
|
return result
|
|
})
|
|
})
|
|
|
|
|
|
// 组装接口数据
|
|
// 组装接口数据
|
|
Object.assign(params, { lists: temp })
|
|
Object.assign(params, { lists: temp })
|
|
-
|
|
|
|
|
|
+ if (notiList.length) {
|
|
|
|
+ ElMessageBox.alert(
|
|
|
|
+ '您正在提交系统外供应商 ' +
|
|
|
|
+ notiList.map((i) => `[${i}]`).join(', ') +
|
|
|
|
+ '<br>本次操作已触发审核流程,审核人将会尽快处理,如有问题请联系:' +
|
|
|
|
+ `<a href="mailto:${auditUser.value}">${auditUser.value}</a>`,
|
|
|
|
+ '提示',
|
|
|
|
+ {
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ },
|
|
|
|
+ )
|
|
|
|
+ }
|
|
createQuote(params).then((response: any) => {
|
|
createQuote(params).then((response: any) => {
|
|
if (response.code !== 1) return
|
|
if (response.code !== 1) return
|
|
|
|
|