feat(buy): 入库编辑弹窗增加'前往修改基础信息'跳转按钮
This commit is contained in:
@ -266,6 +266,16 @@
|
||||
<div style="display: flex; align-items: center;">
|
||||
<el-icon class="icon"><Box/></el-icon>
|
||||
<span>1. 基础信息</span>
|
||||
|
||||
<el-link
|
||||
v-if="form.base_id"
|
||||
type="primary"
|
||||
:underline="false"
|
||||
style="margin-left: 15px; font-size: 13px;"
|
||||
@click="openMaterialInNewTab"
|
||||
>
|
||||
<el-icon style="margin-right: 4px"><EditPen /></el-icon>前往修改基础信息
|
||||
</el-link>
|
||||
</div>
|
||||
<span class="sub-title" v-if="dialogStatus === 'create'"> (请先搜索锁定物料)</span>
|
||||
</div>
|
||||
@ -666,7 +676,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, onMounted, watch, computed} from 'vue'
|
||||
import {Plus, Setting, Refresh, Search, Lock, Box, House, InfoFilled, Link, Printer, Camera, Delete, Picture} from '@element-plus/icons-vue'
|
||||
import {Plus, Setting, Refresh, Search, Lock, Box, House, InfoFilled, Link, Printer, Camera, Delete, Picture, EditPen} from '@element-plus/icons-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
import {ElMessage, ElMessageBox, ElLoading} from 'element-plus'
|
||||
import dayjs from 'dayjs'
|
||||
import request from '@/utils/request'
|
||||
@ -1394,6 +1406,20 @@ const handleUpdate = (row: any) => {
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
// 在新标签页打开基础信息编辑
|
||||
const openMaterialInNewTab = () => {
|
||||
if (!form.base_id) {
|
||||
return ElMessage.warning('请先选择一个物料')
|
||||
}
|
||||
const routeUrl = router.resolve({
|
||||
path: '/material',
|
||||
query: {
|
||||
edit_id: form.base_id
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
|
||||
const submitForm = async () => {
|
||||
if (!formRef.value) return
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user