Browse Source

HL-6459

hella_online_20241128
yufei_wang 4 days ago
parent
commit
57b69fc1f2
  1. 8
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  2. 27
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  3. 49
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  4. 29
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

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

@ -89,8 +89,9 @@ export const ScrapJobMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable:true,
isForm:false, sortTableDefault:9997,
isForm:true,
isTableForm:false, isTableForm:false,
tableForm: { tableForm: {
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
@ -944,6 +945,7 @@ export const ScrapJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9998
}, },
{ {
label: '货主代码', label: '货主代码',
@ -995,6 +997,7 @@ export const ScrapJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isTable: true, isTable: true,
sortTableDefault:9999
}, },
{ {
label: '创建者', label: '创建者',
@ -1004,6 +1007,7 @@ export const ScrapJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTable: true, isTable: true,
sortTableDefault:10000
}, },
])) ]))

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

@ -98,8 +98,9 @@ export const ScrapRecordMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable:true,
isForm:false, sortTableDefault:9992,
isForm:true,
isTableForm:false, isTableForm:false,
tableForm: { tableForm: {
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
@ -112,11 +113,6 @@ export const ScrapRecordMain = useCrudSchemas(
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}] }]
}, },
form: { form: {
@ -132,11 +128,6 @@ export const ScrapRecordMain = useCrudSchemas(
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}] }]
} }
} }
@ -727,6 +718,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9993
}, },
{ {
label: '单价', label: '单价',
@ -737,7 +729,8 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} },
sortTableDefault:9994
}, },
{ {
label: '金额', label: '金额',
@ -748,7 +741,8 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} },
sortTableDefault:9995
}, },
{ {
label: '从库位组代码', label: '从库位组代码',
@ -757,6 +751,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9996
}, },
{ {
label: '从库区代码', label: '从库区代码',
@ -765,6 +760,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9997
}, },
{ {
label: '从货主代码', label: '从货主代码',
@ -806,6 +802,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9998
}, },
{ {
label: '创建时间', label: '创建时间',
@ -826,6 +823,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x', valueFormat: 'x',
} }
}, },
sortTableDefault:9999
}, },
{ {
label: '创建者', label: '创建者',
@ -834,6 +832,7 @@ export const ScrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:10000
}, },
// { // {
// label: '任务明细ID', // label: '任务明细ID',

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

@ -71,7 +71,6 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@submitForm="submitForm" @submitForm="submitForm"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@clearSearchInput="clearSearchInput" @clearSearchInput="clearSearchInput"
/> />
@ -90,7 +89,6 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailBasicFormOnChange="qtyOnChange" @detailBasicFormOnChange="qtyOnChange"
:detailValidate="detailValidate" :detailValidate="detailValidate"
@onBlur="onBlur"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -139,7 +137,11 @@ const tableColumns = ref([
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const defaultReasonCodeRequisition = ref(true)
const setDefaultrReasonCodeRequisition = ()=>{
formRef.value.setDefaultBlurValue('reasonCodeRequisition','SC99')
defaultReasonCodeRequisition.value = false
}
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
@ -201,6 +203,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
} }
if (formField == 'q2Number') { if (formField == 'q2Number') {
setV['noticeRemark'] = val[0]['desc'] setV['noticeRemark'] = val[0]['desc']
if(val[0]['number']){
setV['reasonCodeRequisition'] = ''
setV['projectCode'] = ''
}
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q3Number') { if (item.field == 'q1Number' || item.field == 'q3Number') {
item.componentProps.enterSearch = false item.componentProps.enterSearch = false
@ -227,14 +233,43 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
setV['costcentreCode'] = val[0]['costcentreCode'] setV['costcentreCode'] = val[0]['costcentreCode']
setV['costCenterType'] = val[0]['costcentreType'] setV['costCenterType'] = val[0]['costcentreType']
} }
if(formField === 'reasonCodeRequisition'){ if(formField == 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code'] setV['reasonCodeRequisition'] = val[0]['code']
//
if(ScrapRequestMainRules['projectCode']){
ScrapRequestMainRules['projectCode'][0].required = val[0]['isProject']=='TRUE'
}
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'projectCode') {
//
if(val[0]['isProject']=='TRUE'){
//-
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}else{
//-
setV['projectCode'] = ''
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
}
})
if(val[0]['code']){
setV['q2Number'] = ''
}
} }
if(formField === 'projectCode'){ if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
if(formField == 'costCenterCode'){
if(defaultReasonCodeRequisition.value){
setDefaultrReasonCodeRequisition()
}
}
} }
}) })
@ -578,6 +613,12 @@ const openForm = async (type: string, row?: any) => {
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
if(type == 'create'){
nextTick(()=>{
defaultReasonCodeRequisition.value = true
// formRef.value.setDefaultBlurValue('costCenterCode','DEFC')
})
}
} }
// //

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

@ -169,8 +169,9 @@ export const ScrapRequestMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable:true,
isForm:false, sortTableDefault:9997,
isForm:true,
isTableForm:false, isTableForm:false,
tableForm: { tableForm: {
enterSearch: true, enterSearch: true,
@ -184,12 +185,7 @@ export const ScrapRequestMain = useCrudSchemas(
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }],
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -200,11 +196,12 @@ export const ScrapRequestMain = useCrudSchemas(
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}, },
form: { form: {
value:'SC99',
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本 searchListPlaceholder: '请选择领用原因代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题 searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类 searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
@ -213,12 +210,7 @@ export const ScrapRequestMain = useCrudSchemas(
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }],
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -1183,6 +1175,7 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:9998
}, },
{ {
label: '项目订单号', label: '项目订单号',
@ -1249,7 +1242,8 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isTableForm: false, isTableForm: false,
isForm: false isForm: false,
sortTableDefault:9999
}, },
{ {
label: '创建者', label: '创建者',
@ -1259,7 +1253,8 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTableForm: false, isTableForm: false,
isForm: false isForm: false,
sortTableDefault:10000
}, },
{ {
label: '最后更新时间', label: '最后更新时间',

Loading…
Cancel
Save