Browse Source

修复生产bug

master
ljlong_2630 1 month ago
parent
commit
c4b48a5f22
  1. 3
      src/api/eam/basic/location/index.ts
  2. 4
      src/views/eam/basic/item/item.data.ts
  3. 5
      src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
  4. 13
      src/views/eam/device/deviceinspectionjob/index.vue
  5. 4
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  6. 45
      src/views/eam/item/itemAccounts/index.vue
  7. 114
      src/views/eam/item/itemAccounts/itemAccounts.data.ts
  8. 2
      src/views/eam/mold/moldinspectionjob/index.vue
  9. 5
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

3
src/api/eam/basic/location/index.ts

@ -61,6 +61,9 @@ export const selectPageByConditions = async (params) => {
// 不在台账中的库位
export const getLocationNoInAccountPage = async (params) => {
if (params.isInAccount == 'ALL') {
delete params.isInAccount
}
if (params.isSearch) {
delete params.isSearch
const data = {...params}

4
src/views/eam/basic/item/item.data.ts

@ -160,13 +160,13 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
field: 'safetyStock',
sort: 'custom',
isSearch: false,
isForm: false,
isForm: true,
table: {
width: 110,
},
form: {
component: 'InputNumber',
value: 0
value: 0,
},
},
{

5
src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts

@ -5,7 +5,7 @@ import { dateFormatter } from '@/utils/formatTime'
export const DeviceInternalAuditRules = reactive({
personer: [
{ required: true, message: '请输入人员', trigger: 'blur' },
{ max: 20, message: '不得超过20', trigger: 'blur' }
],
fitOut: [
{ required: true, message: '请输入装配', trigger: 'blur' },
@ -43,6 +43,9 @@ export const DeviceInternalAuditRules = reactive({
{ required: true, message: '请输入模具前期', trigger: 'blur' },
// { max: 200, message: '不得超过200', trigger: 'blur' }
],
describes: [
{ max: 200, message: '不得超过200', trigger: 'blur' }
]
})
export const DeviceInternalAudit = useCrudSchemas(reactive<CrudSchema[]>([

13
src/views/eam/device/deviceinspectionjob/index.vue

@ -259,6 +259,7 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), //
@ -271,7 +272,7 @@ const butttondata = (row) => {
}), //
defaultButtons.orderPrintBtn({
hasPermi:'eam:device-inspection-job-main:print',
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row))
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED'))
}) //
]
}
@ -737,16 +738,6 @@ function verifyCancel(row) {
verifyDialogVisible.value = false
}
const judgeIsTheClassEngineer = (row) => {
const rolesOk = userStore.roles.find(item => {
return item == 'device_class_Engineer_role'
})
if (rolesOk != undefined && rolesOk != null) {
return true
} else {
return false
}
}
const orderPrint = (row) => {
window.open(src.value + "&id=" + row.id)

4
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -353,7 +353,7 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
type: 'Select',
initOptions: userList,
initOptions: dutyUserList,
multiple:true,
collapseTags:true,
collapseTagsTooltip:true,
@ -365,7 +365,7 @@ export const DeviceMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',')
return dutyUserList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',')
},
form: {
component: 'Select',

45
src/views/eam/item/itemAccounts/index.vue

@ -113,10 +113,51 @@ const urls = ref([])
const viewKey = ref(0)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const searchTableSuccess = async (formField, searchField, val, formRef) => {
const setV = {}
setV[formField] = val[0][searchField]
if (formField == 'itemNumber') {
const params = {
'itemNumber': val[0]['number']
};
await ItemAccountsApi.getItemAccountsNoPage(params).then((res) => {
let oldData = ['TRUE', 'FALSE'];
// res item
res.forEach(item => {
// oldData item.isInAccount
oldData = oldData.filter(data => data !== item.isInAccount);
});
// oldData setV['isInAccountWill']
if (oldData.length === 2) {
setV['isInAccountWill'] = 'ALL';
} else if (oldData.length === 1) {
setV['isInAccountWill'] = oldData[0];
} else {
setV['isInAccountWill'] = 'BOTH';
}
console.log(setV);
});
setV['name'] = val[0]['name'],
setV['specifications'] = val[0]['specifications'],
setV['singlePrice'] = val[0]['singlePrice'],
setV['category'] = val[0]['category'],
setV['classification'] = val[0]['classification'],
setV['cost'] = val[0]['cost'],
setV['financer'] = val[0]['financer'],
setV['isConstant'] = val[0]['isConstant'],
setV['isFramework'] = val[0]['isFramework'],
setV['isRadeIn'] = val[0]['isRadeIn'],
setV['purchaser'] = val[0]['purchaser'],
setV['region'] = val[0]['region'],
setV['reprocurement'] = val[0]['reprocurement'],
setV['subject'] = val[0]['subject'],
setV['subjectCode'] = val[0]['subjectCode'],
setV['uom'] = val[0]['uom']
setV['safetyStock'] = val[0]['safetyStock']
} else if (formField == 'locationNumber') {
setV['isInAccount'] = val[0]['isInAccount']
}
nextTick(() => {
formRef.setValues(setV)
})
}

114
src/views/eam/item/itemAccounts/itemAccounts.data.ts

@ -75,14 +75,31 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
value: 'areaNumber',
message: '请选择库区编号!',
isMainValue: true, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // 前置添加必有,和isFormModel结合使用
},{
key: 'isInAccount',
value: 'isInAccountWill',
message: '请选择备件编号!',
isMainValue: true, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // 前置添加必有,和isFormModel结合使用
}]
}
}
},
{
label: '是否账内预期值',
field: 'isInAccountWill',
sort: 'custom',
isDetail: false,
isForm: false,
isSearch: false,
isTable: false,
isTableForm: false,
},
{
label: '备件名称',
field: 'name',
sort: 'custom',
isForm: false,
table: {
width: 110
},
@ -92,6 +109,12 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '规格',
field: 'specifications',
sort: 'custom',
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '(账内或账外)库存数量',
@ -132,11 +155,18 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
label: '单价',
field: 'singlePrice',
sort: 'custom',
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '总价',
field: 'totalPrice',
sort: 'custom',
isForm: false,
},
{
label: '是否账内库',
@ -159,7 +189,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
}
},
@ -185,7 +216,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
}
},
@ -199,14 +231,26 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
tableForm: {
type: 'Select'
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '科目代码',
field: 'subjectCode',
sort: 'custom',
isTable: true,
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '单位',
@ -218,8 +262,14 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
tableForm: {
type: 'Select'
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '类别',
field: 'category',
@ -230,8 +280,14 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
tableForm: {
type: 'Select'
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '备件分类',
field: 'classification',
@ -242,8 +298,14 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
tableForm: {
type: 'Select'
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '区域',
field: 'region',
@ -254,8 +316,14 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
tableForm: {
type: 'Select'
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
// {
// label: '单价',
// field: 'singlePrice',
@ -268,22 +336,27 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 110,
},
isForm: true,
form: {
component: 'InputNumber',
value: 0
componentProps: {
disabled: true
}
},
},
{
label: '安全库存',
field: 'safetyStock',
sort: 'custom',
isForm: false,
isForm: true,
table: {
width: 110,
},
form: {
component: 'InputNumber',
value: 0
value: 0,
componentProps: {
disabled: true
}
},
},
{
@ -293,6 +366,12 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 110,
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '采购员',
@ -301,11 +380,23 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 100,
},
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '财务',
field: 'financer',
sort: 'custom',
isForm: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '是否以旧换新',
@ -328,7 +419,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
}
},
@ -337,10 +429,10 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
field: 'purchaseTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 150
},
isForm: false,
},
{
label: '库龄',
@ -387,7 +479,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
}
},
@ -414,7 +507,8 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
isForm: false
},
{
label: '操作',

2
src/views/eam/mold/moldinspectionjob/index.vue

@ -547,7 +547,7 @@ const detailSubmitForm = async (formType, data, formRef, tableList) => {
estimatedMinutes: data.estimatedMinutes,
actualMinutes: data.actualMinutes,
chargePeoples: data.chargePeoples.join(','),
completionTime: data.completionTime?data.completionTime:null,
completionTime: data.completionTime?data.completionTime:'',
engineer: data.engineer,
uncompleted: data.uncompleted,
itemNumbers: data.itemNumbers,

5
src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

@ -401,7 +401,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
type: 'Select',
initOptions: userList,
initOptions: dutyUserList,
multiple: true,
collapseTags: true,
collapseTagsTooltip: true,
@ -413,8 +413,7 @@ export const MoldMaintainOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
api: () => dutyUserList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',')
return dutyUserList.filter(item => cellValue?.includes(item.id)).map(cur => cur.name).join(',')
},
form: {
component: 'Select',

Loading…
Cancel
Save