Browse Source

BUG修改

master
parent
commit
5bdb1bc3e3
  1. 14
      src/utils/disposition/defaultButtons.ts
  2. 2
      src/views/eam/item/adjustRecord/index.vue
  3. 44
      src/views/eam/item/countadjustWork/index.vue
  4. 18
      src/views/eam/item/itemAccounts/index.vue
  5. 9
      src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts

14
src/utils/disposition/defaultButtons.ts

@ -829,6 +829,20 @@ export function selectItemBtn(option:any) {
})
}
// 主列表-备件
export function replaceLocation(option:any) {
return __defaultBtnOption(option,{
label: '更换库位',
name: 'replaceLocation',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-备件选设备
export function chooseDeviceBtn(option:any) {
return __defaultBtnOption(option,{

2
src/views/eam/item/adjustRecord/index.vue

@ -212,7 +212,7 @@
await message.exportConfirm()
//
exportLoading.value = true
const data = await AdjustRecordMainApi.handleMainExport(id)
const data = await AdjustRecordMainApi.exportAdjustRecordMain(id)
download.excel(data, '盘点工单.xlsx')
} catch {
} finally {

44
src/views/eam/item/countadjustWork/index.vue

@ -6,8 +6,7 @@
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas" />
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="CountJobMain.allSchemas" />
<!-- 列表 -->
<ContentWrap>
@ -29,9 +28,9 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="CountJobMainRules" :formAllSchemas="CountJobMain.allSchemas"
:tableAllSchemas="CountJobDetail.allSchemas" :tableFormRules="CountJobDetailRules" :tableData="tableData"
:apiUpdate="CountJobMainApi.updateCountJobMain" :apiCreate="CountJobMainApi.createCountJobMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
:apiUpdate="CountJobMainApi.updateCountJobMain" :apiCreate="CountJobMainApi.createCountJobMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="CountJobMain.allSchemas"
@ -41,12 +40,8 @@
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/eam/countJobDetail/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
<ImportForm ref="importFormRef" url="/eam/countJobDetail/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template>
<script setup lang="ts">
@ -147,7 +142,7 @@
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) {
@ -162,26 +157,21 @@
return [
defaultButtons.mainExport(null),//
defaultButtons.mainAdjustImport(null),//
// defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
}
}
else if (val == 'mainExport') { //
handleMainExport(row.id)
}
else if (val == 'mainAdjustImport') { //
handleImport()
}
else if (val == 'mainOrderClo') { //
handleClose(row.id)
}
else if (val == 'delete') { //
handleDelete(row.id)
}
@ -212,7 +202,7 @@
await getList()
} catch { }
}
/** 列表导出按钮操作 */
const exportLoading = ref(false) //
const handleMainExport = async (id : number) => {
@ -228,20 +218,6 @@
exportLoading.value = false
}
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await CountJobMainApi.closeCountJobMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const handleExport = async () => {

18
src/views/eam/item/itemAccounts/index.vue

@ -77,7 +77,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
const locationNumber = ref()
const id = ref()
const wantId1 = ref()
routeName.value = route.name
const tableColumns = ref(ItemAccounts.allSchemas.tableColumns)
@ -139,7 +139,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:itemAccounts:update'}), //
defaultButtons.selectItemBtn(null), //
defaultButtons.replaceLocation(null), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:itemAccounts:delete'}), //
]
@ -149,17 +149,16 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'selectItem') {
} else if (val == 'replaceLocation') {
openItem(row.locationNumber,row.id)
}
}
const searchTableRef = ref()
/** 绑定备件操作 */
const openItem = async (number: String,id: number) => {
console.log(id)
const openItem = async (number: String,wantId: number) => {
locationNumber.value = number
id = id
wantId1.value= wantId
searchTableRef.value.open(
'选择备件',
Item.allSchemas,
@ -176,14 +175,13 @@ const openItem = async (number: String,id: number) => {
const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, rowRef) => {
const deviceItemRelList = selections.map((element) => ({
id: id.value,
id: wantId1.value,
locationNumber: locationNumber.value,
itemNumber: element.number
itemNumber: element.number,
}))
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
console.log('res', res)
})
console.log('deviceItemRelList', deviceItemRelList)
}
const getItemWithOutBind = async () => {

9
src/views/eam/item/itemLocationReplace/itemLocationReplace.data.ts

@ -29,7 +29,7 @@ export const ItemLocationReplace = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
},
{
label: '创建时间',
label: '变更时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
@ -44,18 +44,11 @@ export const ItemLocationReplace = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '描述',
field: 'describe',
sort: 'custom',
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}

Loading…
Cancel
Save