Browse Source

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

master_hella_20240701
陈薪名 9 months ago
parent
commit
bac4c50978
  1. 6
      src/api/wms/offlinesettlementRecordMain/index.ts
  2. 6
      src/api/wms/offlinesettlementRequestMain/index.ts
  3. 6
      src/api/wms/onlinesettlementRecordMain/index.ts
  4. 6
      src/api/wms/onlinesettlementRequestMain/index.ts
  5. 6
      src/api/wms/packageunit/index.ts
  6. 5
      src/api/wms/purchasePlanMain/index.ts
  7. 33
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  8. 15
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  9. 15
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  10. 14
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  11. 13
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  12. 23
      src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts
  13. 23
      src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts
  14. 4
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  15. 23
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts
  16. 23
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts
  17. 22
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts
  18. 15
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts
  19. 15
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts
  20. 14
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue
  21. 13
      src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts
  22. 15
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts
  23. 15
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts
  24. 14
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  25. 13
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  26. 23
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  27. 70
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  28. 12
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  29. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts
  30. 47
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

6
src/api/wms/offlinesettlementRecordMain/index.ts

@ -53,7 +53,13 @@ export const deleteOfflinesettlementRecordMain = async (id: number) => {
// 导出下线结算记录主 Excel // 导出下线结算记录主 Excel
export const exportOfflinesettlementRecordMain = async (params) => { export const exportOfflinesettlementRecordMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/offlinesettlement-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/offlinesettlement-record-main/export-excel`, params }) return await request.download({ url: `/wms/offlinesettlement-record-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

6
src/api/wms/offlinesettlementRequestMain/index.ts

@ -53,7 +53,13 @@ export const deleteOfflinesettlementRequestMain = async (id: number) => {
// 导出下线结算申请主 Excel // 导出下线结算申请主 Excel
export const exportOfflinesettlementRequestMain = async (params) => { export const exportOfflinesettlementRequestMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/offlinesettlement-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/offlinesettlement-request-main/export-excel`, params }) return await request.download({ url: `/wms/offlinesettlement-request-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

6
src/api/wms/onlinesettlementRecordMain/index.ts

@ -53,7 +53,13 @@ export const deleteOnlinesettlementRecordMain = async (id: number) => {
// 导出上线结算记录主 Excel // 导出上线结算记录主 Excel
export const exportOnlinesettlementRecordMain = async (params) => { export const exportOnlinesettlementRecordMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/onlinesettlement-record-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/onlinesettlement-record-main/export-excel`, params }) return await request.download({ url: `/wms/onlinesettlement-record-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

6
src/api/wms/onlinesettlementRequestMain/index.ts

@ -53,7 +53,13 @@ export const deleteOnlinesettlementRequestMain = async (id: number) => {
// 导出上线结算申请主 Excel // 导出上线结算申请主 Excel
export const exportOnlinesettlementRequestMain = async (params) => { export const exportOnlinesettlementRequestMain = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/onlinesettlement-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/onlinesettlement-request-main/export-excel`, params }) return await request.download({ url: `/wms/onlinesettlement-request-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

6
src/api/wms/packageunit/index.ts

@ -56,7 +56,13 @@ export const deletePackageunit = async (id: number) => {
// 导出物品包装规格信息 Excel // 导出物品包装规格信息 Excel
export const exportPackageunit = async (params) => { export const exportPackageunit = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/packageunit/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/packageunit/export-excel`, params }) return await request.download({ url: `/wms/packageunit/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

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

@ -90,3 +90,8 @@ export const exportPurchasePlanMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchase-plan-main/get-import-template' }) return request.download({ url: '/wms/purchase-plan-main/get-import-template' })
} }
// 查询要货计划策略根据供应商
export const queryPurchasePlan = async (supplierCode: string) => {
return await request.get({ url: `/wms/purchase-plan-main/queryPurchasePlan?supplierCode=` + supplierCode })
}

33
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -438,14 +438,6 @@ export const rules = reactive({
{ required: true, message: '请输入名称', trigger: 'blur' }, { required: true, message: '请输入名称', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
], ],
desc1: [
{ required: true, message: '请输入描述1', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
desc2: [
{ required: true, message: '请输入描述2', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
status: [ status: [
{ required: true, message: '请选择状态', trigger: 'change' }, { required: true, message: '请选择状态', trigger: 'change' },
], ],
@ -479,36 +471,11 @@ export const rules = reactive({
type: [ type: [
{ required: true, message: '请选择类型', trigger: 'change' }, { required: true, message: '请选择类型', trigger: 'change' },
], ],
category: [
{ required: true, message: '请选择种类', trigger: 'change' },
],
itemGroup: [
{ required: true, message: '请选择分组', trigger: 'change' },
],
color: [
{ required: true, message: '请选择颜色', trigger: 'change' },
],
configuration: [
{ required: true, message: '请选择配置', trigger: 'change' },
],
project: [
{ required: true, message: '请输入项目', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
eqLevel: [
{ required: true, message: '请选择质量等级', trigger: 'change' },
],
validityDays: [ validityDays: [
{ required: true, message: '请输入有效天数', trigger: 'change' }, { required: true, message: '请输入有效天数', trigger: 'change' },
], ],
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }, { required: true, message: '请选择是否可用', trigger: 'change' },
], ],
activeTime: [
{ required: true, message: '请输入生效时间', trigger: 'change' },
],
expireTime: [
{ required: true, message: '请输入失效时间', trigger: 'change' },
],
}) })
console.log(Itembasic) console.log(Itembasic)

15
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -668,11 +669,21 @@ export const ScrapJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

15
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -409,11 +410,21 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '单价', label: '单价',

14
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -70,6 +71,7 @@
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@onBlur="onBlur"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -444,6 +446,18 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

13
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -584,13 +584,20 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.SCRAP_REASON, dictType: DICT_TYPE.SCRAP_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: { tableForm: {
type: 'Select' type: 'Select',
filterable: true
} }
}, },
{ {

23
src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/transferissueJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -761,6 +762,28 @@ export const TransferissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

23
src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -608,6 +609,28 @@ export const TransferissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
// { // {
// label: '代码', // label: '代码',
// field: 'code', // field: 'code',

4
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -317,16 +317,12 @@ const handleHandle = async (id: number) => {
} }
const onBlur = (field, e) => { const onBlur = (field, e) => {
console.log('字段', field)
console.log('失焦后值', e.target.value)
if (field == 'reason') { if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value detailRef.value.formRef.formRef.formModel[field] = e.target.value
} }
} }
const tableFormSelectOnBlur = (field, val, row, index) => { const tableFormSelectOnBlur = (field, val, row, index) => {
// console.log('', field)
// console.log('', val.target.value)
if (field == 'reason') { if (field == 'reason') {
tableData.value[index][field] = val.target.value tableData.value[index][field] = val.target.value
} }

23
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -753,6 +754,28 @@ export const TransferreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

23
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -524,6 +525,28 @@ export const TransferreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
}, },
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{ {
label: '从库位组代码', label: '从库位组代码',
field: 'fromLocationGroupCode', field: 'fromLocationGroupCode',

22
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts

@ -567,6 +567,28 @@ export const TransferreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
}, },
{
label: '原因',
field: 'reason',
sort: 'custom',
dictType: DICT_TYPE.TRANSFER_REASON,
dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return cellValue
},
table: {
width: 150
},
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',

15
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/unplannedissueJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -669,11 +670,21 @@ export const UnplannedissueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

15
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/unplannedissueRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -443,11 +444,21 @@ export const UnplannedissueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

14
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -70,6 +71,7 @@
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@onBlur="onBlur"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -400,6 +402,18 @@ const submitForm = async (formType, data) => {
} }
} }
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = false; let tag = false;

13
src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/unplannedissueRequestMain.data.ts

@ -515,13 +515,20 @@ export const UnplannedissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON, dictType: DICT_TYPE.UNPLANNED_ISSUE_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: { tableForm: {
type: 'Select' type: 'Select',
filterable: true
} }
}, },
{ {

15
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/unplannedreceiptJobMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -699,11 +700,21 @@ export const UnplannedreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

15
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
/** /**
* @returns {Array} * @returns {Array}
@ -514,11 +515,21 @@ export const UnplannedreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: {
type: 'Select',
filterable: true
}
}, },
{ {
label: '货主代码', label: '货主代码',

14
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -55,6 +55,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -72,6 +73,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@detailBasicFormOnChange="qtyOnChange" @detailBasicFormOnChange="qtyOnChange"
@onBlur="onBlur"
/> />
<!-- 创建标签 --> <!-- 创建标签 -->
@ -634,6 +636,18 @@ const qtyOnChange = (field,val) =>{
} }
} }
const onBlur = (field, e) => {
if (field == 'reason') {
detailRef.value.formRef.formRef.formModel[field] = e.target.value
}
}
const tableFormSelectOnBlur = (field, val, row, index) => {
if (field == 'reason') {
tableData.value[index][field] = val.target.value
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

13
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -745,13 +745,20 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
field: 'reason', field: 'reason',
dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON, dictType: DICT_TYPE.UNPLANNED_RECEIPT_REASON,
dictClass: 'string', dictClass: 'string',
isTable: true, formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
sort: 'custom', return cellValue
},
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps: {
filterable: true
}
},
tableForm: { tableForm: {
type: 'Select' type: 'Select',
filterable: true
} }
}, },
{ {

23
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -27,9 +27,12 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchasePlanMainRules" <BasicForm ref="formRef" @success="getList"
:formAllSchemas="PurchasePlanMain.allSchemas" :tableAllSchemas="PurchasePlanDetail.allSchemas" :rules="PurchasePlanMainRules"
:tableFormRules="PurchasePlanDetailRules" :tableData="tableData" :formAllSchemas="PurchasePlanMain.allSchemas"
:tableAllSchemas="PurchasePlanDetail.allSchemas"
:tableFormRules="PurchasePlanDetailRules"
:tableData="tableData"
:apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain" :apiUpdate="PurchasePlanMainApi.updatePurchasePlanMain"
:apiCreate="PurchasePlanMainApi.createPurchasePlanMain" :apiCreate="PurchasePlanMainApi.createPurchasePlanMain"
:isBusiness="true" :isBusiness="true"
@ -68,7 +71,6 @@
import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons";
// //
defineOptions({ name: 'PurchasePlanMain' }) defineOptions({ name: 'PurchasePlanMain' })
@ -108,6 +110,19 @@
setV['itemCode'] = val[0]['code'] setV['itemCode'] = val[0]['code']
setV['poNumber'] = val[0]['number'] setV['poNumber'] = val[0]['number']
setV['poLine'] = val[0]['lineNumber'] setV['poLine'] = val[0]['lineNumber']
if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code']
await PurchasePlanMainApi.queryPurchasePlan(val[0]['code']).then(res => {
let beginTime = res.beginTime
var ms = beginTime.substring(0, 2)
var me = beginTime.substring(3)
setV['beginTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
let endTime = res.endTime
var ms = endTime.substring(0, 2)
var me = endTime.substring(3)
setV['endTime'] = new Date(2024, 1, 1, Number(ms), Number(me))
})
}
if (formField == 'poLine') { if (formField == 'poLine') {
setV['itemCode'] = val[0]['itemCode'] setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']

70
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as PurchaseMainApi from '@/api/wms/purchaseMain' import * as PurchaseMainApi from '@/api/wms/purchaseMain'
@ -48,14 +48,61 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '送达日期',
field: 'deliveryDate',
table: {
width: 150
},
formatter: dateFormatter2,
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{ {
label: '时间窗口', label: '时间窗口',
field: 'timeWindow', field: 'timeWindow',
table: {
width: 150
},
isForm: false
},
{
label: '开始时间',
field: 'beginTime',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isForm: false, form:{
component:"TimePicker",
componentProps: {
format:"HH:mm",
}
}
},
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
table: {
width: 150
},
form:{
component:"TimePicker",
componentProps: {
format:"HH:mm",
}
}
}, },
{ {
label: '仓库代码', label: '仓库代码',
@ -108,24 +155,7 @@ export const PurchasePlanMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '开始时间',
field: 'beginTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '结束时间',
field: 'endTime',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{ {
label: '自动发布', label: '自动发布',
field: 'autoPublish', field: 'autoPublish',

12
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -66,6 +66,7 @@ import { SupplierdeliverRecordMain,SupplierdeliverRecordMainRules,Supplierdelive
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail' import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getAccessToken } from '@/utils/auth'
// //
defineOptions({ name: 'SupplierdeliverRecordMain' }) defineOptions({ name: 'SupplierdeliverRecordMain' })
@ -128,6 +129,7 @@ const buttonBaseClick = (val, item) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), // defaultButtons.mainListGenerateApplicationBtn({hasPermi:'wms:supplierdeliver-record-main:createPurchasereceiptRequest',hide:!row.purchasereceiptRequestFlag}), //
defaultButtons.mainListDocumentPrintBtn({}) //
] ]
} }
@ -135,6 +137,9 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if(val == 'generateApplication'){ if(val == 'generateApplication'){
handlerCreatePurchasereceiptRequest(row.number) handlerCreatePurchasereceiptRequest(row.number)
}else if (val == 'documentPrint') {
//
handleDocumentPrint(row.id)
} }
} }
@ -151,6 +156,13 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => {
} }
} }
//
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts

@ -327,7 +327,7 @@ export const SupplierdeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 160, width: 300,
fixed: 'right' fixed: 'right'
}, },
} }

47
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -105,7 +105,7 @@ import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequest
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue' import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue'
import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'SupplierdeliverRequestMain' }) defineOptions({ name: 'SupplierdeliverRequestMain' })
@ -123,6 +123,7 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const planArriveTimeStr = ref()
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
@ -144,6 +145,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'ppNumber'){ if(formField == 'ppNumber'){
//
let beginTime = val[0]['endTime']
let deliveryDate = formatDate(val[0]['deliveryDate'],'YYYY-MM-DD')
planArriveTimeStr.value = deliveryDate + ' '+ beginTime+":00"
setV['planArriveTime']= new Date(planArriveTimeStr.value)
// //
tableData.value = [] tableData.value = []
} }
@ -261,10 +267,10 @@ const butttondata = (row) => {
link: true // link: true //
}, },
defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), // defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3','8']) }), //
defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), // //defaultButtons.mainListDocumentPrintBtn({ hide: isShowMainButton(row, ['3','8']) }), //
// //
{ {
label: '处理', label: '发货',
name: 'genRecords', name: 'genRecords',
hide: isShowMainButton(row, ['3']), hide: isShowMainButton(row, ['3']),
type: 'primary', type: 'primary',
@ -462,14 +468,26 @@ const handleTur = async (id: number) => {
/** 处理按钮操作 */ /** 处理按钮操作 */
const genRecords = async (id: number) => { const genRecords = async (id: number) => {
try { try {
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(res => {
if(!res){
message.warning("请先上传自检报告!")
return
}else{
// //
await message.confirm('是否处理所选中数据?') message.confirm('是否处理所选中数据?')
tableObject.loading = true tableObject.loading = true
// //
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id) SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
message.success(t('处理成功!')) message.success(t('处理成功!'))
//
handleDocumentPrint(res)
})
// //
await getList() getList()
}
}).catch(err => {
console.log("自检报告校验异常",err)
})
} catch {}finally{ } catch {}finally{
tableObject.loading = false tableObject.loading = false
} }
@ -588,6 +606,23 @@ const submitForm = async (formType, data) => {
} }
try { try {
if (formType === 'create') { if (formType === 'create') {
let planArriveStr = formatDate(data.planArriveTime);
if(planArriveStr > planArriveTimeStr.value){
let confirmFlag = false;
await message.confirm("计划到货时间大于要货计划送达日期是否继续?").then(() => {
console.log("选择了OK")
//OK
}).catch(() => {
//
console.log("选择了cancel")
confirmFlag = true;
formRef.value.formLoading = false
return;
})
if(confirmFlag){
return;
}
}
if(tableData.value.length <= 0){ if(tableData.value.length <= 0){
message.warning(`子表明细不能为空!`) message.warning(`子表明细不能为空!`)
formRef.value.formLoading = false formRef.value.formLoading = false

Loading…
Cancel
Save