Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 5 months ago
parent
commit
d47cb7bfd4
  1. 2
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  2. 25
      src/components/Detail/src/Detail.vue
  3. 1
      src/utils/dict.ts
  4. 17
      src/views/eam/sparepartsinlocation/index.vue
  5. 41
      src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts
  6. 13
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

2
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -51,7 +51,7 @@ export const getSupplierinvoiceRequestDetail = async (id: number) => {
}
// 新增供应商发票申请子
export const createSupplierinvoiceRequestDetail = async (data: SupplierinvoiceRequestDetailVO) => {
export const createSupplierinvoiceRequestDetail = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-detail/create`, data })
}

25
src/components/Detail/src/Detail.vue

@ -394,7 +394,13 @@ const props = defineProps({
type:Array,
required: false,
default: () => []
}
},
//--
mainSubmitCreateApi:{
type: Boolean,
required: false,
default: false
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@ -676,7 +682,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
}
}
defineExpose({ openDetail, formRef }) // open
const updateList = ()=>{
getList()
}
defineExpose({ openDetail, formRef ,updateList}) // open
//
const getRemarkList = async () => {
@ -875,13 +884,19 @@ const submitForm = async (formType, data) => {
const searchTableSuccess1 = (formField, searchField, val, formRef) => {
searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',')
console.log('searchTableSuccess1',searchTableFormModel)
submitForm(searchTableFormType.value,searchTableFormModel.value)
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
if(props.mainSubmitCreateApi){
emit('searchTableSuccessDetail', formField, searchField, val, formRef,searchTableFormModel.value)
}else{
submitForm(searchTableFormType.value,searchTableFormModel.value)
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const emit = defineEmits([
'searchTableSuccessDetail',
@ -893,7 +908,7 @@ const emit = defineEmits([
'onBlur',
'detailBasicFormOnChange',
'formFormDateChange',
'buttonBaseClick'
'buttonBaseClick',
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {

1
src/utils/dict.ts

@ -367,4 +367,5 @@ export enum DICT_TYPE {
OFF_BACK_STATUS = 'off_back_status',
SPAREPARTS_APPLY_STATUS_ENUM = 'spareparts_apply_status_enum',// 流程状态
IS_LINE_ITEM = 'is_line_item', // 是否是线边
PUT_IN_TYPE = 'put_in_type',// 入库类型
}

17
src/views/eam/sparepartsinlocation/index.vue

@ -82,7 +82,7 @@
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/eam/sparePartsApplyDetail/import"
url="/eam/spare-parts-in-location-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row['areaCode'] = val[0].areaCode
row['sparePartsCode'] = val[0].sparePartsCode
row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
}
} else {
if (formField == 'locationCode') {
@ -138,6 +139,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
}
@ -149,9 +151,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
if (formField == 'sparePartsCode') {
setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty
if (formField == 'locationCode') {
setV['locationCode'] = val[0].code
setV['areaCode'] = val[0].areaCode
setV['sparePartsCode'] = val[0].sparePartsCode
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
formRef.setValues(setV)
})
@ -218,8 +223,8 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }) //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:sparePartsInLocationMain:delete' }) //
defaultButtons.mainListEditBtn({ hasPermi: 'eam:spare-parts-in-location-main:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:spare-parts-in-location-main:delete' }) //
]
}

41
src/views/eam/sparepartsinlocation/sparePartsInLocationMain.data.ts

@ -10,10 +10,7 @@ import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
export const SparePartsInLocationMainRules = reactive({
number: [required],
theme: [required],
// status: [required],
// areaCode: [required],
// locationCode: [required],
concurrencyStamp: [required],
type: [required],
})
// 备件入库主表
export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -38,6 +35,13 @@ export const SparePartsInLocationMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'theme',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
},
{
label: '流程状态',
@ -140,7 +144,6 @@ export const SparePartsInLocationDetailRules = reactive({
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
concurrencyStamp: [required],
})
export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -167,19 +170,19 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm: {
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择备件编号', // 输入框占位文本
// searchField: 'itemNumber', // 查询弹窗赋值字段
// searchTitle: '备件信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
// ]
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
{
@ -193,7 +196,7 @@ export const SparePartsInLocationDetail = useCrudSchemas(reactive<CrudSchema[]>(
}
},
tableForm:{
// disabled: true
disabled: true
}
},
{

13
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -156,6 +156,8 @@
:detailButtonIsShowAdd="true"
@buttonBaseClick="detailButtonBaseClick"
@tableFormButton="tableFormButton"
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
@ -174,8 +176,8 @@
/>
</template>
<script setup lang="ts">
//
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { SupplierinvoiceRequestMain,
@ -233,6 +235,15 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
})
}
}
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({
masterId:searchTableFormModel.masterId,
subList:val
})
detailRef.value.updateList()
}
//
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {

Loading…
Cancel
Save