ljlong_2630 9 months ago
parent
commit
60c78b9d52
  1. 4
      src/api/eam/item/applicationRecordMain/index.ts
  2. 10
      src/components/Detail/src/approveDetail.vue
  3. 6
      src/views/eam/basic/locationArea/locationArea.data.ts
  4. 7
      src/views/eam/item/applicationRecord/index.vue
  5. 7
      src/views/eam/item/itemAccounts/index.vue
  6. 16
      src/views/eam/item/itemApplyMain/index.vue

4
src/api/eam/item/applicationRecordMain/index.ts

@ -48,12 +48,12 @@ export const deleteApplicationRecordMain = async (id: number) => {
// 审批通过备件申领记录主
export const agreeApplicationRecordMain = async (id: number) => {
return await request.delete({ url: `/eam/item-apply-request-main/agree?id=` + id })
return await request.get({ url: `/eam/item-apply-request-main/agree?id=` + id })
}
// 审批驳回备件申领记录主
export const disAgreeApplicationRecordMain = async (id: number) => {
return await request.delete({ url: `/eam/item-apply-request-main/disAgree?id=` + id })
return await request.get({ url: `/eam/item-apply-request-main/disAgree?id=` + id })
}
// 导出备件申领记录主 Excel

10
src/components/Detail/src/approveDetail.vue

@ -373,12 +373,12 @@
}
else if (val == 'agree') {
//
agree()
agree(detailData.value.id)
}
else if (val == 'disAgree') {
//
disAgree()
disAgree(detailData.value.id)
}
// else if (val == 'disagree') {
// //
@ -399,9 +399,10 @@
await props.apiAgree(id)
message.success(t('common.success'))
//
await getList()
isShowDrawer.value = false
updateKey.value += 1
setBeiJian()
emit('agree')
} catch { }
}
@ -415,9 +416,10 @@
await props.apiDisAgree(id)
message.success(t('common.success'))
//
await getList()
isShowDrawer.value = false
updateKey.value += 1
setBeiJian()
emit('agree')
} catch { }
}

6
src/views/eam/basic/locationArea/locationArea.data.ts

@ -3,6 +3,10 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const LocationAreaRules = reactive({
number: [
{ required: true, message: '请输入库区编号', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入库区名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
@ -15,7 +19,7 @@ export const LocationArea = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
isForm: true,
table: {
width: 180,
fixed: 'left'

7
src/views/eam/item/applicationRecord/index.vue

@ -50,7 +50,8 @@
:apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain"
:apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain"
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage"
@searchTableSuccessDetail="searchTableSuccessDetail" />
@searchTableSuccessDetail="searchTableSuccessDetail"
@agree="getList"/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -180,7 +181,7 @@
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'approve') { //
} else if (val == 'approve') { //
handleApprove(row, '单据号', row.number)
} else if (val == 'delete') { //
handleDelete(row.id)
@ -202,6 +203,8 @@
const detailRef1 = ref()
const handleApprove = (row : any, titleName : any, titleValue : any) => {
detailRef1.value.openDetail(row, titleName, titleValue, 'basicApplicationRecordMain')
//
getList()
}
/** 删除按钮操作 */

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

@ -181,13 +181,18 @@ const submitItem = async (formFieldRef, searchFieldRef, selections, typeRef, row
}))
ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
message.success(t('更换成功'))
//
getList()
})
}
const getItemWithOutBind = async () => {
try {
const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema
...Item.allSchemas.searchSchema,
available:"TRUE"
})
if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema);

16
src/views/eam/item/itemApplyMain/index.vue

@ -73,12 +73,18 @@
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
console.log(formField);
//
row[formField] = val[0][searchField]
row['itemNumber'] = val[0]['itemNumber']
row['isRadeIn'] = val[0]['isRadeIn']
row['currentQty'] = val[0]['qty']
row['available'] = val[0]['available']
if (formField == 'itemNumber') {
row[formField] = val[0][searchField]
row['itemNumber'] = val[0]['itemNumber']
row['isRadeIn'] = val[0]['isInAccount']
row['currentQty'] = val[0]['qty']
row['available'] = val[0]['available']
}
if (formField == 'deviceNumber') {
row['deviceNumber'] = val[0]['number']
}
} else {
const setV = {}
setV[formField] = val[0][searchField]

Loading…
Cancel
Save