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. 85
      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. 304
      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. 135
      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 = () => {
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 = () => {
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) {
delete params.isSearch
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 {
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) => {
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) => {
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) => {
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) => {
return await request.delete({ url: `/inspection/inspection-main/delete?id=` + id })
return await request.delete({ url: `/qms/inspection-request-main/delete?id=` + id })
}
// 导出检验申请 Excel
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 = () => {
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) => {
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
const submitForm = async (formType, data) => {
debugger
try {
// detailValidate
const rs = (await props.detailValidate) ? await props.detailValidate(data) : true
@ -797,7 +798,7 @@ const openImage=(item)=>{
* @param 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" />
</el-select>
</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
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',
edit: 'Edit',
update: 'Update',
execute: 'Execute',
preview: 'Preview',
more: 'More',
sync: 'Sync',
@ -312,7 +313,8 @@ export default {
dataUpdate: 'Dict Data Eidt',
fileUpload: 'File Upload',
createLabel: 'create label',
viewDetail:'Detailed list'
viewDetail:'Detailed list',
updataRecode:'Updata recode'
},
dialog: {
dialog: 'Dialog',

4
src/locales/zh-CN.ts

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

1
src/utils/dict.ts

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

25
src/utils/disposition/defaultButtons.ts

@ -691,6 +691,18 @@ export function mainListJobExeBtn(option:any) {
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) {
return __defaultBtnOption(option,{
@ -799,7 +811,18 @@ export function mainThawRequesttBtn(option:any) {
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){
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 () => {
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(`请添加工序`)

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

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

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

@ -50,7 +50,7 @@
:apiUpdate="SelectedSetApi.updateSelectedSet"
:apiCreate="SelectedSetApi.createSelectedSet"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
:isBusiness="true"
@onChange="onChange"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@ -92,6 +92,7 @@ import { SelectedProject,SelectedProjectRules } from '../selectedProject/selecte
import * as SelectedProjectApi from '@/api/qms/selectedProject'
import * as DictDataApi from '@/api/system/dict/dict.data'
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 ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -105,9 +106,11 @@ const route = useRoute() // 路由信息
const tableData = ref([])
const routeName = ref()
const selectDictType = ref()
const optionsList = ref()
routeName.value = route.name
const tableColumns = ref(SelectedSet.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -287,7 +290,21 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
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)
try {
if (formType === 'create') {
@ -321,19 +338,20 @@ const detailOpenForm = (type, row, masterParmas) => {
const detailBasiFormOnChange = (field,val) => {
const detailBasiFormOnChange = (field,val,detailFormRef) => {
console.log(field)
console.log(val)
if(field == 'dictionaryCode'){
DictDataApi.queryByDictType(val).then(res => {
SelectedProject.allSchemas.formSchema.find(item => {
return item.field == 'dictionaryValue'
}).componentProps.options = res.map(item=>{
return {
value: item.value,
label: item.label
}
})
console.log(33,detailFormRef)
if(field == 'dictionaryTypeAndCode'){
// '-%%%-'' dictionaryCode
const [dictionaryCode, dictionaryValue] = val.split('-%%%-');
const dictionary = optionsList.value.find(temp => temp.options.some(option => option.value === val))
const dictionaryLabel = dictionary?.options.find(option => option.value === val)?.label
const setV = {}
setV['dictionaryLabel'] = dictionaryLabel
setV['dictionaryCode'] = dictionaryCode
setV['dictionaryValue'] = dictionaryValue
nextTick(() => {
detailFormRef.setValues(setV)
})
}
}
@ -342,9 +360,24 @@ const formSelectChange = (a,b,c,d) => {
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 () => {
getList()
getDicDetails()
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',
isSearch: true
},
{
label: '分类',
field: 'classification',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.EVALUATION_CODE,
dictClass: 'string',
tableForm: {
type: 'Select',
}
},
{
label: '操作',
field: 'action',
@ -43,6 +32,8 @@ export const SelectedSet = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
fixed: 'right'
}
},
isTableForm: false,
isDetail: false
}
]))

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

@ -27,7 +27,7 @@
:stretch="false"
>
<el-tab-pane
v-for="(item,index) in data.subList"
v-for="item in data.subList"
:key="item.name"
:label="item.processCode"
:name="item.name"
@ -37,7 +37,11 @@
<el-row :gutter="20">
<el-col :span="12">
<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-col>
<el-col :span="12">
@ -83,8 +87,14 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" />
<el-form-item
label="描述"
prop="inspectionJobCharacteristicsUpdateReqVO.description"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -148,7 +158,7 @@
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
@ -163,14 +173,20 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType">
<el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
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"
:label="dict.label"
:value="dict.value"
@ -179,7 +195,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime">
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime"
@ -190,7 +209,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime">
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime"
@ -200,17 +222,37 @@
/>
</el-form-item>
</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-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" />
</el-form-item>
</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-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/>
<el-input
v-model="cur.unqualifiedQuantity"
placeholder="请输入不合格数量"
/>
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
@ -219,43 +261,54 @@
<el-select
v-model="cur.estimateCode"
placeholder="请选择评估代码"
@change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE  )"
@change="changeFeatureType"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"/>
:value="dict.value"
/>
</el-select>
</el-form-item>
</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-input v-model="cur.inspectionValue" placeholder="请输入检验值"/>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" />
</el-form-item>
</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-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
@change="changeQualitativeCode($event,item,cur)">
<el-option v-for="dict in item.selectedProjectRespVOList"
@change="changeQualitativeCode($event, item, cur)"
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"/>
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="缺陷级别">
<el-select
v-model="cur.defectLevel"
placeholder="请选择缺陷级别"
disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"/>
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
@ -313,7 +366,6 @@ import { DynamicRule } from '@/views/qms/basicDataManage/dynamicRule/dynamicRule
import * as SelectedSetApi from '@/api/qms/selectedSet' //
import { SelectedSet } from '@/views/qms/basicDataManage/selectedSet/selectedSet.data' //
const { proxy } = getCurrentInstance()
const message = useMessage() //
@ -359,7 +411,7 @@ const props = defineProps({
type: Object,
required: true,
default: null
},
}
})
const { t } = useI18n() //
@ -437,22 +489,17 @@ const rules = ref({
{ required: true, message: '请输入选择集编码', trigger: 'change' }
],
'inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime': [
{ required: true, message: '请输入选择开始时间', trigger: 'change'}
{ required: true, message: '请输入选择开始时间', trigger: 'change' }
],
'inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime': [
{ required: true, message: '请输入选择结束时间', trigger: 'blur' }
],
qualifiedQuantity: [
{ required: true, message: '请输入选择结束时间', trigger: 'blur' }
],
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
})
/** 打开弹窗 */
let tabIndex = 1
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogVisible.value = true
if (titleName) {
dialogTitle.value = t('action.' + titleName)
} else {
@ -468,30 +515,32 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[]
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
for(let i=0;i<data.value.sampleTotalAmount;i++){
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(data.value.sampleTotalAmount); i++) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue:'',//
qualitativeCode:'',//
estimateCode:'',//
defectLevel:'',//
qualifiedQuantity:'',//
unqualifiedQuantity:'',//
inspectionValue: '', //
qualitativeCode: '', //
estimateCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{
inspectionValue:'',//
qualitativeCode:'',//
estimateCode:'',//
defectLevel:'',//
qualifiedQuantity:'',//
unqualifiedQuantity:'',//
}]
// item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
// inspectionValue: '', //
// qualitativeCode: '', //
// estimateCode: '', //
// defectLevel: '', //
// qualifiedQuantity: '', //
// unqualifiedQuantity: '' //
// }
// )
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) {
@ -511,7 +560,11 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
}
})
data.value.subList = list
dialogVisible.value = true
nextTick(() => {
formMainRef.value.setValues(row)
})
} else {
data.value = {
code: '',
@ -528,7 +581,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
subList: []
}
}
dialogVisible.value = true
tabIndex = data.value.subList.length + 1
}
defineExpose({ open, dialogVisible, formLoading }) // open
@ -633,7 +686,6 @@ const validateForm = (formRef) => {
const submitForm = async () => {
try {
console.log(data.value.subList)
// const validateForm1 = await validateForm(formMainRef.value)
const elForm = unref(formMainRef)?.getElFormRef()
@ -648,39 +700,60 @@ const submitForm = async () => {
return
}
//
let arrBol = data.value.subList.map((item, index) => {
let arr1 = []
if(item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1){
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{
let arrBol = []
let isOutweigh = []//
data.value.subList.forEach((item, index) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualifiedQuantity || !cur.unqualifiedQuantity
}))
}
if(item.samplingProcessRespVO.evaluationMode == 1){
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{
return !cur.estimateCode ||!cur.defectLevel
}))
)
)
}
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0){
arr1.push( item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{
if (item.samplingProcessRespVO.evaluationMode == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.estimateCode || !cur.defectLevel
}
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.inspectionValue
}))
}
if(item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1){
arr1.push(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some((cur,key) =>{
)
)
}
if (item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1) {
arrBol.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return !cur.qualitativeCode
}))
}
return arr1
)
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
})
// console.log(arrBol)
// let isEmpty1 = arrBol.filter(item=>item == true)
// arrBol.forEach(item=>{
// console.log('1q1q')
// console.log(typeof item)
// })
// setTimeout(()=>{
// console.log(arrBol.includes(true))
// },2000)
let isEmpty1 = arrBol.some(item=>item == true)
if(isEmpty1){
message.error('检验工序和检验特性有字段未填写完全')
return;
}
if(isOutweigh.length>0){
message.error('检验特性中有开始时间大于结束时间')
return;
}
return;
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data.value)
@ -789,22 +862,22 @@ const opensearchTable = (
//
// val row
const searchTableSuccess = async (formField, searchField, val, type, row) => {
if(type == 'features'){
if (type == 'features') {
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code
if(formField == 'inspectionMethodCode'){
if (formField == 'inspectionMethodCode') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description
}else if(formField == 'dynamicUpdateCode'){
} else if (formField == 'dynamicUpdateCode') {
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description
}else if(formField == 'inspectionMethod'){
} else if (formField == 'inspectionMethod') {
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description
}
} else if(type == 'main'){
} else if (type == 'main') {
data.value[formField] = val[0].code
if(formField == 'itemCode'){
if (formField == 'itemCode') {
data.value.itemName = val[0].name
}else if(formField == 'testTypeCode'){
} else if (formField == 'testTypeCode') {
data.value.testTypeName = val[0].description
}else if(formField == 'programmeTemplateCode'){
} else if (formField == 'programmeTemplateCode') {
data.value.programmeTemplateName = val[0].description
}
if (formField == 'programmeTemplateCode') {
@ -821,7 +894,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required =
false
}
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) {
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)
}
//
const resultEntryMethodChange = (e,item) => {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[]
if (e==0) {
const resultEntryMethodChange = (e, item) => {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
if (e == 0) {
// 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({
inspectionValue:'',//
qualitativeCode:'',//
estimateCode:'',//
defectLevel:'',//
qualifiedQuantity:'',//
unqualifiedQuantity:'',//
inspectionValue: '', //
qualitativeCode: '', //
estimateCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
})
}
} else {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{
inspectionValue:'',//
qualitativeCode:'',//
estimateCode:'',//
defectLevel:'',//
qualifiedQuantity:'',//
unqualifiedQuantity:'',//
}]
}
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [
{
inspectionValue: '', //
qualitativeCode: '', //
estimateCode: '', //
defectLevel: '', //
qualifiedQuantity: '', //
unqualifiedQuantity: '' //
}
]
}
console.log(222, item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList)
}
//
const changeQualitativeCode= (e,item,cur)=>{
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e)
const changeQualitativeCode = (e, item, cur) => {
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
console.log(obj)
cur.defectLevel = obj.defectLevel
}

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

@ -27,12 +27,6 @@
</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
ref="basicFormRef"
basicFormWidth="80"
@ -43,6 +37,7 @@
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemasRules="InspectionJobDetailRules"
@ -52,33 +47,22 @@
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 详情 -->
<!-- <Detail ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas"
: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" />
<!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template>
<script setup lang="ts">
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 * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionPlanApi from '@/api/qms/inspectionPlan'
//
defineOptions({ name: 'InspectionJobMain' })
@ -140,19 +124,9 @@
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(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.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListPackageBtn({hide:isShowMainButton(row,['2'])}), //
]
}
const listTableRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
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') { //
handleDelete(row.id)
@ -256,14 +234,6 @@
})
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) => {
@ -291,16 +261,6 @@
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购订单主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {

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

@ -318,17 +318,17 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '使用决策',
field: 'usageDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
form:{
componentProps:{
}
}
},
// {
// label: '使用决策',
// field: 'usageDecision',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.USAGE_DECISION,
// form:{
// componentProps:{
// }
// }
// },
{
label: '是否可用',
field: 'available',
@ -363,11 +363,11 @@ export const InspectionJobMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const InspectionJobMainRules = reactive({
usageDecision: [required],
// usageDecision: [required],
})
/**
* @returns {Array}
* @returns {Array}
*/
export const InspectionJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
@ -458,3 +458,42 @@ export const InspectionJobDetailRules = reactive({
sequenceCode: [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"
:isShowAddBtn="false" :detailButtonIsShow="true"
/>
<!-- 导入 -->
<!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionRecordMain, InspectionRecordMainRules, InspectionRecordDetail, InspectionRecordDetailRules } from './inspectionRecordMain.data'
import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordDetailApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from './detail.vue'
@ -167,18 +170,38 @@
const butttondata = (row) => {
return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
// defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn(null), //
]
}
const listTableRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
// 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)
}
})
}
else if (val == 'delete') { //
openForm('update', row)
}else if (val == 'mainPackage') { //
const list = await InspectionRecordMainApi.getInspectionRecordPackageList(row.id)
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns,list)
}else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'mainOrderPub') { //
handleOrderPub(row)
}
}
@ -207,6 +230,20 @@
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleOrderPub = async (row : object) => {
try {
//
await message.confirm('是否发布所选数据')
//
await InspectionRecordMainApi.publishInspectionRecordMain(row)
message.success('发布成功')
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
@ -249,7 +286,7 @@
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
} else {
}else {
await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
@ -290,6 +327,5 @@
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await InspectionRecordMainApi.importTemplate()
})
</script>

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

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

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

@ -21,7 +21,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -37,6 +37,8 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<!-- 包装信息 -->
<listTable ref="listTableRef" titleName="包装信息"/>
</template>
<script setup lang="ts">
@ -44,9 +46,11 @@
import { InspectionMain, InspectionMainRules } from './inspectionMain.data'
import * as InspectionMainApi from '@/api/qms/inspectionRequest'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import listTable from '@/components/listTable/src/listTable.vue'
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 { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data'
defineOptions({ name: 'InspectionMain' })
@ -113,25 +117,134 @@
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'wms:inspectionMain:update' }), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:inspectionMain:delete' }), //
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) => {
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)
} else if (val == 'delete') { //
handleDelete(row.id)
}else if (val == 'mainPackage') { //
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 openForm = (type : string, row ?: any) => {
basicFormRef.value.open(type, row)
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
// form

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

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

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

@ -17,6 +17,19 @@
placeholder="请输入参数名称"
/>
</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-radio-group v-model="formData.status">
<el-radio
@ -39,7 +52,7 @@
</Dialog>
</template>
<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 { CommonStatusEnum } from '@/utils/constants'
@ -56,6 +69,7 @@ const formData = ref({
id: undefined,
name: '',
type: '',
classes: '',
status: CommonStatusEnum.ENABLE,
remark: ''
})
@ -72,6 +86,7 @@ const open = async (type: string, id?: number) => {
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
formData.value.classes = 'system'
//
if (id) {
formLoading.value = true
@ -116,6 +131,7 @@ const resetForm = () => {
id: undefined,
type: '',
name: '',
classes: '',
status: CommonStatusEnum.ENABLE,
remark: ''
}

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

@ -10,6 +10,12 @@
<el-input v-model="queryParams.type" class="!w-240px" clearable placeholder="请输入字典类型"
@keyup.enter="handleQuery" />
</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-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"
@ -48,6 +54,11 @@
<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="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">
<template #default="scope">
<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) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1',, '2','4']) }), //
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
{
label: '采购审批通过',
label: '采购通过',
name: 'purchase_mainPlanSub',
hide: isShowMainButton(row, ['2','7']),
type: 'primary',
@ -272,7 +272,7 @@
hasPermi: ''
},
{
label: '发票寄出确认',
label: '供应商确认',
name: 'invoice_sent_out',
hide: isShowMainButton(row, ['8']),
type: 'danger',
@ -281,7 +281,7 @@
hasPermi: ''
},
{
label: '财务审批通过',
label: '财务通过',
name: 'finance_mainPlanSub',
hide: isShowMainButton(row, ['4']),
type: 'primary',
@ -301,7 +301,7 @@
// defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
//defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
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: '',

Loading…
Cancel
Save