|
|
@ -45,8 +45,8 @@ |
|
|
|
:rules="PackageRules" |
|
|
|
:formAllSchemas="Package.allSchemas" |
|
|
|
:searchTableParams="searchTableParams" |
|
|
|
:apiUpdate="PackageApi.updateBom" |
|
|
|
:apiCreate="PackageApi.createBom" |
|
|
|
:apiUpdate="PackageApi.updatePackage" |
|
|
|
:apiCreate="PackageApi.createPackage" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
:isBusiness="false" |
|
|
|
/> |
|
|
@ -60,6 +60,7 @@ |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
import download from '@/utils/download' |
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
import { Package,PackageRules } from './package.data' |
|
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
@ -140,21 +141,29 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
return false |
|
|
|
} else { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
// const isShowMainButton = (row,val) => { |
|
|
|
// if (val.indexOf(row.status) > -1) { |
|
|
|
// return false |
|
|
|
// } else { |
|
|
|
// return true |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
// const butttondata = (row) => { |
|
|
|
// return [ |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), // 删除 |
|
|
|
// defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
// ] |
|
|
|
// } |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:package:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:package:delete'}), // 删除 |
|
|
|
defaultButtons.mainListPointBtn(null), // 标签打印 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
@ -162,6 +171,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} else if (val == 'point') { // 标签打印 |
|
|
|
handlePoint(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -206,6 +217,13 @@ const handleExport = async () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const BASE_URL = 'http://dev.ccwin-in.com:25110' |
|
|
|
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken()) |
|
|
|
// 标签打印 |
|
|
|
const handlePoint = async (id) => { |
|
|
|
window.open(src.value+'&id='+id) |
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|