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) => { 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) => { 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 // 导出备件申领记录主 Excel

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

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

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

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

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

@ -50,7 +50,8 @@
:apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain" :apiAgree="ApplicationRecordMainApi.agreeApplicationRecordMain"
:apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain" :apiDisAgree="ApplicationRecordMainApi.disAgreeApplicationRecordMain"
:apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage" :apiPage="ApplicationRecordDetailApi.getApplicationRecordDetailPage"
@searchTableSuccessDetail="searchTableSuccessDetail" /> @searchTableSuccessDetail="searchTableSuccessDetail"
@agree="getList"/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -180,7 +181,7 @@
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'approve') { // } else if (val == 'approve') { //
handleApprove(row, '单据号', row.number) handleApprove(row, '单据号', row.number)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -202,6 +203,8 @@
const detailRef1 = ref() const detailRef1 = ref()
const handleApprove = (row : any, titleName : any, titleValue : any) => { const handleApprove = (row : any, titleName : any, titleValue : any) => {
detailRef1.value.openDetail(row, titleName, titleValue, 'basicApplicationRecordMain') 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) => { ItemAccountsApi.replaceLocation(deviceItemRelList).then((res) => {
message.success(t('更换成功'))
//
getList()
}) })
} }
const getItemWithOutBind = async () => { const getItemWithOutBind = async () => {
try { try {
const res = await ItemApi.getItemPage({ const res = await ItemApi.getItemPage({
...Item.allSchemas.searchSchema ...Item.allSchemas.searchSchema,
available:"TRUE"
}) })
if (res.list?.length > 0) { if (res.list?.length > 0) {
// const response = await getDeviceItemPage(DeviceAccounts.allSchemas.searchSchema); // 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) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
console.log(formField);
// //
row[formField] = val[0][searchField] if (formField == 'itemNumber') {
row['itemNumber'] = val[0]['itemNumber'] row[formField] = val[0][searchField]
row['isRadeIn'] = val[0]['isRadeIn'] row['itemNumber'] = val[0]['itemNumber']
row['currentQty'] = val[0]['qty'] row['isRadeIn'] = val[0]['isInAccount']
row['available'] = val[0]['available'] row['currentQty'] = val[0]['qty']
row['available'] = val[0]['available']
}
if (formField == 'deviceNumber') {
row['deviceNumber'] = val[0]['number']
}
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

Loading…
Cancel
Save