Browse Source

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

intex_online20250311
songguoqiang 4 weeks ago
parent
commit
6de9f82db9
  1. 4
      src/api/wms/deliveryCalendar/index.ts
  2. 26
      src/config/axios/index.ts
  3. 3
      src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts
  4. 9
      src/views/wms/basicDataManage/supplierManage/deliTime/index.vue
  5. 12
      src/views/wms/basicDataManage/supplierManage/deliveryCalendar/deliveryCalendar.data.ts
  6. 45
      src/views/wms/basicDataManage/supplierManage/deliveryCalendar/index.vue
  7. 26
      src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue

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

@ -40,8 +40,8 @@ export const updateDeliveryCalendar = async (data: DeliveryCalendarVO) => {
}
// 删除送货日历
export const deleteDeliveryCalendar = async (id: number) => {
return await request.delete({ url: `/wms/delivery-calendar/delete?id=` + id })
export const deleteDeliveryCalendar = async (data) => {
return await request.post({ url: `/wms/delivery-calendar/delete`, data })
}
// 导出送货日历 Excel

26
src/config/axios/index.ts

@ -24,6 +24,24 @@ const request = (option: any) => {
}
})
}
const requestHeaders = (option: any) => {
const { url, method, params, data, headersType, responseType,headers, ...config } = option
return service({
url: url,
method,
params,
data,
...config,
responseType: responseType,
headers: {
'Content-Type': headersType || default_headers,
'language': language,
'Referer1': router.currentRoute.value.fullPath.split('?')[0],
...headers
}
})
}
export default {
get: async <T = any>(option: any) => {
const res = await request({ method: 'GET', ...option })
@ -61,6 +79,14 @@ export default {
const res = await request({ method: 'POST', responseType: 'blob', ...option })
return res as unknown as Promise<T>
},
downloadHeaders: async <T = any>(option: any) => {
const res = await requestHeaders({ method: 'GET', responseType: 'blob', ...option })
return res as unknown as Promise<T>
},
downloadPostHeaders: async <T = any>(option: any) => {
const res = await requestHeaders({ method: 'POST', responseType: 'blob', ...option })
return res as unknown as Promise<T>
},
upload: async <T = any>(option: any) => {
option.headersType = 'multipart/form-data'
const res = await request({ method: 'POST', ...option })

3
src/views/wms/basicDataManage/supplierManage/deliTime/deliTime.data.ts

@ -53,6 +53,9 @@ export const DeliTime = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
detail: {
dateFormat:'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '创建者',

9
src/views/wms/basicDataManage/supplierManage/deliTime/index.vue

@ -28,7 +28,7 @@
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<el-button type="primary" link @click="openDetail(row, '编号', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
@ -155,7 +155,14 @@ const openForm = (type: string, row?: any) => {
item.componentProps.disabled = true
}
})
} else {
DeliTime.allSchemas.formSchema.forEach((item) => {
if(item.field == 'code'){
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}

12
src/views/wms/basicDataManage/supplierManage/deliveryCalendar/deliveryCalendar.data.ts

@ -77,6 +77,18 @@ export const DeliveryCalendar = useCrudSchemas(
sort: 'custom',
isSearch: true
},
{
label: '年月',
field: 'yearAndMonth',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '日期',
field: 'yearAndMonth',

45
src/views/wms/basicDataManage/supplierManage/deliveryCalendar/index.vue

@ -26,6 +26,9 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
row-key="id"
:selection="true"
@getSelectionRows="getSelectionRows"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
@ -106,11 +109,13 @@ const { tableObject, tableMethods } = useTable({
//
const { getList, setSearchParams } = tableMethods
const selectionRowsData = ref([])//
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:delivery-calendar:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:delivery-calendar:import'}), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.mainLisSelectiontDeleteBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -132,6 +137,8 @@ const buttonBaseClick = (val, item) => {
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'selection_delete') { //
handleDelete()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
@ -151,7 +158,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
handleDelete(row)
}
}
@ -192,12 +199,37 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
const handleDelete = async (row?:any) => {
try {
//
let list = []
if (row) {
//
await message.delConfirm()
//
await DeliveryCalendarApi.deleteDeliveryCalendar(id)
list.push({
supplierCode:row.supplierCode,
supplierAddress:row.supplierAddress,
model:row.model,
yearAndMonth:row.yearAndMonth,
})
} else {
console.log(selectionRowsData.value)
if (selectionRowsData.value.length == 0) {
message.warning('请选择数据')
return
}
//
await message.delConfirm()
selectionRowsData.value.forEach(item => {
list.push({
supplierCode:item.supplierCode,
supplierAddress:item.supplierAddress,
model:item.model,
yearAndMonth:item.yearAndMonth,
})
})
}
await DeliveryCalendarApi.deleteDeliveryCalendar(list)
message.success(t('common.delSuccess'))
//
await getList()
@ -276,7 +308,10 @@ const updateDateTableColumns = ()=>{
tableColumns.value = [...orginTableColumns.value,...dateColumns.value]
console.log('tableColumns',tableColumns.value)
}
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
selectionRowsData.value = currentPageSelectionRows
console.log(selectionRowsData.value)
}
/** 初始化 **/
onMounted(async () => {
getListHead()

26
src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue

@ -33,8 +33,8 @@
</el-button>
</template>
<template #shift="{row}">
<el-tag type="primary" v-if="row.isDay == 1">白班</el-tag>
<el-tag type="primary" v-if="row.isNight == 1">夜班</el-tag>
<el-tag type="primary" v-if="row.isDay == 'TRUE'">白班</el-tag>
<el-tag type="primary" v-if="row.isNight == 'TRUE'">夜班</el-tag>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
@ -177,12 +177,26 @@ const openForm = (type: string, row?: any) => {
if (type == 'update') {
row.shift = []
row.modelShow = row.model?.split(',')
if (row.isDay == 1) {
if (row.isDay == 'TRUE') {
row.shift.push('day')
}
if (row.isNight == 1) {
if (row.isNight == 'TRUE') {
row.shift.push('night')
}
SupplierAddressModelDeli.allSchemas.formSchema.forEach((item) => {
if(item.field == 'supplierCode'){
item.componentProps.disabled = true
}
if(item.field == 'supplierName'){
item.componentProps.disabled = true
}
if(item.field == 'supplierAddress'){
item.componentProps.disabled = true
}
if(item.field == 'modelShow'){
item.componentProps.disabled = true
}
})
}
console.log(row)
basicFormRef.value.open(type, row)
@ -191,8 +205,8 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, dataParams) => {
const data = {...dataParams}
data.isDay = data.shift.some(item=>item === 'day') ? 1 :0
data.isNight = data.shift.some(item => item === 'night') ? 1 :0
data.isDay = data.shift.some(item=>item === 'day') ? 'TRUE' :'FALSE'
data.isNight = data.shift.some(item => item === 'night') ? 'TRUE' :'FALSE'
data.model = data.modelShow.join(',')
delete data.shift
if (formType === 'create') {

Loading…
Cancel
Save