Browse Source

bug修复

master
ljlong_2630 8 months ago
parent
commit
e6e56b1780
  1. 1
      src/views/eam/basic/fixedAssets/fixedAssets.data.ts
  2. 4
      src/views/eam/device/deviceMaintainPlan/index.vue
  3. 26
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  4. 7
      src/views/eam/device/deviceRepair/index.vue
  5. 22
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  6. 9
      src/views/eam/device/deviceinspectionjob/index.vue
  7. 8
      src/views/eam/device/devicemaintainjob/index.vue
  8. 28
      src/views/eam/device/devicemaintenancejob/index.vue
  9. 4
      src/views/eam/mold/moldMaintainPlan/index.vue
  10. 12
      src/views/eam/mold/moldRepair/moldRepair.data.ts
  11. 9
      src/views/eam/mold/moldinspectionjob/index.vue
  12. 9
      src/views/eam/mold/moldmaintainjob/index.vue
  13. 28
      src/views/eam/mold/moldmaintenancejob/index.vue
  14. 106
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

1
src/views/eam/basic/fixedAssets/fixedAssets.data.ts

@ -54,6 +54,7 @@ export const FixedAssets = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: '150',
fixed: 'left',
},
isSearch: true,
isForm: false,

4
src/views/eam/device/deviceMaintainPlan/index.vue

@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:deviceMaintainPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceMaintainPlan:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceMaintainPlan:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceMaintainPlan:delete'}), //
]
// -

26
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -4,6 +4,8 @@ import { selectAllFactoryArea } from '@/api/system/dept'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import * as UserApi from '@/api/system/user'
const userListAll = await UserApi.getSimpleUserList()
// 邮箱账号的列表
const factoryList = await selectAllFactoryArea()
const deviceList = ref([]);
@ -81,6 +83,29 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
},
}
},
{
label: '报修人',
field: 'declarer',
sort: 'custom',
table: {
width: '150',
},
isForm: false,
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
},
search: {
component: 'Select',
componentProps: {
options: userListAll,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
},
},
},
{
label: '设备',
field: 'deviceNumber',
@ -147,6 +172,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
width: '150',
},
},
{
label: '故障类型',
field: 'faultType',

7
src/views/eam/device/deviceRepair/index.vue

@ -67,12 +67,16 @@ import * as DeviceRepairApi from '@/api/eam/device/deviceRepair'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts'
import { DeviceAccounts } from '../deviceAccounts/deviceAccounts.data'
import { useUserStore } from '@/store/modules/user'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'DeviceRepair' })
const userStore = useUserStore()
const message = useMessage() //
const { t } = useI18n() //
@ -148,7 +152,8 @@ const butttondata = (row) => {
return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceRepair:update'}), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:deviceRepair:delete' }), //
defaultButtons.backoutBtn({ hide: row.result != 'PENDING' }), //
defaultButtons.backoutBtn({ hide: !(row.result == 'PENDING' && row.declarer == userStore.getUser.id )}), //
]
}

22
src/views/eam/device/deviceSpotInspectionRecordMain/index.vue

@ -223,7 +223,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({
hide: !(
row.status == 'PENDING' &&
@ -480,12 +480,28 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
}
}
const buttonControllFunction = (row, val) => {
if (val == 'add') {
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else {
return true
}
}
/** 初始化 **/

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

@ -534,18 +534,21 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
callback()
}
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true

8
src/views/eam/device/devicemaintainjob/index.vue

@ -501,7 +501,13 @@ function buttonControllFunction(row, val) {
if (val == 'delete') {
return false
} else if (val == 'edit') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true

28
src/views/eam/device/devicemaintenancejob/index.vue

@ -104,6 +104,7 @@
@detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true"
:openFormCallBack="openFormCallBack"
:buttonControllFunction="buttonControllFunction"
/>
<!-- 导入 -->
@ -271,7 +272,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({
hide: !(
row.status == 'PENDING'
@ -751,6 +752,31 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
}
}
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else {
return true
}
}
/** 初始化 **/
onMounted(async () => {
getList()

4
src/views/eam/mold/moldMaintainPlan/index.vue

@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:moldMaintainPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldMaintainPlan:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'eam:moldMaintainPlan:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldMaintainPlan:delete'}), //
]
// -

12
src/views/eam/mold/moldRepair/moldRepair.data.ts

@ -33,7 +33,7 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
width: '150',
fixed: 'left',
},
isSearch: true,
isSearch: false,
isForm: false
},
{
@ -100,6 +100,16 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
valueField: 'number'
},
},
},
search: {
component: 'Select',
componentProps: {
options: moldListNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
},
}
},
{

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

@ -524,18 +524,21 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
callback()
}
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true

9
src/views/eam/mold/moldmaintainjob/index.vue

@ -492,12 +492,17 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
}
}
function buttonControllFunction(row, val) {
if (val == 'delete') {
return false
} else if (val == 'edit') {
if (row.status == 'COMPLETED') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true

28
src/views/eam/mold/moldmaintenancejob/index.vue

@ -104,6 +104,7 @@
@detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true"
:openFormCallBack="openFormCallBack"
:buttonControllFunction="buttonControllFunction"
/>
<!-- 导入 -->
@ -281,7 +282,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({
hide: !(
row.status == 'PENDING' &&
@ -762,6 +763,31 @@ const submitFormSec = async (formType, data) => {
}
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else {
return true
}
}
/** 初始化 **/
onMounted(async () => {

106
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -11,6 +11,7 @@ const userListAll = await UserApi.getSimpleUserList()
const userStore = useUserStore()
const factoryList = await selectAllFactoryArea()
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const moldAllList = await MoldAccountsApi.getMoldAccountsAllNoPage({})
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: null })
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
@ -50,105 +51,118 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: false,
isTable: true,
isDetail: false,
},
{
label: '类型',
field: 'type',
label: '厂区',
field: 'factoryAreaNumber',
sort: 'custom',
table: {
width: '150',
},
api: () => factoryList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
return factoryList.find((account) => account.id == cellValue)?.name
},
isSearch: true,
search: {
show: true,
component: 'Select',
api: () => factoryList,
componentProps: {
options: deviceTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
},
labelField: 'name',
valueField: 'id'
}
}
},
form: {
component: 'Select',
api: () => factoryList,
componentProps: {
options: deviceTypeList,
disabled: true,
optionsAlias: {
labelField: 'label',
valueField: 'value'
labelField: 'name',
valueField: 'id'
},
placeholder: "请先选择设备"
},
placeholder: "请选择设备"
}
},
{
label: '厂区',
field: 'factoryAreaNumberMO',
sort: 'custom',
table: {
width: '150',
},
isDetail: true,
isForm: false,
isTable: false,
isSearch: false,
},
{
label: '设备模具编号',
field: 'deviceNumber',
label: '类型',
field: 'type',
sort: 'custom',
table: {
width: '150',
},
api: () => moldList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return moldList.find((account) => account.number == cellValue)?.name
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
},
isSearch: false,
search: {
show: true,
component: 'Input',
// api: () => moldList,
// componentProps: {
// optionsAlias: {
// labelField: 'name',
// valueField: 'number'
// }
// }
component: 'Select',
componentProps: {
options: deviceTypeList,
optionsAlias: {
labelField: 'label',
valueField: 'value'
},
},
},
form: {
component: 'Select',
api: () => moldList,
componentProps: {
options: deviceTypeList,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
labelField: 'label',
valueField: 'value'
},
placeholder: "请选择设备"
}
},
},
{
label: '厂区编号',
field: 'factoryAreaNumber',
label: '设备模具',
field: 'deviceNumber',
sort: 'custom',
table: {
width: '150',
},
api: () => factoryList,
isSearch: false,
api: () => moldAllList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return factoryList.find((account) => account.id == cellValue)?.name
return moldAllList.find((account) => account.number == cellValue)?.name
},
search: {
show: true,
component: 'Select',
api: () => factoryList,
api: () => moldAllList,
componentProps: {
optionsAlias: {
labelField: 'name',
valueField: 'id'
valueField: 'number'
}
}
},
form: {
component: 'Select',
api: () => factoryList,
api: () => moldList,
componentProps: {
disabled: true,
optionsAlias: {
labelField: 'name',
valueField: 'id'
valueField: 'number'
},
placeholder: "请先选择设备"
},
}
},
@ -159,7 +173,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: '150',
},
isSearch: true,
isSearch: false,
api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
@ -185,7 +199,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: '150',
},
isSearch: false,
isSearch: true,
dictType: DICT_TYPE.MAINTENANCE_SHIFT,
dictClass: 'number',
form: {
@ -199,7 +213,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: '150',
},
isSearch: false,
isSearch: true,
dictType: DICT_TYPE.FAULT_TYPE,
dictClass: 'string',
form: {
@ -332,7 +346,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'number',
value: 'deviceNumber',
message: '请选择设备模具编号!',
message: '请选择设备模具!',
isMainValue: true
}]
},
@ -349,7 +363,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{
key: 'number',
value: 'deviceNumber',
message: '请选择设备模具编号!',
message: '请选择设备模具!',
isMainValue: true
}]
}

Loading…
Cancel
Save