Browse Source

Merge remote-tracking branch 'origin/hella_online_20240803' into hella_online_20240803

hella_online_20240815
滕晓飞 6 months ago
parent
commit
2a578eb27a
  1. 20
      src/api/wms/productionreturnRecordDetail/index.ts
  2. 8
      src/api/wms/purchasePlanDetail/index.ts
  3. 6
      src/views/qms/inspectionJob/addForm.vue
  4. 151
      src/views/qms/inspectionJob/index.vue
  5. 1552
      src/views/qms/inspectionJobProduction/addForm.vue
  6. 194
      src/views/qms/inspectionJobProduction/detail.vue
  7. 442
      src/views/qms/inspectionJobProduction/index.vue
  8. 885
      src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts
  9. 1552
      src/views/qms/inspectionJobPurchase/addForm.vue
  10. 194
      src/views/qms/inspectionJobPurchase/detail.vue
  11. 442
      src/views/qms/inspectionJobPurchase/index.vue
  12. 885
      src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts
  13. 96
      src/views/qms/inspectionRecord/index.vue
  14. 1
      src/views/qms/inspectionRecordFirst/index.vue
  15. 1571
      src/views/qms/inspectionRecordProduction/addForm.vue
  16. 402
      src/views/qms/inspectionRecordProduction/detail.vue
  17. 450
      src/views/qms/inspectionRecordProduction/index.vue
  18. 964
      src/views/qms/inspectionRecordProduction/inspectionRecordMain.data.ts
  19. 312
      src/views/qms/inspectionRecordProduction/useAddForm.vue
  20. 1571
      src/views/qms/inspectionRecordPurchase/addForm.vue
  21. 402
      src/views/qms/inspectionRecordPurchase/detail.vue
  22. 450
      src/views/qms/inspectionRecordPurchase/index.vue
  23. 964
      src/views/qms/inspectionRecordPurchase/inspectionRecordMain.data.ts
  24. 312
      src/views/qms/inspectionRecordPurchase/useAddForm.vue
  25. 5
      src/views/system/serialNumber/index.vue
  26. 4
      src/views/system/tenant/index.vue
  27. 5
      src/views/wms/agvManage/agvLocationrelation/index.vue
  28. 4
      src/views/wms/basicDataManage/customerManage/customer/customer.data.ts
  29. 4
      src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts
  30. 4
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  31. 4
      src/views/wms/basicDataManage/customerManage/project/project.data.ts
  32. 4
      src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts
  33. 5
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  34. 5
      src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue
  35. 5
      src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue
  36. 5
      src/views/wms/basicDataManage/documentSetting/plansetting/index.vue
  37. 5
      src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue
  38. 5
      src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue
  39. 5
      src/views/wms/basicDataManage/documentSetting/switch/index.vue
  40. 2
      src/views/wms/basicDataManage/documentSetting/switch/switch.data.ts
  41. 5
      src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue
  42. 4
      src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts
  43. 5
      src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue
  44. 4
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  45. 5
      src/views/wms/basicDataManage/factoryModeling/dock/index.vue
  46. 3
      src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue
  47. 5
      src/views/wms/basicDataManage/factoryModeling/location/index.vue
  48. 4
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  49. 5
      src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue
  50. 4
      src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts
  51. 5
      src/views/wms/basicDataManage/factoryModeling/process/index.vue
  52. 4
      src/views/wms/basicDataManage/factoryModeling/process/process.data.ts
  53. 5
      src/views/wms/basicDataManage/factoryModeling/productionline/index.vue
  54. 4
      src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts
  55. 5
      src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue
  56. 4
      src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts
  57. 5
      src/views/wms/basicDataManage/factoryModeling/workshop/index.vue
  58. 4
      src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts
  59. 5
      src/views/wms/basicDataManage/factoryModeling/workstation/index.vue
  60. 4
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  61. 5
      src/views/wms/basicDataManage/labelManage/barcode/index.vue
  62. 5
      src/views/wms/basicDataManage/labelManage/callmaterials/index.vue
  63. 3
      src/views/wms/basicDataManage/labelManage/locationLabel/index.vue
  64. 7
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  65. 5
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  66. 5
      src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue
  67. 5
      src/views/wms/basicDataManage/orderManage/carrier/index.vue
  68. 5
      src/views/wms/basicDataManage/orderManage/owner/index.vue
  69. 5
      src/views/wms/basicDataManage/orderManage/team/index.vue
  70. 5
      src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue
  71. 5
      src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue
  72. 5
      src/views/wms/basicDataManage/strategySetting/rule/index.vue
  73. 139
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  74. 10
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue
  75. 5
      src/views/wms/basicDataManage/subject/mstr/index.vue
  76. 5
      src/views/wms/basicDataManage/subject/qadCostcentre/index.vue
  77. 5
      src/views/wms/basicDataManage/subject/qadProject/index.vue
  78. 5
      src/views/wms/basicDataManage/subject/subjectAccount/index.vue
  79. 4
      src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts
  80. 12
      src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts
  81. 12
      src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts
  82. 4
      src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts
  83. 5
      src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue
  84. 4
      src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts
  85. 5
      src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue
  86. 5
      src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue
  87. 4
      src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts
  88. 5
      src/views/wms/buttMesManage/mesBarCode/index.vue
  89. 82
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  90. 18
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  91. 16
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts
  92. 3
      src/views/wms/issueManage/issue/issueJobMain/index.vue
  93. 3
      src/views/wms/issueManage/issue/issueRecordMain/index.vue
  94. 5
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  95. 3
      src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue
  96. 5
      src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue
  97. 5
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  98. 3
      src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue
  99. 3
      src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue
  100. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts

20
src/api/wms/productionreturnRecordDetail/index.ts

@ -44,6 +44,26 @@ export const getProductionreturnRecordDetailPage = async (params) => {
return await request.get({ url: `/wms/productionreturn-record-detail/page`, params })
}
}
// 查询生产退料记录子列表
export const getProductionreturnRecordDetailPageStore = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-record-detail-store/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-record-detail-store/page`, params })
}
}
// 查询隔离退料记录子列表
export const getProductionreturnRecordDetailPageHold = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-record-detail-hold/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-record-detail-hold/page`, params })
}
}
// 查询生产退料记录子详情
export const getProductionreturnRecordDetail = async (id: number) => {

8
src/api/wms/purchasePlanDetail/index.ts

@ -20,10 +20,12 @@ const getPageParams = (params)=>{
console.log('params.status',params.status)
// 状态
if(params.status&&params.status.length>0){
params.statuss = params.status.join(',')
if(Array.isArray(params.status)){
if(params.status&&params.status.length>0){
params.statuss = params.status.join(',')
}
params.status = ''
}
params.status = ''
return params
}
// 查询要货计划子列表

6
src/views/qms/inspectionJob/addForm.vue

@ -6,6 +6,7 @@
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
:before-close="handleClose"
>
<div
class="box"
@ -1519,6 +1520,11 @@ const inspectionValueInput = (item, cur) => {
}
}
}
const handleClose =async (done: () => void) => {
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
emit('close')
done()
}
</script>
<style scoped>
.small-title {

151
src/views/qms/inspectionJob/index.vue

@ -4,11 +4,8 @@
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams({
available: true,
excludeInspectionType: '1,4'
})"
/>
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -23,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -60,6 +58,7 @@
:rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
@close="getList"
/>
<!-- 详情 -->
<Detail
@ -86,13 +85,13 @@
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -122,6 +121,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user'
//
defineOptions({ name: 'inspectionJobMain' })
@ -132,7 +132,7 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
const userStore = useUserStore()
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -202,7 +202,7 @@ const buttonBaseClick = (val, item) => {
handleExport()
} else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({
filters: tableObject.params.filters
})
@ -235,23 +235,35 @@ const isShowMainButton2 = (row, val) => {
}
}
//
const isShowMainButton1 = (row, val) => {
if (val.indexOf(row.status) > -1) {
if (userStore.getUser.id == row.acceptUserId) {
return false
} else {
return true
}
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
// defaultButtons.mainListJobAccBtn({
// hide: isShowMainButton(row, ['1']),
// hasPermi: 'qms:inspection-job-main:accept'
// }), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']),
hide: isShowMainButton1(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']),
hide: isShowMainButton(row, ['1', '2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
@ -299,7 +311,7 @@ const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */
@ -317,8 +329,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
//
const formRef = ref()
const execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
const execute = async (type: string, row?: any) => {
if (row.status == '2') {
if (userStore.getUser.id == row.acceptUserId) {
formRef.value.open(type, row)
} else {
message.error('承接人与当前登录人不一致')
}
} else if (row.status == '1') {
await handleAccept(row.id)
formRef.value.open(type, row)
await getList()
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
@ -329,7 +351,7 @@ const handleClose = async (id: number) => {
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
/** 发布按钮操作 */
@ -341,19 +363,19 @@ const handleRelease = async (id: number) => {
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
// await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
// message.success(t('common.acceptSuccess'))
// (TB)
buttonBaseClick('refresh',null)
// buttonBaseClick('refresh', null)
} catch {}
}
//
@ -365,7 +387,7 @@ const handleAbandon = async (id: number) => {
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
buttonBaseClick('refresh',null)
buttonBaseClick('refresh', null)
} catch {}
}
@ -411,8 +433,8 @@ const submitForm = async (formType, data) => {
//
if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
} else {
buttonBaseClick('refresh', null)
}
} finally {
formRef.value.formLoading = false
@ -429,11 +451,25 @@ const handleImport = () => {
const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) {
searchData.filters.push({
action: 'notIn',
column: 'inspectionType',
value: '1,4'
})
if (route.name == 'inspectionJobProductionMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '4'
})
} else if (route.name == 'inspectionJobPurchaseMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '1'
})
} else {
searchData.filters.push({
action: 'notIn',
column: 'excludeInspectionType',
value: '1,4'
})
}
}
tableObject.params = {
isSearch: true,
@ -441,14 +477,47 @@ const searchFormClick = (searchData) => {
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
console.log(11,route.name)
if (route.name == 'inspectionJobProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else if (route.name == 'inspectionJobPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
}
}
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
onActivated(() => {
if (route.name == 'inspectionJobProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else if (route.name == 'inspectionJobPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
}
}
getList()
})
</script>

1552
src/views/qms/inspectionJobProduction/addForm.vue

File diff suppressed because it is too large

194
src/views/qms/inspectionJobProduction/detail.vue

@ -1,194 +0,0 @@
<template>
<div>
<el-drawer v-model="isShowDrawer" title="详情" direction="rtl" size="80%" v-loading="detailLoading">
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions :data="data" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="allSchemas.detailSchema" :columns="2" width="200px" />
</ContentWrap>
<ContentWrap>
<el-tabs v-model="editableTabsValue" class="demo-tabs" type="border-card" tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.number" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName" disabled placeholder="请选择检验方法" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsRespVO.samplePieceSize">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplePieceSize" disabled placeholder="请输入每份样品量" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsRespVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsRespVO.resultEntryMethod">
<el-select v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod" placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event,item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType">
<el-select v-model="item.inspectionJobCharacteristicsRespVO.featureType" placeholder="请选择特征类型" @change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Detail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

442
src/views/qms/inspectionJobProduction/index.vue

@ -1,442 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams({
available: true,
inspectionType: '4'
})"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
: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 #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<AddForm
ref="formRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 详情 -->
<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"
/>
<!-- 包装信息 -->
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas"
:detailAllSchemasRules="InspectionJobPackageRules"
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from './inspectionJobMain.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
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 AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'inspectionJobMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
// if(formField == 'itemCode'){
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
formRef.setValues(setV)
})
}
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
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 isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton2(row, ['TRUE']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') {
//
execute('execute', row)
} else if (val == 'mainPackage') {
//
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id)
} else if (val == 'mainJobClo') {
//
handleClose(row.id)
} else if (val == 'mainOrderPub') {
//
handleRelease(row.id)
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id)
}
}
//
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const formRef = ref()
const execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
//
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleRelease = async (id: number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch {}
}
//
const handleAbandon = async (id: number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const submitForm = async (formType, data) => {
// return
try {
formRef.value.formLoading = true
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRef.value.formLoading = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const searchFormClick = (searchData) => {
searchData.filters.push({
action: "==",
column: "inspectionType",
value: "4"
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
inspectionType: '4'
}
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
</script>

885
src/views/qms/inspectionJobProduction/inspectionJobMain.data.ts

@ -1,885 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)
const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)
const isCanUpdateList = [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
]
/**
* @returns {Array}
*/
export const InspectionJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200,
fixed: 'left'
}
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 175
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料批次',
field: 'batch',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200
}
},
{
label: '批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isDetail: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
isSearch: false,
isDetail: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// form: {
// componentProps:{
// disabled:true
// }
// },
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
isSearch: false,
form: {
component: 'Select',
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '完成人',
field: 'completeUser',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: false,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false
},
// {
// label: '检验批来源',
// field: 'inspectionBatchSource',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.INSPECTION_BATCH_SOURCE,
// dictClass: 'string',
// form:{
// componentProps:{
// disabled:true
// }
// },
// table: {
// width: 150
// }
// },
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
// {
// label: '使用决策',
// field: 'usageDecision',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.USAGE_DECISION,
// form:{
// componentProps:{
// }
// }
// },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled:true
// }
// }
// },
{
label: '承接人',
field: 'acceptUserName',
table: {
width: 130
},
isForm: false,
isTable: false,
isDetail: true
},
{
label: '承接时间',
field: 'acceptTime',
isForm: false,
table: {
width: 180
},
isTable: false,
isDetail: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '收货时间',
field: 'deliveryTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '完成人',
field: 'completeUserName',
table: {
width: 130
},
isForm: false,
isTable: true,
isDetail: true
},
{
label: '完成时间',
field: 'completeTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
search: {
value: 'TRUE'
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
isTable: true,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 300,
fixed: 'right'
}
}
])
)
//表单校验
export const InspectionJobMainRules = reactive({
// usageDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionJobDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '检验方案模板编码',
field: 'inspectionCode',
sort: 'custom',
isSearch: true
},
{
label: '描述',
field: 'processDescribe',
sort: 'custom',
isSearch: true
},
{
label: '顺序号',
field: 'sequenceCode',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '检验特性编号',
field: 'inspectionCharCode',
sort: 'custom',
isSearch: true
},
{
label: '检验特性编码',
field: 'inspectionJobCharacteristicsRespVO.number',
sort: 'custom'
},
{
label: '检验特性描述',
field: 'inspectionJobCharacteristicsRespVO.description',
sort: 'custom'
},
{
label: '检验方法',
field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode',
sort: 'custom'
},
{
label: '采样过程编码',
field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode',
sort: 'custom'
},
{
label: '动态修改规则编码',
field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode',
sort: 'custom'
},
{
label: '是否允许修改特征值',
field: 'inspectionJobCharacteristicsRespVO.isCanUpdate',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return isCanUpdateList.find((account) => account.value == cellValue)?.label
}
},
{
label: '结果录入方式',
field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod',
sort: 'custom',
// dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY,
// dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return resultEntryMethodList.find((account) => account.value == cellValue)?.label
}
},
{
label: '特征类型',
field: 'inspectionJobCharacteristicsRespVO.featureType',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return featureTypeList.find((account) => account.value == cellValue)?.label
}
}
])
)
//表单校验
export const InspectionJobDetailRules = reactive({
taskCode: [required],
processCode: [required],
sequenceCode: [required],
available: [required]
})
/**
* @returns {Array}
*/
export const InspectionJobPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 200
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 200
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 180
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: true
},
table: {
width: 150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 150
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
isTable: false,
table: {
width: 150
}
}
])
)
//表单校验
export const InspectionJobPackageRules = reactive({
sampleAmount: [required, { validator: validateSixNum, trigger: 'blur' }]
})

1552
src/views/qms/inspectionJobPurchase/addForm.vue

File diff suppressed because it is too large

194
src/views/qms/inspectionJobPurchase/detail.vue

@ -1,194 +0,0 @@
<template>
<div>
<el-drawer v-model="isShowDrawer" title="详情" direction="rtl" size="80%" v-loading="detailLoading">
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions :data="data" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="allSchemas.detailSchema" :columns="2" width="200px" />
</ContentWrap>
<ContentWrap>
<el-tabs v-model="editableTabsValue" class="demo-tabs" type="border-card" tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.number" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsRespVO.description">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsRespVO.inspectionMethodCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.inspectionMethodName" disabled placeholder="请选择检验方法" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsRespVO.samplePieceSize">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplePieceSize" disabled placeholder="请输入每份样品量" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsRespVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsRespVO.resultEntryMethod">
<el-select v-model="item.inspectionJobCharacteristicsRespVO.resultEntryMethod" placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event,item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsRespVO.featureType">
<el-select v-model="item.inspectionJobCharacteristicsRespVO.featureType" placeholder="请选择特征类型" @change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionJobDetailPageApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'Detail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

442
src/views/qms/inspectionJobPurchase/index.vue

@ -1,442 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams({
available: true,
inspectionType: '1'
})"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
: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 #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<AddForm
ref="formRef"
basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
:formAllSchemasProcess="InspectionTemplateProcess.allSchemas"
:formAllSchemasMain="InspectionTemplateMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm"
/>
<!-- 详情 -->
<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"
/>
<!-- 包装信息 -->
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobPackage.allSchemas"
:detailAllSchemasRules="InspectionJobPackageRules"
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from './inspectionJobMain.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import * as InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
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 AddForm from './addForm.vue'
import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
//
defineOptions({ name: 'inspectionJobMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
// if(formField == 'itemCode'){
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
formRef.setValues(setV)
})
}
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InspectionJobMainApi.getInspectionJobMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
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 isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept'
}), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon'
}), //
defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton2(row, ['TRUE']),
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') {
//
execute('execute', row)
} else if (val == 'mainPackage') {
//
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id)
} else if (val == 'mainJobClo') {
//
handleClose(row.id)
} else if (val == 'mainOrderPub') {
//
handleRelease(row.id)
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id)
}
}
//
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */
// const formRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// formRef.value.open(type, row)
// }
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
}
//
const formRef = ref()
const execute = async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
//
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleRelease = async (id: number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch {}
}
//
const handleAccept = async (id: number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch {}
}
//
const handleAbandon = async (id: number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionJobDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const submitForm = async (formType, data) => {
// return
try {
formRef.value.formLoading = true
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionJobMainApi.executeInspectionJobMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRef.value.formLoading = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const searchFormClick = (searchData) => {
searchData.filters.push({
action: "==",
column: "inspectionType",
value: "1"
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
inspectionType: '1'
}
getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
})
</script>

885
src/views/qms/inspectionJobPurchase/inspectionJobMain.data.ts

@ -1,885 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
const resultEntryMethodList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)
const featureTypeList = getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)
const isCanUpdateList = [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
]
/**
* @returns {Array}
*/
export const InspectionJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200,
fixed: 'left'
}
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 175
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料批次',
field: 'batch',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 200
}
},
{
label: '批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isDetail: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
isSearch: false,
isDetail: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// form: {
// componentProps:{
// disabled:true
// }
// },
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
isSearch: false,
form: {
component: 'Select',
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '完成人',
field: 'completeUser',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: false,
isDetail: false,
isSearch: true,
isTableForm: false,
isForm: false
},
// {
// label: '检验批来源',
// field: 'inspectionBatchSource',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.INSPECTION_BATCH_SOURCE,
// dictClass: 'string',
// form:{
// componentProps:{
// disabled:true
// }
// },
// table: {
// width: 150
// }
// },
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_SEVERITY,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
// {
// label: '使用决策',
// field: 'usageDecision',
// sort: 'custom',
// isSearch: false,
// dictType: DICT_TYPE.USAGE_DECISION,
// form:{
// componentProps:{
// }
// }
// },
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE',
// disabled:true
// }
// }
// },
{
label: '承接人',
field: 'acceptUserName',
table: {
width: 130
},
isForm: false,
isTable: false,
isDetail: true
},
{
label: '承接时间',
field: 'acceptTime',
isForm: false,
table: {
width: 180
},
isTable: false,
isDetail: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '收货时间',
field: 'deliveryTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '完成人',
field: 'completeUserName',
table: {
width: 130
},
isForm: false,
isTable: true,
isDetail: true
},
{
label: '完成时间',
field: 'completeTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isForm: false,
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
search: {
value: 'TRUE'
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
table: {
width: 110
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isTable: true,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 300,
fixed: 'right'
}
}
])
)
//表单校验
export const InspectionJobMainRules = reactive({
// usageDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionJobDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '检验方案模板编码',
field: 'inspectionCode',
sort: 'custom',
isSearch: true
},
{
label: '描述',
field: 'processDescribe',
sort: 'custom',
isSearch: true
},
{
label: '顺序号',
field: 'sequenceCode',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '检验特性编号',
field: 'inspectionCharCode',
sort: 'custom',
isSearch: true
},
{
label: '检验特性编码',
field: 'inspectionJobCharacteristicsRespVO.number',
sort: 'custom'
},
{
label: '检验特性描述',
field: 'inspectionJobCharacteristicsRespVO.description',
sort: 'custom'
},
{
label: '检验方法',
field: 'inspectionJobCharacteristicsRespVO.inspectionMethodCode',
sort: 'custom'
},
{
label: '采样过程编码',
field: 'inspectionJobCharacteristicsRespVO.samplingProcessCode',
sort: 'custom'
},
{
label: '动态修改规则编码',
field: 'inspectionJobCharacteristicsRespVO.dynamicUpdateCode',
sort: 'custom'
},
{
label: '是否允许修改特征值',
field: 'inspectionJobCharacteristicsRespVO.isCanUpdate',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return isCanUpdateList.find((account) => account.value == cellValue)?.label
}
},
{
label: '结果录入方式',
field: 'inspectionJobCharacteristicsRespVO.resultEntryMethod',
sort: 'custom',
// dictType: DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY,
// dictClass: 'string',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return resultEntryMethodList.find((account) => account.value == cellValue)?.label
}
},
{
label: '特征类型',
field: 'inspectionJobCharacteristicsRespVO.featureType',
sort: 'custom',
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return featureTypeList.find((account) => account.value == cellValue)?.label
}
}
])
)
//表单校验
export const InspectionJobDetailRules = reactive({
taskCode: [required],
processCode: [required],
sequenceCode: [required],
available: [required]
})
/**
* @returns {Array}
*/
export const InspectionJobPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 200
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 200
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 180
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: true
},
table: {
width: 150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
table: {
width: 150
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
isTable: false,
table: {
width: 150
}
}
])
)
//表单校验
export const InspectionJobPackageRules = reactive({
sampleAmount: [required, { validator: validateSixNum, trigger: 'blur' }]
})

96
src/views/qms/inspectionRecord/index.vue

@ -4,11 +4,8 @@
<Search
:schema="InspectionRecordMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams({
available: true,
excludeInspectionType: '11'
})"
/>
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -94,14 +91,14 @@
:detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
@ -202,7 +199,7 @@ const buttonBaseClick = (val, item) => {
//
console.log('其他按钮', item)
}
}
}
const isShowMainButton = (row, val) => {
if (!row.callbackRequestNumber) {
@ -292,7 +289,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainOrderPub') {
//
handleOrderPub(row)
}else if (val == 'mainPlanCheckQualityReport') {
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'edit') {
@ -308,7 +305,7 @@ const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */
const basicFormRef = ref()
@ -318,8 +315,10 @@ const basicFormRef = ref()
// }
/** 使用决策操作操作 */
const formRef = ref()
const rowData = ref()
const openUseForm = async (type: string, row?: number) => {
tableData.value = [] //
rowData.value = row
formRef.value.open(type, row)
}
@ -396,6 +395,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
handleOrderPub(rowData.value)
//
getList()
} finally {
@ -429,12 +429,35 @@ const submitFormExecute = async (formType, data) => {
const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) {
searchData.filters.push({
if (route.name == 'inspectionRecordPurchaseMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '1'
},{
action: '==',
column: 'available',
value: true
})
} else if (route.name == 'inspectionRecordProductionMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '4'
},{
action: '==',
column: 'available',
value: true
})
} else {
searchData.filters.push({
action: 'notIn',
column: 'inspectionType',
value: '1,4,11'
})
}
}
tableObject.params = {
isSearch: true,
filters: searchData.filters
@ -444,10 +467,43 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
if (route.name == 'inspectionRecordPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else if (route.name == 'inspectionRecordProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
}
}
getList()
})
onActivated(() => {
if (route.name == 'inspectionRecordPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else if (route.name == 'inspectionRecordProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
}
}
getList()
})
</script>

1
src/views/qms/inspectionRecordFirst/index.vue

@ -7,7 +7,6 @@
inspectionType:'11'
})"
/>
/>
</ContentWrap>
<!-- 列表头部 -->

1571
src/views/qms/inspectionRecordProduction/addForm.vue

File diff suppressed because it is too large

402
src/views/qms/inspectionRecordProduction/detail.vue

@ -1,402 +0,0 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="data"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<ContentWrap>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processDescribe"
:name="item.name"
>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请输入检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请输入采样过程"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请输入动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionRecordCharacteristicsRespVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionRecordCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled >
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<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" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionRecordDetailPageApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

450
src/views/qms/inspectionRecordProduction/index.vue

@ -1,450 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search
:schema="InspectionRecordMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
v-clientTable
: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 #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<UseAddForm
ref="formRef"
basicFormWidth="80"
:tableAllSchemas="InspectionRecordPackage.allSchemas"
:tableFormRules="InspectionRecordPackageRules"
:rules="InspectionRecordUserRules"
:formAllSchemas="InspectionRecordUser.allSchemas"
@submitForm="submitForm"
/>
<!-- 新增 -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemas="InspectionRecordMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionTemplateRules"
@submitForm="submitFormExecute"
/>
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordDetail.allSchemas"
:detailAllSchemasRules="InspectionRecordDetailRules"
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas"
:detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
InspectionRecordMain,
InspectionRecordMainRules,
InspectionRecordDetail,
InspectionRecordDetailRules,
InspectionRecordPackage,
InspectionRecordPackageRules,
InspectionRecordUser,
InspectionRecordUserRules
} from './inspectionRecordMain.data'
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
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 UseAddForm from './useAddForm.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from '../inspectionJob/inspectionJobMain.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
//
defineOptions({ name: 'inspectionRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if (routeName.value == 'InspectRecordMain') {
tableColumns.value = tableColumns.value.filter((item) => {
return item.label != '操作'
})
}
//
const updataTableColumns = (val) => {
if (routeName.value == 'InspectRecordMain') {
tableColumns.value = val.filter((item) => {
return item.label != '操作'
})
} else {
tableColumns.value = val
}
}
//
const { tableObject, tableMethods } = useTable({
getListApi: InspectionRecordMainApi.getInspectionRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
let HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-recode-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
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 isShowMainButton = (row, val) => {
if (!row.callbackRequestNumber) {
//callbackRequestNumber使
return true
}
if (row.useDecision) {
return row.isPublished
} else {
return val ? true : false
}
}
const isShowEditBtn = (row, val) => {
if (val.indexOf(row.inspectionType) > -1) {
return true
} else {
return row.useDecision
}
}
const isShowPackageBtn = (row, val) => {
if (val.indexOf(row.inspectionType) > -1) {
return true
} else {
return false
}
}
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainApplyDecisionBtn({
hide: isShowMainButton(row, null),
hasPermi: 'qms:inspection-recode-main:edit'
}), // 使
// defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:pub'
}), //
defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), //
// defaultButtons.mainListJobExeBtn({
// hide:row.useDecision,
// hasPermi: 'qms:inspection-recode-main:execute',
// }), //
defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
const list = ref([])
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// -
const buttonTableClick = async (val, row) => {
if (val == 'applyDecision') {
//
// 1使
if (row.estimateCode == 1) {
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1)
}
})
} else if (row.estimateCode == 2) {
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1)
}
})
}
openUseForm('update', row)
} else if (val == 'mainPackage') {
//
list.value = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
list.value.forEach((item) => {
item.qualifiedAmount = item.qualifiedAmount ? item.qualifiedAmount : 0
item.noQualifiedAmount = item.noQualifiedAmount ? item.noQualifiedAmount : 0
item.destroyAmount = item.destroyAmount ? item.destroyAmount : 0
item.frozenAmount = item.frozenAmount ? item.frozenAmount : 0
})
// row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionRecordPackage.allSchemas.tableColumns)
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'mainOrderPub') {
//
handleOrderPub(row)
}else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'edit') {
//
//
execute('execute', row)
}
}
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */
const basicFormRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// basicFormRef.value.open(type, row)
// }
/** 使用决策操作操作 */
const formRef = ref()
const openUseForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionRecordMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InspectionRecordMainApi.deleteInspectionRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleOrderPub = async (row: object) => {
try {
//
await message.confirm(t('common.confirmPublish'))
//
await InspectionRecordMainApi.publishInspectionRecordMain(row.id)
message.success(t('common.publishSuccess'))
//
await getList()
} catch {}
}
//
const execute = async (type: string, row?: number) => {
basicFormRef.value.open(type, row)
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '完工检验记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionRecordDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
// //
const submitForm = async (formType, data) => {
// data.subList = tableData.value //
try {
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
} else {
await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const submitFormExecute = async (formType, data) => {
// return
console.log(formType, data)
data.status = '2'
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionRecordMainApi.executeInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
//
const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '4'
})
}
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
inspectionType: '4'
}
getList()
})
</script>

964
src/views/qms/inspectionRecordProduction/inspectionRecordMain.data.ts

@ -1,964 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
form: {
component: 'Select',
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '收货时间',
field: 'deliveryTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
},
isForm: false
},
{
label: '执行结果',
field: 'estimateCode',
dictType: DICT_TYPE.EVALUATION_CODE,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 300,
fixed: 'right'
}
}
])
)
//表单校验
export const InspectionRecordMainRules = reactive({
useDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: false,
isSearch: false,
isForm: false,
},
{
label: '记录编码',
field: 'recordCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序编码',
field: 'processCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序描述',
field: 'processDescribe',
sort: 'custom',
isSearch: false,
},
{
label: '顺序号',
field: 'sequenceCode',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否破坏性检验',
field: 'isDestroyInspection',
sort: 'custom',
isSearch: false,
form: {
component: 'Radio'
},
},
{
label: '检验开始时间',
field: 'inspectionStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'inspectionEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'inspectionOperator',
sort: 'custom',
isSearch: false,
},
{
label: '检验特性编码',
field: 'inspectionFeaturesCode',
sort: 'custom',
isSearch: false,
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isSearch: false,
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))
//表单校验
export const InspectionRecordDetailRules = reactive({
recordCode: [required],
processCode: [required],
sequenceCode: [required],
isDestroyInspection: [required],
available: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 200
},
table: {
width: 150
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 160
},
table: {
width: 150
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 150
},
table: {
width: 150
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: true,
width: 120
},
table: {
width: 150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 120
},
table: {
width: 150
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '合格数量',
field: 'qualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '不合格数量',
field: 'noQualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '破坏数量',
field: 'destroyAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '冻结数量',
field: 'frozenAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
}
]))
//表单校验
export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
frozenAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
destroyAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
noQualifiedAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
})
//表单校验
export const InspectionRecordUserRules = reactive({
useDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordUser = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
]))

312
src/views/qms/inspectionRecordProduction/useAddForm.vue

@ -1,312 +0,0 @@
<template>
<div>
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<Form
ref="formMainRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@onChange="onChange"
/>
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm
ref="tableFormRef"
style="width:100%;"
:maxHeight = "490"
:tableFields="tableSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
@inputStringBlur="tableFormBlur"
/>
</div>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</div>
</template>
<script setup lang="ts">44
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
const { proxy } = getCurrentInstance()
const message = useMessage() //
const props = defineProps({
//
basicFormWidth: {
type: String,
default: ''
},
//
footButttondata: {
type: Array,
required: false,
default: null
},
//
formAllSchemas: {
type: Object,
required: true,
default: null
},
// rules
rules: {
type: Object,
required: true,
default: null
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
})
const { t } = useI18n() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const dialogWidth = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const formMainRef = ref()
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
if (props.basicFormWidth) {
dialogWidth.value = props.basicFormWidth + '%'
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
/** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogTitle.value = t('action.applyDecision')
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.qualifiedAmount?item.qualifiedAmount:0
item.noQualifiedAmount = item.noQualifiedAmount?item.noQualifiedAmount:0
item.destroyAmount = item.destroyAmount?item.destroyAmount:0
item.frozenAmount = item.frozenAmount?item.frozenAmount:0
})
dialogVisible.value = true
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
// 1使
if(row.estimateCode == 1){
data.value.useDecision = '1'
}else{
data.value.useDecision =''
}
// ==
if(data.value.useDecision == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(data.value.useDecision == 2 || data.value.useDecision == 6){
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(data.value.useDecision == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(data.value.useDecision == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
nextTick(() => {
formMainRef.value.setValues( data.value)
})
}
dialogVisible.value = true
}
defineExpose({ open, dialogVisible, formLoading }) // open
// console.log(11,tableAllSchemas.value.tableFormColumns)
//
const emit = defineEmits([
'onChange',
'submitForm'
])
/** 弹窗按钮 */
let Butttondata: any = []
if (props.footButttondata) {
Butttondata = props.footButttondata
} else {
Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
const onChange = (field, cur)=>{
if(field=='useDecision'){
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
data.value.packageList.forEach(item=>{
item.qualifiedAmount =0
item.noQualifiedAmount =0
item.destroyAmount =0
item.frozenAmount =0
})
// ==
if(cur == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(cur == 2 || cur == 6){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(cur == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(cur == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
}
}
//
const tableFormBlur = (field, val,row)=>{
if( row.amount < val){
row.noQualifiedAmount = row.amount
row.qualifiedAmount = 0
}else{
row.qualifiedAmount = row.amount - val
row.qualifiedAmount = row.qualifiedAmount.toFixed(6)
}
}
const buttonBaseClick = (val) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const tableFormRef = ref()
const submitForm = async () => {
try {
const elForm = unref(formMainRef)?.getElFormRef()
//
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
//
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
const data1 = unref(formMainRef)?.formModel
data.value.useDecision = data1.useDecision
if(data1.useDecision == 2 || data1.useDecision == 6){
if(data.value.packageList.length>0){
let isBol = data.value.packageList.filter(cur=>parseFloat(cur.qualifiedAmount)+parseFloat(cur.noQualifiedAmount)!=parseFloat(cur.amount))
console.log(isBol)
if(isBol&&isBol.length>0){
message.error(`合格数量和不合格数量总和不等于数量`)
return
}
}
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data.value)
} else {
// /
emit('submitForm', formType.value, data.value)
}
} catch {
console.log(111)
}
}
</script>
<style scoped>
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
</style>

1571
src/views/qms/inspectionRecordPurchase/addForm.vue

File diff suppressed because it is too large

402
src/views/qms/inspectionRecordPurchase/detail.vue

@ -1,402 +0,0 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="data"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<ContentWrap>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processDescribe"
:name="item.name"
>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" ref="formFeaturesRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionRecordCharacteristicsRespVO.description">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.description" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请输入检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请输入采样过程"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请输入动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionRecordCharacteristicsRespVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionRecordCharacteristicsRespVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionRecordCharacteristicsRespVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event,item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionRecordCharacteristicsRespVO.featureType">
<el-select
v-model="item.inspectionRecordCharacteristicsRespVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionRecordCharacteristicsRespVO.inspectionStartTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionRecordCharacteristicsRespVO.inspectionEndTime">
<el-date-picker
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量单位" prop="inspectionRecordCharacteristicsRespVO.quantifyUom" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.quantifyUom" placeholder="请选择计量单位" disabled >
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.UOM)"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小数位" prop="inspectionRecordCharacteristicsRespVO.quantifyDecimal" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyDecimal" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item label="是否设定上限" prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" label="是否设定下限" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="inspectionRecordCharacteristicsRespVO.quantifyIsTarget" label="是否设定目标值" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0" >
<el-switch v-model="item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsCapping">
<el-form-item label="上限值" prop="inspectionRecordCharacteristicsRespVO.quantifyCapping" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyCapping" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsLowlimit">
<el-form-item label="下限值" prop="inspectionRecordCharacteristicsRespVO.quantifyLowlimit" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyLowlimit" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == 0 && item.inspectionRecordCharacteristicsRespVO.quantifyIsTarget">
<el-form-item label="目标值" prop="inspectionRecordCharacteristicsRespVO.quantifyTarget" >
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.quantifyTarget" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="评估代码">
<el-select v-model="item.inspectionRecordCharacteristicsRespVO.estimateCode" placeholder="请选择评估代码" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value" :label="dict.label" :value="dict.value" disabled/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-for="(cur, i) in item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList" :key="i" style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="合格数量">
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.resultEntryMethod == 1">
<el-form-item label="不合格数量">
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '0'">
<el-form-item label="检验值">
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" disabled/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'">
<el-form-item label="选定集">
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
disabled
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<el-form-item label="缺陷级别">
<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" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</ContentWrap>
</el-drawer>
</div>
</template>
<script lang="ts" setup>
import * as InspectionRecordDetailPageApi from '@/api/qms/inspectionRecord/inspectionRecordDetail'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
defineOptions({ name: 'InspectionRecordDetail' })
const editableTabsValue = ref('1')
const message = useMessage() //
const { t } = useI18n() //
const updateKey = ref(0)
const props = defineProps({
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
data.value = row
let list = []
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
})
data.value.subList = list
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail }) // open
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

450
src/views/qms/inspectionRecordPurchase/index.vue

@ -1,450 +0,0 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search
:schema="InspectionRecordMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
v-clientTable
: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 #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<UseAddForm
ref="formRef"
basicFormWidth="80"
:tableAllSchemas="InspectionRecordPackage.allSchemas"
:tableFormRules="InspectionRecordPackageRules"
:rules="InspectionRecordUserRules"
:formAllSchemas="InspectionRecordUser.allSchemas"
@submitForm="submitForm"
/>
<!-- 新增 -->
<AddForm
ref="basicFormRef"
basicFormWidth="80"
:formAllSchemas="InspectionRecordMain.allSchemas"
:tableAllSchemas="InspectionJobPackage.allSchemas"
:tableFormRules="InspectionJobPackageRules"
:rules="InspectionTemplateRules"
@submitForm="submitFormExecute"
/>
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordDetail.allSchemas"
:detailAllSchemasRules="InspectionRecordDetailRules"
:apiCreate="InspectionRecordDetailApi.createInspectionRecordDetail"
:apiUpdate="InspectionRecordDetailApi.updateInspectionRecordDetail"
:apiPage="InspectionRecordDetailApi.getInspectionRecordDetailPage"
:apiDelete="InspectionRecordDetailApi.deleteInspectionRecordDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/>
<!-- 包装信息 -->
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas"
:detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"
/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
InspectionRecordMain,
InspectionRecordMainRules,
InspectionRecordDetail,
InspectionRecordDetailRules,
InspectionRecordPackage,
InspectionRecordPackageRules,
InspectionRecordUser,
InspectionRecordUserRules
} from './inspectionRecordMain.data'
// import { InspectionJobPackage,InspectionJobPackageRules} from '../inspectionJob/inspectionJobMain.data'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
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 UseAddForm from './useAddForm.vue'
import AddForm from './addForm.vue'
import Detail from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam'
import {
InspectionJobMain,
InspectionJobMainRules,
InspectionJobDetail,
InspectionJobDetailRules,
InspectionJobPackage,
InspectionJobPackageRules
} from '../inspectionJob/inspectionJobMain.data'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
//
defineOptions({ name: 'inspectionRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InspectionRecordMain.allSchemas.tableColumns)
if (routeName.value == 'InspectRecordMain') {
tableColumns.value = tableColumns.value.filter((item) => {
return item.label != '操作'
})
}
//
const updataTableColumns = (val) => {
if (routeName.value == 'InspectRecordMain') {
tableColumns.value = val.filter((item) => {
return item.label != '操作'
})
} else {
tableColumns.value = val
}
}
//
const { tableObject, tableMethods } = useTable({
getListApi: InspectionRecordMainApi.getInspectionRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
let HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-recode-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
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 isShowMainButton = (row, val) => {
if (!row.callbackRequestNumber) {
//callbackRequestNumber使
return true
}
if (row.useDecision) {
return row.isPublished
} else {
return val ? true : false
}
}
const isShowEditBtn = (row, val) => {
if (val.indexOf(row.inspectionType) > -1) {
return true
} else {
return row.useDecision
}
}
const isShowPackageBtn = (row, val) => {
if (val.indexOf(row.inspectionType) > -1) {
return true
} else {
return false
}
}
// -
const butttondata = (row) => {
return [
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainApplyDecisionBtn({
hide: isShowMainButton(row, null),
hasPermi: 'qms:inspection-recode-main:edit'
}), // 使
// defaultButtons.mainListDeleteBtn(null), //
defaultButtons.mainListOrderPubBtn({
hide: isShowMainButton(row, 'publish'),
hasPermi: 'qms:inspection-recode-main:pub'
}), //
defaultButtons.mainListPackageBtn({ hide: isShowPackageBtn(row, ['11']) }), //
// defaultButtons.mainListJobExeBtn({
// hide:row.useDecision,
// hasPermi: 'qms:inspection-recode-main:execute',
// }), //
defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
]
}
const listTableRef = ref()
const list = ref([])
const useDecisionList = getStrDictOptions(DICT_TYPE.USAGE_DECISION)
// const useDecisionList = InspectionRecordMain.allSchemas.formSchema.filter(item=>item.field == "useDecision")
// -
const buttonTableClick = async (val, row) => {
if (val == 'applyDecision') {
//
// 1使
if (row.estimateCode == 1) {
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1)
}
})
} else if (row.estimateCode == 2) {
InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1)
}
})
}
openUseForm('update', row)
} else if (val == 'mainPackage') {
//
list.value = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
list.value.forEach((item) => {
item.qualifiedAmount = item.qualifiedAmount ? item.qualifiedAmount : 0
item.noQualifiedAmount = item.noQualifiedAmount ? item.noQualifiedAmount : 0
item.destroyAmount = item.destroyAmount ? item.destroyAmount : 0
item.frozenAmount = item.frozenAmount ? item.frozenAmount : 0
})
// row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionRecordPackage.allSchemas.tableColumns)
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'mainOrderPub') {
//
handleOrderPub(row)
}else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'edit') {
//
//
execute('execute', row)
}
}
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */
const basicFormRef = ref()
// const openForm = async (type : string, row ?: number) => {
// tableData.value = [] //
// basicFormRef.value.open(type, row)
// }
/** 使用决策操作操作 */
const formRef = ref()
const openUseForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionRecordMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await InspectionRecordMainApi.deleteInspectionRecordMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 发布按钮操作 */
const handleOrderPub = async (row: object) => {
try {
//
await message.confirm(t('common.confirmPublish'))
//
await InspectionRecordMainApi.publishInspectionRecordMain(row.id)
message.success(t('common.publishSuccess'))
//
await getList()
} catch {}
}
//
const execute = async (type: string, row?: number) => {
basicFormRef.value.open(type, row)
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params)
download.excel(data, '采购检验记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
InspectionRecordDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
// //
const submitForm = async (formType, data) => {
// data.subList = tableData.value //
try {
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
} else {
await InspectionRecordMainApi.updateInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
//
const submitFormExecute = async (formType, data) => {
// return
console.log(formType, data)
data.status = '2'
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionJobMainApi.createInspectionJobMain(data)
message.success(t('common.createSuccess'))
} else if (formType === 'execute') {
await InspectionRecordMainApi.executeInspectionRecordMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
//
const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '1'
})
}
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
tableObject.params = {
available: true,
inspectionType: '1'
}
getList()
})
</script>

964
src/views/qms/inspectionRecordPurchase/inspectionRecordMain.data.ts

@ -1,964 +0,0 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
form: {
component: 'Select',
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0,
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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',
disabled: true
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '收货时间',
field: 'deliveryTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
},
isForm: false
},
{
label: '执行结果',
field: 'estimateCode',
dictType: DICT_TYPE.EVALUATION_CODE,
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 300,
fixed: 'right'
}
}
])
)
//表单校验
export const InspectionRecordMainRules = reactive({
useDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: false,
isSearch: false,
isForm: false,
},
{
label: '记录编码',
field: 'recordCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序编码',
field: 'processCode',
sort: 'custom',
isSearch: false,
},
{
label: '工序描述',
field: 'processDescribe',
sort: 'custom',
isSearch: false,
},
{
label: '顺序号',
field: 'sequenceCode',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否破坏性检验',
field: 'isDestroyInspection',
sort: 'custom',
isSearch: false,
form: {
component: 'Radio'
},
},
{
label: '检验开始时间',
field: 'inspectionStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'inspectionEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'inspectionOperator',
sort: 'custom',
isSearch: false,
},
{
label: '检验特性编码',
field: 'inspectionFeaturesCode',
sort: 'custom',
isSearch: false,
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isSearch: false,
// },
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: 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: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))
//表单校验
export const InspectionRecordDetailRules = reactive({
recordCode: [required],
processCode: [required],
sequenceCode: [required],
isDestroyInspection: [required],
available: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 200
},
table: {
width: 150
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 160
},
table: {
width: 150
}
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 150
},
table: {
width: 150
}
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: true,
width: 120
},
table: {
width: 150
}
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 120
},
table: {
width: 150
}
},
{
label: '采样数量',
field: 'sampleAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '合格数量',
field: 'qualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '不合格数量',
field: 'noQualifiedAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '破坏数量',
field: 'destroyAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
},
{
label: '冻结数量',
field: 'frozenAmount',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true,
width: 100
},
table: {
width: 150
}
}
]))
//表单校验
export const InspectionRecordPackageRules = reactive({
qualifiedAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
frozenAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
destroyAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
noQualifiedAmount: [
required,
{ validator: validateSixNum, message: '小数点后最多6位', trigger: 'blur' }
],
})
//表单校验
export const InspectionRecordUserRules = reactive({
useDecision: [required],
})
/**
* @returns {Array}
*/
export const InspectionRecordUser = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
]))

312
src/views/qms/inspectionRecordPurchase/useAddForm.vue

@ -1,312 +0,0 @@
<template>
<div>
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div style="max-height: 80vh; overflow-y: auto; padding: 0px 20px">
<Form
ref="formMainRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@onChange="onChange"
/>
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm
ref="tableFormRef"
style="width:100%;"
:maxHeight = "490"
:tableFields="tableSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
@inputStringBlur="tableFormBlur"
/>
</div>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
</div>
</template>
<script setup lang="ts">44
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getCurrentInstance } from 'vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { SearchTable } from '@/components/SearchTable'
import * as InspectionRecordMainApi from '@/api/qms/inspectionRecord/inspectionRecordMain'
import * as InspectionRecordPackageApi from '@/api/qms/inspectionRecord/InspectionRecordPackage/InspectionRecordPackage'
const { proxy } = getCurrentInstance()
const message = useMessage() //
const props = defineProps({
//
basicFormWidth: {
type: String,
default: ''
},
//
footButttondata: {
type: Array,
required: false,
default: null
},
//
formAllSchemas: {
type: Object,
required: true,
default: null
},
// rules
rules: {
type: Object,
required: true,
default: null
},
//
tableAllSchemas: {
type: Array,
required: true,
default: null
},
tableFormRules: {
type: Array,
required: true,
default: null
},
})
const { t } = useI18n() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const dialogWidth = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const formMainRef = ref()
const data = ref({
code: '',
itemCode: '',
version: '',
testTypeCode: '',
programmeTemplateCode: '',
splitRule: '',
aql: '',
inspectionLevel: '',
effectiveDate: '',
expirationDate: '',
available: 'TRUE',
subList: []
})
if (props.basicFormWidth) {
dialogWidth.value = props.basicFormWidth + '%'
} else {
dialogWidth.value = props.isBusiness ? '60%' : '40%'
}
/** 打开弹窗 */
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
dialogTitle.value = t('action.applyDecision')
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(row.id)
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.qualifiedAmount?item.qualifiedAmount:0
item.noQualifiedAmount = item.noQualifiedAmount?item.noQualifiedAmount:0
item.destroyAmount = item.destroyAmount?item.destroyAmount:0
item.frozenAmount = item.frozenAmount?item.frozenAmount:0
})
dialogVisible.value = true
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
// 1使
if(row.estimateCode == 1){
data.value.useDecision = '1'
}else{
data.value.useDecision =''
}
// ==
if(data.value.useDecision == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(data.value.useDecision == 2 || data.value.useDecision == 6){
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(data.value.useDecision == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(data.value.useDecision == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
nextTick(() => {
formMainRef.value.setValues( data.value)
})
}
dialogVisible.value = true
}
defineExpose({ open, dialogVisible, formLoading }) // open
// console.log(11,tableAllSchemas.value.tableFormColumns)
//
const emit = defineEmits([
'onChange',
'submitForm'
])
/** 弹窗按钮 */
let Butttondata: any = []
if (props.footButttondata) {
Butttondata = props.footButttondata
} else {
Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
const onChange = (field, cur)=>{
if(field=='useDecision'){
tableSchemas.value.tableFormColumns.map(item=>{
item.tableForm.disabled = true
})
data.value.packageList.forEach(item=>{
item.qualifiedAmount =0
item.noQualifiedAmount =0
item.destroyAmount =0
item.frozenAmount =0
})
// ==
if(cur == 1){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
}
//
else if(cur == 2 || cur == 6){
data.value.packageList.forEach(item=>{
item.qualifiedAmount = item.amount
})
tableSchemas.value.tableFormColumns.map(item=>{
if(item.field == 'noQualifiedAmount'){
item.tableForm.disabled = false
}else{
item.tableForm.disabled = true
}
})
}
//
else if(cur == 3){
data.value.packageList.forEach(item=>{
item.noQualifiedAmount = item.amount
})
}
else if(cur == 4){
data.value.packageList.forEach(item=>{
item.frozenAmount = item.amount
})
}
}
}
//
const tableFormBlur = (field, val,row)=>{
if( row.amount < val){
row.noQualifiedAmount = row.amount
row.qualifiedAmount = 0
}else{
row.qualifiedAmount = row.amount - val
row.qualifiedAmount = row.qualifiedAmount.toFixed(6)
}
}
const buttonBaseClick = (val) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const tableFormRef = ref()
const submitForm = async () => {
try {
const elForm = unref(formMainRef)?.getElFormRef()
//
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
//
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
const data1 = unref(formMainRef)?.formModel
data.value.useDecision = data1.useDecision
if(data1.useDecision == 2 || data1.useDecision == 6){
if(data.value.packageList.length>0){
let isBol = data.value.packageList.filter(cur=>parseFloat(cur.qualifiedAmount)+parseFloat(cur.noQualifiedAmount)!=parseFloat(cur.amount))
console.log(isBol)
if(isBol&&isBol.length>0){
message.error(`合格数量和不合格数量总和不等于数量`)
return
}
}
}
if (formType.value == 'create') {
//
emit('submitForm', formType.value, data.value)
} else {
// /
emit('submitForm', formType.value, data.value)
}
} catch {
console.log(111)
}
}
</script>
<style scoped>
.small-title {
font-weight: bold;
padding: 0px 10px 10px;
color: #1a8bfc;
font-size: 16px;
}
</style>
<style>
.el-tabs--left .el-tabs__header.is-left {
min-height: 700px !important;
min-width: 150px !important;
}
.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left {
min-width: 120px !important;
}
</style>

5
src/views/system/serialNumber/index.vue

@ -99,6 +99,9 @@
import download from '@/utils/download'
import * as SerialNumberApi from '@/api/system/serialNumber'
import SerialNumberForm from './SerialNumberForm.vue'
import { formatDate } from '@/utils/formatTime'
const route = useRoute() //
defineOptions({ name: 'SerialNumber' })
@ -168,7 +171,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SerialNumberApi.exportSerialNumber(queryParams)
download.excel(data, '流水号规则.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

4
src/views/system/tenant/index.vue

@ -104,6 +104,8 @@ import download from '@/utils/download'
import * as TenantApi from '@/api/system/tenant'
import * as TenantPackageApi from '@/api/system/tenantPackage'
import TenantForm from './TenantForm.vue'
import { formatDate } from '@/utils/formatTime'
const route = useRoute() //
defineOptions({ name: 'SystemTenant' })
@ -177,7 +179,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await TenantApi.exportTenant(queryParams)
download.excel(data, '租户列表.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -69,6 +69,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'AgvLocationrelation' })
@ -243,7 +244,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -258,7 +259,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/customerManage/customer/customer.data.ts

@ -244,7 +244,7 @@ export const Customer = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -267,7 +267,7 @@ export const Customer = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

4
src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts

@ -296,7 +296,7 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -319,7 +319,7 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

4
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -284,7 +284,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -307,7 +307,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

4
src/views/wms/basicDataManage/customerManage/project/project.data.ts

@ -163,7 +163,7 @@ export const Project = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -186,7 +186,7 @@ export const Project = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

4
src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts

@ -222,7 +222,7 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -245,7 +245,7 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

@ -78,6 +78,7 @@ 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'Businesstype' })
@ -365,7 +366,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BusinesstypeApi.exportBusinesstype(tableObject.params)
download.excel(data, '业务类型.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -380,7 +381,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '业务类型导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Documentsetting' })
@ -213,7 +214,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DocumentsettingApi.exportDocumentsetting(tableObject.params)
download.excel(data, '单据设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -228,7 +229,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '单据设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Jobsetting' })
@ -213,7 +214,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await JobsettingApi.exportJobsetting(tableObject.params)
download.excel(data, '任务单设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -228,7 +229,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '任务单设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/plansetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Plansetting' })
@ -214,7 +215,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PlansettingApi.exportPlansetting(tableObject.params)
download.excel(data, '计划单设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -229,7 +230,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '计划单设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Recordsetting' })
@ -214,7 +215,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await RecordsettingApi.exportRecordsetting(tableObject.params)
download.excel(data, '记录单设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -229,7 +230,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '记录单设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Requestsetting' })
@ -214,7 +215,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await RequestsettingApi.exportRequestsetting(tableObject.params)
download.excel(data, '申请单设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -229,7 +230,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '申请单设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/documentSetting/switch/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Switch' })
@ -189,7 +190,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SwitchApi.exportSwitch(tableObject.params)
download.excel(data, '单据开关.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -204,7 +205,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '单据开关导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

2
src/views/wms/basicDataManage/documentSetting/switch/switch.data.ts

@ -25,7 +25,7 @@ export const Switch = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
form: {
componentProps: {
disabled: true
disabled: false
}
}
},

5
src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Transactiontype' })
@ -215,7 +216,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await TransactiontypeApi.exportTransactiontype(tableObject.params)
download.excel(data, '事务类型.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -230,7 +231,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '事务类型导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts

@ -214,7 +214,7 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -237,7 +237,7 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue

@ -68,6 +68,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Area' })
@ -247,7 +248,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await AreaApi.exportArea(tableObject.params)
download.excel(data, '库区.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -262,7 +263,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库区导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -252,7 +252,7 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -275,7 +275,7 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/dock/index.vue

@ -70,6 +70,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Dock' })
@ -261,7 +262,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DockApi.exportDock(tableObject.params)
download.excel(data, '月台.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -276,7 +277,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '月台导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

3
src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue

@ -59,6 +59,7 @@ import download from '@/utils/download'
import { Enterprise,EnterpriseRules } from './enterprise.data'
import * as EnterpriseApi from '@/api/wms/enterprise'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Enterprise' })
@ -229,7 +230,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await EnterpriseApi.exportEnterprise(tableObject.params)
download.excel(data, '企业.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/basicDataManage/factoryModeling/location/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'Location' })
@ -265,7 +266,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await LocationApi.exportLocation(tableObject.params)
download.excel(data, '库位.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -280,7 +281,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库位导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -392,7 +392,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -415,7 +415,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'Locationgroup' })
@ -246,7 +247,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await LocationgroupApi.exportLocationgroup(tableObject.params)
download.excel(data, '库位组.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -261,7 +262,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '库位组导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts

@ -214,7 +214,7 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -237,7 +237,7 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/process/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Process' })
@ -253,7 +254,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ProcessApi.exportProcess(tableObject.params)
download.excel(data, '工序.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -268,7 +269,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工序导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/process/process.data.ts

@ -217,7 +217,7 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -240,7 +240,7 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/productionline/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
// 线
defineOptions({ name: 'Productionline' })
@ -246,7 +247,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ProductionlineApi.exportProductionline(tableObject.params)
download.excel(data, '生产线.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -261,7 +262,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '生产线导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts

@ -227,7 +227,7 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -250,7 +250,7 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Warehouse' })
@ -226,7 +227,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await WarehouseApi.exportWarehouse(tableObject.params)
download.excel(data, '仓库.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -241,7 +242,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '仓库导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts

@ -156,7 +156,7 @@ export const Warehouse = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -179,7 +179,7 @@ export const Warehouse = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/workshop/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Workshop' })
@ -228,7 +229,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await WorkshopApi.exportWorkshop(tableObject.params)
download.excel(data, '车间.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -243,7 +244,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '车间导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts

@ -124,7 +124,7 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -147,7 +147,7 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/factoryModeling/workstation/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'Workstation' })
@ -255,7 +256,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await WorkstationApi.exportWorkstation(tableObject.params)
download.excel(data, '工位.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -270,7 +271,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '工位导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -302,7 +302,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -325,7 +325,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/labelManage/barcode/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Barcode' })
@ -218,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BarcodeApi.exportBarcode(tableObject.params)
download.excel(data, '条码片段.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -234,7 +235,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '条码片段导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/labelManage/callmaterials/index.vue

@ -79,6 +79,7 @@ import * as PackageApi from '@/api/wms/package'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'Callmaterials' })
@ -290,7 +291,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await CallmaterialsApi.exportCallmaterials(tableObject.params)
download.excel(data, '叫料标签.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -338,7 +339,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '叫料标签导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

3
src/views/wms/basicDataManage/labelManage/locationLabel/index.vue

@ -54,6 +54,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import * as Itempackaging from '@/api/wms/itempackaging'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'LocationLabel' })
@ -177,7 +178,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '库位标签.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

7
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -67,6 +67,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import * as Itempackaging from '@/api/wms/itempackage'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'PurchasePackage' })
@ -154,6 +155,7 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
debugger
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
@ -241,12 +243,13 @@ const handleDelete = async (id: number) => {
const exportLoading = ref(false) //
const handleExport = async () => {
try {
debugger
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '制造件件标签.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -318,7 +321,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '包装导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

5
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -68,6 +68,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import * as Itempackaging from '@/api/wms/itempackage'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'PurchasePackage' })
@ -247,7 +248,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '采购件标签.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -314,7 +315,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '包装导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

5
src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue

@ -64,6 +64,7 @@ import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './utensilPackage.data'
import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'UtensilPackage' })
@ -229,7 +230,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '器具标签.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -252,7 +253,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '包装导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

5
src/views/wms/basicDataManage/orderManage/carrier/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Carrier' })
@ -233,7 +234,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await CarrierApi.exportCarrier(tableObject.params)
download.excel(data, '承运商.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -248,7 +249,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '承运商导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/orderManage/owner/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Owner' })
@ -234,7 +235,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await OwnerApi.exportOwner(tableObject.params)
download.excel(data, '货主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -249,7 +250,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '货主导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/orderManage/team/index.vue

@ -68,6 +68,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import TeamForm from "@/views/wms/basicDataManage/orderManage/team/teamForm.vue";
import {sync} from "rimraf";
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Team' })
@ -228,7 +229,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await TeamApi.exportTeam(tableObject.params)
download.excel(data, '班组.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -243,7 +244,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '班组导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue

@ -75,6 +75,7 @@ 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Configurationsetting' })
@ -210,7 +211,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ConfigurationsettingApi.exportConfigurationsetting(tableObject.params)
download.excel(data, '配置设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -225,7 +226,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '配置设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue

@ -66,6 +66,7 @@ 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Paramsetting' })
@ -181,7 +182,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ParamsettingApi.exportParamsetting(tableObject.params)
download.excel(data, '参数设置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -196,7 +197,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '参数设置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/strategySetting/rule/index.vue

@ -74,6 +74,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Rule' })
@ -213,7 +214,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await RuleApi.exportRule(tableObject.params)
download.excel(data, '规则.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -228,7 +229,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '规则导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

139
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -310,7 +310,6 @@
v-model="warehouseType"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeWarehouse"
>
<el-option
:label="cur.label"
@ -319,7 +318,45 @@
:key="'仓库'+cur.value"
/>
</el-select>
<el-select
<!-- 仓库 -->
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库区 -->
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位组 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- <el-select
v-model="formData.configuration.WarehouseCode"
v-if="warehouseType == 'WarehouseCode'"
placeholder="请选择仓库"
@ -387,7 +424,7 @@
:label="cur.code"
:value="cur.code"
/>
</el-select>
</el-select> -->
</el-form-item>
</el-col>
<!-- 数量排序方向 -->
@ -560,6 +597,10 @@
<TableHead :HeadButttondata="Butttondata" @buttonBaseClick="buttonBaseClick" />
</template>
</Dialog>
<SearchTable
ref="searchTableRef"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -571,7 +612,15 @@ import { getAreaList } from '@/api/wms/areabasic'
import { getLocationgroupList } from '@/api/wms/locationgroup'
import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { isString } from '@/utils/is'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
@ -836,7 +885,81 @@ const filterMethodWarehouseList = (query: string) => {
options.warehouseList = options.originWarehouseList
}
}
getFormWarehouseList()
const searchTableRef = ref()
const searchWarehouse = ()=>{
if(warehouseType.value == 'WarehouseCode'){
//
searchTableRef.value.open(
'请选择仓库',
Warehouse.allSchemas,
WarehouseApi.getWarehousePage,
'WarehouseCode',
'code',
true,
undefined,
undefined,
undefined
)
}else if(warehouseType.value == 'AreaCode'){
searchTableRef.value.open(
'请选择库区',
Area.allSchemas,
AreaApi.getAreaPage,
'WarehouseCode',
'code',
true,
undefined,
undefined,
undefined
)
}else if(warehouseType.value == 'LocationGroupCode'){
searchTableRef.value.open(
'请选择库位组',
Locationgroup.allSchemas,
LocationgroupApi.getLocationgroupPage,
'WarehouseCode',
'code',
true,
undefined,
undefined,
undefined
)
}else if(warehouseType.value == 'LocationCode'){
searchTableRef.value.open(
'请选择库位',
Location.allSchemas,
LocationApi.getLocationPage,
'WarehouseCode',
'code',
true,
undefined,
undefined,
undefined
)
}
}
const searchTableSuccess = (formField, searchField, val, type, row) => {
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'':warehouseType.value == 'AreaCode'?'':warehouseType.value == 'LocationGroupCode'?'':warehouseType.value == 'LocationCode'?'':''
console.log('searchTableSuccess',formField, searchField, val, type, row)
console.log(val.map(item=>(item['code'])).join(','))
formData.value.configuration[warehouseType.value] = val.map(item=>(item['code'])).join(',')
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode']
fields.forEach(item=>{
if(item!=warehouseType.value){
formData.value.configuration[item] = ''
}
})
}
// getFormWarehouseList()
// ///
const changeWarehouse = (e) => {
formData.value.configuration.WarehouseCode = ''
@ -906,25 +1029,25 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.configuration.WarehouseCode
) {
warehouseType.value = 'WarehouseCode'
getFormWarehouseList()
// getFormWarehouseList()
} else if (
'AreaCode' in formData.value.configuration &&
formData.value.configuration.AreaCode
) {
warehouseType.value = 'AreaCode'
getFormAreaList()
// getFormAreaList()
} else if (
'LocationGroupCode' in formData.value.configuration &&
formData.value.configuration.LocationGroupCode
) {
warehouseType.value = 'LocationGroupCode'
getFormLocationgrouList()
// getFormLocationgrouList()
} else if (
'LocationCode' in formData.value.configuration &&
formData.value.configuration.LocationCode
) {
warehouseType.value = 'LocationCode'
getFormLocationList()
// getFormLocationList()
}
} finally {
formLoading.value = false

10
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

@ -108,7 +108,7 @@ const handleDelete = async (id: number) => {
await RuleApi.deleteRule(id)
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh',null)
getList()
} catch { }
}
//
@ -127,13 +127,7 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)

5
src/views/wms/basicDataManage/subject/mstr/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Mstr' })
@ -212,7 +213,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await MstrApi.exportMstr(tableObject.params)
download.excel(data, '产品类信息.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -227,7 +228,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '产品类信息导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/subject/qadCostcentre/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'QadCostcentre' })
@ -221,7 +222,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await QadCostcentreApi.exportQadCostcentre(tableObject.params)
download.excel(data, 'QAD成品中心.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -236,7 +237,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD成品中心导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/subject/qadProject/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'QadProject' })
@ -221,7 +222,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await QadProjectApi.exportQadProject(tableObject.params)
download.excel(data, 'QAD项目信息.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -236,7 +237,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'QAD项目信息导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/subject/subjectAccount/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'SubjectAccount' })
@ -230,7 +231,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SubjectAccountApi.exportSubjectAccount(tableObject.params)
download.excel(data, '科目账户配置.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -245,7 +246,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '科目账户配置导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/supplierManage/purchaseprice/purchaseprice.data.ts

@ -214,7 +214,7 @@ export const Purchaseprice = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -237,7 +237,7 @@ export const Purchaseprice = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

12
src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts

@ -227,6 +227,9 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -241,7 +244,10 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建者',
field: 'creator',
isForm: false,
isTable: true
isTable: true,
table: {
width: 150
},
},
{
label: '最后更新时间',
@ -249,7 +255,7 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -272,7 +278,7 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

12
src/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data.ts

@ -302,6 +302,9 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -316,7 +319,10 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建者',
field: 'creator',
isForm: false,
isTable: true
isTable: true,
table: {
width: 150
},
},
{
label: '最后更新时间',
@ -324,7 +330,7 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -347,7 +353,7 @@ export const Supplieritem = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

4
src/views/wms/basicDataManage/systemSetting/accountcalendar/accountcalendar.data.ts

@ -246,7 +246,7 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -269,7 +269,7 @@ export const Accountcalendar = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Accountcalendar' })
@ -214,7 +215,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await AccountcalendarApi.exportAccountcalendar(tableObject.params)
download.excel(data, '账期日历.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -229,7 +230,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '账期日历导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/systemSetting/currencyexchange/currencyexchange.data.ts

@ -155,7 +155,7 @@ export const Currencyexchange = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -178,7 +178,7 @@ export const Currencyexchange = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue

@ -66,6 +66,7 @@ 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 { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Currencyexchange' })
@ -215,7 +216,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await CurrencyexchangeApi.exportCurrencyexchange(tableObject.params)
download.excel(data, '货币转换.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -230,7 +231,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '货币转换导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

5
src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Systemcalendar' })
@ -214,7 +215,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SystemcalendarApi.exportSystemcalendar(tableObject.params)
download.excel(data, '系统日历.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -229,7 +230,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '系统日历导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

4
src/views/wms/basicDataManage/systemSetting/systemcalendar/systemcalendar.data.ts

@ -179,7 +179,7 @@ export const Systemcalendar = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -202,7 +202,7 @@ export const Systemcalendar = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

5
src/views/wms/buttMesManage/mesBarCode/index.vue

@ -73,6 +73,7 @@ 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 { getTenantId }from '@/utils/auth'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'MesBarCode' })
@ -223,7 +224,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await MesBarCodeApi.exportMesBarCode(tableObject.params)
download.excel(data, '生产条码清单.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -238,7 +239,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '生产条码清单导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

82
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -882,47 +882,47 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key:'customerCode', // 查询列表中字段
value:'customerCode', // 指主表某字段
message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
searchCondition: [{
key:'customerCode', // 查询列表中字段
value:'customerCode', // 指主表某字段
message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值
}
]
}
}
},
// {
// label: '包装号',
// field: 'packingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm:{
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择包装号',
// searchField: 'packingNumber',
// searchTitle: '库存余额信息',
// searchAllSchemas: Balance.allSchemas,
// searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
// searchCondition: [{
// key:'customerCode', // 查询列表中字段
// value:'customerCode', // 指主表某字段
// message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
// isMainValue: true // 表示查询条件是主表的字段的值
// }
// ]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择包装号',
// searchField: 'packingNumber',
// searchTitle: '库存余额信息',
// searchAllSchemas: Balance.allSchemas,
// searchPage: CustomerreturnRequestApi.pageItemCodeToBalance,
// searchCondition: [{
// key:'customerCode', // 查询列表中字段
// value:'customerCode', // 指主表某字段
// message: '请选择客户代码!', // 当前置条件为空时 弹出信息提示
// isMainValue: true // 表示查询条件是主表的字段的值
// }
// ]
// }
// }
// },
// {
// label: '器具号',
// field: 'containerNumber',

18
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -220,6 +220,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
value = obj.fromLocationCode
obj.fromLocationCode = obj.toLocationCode
obj.toLocationCode = ''
obj.packingNumber = '' //
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item =>{
if(item.field == 'packingNumber') {
item.isInpuFocusShow = false
@ -319,6 +320,7 @@ const isShowMainButton = (row,val) => {
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -336,7 +338,8 @@ const butttondata = (row,$index) => {
{
label: '生成标签',
name: 'ssbq',
hide: isShowMainButton(row, ['3','6']),
// hide: isShowMainButton(row, ['3','6']),
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
@ -407,6 +410,19 @@ const buttonTableClick = async (val, row) => {
console.log(err)
})
} else if (val == 'mainHandle') { //
//
let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => {
if (res) {
if (res.list.length > 0) isCreateLabel = true
}
})
if (!isCreateLabel) {
message.warning('请先创建标签')
return
}
await message.confirm('确认要处理吗?')
tableObject.loading = true
CustomerreturnRequestMainApi.handle(row.masterId).then(() => {

16
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/packageoverRecordMain.data.ts

@ -11,14 +11,14 @@ export const PackageoverMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180
},
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
table: {
width: 180
},
},
// {
// label: '申请单号',
// field: 'requestNumber',
// sort: 'custom',
// table: {
// width: 180
// },
// },
{
label: '任务单据号',
field: 'jobNumber',

3
src/views/wms/issueManage/issue/issueJobMain/index.vue

@ -74,6 +74,7 @@ import * as IssueJobDetailApi from '@/api/wms/issueJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getDictLabel, DICT_TYPE } from '@/utils/dict'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'IssueJobMain' })
@ -300,7 +301,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await IssueJobMainApi.exportIssueJobMain(tableObject.params)
download.excel(data, '发料任务主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/issueManage/issue/issueRecordMain/index.vue

@ -68,6 +68,7 @@ import * as IssueRecordMainApi from '@/api/wms/issueRecordMain'
import * as IssueRecordDetailApi from '@/api/wms/issueRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'IssueRecordMain' })
@ -156,7 +157,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await IssueRecordMainApi.exportIssueRecordMain(tableObject.params)
download.excel(data, '发料记录主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -103,6 +103,7 @@ import * as IssueRequestMainApi from '@/api/wms/issueRequestMain'
import * as IssueRequestDetailApi from '@/api/wms/issueRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as WorkstationApi from '@/api/wms/workstation'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'IssueRequestMain' })
@ -443,7 +444,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await IssueRequestMainApi.exportIssueRequestMain(tableObject.params)
download.excel(data, '发料申请主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -545,7 +546,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '发料申请主导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

3
src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue

@ -67,6 +67,7 @@ import * as OnlinesettlementRecordMainApi from '@/api/wms/onlinesettlementRecord
import * as OnlinesettlementRecordDetailApi from '@/api/wms/onlinesettlementRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
// 线
defineOptions({ name: 'OnlinesettlementRecordMain' })
@ -151,7 +152,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await OnlinesettlementRecordMainApi.exportOnlinesettlementRecordMain(tableObject.params)
download.excel(data, '上线结算记录主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue

@ -86,6 +86,7 @@ import * as OnlinesettlementRequestMainApi from '@/api/wms/onlinesettlementReque
import * as OnlinesettlementRequestDetailApi from '@/api/wms/onlinesettlementRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { formatDate } from '@/utils/formatTime'
// 线
defineOptions({ name: 'OnlinesettlementRequestMain' })
@ -267,7 +268,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await OnlinesettlementRequestMainApi.exportOnlinesettlementRequestMain(tableObject.params)
download.excel(data, '上线结算申请主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -325,7 +326,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '上线结算申请主导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

5
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -88,6 +88,7 @@ import * as PreparetoissueMainApi from '@/api/wms/preparetoissueMain'
import * as PreparetoissueDetailApi from '@/api/wms/preparetoissueDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'PreparetoissueMain' })
@ -458,7 +459,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PreparetoissueMainApi.exportPreparetoissueMain(tableObject.params)
download.excel(data, '备料计划主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -532,7 +533,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '备料计划主导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//

3
src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue

@ -73,6 +73,7 @@ import * as ProductionreceiptJobMainApi from '@/api/wms/productionreceiptJobMain
import * as ProductionreceiptJobDetailApi from '@/api/wms/productionreceiptJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'ProductionreceiptJobMain' })
@ -300,7 +301,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ProductionreceiptJobMainApi.exportProductionreceiptJobMain(tableObject.params)
download.excel(data, '生产收料任务.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

3
src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue

@ -68,6 +68,7 @@ import * as ProductionreceiptRecordMainApi from '@/api/wms/productionreceiptReco
import * as ProductionreceiptRecordDetailApi from '@/api/wms/productionreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'ProductionreceiptRecordMain' })
@ -156,7 +157,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ProductionreceiptRecordMainApi.exportProductionreceiptRecordMain(tableObject.params)
download.excel(data, '生产收料记录主.xlsx')
download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts

@ -17,7 +17,7 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>
isSearch: true
},
{
label: '申请单号',
label: '生产收料任务单号',
field: 'jobNumber',
sort: 'custom',
table: {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save