Browse Source

预览要货计划功能

intex_online20241111
yufei_wang 3 weeks ago
parent
commit
75315a0d94
  1. 11
      .env.wyf
  2. 7
      src/api/wms/demandforecastingDetail/index.ts
  3. 6
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  4. 24
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

11
.env.wyf

@ -3,11 +3,18 @@ NODE_ENV=development
VITE_DEV=false
# # 请求路径
# VITE_BASE_URL='http://dev.ccwin-in.com:28040/api'
# # 上传路径
# VITE_UPLOAD_URL='http://dev.ccwin-in.com:28040/admin-api/infra/file/upload'
# 请求路径
VITE_BASE_URL='http://dev.ccwin-in.com:28040/api'
VITE_BASE_URL='http://192.168.1.35:12080'
# 上传路径
VITE_UPLOAD_URL='http://dev.ccwin-in.com:28040/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://192.168.1.35:12080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=/dev-api

7
src/api/wms/demandforecastingDetail/index.ts

@ -124,4 +124,9 @@ export const getPageTableHead = async (params) => {
// 查询版本号
export const queryVersion = async (params) => {
return await request.get({ url: `/wms/demandforecasting-detail/queryVersion`, params })
}
}
// 预览要货计划
export const getPreviewPlan = async (params) => {
return await request.get({ url: `/wms/demandforecasting-detail/preview`, params })
}

6
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts

@ -506,7 +506,7 @@ export const DemandforecastingDetailRules = reactive({
export const DemandforecastingMainPlan = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '版本号',
field: 'version',
field: 'detailVersion',
sort: 'custom',
table: {
width: 150
@ -514,7 +514,7 @@ export const DemandforecastingMainPlan = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '供应商代码',
field: 'supplierCode',
field: 'detailSupplierCode',
sort: 'custom',
table: {
width: 150,
@ -555,7 +555,7 @@ export const DemandforecastingMainPlan = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '数量',
field: 'qty',
field: 'planQty',
sort: 'custom',
},
{

24
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -69,6 +69,8 @@ import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import { isString } from '@/utils/is'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'DemandforecastingMain' })
@ -209,7 +211,7 @@ const getSelectionRows = (currentPage, currentPageSelectionRows) => {
}
const tableColumnsPlan = ref(DemandforecastingMainPlan.allSchemas.tableColumns)
const { tableObject:tableObjectPlan, tableMethods:tableMethodsPlan } = useTable({
getListApi: DemandforecastingDetailApi.getDemandforecastingDetailPage //
getListApi: DemandforecastingDetailApi.getPreviewPlan //
})
//
const { getList:getListPlan} = tableMethodsPlan
@ -219,6 +221,26 @@ const selectionPlan = async ()=>{
rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)]
})
console.log('批量生成要货计划', rows.join(','))
tableObjectPlan.params.masterIds = rows.join(',')
if(tableObject.params.dueDate&&tableObject.params.dueDate.length>0){
if(isString(tableObject.params.dueDate[0])){
tableObjectPlan.params.startDate = tableObject.params.dueDate[0]
}else{
tableObjectPlan.params.startDate = tableObject.params.dueDate[0].format('YYYY-MM-DD')
}
}
if(tableObject.params.dueDate&&tableObject.params.dueDate.length>1){
if(isString(tableObject.params.dueDate[1])){
tableObjectPlan.params.endDate = tableObject.params.dueDate[1]
}else{
tableObjectPlan.params.endDate = tableObject.params.dueDate[1].format('YYYY-MM-DD')
}
}
if (!tableObject.params.dueDate || tableObject.params.dueDate.length == 0) {
tableObjectPlan.params.startDate = ''
tableObjectPlan.params.endDate = ''
}
await getListPlan()
dialogVisiblePlan.value = true
}

Loading…
Cancel
Save