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 8 months ago
parent
commit
54d7f59742
  1. 53
      src/api/mes/ordermonthplan/index.ts
  2. 54
      src/api/mes/partternType/index.ts
  3. 20
      src/api/qms/inspectionJob/inspectionJobDetail/index.ts
  4. 16
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  5. 25
      src/api/wms/unplannedissueRecordMain/index.ts
  6. 33
      src/components/BasicForm/src/BasicForm.vue
  7. 12
      src/components/Detail/src/Detail.vue
  8. 3
      src/components/TableForm/src/TableForm.vue
  9. 2
      src/utils/dict.ts
  10. 44
      src/views/mes/ordermonthplan/index.vue
  11. 58
      src/views/mes/ordermonthplan/mesOrderMonthMain.data.ts
  12. 162
      src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts
  13. 244
      src/views/mes/partternType/index.vue
  14. 144
      src/views/mes/partternType/partternType.data.ts
  15. 3
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  16. 1
      src/views/qms/basicDataManage/inspectionPlan/index.vue
  17. 16
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  18. 1010
      src/views/qms/inspection/inspectionJob/addForm.vue
  19. 37
      src/views/qms/inspection/inspectionJob/index.vue
  20. 12
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  21. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue
  22. 4
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue
  23. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  24. 41
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  25. 3
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

53
src/api/mes/ordermonthplan/index.ts

@ -58,3 +58,56 @@ export const exportMesOrderMonthMain = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/plan/mes-order-month-main/get-import-template' })
}
export interface MesOrderMonthSubVO {
status: string
remark: string
productCode: string
bomCode: string
inStoreCode: string
planBegin: Date
planEnd: Date
realStart: string
realFinish: Date
planCount: number
finishCount: number
qualifiedCount: number
unqualifiedCount: number
flagBackwash: string
productBatchcode: string
}
// 查询订单月计划子列表
export const getMesOrderMonthSubPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/plan/mes-order-month-sub/senior', data })
} else {
return await request.get({ url: `/plan/mes-order-month-sub/page`, params })
}
}
// 查询订单月计划子详情
export const getMesOrderMonthSub = async (id: number) => {
return await request.get({ url: `/plan/mes-order-month-sub/get?id=` + id })
}
// 新增订单月计划子
export const createMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
return await request.post({ url: `/plan/mes-order-month-sub/create`, data })
}
// 修改订单月计划子
export const updateMesOrderMonthSub = async (data: MesOrderMonthSubVO) => {
return await request.put({ url: `/plan/mes-order-month-sub/update`, data })
}
// 删除订单月计划子
export const deleteMesOrderMonthSub = async (id: number) => {
return await request.delete({ url: `/plan/mes-order-month-sub/delete?id=` + id })
}
// 导出订单月计划子 Excel
export const exportMesOrderMonthSub = async (params) => {
return await request.download({ url: `/plan/mes-order-month-sub/export-excel`, params })
}

54
src/api/mes/partternType/index.ts

@ -0,0 +1,54 @@
import request from '@/config/axios'
export interface PartternTypeVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
code: string
name: string
}
// 查询模具类型列表
export const getPartternTypePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/parttern-type/senior', data })
} else {
return await request.get({ url: `/mes/parttern-type/page`, params })
}
}
// 查询模具类型详情
export const getPartternType = async (id: number) => {
return await request.get({ url: `/mes/parttern-type/get?id=` + id })
}
// 新增模具类型
export const createPartternType = async (data: PartternTypeVO) => {
return await request.post({ url: `/mes/parttern-type/create`, data })
}
// 修改模具类型
export const updatePartternType = async (data: PartternTypeVO) => {
return await request.put({ url: `/mes/parttern-type/update`, data })
}
// 删除模具类型
export const deletePartternType = async (id: number) => {
return await request.delete({ url: `/mes/parttern-type/delete?id=` + id })
}
// 导出模具类型 Excel
export const exportPartternType = async (params) => {
return await request.download({ url: `/mes/parttern-type/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/parttern-type/get-import-template' })
}

20
src/api/qms/inspectionJob/inspectionJobDetail/index.ts

@ -28,38 +28,42 @@ export const getInspectionJobDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/inspection/inspection-job-detail/senior', data })
return await request.post({ url: '/qms/inspection-job-detail/senior', data })
} else {
return await request.get({ url: `/inspection/inspection-job-detail/page`, params })
return await request.get({ url: `/qms/inspection-job-detail/page`, params })
}
}
//查询检验申请列表
export const getInspectionJobDetailList = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-detail/list?masterId=` + id })
}
// 查询检验申请详情
export const getInspectionJobDetail = async (id: number) => {
return await request.get({ url: `/inspection/inspection-job-detail/get?id=` + id })
return await request.get({ url: `/qms/inspection-job-detail/get?id=` + id })
}
// 新增检验申请
export const createInspectionJobDetail = async (data: InspectionJobDetailVO) => {
return await request.post({ url: `/inspection/inspection-job-detail/create`, data })
return await request.post({ url: `/qms/inspection-job-detail/create`, data })
}
// 修改检验申请
export const updateInspectionJobDetail = async (data: InspectionJobDetailVO) => {
return await request.put({ url: `/inspection/inspection-job-detail/update`, data })
return await request.put({ url: `/qms/inspection-job-detail/update`, data })
}
// 删除检验申请
export const deleteInspectionJobDetail = async (id: number) => {
return await request.delete({ url: `/inspection/inspection-job-detail/delete?id=` + id })
return await request.delete({ url: `/qms/inspection-job-detail/delete?id=` + id })
}
// 导出检验申请 Excel
export const exportInspectionJobDetail = async (params) => {
return await request.download({ url: `/inspection/inspection-job-detail/export-excel`, params })
return await request.download({ url: `/qms/inspection-job-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/inspection/inspection-job-detail/get-import-template' })
return request.download({ url: '/qms/inspection-job-detail/get-import-template' })
}

16
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -28,38 +28,38 @@ export const getInspectionJobMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/inspection/inspection-job-main/senior', data })
return await request.post({ url: '/qms/inspection-job-main/senior', data })
} else {
return await request.get({ url: `/inspection/inspection-job-main/page`, params })
return await request.get({ url: `/qms/inspection-job-main/page`, params })
}
}
// 查询检验申请详情
export const getInspectionJobMain = async (id: number) => {
return await request.get({ url: `/inspection/inspection-job-main/get?id=` + id })
return await request.get({ url: `/qms/inspection-job-main/get?id=` + id })
}
// 新增检验申请
export const createInspectionJobMain = async (data: InspectionJobMainVO) => {
return await request.post({ url: `/inspection/inspection-job-main/create`, data })
return await request.post({ url: `/qms/inspection-job-main/create`, data })
}
// 修改检验申请
export const updateInspectionJobMain = async (data: InspectionJobMainVO) => {
return await request.put({ url: `/inspection/inspection-job-main/update`, data })
return await request.put({ url: `/qms/inspection-job-main/update`, data })
}
// 删除检验申请
export const deleteInspectionJobMain = async (id: number) => {
return await request.delete({ url: `/inspection/inspection-job-main/delete?id=` + id })
return await request.delete({ url: `/qms/inspection-job-main/delete?id=` + id })
}
// 导出检验申请 Excel
export const exportInspectionJobMain = async (params) => {
return await request.download({ url: `/inspection/inspection-job-main/export-excel`, params })
return await request.download({ url: `/qms/inspection-job-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/inspection/inspection-job-main/get-import-template' })
return request.download({ url: '/qms/inspection-job-main/get-import-template' })
}

25
src/api/wms/unplannedissueRecordMain/index.ts

@ -29,8 +29,33 @@ export const getUnplannedissueRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'dataType',
'action':'==',
'value':'1'
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
} else {
params.dataType='1'
return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
}
}
// 查询计划外出库记录主列表
export const getUnplannedissueRecordMainPageSpare = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
const dataTypeCondition = {
'column':'dataType',
'action':'==',
'value':'2'
}
data.filters.push(dataTypeCondition)
return await request.post({ url: '/wms/unplannedissue-record-main/senior', data })
} else {
params.dataType='2'
return await request.get({ url: `/wms/unplannedissue-record-main/page`, params })
}
}

33
src/components/BasicForm/src/BasicForm.vue

@ -89,7 +89,11 @@
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
/>
>
<template v-slot="{row}">
<slot :row="row"></slot>
</template>
</TableForm>
</div>
<div v-if="isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
<TableFormCountPlan
@ -275,12 +279,17 @@ const props = defineProps({
//searchTable
/***[{
formField:form中对应的field,
valueField:searchtable中对应的field,
tableField:searchtable中对应的field,
}]*/
sumFormData:{
sumFormDataField:{
type: Array,
required: false,
default: null
},
sumFormDataByForm:{
type:Function,
required: false,
default: null
}
})
@ -395,11 +404,11 @@ const opensearchTable = (
}
const changeSumFormData = () => {
if(props.sumFormData){
const sumFormDataByTable = () => {
if(props.sumFormDataField){
const sumObject = {}
props.sumFormData.forEach(sumItem=>{
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.valueField],0)
props.sumFormDataField.forEach(sumItem=>{
sumObject[sumItem?.formField]= props.tableData.reduce((prev, item) => prev + item[sumItem?.tableField],0)
})
nextTick(()=>{
formRef.value.setValues(sumObject)
@ -407,7 +416,15 @@ const changeSumFormData = () => {
}
}
watch(()=>props.tableData,() => {
changeSumFormData()
sumFormDataByTable()
},{
deep:true
})
watch(()=>unref(formRef)?.formModel,() => {
if(props?.sumFormDataByForm&&unref(formRef)?.formModel){
props?.sumFormDataByForm(formRef,unref(formRef)?.formModel)
}
},{
deep:true
})

12
src/components/Detail/src/Detail.vue

@ -322,6 +322,12 @@ const props = defineProps({
required: false,
default: false
},
//
otherHeadButttonData:{
type:Array,
required: false,
default: () => []
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@ -544,7 +550,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defaultButtons.defaultFilterBtn(null) //
]
}
HeadButttondata.value = [...HeadButttondata.value,...props.otherHeadButttonData]
let detailButtonEdit: any = []
let detailButtonDelete: any = []
if (props.detailButtonIsShowEdit) {
@ -654,6 +660,7 @@ const buttonBaseClick = (val, item) => {
} else {
//
console.log('其他按钮', item)
emit('buttonBaseClick',val, item)
}
}
@ -781,7 +788,8 @@ const emit = defineEmits([
'openImage',
'onBlur',
'detailBasicFormOnChange',
'formFormDateChange'
'formFormDateChange',
'buttonBaseClick'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {

3
src/components/TableForm/src/TableForm.vue

@ -69,6 +69,9 @@
/>
<el-button v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
</el-form-item>
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
<slot :row="row"></slot>
</el-form-item>
<!-- 金额输入框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'number'"

2
src/utils/dict.ts

@ -285,7 +285,7 @@ export enum DICT_TYPE {
MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单)
MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式
MES_PLANDO_STATUS='mes_plando_status', //计划执行状
PLAN_TYPE_MES='plan_type_mes',
//========== QMS ==========
SAMPLING_TYPE = "sampling_type", // 取样类型

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

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #planMasterCode="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.planMasterCode)">
<span>{{ row.planMasterCode }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -44,17 +44,26 @@
@success="formsSuccess"
:rules="MesOrderMonthMainRules"
:formAllSchemas="MesOrderMonthMain.allSchemas"
:apiUpdate="MesOrderMonthMainApi.updateMesOrderMonthMain"
:apiCreate="MesOrderMonthMainApi.createMesOrderMonthMain"
@searchTableSuccess="searchTableSuccess"
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthMain"
:apiCreate="MesOrderMonthApi.createMesOrderMonthMain"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthMain"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef"
:isBasic="false"
:detailAllSchemasRules="MesOrderMonthMainRules"
:allSchemas="MesOrderMonthMain.allSchemas"
:detailAllSchemas="MesOrderMonthSub.allSchemas"
:detailAllSchemasRules="MesOrderMonthSubRules"
:apiPage="MesOrderMonthApi.getMesOrderMonthSubPage"
:apiCreate="MesOrderMonthApi.createMesOrderMonthSub"
:apiUpdate="MesOrderMonthApi.updateMesOrderMonthSub"
:apiDelete="MesOrderMonthApi.deleteMesOrderMonthSub"
:tabs="TabsList"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/plan/mes-order-month-main/import"
@ -63,18 +72,21 @@
<script setup lang="ts">
import download from '@/utils/download'
import {MesOrderMonthMain, MesOrderMonthMainRules} from './mesOrderMonthMain.data'
import * as MesOrderMonthMainApi from '@/api/mes/ordermonthplan'
import {MesOrderMonthMain, MesOrderMonthMainRules,TabsList} from './mesOrderMonthMain.data'
import * as MesOrderMonthApi from '@/api/mes/ordermonthplan'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import {
MesOrderMonthSub,
MesOrderMonthSubRules
} from "@/views/mes/ordermonthplan/mesOrderMonthSub.data";
defineOptions({ name: 'MesOrderMonthMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
@ -95,7 +107,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: MesOrderMonthMainApi.getMesOrderMonthMainPage //
getListApi: MesOrderMonthApi.getMesOrderMonthMainPage //
})
//
@ -170,10 +182,10 @@ const formsSuccess = async (formType,data) => {
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await MesOrderMonthMainApi.createMesOrderMonthMain(data)
await MesOrderMonthApi.createMesOrderMonthMain(data)
message.success(t('common.createSuccess'))
} else {
await MesOrderMonthMainApi.updateMesOrderMonthMain(data)
await MesOrderMonthApi.updateMesOrderMonthMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
@ -192,7 +204,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await MesOrderMonthMainApi.deleteMesOrderMonthMain(id)
await MesOrderMonthApi.deleteMesOrderMonthMain(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -207,7 +219,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await MesOrderMonthMainApi.exportMesOrderMonthMain(tableObject.params)
const data = await MesOrderMonthApi.exportMesOrderMonthMain(tableObject.params)
download.excel(data, '订单计划月主.xlsx')
} catch {
} finally {
@ -242,7 +254,7 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await MesOrderMonthMainApi.importTemplate()
importTemplateData.templateUrl = await MesOrderMonthApi.importTemplate()
})
</script>

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

@ -1,40 +1,49 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
// 表单校验
export const MesOrderMonthMainRules = reactive({
planMasterCode: [required],
planSubCode:[required],
planType:[required],
factoryCode:[required]
planSubCode: [required],
planType: [required],
factoryCode: [required]
})
export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '计划类型',
field: 'planType',
label: '主计划编码',
field: 'planMasterCode',
sort: 'custom',
isSearch: true
},
{
label: '计划辅助编码',
field: 'planSubCode',
sort: 'custom',
isSearch: true
}, {
label: '工厂编码',
field: 'factoryCode',
sort: 'custom',
isTable: false
},
{
label: '主计划编码',
field: 'planMasterCode',
label: '工厂名称',
field: 'factoryName',
sort: 'custom',
isTable: false,
isSearch: true
},
{
label: '计划辅助编码',
field: 'planSubCode',
isSearch: true,
isForm: false
}, {
label: '计划类型',
field: 'planType',
sort: 'custom',
isTable: true,
isSearch: true
dictType: DICT_TYPE.PLAN_TYPE_MES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '备注',
@ -48,6 +57,9 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: {
component: 'DatePicker',
componentProps: {
@ -65,13 +77,6 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isForm: false
},
{
label: '工厂名称',
field: 'factoryName',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
@ -82,3 +87,8 @@ export const MesOrderMonthMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
]))
export const TabsList = [{
label: "子计划",
prop: 'mesOrderMonthSub',
}
]

162
src/views/mes/ordermonthplan/mesOrderMonthSub.data.ts

@ -0,0 +1,162 @@
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
// 表单校验
export const MesOrderMonthSubRules = reactive({
productCode: [required],
productName: [required],
bomCode: [required],
inStoreCode: [required],
planBegin: [required],
planEnd: [required],
planCount: [required],
productBatchcode: [required]
})
export const MesOrderMonthSub = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '产品编码',
field: 'productCode',
sort: 'custom',
isTable: false,
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '产品名称',
field: 'productName',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: 'BOM编号',
field: 'bomCode',
sort: 'custom',
isTable: false,
isSearch: true
},
{
label: '入库仓库编码',
field: 'inStoreCode',
sort: 'custom',
isSearch: true
},
{
label: '计划数量',
field: 'planCount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '完成数量',
field: 'finishCount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '合格数量',
field: 'qualifiedCount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '不合格数量',
field: 'unqualifiedCount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '是否回冲',
field: 'flagBackwash',
sort: 'custom',
isSearch: true
},
{
label: '产品批次号',
field: 'productBatchcode',
sort: 'custom',
isSearch: true
}, {
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false
},
{
label: '计划开始日期',
field: 'planBegin',
sort: 'custom',
isSearch: true
},
{
label: '计划结束日期',
field: 'planEnd',
sort: 'custom',
isSearch: true
},
{
label: '实际开工日期',
field: 'realStart',
sort: 'custom',
isSearch: true
},
{
label: '实际完工日期',
field: 'realFinish',
sort: 'custom',
isSearch: true
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isTable: false
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/mes/partternType/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="PartternType.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PartternType.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="PartternTypeRules"
:formAllSchemas="PartternType.allSchemas"
:apiUpdate="PartternTypeApi.updatePartternType"
:apiCreate="PartternTypeApi.createPartternType"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="PartternType.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/parttern-type/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { PartternType,PartternTypeRules } from './partternType.data'
import * as PartternTypeApi from '@/api/mes/partternType'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
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: 'PartternType' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PartternType.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: PartternTypeApi.getPartternTypePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:partternType:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:partternType:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:partternType:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:partternType:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:partternType:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =PartternType.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await PartternTypeApi.createPartternType(data)
message.success(t('common.createSuccess'))
} else {
await PartternTypeApi.updatePartternType(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicPartternType')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PartternTypeApi.deletePartternType(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PartternTypeApi.exportPartternType(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 = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PartternTypeApi.importTemplate()
})
</script>

144
src/views/mes/partternType/partternType.data.ts

@ -0,0 +1,144 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const PartternTypeRules = reactive({
code: [required],
})
export const PartternType = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '删除时间',
field: 'deleteTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '主键',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
},
{
label: '删除用户名',
field: 'deleter',
sort: 'custom',
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm:false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '类型编码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '类型名称',
field: 'name',
sort: 'custom',
isSearch: true,
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.QUALIFY_STATUS,
dictClass: 'string',
isForm: true,
isSearch: true,
isTable: true,
form: {
component: 'Switch',
value: '2',
componentProps: {
inactiveValue: '2',
activeValue: '1'
}
},
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail:false,
table: {
width: 150,
fixed: 'right'
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
isTable: false
}
]))

3
src/views/qms/basicDataManage/inspectionPlan/addForm.vue

@ -7,7 +7,7 @@
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20">
<el-col :span="12">
@ -879,6 +879,7 @@ const submitForm = async () => {
try {
const validateForm1 = await validateForm(formProcessRef.value)
console.log(validateForm1)
console.log(data.value)
await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`)

1
src/views/qms/basicDataManage/inspectionPlan/index.vue

@ -60,7 +60,6 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
import { json } from 'stream/consumers'
defineOptions({ name: 'AgvLocationrelation' })

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

@ -6,7 +6,7 @@
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 60vh; overflow-y: auto; padding: 0px 20px">
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<!-- <Form ref="formRefMain" :schema="formAllSchemasMain" :is-col="true" :rules="rules" /> -->
<el-form :model="data" label-width="auto" :rules="rules" ref="formMainRef">
<el-row gutter="20">
@ -571,6 +571,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
version: '',
process: []
}
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
tabIndex = data.value.process.length + 1
@ -625,9 +628,9 @@ const buttonBaseClick1 = (val) => {
isDestructionInspection: '',
resultEntryMethod: '',
featureType: '',
quantifyIsCapping: '',
quantifyIsLowlimit: '',
quantifyIsTarget: '',
quantifyIsCapping: false,
quantifyIsLowlimit: false,
quantifyIsTarget: false,
quantifyTarget: '',
quantifyCapping: '',
quantifyLowlimit: '',
@ -636,8 +639,9 @@ const buttonBaseClick1 = (val) => {
quantifyQuantifyCode: ''
}
})
console.log(data.value.process)
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
editableTabsValue.value = newTabName
dialogVisibleName.value = false
} else {

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

File diff suppressed because it is too large

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

@ -27,13 +27,22 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
<!-- <BasicForm ref="formRef" @success="getList" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :tableAllSchemas="InspectionJobDetail.allSchemas"
:tableFormRules="InspectionJobDetailRules" :tableData="tableData"
:apiUpdate="InspectionJobMainApi.updateInspectionJobMain" :apiCreate="InspectionJobMainApi.createInspectionJobMain"
:isBusiness="true" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" />
@searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:rules="InspectionTemplateRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
@ -51,11 +60,15 @@
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules } from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import AddForm from './addForm.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
//
defineOptions({ name: 'InspectionJobMain' })
@ -160,18 +173,19 @@
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
// defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
if (val == 'mainJobExe') { //
execute('update', row)
}
else if (val == 'delete') { //
else if (val == 'mainJobClo') { //
handleDelete(row.id)
}
}
@ -188,7 +202,12 @@
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const basicFormRef = ref()
const execute = async (type : string, row ?: number) => {
basicFormRef.value.open(type, row)
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {

12
src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts

@ -76,12 +76,12 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: false,
},
{
label: '检验方案Json',
field: 'inspectionSchemeJson',
sort: 'custom',
isSearch: false,
},
// {
// label: '检验方案Json',
// field: 'inspectionSchemeJson',
// sort: 'custom',
// isSearch: false,
// },
{
label: '检验批次',
field: 'inspectionBatch',

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue

@ -73,7 +73,7 @@ import * as UnplannedissueJobDetailApi from '@/api/wms/unplannedissueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
//
defineOptions({ name: 'UnplannedissueJobMain' })
defineOptions({ name: 'UnplannedissueJobMainSpare' })
const message = useMessage() //
const { t } = useI18n() //

4
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue

@ -68,7 +68,7 @@ import * as UnplannedissueRecordDetailApi from '@/api/wms/unplannedissueRecordDe
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
//
defineOptions({ name: 'UnplannedissueRecordMain' })
defineOptions({ name: 'UnplannedissueRecordMainSpare' })
const message = useMessage() //
const { t } = useI18n() //
@ -84,7 +84,7 @@ const updataTableColumns = (val) => {
}
const { tableObject, tableMethods } = useTable({
getListApi: UnplannedissueRecordMainApi.getUnplannedissueRecordMainPage //
getListApi: UnplannedissueRecordMainApi.getUnplannedissueRecordMainPageSpare //
})
//

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

@ -88,7 +88,7 @@ import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequest
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'UnplannedissueRequestMain' })
defineOptions({ name: 'UnplannedissueRequestMainSpare' })
const message = useMessage() //
const { t } = useI18n() //

41
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -43,10 +43,17 @@
:tableAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:tableFormRules="SupplierinvoiceRequestDetailRules"
:tableData="tableData"
:sumFormData = "[{
:sumFormDataField = "[{
formField:'amount',
valueField:'singlePrice'
tableField:'singlePrice'
}]"
:sumFormDataByForm ="(formRef,formModel)=>{
const {taxRate=0,amount=0} = formModel
formRef.value.setValues({
taxAmount:taxRate*amount,
afterTaxAmount:amount+taxRate*amount
})
}"
:apiUpdate="SupplierinvoiceRequestMainApi.updateSupplierinvoiceRequestMain"
:apiCreate="SupplierinvoiceRequestMainApi.createSupplierinvoiceRequestMain"
:isBusiness="true"
@ -54,7 +61,11 @@
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
>
<template v-slot="{row}">
<el-input :disabled="true" :class="{'is-red': row['singlePrice'] - row['purchasePrice'] > 0}" :modelValue="row['singlePrice'] - row['purchasePrice']"/>
</template>
</BasicForm>
<!-- 详情 -->
<Detail
@ -72,6 +83,16 @@
prop: 'Annex',
tableName:'waybill'
}]"
:otherHeadButttonData="[{
label: '打印',
name: 'kuozhan',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
}]"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
@ -82,6 +103,7 @@
:apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage"
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
@buttonBaseClick="detailButtonBaseClick"
/>
<!-- 导入 -->
@ -560,9 +582,22 @@ const importSuccess = () => {
getList() //
}
// --
const detailButtonBaseClick = (val, item) => {
console.log(1111)
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>
<style lang="scss" scoped>
.is-red{
border-radius:var(--el-border-radius-base);
border:1px solid var(--el-color-danger);
box-shadow: 0 0 0 1px var(--el-color-danger) inset;
}
</style>

3
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -188,6 +188,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
min: 0,
precision: 6,
disabled: true,
}
},
tableForm: {
@ -207,6 +208,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
min: 0,
precision: 6,
disabled: true,
}
},
tableForm: {
@ -735,6 +737,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
tableForm:{
type: 'slot',
disabled: true
}
},

Loading…
Cancel
Save