Browse Source

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

master_hella_20240701
chenfang 6 months ago
parent
commit
a7367c16b7
  1. 4
      .env.hella16
  2. 1
      src/utils/dict.ts
  3. 21
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  4. 17
      src/views/mes/hrPersonAbility/hrPersonAbility.data.ts
  5. 16
      src/views/mes/hrPersonAbility/index.vue
  6. 10
      src/views/mes/opersteps/index.vue
  7. 5
      src/views/mes/opersteps/opersteps.data.ts
  8. 9
      src/views/mes/operstepsType/index.vue
  9. 30
      src/views/mes/processroute/components/configDialog.vue
  10. 19
      src/views/mes/processroute/index.vue
  11. 18
      src/views/mes/processroute/processroute.data.ts
  12. 103
      src/views/mes/workScheduling/components/qualifiedCheck.vue
  13. 1
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

4
.env.hella16

@ -4,10 +4,10 @@ NODE_ENV=production
VITE_DEV=false
# 请求路径
VITE_BASE_URL='https://172.21.32.16:55563/api'
VITE_BASE_URL='https://scptest.faway-hella.com/api'
# 上传路径
VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload'
VITE_UPLOAD_URL='https://scptest.faway-hella.com/api/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=

1
src/utils/dict.ts

@ -340,5 +340,6 @@ export enum DICT_TYPE {
// ========== eam - 业务 - ==========
DEVICE_TYPE = 'device_type', // 设备类型
IS_UPDATED = 'is_updated', //是否可修改
}

21
src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -40,7 +40,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '项是否可修改',
field: 'isUpdated',
sort: 'custom',
dictType: DICT_TYPE.IS_UPDATED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: true,
form: {
component: 'Switch',
value: 'TRUE',
@ -100,14 +106,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用',
field: 'available',
sort: 'custom',
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: false,
isTableForm: false,
isForm: false,
},
{
label: '删除时间',

17
src/views/mes/hrPersonAbility/hrPersonAbility.data.ts

@ -1,8 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as AbilityInfoApi from '@/api/mes/abilityInfo'
import * as UserApi from "@/api/system/user";
import { AbilityInfo } from '../abilityInfo/abilityInfo.data'
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data";
// 表单校验
export const HrPersonAbilityRules = reactive({
@ -116,6 +117,20 @@ export const HrPersonAbility = useCrudSchemas(reactive<CrudSchema[]>([
field: 'personCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '人员信息', // 查询弹窗标题
searchAllSchemas: searchUser.allSchemas, // 查询弹窗所需类
searchField: 'username', // 查询弹窗赋值字段
searchPage: UserApi.getUserPage, // 查询弹窗所需分页方法
searchCondition: [{
action: "==",
column: 'userType',
value: 'WORKER'
}]
}
}
},
{
label: '能力编号',

16
src/views/mes/hrPersonAbility/index.vue

@ -49,7 +49,7 @@
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :isBasicMes="true" :allSchemas="HrPersonAbility.allSchemas" :detailAllSchemas="HrPersonAbility.allSchemas"
:apiPage="HrPersonAbilityApi.getHrPersonAbilityPage"/>
@ -80,9 +80,17 @@ const tableColumns = ref(HrPersonAbility.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField === 'ablityCode') {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
if (formField === 'personCode') {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}

10
src/views/mes/opersteps/index.vue

@ -149,6 +149,16 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Opersteps.allSchemas.formSchema.forEach(item => {
if (item.field == 'stepsCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
basicFormRef.value.open(type, row)
}

5
src/views/mes/opersteps/opersteps.data.ts

@ -5,7 +5,10 @@ import { OperstepsType } from '../operstepsType/operstepsType.data'
// 表单校验
export const OperstepsRules = reactive({
concurrencyStamp: [required],
//concurrencyStamp: [required],
stepsCode: [required],
stepsName: [required],
collectCode: [required],
})
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([

9
src/views/mes/operstepsType/index.vue

@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
OperstepsType.allSchemas.formSchema.forEach(item => {
if (item.field == 'collectCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

30
src/views/mes/processroute/components/configDialog.vue

@ -42,7 +42,7 @@
<el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="操作" width="60">
<template #default="scope">
<el-button size="mini" type="text" @click="deleteNode(scope.row)"
<el-button size="mini" type="text" @click="deleteNode(scope.row,scope.$index)"
>移除</el-button
>
</template>
@ -250,10 +250,16 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
})
}
}
const deleteNode=(row)=>{
processData.value.splice(processData.value.indexOf(row),1)
const deleteNode=(row,index:number)=>{
//console.log('row------',index)
//showProcessNodeData.value.splice(index,1)
processData.value.splice((page.value.current-1)*page.value.size+index,1)
page.value.total=processData.value.length
page.value.current=1
showProcessNodeData.value=processData.value.slice(1,1+page.value.size);
//page.value.current=1
//showProcessNodeData.value=processData.value.slice((page.value.current-1)*page.value.size,page.value.size)
graph.value.removeNode(row.code)
}
@ -278,6 +284,9 @@ const openDetail = (row: any) => {
materialData.value = []
mouldData.value = []
workStationList.value = []
processData.value=[]
showProcessNodeData.value = []
showMaterialsData.value = []
graph.value.on('node:dblclick', ({ e, x, y, node, view }) => {
nodeClick(e, x, y, node, view)
})
@ -297,6 +306,7 @@ const handleDrawerClose = () => {
//console.log(graph.value.toJSON())
rowData.value=null
}
emit('close')
}
//** */
const getProcessInfo = async (id: any) => {
@ -440,15 +450,15 @@ const saveResult = async () => {
processrouteId: processRouteId.value
}
let res = ProcessrouteApi.saveGraphData(gdata)
if (res) {
message.success('保存成功!')
} else {
message.error('保存失败!')
}
await ProcessrouteApi.saveGraphData(gdata)
// if (res) {
// message.success('')
// } else {
// message.error('')
// }
isShowDrawer.value = false
handleDrawerClose()
emit('close')
//emit('close',)
//return res
}

19
src/views/mes/processroute/index.vue

@ -157,16 +157,25 @@ const buttonTableClick = async (val, row) => {
openDetail(row)
}
}
const dailogClose=() => {
console.log('close');
nextTick?.(()=>{
getList()
})
const dailogClose= () => {
//console.log('dailogClose--confge',getList());
//nextTick?.(()=>{
getList()
//})
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Processroute.allSchemas.formSchema.forEach(item => {
if (item.field == 'processrouteCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
}

18
src/views/mes/processroute/processroute.data.ts

@ -4,11 +4,9 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验
export const ProcessrouteRules = reactive({
processrouteCode: [required],
processName: [required],
productCode: [required],
ablityCode: [required],
ablityCode: [required],
processrouteCode: [{ required: true, message: '请输入工艺路线编码!', trigger: 'blur' },],
processName: [{ required: true, message: '请输入工艺路线名称!', trigger: 'blur' },],
productCode: [{ required: true, message: '请输入产品编码!', trigger: 'blur' },],
})
export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
@ -59,15 +57,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
field: 'processrouteCode',
sort: 'custom',
isSearch: true,
// form: {
// component: 'Input',
// componentProps: {
// slots:{
// default:}
// disabled: true
// }
// }
},
{

103
src/views/mes/workScheduling/components/qualifiedCheck.vue

@ -7,38 +7,37 @@
width="600px"
>
<template #title>{{ dialogTitle }} </template>
<el-form :model="form">
<el-form-item label="工序">
<el-input v-model="form.processCode" disabled />
<el-form :model="baseform" ref="baseformRef">
<el-form-item label="工序" prop="processCode">
<el-input v-model="baseform.processCode" disabled />
</el-form-item>
<el-form-item label="生产人员" required="true">
<el-select v-model="form.personSelected" multiple>
<el-form-item label="生产人员" prop="personSelected" :rules="[{ required: true, message: '请选择报工人', trigger: 'blur' }]">
<el-select v-model="baseform.personSelected" multiple >
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" />
</el-select>
</el-form-item>
<el-form-item label="质检人员" required="true" >
<el-input v-model="form.checkPerson"/>
<el-form-item label="质检人员" prop="checkPerson" :rules="[{ required: true, message: '请填写质检人登录名', trigger: 'blur' }]">
<el-input v-model="baseform.checkPerson" />
</el-form-item>
<el-form-item label="合格数量" @change="handleCount" :key="qcount" required="true">
<el-form-item label="合格数量" @change="handleCount" :key="qcount" prop="qualified" :rules="[{ required: true, message: '请填写合格数量', trigger: 'blur' }]">
<el-input-number
v-model="form.qualified"
v-model="baseform.qualified"
@change="handleCount"
></el-input-number>
</el-form-item>
<el-form-item label="不合格数量" >
<el-input-number v-model="form.unqualified" @change="handleCount" :key="qcount"></el-input-number>
<el-form-item label="不合格数量" prop="unqualified" :rules="[{ required: true, message: '请填写不合格数量', trigger: 'blur' }]">
<el-input-number v-model="baseform.unqualified" @change="handleCount" :key="qcount" prop="unqualified"></el-input-number>
</el-form-item>
<el-form-item label="不合格原因">
<el-input v-model="form.remark"></el-input>
<el-form-item label="不合格原因" prop="remark" :rules="[{ required: true, message: '请填写不合格原因', trigger: 'blur' }]">
<el-input v-model="baseform.remark"></el-input>
</el-form-item>
</el-form>
<template #footer>
<template #footer>
<el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button>
</template> </Dialog
>
</template>
</template> </Dialog>
<script lang="ts" setup>
import { Dialog } from '@/components/Dialog'
import * as workschedulingApi from '@/api/mes/workScheduling'
@ -51,7 +50,8 @@ const formLoading = ref(false)
const personOption=ref([])
const saveFlag=ref(false)
const planDayCode=ref()
const form = reactive({
const baseformRef=ref()
const baseform = reactive({
id:0,
planDayCode: "",
processCode:"",
@ -66,16 +66,17 @@ const openDetail = async (row: any, titleName: any,code:string) => {
//console.log('row-68',row)
dialogVisible.value = true
dialogTitle.value = titleName
form.processCode=row.nodeCode
form.personSelected=[]
form.planDayCode=code
form.personSelected=[]
form.qualified=0
form.unqualified=0
form.id=row.id
baseform.processCode=row.nodeCode
baseform.personSelected=[]
baseform.planDayCode=code
baseform.personSelected=[]
baseform.qualified=0
baseform.unqualified=0
baseform.id=row.id
planDayCode.value=code
getCurrentWorkerList(row.nodeCode)
}
//
@ -87,52 +88,52 @@ const getCurrentWorkerList = async (val) => {
}
personOption.value = await workschedulingApi.getCurrentWorkerList(params)
}
const qcount=ref(0)
//
const handleCount = () => {
qcount.value++
if (form.qualified> rowData.value.planCount - form.unqualified) {
if (baseform.qualified> rowData.value.planCount - baseform.unqualified) {
message.alert('合格数量超限!计划总数【'+rowData.value.planCount+'】')
form.qualified =rowData.value.planCount - form.unqualified
baseform.qualified =rowData.value.planCount - baseform.unqualified
return
}
if (form.unqualified> rowData.value.planCount -form.qualified ) {
}
if (baseform.unqualified> rowData.value.planCount -baseform.qualified ) {
message.alert('不合格数量超限!')
form.unqualified =rowData.value.planCount-form.qualified
baseform.unqualified =rowData.value.planCount-baseform.qualified
return
}
}
//
const saveReport = async() => {
if(form.personSelected.length<1){
message.alert('生产人员不能为空')
return
}
if(form.checkPerson==''||form.checkPerson.trim()==''){
message.alert('质检人员不能为空')
return
}
if(form.qualified<1){
message.alert('合格数量不能小于1!')
return
}
saveFlag.value = true
try {
await workschedulingApi.processQualified(form)
}finally{
saveFlag.value = false
dialogVisible.value = false
emit('close')
}
const saveReport = () => {
if (!baseformRef) return
baseformRef.value.validate((valid) => {
if (valid) {
saveFlag.value = true
try {
workschedulingApi.processQualified(baseform)
}finally{
saveFlag.value = false
dialogVisible.value = false
emit('close')
}
} else {
console.log('请确认数据的正确!')
}
})
//console.log("report-saveReport-82",data)
//await workschedulingApi.reportWorkByProcess(data)
}
//
const emit = defineEmits(['success', 'close'])
defineOptions({ name: 'qualifiedCheck' })
defineExpose({ openDetail }) // open
</script>

1
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -114,6 +114,7 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
isTable:false
isTable:false
},
{
label: '地点ID',

Loading…
Cancel
Save