Browse Source

BUG修改

master
parent
commit
5bdb1bc3e3
  1. 14
      src/utils/disposition/defaultButtons.ts
  2. 2
      src/views/eam/item/adjustRecord/index.vue
  3. 36
      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) { export function chooseDeviceBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

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

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

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

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

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

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

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

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

Loading…
Cancel
Save