Browse Source

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

master_hella_20240701
songguoqiang 7 months ago
parent
commit
0ad1c446c2
  1. 55
      src/api/mes/dismantlingMain/index.ts
  2. 4
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  3. 8
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  4. 50
      src/api/qms/inspectionRequest/index.ts
  5. 10
      src/api/system/dict/dict.type.ts
  6. 3
      src/components/Detail/src/DetailQmsCode.vue
  7. 33
      src/components/TableForm/src/TableForm.vue
  8. 3
      src/components/listTable/index.ts
  9. 40
      src/components/listTable/src/ListTable.vue
  10. 4
      src/locales/en-US.ts
  11. 4
      src/locales/zh-CN.ts
  12. 1
      src/utils/dict.ts
  13. 25
      src/utils/disposition/defaultButtons.ts
  14. 177
      src/views/mes/dismantlingMain/dismantlingMain.data.ts
  15. 244
      src/views/mes/dismantlingMain/index.vue
  16. 2
      src/views/qms/basicDataManage/inspectionPlan/addForm.vue
  17. 91
      src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts
  18. 59
      src/views/qms/basicDataManage/selectedSet/index.vue
  19. 15
      src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts
  20. 406
      src/views/qms/inspection/inspectionJob/addForm.vue
  21. 60
      src/views/qms/inspection/inspectionJob/index.vue
  22. 65
      src/views/qms/inspection/inspectionJob/inspectionJobMain.data.ts
  23. 48
      src/views/qms/inspection/inspectionRecord/index.vue
  24. 35
      src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts
  25. 139
      src/views/qms/inspection/inspectionRequest/index.vue
  26. 2
      src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts
  27. 18
      src/views/system/dict/DictTypeForm.vue
  28. 11
      src/views/system/dict/index.vue
  29. 10
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

55
src/api/mes/dismantlingMain/index.ts

@ -0,0 +1,55 @@
import request from '@/config/axios'
export interface DismantlingMainVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
dismantlingBillno: string
productionCode: string
workbillType: string
}
// 查询报废拆解登记主列表
export const getDismantlingMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/dismantling-main/senior', data })
} else {
return await request.get({ url: `/mes/dismantling-main/page`, params })
}
}
// 查询报废拆解登记主详情
export const getDismantlingMain = async (id: number) => {
return await request.get({ url: `/mes/dismantling-main/get?id=` + id })
}
// 新增报废拆解登记主
export const createDismantlingMain = async (data: DismantlingMainVO) => {
return await request.post({ url: `/mes/dismantling-main/create`, data })
}
// 修改报废拆解登记主
export const updateDismantlingMain = async (data: DismantlingMainVO) => {
return await request.put({ url: `/mes/dismantling-main/update`, data })
}
// 删除报废拆解登记主
export const deleteDismantlingMain = async (id: number) => {
return await request.delete({ url: `/mes/dismantling-main/delete?id=` + id })
}
// 导出报废拆解登记主 Excel
export const exportDismantlingMain = async (params) => {
return await request.download({ url: `/mes/dismantling-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/dismantling-main/get-import-template' })
}

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

@ -44,3 +44,7 @@ export const exportInspectionJobMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-job-main/get-import-template' }) return request.download({ url: '/qms/inspection-job-main/get-import-template' })
} }
//查询检验申请列表
export const getInspectionJobPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-job-package/list?masterId=` + id })
}

8
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -63,3 +63,11 @@ export const exportInspectionRecordMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/qms/inspection-record-main/get-import-template' }) return request.download({ url: '/qms/inspection-record-main/get-import-template' })
} }
// 发布
export const publishInspectionRecordMain = async (data ) => {
return await request.put({ url: `/qms/inspection-record-main/publish`, data })
}
//查询检验申请列表
export const getInspectionRecordPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-record-package/list?masterId=` + id })
}

50
src/api/qms/inspectionRequest/index.ts

@ -28,38 +28,72 @@ export const getInspectionMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/inspection/inspection-main/senior', data }) return await request.post({ url: '/qms/inspection-request-main/senior', data })
} else { } else {
return await request.get({ url: `/inspection/inspection-main/page`, params }) return await request.get({ url: `/qms/inspection-request-main/page`, params })
} }
} }
// 查询检验申请详情 // 查询检验申请详情
export const getInspectionMain = async (id: number) => { export const getInspectionMain = async (id: number) => {
return await request.get({ url: `/inspection/inspection-main/get?id=` + id }) return await request.get({ url: `/qms/inspection-request-main/get?id=` + id })
} }
// 新增检验申请 // 新增检验申请
export const createInspectionMain = async (data: InspectionMainVO) => { export const createInspectionMain = async (data: InspectionMainVO) => {
return await request.post({ url: `/inspection/inspection-main/create`, data }) return await request.post({ url: `/qms/inspection-request-main/create`, data })
} }
// 修改检验申请 // 修改检验申请
export const updateInspectionMain = async (data: InspectionMainVO) => { export const updateInspectionMain = async (data: InspectionMainVO) => {
return await request.put({ url: `/inspection/inspection-main/update`, data }) return await request.put({ url: `/qms/inspection-request-main/update`, data })
} }
// 删除检验申请 // 删除检验申请
export const deleteInspectionMain = async (id: number) => { export const deleteInspectionMain = async (id: number) => {
return await request.delete({ url: `/inspection/inspection-main/delete?id=` + id }) return await request.delete({ url: `/qms/inspection-request-main/delete?id=` + id })
} }
// 导出检验申请 Excel // 导出检验申请 Excel
export const exportInspectionMain = async (params) => { export const exportInspectionMain = async (params) => {
return await request.download({ url: `/inspection/inspection-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-request-main/export-excel`, params })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/inspection/inspection-main/get-import-template' }) return request.download({ url: '/qms/inspection-request-main/get-import-template' })
} }
// 关闭检验申请主 Excel
export const closeInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/close?id=` + id })
}
// 重新添加检验申请主 Excel
export const reAddInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/reAdd?id=` + id })
}
// 提交检验申请主 Excel
export const submitInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/submit?id=` + id })
}
// 审批通过检验申请主 Excel
export const agreeInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/agree?id=` + id })
}
// 审批驳回检验申请主 Excel
export const refusedInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/refused?id=` + id })
}
// 处理检验申请主 Excel
export const handleInspectRequestMain = async (id) => {
return await request.put({ url: `/qms/inspection-request-main/handle?id=` + id })
}
//查询检验申请列表
export const getInspectionRequestPackageList = async (id: number) => {
return await request.get({ url: `/qms/inspection-request-package/list?masterId=` + id })
}

10
src/api/system/dict/dict.type.ts

@ -42,3 +42,13 @@ export const deleteDictType = (id: number) => {
export const exportDictType = (params) => { export const exportDictType = (params) => {
return request.get({ url: '/system/dict-type/export', params }) return request.get({ url: '/system/dict-type/export', params })
} }
// 查询字典列表
export const getDictTypeAndData = (classes: string | null) => {
let url = '/system/dict-type/list-all-data-all';
if (classes !== null) {
url += `?classes=${classes}`;
}
return request.get({ url });
}

3
src/components/Detail/src/DetailQmsCode.vue

@ -699,6 +699,7 @@ const openForm = async (type: string, row?: number) => {
} }
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
debugger
try { try {
// detailValidate // detailValidate
const rs = (await props.detailValidate) ? await props.detailValidate(data) : true const rs = (await props.detailValidate) ? await props.detailValidate(data) : true
@ -797,7 +798,7 @@ const openImage=(item)=>{
* @param cur 改变后值 * @param cur 改变后值
*/ */
const detailBasicFormOnChange = (field, cur) => { const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur) emit('detailBasicFormOnChange', field, cur,formRef.value.formRef)
} }
/** /**

33
src/components/TableForm/src/TableForm.vue

@ -126,6 +126,39 @@
:key="op.value" /> :key="op.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 下拉框 -->
<el-form-item
v-if="headerItem?.tableForm?.type == 'SelectGroup'"
:prop="headerItem.field">
<el-select
v-model="row[headerItem.field]"
:clearable="headerItem?.tableForm.clearable || true"
:multiple="headerItem?.tableForm.multiple"
:size="headerItem?.tableForm.size"
:collapse-tags ="headerItem?.tableForm.collapseTags"
:collapse-tags-tooltip ="headerItem?.tableForm.collapseTagsTooltip"
:multiple-limit ="headerItem?.tableForm.multipleLimit"
:disabled="itemIsDisabled(headerItem, row)"
:filterable="headerItem?.tableForm.filterable"
:allow-create="headerItem?.tableForm.allowCreate"
style="width: 100%"
:placeholder="headerItem?.tableForm?.placeholder || '请选择' + headerItem.label"
@change="formSelectChange(headerItem.field, $event,row)"
@blur="tableFormSelectOnBlur(headerItem.field, $event,row, $index)">
<el-option-group
v-for="group in initSelectOptions(headerItem)"
:key="group.type"
:label="group.name"
>
<el-option
v-for="item in group.options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-option-group>
</el-select>
</el-form-item>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<el-form-item <el-form-item
v-if="headerItem?.tableForm?.type == 'FormTime'" v-if="headerItem?.tableForm?.type == 'FormTime'"

3
src/components/listTable/index.ts

@ -0,0 +1,3 @@
import ListTable from './src/ListTable.vue'
export { ListTable }

40
src/components/listTable/src/ListTable.vue

@ -0,0 +1,40 @@
<template>
<div>
<Dialog v-model="isPackageShow" :title="dialogTitle" :width="width?width:'900px'" v-loading="packageLoading">
<Table
ref="searchTableRef"
:columns="columns"
:data="allList"
:reserveSelection="true"
row-key="id"
/>
</Dialog>
</div>
</template>
<script lang="ts" setup>
const isPackageShow = ref(false)
const packageLoading = ref(false)
const dialogTitle = ref()
const message = useMessage() //
const columns = ref()
const allList = ref()
//
const props = defineProps({
width: {
type: String,
required: false
},
})
const openPackage = async (row?: any, titleName?: any,tableColumns?: any,list?: any) => {
isPackageShow.value = true
if (titleName) {
dialogTitle.value = titleName
}
columns.value = tableColumns.filter(item => (item.field !== 'action'))
allList.value = list
}
defineExpose({ openPackage }) // open
</script>

4
src/locales/en-US.ts

@ -296,6 +296,7 @@ export default {
delete: 'Delete', delete: 'Delete',
edit: 'Edit', edit: 'Edit',
update: 'Update', update: 'Update',
execute: 'Execute',
preview: 'Preview', preview: 'Preview',
more: 'More', more: 'More',
sync: 'Sync', sync: 'Sync',
@ -312,7 +313,8 @@ export default {
dataUpdate: 'Dict Data Eidt', dataUpdate: 'Dict Data Eidt',
fileUpload: 'File Upload', fileUpload: 'File Upload',
createLabel: 'create label', createLabel: 'create label',
viewDetail:'Detailed list' viewDetail:'Detailed list',
updataRecode:'Updata recode'
}, },
dialog: { dialog: {
dialog: 'Dialog', dialog: 'Dialog',

4
src/locales/zh-CN.ts

@ -297,6 +297,7 @@ export default {
edit: '编辑', edit: '编辑',
update: '编辑', update: '编辑',
preview: '预览', preview: '预览',
execute: '执行',
more: '更多', more: '更多',
sync: '同步', sync: '同步',
save: '保存', save: '保存',
@ -311,7 +312,8 @@ export default {
dataCreate: '字典数据新增', dataCreate: '字典数据新增',
dataUpdate: '字典数据编辑', dataUpdate: '字典数据编辑',
createLabel: '创建标签', createLabel: '创建标签',
viewDetail:'明细列表' viewDetail:'明细列表',
updataRecode:'更新记录'
}, },
dialog: { dialog: {
dialog: '弹窗', dialog: '弹窗',

1
src/utils/dict.ts

@ -311,6 +311,7 @@ export enum DICT_TYPE {
REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记 REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记
REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成 REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成
REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件 REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件
DISMANTLING_BILL_TYPE = 'dismantling_bill_type',//工单类型
SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态 SUPPLIERINVOICE_REQUEST_STATUS = 'supplierinvoice_request_status', //发票申请状态
SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态 SUPPLIERINVOICE_STATUS = 'supplierinvoice_status', //待开票审核状态
} }

25
src/utils/disposition/defaultButtons.ts

@ -691,6 +691,18 @@ export function mainListJobExeBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-包装按钮
export function mainListPackageBtn(option:any) {
return __defaultBtnOption(option,{
label: '包装',
name: 'mainPackage',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-打印 // 主列表-打印
export function mainListPointBtn(option:any) { export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{
@ -799,7 +811,18 @@ export function mainThawRequesttBtn(option:any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-更新检验记录
export function mainUpdataRecodeBtn(option:any) {
return __defaultBtnOption(option,{
label: '更新检验记录',
name: 'updataRecode',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则 // 默认按钮规则
function __defaultBtnOption(option:any,specific:any){ function __defaultBtnOption(option:any,specific:any){
return { return {

177
src/views/mes/dismantlingMain/dismantlingMain.data.ts

@ -0,0 +1,177 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
import * as ItembasicApi from "@/api/wms/itembasic";
// 表单校验
export const DismantlingMainRules = reactive({
productionCode: [required],
workbillType: [required],
})
export const DismantlingMain = 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')]
}
},
isForm: false,
},
{
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: 'dismantlingBillno',
sort: 'custom',
isSearch: true,
isForm: false,
isDetail: true
},
{
label: '产品编码',
field: 'productionCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '产品编码', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
action: 'in', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
value: 'BCP,CCP',//,SEMI]
isMainValue: false
}]
}
}
},
{
label: '工单类型',
field: 'workbillType',
sort: 'custom',
dictType: DICT_TYPE.DISMANTLING_BILL_TYPE,
dictClass: 'string',
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: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="DismantlingMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="DismantlingMain.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 #dismantlingBillno="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.dismantlingBillno)">
<span>{{ row.dismantlingBillno }}</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="DismantlingMainRules"
:formAllSchemas="DismantlingMain.allSchemas"
:apiUpdate="DismantlingMainApi.updateDismantlingMain"
:apiCreate="DismantlingMainApi.createDismantlingMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="DismantlingMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/dismantling-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { DismantlingMain,DismantlingMainRules } from './dismantlingMain.data'
import * as DismantlingMainApi from '@/api/mes/dismantlingMain'
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: 'MesDismantlingMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(DismantlingMain.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: DismantlingMainApi.getDismantlingMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:dismantlingMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'mes:dismantlingMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:dismantlingMain: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:dismantlingMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:dismantlingMain: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 =DismantlingMain.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 DismantlingMainApi.createDismantlingMain(data)
message.success(t('common.createSuccess'))
} else {
await DismantlingMainApi.updateDismantlingMain(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, 'basicDismantlingMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await DismantlingMainApi.deleteDismantlingMain(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 DismantlingMainApi.exportDismantlingMain(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 DismantlingMainApi.importTemplate()
})
</script>

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

@ -922,8 +922,6 @@ const validateForm = (formRef) => {
const submitForm = async () => { const submitForm = async () => {
try { try {
const validateForm1 = await validateForm(formProcessRef.value) const validateForm1 = await validateForm(formProcessRef.value)
console.log(validateForm1)
console.log(data.value)
await formMainRef.value.validate() await formMainRef.value.validate()
if (!data.value.process || data.value.process.length == 0) { if (!data.value.process || data.value.process.length == 0) {
message.error(`请添加工序`) message.error(`请添加工序`)

91
src/views/qms/basicDataManage/selectedProject/selectedProject.data.ts

@ -1,21 +1,23 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as DictTypeApi from '@/api/system/dict/dict.type' import * as DictTypeApi from '@/api/system/dict/dict.type'
const dictTypeList = await DictTypeApi.getSimpleDictTypeList()
const dictTypeListData = dictTypeList.map(item => { const optionsList = await DictTypeApi.getDictTypeAndData('inspection')
return { optionsList.forEach(element => {
label: item.name, element.options = element.dictDataRespVOList.map(item => {
value: item.type return {
} value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
}
})
}) })
// 表单校验 // 表单校验
export const SelectedProjectRules = reactive({ export const SelectedProjectRules = reactive({
code: [required], code: [required],
dictionaryCode: [required], dictionaryTypeAndCode: [required],
dictionaryValue: [required], estimateCode: [required],
available: [required], defectLevel: [required],
concurrencyStamp: [required]
}) })
export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([ export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
@ -28,51 +30,64 @@ export const SelectedProject = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true isSearch: true
}, },
{ {
label: '字典', label: '字典及字典项',
field: 'dictionaryCode', field: 'dictionaryTypeAndCode',
sort: 'custom', sort: 'custom',
isSearch: true, formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => {
return optionsList.find(item => item.options.some(option => option.value === cellValue))?.options.find(option => option.value === cellValue)?.label
},
isSearch: false,
isDetail: false,
isTable: true,
isForm: true,
tableForm: { tableForm: {
type: 'Select', type: 'SelectGroup',
initOptions: dictTypeListData, initOptions: optionsList
}, },
form: { form: {
component: 'Select', component: 'Select',
api: dictTypeListData,
componentProps: { componentProps: {
options: dictTypeListData, options: optionsList
optionsAlias: {
labelField: 'label',
valueField: 'value'
}
} }
} },
},
{
label: '字典',
field: 'dictionaryCode',
sort: 'custom',
isSearch: false,
isTableForm: false,
isDetail: false,
isTable: false,
isForm: false,
}, },
{ {
label: '字典项值', label: '字典项',
field: 'dictionaryValue', field: 'dictionaryValue',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
tableForm: { isTableForm: false,
type: 'Select', isDetail: false,
}, isTable: false,
form: { isForm: false,
component: 'Select', },
componentProps: { {
options: dictTypeListData, label: '字典名称',
optionsAlias: { field: 'dictionaryLabel',
labelField: 'label', sort: 'custom',
valueField: 'value' isSearch: false,
} isTableForm: false,
} isDetail: false,
} isTable: false,
isForm: false,
}, },
{ {
label: '评估代码', label: '评估代码',
field: 'estimateCode', field: 'estimateCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.DICTIONARY_CLASS, dictType: DICT_TYPE.EVALUATION_CODE,
dictClass: 'string', dictClass: 'string',
tableForm: { tableForm: {
type: 'Select', type: 'Select',

59
src/views/qms/basicDataManage/selectedSet/index.vue

@ -50,7 +50,7 @@
:apiUpdate="SelectedSetApi.updateSelectedSet" :apiUpdate="SelectedSetApi.updateSelectedSet"
:apiCreate="SelectedSetApi.createSelectedSet" :apiCreate="SelectedSetApi.createSelectedSet"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="true"
@onChange="onChange" @onChange="onChange"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@ -92,6 +92,7 @@ import { SelectedProject,SelectedProjectRules } from '../selectedProject/selecte
import * as SelectedProjectApi from '@/api/qms/selectedProject' import * as SelectedProjectApi from '@/api/qms/selectedProject'
import * as DictDataApi from '@/api/system/dict/dict.data' import * as DictDataApi from '@/api/system/dict/dict.data'
import component from 'virtual:svg-icons-register' import component from 'virtual:svg-icons-register'
import * as DictTypeApi from '@/api/system/dict/dict.type'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
@ -105,9 +106,11 @@ const route = useRoute() // 路由信息
const tableData = ref([]) const tableData = ref([])
const routeName = ref() const routeName = ref()
const selectDictType = ref() const selectDictType = ref()
const optionsList = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns) const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -287,7 +290,21 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.selectedProjectDOList = tableData.value// data.selectedProjectDOList = tableData.value//
data.selectedProjectDOList = data.selectedProjectDOList.map(item => {
// '-%%%-'' dictionaryCode
const [dictionaryCode, dictionaryValue] = item.dictionaryTypeAndCode.split('-%%%-');
const dictionary = optionsList.value.find(temp => temp.options.some(option => option.value === item.dictionaryTypeAndCode))
const dictionaryLabel = dictionary?.options.find(option => option.value === item.dictionaryTypeAndCode)?.label
// dictionaryCode dictionaryValue
return {
...item,
dictionaryCode,
dictionaryValue,
dictionaryLabel
};
});
console.log(data.subList) console.log(data.subList)
try { try {
if (formType === 'create') { if (formType === 'create') {
@ -321,20 +338,21 @@ const detailOpenForm = (type, row, masterParmas) => {
const detailBasiFormOnChange = (field,val) => { const detailBasiFormOnChange = (field,val,detailFormRef) => {
console.log(field) console.log(field)
console.log(val) console.log(33,detailFormRef)
if(field == 'dictionaryCode'){ if(field == 'dictionaryTypeAndCode'){
DictDataApi.queryByDictType(val).then(res => { // '-%%%-'' dictionaryCode
SelectedProject.allSchemas.formSchema.find(item => { const [dictionaryCode, dictionaryValue] = val.split('-%%%-');
return item.field == 'dictionaryValue' const dictionary = optionsList.value.find(temp => temp.options.some(option => option.value === val))
}).componentProps.options = res.map(item=>{ const dictionaryLabel = dictionary?.options.find(option => option.value === val)?.label
return { const setV = {}
value: item.value, setV['dictionaryLabel'] = dictionaryLabel
label: item.label setV['dictionaryCode'] = dictionaryCode
} setV['dictionaryValue'] = dictionaryValue
nextTick(() => {
detailFormRef.setValues(setV)
}) })
})
} }
} }
@ -342,9 +360,24 @@ const formSelectChange = (a,b,c,d) => {
console.log(111) console.log(111)
} }
const getDicDetails = ()=>{
DictTypeApi.getDictTypeAndData('inspection').then(res=>{
res.forEach(element => {
element.options = element.dictDataRespVOList.map(item => {
return {
value: element.type + "-%%%-" + item.value,
label: element.name + "-" + item.label
}
})
})
optionsList.value = res
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
getDicDetails()
importTemplateData.templateUrl = await SelectedSetApi.importTemplate() importTemplateData.templateUrl = await SelectedSetApi.importTemplate()
}) })

15
src/views/qms/basicDataManage/selectedSet/selectedSet.data.ts

@ -25,17 +25,6 @@ export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true isSearch: true
}, },
{
label: '分类',
field: 'classification',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.EVALUATION_CODE,
dictClass: 'string',
tableForm: {
type: 'Select',
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
@ -43,6 +32,8 @@ export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
} },
isTableForm: false,
isDetail: false
} }
])) ]))

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

@ -27,7 +27,7 @@
:stretch="false" :stretch="false"
> >
<el-tab-pane <el-tab-pane
v-for="(item,index) in data.subList" v-for="item in data.subList"
:key="item.name" :key="item.name"
:label="item.processCode" :label="item.processCode"
:name="item.name" :name="item.name"
@ -37,7 +37,11 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="编码" prop="processCode"> <el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" /> <el-input
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -51,12 +55,12 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="processDescribe"> <el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" /> <el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode"> <el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" /> <el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -83,39 +87,45 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description"> <el-form-item
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" /> label="描述"
prop="inspectionJobCharacteristicsUpdateReqVO.description"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description"
:disabled="true"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="检验方法" label="检验方法"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
disabled disabled
placeholder="请选择检验方法" placeholder="请选择检验方法"
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="采样过程编码" label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod"
> >
<div style="display: flex; width: 100%"> <div style="display: flex; width: 100%">
<el-input <el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName"
disabled disabled
placeholder="请选择采样过程编码" placeholder="请选择采样过程编码"
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item <el-form-item
label="动态修改规则编码" label="动态修改规则编码"
prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode" prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode"
@ -148,7 +158,7 @@
<el-select <el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式" placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)" @change="resultEntryMethodChange($event, item)"
disabled disabled
> >
<el-option <el-option
@ -163,23 +173,32 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> <el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select <el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型" placeholder="请选择特征类型"
@change="changeFeatureType" @change="changeFeatureType"
disabled disabled
> >
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" <el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"> <el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker <el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime" type="datetime"
@ -190,7 +209,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"> <el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker <el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime" v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime" type="datetime"
@ -200,17 +222,37 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,i) in data.subList[index].inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"> <el-col
:span="24"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
>
<el-row> <el-row>
<!-- 汇总录入的时候显示 --> <!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量"> <el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> <el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="不合格数量"> <el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/> <el-input
v-model="cur.unqualifiedQuantity"
placeholder="请输入不合格数量"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 手动评估的时候显示 --> <!-- 手动评估的时候显示 -->
@ -219,43 +261,54 @@
<el-select <el-select
v-model="cur.estimateCode" v-model="cur.estimateCode"
placeholder="请选择评估代码" placeholder="请选择评估代码"
@change="changeFeatureType"> @change="changeFeatureType"
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE  )" >
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"/> :value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item label="检验值" prop="inspectionValue"> <el-form-item label="检验值" prop="inspectionValue">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值"/> <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"> <el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"
>
<el-form-item label="选定集" prop="qualitativeCode"> <el-form-item label="选定集" prop="qualitativeCode">
<el-select <el-select
v-model="cur.qualitativeCode" v-model="cur.qualitativeCode"
placeholder="请选择选定集" placeholder="请选择选定集"
@change="changeQualitativeCode($event,item,cur)"> @change="changeQualitativeCode($event, item, cur)"
<el-option v-for="dict in item.selectedProjectRespVOList" >
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue" :key="dict.dictionaryValue"
:label="dict.dictionaryLabel" :label="dict.dictionaryLabel"
:value="dict.dictionaryValue"/> :value="dict.dictionaryValue"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> <el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="缺陷级别"> <el-form-item label="缺陷级别">
<el-select <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
v-model="cur.defectLevel" <el-option
placeholder="请选择缺陷级别" v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"/> :value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -313,7 +366,6 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule
import * as SelectedSetApi from '@/api/qms/selectedSet' // import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' // import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const message = useMessage() // const message = useMessage() //
@ -354,12 +406,12 @@ const props = defineProps({
required: true, required: true,
default: null default: null
}, },
// rules // rules
rules: { rules: {
type: Object, type: Object,
required: true, required: true,
default: null default: null
}, }
}) })
const { t } = useI18n() // const { t } = useI18n() //
@ -400,7 +452,7 @@ if (props.basicFormWidth) {
} }
const rules = ref({ const rules = ref({
...props.rules, ...props.rules,
'inspectionJobCharacteristicsUpdateReqVO.description': [ 'inspectionJobCharacteristicsUpdateReqVO.description': [
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } { required: true, message: '请填写描述', trigger: ['blur', 'change'] }
], ],
'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [
@ -437,22 +489,17 @@ const rules = ref({
{ required: true, message: '请输入选择集编码', trigger: 'change' } { required: true, message: '请输入选择集编码', trigger: 'change' }
], ],
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [ 'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [
{ required: true, message: '请输入选择开始时间', trigger: 'change'} { required: true, message: '请输入选择开始时间', trigger: 'change' }
], ],
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [ 'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [
{ required: true, message: '请输入选择结束时间', trigger: 'blur' } { required: true, message: '请输入选择结束时间', trigger: 'blur' }
], ],
qualifiedQuantity: [ qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
{ required: true, message: '请输入选择结束时间', trigger: 'blur' }
],
}) })
/** 打开弹窗 */ /** 打开弹窗 */
let tabIndex = 1 let tabIndex = 1
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => { const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogVisible.value = true
if (titleName) { if (titleName) {
dialogTitle.value = t('action.' + titleName) dialogTitle.value = t('action.' + titleName)
} else { } else {
@ -468,30 +515,32 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
editableTabsValue.value = index + 1 editableTabsValue.value = index + 1
item.name = index + 1 item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[]
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
for(let i=0;i<data.value.sampleTotalAmount;i++){ if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
inspectionValue:'',// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
qualitativeCode:'',// for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) {
estimateCode:'',// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
defectLevel:'',// inspectionValue: '', //
qualifiedQuantity:'',// qualitativeCode: '', //
unqualifiedQuantity:'',// estimateCode: '', //
}) defectLevel: '', //
} qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else { } else {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ // item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue:'',// // inspectionValue: '', //
qualitativeCode:'',// // qualitativeCode: '', //
estimateCode:'',// // estimateCode: '', //
defectLevel:'',// // defectLevel: '', //
qualifiedQuantity:'',// // qualifiedQuantity: '', //
unqualifiedQuantity:'',// // unqualifiedQuantity: '' //
}] // }
// )
} }
// //
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
@ -511,7 +560,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
} }
}) })
data.value.subList = list data.value.subList = list
formMainRef.value.setValues(row)
dialogVisible.value = true
nextTick(() => {
formMainRef.value.setValues(row)
})
} else { } else {
data.value = { data.value = {
code: '', code: '',
@ -528,7 +581,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
subList: [] subList: []
} }
} }
dialogVisible.value = true
tabIndex = data.value.subList.length + 1 tabIndex = data.value.subList.length + 1
} }
defineExpose({ open, dialogVisible, formLoading }) // open defineExpose({ open, dialogVisible, formLoading }) // open
@ -633,54 +686,74 @@ const validateForm = (formRef) => {
const submitForm = async () => { const submitForm = async () => {
try { try {
console.log(data.value.subList) console.log(data.value.subList)
// const validateForm1 = await validateForm(formMainRef.value) // const validateForm1 = await validateForm(formMainRef.value)
const elForm = unref(formMainRef)?.getElFormRef() const elForm = unref(formMainRef)?.getElFormRef()
// //
if (!elForm) return if (!elForm) return
const valid = await elForm.validate() const valid = await elForm.validate()
if (!valid) return if (!valid) return
// const bol1 = await validateForm(formProcessRef.value) // const bol1 = await validateForm(formProcessRef.value)
const bol2 = await validateForm(formFeaturesRef.value) const bol2 = await validateForm(formFeaturesRef.value)
if (!bol2) { if (!bol2) {
message.error(`模板中有检验工序和检验特性未填写完全`) message.error(`模板中有检验工序和检验特性未填写完全`)
return return
} }
// //
let arrBol = data.value.subList.map((item, index) => { let arrBol = []
let arr1 = [] let isOutweigh = []//
if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){ data.value.subList.forEach((item, index) => {
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity arrBol.push(
})) item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity
}
)
)
} }
if(item.samplingProcessRespVO.evaluationMode == 1){ if (item.samplingProcessRespVO.evaluationMode == 1) {
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ arrBol.push(
return !cur.estimateCode ||!cur.defectLevel item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
})) (cur, key) => {
return !cur.estimateCode || !cur.defectLevel
}
)
)
} }
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0){ if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) {
arr1.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ arrBol.push(
return !cur.inspectionValue item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
})) (cur, key) => {
return !cur.inspectionValue
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualitativeCode
}
)
)
} }
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1){ //
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{ if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
return !cur.qualitativeCode isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}))
} }
return arr1 })
}) let isEmpty1 = arrBol.some(item=>item == true)
// console.log(arrBol) if(isEmpty1){
// let isEmpty1 = arrBol.filter(item=>item == true) message.error('检验工序和检验特性有字段未填写完全')
// arrBol.forEach(item=>{ return;
// console.log('1q1q') }
// console.log(typeof item) if(isOutweigh.length>0){
// }) message.error('检验特性中有开始时间大于结束时间')
// setTimeout(()=>{ return;
// console.log(arrBol.includes(true)) }
// },2000) return;
if (formType.value == 'create') { if (formType.value == 'create') {
// //
emit('submitForm', formType.value, data.value) emit('submitForm', formType.value, data.value)
@ -789,22 +862,22 @@ const opensearchTable = (
// //
// val row // val row
const searchTableSuccess = async (formField, searchField, val, type, row) => { const searchTableSuccess = async (formField, searchField, val, type, row) => {
if(type == 'features'){ if (type == 'features') {
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code
if(formField == 'inspectionMethodCode'){ if (formField == 'inspectionMethodCode') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description
}else if(formField == 'dynamicUpdateCode'){ } else if (formField == 'dynamicUpdateCode') {
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description
}else if(formField == 'inspectionMethod'){ } else if (formField == 'inspectionMethod') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description
} }
} else if(type == 'main'){ } else if (type == 'main') {
data.value[formField] = val[0].code data.value[formField] = val[0].code
if(formField == 'itemCode'){ if (formField == 'itemCode') {
data.value.itemName = val[0].name data.value.itemName = val[0].name
}else if(formField == 'testTypeCode'){ } else if (formField == 'testTypeCode') {
data.value.testTypeName = val[0].description data.value.testTypeName = val[0].description
}else if(formField == 'programmeTemplateCode'){ } else if (formField == 'programmeTemplateCode') {
data.value.programmeTemplateName = val[0].description data.value.programmeTemplateName = val[0].description
} }
if (formField == 'programmeTemplateCode') { if (formField == 'programmeTemplateCode') {
@ -821,7 +894,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true
} else { } else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required =
false
} }
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true
@ -836,36 +910,38 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) // emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
} }
// //
const resultEntryMethodChange = (e,item) => { const resultEntryMethodChange = (e, item) => {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
if (e==0) { if (e == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
for(let i=0;i<data.value.sampleTotalAmount;i++){ for (let i = 0; i < data.value.sampleTotalAmount; i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue:'',// inspectionValue: '', //
qualitativeCode:'',// qualitativeCode: '', //
estimateCode:'',// estimateCode: '', //
defectLevel:'',// defectLevel: '', //
qualifiedQuantity:'',// qualifiedQuantity: '', //
unqualifiedQuantity:'',// unqualifiedQuantity: '' //
}) })
} }
} else { } else {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false // rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [
inspectionValue:'',// {
qualitativeCode:'',// inspectionValue: '', //
estimateCode:'',// qualitativeCode: '', //
defectLevel:'',// estimateCode: '', //
qualifiedQuantity:'',// defectLevel: '', //
unqualifiedQuantity:'',// qualifiedQuantity: '', //
}] unqualifiedQuantity: '' //
}
]
} }
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
} }
// //
const changeQualitativeCode= (e,item,cur)=>{ const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj) console.log(obj)
cur.defectLevel = obj.defectLevel cur.defectLevel = obj.defectLevel
} }

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

@ -27,12 +27,6 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<!-- <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" /> -->
<AddForm <AddForm
ref="basicFormRef" ref="basicFormRef"
basicFormWidth="80" basicFormWidth="80"
@ -43,6 +37,7 @@
:formAllSchemas="InspectionJobMain.allSchemas" :formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm" @submitForm="submitForm"
/> />
<!-- 详情 -->
<Detail <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
@ -52,33 +47,22 @@
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 详情 --> <!-- 包装信息 -->
<!-- <Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" <listTable ref="listTableRef" titleName="包装信息"/>
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"/> -->
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchase-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :isShowOut="true" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules } from './inspectionJobMain.data' import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage} from './inspectionJobMain.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../../basicDataManage/inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })
@ -140,19 +124,9 @@
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
@ -187,13 +161,17 @@
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListPackageBtn({hide:isShowMainButton(row,['2'])}), //
] ]
} }
const listTableRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') { //
execute('execute', row) execute('execute', row)
}else if (val == 'mainPackage') { //
const list = await InspectionJobMainApi.getInspectionJobPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
} }
else if (val == 'mainJobClo') { // else if (val == 'mainJobClo') { //
handleDelete(row.id) handleDelete(row.id)
@ -256,14 +234,6 @@
}) })
const tableData = ref([]) const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
@ -291,16 +261,6 @@
importFormRef.value.open() importFormRef.value.open()
} }
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购订单主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {

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

@ -318,17 +318,17 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '使用决策', // label: '使用决策',
field: 'usageDecision', // field: 'usageDecision',
sort: 'custom', // sort: 'custom',
isSearch: false, // isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION, // dictType: DICT_TYPE.USAGE_DECISION,
form:{ // form:{
componentProps:{ // componentProps:{
} // }
} // }
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -363,11 +363,11 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const InspectionJobMainRules = reactive({ export const InspectionJobMainRules = reactive({
usageDecision: [required], // usageDecision: [required],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -458,3 +458,42 @@ export const InspectionJobDetailRules = reactive({
sequenceCode: [required], sequenceCode: [required],
available: [required], available: [required],
}) })
/**
* @returns {Array}
*/
export const InspectionJobPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
},
]))

48
src/views/qms/inspection/inspectionRecord/index.vue

@ -51,15 +51,18 @@
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" :isShowAddBtn="false" :detailButtonIsShow="true"
/> />
<!-- 导入 --> <!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules } from './inspectionRecordMain.data' import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules } from './inspectionRecordMain.data'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain' import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail' import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
@ -167,18 +170,38 @@
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
// defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn(null), //
] ]
} }
const listTableRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
// 1使
if(row.estimateCode == 1){
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{
if(itemColumn.field == "useDecision"){
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value==1)
}
})
}else if(row.estimateCode == 2){
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) =>{
if(itemColumn.field == "useDecision"){
itemColumn.componentProps.options=itemColumn.componentProps.options?.filter(item=>item.value!=1)
}
})
}
openForm('update', row) openForm('update', row)
} }else if (val == 'mainPackage') { //
else if (val == 'delete') { // const list = await InspectionRecordMainApi.getInspectionRecordPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
}else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'mainOrderPub') { //
handleOrderPub(row)
} }
} }
@ -207,6 +230,20 @@
await getList() await getList()
} catch { } } catch { }
} }
/** 发布按钮操作 */
const handleOrderPub = async (row : object) => {
try {
//
await message.confirm('是否发布所选数据')
//
await InspectionRecordMainApi.publishInspectionRecordMain(row)
message.success('发布成功')
//
await getList()
} catch { }
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
@ -249,7 +286,7 @@
if (formType === 'create') { if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data) await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { }else {
await InspectionRecordMainApi.updateInspectionRecordMain(data) await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
@ -290,6 +327,5 @@
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await InspectionRecordMainApi.importTemplate()
}) })
</script> </script>

35
src/views/qms/inspection/inspectionRecord/inspectionRecordMain.data.ts

@ -13,72 +13,84 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false
}, },
{ {
label: '申请编码', label: '申请编码',
field: 'applicationCode', field: 'applicationCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false
}, },
{ {
label: '任务编码', label: '任务编码',
field: 'taskCode', field: 'taskCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '供应商编码', label: '供应商编码',
field: 'supplierCode', field: 'supplierCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '物料编码', label: '物料编码',
field: 'materialCode', field: 'materialCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验方案编码', label: '检验方案编码',
field: 'inspectionSchemeCode', field: 'inspectionSchemeCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验方案Json', label: '检验方案Json',
field: 'inspectionSchemeJson', field: 'inspectionSchemeJson',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验批次', label: '检验批次',
field: 'inspectionBatch', field: 'inspectionBatch',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验批数量', label: '检验批数量',
field: 'inspectionBatchAmount', field: 'inspectionBatchAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '采样总数量', label: '采样总数量',
field: 'sampleTatalAmount', field: 'sampleTatalAmount',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '检验类型', label: '检验类型',
field: 'inspectionType', field: 'inspectionType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'Select' component: 'Select'
}, },
@ -88,18 +100,21 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionBatchSource', field: 'inspectionBatchSource',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '订单号', label: '订单号',
field: 'orderCode', field: 'orderCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '订单行', label: '订单行',
field: 'orderRow', field: 'orderRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -110,12 +125,14 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'certificateCode', field: 'certificateCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '凭证行', label: '凭证行',
field: 'certificateRow', field: 'certificateRow',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -126,6 +143,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStage', field: 'inspectionStage',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -136,12 +154,14 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionStringency', field: 'inspectionStringency',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: '使用决策', label: '使用决策',
field: 'useDecision', field: 'useDecision',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false
}, },
{ {
label: '计划开始时间', label: '计划开始时间',
@ -149,6 +169,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -171,6 +192,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -193,6 +215,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -215,6 +238,7 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isForm:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -236,18 +260,29 @@ export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inspectionLevel', field: 'inspectionLevel',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: 'AQL值', label: 'AQL值',
field: 'aqlValue', field: 'aqlValue',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false,
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
}, },
{ {
label: '创建时间', label: '创建时间',

139
src/views/qms/inspection/inspectionRequest/index.vue

@ -21,7 +21,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -37,6 +37,8 @@
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" /> @success="importSuccess" />
<!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -44,9 +46,11 @@
import { InspectionMain, InspectionMainRules } from './inspectionMain.data' import { InspectionMain, InspectionMainRules } from './inspectionMain.data'
import * as InspectionMainApi from '@/api/qms/inspectionRequest' import * as InspectionMainApi from '@/api/qms/inspectionRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'InspectionMain' }) defineOptions({ name: 'InspectionMain' })
@ -113,25 +117,134 @@
} }
} }
// - //
const butttondata = [ const isShowMainButton = (row, val) => {
defaultButtons.mainListEditBtn({ hasPermi: 'wms:inspectionMain:update' }), // if (val.indexOf(row.status) > -1) {
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:inspectionMain:delete' }), // return false
] } else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']), hasPermi: 'qms:inspection-request-main:close' }), //
// defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['5']), hasPermi: 'qms:inspection-request-main:reAdd' }), //
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'qms:inspection-request-main:submit' }), //
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']), hasPermi: 'qms:inspection-request-main:refused' }), //
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']), hasPermi: 'qms:inspection-request-main:agree' }), //
defaultButtons.mainListHandleBtn({ hide: isShowMainButton(row, ['3']), hasPermi: 'qms:inspection-request-main:handle' }), //
defaultButtons.mainListPackageBtn(null), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
]
}
const listTableRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'mainClose') { //
handleClose(row.id)
} else if (val == 'mainReAdd') { //
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
handleRefused(row.id)
} else if (val == 'mainApprove') { //
handleAgree(row.id)
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // }else if (val == 'mainPackage') { //
handleDelete(row.id) const list = await InspectionMainApi.getInspectionRequestPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
}
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try{
await message.confirm(t('common.confirmColse'))
tableObject.loading = true
await InspectionMainApi.closeInspectRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id : number) => {
try{
await message.confirm(t('common.confirmReAdd'))
tableObject.loading = true
await InspectionMainApi.reAddInspectRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 审批通过按钮操作 */
const handleAgree = async (id : number) => {
try{
await message.confirm(t('common.confirmAgree'))
tableObject.loading = true
await InspectionMainApi.agreeInspectRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id : number) => {
try{
await message.confirm(t('common.confirmRefused'))
tableObject.loading = true
await InspectionMainApi.refusedInspectRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 处理按钮操作 */
const handleHandle = async (id : number) => {
try{
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await InspectionMainApi.handleInspectRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 提交按钮操作 */
const handleSubmit = async (id : number) => {
try{
await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true
await InspectionMainApi.submitInspectRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
}catch{}finally{
tableObject.loading = false
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const formRef = ref()
const openForm = (type : string, row ?: any) => { const openForm = async (type : string, row ?: number) => {
basicFormRef.value.open(type, row) tableData.value = [] //
formRef.value.open(type, row)
} }
// form // form

2
src/views/qms/inspection/inspectionRequest/inspectionMain.data.ts

@ -232,7 +232,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action', field: 'action',
isForm: false, isForm: false,
table: { table: {
width: 150, width: 200,
fixed: 'right' fixed: 'right'
} }
} }

18
src/views/system/dict/DictTypeForm.vue

@ -17,6 +17,19 @@
placeholder="请输入参数名称" placeholder="请输入参数名称"
/> />
</el-form-item> </el-form-item>
<el-form-item label="字典分类" prop="classes">
<el-select
v-model="formData.classes"
placeholder="请选择字典分类"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DICTIONARY_CLASS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-radio-group v-model="formData.status"> <el-radio-group v-model="formData.status">
<el-radio <el-radio
@ -39,7 +52,7 @@
</Dialog> </Dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import * as DictTypeApi from '@/api/system/dict/dict.type' import * as DictTypeApi from '@/api/system/dict/dict.type'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
@ -56,6 +69,7 @@ const formData = ref({
id: undefined, id: undefined,
name: '', name: '',
type: '', type: '',
classes: '',
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: '' remark: ''
}) })
@ -72,6 +86,7 @@ const open = async (type: string, id?: number) => {
dialogTitle.value = t('action.' + type) dialogTitle.value = t('action.' + type)
formType.value = type formType.value = type
resetForm() resetForm()
formData.value.classes = 'system'
// //
if (id) { if (id) {
formLoading.value = true formLoading.value = true
@ -116,6 +131,7 @@ const resetForm = () => {
id: undefined, id: undefined,
type: '', type: '',
name: '', name: '',
classes: '',
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: '' remark: ''
} }

11
src/views/system/dict/index.vue

@ -10,6 +10,12 @@
<el-input v-model="queryParams.type" class="!w-240px" clearable placeholder="请输入字典类型" <el-input v-model="queryParams.type" class="!w-240px" clearable placeholder="请输入字典类型"
@keyup.enter="handleQuery" /> @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="字典分类" prop="classes">
<el-select v-model="queryParams.classes" class="!w-240px" clearable placeholder="请选择字典分类">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.DICTIONARY_CLASS)" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" class="!w-240px" clearable placeholder="请选择字典状态"> <el-select v-model="queryParams.status" class="!w-240px" clearable placeholder="请选择字典状态">
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)" :key="dict.value" :label="dict.label" <el-option v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)" :key="dict.value" :label="dict.label"
@ -48,6 +54,11 @@
<el-table-column align="center" label="字典编号" prop="id" /> <el-table-column align="center" label="字典编号" prop="id" />
<el-table-column align="center" label="字典名称" prop="name" show-overflow-tooltip /> <el-table-column align="center" label="字典名称" prop="name" show-overflow-tooltip />
<el-table-column align="center" label="字典类型" prop="type" width="300" /> <el-table-column align="center" label="字典类型" prop="type" width="300" />
<el-table-column align="center" label="字典分类" prop="classes" width="300" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.DICTIONARY_CLASS" :value="scope.row.classes" />
</template>
</el-table-column>
<el-table-column align="center" label="状态" prop="status"> <el-table-column align="center" label="状态" prop="status">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />

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

@ -251,10 +251,10 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1',, '2','4']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
{ {
label: '采购审批通过', label: '采购通过',
name: 'purchase_mainPlanSub', name: 'purchase_mainPlanSub',
hide: isShowMainButton(row, ['2','7']), hide: isShowMainButton(row, ['2','7']),
type: 'primary', type: 'primary',
@ -272,7 +272,7 @@
hasPermi: '' hasPermi: ''
}, },
{ {
label: '发票寄出确认', label: '供应商确认',
name: 'invoice_sent_out', name: 'invoice_sent_out',
hide: isShowMainButton(row, ['8']), hide: isShowMainButton(row, ['8']),
type: 'danger', type: 'danger',
@ -281,7 +281,7 @@
hasPermi: '' hasPermi: ''
}, },
{ {
label: '财务审批通过', label: '财务通过',
name: 'finance_mainPlanSub', name: 'finance_mainPlanSub',
hide: isShowMainButton(row, ['4']), hide: isShowMainButton(row, ['4']),
type: 'primary', type: 'primary',
@ -301,7 +301,7 @@
// defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), // // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
//defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), // //defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','8'])}), // defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','8'])}), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2','4']) }), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1','8']) }), //
// //
// { // {
// label: '', // label: '',

Loading…
Cancel
Save