Browse Source

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

master_hella_20240701
宋国强 7 months ago
parent
commit
2b5ebb8bbe
  1. 2
      src/api/eam/repairExperience/index.ts
  2. 7
      src/components/TableForm/src/TableForm.vue
  3. 29
      src/views/eam/equipmentMaintenanceRecordMain/index.vue
  4. 28
      src/views/eam/equipmentRepairRecordMain/index.vue
  5. 91
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  6. 4
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts
  7. 28
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  8. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  9. 15
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

2
src/api/eam/repairExperience/index.ts

@ -4,7 +4,7 @@ export interface RepairExperienceVO {
id: number id: number
name: string name: string
content: string content: string
repairNumber: string repairRecordNumber: string
} }
// 查询维修经验记录列表 // 查询维修经验记录列表

7
src/components/TableForm/src/TableForm.vue

@ -66,7 +66,7 @@
clearable clearable
:type="headerItem?.tableForm?.inputType" :type="headerItem?.tableForm?.inputType"
:placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')" :placeholder="t(`ts.${headerItem?.tableForm?.placeholder || '请输入' + headerItem.label}`).replace('ts.','')"
:disabled="disabledInput(headerItem)" :disabled="disabledInput(headerItem,row)"
style="flex:1" style="flex:1"
@blur="inputStringBlur(headerItem, row[headerItem.field], row,index)" @blur="inputStringBlur(headerItem, row[headerItem.field], row,index)"
/> />
@ -576,7 +576,7 @@ const batchAdd = ()=>{
console.log(field) console.log(field)
emit('batchAdd',keyWord.value) emit('batchAdd',keyWord.value)
} }
const disabledInput=(headerItem)=>{ const disabledInput=(headerItem,row)=>{
if(headerItem.tableForm?.isInpuFocusShow){ if(headerItem.tableForm?.isInpuFocusShow){
if(headerItem.tableForm?.enterSearch){ if(headerItem.tableForm?.enterSearch){
return false return false
@ -584,9 +584,10 @@ const disabledInput=(headerItem)=>{
return true return true
} }
}else{ }else{
return headerItem?.tableForm?.disabled || true return headerItem?.tableForm?.disabled || Boolean(row.disabled) || Boolean(row['disabled_' + headerItem.field]) ||false
} }
} }
// setup // setup
defineExpose({ defineExpose({
TableBaseComponents_Ref, TableBaseComponents_Ref,

29
src/views/eam/equipmentMaintenanceRecordMain/index.vue

@ -32,8 +32,8 @@
<span>{{ row.recordNo }}</span> <span>{{ row.recordNo }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -154,13 +154,24 @@ const buttonBaseClick = (val, item) => {
} }
} }
// - const butttondata = (row,$index) => {
const butttondata = [ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
//defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceRecordMain:update'}), // if(findIndex>-1&&findIndex<$index){
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceRecordMain:delete'}), // return []
defaultButtons.maintainExperienceBtn({ hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) // }
] return [
defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row,['0']),hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) //
]
}
//
const isShowMainButton = (row,val) => {
console.log(row.isExperience)
if (val.indexOf(row.isExperience) > -1) {
return false
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //

28
src/views/eam/equipmentRepairRecordMain/index.vue

@ -36,8 +36,8 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event, row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -176,12 +176,26 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [
// defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentRepairRecordMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentRepairRecordMain:delete'}), //
defaultButtons.repairExperienceBtn({ hasPermi: 'eam:equipmentRepairRecordMain:repairExperience' }) //
]
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [
defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row,['0']),hasPermi: 'eam:equipmentRepairRecordMain:repairExperience' }) //
]
}
//
const isShowMainButton = (row,val) => {
console.log(row.isExperience)
if (val.indexOf(row.isExperience) > -1) {
return false
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { if (val == 'edit') {

91
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -100,6 +100,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTableForm: false, isTableForm: false,
isForm: true, isForm: true,
isSearch: true,
// tableForm:{ // tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择客户月台代码', // searchListPlaceholder: '请选择客户月台代码',
@ -537,51 +538,51 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '客户月台', // label: '客户月台',
field: 'customerDockCode', // field: 'customerDockCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
hiddenInMain: true, // hiddenInMain: true,
isTableForm: false, // isTableForm: false,
tableForm:{ // tableForm:{
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户月台代码', // searchListPlaceholder: '请选择客户月台代码',
searchField: 'code', // searchField: 'code',
searchTitle: '客户月台基础信息', // searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas, // searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock, // searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
},{ // },{
key: 'customerCode', // key: 'customerCode',
value: 'customerCode', // value: 'customerCode',
isMainValue: true // isMainValue: true
}] // }]
}, // },
form: { // form: {
componentProps: { // componentProps: {
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择客户月台代码', // searchListPlaceholder: '请选择客户月台代码',
searchField: 'code', // searchField: 'code',
searchTitle: '客户月台基础信息', // searchTitle: '客户月台基础信息',
searchAllSchemas: Customerdock.allSchemas, // searchAllSchemas: Customerdock.allSchemas,
searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock, // searchPage: CustomerDockApi.pageCustomerCodeToCustomerDock,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'customerCode', // key: 'customerCode',
value: 'customerCode', // value: 'customerCode',
isMainValue: true // isMainValue: true
}] // }]
} // }
}, // },
}, // },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',

4
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -611,7 +611,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'code', searchField: 'code',
searchTitle: '物料基础信息', searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Itembasic.allSchemas,
searchPage: ItemBasicApi.getItembasicPage, searchPage: ItemBasicApi.selectItembasicPageToFgAndSemibasicPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -625,7 +625,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '物料基础信息', searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas, searchAllSchemas: Itembasic.allSchemas,
searchPage: ItemBasicApi.getItembasicPage, searchPage: ItemBasicApi.selectItembasicPageToFgAndSemibasicPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',

28
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -118,15 +118,7 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '机台',
field: 'abc',
sort: 'custom',
table: {
width: 150
},
isForm: true
},
{ {
label: '生产线', label: '生产线',
field: 'productionLine', field: 'productionLine',
@ -308,15 +300,15 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

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

@ -201,6 +201,7 @@ const getSearchTableData = async (number,formField,searchField)=>{
newRow['itemCode'] = row['itemCode'] newRow['itemCode'] = row['itemCode']
newRow['poNumber'] = row['number'] newRow['poNumber'] = row['number']
newRow['poLine'] = row['lineNumber'] newRow['poLine'] = row['lineNumber']
newRow['planQty'] = 0 //
if (formField == 'poLine') { if (formField == 'poLine') {
newRow['itemCode'] = row['itemCode'] newRow['itemCode'] = row['itemCode']
newRow['uom'] = row['uom'] newRow['uom'] = row['uom']

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

@ -596,13 +596,11 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1,
precision: 6 precision: 6
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1,
precision: 6 precision: 6
} }
} }
@ -716,7 +714,15 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
} }
])) ]))
const validatePlanQty = (rule, value, callback) => {
console.log('validatePlanQty',value)
const numReg = /^[\d]+$/
if (numReg.test(value)&&value>0) {
callback()
} else {
callback(new Error('计划数量不能为0'))
}
}
//表单校验 //表单校验
export const PurchasePlanDetailRules = reactive({ export const PurchasePlanDetailRules = reactive({
// available: [ // available: [
@ -729,7 +735,8 @@ export const PurchasePlanDetailRules = reactive({
{ required: true, message: '请选择计量单位', trigger: 'change' } { required: true, message: '请选择计量单位', trigger: 'change' }
], ],
planQty: [ planQty: [
{ required: true, message: '请输入计划数量', trigger: 'blur' } { required: true, message: '请输入计划数量', trigger: 'blur' },
{ validator:validatePlanQty, message: '计划数量不能为0', trigger: 'blur'}
], ],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }

Loading…
Cancel
Save