Browse Source

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

hella_online_20240829
gaojs 3 months ago
parent
commit
12cf34fc70
  1. 5
      src/api/wms/purchaseMain/index.ts
  2. 5
      src/views/login/login.vue
  3. 124
      src/views/qms/aql/index.vue
  4. 68
      src/views/qms/counter/index.vue
  5. 121
      src/views/qms/dynamicRule/index.vue
  6. 2
      src/views/qms/inspectionJob/index.vue
  7. 83
      src/views/qms/inspectionMethod/index.vue
  8. 98
      src/views/qms/inspectionQ1/index.vue
  9. 57
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  10. 99
      src/views/qms/inspectionQ2/index.vue
  11. 58
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  12. 96
      src/views/qms/inspectionQ3/index.vue
  13. 41
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  14. 10
      src/views/qms/inspectionRecordFirst/addForm.vue
  15. 4
      src/views/qms/inspectionRecordFirst/detail.vue
  16. 2
      src/views/qms/inspectionRecordFirst/index.vue
  17. 189
      src/views/qms/inspectionRequest/index.vue
  18. 82
      src/views/qms/inspectionScheme/index.vue
  19. 61
      src/views/qms/inspectionStage/index.vue
  20. 78
      src/views/qms/inspectionTemplate/index.vue
  21. 2
      src/views/qms/qualityNotice/index.vue
  22. 81
      src/views/qms/sampleCode/index.vue
  23. 173
      src/views/qms/samplingProcess/index.vue
  24. 76
      src/views/qms/samplingScheme/index.vue
  25. 58
      src/views/qms/selectedProject/index.vue
  26. 125
      src/views/qms/selectedSet/index.vue
  27. 2
      src/views/wms/basicDataManage/documentSetting/businesstype/businesstype.data.ts
  28. 6
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  29. 3
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  30. 44
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  31. 147
      src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts
  32. 125
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  33. 162
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  34. 3
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  35. 150
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  36. 100
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  37. 116
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  38. 18
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  39. 6
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  40. 122
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  41. 104
      src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts
  42. 134
      src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts
  43. 6
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  44. 72
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  45. 7
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  46. 3
      src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
  47. 118
      src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts
  48. 101
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  49. 25
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  50. 195
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  51. 127
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  52. 100
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  53. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  54. 155
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  55. 3
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  56. 108
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

5
src/api/wms/purchaseMain/index.ts

@ -72,8 +72,13 @@ export const witPurchaseMain = async (id: number) => {
}
// 导出采购订单主 Excel
export const exportPurchaseMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchase-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchase-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {

5
src/views/login/login.vue

@ -9,7 +9,7 @@
>
<!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center ">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div>
<!-- 左边的背景图 + 欢迎语 -->
@ -33,7 +33,7 @@
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
>
<div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div>
<div class="flex items-center justify-end space-x-10px">
@ -94,6 +94,7 @@ $prefix-cls: #{$namespace}-login;
z-index: -1;
width: 100%;
height: 100%;
background-size: cover;
// background-image: url('@/assets/svgs/login-bg.svg');
background-image: url('@/assets/imgs/login-bg.png');
background-position: center;

124
src/views/qms/aql/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Aql.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Aql.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -55,7 +63,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Aql.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/aql/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/aql/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -105,7 +118,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:aql:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -118,16 +131,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -143,22 +162,30 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:aql:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:aql:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:aql:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:aql:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:aql:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:aql:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:aql:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
handleDisable(row.id)
}else if (val == 'delete') { //
    handleDelete(row.id)
  }
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
/** 添加/修改操作 */
@ -169,17 +196,19 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
try {
var isHave = Aql.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
basicFormRef.value.formLoading = true
if (formType === 'create') {
await AqlApi.createAql(data)
message.success(t('common.createSuccess'))
@ -188,7 +217,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -268,51 +301,50 @@ const searchFormClick = (searchData) => {
const onChange = async (field, value, formRef) => {
// "a"
if (field.startsWith("a") || field.startsWith("r")) {
if (field.startsWith('a') || field.startsWith('r')) {
// "a"
const suffix = field.slice(1);
const suffix = field.slice(1)
// "r"
const correspondingField = field.startsWith("a") ? "r" + suffix : "a" + suffix ;
const correspondingField = field.startsWith('a') ? 'r' + suffix : 'a' + suffix
// "r"
if (value) {
// "r"
Aql.allSchemas.formSchema.forEach(item => {
Aql.allSchemas.formSchema.forEach((item) => {
if (item.field === correspondingField) {
const setV = {};
if(correspondingField.startsWith("r")){
setV[correspondingField] = parseInt(value) + 1;
const setV = {}
if (correspondingField.startsWith('r')) {
setV[correspondingField] = parseInt(value) + 1
} else {
setV[correspondingField] = parseInt(value) - 1;
setV[correspondingField] = parseInt(value) - 1
}
item.componentProps.disabled = true;
item.componentProps.disabled = true
// 使 Vue nextTick DOM
nextTick(() => {
formRef.value.setValues(setV);
});
formRef.value.setValues(setV)
})
}
});
})
} else {
Aql.allSchemas.formSchema.forEach(item => {
Aql.allSchemas.formSchema.forEach((item) => {
if (item.field === correspondingField || item.field === field) {
item.componentProps.disabled = false;
const setV = {};
item.componentProps.disabled = false
const setV = {}
setV[correspondingField] = ''
nextTick(() => {
formRef.value.setValues(setV);
});
formRef.value.setValues(setV)
})
}
})
}
});
}
}
};
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await AqlApi.importTemplate()
})
</script>

68
src/views/qms/counter/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Counter.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Counter.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -54,7 +59,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Counter.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/counter/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/counter/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -104,7 +114,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:counter:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -115,34 +125,41 @@ const HeadButttondata = [
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'qms:counter:update'}), //
defaultButtons.mainListEditBtn({ hasPermi: 'qms:counter:update' }) //
// defaultButtons.mainListDeleteBtn({hasPermi:'qms:counter:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -163,17 +180,19 @@ const openForm = async (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
try {
var isHave = Counter.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
basicFormRef.value.formLoading = true
if (formType === 'create') {
await CounterApi.createCounter(data)
message.success(t('common.createSuccess'))
@ -182,7 +201,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -246,11 +269,10 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await CounterApi.importTemplate()
})
</script>

121
src/views/qms/dynamicRule/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="DynamicRule.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="DynamicRule.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -100,7 +108,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import UploadFile from '@/components/UploadFile/src/UploadFile.vue'
import { checkPermi } from '@/utils/permission'
import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -146,7 +154,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:dynamic-rule:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -159,16 +167,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -184,17 +198,25 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:dynamic-rule:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:dynamic-rule:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:dynamic-rule:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:dynamic-rule:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:dynamic-rule:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:dynamic-rule:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:dynamic-rule:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
editForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -212,24 +234,26 @@ const openForm = async (type: string, row?: any) => {
const editForm = async (type: string, row?: any) => {
tableData.value = []
detailMasterId.value = row.id
InspectionStageApi.getInspectionStageNoPage({masterId:row.id}).then(res=>{
InspectionStageApi.getInspectionStageNoPage({ masterId: row.id }).then((res) => {
tableData.value = res
})
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType, data) => {
try {
var isHave = DynamicRule.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
basicFormRef.value.formLoading = true
if (formType === 'create') {
await DynamicRuleApi.createDynamicRule(data)
message.success(t('common.createSuccess'))
@ -238,7 +262,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} catch {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -331,11 +359,10 @@ const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
const flag = validateNotRepetition(tableData.value);
const emptyFlag = validateDetailEmpty(tableData.value);
const flag = validateNotRepetition(tableData.value)
const emptyFlag = validateDetailEmpty(tableData.value)
if (!emptyFlag) {
message.alertWarning('明细不能为空')
basicFormRef.value.formLoading = false
@ -348,6 +375,7 @@ const submitForm = async (formType, data) => {
}
data.inspectionStageDOList = tableData.value //
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await DynamicRuleApi.createDynamicRule(data)
message.success(t('common.createSuccess'))
@ -356,6 +384,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {
@ -364,7 +393,7 @@ const submitForm = async (formType, data) => {
}
const detailValidate = (type, data) => {
let tag = true;
let tag = true
if (!validateIfRepeat(type, data)) {
tag = false
message.alertWarning('动态规则阶段不能重复')
@ -374,49 +403,49 @@ const detailValidate = (type,data) => {
const detailOpenForm = (type, row, masterParmas) => {
detailMasterId.value = masterParmas.masterId
InspectionStageApi.getInspectionStageNoPage({masterId:masterParmas.masterId}).then(res=>{
InspectionStageApi.getInspectionStageNoPage({ masterId: masterParmas.masterId }).then((res) => {
detailList.value = res
})
}
const validateIfRepeat = (type, data) => {
let mergedArray: any[] = [];
let mergedArray: any[] = []
if (type == 'create') {
mergedArray = [data, ...detailList.value];
}if(type == 'update'){
detailList.value = detailList.value.filter(item => item.id !== data.id);
mergedArray = [data, ...detailList.value];
mergedArray = [data, ...detailList.value]
}
if (type == 'update') {
detailList.value = detailList.value.filter((item) => item.id !== data.id)
mergedArray = [data, ...detailList.value]
}
const stageSet = new Set(mergedArray.map(item => item.stage));
return stageSet.size === mergedArray.length;
const stageSet = new Set(mergedArray.map((item) => item.stage))
return stageSet.size === mergedArray.length
}
const validateDetailEmpty = (data) => {
const codes = data.map(item => item.stage);
const codes = data.map((item) => item.stage)
if (codes.length == 0) {
return false;
return false
}
return true;
return true
}
const validateNotRepetition = (data) => {
// dictionaryTypeAndCode
const codes = data.map(item => item.stage);
const codes = data.map((item) => item.stage)
// Set dictionaryTypeAndCode
const uniqueCodes = new Set(codes);
const uniqueCodes = new Set(codes)
// Set
if (codes.length > uniqueCodes.size) {
return false; // false
return false // false
}
return true // true
}
return true; // true
};
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await DynamicRuleApi.importTemplate()
})
</script>

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

@ -389,6 +389,7 @@ 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'))
@ -397,6 +398,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRef.value.formLoading = false
//
getList()
} finally {

83
src/views/qms/inspectionMethod/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionMethod.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionMethod.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -42,12 +50,14 @@
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:sumFormDataByForm ="(formRef,formModel)=>{
:sumFormDataByForm="
(formRef, formModel) => {
const { videoAddress } = formModel
formRef.value.setValues({
installPackageUrl: videoAddress
})
}"
}
"
:rules="InspectionMethodRules"
:formAllSchemas="InspectionMethod.allSchemas"
:apiUpdate="InspectionMethodApi.updateInspectionMethod"
@ -118,7 +128,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-method:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -131,16 +141,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -156,17 +172,25 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:inspection-method:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-method:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:inspection-method:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:inspection-method:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:inspection-method:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:inspection-method:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:inspection-method:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -192,8 +216,10 @@ const openForm = (type: string, row?: any) => {
}
if (type == 'create') {
const currentTime = new Date().getTime()
const fileId = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='fileId')
const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
const fileId = InspectionMethod.allSchemas.formSchema.find((item) => item.field == 'fileId')
const uploadFile = InspectionMethod.allSchemas.formSchema.find(
(item) => item.field == 'videoAddress'
)
if (fileId) {
fileId['value'] = currentTime
}
@ -202,17 +228,19 @@ const openForm = (type: string, row?: any) => {
uploadFile['componentProps']['modelValue'] = []
}
} else if (type == 'update') {
const uploadFile = InspectionMethod.allSchemas.formSchema.find(item=>item.field=='videoAddress')
const uploadFile = InspectionMethod.allSchemas.formSchema.find(
(item) => item.field == 'videoAddress'
)
uploadFile['componentProps']['modelValue'] = row.filePathListView
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType, data) => {
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
delete data['uploadFile']
await InspectionMethodApi.createInspectionMethod(data)
message.success(t('common.createSuccess'))
@ -222,7 +250,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -302,11 +334,10 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await InspectionMethodApi.importTemplate()
})
</script>

98
src/views/qms/inspectionQ1/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q1.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Q1.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -33,7 +37,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -54,7 +61,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q1.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q1/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/basic/Q1/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -83,15 +95,15 @@ const tableColumns = ref(Q1.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'customerCode') {
setV['itemCode'] = ''
}
if (formField == 'itemCode') {
console.log(val);
setV['uom'] = val[0]['customerUom']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
@ -113,7 +125,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:Q1:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -126,16 +138,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -151,19 +169,31 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:delete'}), //
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q1:finish'}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q1:update'
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q1:delete'
}), //
defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q1:finish'
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}else if (val == 'finish') { //
} else if (val == 'finish') {
//
handleFinish(row.id)
}
}
@ -183,38 +213,39 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
if (type == 'create') {
nextTick(() => {
    basicFormRef.value.formRef.setValues({
basicFormRef.value.formRef.setValues({
handleTime: new Date().getTime(),
claimTime: new Date().getTime(),
priority: '3',
    })
  })
priority: '3'
})
})
}
 
}
// form
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave = Q1.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if (data.qty == 0) {
message.error('数量不能为0')
return;
return
}
if (data.claimAmount == 0) {
message.error('索赔金额不能为0')
return;
return
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await Q1Api.createQ1(data)
message.success(t('common.createSuccess'))
@ -223,7 +254,11 @@ const formsSuccess = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -290,5 +325,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q1Api.importTemplate()
})
</script>

57
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -282,21 +282,21 @@ export const Q1 = useCrudSchemas(
{
label: '索赔日期',
field: 'claimTime',
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')]
}
isTable: 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'
}
}
@ -304,22 +304,21 @@ export const Q1 = useCrudSchemas(
{
label: '处理时间',
field: 'handleTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: 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')]
}
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'
}
}
@ -367,23 +366,29 @@ export const Q1 = useCrudSchemas(
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
isSearch: false,
search: {
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
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')]
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
isForm: false
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'

99
src/views/qms/inspectionQ2/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q2.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Q2.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -33,7 +37,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -54,7 +61,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q2.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q2/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/basic/Q2/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -83,6 +95,9 @@ const tableColumns = ref(Q2.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'supplierCode') {
setV['itemCode'] = ''
}
if (formField == 'itemCode') {
setV['uom'] = val[0]['supplierUom']
}
@ -96,7 +111,7 @@ if (formField == 'purchaseReceiptNumber') {
if (formField == 'q1Number') {
//Q1
let list = []
val.forEach(item=>{
val.forEach((item) => {
list.push(item[searchField])
})
setV[formField] = list.join(',')
@ -127,7 +142,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:Q2:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -140,16 +155,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -165,19 +186,31 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:delete'}), //
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q2:finish'}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q2:update'
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q2:delete'
}), //
defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q2:finish'
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}else if (val == 'finish') { //
} else if (val == 'finish') {
//
handleFinish(row.id)
}
}
@ -197,12 +230,12 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
if (type == 'create') {
nextTick(() => {
    basicFormRef.value.formRef.setValues({
basicFormRef.value.formRef.setValues({
handleTime: new Date().getTime(),
claimTime: new Date().getTime(),
priority: '3',
    })
  })
priority: '3'
})
})
}
}
@ -210,28 +243,31 @@ nextTick(() => {
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave = Q2.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if (data.qty > data.wmsQty) {
message.error('数量不能大于记录中的收货数量')
return;
return
}
if (data.qty == 0) {
message.error('数量不能为0')
return;
return
}
if (data.claimAmount == 0) {
message.error('索赔金额不能为0')
return;
return
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await Q2Api.createQ2(data)
message.success(t('common.createSuccess'))
@ -240,7 +276,11 @@ message.error('数量不能大于记录中的收货数量')
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -307,5 +347,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q2Api.importTemplate()
})
</script>

58
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -372,25 +372,23 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '索赔日期',
field: 'claimTime',
sort: 'custom',
isForm: false,
table: {
width: 180
},
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')]
}
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'
}
}
@ -398,22 +396,20 @@ export const Q2 = useCrudSchemas(
{
label: '处理时间',
field: 'handleTime',
sort: 'custom',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
isSearch: false,
isTable: 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')]
}
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'
}
}
@ -445,23 +441,29 @@ export const Q2 = useCrudSchemas(
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
isSearch: false,
search: {
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
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')]
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
isForm: false
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'

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

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="Q3.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="Q3.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -33,7 +37,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -54,7 +61,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="Q3.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/basic/Q3/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/basic/Q3/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -84,13 +96,13 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if (formField == 'itemCode') {
console.log(val);
console.log(val)
setV['uom'] = val[0]['uom']
}
if (formField == 'q1Number') {
//Q1
let list = []
val.forEach(item=>{
val.forEach((item) => {
list.push(item[searchField])
})
setV[formField] = list.join(',')
@ -121,7 +133,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:Q3:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -134,16 +146,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -159,19 +177,31 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:delete'}), //
defaultButtons.mainListFinishBtn({hide:isShowMainButton(row,['0']),hasPermi:'qms:Q3:finish'}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:update'
}), //
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:delete'
}), //
defaultButtons.mainListFinishBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: 'qms:Q3:finish'
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}else if (val == 'finish') { //
} else if (val == 'finish') {
//
handleFinish(row.id)
}
}
@ -191,11 +221,11 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
if (type == 'create') {
nextTick(() => {
    basicFormRef.value.formRef.setValues({
basicFormRef.value.formRef.setValues({
handleTime: new Date().getTime(),
priority: '3',
    })
  })
priority: '3'
})
})
}
}
@ -203,24 +233,27 @@ nextTick(() => {
const formsSuccess = async (formType, data) => {
data.responUser = userStore.getUser.id
var isHave = Q3.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if (data.qty == 0) {
message.error('数量不能为0')
return;
return
}
if (data.amount == 0) {
message.error('金额不能为0')
return;
return
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await Q3Api.createQ3(data)
message.success(t('common.createSuccess'))
@ -229,7 +262,11 @@ const formsSuccess = async (formType, data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -296,5 +333,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await Q3Api.importTemplate()
})
</script>

41
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -334,22 +334,21 @@ export const Q3 = useCrudSchemas(
{
label: '处理时间',
field: 'handleTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: 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')]
}
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'
}
}
@ -381,23 +380,31 @@ export const Q3 = useCrudSchemas(
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
isTable: false,
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
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')]
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
isForm: false
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'

10
src/views/qms/inspectionRecordFirst/addForm.vue

@ -1081,6 +1081,11 @@ const opensearchItemsTable = () => {
column: 'type',
action: 'in',
value: 'BCP,CCP'
},
{
column: 'status',
action: 'in',
value: 'ENABLE'
}
)
//
@ -1523,6 +1528,11 @@ const onItemBlur = async (field, pageApi) => {
column: 'code',
action: '==',
value: data.value[field]?.trim()
},
{
column: 'status',
action: 'in',
value: 'ENABLE'
}
)
//

4
src/views/qms/inspectionRecordFirst/detail.vue

@ -290,13 +290,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionRecordCharacteristicsRespVO.featureType == '1'" >
<!-- <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-col> -->
<el-col :span="12">
<el-form-item label="备注">
<el-input v-model="cur.remark" placeholder="" type="number" disabled/>

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

@ -244,6 +244,7 @@ const handleMainExport = async (row: any) => {
const submitForm = async (formType, data) => {
// data.subList = tableData.value //
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionRecordMainApi.createInspectionRecordMain(data)
message.success(t('common.createSuccess'))
@ -252,6 +253,7 @@ const handleMainExport = async (row: any) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
//
getList()
} finally {

189
src/views/qms/inspectionRequest/index.vue

@ -2,27 +2,47 @@
<div>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="InspectionMain.allSchemas" />
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
<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">
}"
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)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -48,20 +68,34 @@
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/inspection-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/request/inspection-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
<!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionMain.allSchemas"
:detailAllSchemas="InspectionRequestPackage.allSchemas" :detailAllSchemasRules="InspectionRequestPackageRules"
:list="list" @ListTableSubmit='ListTableSubmit'/>
<ListTable
ref="listTableRef"
titleName="包装信息"
:allSchemas="InspectionMain.allSchemas"
:detailAllSchemas="InspectionRequestPackage.allSchemas"
:detailAllSchemasRules="InspectionRequestPackageRules"
:list="list"
@ListTableSubmit="ListTableSubmit"
/>
</div>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionMain, InspectionMainRules,InspectionRequestPackage,InspectionRequestPackageRules } from './inspectionRequestMain.data'
import {
InspectionMain,
InspectionMainRules,
InspectionRequestPackage,
InspectionRequestPackageRules
} from './inspectionRequestMain.data'
import * as InspectionMainApi from '@/api/qms/inspectionRequest'
import * as InspectionRequestPackageApi from '@/api/qms/inspectionRequest/InspectionRequestPackage'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -117,7 +151,7 @@
// defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionMain:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -130,18 +164,24 @@
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
tableObject.params.isSearch = false
tableObject.params.filters = ''
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -157,38 +197,68 @@
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']), hasPermi: 'qms:inspection-request-main:close' }), //
defaultButtons.mainListCloseBtn({
hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),
hasPermi: 'qms:inspection-request-main:close'
}), //
// defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['5']), hasPermi: 'qms:inspection-request-main:reAdd' }), //
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'qms:inspection-request-main:submit' }), //
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']), hasPermi: 'qms:inspection-request-main:refused' }), //
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']), hasPermi: 'qms:inspection-request-main:agree' }), //
defaultButtons.mainListHandleBtn({ hide: isShowMainButton(row, ['3']), hasPermi: 'qms:inspection-request-main:handle' }), //
defaultButtons.mainListSubmitBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-request-main:submit'
}), //
defaultButtons.mainListTurnDownBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-request-main:refused'
}), //
defaultButtons.mainListApproveBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'qms:inspection-request-main:agree'
}), //
defaultButtons.mainListHandleBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: 'qms:inspection-request-main:handle'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-request-main:edit'}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-request-main:edit'
}) //
]
}
const listTableRef = ref()
const list = ref([])
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
if (val == 'mainClose') {
//
handleClose(row.id)
} else if (val == 'mainReAdd') { //
} else if (val == 'mainReAdd') {
//
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
} else if (val == 'mainSubmit') {
//
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
} else if (val == 'mainTurnDown') {
//
handleRefused(row.id)
} else if (val == 'mainApprove') { //
} else if (val == 'mainApprove') {
//
handleAgree(row.id)
} else if (val == 'mainHandle') { //
} else if (val == 'mainHandle') {
//
handleHandle(row.id)
} else if (val == 'edit') { //
} else if (val == 'edit') {
//
openForm('update', row)
}else if (val == 'mainPackage') { //
} else if (val == 'mainPackage') {
//
list.value = await InspectionRequestPackageApi.getInspectionRequestPackageList(row.id)
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionRequestPackage.allSchemas.tableColumns)
listTableRef.value.openPackage(
row,
'包装信息',
InspectionRequestPackage.allSchemas.tableColumns
)
}
}
@ -200,10 +270,10 @@ const list = ref([])
await InspectionMainApi.closeInspectRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
/** 重新添加按钮操作 */
@ -214,7 +284,8 @@ const list = ref([])
await InspectionMainApi.reAddInspectRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
@ -227,7 +298,8 @@ const list = ref([])
await InspectionMainApi.agreeInspectRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
@ -240,7 +312,8 @@ const list = ref([])
await InspectionMainApi.refusedInspectRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
@ -253,7 +326,8 @@ const list = ref([])
await InspectionMainApi.handleInspectRequestMain(id)
message.success(t('common.dealwithSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
@ -266,7 +340,8 @@ const list = ref([])
await InspectionMainApi.submitInspectRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
}catch{}finally{
} catch {
} finally {
tableObject.loading = false
}
}
@ -281,18 +356,23 @@ const list = ref([])
// form
const submitForm = async (formType, data) => {
var isHave = InspectionMain.allSchemas.formSchema.some(function (item) {
return item.field === 'requestStartTime' || item.field === 'requestEndTime';
});
return item.field === 'requestStartTime' || item.field === 'requestEndTime'
})
if (isHave) {
if (data.requestStartTime && data.requestEndTime && data.requestStartTime >= data.requestEndTime) {
if (
data.requestStartTime &&
data.requestEndTime &&
data.requestStartTime >= data.requestEndTime
) {
message.error('要求结束时间要大于要求开始时间')
return;
return
}
}
if (data.requestStartTime == 0) data.requestStartTime = null;
if (data.requestEndTime == 0) data.requestEndTime = null;
if (data.requestStartTime == 0) data.requestStartTime = null
if (data.requestEndTime == 0) data.requestEndTime = null
data.inspectionRequestPackageCreateReqVO = tableData.value //
try {
formRef.value.formLoading = true
if (formType === 'create') {
await InspectionMainApi.createInspectionMain(data)
message.success(t('common.createSuccess'))
@ -301,6 +381,7 @@ const list = ref([])
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRef.value.formLoading = false
getList()
} finally {
formRef.value.formLoading = false
@ -369,7 +450,7 @@ const list = ref([])
* tableForm方法
*/
const tableFormKeys = {}
InspectionRequestPackage.allSchemas.tableFormColumns.forEach(item => {
InspectionRequestPackage.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
@ -398,9 +479,9 @@ console.log(formType,data)
}
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await InspectionMainApi.importTemplate()
})

82
src/views/qms/inspectionScheme/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionSchemeMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionSchemeMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -61,15 +69,20 @@
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionSchemeMain } from './inspectionScheme.data'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from '../inspectionTemplate/inspectionTemplate.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
import * as SampleCodeApi from "@/api/qms/sampleCode";
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import * as SampleCodeApi from '@/api/qms/sampleCode'
defineOptions({ name: 'InspectionScheme' })
@ -100,7 +113,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-scheme:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -113,16 +126,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -138,18 +157,26 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:inspection-scheme:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-scheme:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:inspection-scheme:disable'}),
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:inspection-scheme:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:inspection-scheme:disable'
}),
defaultButtons.mainCopyBtn({ hasPermi: 'qms:programme-template:copy' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:inspection-scheme:delete'}), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:inspection-scheme:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -172,12 +199,12 @@ const openForm = (type: string, row?: any) => {
// form
const submitForm = async (formType, data) => {
var isHave = InspectionSchemeMain.allSchemas.formSchema.some(function (item) {
return item.field === 'effectiveDate' || item.field === 'expirationDate';
});
return item.field === 'effectiveDate' || item.field === 'expirationDate'
})
if (isHave) {
if (data.effectiveDate && data.expirationDate && data.effectiveDate >= data.expirationDate) {
message.error('失效时间要大于生效时间')
return;
return
}
}
const data1 = {
@ -199,6 +226,8 @@ const submitForm = async (formType,data) => {
available: data.available,
content: JSON.stringify(data.process)
}
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionSchemeApi.InspectionSchemeCreat(data1)
message.success(t('common.createSuccess'))
@ -207,7 +236,11 @@ const submitForm = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -287,11 +320,10 @@ const importSuccess = () => {
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await InspectionSchemeApi.importTemplate()
})
</script>

61
src/views/qms/inspectionStage/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionStage.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionStage.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -54,7 +59,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionStage.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/inspection-stage/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/inspection-stage/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -104,7 +114,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:inspectionStage:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -117,16 +127,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -134,14 +150,16 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'wms:inspectionStage:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inspectionStage:delete'}), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:inspectionStage:delete' }) //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -155,16 +173,18 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
var isHave = InspectionStage.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionStageApi.createInspectionStage(data)
message.success(t('common.createSuccess'))
@ -173,7 +193,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -240,5 +264,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await InspectionStageApi.importTemplate()
})
</script>

78
src/views/qms/inspectionTemplate/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="InspectionTemplateMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="InspectionTemplateMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -49,11 +57,7 @@
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="InspectionTemplateMain.allSchemas"
/>
<Detail ref="detailRef" :isBasic="true" :allSchemas="InspectionTemplateMain.allSchemas" />
<!-- 导入 -->
<ImportForm
@ -69,7 +73,12 @@
<script setup lang="ts">
import download from '@/utils/download'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from './inspectionTemplate.data'
import {
InspectionTemplateMain,
InspectionTemplateProcess,
InspectionTemplateFeatures,
InspectionTemplateRules
} from './inspectionTemplate.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
@ -106,7 +115,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:programme-template:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -119,16 +128,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -160,18 +175,26 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:programme-template:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:programme-template:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:programme-template:disable'}),
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:programme-template:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:programme-template:disable'
}),
defaultButtons.mainCopyBtn({ hasPermi: 'qms:programme-template:copy' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:programme-template:delete'}), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:programme-template:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -190,6 +213,8 @@ const openForm = (type: string, row?: any) => {
// form
const submitForm = async (formType, data) => {
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await InspectionProcessPageApi.inspectionTemplateCreat(data.value)
message.success(t('common.createSuccess'))
@ -198,7 +223,11 @@ const submitForm = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -263,11 +292,10 @@ const importSuccess = () => {
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await InspectionProcessPageApi.importTemplate()
})
</script>

2
src/views/qms/qualityNotice/index.vue

@ -184,6 +184,7 @@
//
const submitForm = async (formType, data) => {
try {
formRef.value.formLoading = true
if (formType === 'create') {
await qualityNoticeApi.qualityNoticeCreat(data)
message.success(t('common.createSuccess'))
@ -192,6 +193,7 @@
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
formRef.value.formLoading = false
//
getList()
} finally {

81
src/views/qms/sampleCode/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SampleCode.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="SampleCode.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -55,7 +63,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SampleCode.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/sample-code/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/sample-code/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -105,7 +118,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:sample-code:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -118,13 +131,17 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
tableObject.params.isSearch = false
tableObject.params.filters = ''
// tableObject.params = {
@ -132,8 +149,10 @@ const buttonBaseClick = (val, item) => {
// filters: searchData.filters
// }
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -149,18 +168,25 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:sample-code:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:sample-code:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:sample-code:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:sample-code:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:sample-code:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:sample-code:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:sample-code:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -183,16 +209,18 @@ const formsSuccess = async (formType,data) => {
return
}
var isHave = SampleCode.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await SampleCodeApi.createSampleCode(data)
message.success(t('common.createSuccess'))
@ -201,7 +229,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -279,11 +311,11 @@ const searchFormClick = (searchData) => {
getList() //
}
const onChange = async (field, value, formRef) => {
if(field == "batchLowLimiting" || field == "batchUpperLimiting"){
if (field == 'batchLowLimiting' || field == 'batchUpperLimiting') {
var upperLimit = formRef.value.formModel.batchUpperLimiting
var lowLimit = formRef.value.formModel.batchLowLimiting
if (parseInt(upperLimit) <= parseInt(lowLimit)) {
message.warning("批量上限须大于批量下限")
message.warning('批量上限须大于批量下限')
}
}
}
@ -295,5 +327,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await SampleCodeApi.importTemplate()
})
</script>

173
src/views/qms/samplingProcess/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SamplingProcess.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="SamplingProcess.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -114,7 +122,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:sampling-process:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -127,16 +135,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -152,17 +166,25 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:sampling-process:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:sampling-process:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:sampling-process:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:sampling-process:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:sampling-process:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:sampling-process:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:sampling-process:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -177,16 +199,19 @@ const basicFormRef = ref()
// form
const formsSuccess = async (formType, data) => {
var isHave = SamplingProcess.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await SamplingProcessApi.createSamplingProcess(data)
message.success(t('common.createSuccess'))
@ -195,7 +220,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -265,74 +294,85 @@ const importSuccess = () => {
}
const updateFormFields = (sampleType, formRef) => {
let sampleQtyLabel = '';
let sampleQtyDisabled = false;
let sampleProgCodeDisabled = true;
let sampleQtyRequired = false;
let sampleProgCodeRequired = false;
let sampleQtyLabel = ''
let sampleQtyDisabled = false
let sampleProgCodeDisabled = true
let sampleQtyRequired = false
let sampleProgCodeRequired = false
switch (sampleType) {
case '1':
sampleQtyLabel = '样品份数';
sampleQtyDisabled = true;
sampleQtyRequired = false;
SamplingProcessRules.sampleQty = [{ required: false, message: '该项为必填项', trigger: 'blur'}]
break;
sampleQtyLabel = '样品份数'
sampleQtyDisabled = true
sampleQtyRequired = false
SamplingProcessRules.sampleQty = [
{ required: false, message: '该项为必填项', trigger: 'blur' }
]
break
case '2':
sampleQtyLabel = '样品份数(%)';
sampleQtyDisabled = false;
sampleQtyRequired = true;
SamplingProcessRules.sampleQty = [{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur'},{validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}]
sampleQtyLabel = '样品份数(%)'
sampleQtyDisabled = false
sampleQtyRequired = true
SamplingProcessRules.sampleQty = [
{ required: true, message: '该项为必填项', trigger: 'blur' },
{ validator: validatePercent, message: '百分比范围 0 ~ 100', trigger: 'blur' },
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
]
break;
break
case '3':
sampleQtyLabel = '样品份数';
sampleQtyDisabled = false;
sampleQtyRequired = true;
SamplingProcessRules.sampleQty = [{ required: true, message: '该项为必填项', trigger: 'blur' },{validator:validateInteger, message: '样品份数必须为正整数', trigger: 'blur'}]
sampleQtyLabel = '样品份数'
sampleQtyDisabled = false
sampleQtyRequired = true
SamplingProcessRules.sampleQty = [
{ required: true, message: '该项为必填项', trigger: 'blur' },
{ validator: validateInteger, message: '样品份数必须为正整数', trigger: 'blur' }
]
break;
break
case '4':
sampleQtyLabel = '样品份数';
sampleQtyDisabled = true;
sampleQtyRequired = false;
sampleProgCodeDisabled = false;
sampleProgCodeRequired = true;
SamplingProcessRules.sampleQty = [{ required: false, message: '该项为必填项', trigger: 'blur'}]
break;
sampleQtyLabel = '样品份数'
sampleQtyDisabled = true
sampleQtyRequired = false
sampleProgCodeDisabled = false
sampleProgCodeRequired = true
SamplingProcessRules.sampleQty = [
{ required: false, message: '该项为必填项', trigger: 'blur' }
]
break
default:
break;
break
}
SamplingProcess.allSchemas.formSchema.forEach(item => {
SamplingProcess.allSchemas.formSchema.forEach((item) => {
if (item.field === 'sampleQty') {
item.label = sampleQtyLabel;
item.componentProps.disabled = sampleQtyDisabled;
item.label = sampleQtyLabel
item.componentProps.disabled = sampleQtyDisabled
}
if (item.field === 'sampleProgCode') {
item.componentProps.disabled = sampleProgCodeDisabled;
item.componentProps.disabled = sampleProgCodeDisabled
}
});
})
SamplingProcessRules.sampleQty[0].required = sampleQtyRequired;
SamplingProcessRules.sampleProgCode[0].required = sampleProgCodeRequired;
SamplingProcessRules.sampleQty[0].required = sampleQtyRequired
SamplingProcessRules.sampleProgCode[0].required = sampleProgCodeRequired
formRef.value.setValues({
sampleQty: '',
sampleProgCode: '',
});
};
sampleProgCode: ''
})
}
const openForm = async (type, row) => {
basicFormRef.value.open(type, row);
updateFormFields(row.sampleType, basicFormRef);
};
basicFormRef.value.open(type, row)
updateFormFields(row.sampleType, basicFormRef)
}
const onChange = async (field, value, formRef) => {
if (field === 'sampleType') {
updateFormFields(value, formRef);
updateFormFields(value, formRef)
}
}
};
//
const searchFormClick = (searchData) => {
@ -345,11 +385,10 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await SamplingProcessApi.importTemplate()
})
</script>

76
src/views/qms/samplingScheme/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SamplingScheme.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="SamplingScheme.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -54,7 +62,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SamplingScheme.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/sampling-scheme/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/sampling-scheme/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -104,7 +117,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:sampling-scheme:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -117,16 +130,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -142,21 +161,29 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:sampling-scheme:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:sampling-scheme:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:sampling-scheme:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:sampling-scheme:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:sampling-scheme:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:sampling-scheme:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:sampling-scheme:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
handleDisable(row.id)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -170,16 +197,18 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
var isHave = SamplingScheme.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await SamplingSchemeApi.createSamplingScheme(data)
message.success(t('common.createSuccess'))
@ -188,7 +217,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -275,5 +308,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await SamplingSchemeApi.importTemplate()
})
</script>

58
src/views/qms/selectedProject/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SelectedProject.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="SelectedProject.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -54,7 +58,12 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SelectedProject.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/selected-project/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/qms/selected-project/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template>
<script setup lang="ts">
@ -104,7 +113,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:selectedProject:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -117,16 +126,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -134,14 +149,16 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:selectedProject:update' }), //
defaultButtons.mainListDeleteBtn({hasPermi:'qms:selectedProject:delete'}), //
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:selectedProject:delete' }) //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
@ -155,16 +172,18 @@ const openForm = (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
var isHave = SelectedProject.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await SelectedProjectApi.createSelectedProject(data)
message.success(t('common.createSuccess'))
@ -173,7 +192,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -240,5 +263,4 @@ onMounted(async () => {
getList()
importTemplateData.templateUrl = await SelectedProjectApi.importTemplate()
})
</script>

125
src/views/qms/selectedSet/index.vue

@ -1,7 +1,11 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SelectedSet.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="SelectedSet.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
@ -16,7 +20,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -33,7 +38,10 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -103,7 +111,7 @@ import * as DictDataApi from '@/api/system/dict/dict.data'
import component from 'virtual:svg-icons-register'
import * as DictTypeApi from '@/api/system/dict/dict.type'
import { checkPermi } from '@/utils/permission'
import ImportForm from "../../../components/ImportForm/src/ImportForm.vue";
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'
@ -150,7 +158,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'qms:selected-set:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -163,16 +171,22 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
@ -188,17 +202,25 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({ hasPermi: 'qms:selected-set:update' }),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:selected-set:enable'}),
defaultButtons.mainListDisableBtn({ hide: isShowMainButton(row, ['TRUE']), hasPermi: 'qms:selected-set:disable' }),
defaultButtons.mainListDeleteBtn({hasPermi:'qms:selected-set:delete'}), //
defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'qms:selected-set:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'qms:selected-set:disable'
}),
defaultButtons.mainListDeleteBtn({ hasPermi: 'qms:selected-set:delete' }) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'edit') {
//
editForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
@ -215,7 +237,7 @@ const openForm = (type: string, row?: any) => {
}
const editForm = async (type: string, row?: any) => {
tableData.value = []
SelectedProjectApi.getSelectedProjectNoPage({masterId:row.id}).then(res=>{
SelectedProjectApi.getSelectedProjectNoPage({ masterId: row.id }).then((res) => {
tableData.value = res
})
basicFormRef.value.open(type, row)
@ -224,16 +246,18 @@ const editForm = async (type: string, row?: any) => {
// form
const formsSuccess = async (formType, data) => {
var isHave = SelectedSet.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
return item.field === 'activeTime' || item.field === 'expireTime'
})
if (isHave) {
if (data.activeTime && data.expireTime && data.activeTime >= data.expireTime) {
message.error('失效时间要大于生效时间')
return;
return
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (data.activeTime == 0) data.activeTime = null
if (data.expireTime == 0) data.expireTime = null
try {
basicFormRef.value.formLoading = true
if (formType === 'create') {
await SelectedSetApi.createSelectedSet(data)
message.success(t('common.createSuccess'))
@ -242,7 +266,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
basicFormRef.value.formLoading = false
getList()
} finally {
basicFormRef.value.formLoading = false
}
}
/** 详情操作 */
@ -320,7 +348,6 @@ const searchFormClick = (searchData) => {
getList() //
}
const tableFormKeys = {}
SelectedProject.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
@ -335,10 +362,9 @@ const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
const emptyFlag = validateDetailEmpty(tableData.value);
const emptyFlag = validateDetailEmpty(tableData.value)
if (!emptyFlag) {
message.alertWarning('明细不能为空')
basicFormRef.value.formLoading = false
@ -366,35 +392,34 @@ const submitForm = async (formType, data) => {
}
}
const validateDetailEmpty = (data) => {
const codes = data.map(item => item.stage);
const codes = data.map((item) => item.stage)
if (codes.length == 0) {
return false;
return false
}
return true;
return true
}
const validateNotRepetition = (data) => {
// dictionaryTypeAndCode
const codes = data.map(item => item.dictionaryValue);
const codes = data.map((item) => item.dictionaryValue)
// Set dictionaryTypeAndCode
const uniqueCodes = new Set(codes);
const uniqueCodes = new Set(codes)
// Set
if (codes.length > uniqueCodes.size) {
return false; // false
return false // false
}
return true; // true
};
return true // true
}
const detailValidate = (formType, data) => {
let tag = true;
existValue.value.forEach(item=>{
let tag = true
existValue.value.forEach((item) => {
if (data.dictionaryValue == item.dictionaryValue) {
message.warning("选定集字典项不能重复!")
tag = false;
message.warning('选定集字典项不能重复!')
tag = false
}
})
return tag
@ -405,40 +430,32 @@ const detailOpenForm = (type, row, masterParmas) => {
masterId: masterParmas.masterId
}
if (type == 'create') {
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
SelectedProjectApi.getSelectedProjectNoPage(param).then((res) => {
if (res.length > 0) {
existValue.value = res
}
})
} else if ('update') {
SelectedProjectApi.getSelectedProjectNoPage(param).then(res => {
SelectedProjectApi.getSelectedProjectNoPage(param).then((res) => {
if (res.length > 0) {
existValue.value = res.filter(item=>{
existValue.value = res.filter((item) => {
return item?.id != row.id
})
}
})
}
}
const detailBasiFormOnChange = (field, val, detailFormRef) => {}
const detailBasiFormOnChange = (field,val,detailFormRef) => {
}
const formSelectChange = (a,b,c,d) => {
}
const formSelectChange = (a, b, c, d) => {}
/** 初始化 **/
onMounted(async () => {
  tableObject.params = {
    available: true
  }
tableObject.params = {
available: true
}
getList()
importTemplateData.templateUrl = await SelectedSetApi.importTemplate()
})
</script>

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

@ -119,6 +119,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple: true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
@ -147,6 +148,7 @@ export const Businesstype = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple: true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本

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

@ -324,7 +324,13 @@ const onChange = (field, value)=>{
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
if(formField == 'outAreaCodes'||formField == 'inAreaCodes'){
//
setV[formField] = val.map(item=>(item[searchField])).join(',')
}else{
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}

3
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -765,7 +765,8 @@ const labelPrint = async (row) => {
item.width = item.table?.width || 150
})
tableObjectPrint.tableList.forEach(item=>{
item.fromBatch = item.batch
item.downItemCode = item.itemCode
item.toBatch = item.batch
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
}

44
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -742,7 +742,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const RelegateRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
field: 'downItemCode',
sort: 'custom',
table: {
width: 150
@ -756,49 +756,9 @@ export const RelegateRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>(
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '批次',
field: 'fromBatch',
field: 'toBatch',
sort: 'custom',
table: {
width: 150

147
src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/customerreturnJobMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
/**
* @returns {Array} 退
*/
export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
export const CustomerreturnJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -13,7 +17,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
fixed: 'left'
},
isSearch: true,
isSearch: true
},
{
label: '状态',
@ -25,7 +29,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '申请单号',
@ -35,7 +39,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180
},
isTable: true,
isSearch: true,
isSearch: true
},
{
label: '发货记录单号',
@ -43,7 +47,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 180
},
}
},
{
label: '发货计划单号',
@ -52,8 +56,57 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: true,
isTable: true
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单号', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '客户代码',
@ -61,7 +114,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '客户月台代码',
@ -70,8 +123,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '收货月台',
@ -80,8 +132,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '承运商',
@ -90,7 +141,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '运输方式',
@ -100,7 +151,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '车牌号',
@ -109,8 +160,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '申请时间',
@ -129,9 +179,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '要求截止时间',
@ -150,9 +200,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '过期时间',
@ -171,9 +221,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -182,7 +232,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到仓库代码',
@ -191,7 +241,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -202,7 +252,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区类型范围',
@ -213,7 +263,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
// {
// label: '状态',
@ -230,7 +280,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到库区代码范围',
@ -239,7 +289,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到月台代码',
@ -248,7 +298,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '优先级',
@ -259,7 +309,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false,
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -271,7 +321,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false,
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -281,7 +331,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '部门',
@ -290,7 +340,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '备注',
@ -299,7 +349,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '自动完成',
@ -508,9 +558,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '承接人',
@ -519,7 +569,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '完成时间',
@ -538,9 +588,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '完成人',
@ -549,7 +599,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '创建时间',
@ -568,9 +618,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '创建者',
@ -579,7 +629,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: true
},
{
label: '最后更新时间',
@ -598,9 +648,9 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '最后更新者',
@ -609,7 +659,7 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '操作',
@ -619,9 +669,10 @@ export const CustomerreturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 120,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const CustomerreturnJobMainRules = reactive({

125
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
/**
* @returns {Array} 退
*/
export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const CustomerreturnRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -27,7 +31,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '申请单号',
@ -46,7 +50,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
isTable: false
},
{
label: '发货记录单号',
@ -54,7 +58,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 180
},
}
},
{
label: '发货计划单号',
@ -63,7 +67,57 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: true,
isTable: true
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单号', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '客户代码',
@ -81,7 +135,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '承运商',
@ -90,7 +144,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '运输方式',
@ -99,7 +153,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '车牌号',
@ -108,7 +162,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '申请时间',
@ -127,9 +181,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '截止时间',
@ -148,9 +202,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '执行时间',
@ -169,9 +223,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
@ -191,9 +245,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -202,7 +256,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到仓库代码',
@ -211,7 +265,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -222,7 +276,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -231,7 +285,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到库区类型范围',
@ -242,7 +296,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区代码范围',
@ -251,7 +305,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到月台代码',
@ -260,7 +314,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '出库事务类型',
@ -269,7 +323,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '入库事务类型',
@ -278,7 +332,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '业务类型',
@ -287,7 +341,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '部门',
@ -296,7 +350,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '接口类型',
@ -307,7 +361,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '备注',
@ -316,7 +370,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '创建时间',
@ -335,9 +389,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '创建者',
@ -346,7 +400,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: true
},
// {
// label: '代码',
@ -375,8 +429,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
}
},
]))
}
])
)
//表单校验
export const CustomerreturnRecordMainRules = reactive({

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

@ -7,7 +7,10 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import {
DeliverRecordMain,
DeliverRecordDetail
} from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '../../../basicDataManage/customerManage/customer/customer.data'
@ -28,9 +31,12 @@ import * as CustomerreturnRequestApi from '@/api/wms/customerreturnRequestMain'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as InspectionQ1Api from '@/api/qms/inspectionQ1'
import { Q1 } from '@/views/qms/inspectionQ1/inspectionQ1.data'
const { t } = useI18n() // 国际化
const dateTime = new Date().getTime()
console.log(dateTime);
console.log(dateTime)
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
@ -43,6 +49,7 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { fa } from 'element-plus/es/locale'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
@ -53,7 +60,8 @@ const userDeptArray:any = [userDept]
* @returns {Array} 退
*/
export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const CustomerreturnRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -63,7 +71,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
isForm: false,
isSearch: true,
isSearch: true
},
{
label: '状态',
@ -76,7 +84,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true,
isSearch: true
},
{
label: '客户代码',
@ -96,19 +104,23 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -131,14 +143,15 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchAllSchemas: DeliverRecordMain.allSchemas, // 查询弹窗所需类
searchDetailSchemas: DeliverRecordDetail.allSchemas, // 查询弹窗所需类
searchPage: DeliverRecordDetailApi.getDeliverRecordDetailPage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'createTime', // 查询列表中字段
value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, // 指查询具体值
value: dateTime - 30 * 24 * 60 * 60 * 1000 + ',' + dateTime, // 指查询具体值
action: 'betweeen', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
@ -154,14 +167,16 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}
],
verificationParams: [{
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -181,6 +196,56 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: 'Q1通知单号',
field: 'q1Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q1通知单号', // 查询弹窗标题
searchAllSchemas: Q1.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ1Api.getQ1Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
},
{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '客户月台代码',
field: 'customerDockCode',
@ -199,7 +264,8 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '客户月台信息', // 查询弹窗标题
searchAllSchemas: Customerdock.allSchemas, // 查询弹窗所需类
searchPage: CustomerdockApi.pageCustomerCodeToCustomerDockReceiving, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
@ -209,15 +275,18 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -239,19 +308,23 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '承运商信息', // 查询弹窗标题
searchAllSchemas: Carrier.allSchemas, // 查询弹窗所需类
searchPage: CarrierApi.getCarrierPage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -263,8 +336,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isTable: false
},
{
label: '车牌号',
@ -273,8 +345,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false,
isTable: false
},
{
label: '申请时间',
@ -294,10 +365,10 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isForm: false
},
{
label: '截止时间',
@ -317,9 +388,9 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -329,7 +400,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '到仓库代码',
@ -339,7 +410,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '到月台代码',
@ -349,7 +420,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '从库区类型范围',
@ -361,7 +432,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '到库区类型范围',
@ -373,7 +444,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '从库区代码范围',
@ -383,7 +454,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '到库区代码范围',
@ -393,7 +464,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '业务类型',
@ -409,7 +480,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '部门',
@ -547,7 +618,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false
@ -580,7 +651,7 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false
@ -603,9 +674,10 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 300,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const CustomerreturnRequestMainRules = reactive({

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

@ -200,6 +200,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
} else {
const setV = {}
if (formField == 'customerCode') {
setV['q1Number'] = ''
}
if(formField == 'deliverRecordNumber') {
setV['deliverRecordNumber'] = val[0]['number']
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']

150
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -2,10 +2,14 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
*/
export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ScrapJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -14,7 +18,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
fixed: 'left'
},
isSearch: true,
isSearch: true
},
{
label: '状态',
@ -26,7 +30,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '申请单号',
@ -35,7 +39,52 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '申请时间',
@ -53,9 +102,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '要求截止时间',
@ -73,9 +122,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '过期时间',
@ -93,9 +142,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -103,7 +152,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -111,7 +160,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区类型范围',
@ -122,7 +171,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区类型范围',
@ -133,7 +182,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
// {
// label: '状态',
@ -151,7 +200,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -162,7 +211,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -171,7 +220,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '部门',
@ -179,7 +228,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '备注',
@ -187,7 +236,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '自动完成',
@ -204,9 +253,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许修改库位',
@ -223,9 +272,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许修改数量',
@ -242,9 +291,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许大于推荐数量',
@ -261,9 +310,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许小于推荐数量',
@ -280,9 +329,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许修改库存状态',
@ -299,9 +348,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许连续扫描',
@ -318,9 +367,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许部分完成',
@ -337,9 +386,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许修改批次',
@ -356,9 +405,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '允许修改箱码',
@ -375,9 +424,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '承接时间',
@ -395,9 +444,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '承接人',
@ -405,7 +454,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '完成时间',
@ -423,9 +472,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '完成人',
@ -433,7 +482,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '创建时间',
@ -451,7 +500,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTable: false
@ -482,9 +531,9 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '最后更新者',
@ -493,7 +542,7 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '操作',
@ -503,9 +552,10 @@ export const ScrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 120,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const ScrapJobMainRules = reactive({

100
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -2,10 +2,14 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
*/
export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ScrapRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -34,6 +38,51 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '申请时间',
field: 'requestTime',
@ -50,9 +99,9 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '截止时间',
@ -70,9 +119,9 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '执行时间',
@ -90,9 +139,9 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
@ -111,9 +160,9 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -121,7 +170,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区类型范围',
@ -132,7 +181,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -140,7 +189,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '出库事务类型',
@ -148,7 +197,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '入库事务类型',
@ -156,7 +205,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '业务类型',
@ -164,7 +213,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '部门',
@ -172,7 +221,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '接口类型',
@ -183,7 +232,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '备注',
@ -191,7 +240,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '创建时间',
@ -210,9 +259,9 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '创建者',
@ -221,7 +270,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
table: {
width: 150
},
}
},
{
@ -244,7 +293,7 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
@ -280,9 +329,10 @@ export const ScrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
]))
}
}
])
)
//表单校验
export const ScrapRecordMainRules = reactive({

116
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -5,8 +5,11 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化
@ -31,7 +34,8 @@ const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ScrapRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -41,7 +45,52 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
isForm: false,
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
@ -79,10 +128,10 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isForm: false
},
{
label: '截止时间',
@ -101,9 +150,9 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从仓库代码',
@ -121,19 +170,23 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
@ -145,19 +198,23 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -172,7 +229,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: true,
isForm: false,
isForm: false
},
{
label: '从库区代码范围',
@ -181,7 +238,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '业务类型',
@ -196,7 +253,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
isForm: false,
isForm: false
},
{
label: '部门',
@ -230,7 +287,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
table: {
width: 150
},
}
},
{
label: '自动提交',
@ -333,11 +390,11 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '创建者',
@ -347,7 +404,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '最后更新时间',
@ -366,11 +423,11 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '最后更新者',
@ -380,7 +437,7 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '操作',
@ -390,9 +447,10 @@ export const ScrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 300,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const ScrapRequestMainRules = reactive({

18
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -279,15 +279,15 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
isTable: false,
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: false
// },
{
label: '业务类型',
field: 'businessType',

6
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -197,9 +197,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty'])
}
if(item.field == 'batch') {
item.tableForm.disabled = false
}
// if(item.field == 'batch') {
// item.tableForm.disabled = false
// }
})
}
} else if(formField == 'workStationCode') {

122
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -21,7 +21,8 @@ const { t } = useI18n() // 国际化
/**
* @returns {Array} 退
*/
export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionreturnRequestDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCode',
@ -40,16 +41,19 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
}
]
}
},
tableForm: {
@ -59,17 +63,20 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
},
}
]
}
},
{
label: '工位代码',
@ -87,21 +94,25 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true
},{
},
{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true
}]
}
]
}
},
tableForm: {
@ -113,34 +124,39 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true
},{
},
{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true
}],
}
],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
isRepeat: true, //是否可以重复添加该条数据
verificationParams: [{
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
isFormModel: true
}
] // 失去焦点校验参数
}
},
{
@ -159,16 +175,19 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'locationCode',
value: 'fromLocationCode',
message: '请填写从库位代码!',
isMainValue: true
},{
},
{
key: 'inventoryStatus',
value: 'OK',
isMainValue: false
}]
}
]
}
},
tableForm: {
@ -189,12 +208,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'inventoryStatus',
value: 'OK',
isMainValue: false
},{
},
{
key: 'businessType',
value: 'ReturnToHold', // 隔离退料
isMainValue: false
}]
},
}
]
}
},
// {
// label: '包装号',
@ -236,7 +257,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '物料描述1',
@ -247,7 +268,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '物料描述2',
@ -258,7 +279,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '批次',
@ -268,11 +289,11 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
tableForm: {
disabled: false
disabled: true
},
form: {
componentProps: {
disabled: false
disabled: true
}
}
},
@ -363,7 +384,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '到货主',
@ -374,7 +395,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '项目代码',
@ -385,7 +406,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
},
hiddenInMain: true,
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '单据号',
@ -409,7 +430,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 150
},
hiddenInMain: true,
hiddenInMain: true
},
{
label: '创建者',
@ -441,12 +462,12 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTableForm: false,
isForm: false,
isTable: true,
isTable: true
},
{
label: '包装规格',
@ -465,16 +486,19 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!',
isMainValue: true
}]
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
@ -485,16 +509,19 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'itemCode',
value: 'itemCode',
message: '请先选择物料代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
}
]
}
}
},
@ -551,7 +578,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTableForm: false,
@ -577,9 +604,10 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 250,
fixed: 'right'
},
isTableForm:false,
isTableForm: false
}
]))
])
)
//表单校验
export const ProductionreturnRequestDetailRules = reactive({

104
src/views/wms/issueManage/productionscrap/productionscrapRecordMain/productionscrapRecordMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array} 退
*/
export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionscrapRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -24,13 +28,58 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '出库事务类型',
@ -39,7 +88,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '入库事务类型',
@ -48,7 +97,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '执行时间',
@ -67,9 +116,9 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
@ -89,9 +138,9 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '申请时间',
@ -110,9 +159,9 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '截止时间',
@ -131,9 +180,9 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '部门',
@ -142,7 +191,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '接口类型',
@ -153,7 +202,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '业务类型',
@ -162,7 +211,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '备注',
@ -171,7 +220,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
// {
// label: '创建者',
@ -223,7 +272,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
@ -244,7 +293,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -255,7 +304,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -264,7 +313,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到仓库代码',
@ -273,7 +322,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到库区类型范围',
@ -284,7 +333,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区代码范围',
@ -293,7 +342,7 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '是否可用',
@ -314,8 +363,9 @@ export const ProductionscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
}
},
]))
}
])
)
//表单校验
export const ProductionscrapRecordMainRules = reactive({
@ -552,6 +602,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
@ -561,6 +612,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
@ -570,6 +622,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTable:false,
hiddenInMain: true,
},
{
@ -579,6 +632,7 @@ export const ProductionscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 180
},
isTable:false,
hiddenInMain: true,
},
{

134
src/views/wms/issueManage/productionscrap/productionscrapRequestMain/productionscrapRequestMain.data.ts

@ -23,6 +23,9 @@ import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplie
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -44,7 +47,8 @@ const queryParams = {
/**
* @returns {Array} 退
*/
export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductionscrapRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -54,7 +58,52 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
fixed: 'left'
},
isForm: false,
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
@ -93,21 +142,25 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
},
{
label: '生产线代码',
@ -126,24 +179,29 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
},
tableForm: {
@ -153,17 +211,20 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true
}]
},
}
]
}
},
{
label: '申请时间',
@ -183,10 +244,10 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isForm: false
},
{
label: '截止时间',
@ -206,9 +267,9 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从库区类型范围',
@ -220,7 +281,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '到库区类型范围',
@ -233,7 +294,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '从库区代码范围',
@ -243,7 +304,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '到库区代码范围',
@ -253,7 +314,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '从仓库代码',
@ -263,7 +324,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '到仓库代码',
@ -273,7 +334,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '备注',
@ -292,7 +353,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '部门',
@ -336,7 +397,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
disabled: true
}
}
},
@ -357,7 +418,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
disabled: true
}
}
},
@ -378,7 +439,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
disabled: true
}
}
},
@ -399,7 +460,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
disabled: true
}
}
},
@ -420,7 +481,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isTable: false,
@ -454,7 +515,7 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false
@ -478,9 +539,10 @@ export const ProductionscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 300,
fixed: 'right'
},
isTable: false,
isTable: false
}
]))
])
)
//表单校验
export const ProductionscrapRequestMainRules = reactive({

6
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -220,7 +220,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version
}
})
}else if(formField == 'productionLineCode'){
}else if(formField == 'workStationCode'){
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
@ -627,7 +627,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '制品收货申请主导入模版.xlsx'
templateTitle: '隔离报工申请导入模版.xlsx'
})
//

72
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -134,6 +134,74 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true,
multiple: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码',
searchField: 'code',
searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}],
verificationPage: ProductionlineApi.getProductionlineByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true,
searchListPlaceholder: '请选择生产线代码',
searchField: 'code',
searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '班组',
field: 'team',
@ -521,6 +589,9 @@ export const ProductreceiptRequestMainRules = reactive({
// shift: [
// { required: true, message: '请选择班次代码', trigger: 'change' }
// ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
@ -552,6 +623,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
isTableForm: false,
tableForm:{
disabled:true,
multiple: true,

7
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -240,6 +240,8 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '从库区类型范围',
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
@ -247,6 +249,7 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
sort: 'custom',
isForm:false,
isTable:false,
@ -358,6 +361,8 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '入库库存状态范围',
field: 'inInventoryStatuses',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
@ -365,6 +370,8 @@ export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '出库库存状态范围',
field: 'outInventoryStatuses',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,

3
src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts

@ -143,6 +143,8 @@ export const ProductredressRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false
@ -249,6 +251,7 @@ export const ProductredressRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '到库区类型范围',
field: 'toAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
sort: 'custom',
table: {
width: 150

118
src/views/wms/productionManage/productscrap/productscrapJobMain/productscrapJobMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
*/
export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductscrapJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -13,7 +17,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
fixed: 'left'
},
isSearch: true,
isSearch: true
},
{
label: '申请单号',
@ -22,7 +26,52 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '从仓库代码',
@ -30,7 +79,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '申请时间',
@ -48,9 +97,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '要求截止时间',
@ -68,9 +117,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '状态',
@ -82,7 +131,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '过期时间',
@ -100,9 +149,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '最后更新时间',
@ -120,9 +169,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '最后更新者',
@ -130,7 +179,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
// {
// label: '状态',
@ -144,23 +193,23 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '优先级',
field: 'priority',
form: {
component: 'InputNumber',
component: 'InputNumber'
},
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '优先级增量',
field: 'priorityIncrement',
form: {
component: 'InputNumber',
component: 'InputNumber'
},
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '部门',
@ -168,7 +217,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '承接人',
@ -176,7 +225,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '承接时间',
@ -194,9 +243,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '完成人',
@ -204,7 +253,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '完成时间',
@ -222,9 +271,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '从库区类型范围',
@ -235,7 +284,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区类型范围',
@ -246,7 +295,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '业务类型',
@ -254,7 +303,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '备注',
@ -262,7 +311,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '创建时间',
@ -280,9 +329,9 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '创建者',
@ -290,7 +339,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -298,7 +347,7 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '自动完成',
@ -498,9 +547,10 @@ export const ProductscrapJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 120,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const ProductscrapJobMainRules = reactive({

101
src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

@ -1,11 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
/**
* @returns {Array}
*/
export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductscrapRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -25,6 +28,51 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
field: 'status',
@ -35,7 +83,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '车间',
@ -77,7 +125,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
show: false
},
isTable: false,
isTable: false
},
{
label: '出库事务类型',
@ -86,7 +134,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '入库事务类型',
@ -95,7 +143,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '执行时间',
@ -114,9 +162,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
@ -136,9 +184,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '申请时间',
@ -157,9 +205,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '截止时间',
@ -178,9 +226,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '部门',
@ -189,7 +237,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '接口类型',
@ -200,7 +248,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '业务类型',
@ -209,7 +257,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '备注',
@ -218,7 +266,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '创建者',
@ -227,7 +275,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: true
},
{
label: '创建时间',
@ -246,9 +294,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '最后更新时间',
@ -270,7 +318,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
@ -300,7 +348,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
show: false
},
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -311,7 +359,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -320,7 +368,7 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '是否可用',
@ -341,8 +389,9 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE'
}
}
},
]))
}
])
)
//表单校验
export const ProductscrapRecordMainRules = reactive({

25
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -97,6 +97,8 @@
@searchTableSuccess="searchTableBomSuccess"
:footButttondata="footButttondata"
@footButtonClick="buttonBaseClickBom"
@inputNumberChange="inputNumberChange"
/>
<!-- 导入 -->
@ -229,13 +231,18 @@ const banchBomPage = async (fromLocationCode,item) => {
}
// tableform
const buttonOperationClick = async (row, label, index)=> {
const buttonOperationClick = async (row, label, index,isSave = false)=> {
console.log('buttonOperationClick',row, label, index)
if (row.itemCode == '') {
if(!isSave){
message.warning('请选择物料代码!')
}
return
}
if(row.qty <= 0){
if(!isSave){
message.warning('数量需要大于0!')
}
return
}
detatableDataBom.params.itemCode = row.itemCode
@ -244,7 +251,7 @@ const buttonOperationClick = async (row, label, index)=> {
bomModelVisible.value = true
await getDetailListBom()
console.log(row.fromLocationCode);
detatableDataBom.tableList.forEach(async item => {
detatableDataBom.tableList.forEach(async (item) => {
console.log(333,item)
ProdcutscrapBomScrap.allSchemas.tableFormColumns.map((bomItem) => {
if (bomItem.field == 'batch') {
@ -277,8 +284,12 @@ const buttonOperationClick = async (row, label, index)=> {
const obj = await banchBomPage(row.fromLocationCode, item)
item.batch = obj.batch
})
if(isSave){
buttonBaseClickBom('save')
}else{
detailBomRef.value.open('create', row, null,'viewDetail')//
}
}
//
const searchTableBomSuccess = (formField, searchField, val, formRef, type, row ) => {
@ -358,10 +369,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
}
})
}else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version']
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
} else {
row[formField] = val[0][searchField]
}
@ -699,12 +713,14 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
console.log('tableData.value',tableData.value)
data.subList = tableData.value //
// bom
let childListRs = true
//
tableData.value.forEach((item) => {
if (!item.childList) {
if (!item.childList||item.childList.length==0) {
childListRs = false
}
item.productionLineCode = data.productionLineCode
@ -763,6 +779,9 @@ const inputNumberChange = (field, index, row, val) => {
if(field == 'qty' || field == 'singlePrice'){
row.amount = row.qty * row.singlePrice
}
if(field == 'qty'){
buttonOperationClick(row,'Bom',index,true)
}
}
const qtyOnChange = (field,val) =>{

195
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -4,26 +4,25 @@ import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {Team} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import * as TeamApi from "@/api/wms/team";
import {Shift} from "@/views/wms/basicDataManage/orderManage/shift/shift.data";
import * as ShiftApi from "@/api/wms/shift";
import {
Productionline
} from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data";
import * as ProductionlineApi from "@/api/wms/productionline";
import {
Workstation
} from "@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data";
import * as WorkstationApi from "@/api/wms/workstation";
import {Process} from "@/views/wms/basicDataManage/factoryModeling/process/process.data";
import * as ProcessApi from "@/api/wms/process";
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as WorkshopApi from '@/api/wms/workshop'
import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data'
import * as TeamApi from '@/api/wms/team'
import { Shift } from '@/views/wms/basicDataManage/orderManage/shift/shift.data'
import * as ShiftApi from '@/api/wms/shift'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as ProcessApi from '@/api/wms/process'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as BomApi from '@/api/wms/bom'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3'
import { Q3 } from '@/views/qms/inspectionQ3/inspectionQ3.data'
const { t } = useI18n() // 国际化
@ -45,11 +44,11 @@ const queryParams = {
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
/**
* @returns {Array}
*/
export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const ProductscrapRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -59,7 +58,52 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
isForm: false,
isSearch: true
},
{
label: 'Q3通知单号',
field: 'q3Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q3通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q3通知单号', // 查询弹窗标题
searchAllSchemas: Q3.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ3Api.getQ3Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '状态',
@ -98,19 +142,23 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '车间信息',
searchAllSchemas: Workshop.allSchemas,
searchPage: WorkshopApi.getWorkshopPage,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -129,24 +177,29 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
@ -158,24 +211,29 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -196,19 +254,23 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '班组信息',
searchAllSchemas: Team.allSchemas,
searchPage: TeamApi.getTeamPage,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -229,19 +291,23 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '班次信息',
searchAllSchemas: Shift.allSchemas,
searchPage: ShiftApi.getShiftPage,
searchCondition: [{
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -266,7 +332,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '从库区代码范围',
@ -277,7 +343,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false,
isSearch: true,
isForm: false,
isForm: false
},
{
label: '业务类型',
@ -293,7 +359,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
isForm: false,
isForm: false
},
{
@ -314,10 +380,10 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isForm: false
},
{
label: '创建者',
@ -327,7 +393,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTable: false,
isForm: false,
isForm: false
},
{
label: '申请时间',
@ -347,10 +413,10 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isForm: false
},
// {
// label: '截止时间',
@ -426,7 +492,7 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false
@ -533,9 +599,10 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 300,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const ProductscrapRequestMainRules = reactive({
@ -858,6 +925,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
type: 'InputNumber',
default:1,
min: 0,
precision: 6
}
@ -1176,6 +1244,14 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
]))
function validateQty(rule, value, callback) {
if (value>0) {
callback()
}else{
callback(new Error('数量必须大于0'))
}
}
//表单校验
export const ProductscrapRequestDetailRules = reactive({
@ -1185,6 +1261,9 @@ export const ProductscrapRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
qty:[
{ validator:validateQty, message: '数量必须大于0', trigger: 'blur'}
],
// processCode: [
// { required: true, message: '请选择工序代码', trigger: 'change' }
// ],

127
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
/**
* @returns {Array} 退
*/
export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchasereturnJobMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -14,7 +18,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
isSearch: true,
sortSearchDefault: 1,
sortSearchDefault: 1
},
{
label: '申请单号',
@ -23,7 +27,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
isTable: false
},
{
label: '采购收货记录单号',
@ -54,8 +58,56 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
isTable: false,
isTable: false
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: true,
sortTableDefault: 5,
sortSearchDefault: 5,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
@ -74,7 +126,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '承运商',
@ -83,7 +135,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '运输方式',
@ -92,7 +144,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '车牌号',
@ -101,7 +153,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从仓库代码',
@ -110,7 +162,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到仓库代码',
@ -119,7 +171,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -131,7 +183,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区类型范围',
@ -142,7 +194,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -151,7 +203,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
table: {
width: 150
},
}
},
{
label: '到库区代码范围',
@ -160,7 +212,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
table: {
width: 150
},
}
},
{
label: '从月台代码',
@ -169,7 +221,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
table: {
width: 150
},
}
},
{
label: '申请时间',
@ -188,9 +240,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '要求截止时间',
@ -209,9 +261,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '业务类型',
@ -220,7 +272,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '状态',
@ -259,9 +311,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '优先级',
@ -272,7 +324,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false,
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -284,7 +336,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false,
form: {
component: 'InputNumber',
component: 'InputNumber'
}
},
{
@ -294,7 +346,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '承接人',
@ -303,7 +355,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '承接时间',
@ -322,9 +374,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '完成人',
@ -333,7 +385,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '完成时间',
@ -352,9 +404,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '自动完成',
@ -553,7 +605,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '创建者',
@ -562,7 +614,7 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: true,
isTable: true
},
{
label: '创建时间',
@ -581,9 +633,9 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '操作',
@ -593,9 +645,10 @@ export const PurchasereturnJobMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 120,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const PurchasereturnJobMainRules = reactive({

100
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -1,10 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
/**
* @returns {Array} 退
*/
export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchasereturnRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -44,8 +48,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isSearch: true,
sortTableDefault: 3,
sortSearchDefault: 5,
}, {
sortSearchDefault: 5
},
{
label: 'qad采购退货记录单号',
field: 'qadPurchaseReturnRecordCode',
sort: 'custom',
@ -76,6 +81,52 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTable: false
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: true,
sortTableDefault: 4,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
@ -168,7 +219,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '到库区类型范围',
@ -179,7 +230,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '从库区代码范围',
@ -188,7 +239,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '到库区代码范围',
@ -197,7 +248,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '执行时间',
@ -216,9 +267,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '生效日期',
@ -238,9 +289,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '申请时间',
@ -259,9 +310,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '截止时间',
@ -280,9 +331,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '部门',
@ -291,7 +342,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
// {
// label: '代码',
@ -310,7 +361,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '业务类型',
@ -319,7 +370,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '是否可用',
@ -330,7 +381,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
}
},
// {
// label: '原因',
@ -358,9 +409,9 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '创建者',
@ -369,7 +420,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '操作',
@ -379,9 +430,10 @@ export const PurchasereturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const PurchasereturnRecordMainRules = reactive({

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -308,6 +308,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
}
} else {
const setV = {}
if (formField == 'supplierCode') {
setV['q2Number'] = ''
}
if (formField == 'q2Number') {
setV['q2Number'] = val[0]['number']
}
if (formField == 'purchaseReceiptRecordNumber') {
// isShowButton.value = false
setV[formField] = val[0][searchField]

155
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -2,18 +2,22 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import { PurchasereceiptRecordDetail,PurchasereceiptRecordMain } from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data'
import {
PurchasereceiptRecordDetail,
PurchasereceiptRecordMain
} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { Supplier } from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data";
import * as SupplierApi from "@/api/wms/supplier";
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
import * as LocationApi from "@/api/wms/location";
import {Location} from "@/views/wms/basicDataManage/factoryModeling/location/location.data";
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as InspectionQ2Api from '@/api/qms/inspectionQ2'
import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
@ -33,9 +37,9 @@ const queryParams = {
userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept]
// 采购收货记录展示列
export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchasereceiptRecordMain1 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
@ -80,7 +84,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
sort: 'custom',
table: {
width: 150
},
}
},
{
@ -89,7 +93,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
sort: 'custom',
table: {
width: 150
},
}
},
{
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
@ -99,7 +103,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
isTableForm: false,
table: {
width: 150
},
}
},
{
label: '计量单位',
@ -110,7 +114,7 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
sort: 'custom',
table: {
width: 150
},
}
},
// {
// label: '包装规格',
@ -137,16 +141,16 @@ export const PurchasereceiptRecordMain1 = useCrudSchemas(reactive<CrudSchema[]>(
sort: 'custom',
table: {
width: 150
},
},
]))
}
}
])
)
/**
* @returns {Array} 退
*/
export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchasereturnRequestMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
@ -156,7 +160,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
isForm: false,
isSearch: true,
isSearch: true
},
{
label: '状态',
@ -196,14 +200,16 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
verificationParams: [{
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -230,15 +236,18 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}],
verificationParams: [{
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
@ -260,7 +269,57 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180
},
isForm: false,
isTable: false,
isTable: false
},
{
label: 'Q2通知单号',
field: 'q2Number',
sort: 'custom',
isSearch: false,
isDetail: true,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
// multiple: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: 'Q2通知单号', // 查询弹窗标题
searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类
searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'status',
value: '0',
isMainValue: false
},
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}
],
verificationParams: [
{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '承运商',
@ -269,7 +328,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '运输方式',
@ -280,7 +339,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '车牌号',
@ -289,7 +348,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '从仓库代码',
@ -299,7 +358,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isForm: false,
isTable: false,
isTable: false
},
{
label: '到仓库代码',
@ -310,7 +369,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isTableForm: false,
isForm: false,
isTable: false,
isTable: false
},
{
label: '从库区类型范围',
@ -322,7 +381,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isForm: false
},
{
label: '到库区类型范围',
@ -335,7 +394,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTableForm: false,
isForm: false,
isForm: false
},
{
label: '从库区代码范围',
@ -345,7 +404,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isForm: false,
isTable: false,
isTable: false
},
{
label: '到库区代码范围',
@ -356,7 +415,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
isTable: false,
isTableForm:false,
isTableForm: false
},
{
label: '从月台代码',
@ -366,8 +425,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isForm: false,
isTable: false,
isTable: false
},
{
label: '业务类型',
@ -383,7 +441,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
isForm: false,
isTable: false,
isTable: false
},
{
label: '申请时间',
@ -402,11 +460,11 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
},
isForm: false,
isTable: false,
isTable: false
},
{
label: '截止时间',
@ -426,9 +484,9 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
},
{
label: '部门',
@ -463,7 +521,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable: false,
isTable: false
},
{
label: '创建时间',
@ -482,7 +540,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
@ -515,7 +573,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
valueFormat: 'x'
}
}
},
@ -621,9 +679,10 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 300,
fixed: 'right'
},
}
]))
}
])
)
//表单校验
export const PurchasereturnRequestMainRules = reactive({

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

@ -577,6 +577,9 @@ const handleImport = () => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
// :
SupplierinvoiceRequestDetail.allSchemas.tableFormColumns = SupplierinvoiceRequestDetail.allSchemas.tableFormColumns.filter(item=>item.field!='contractAmountTotal'&&item.field!='purchaseAmontTotal'&&item.field!='differencePriceTotal')
if(type=='update'){
//
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {

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

@ -1240,8 +1240,9 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isDetail: true,
},
{
label: '',
field: '',
label: '系统采购价格',
field: 'purchaseAmountTotalMain',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
@ -1271,8 +1272,9 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isDetail: true,
},
{
label: '',
field: '',
label: '总价差',
field: 'differencePriceTotalMain',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
@ -1367,7 +1369,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isDetail: true,
},
{
label: '差',
label: '差',
field: '',
sortTableDefault: 6,
isForm: false,
@ -1468,35 +1470,6 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isSearch: false,
isDetail: true,
},
// {
// label: '总价差',
// field: 'differencePriceTotal',
// formatter: accountantFormart,
// sortTableDefault: 6,
// isForm: false,
// isTable: false,
// isSearch: false,
// isDetail: true,
// },
// {
// label: '采购金额',
// field: 'purchaseAmontTotal',
// formatter: accountantFormart,
// sortTableDefault: 6,
// isForm: false,
// isTable: false,
// isSearch: false,
// isDetail: true,
// },
// {
// label: '',
// field: '',
// sortTableDefault: 6,
// isForm: false,
// isTable: false,
// isSearch: false,
// isDetail: true,
// },
]))
@ -1753,6 +1726,39 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
precision: 5,
}
},
{
label: '合同金额',
field: 'contractAmountTotal',
table: {
width: 150
},
isForm:false,
tableForm:{
disabled: true
}
},
{
label: '采购金额',
field: 'purchaseAmontTotal',
table: {
width: 150
},
isForm:false,
tableForm:{
disabled: true
}
},
{
label: '总差额',
field: 'differencePriceTotal',
table: {
width: 150
},
isForm:false,
tableForm:{
disabled: true
}
},
{
label: '单价差额',
field: 'differencePrice',
@ -2047,39 +2053,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
},
// {
// label: '合同金额',
// field: 'contractAmountTotal',
// table: {
// width: 150
// },
// isForm:false,
// tableForm:{
// disabled: true
// }
// },
// {
// label: '采购金额',
// field: 'purchaseAmontTotal',
// table: {
// width: 150
// },
// isForm:false,
// tableForm:{
// disabled: true
// }
// },
// {
// label: '总差额',
// field: 'differencePriceTotal',
// table: {
// width: 150
// },
// isForm:false,
// tableForm:{
// disabled: true
// }
// },
{
label: '操作',

Loading…
Cancel
Save