Browse Source

BUG修改

master
yejiaxing 10 months ago
parent
commit
a19214eb9f
  1. 7
      src/components/BasicForm/src/BasicForm.vue
  2. 20
      src/views/eam/basic/factoryArea/index.vue
  3. 33
      src/views/eam/basic/locationArea/index.vue

7
src/components/BasicForm/src/BasicForm.vue

@ -333,12 +333,17 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
/** 打开弹窗 */ /** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any) => { const open = async (type: string, row?: any, masterParmas?: any) => {
console.log(2222)
dialogVisible.value = true dialogVisible.value = true
console.log(333)
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
console.log(444)
formType.value = type formType.value = type
console.log(66)
resetForm() resetForm()
// //
// masterIdnumber // masterIdnumber
console.log(77)
if (masterParmas) { if (masterParmas) {
if (!row) { if (!row) {
row = { row = {
@ -347,8 +352,10 @@ const open = async (type: string, row?: any, masterParmas?: any) => {
} }
} }
} }
console.log(8)
if (row?.id || row?.masterId) { if (row?.id || row?.masterId) {
formLoading.value = true formLoading.value = true
console.log(99)
try { try {
nextTick(() => { nextTick(() => {
formRef.value.setValues(row) formRef.value.setValues(row)

20
src/views/eam/basic/factoryArea/index.vue

@ -119,9 +119,7 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { // }else if (val == 'export') { //
handleImport()
} else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() getList()
@ -211,21 +209,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '厂区导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -238,7 +221,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await FactoryAreaApi.importTemplate()
}) })
</script> </script>

33
src/views/eam/basic/locationArea/index.vue

@ -54,8 +54,6 @@
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="LocationArea.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="LocationArea.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/location-area/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -63,9 +61,9 @@ import download from '@/utils/download'
import { LocationArea,LocationAreaRules } from './locationArea.data' import { LocationArea,LocationAreaRules } from './locationArea.data'
import * as LocationAreaApi from '@/api/eam/basic/locationArea' import * as LocationAreaApi from '@/api/eam/basic/locationArea'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'LocationArea' }) defineOptions({ name: 'LocationArea' })
@ -101,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:locationArea:create'}), // defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn({hasPermi:'wms:locationArea:import'}), // defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'wms:locationArea:export'}), // defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -121,8 +119,6 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
@ -151,6 +147,7 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
console.log('11')
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
@ -198,21 +195,6 @@ const handleExport = async () => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库区导入模版.xls'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -225,7 +207,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await LocationAreaApi.importTemplate()
}) })
</script> </script>

Loading…
Cancel
Save