Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into intex

intex_online20250311
songguoqiang 3 weeks ago
parent
commit
9b632972c7
  1. 5
      src/api/wms/deliTimeWms/index.ts
  2. 4
      src/api/wms/modelDeliTime/index.ts
  3. 5
      src/views/wms/basicDataManage/supplierManage/deliTimeWms/index.vue
  4. 60
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue
  5. 33
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

5
src/api/wms/deliTimeWms/index.ts

@ -50,4 +50,9 @@ export const exportDeliTime = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/deli-time-wms/get-import-template' })
}
// 校验是否使用
export const getIsUse = async (id: number) => {
return await request.get({ url: `/wms/deli-time-wms/get?id=` + id })
}

4
src/api/wms/modelDeliTime/index.ts

@ -28,6 +28,10 @@ export const createSupplierAddrDeliTimeDetail = async (data: SupplierAddrDeliTim
return await request.post({ url: `/wms/model-deli-time-main/create`, data })
}
export const addModelDeliTimeDetail = async (data: SupplierAddrDeliTimeDetailVO) => {
return await request.post({ url: `/wms/model-deli-time-detail/addDetail`, data })
}
// 修改供应商地点便次时间配置明细
export const updateSupplierAddrDeliTimeDetail = async (data: SupplierAddrDeliTimeDetailVO) => {
return await request.put({ url: `/wms/model-deli-time-main/update`, data })

5
src/views/wms/basicDataManage/supplierManage/deliTimeWms/index.vue

@ -191,6 +191,11 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
const isUse = await DeliTimeWmsApi.getIsUse(id)
if (isUse) {
message.warning('该编号已经配置受入号便次时间,不可删除')
return
}
try {
//
await message.delConfirm()

60
src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue

@ -69,16 +69,31 @@
:apiCreate="ModelDeliTimeDetailApi.createPurchaseClaimRequestDetail"
:apiUpdate="ModelDeliTimeDetailApi.updatePurchaseClaimRequestDetail"
:apiPage="ModelDeliTimeDetailApi.getSupplierAddrDeliTimeDetailPage"
:apiDelete="ModelDeliTimeDetailApi.deletePurchaseClaimRequestDetail"
:apiDelete="ModelDeliTimeDetailApi.deleteSupplierAddrDeliTimeDetail"
:detailButtonIsShowDelete="true"
:detailButtonIsShowAdd="false"
:detailButtonIsShowAdd="true"
:detailButtonIsShowEdit='false'
:detailButtonIsShowAddStatusArray="[]"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isChangeDetailDrawer="[]"
:changeDetailDrawer="true"
@detailOpenForm="detailOpenForm"
/>
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- :detailAllSchemas="ModelDeliTimeDetail.allSchemas" -->
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplier-addr-deli-time-detail/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/wms/model-deli-time-detail/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:isShowOut="true"
:updateIsDisable="true"
:appendIsDisable="true"
:mode="3"
/>
</template>
<script setup lang="ts">
@ -90,6 +105,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 { DeliTimeWms } from '../deliTimeWms/deliTimeWms.data'
import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms'
defineOptions({ name: 'ModelDeliTime' })
@ -359,7 +376,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')
}
@ -417,6 +436,41 @@ const searchFormClick = (searchData) => {
getList() //
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter((item) => !selection.includes(item))
}
const searchTableRef = ref()
const detailOpenForm = (type, row) => {
searchTableRef.value.open(
'便次时间配置',
DeliTimeWms.allSchemas,
DeliTimeWmsApi.getDeliTimePage,
null,
DeliTimeWms.allSchemas.searchSchema,
true,
null,
null,
null,
null,
null
// searchTableSelections.value
)
}
const submitItem = async (formType, data, val, tableList) => {
console.log('formType',formType)
console.log('data',data)
console.log('val',val)
console.log('tableList',tableList)
val.forEach((item) => {
item.masterId = masterId;
});
await ModelDeliTimeDetailApi.addModelDeliTimeDetail(val)
message.success(t('common.createSuccess'))
detailRef.value.updateList()
}
/** 初始化 **/
onMounted(async () => {
getList()

33
src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

@ -165,6 +165,10 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
form: {
component: 'InputNumber',
value: 0,
componentProps: {
min:0,
precision:0
}
},
},
{
@ -277,19 +281,32 @@ export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'shift',
sort: 'custom',
isForm: false,
dictType: DICT_TYPE.SHIFT,
dictClass: 'string',
tableForm:{
disabled:true,
type:'Select'
}
},
{
label: '开始时间',
field: 'beginTime',
sort: 'custom',
label: '操作',
field: 'action',
isForm: false,
formatter: dateFormatter,
tableForm:{
disabled:true,
formatter: dateFormatter,
isTableForm:false,
table: {
width: 150,
fixed: 'right'
}
},
}
// {
// label: '开始时间',
// field: 'beginTime',
// sort: 'custom',
// isForm: false,
// formatter: dateFormatter,
// tableForm:{
// disabled:true,
// formatter: dateFormatter,
// }
// },
]))
Loading…
Cancel
Save