Browse Source

YT-2057供应商地点便次时间配置明细页面缺少新增,编辑,删除功能

intex_online20250311
zhaoyiran 4 weeks ago
parent
commit
b0e1785f84
  1. 8
      src/api/wms/supplierAddrDeliTime/index.ts
  2. 18
      src/views/wms/basicDataManage/supplierManage/supplierAddrDeliTime/index.vue

8
src/api/wms/supplierAddrDeliTime/index.ts

@ -23,11 +23,17 @@ export const getSupplierAddrDeliTimeDetail = async (id: number) => {
return await request.get({ url: `/wms/supplier-addr-deli-time-detail/get?id=` + id })
}
// 新增供应商地点便次时间配置明细
// 创建供应商地点便次时间
export const createSupplierAddrDeliTimeDetail = async (data: SupplierAddrDeliTimeDetailVO) => {
return await request.post({ url: `/wms/supplier-addr-deli-time-main/create`, data })
}
// 新增供应商地点便次时间配置明细
export const addSupplierAddrDeliTimeDetail = async (data: SupplierAddrDeliTimeDetailVO) => {
return await request.post({ url: `/wms/supplier-addr-deli-time-detail/addDetail`, data })
}
// 修改供应商地点便次时间配置明细
export const updateSupplierAddrDeliTimeDetail = async (data: SupplierAddrDeliTimeDetailVO) => {
return await request.put({ url: `/wms/supplier-addr-deli-time-main/update`, data })

18
src/views/wms/basicDataManage/supplierManage/supplierAddrDeliTime/index.vue

@ -95,6 +95,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { debug } from 'console'
import { DeliTime } from '../deliTime/deliTime.data'
import * as DeliTimeApi from '@/api/wms/deliTime'
defineOptions({ name: 'SupplierAddrDeliTime' })
@ -349,7 +351,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */
const detailRef = ref()
const detailData = ref({})
const masterId = ref(0)
const openDetail = (row: any, titleName: any, titleValue: any) => {
masterId.value = row.masterId
detailData.value = row
detailRef.value.openDetail(row, titleName, titleValue, 'basicSupplierAddrDeliTimeDetail')
}
@ -412,11 +416,11 @@ const tableSelectionDelete = (selection) => {
const searchTableRef = ref()
const detailOpenForm = (type, row) => {
searchTableRef.value.open(
'选择设备保养项',
SupplierAddrDeliTime.allSchemas,
SupplierAddrDeliTimeDetailApi.getSupplierAddrDeliTimeDetailPage,
'便次时间配置',
DeliTime.allSchemas,
DeliTimeApi.getDeliTimePage,
null,
SupplierAddrDeliTime.allSchemas.searchSchema,
DeliTime.allSchemas.searchSchema,
true,
null,
null,
@ -431,6 +435,12 @@ const submitItem = async (formType, data, val, tableList) => {
console.log('data',data)
console.log('val',val)
console.log('tableList',tableList)
val.forEach((item) => {
item.masterId = masterId;
});
await SupplierAddrDeliTimeDetailApi.addSupplierAddrDeliTimeDetail(val)
message.success(t('common.createSuccess'))
detailRef.value.updateList()
}
/** 初始化 **/
onMounted(async () => {

Loading…
Cancel
Save