Browse Source

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

master_hella_20240701
liuchen864 8 months ago
parent
commit
2d7a727f1e
  1. 10
      src/api/mes/workstation/index.ts
  2. 22
      src/views/mes/ordermonthplan/index.vue
  3. 37
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  4. 63
      src/views/mes/workstation/index.vue
  5. 58
      src/views/mes/workstation/workstation.data.ts
  6. 14
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  7. 10
      src/views/qms/inspection/inspectionJob/addForm.vue
  8. 6
      src/views/qms/inspection/inspectionJob/index.vue

10
src/api/mes/workstation/index.ts

@ -40,16 +40,6 @@ export const deleteWorkstation = async (id: number) => {
return await request.delete({ url: `/mes/workstation/delete?id=` + id })
}
// 导出工位 Excel
export const exportWorkstation = async (params) => {
return await request.download({ url: `/mes/workstation/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' })
}
export const getEquipmentPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {

22
src/views/mes/ordermonthplan/index.vue

@ -44,9 +44,10 @@
@success="formsSuccess"
:rules="MesOrderMonthMainRules"
:formAllSchemas="MesOrderMonthMain.allSchemas"
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthMain"
:apiCreate="MesOrderMonthApi.createMesOrderMonthMain"
:apiUpdate="updateMesOrderMonthMain"
:apiCreate="createMesOrderMonthMain"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -106,7 +107,11 @@ import {
MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
import * as OrderDayApi from "@/api/mes/orderDay";
import {breakdown, MesOrderMonthSubVO} from "@/api/mes/ordermonthplan";
import {
breakdown,
MesOrderMonthMainVO,
MesOrderMonthSubVO
} from "@/api/mes/ordermonthplan";
defineOptions({ name: 'MesOrderMonthMain' })
@ -198,6 +203,7 @@ const formsSuccess = async (formType,data) => {
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
data.factoryName = factoryName
if (formType === 'create') {
await MesOrderMonthApi.createMesOrderMonthMain(data)
message.success(t('common.createSuccess'))
@ -208,7 +214,6 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
let mainPlanId
@ -278,8 +283,10 @@ onMounted(async () => {
const detailAllSchemas = ref(MesOrderMonthSub.allSchemas)
//
let productName
let factoryName
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
@ -289,6 +296,10 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
productName = val[0].name
getBoms(val[0][searchField])
}
if(formField=='factoryCode'){
factoryName = val[0].name
formRef.setValues({factoryCode:val[0]['id']})
}
// if(formField=='workroomCode'){
// getProductlines(val[0][searchField])
// }
@ -304,6 +315,8 @@ const getBoms = async (code: String) => {
}
})
}
const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
data.productName = productName
return await MesOrderMonthApi.createMesOrderMonthSub(data)
@ -314,7 +327,6 @@ const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
}
// --
const detailButtonBaseClick = async (val, item) => {
debugger
try {
//
await message.confirm('确定要拆解成日计划吗?')

37
src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts

@ -1,5 +1,6 @@
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
import * as TenantApi from '@/api/system/tenant'
// 表单校验
export const MesOrderMonthMainRules = reactive({
@ -35,24 +36,24 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'factoryCode',
sort: 'custom',
isTable: false,
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择工厂', // 输入框占位文本
// searchField: 'id', // 查询弹窗赋值字段
// searchTitle: '请选择工厂', // 查询弹窗标题
// searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类
// searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法
// isHideFilterButton: true,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
// ]
// }
// }
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工厂', // 输入框占位文本
searchField: 'factoryCode', // 查询弹窗赋值字段
searchTitle: '请选择工厂', // 查询弹窗标题
searchAllSchemas: FactoryList.allSchemas, // 查询弹窗所需类
searchPage: TenantApi.getTenantPage, // 查询弹窗所需分页方法
isHideFilterButton: true,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
{
label: '工厂名称',

63
src/views/mes/workstation/index.vue

@ -69,24 +69,19 @@
@detailOpenForm="detailOpenForm"
/>
<BasicForm
ref="teamListRef"
ref="tmpPopListRef"
:formAllSchemas="tmpPopList"
:isBusiness="false"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
Equipment,
Process,
Opersteps,
TabsList,
Team,
Workstation,
WorkstationRules,equipmentPopList,processPopList,stepPopList
WorkstationRules,equipmentPopList,stepPopList
} from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -130,8 +125,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:workstation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -148,11 +143,7 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
}else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
@ -218,37 +209,6 @@ const handleDelete = async (id: number) => {
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await WorkstationApi.exportWorkstation(tableObject.params)
download.excel(data, '工位.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工位导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
@ -261,7 +221,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await WorkstationApi.importTemplate()
})
/** 详情操作 */
const detailRef = ref()
@ -270,7 +229,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation')
}
//
const detailAllSchemas = ref(Team.allSchemas)
const detailAllSchemas = ref(Equipment.allSchemas)
const apiPage = ref(WorkstationApi.getEquipmentPage)
const tableKey = ref("Team");
let tmpPopList = equipmentPopList.allSchemas
@ -283,12 +242,6 @@ const changeTabs = (data) =>{
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
tabsCreateApi = WorkstationApi.createEquipmentRelation
tmpPopList = equipmentPopList.allSchemas
}else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = Process.allSchemas
tabsDeleteApi = WorkstationApi.deleteProcessRelation
tabsCreateApi = WorkstationApi.createProcessRelation
tmpPopList = processPopList.allSchemas
}else if(data.prop == 'Opersteps'){
apiPage.value = WorkstationApi.getOperstepsPage
detailAllSchemas.value = Opersteps.allSchemas
@ -297,9 +250,9 @@ const changeTabs = (data) =>{
tmpPopList = stepPopList.allSchemas
}
}
const teamListRef = ref()
const tmpPopListRef = ref()
const detailOpenForm = async (type, params) => {
teamListRef.value.open('create', null, null, 'viewDetail')//
tmpPopListRef.value.open('create', null, null, 'viewDetail')//
}
</script>

58
src/views/mes/workstation/workstation.data.ts

@ -19,10 +19,6 @@ export const TabsList = [{
label: "设备",
prop: 'Equipment',
},
{
label: "工序",
prop: 'Process',
},
{
label: "操作步骤",
prop: 'Opersteps',
@ -95,13 +91,6 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '生效时间',
field: 'activeTime',
@ -161,13 +150,14 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isTable: true,
table: {
width: 150,
fixed: 'right'
}
}
]))
export const Team = useCrudSchemas(reactive<CrudSchema[]>([
export const select = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
@ -181,17 +171,6 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
@ -222,33 +201,6 @@ export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true
}
]))
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
@ -291,7 +243,7 @@ export const equipmentPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择设备', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择设备', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkEquipmentPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
@ -316,7 +268,7 @@ export const processPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择工序', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择工序', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkProcessPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
@ -341,7 +293,7 @@ export const stepPopList = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '选择操作步骤', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择操作步骤', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchAllSchemas: select.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkOperstepsPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',

14
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -276,7 +276,19 @@
prop="inspectionCharacteristicsBaseVO.quantifyUom"
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"
>
<el-input v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" />
<el-select
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom"
placeholder="请选择结果录入方式"
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.UOM
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">

10
src/views/qms/inspection/inspectionJob/addForm.vue

@ -296,7 +296,7 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
>
<el-form-item label="选定集" required>
<el-select
@ -537,7 +537,8 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
console.log(data.value)
console.log(data.value)//
await InspectionJobMainApi.acceptInspectionJobMain(row.id)
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
@ -644,7 +645,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' |
}
}
/** 修改名称时间 */
const buttonBaseClick1 = (val) => {
const buttonBaseClick1 =async (val) => {
//
if (val == 'save') {
if (!nameRef.value) return
@ -692,13 +693,14 @@ const buttonBaseClick1 = (val) => {
dialogVisibleName.value = false
}
}
const buttonBaseClick = (val) => {
const buttonBaseClick =async(val) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false
}
}

6
src/views/qms/inspection/inspectionJob/index.vue

@ -161,10 +161,10 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:execute'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'qms:inspection-job-main:execute'}), //
defaultButtons.mainListPackageBtn(null), //
]
}

Loading…
Cancel
Save