feat: 新增物料/成品/半成品页面一键直达BOM管理功能
This commit is contained in:
@ -421,7 +421,12 @@
|
||||
</div>
|
||||
|
||||
<div class="form-card production-card">
|
||||
<div class="card-title"><el-icon class="icon"><Setting /></el-icon><span>3. 生产与销售信息</span></div>
|
||||
<div class="card-title">
|
||||
<el-icon class="icon"><Setting /></el-icon><span>3. 生产与销售信息</span>
|
||||
<el-link type="success" :underline="false" style="margin-left: 15px; font-size: 13px;" @click="createBomForMaterial">
|
||||
<el-icon style="margin-right: 4px"><Plus /></el-icon>加入或查看BOM
|
||||
</el-link>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<el-row :gutter="24">
|
||||
|
||||
@ -557,6 +562,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, watch, computed } from 'vue'
|
||||
import { Plus, Setting, Refresh, Search, Box, House, Link, InfoFilled, Printer, Camera, Picture } from '@element-plus/icons-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElLoading } from 'element-plus'
|
||||
import dayjs from 'dayjs'
|
||||
import request from '@/utils/request'
|
||||
@ -614,6 +620,7 @@ const vLoadmore = {
|
||||
}
|
||||
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const loading = ref(false)
|
||||
const submitting = ref(false)
|
||||
const visible = ref(false)
|
||||
@ -1263,6 +1270,20 @@ const handleScannerConfirm = (result: string) => {
|
||||
ElMessage.success('序列号已提取')
|
||||
}
|
||||
|
||||
// 快速基于此物料创建 BOM
|
||||
const createBomForMaterial = () => {
|
||||
if (!form.base_id) return ElMessage.warning('请先锁定物料基础信息')
|
||||
const routeUrl = router.resolve({
|
||||
path: '/bom',
|
||||
query: {
|
||||
create_for_id: form.base_id,
|
||||
parent_name: form.material_name,
|
||||
parent_spec: form.spec_model
|
||||
}
|
||||
})
|
||||
window.open(routeUrl.href, '_blank')
|
||||
}
|
||||
|
||||
const submitForm = async () => {
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
if(valid) {
|
||||
|
||||
@ -489,6 +489,9 @@
|
||||
<div style="display: flex; align-items: center;">
|
||||
<el-icon class="icon"><Setting/></el-icon>
|
||||
<span>3. 生产与成本信息</span>
|
||||
<el-link type="success" :underline="false" style="margin-left: 15px; font-size: 13px;" @click="createBomForMaterial">
|
||||
<el-icon style="margin-right: 4px"><Plus /></el-icon>加入或查看BOM
|
||||
</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
@ -614,6 +617,7 @@
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, onMounted, watch, computed} from 'vue'
|
||||
import {Plus, Setting, Refresh, Search, Lock, Box, House, InfoFilled, Link, Printer, Camera, Picture} from '@element-plus/icons-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {ElMessage, ElLoading} from 'element-plus'
|
||||
import dayjs from 'dayjs'
|
||||
import request from '@/utils/request'
|
||||
@ -673,6 +677,7 @@ const vLoadmore = {
|
||||
// 状态与变量
|
||||
// ------------------------------------
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
const loading = ref(false)
|
||||
const submitting = ref(false)
|
||||
const visible = ref(false)
|
||||
@ -1346,6 +1351,20 @@ const handleScannerConfirm = (result: string) => {
|
||||
ElMessage.success('序列号已提取')
|
||||
}
|
||||
|
||||
// 快速基于此物料创建 BOM
|
||||
const createBomForMaterial = () => {
|
||||
if (!form.base_id) return ElMessage.warning('请先锁定物料基础信息')
|
||||
const routeUrl = router.resolve({
|
||||
path: '/bom',
|
||||
query: {
|
||||
create_for_id: form.base_id,
|
||||
parent_name: form.material_name,
|
||||
parent_spec: form.spec_model
|
||||
}
|
||||
})
|
||||
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