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) => {
console.log(2222)
dialogVisible.value = true
console.log(333)
dialogTitle.value = t('action.' + type)
console.log(444)
formType.value = type
console.log(66)
resetForm()
//
// masterIdnumber
console.log(77)
if (masterParmas) {
if (!row) {
row = {
@ -347,8 +352,10 @@ const open = async (type: string, row?: any, masterParmas?: any) => {
}
}
}
console.log(8)
if (row?.id || row?.masterId) {
formLoading.value = true
console.log(99)
try {
nextTick(() => {
formRef.value.setValues(row)

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

@ -119,9 +119,7 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
}else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
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) => {
tableObject.params = {
@ -238,7 +221,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await FactoryAreaApi.importTemplate()
})
</script>

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

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

Loading…
Cancel
Save