Browse Source

Merge branch 'master_hella' into master_hella_20240701

master_hella_20240701
陈薪名 4 months ago
parent
commit
1298b7cb56
  1. 1
      src/components/Descriptions/src/Descriptions.vue
  2. 14
      src/components/Detail/src/Detail.vue
  3. 2
      src/components/Form/src/Form.vue
  4. 4
      src/components/RouterSearch/index.vue
  5. 2
      src/directives/permission/clientTable.ts
  6. 8
      src/layout/components/ToolHeader.vue
  7. 12
      src/layout/components/UserInfo/src/UserInfo.vue
  8. 2
      src/layout/components/useRenderLayout.tsx
  9. 1
      src/utils/dict.ts
  10. 20
      src/utils/formatTime.ts
  11. 605
      src/views/qms/inspectionJob/index.vue
  12. 1135
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  13. 756
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  14. 784
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  15. 2
      src/views/qms/inspectionScheme/addForm.vue
  16. 25
      src/views/qms/inspectionTemplate/addForm.vue
  17. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  18. 43
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  19. 6
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  20. 16
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  21. 478
      src/views/wms/basicDataManage/orderManage/shift/shift.data.ts
  22. 37
      src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts
  23. 48
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  24. 1
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  25. 114
      src/views/wms/countManage/count/countPlanMain/index.vue
  26. 24
      src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts
  27. 106
      src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts
  28. 24
      src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts
  29. 5
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  30. 4
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  31. 23
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  32. 6
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  33. 10
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  34. 3
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue
  35. 4
      src/views/wms/deliversettlementManage/stockup/stockupMainRecord/stockupMainRecord.data.ts
  36. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts
  37. 16
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  38. 1
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts
  39. 43
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  40. 10
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  41. 8
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  42. 10
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  43. 1
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  44. 10
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  45. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  46. 4
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  47. 8
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  48. 1
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  49. 19
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  50. 18
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  51. 18
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  52. 18
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  53. 16
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  54. 16
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  55. 18
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  56. 12
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  57. 2
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  58. 34
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  59. 3038
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  60. 21
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  61. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  62. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  63. 374
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  64. 7
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  65. 378
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

1
src/components/Descriptions/src/Descriptions.vue

@ -127,6 +127,7 @@ const showAll = () =>{
:label-align="labelAlign"
:label-class-name="labelClassName"
:width="width"
:span="item.span"
>
<template #label>
<slot

14
src/components/Detail/src/Detail.vue

@ -18,8 +18,8 @@
:data="detailData"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:direction="direction"
:column="column"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
@ -408,6 +408,16 @@ const props = defineProps({
required: false,
default: null
},
direction:{
type: String,
required: false,
default: 'vertical'
},
column:{
type: Number,
required: false,
default: 8
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)

2
src/components/Form/src/Form.vue

@ -126,7 +126,7 @@ export default defineComponent({
}
const clearSearchInput = (field) => {
emit('clearSearchInput')
emit('clearSearchInput',field)
}
expose({
setValues,

4
src/components/RouterSearch/index.vue

@ -17,7 +17,7 @@
/>
</el-select> -->
</ElDialog>
<div v-else class="custom-hover custom-hover1" @click.stop="showTopSearch = !showTopSearch">
<div v-else class="custom-hover custom-hover2" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" color="#ffffff"/>
<el-select
filterable
@ -170,7 +170,7 @@ defineExpose({
.w-220px {
width: 220px !important;
}
.custom-hover1{
.custom-hover2:hover{
background-color: transparent;
}
</style>

2
src/directives/permission/clientTable.ts

@ -13,7 +13,7 @@ export function clientTable(app: App<Element>) {
if(el.children&&el.children.length>1){
paginationHeight = 70
}
const height = window.innerHeight - top - paginationHeight - qustionHeight
const height = window.innerHeight - top - paginationHeight - qustionHeight +5
el.style.height = height + 'px'
el.firstChild.style.height = '100%'
})

8
src/layout/components/ToolHeader.vue

@ -77,7 +77,7 @@ export default defineComponent({
></LocaleDropdown>
) : undefined} */}
{message.value ? (
<Message class="custom-hover" color="var(--top-header-text-color)"></Message>
<Message class="custom-hover custom-hover1" color="var(--top-header-text-color)"></Message>
) : undefined}
<UserInfo></UserInfo>
</div>
@ -93,4 +93,10 @@ $prefix-cls: #{$namespace}-tool-header;
.#{$prefix-cls} {
transition: left var(--transition-time-02);
}
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.2;
transition: all 50ms;
}
</style>

12
src/layout/components/UserInfo/src/UserInfo.vue

@ -51,7 +51,7 @@ const toDocument = () => {
</script>
<template>
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<ElDropdown class="custom-hover custom-hover1" :class="prefixCls" trigger="click">
<div class="flex items-center">
<ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
<span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="color:#ffffff">
@ -76,3 +76,13 @@ const toDocument = () => {
</template>
</ElDropdown>
</template>
<style lang="scss" scoped>
.custom-hover1:hover{
opacity: 0.5;
background-color: transparent;
scale: 1.1;
transition: all 50ms;
}
</style>

2
src/layout/components/useRenderLayout.tsx

@ -39,7 +39,7 @@ const fixedMenu = computed(() => appStore.getFixedMenu)
// 搜索图片
const search = computed(() => appStore.search)
const scrollBarHeight = computed(() => {
return (window.innerHeight - appStore.getCategoryMenuHeight - 85)+'px'
return (window.innerHeight - appStore.getCategoryMenuHeight - 35)+'px'
})
export const useRenderLayout = () => {

1
src/utils/dict.ts

@ -287,6 +287,7 @@ export enum DICT_TYPE {
BILL_TYPE = 'bill_type', // 发票类型
CONTAIN_MANAGE_TYPE = 'contain_menage_type', //器具管理类型
INVOICE_BALANCE_STATEMENT_STATUS = 'invoice_balance_statement_status', //是否有价差
PL_MSTR_TYPE = 'pl_mstr_type', //产品类类型
// ========== 业务 - mes ==========
MESDO_STATUS = 'mes_do_status', // 工单执行状态

20
src/utils/formatTime.ts

@ -26,11 +26,10 @@ export function formatDate(date: Date | number, format?: string): string {
/**
* +
*/
export function addDay(date: Date | number,addDay:number) {
return dayjs(date).add(addDay,'day')
export function addDay(date: Date | number, addDay: number) {
return dayjs(date).add(addDay, 'day')
}
/**
* +
*/
@ -163,6 +162,21 @@ export const dateFormatter = (row, column, cellValue) => {
}
return formatDate(cellValue)
}
/**
* element plus Formatter 使 YYYY-MM-DD HH:mm:ss
*
* @param row
* @param column
* @param cellValue
*/
// @ts-ignore
export const dateFormatter3 = (row, column, cellValue) => {
if (!cellValue) {
return
}
let str = formatDate(cellValue).split(' ')[1]
return str
}
// 获取时间戳
export const formatGetTime = (row, column, cellValue) => {
console.log(cellValue.getTime())

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

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

1135
src/views/qms/inspectionJob/inspectionJobMain.data.ts

File diff suppressed because it is too large

756
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -2,419 +2,435 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum,validateSixNum } from '@/utils/validator'
import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
*/
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm:false,
table: {
width: 200,
fixed: 'left'
}
},
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm:false,
table: {
width: 200
}
},
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
export const InspectionRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '记录编码',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200,
fixed: 'left'
}
},
form: {
componentProps:{
disabled:true
{
label: '申请编码',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200
}
},
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
{
label: '任务编码',
field: 'jobNumber',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
form: {
componentProps:{
disabled:true
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
form: {
componentProps:{
disabled:true
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 200
}
},
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'Select'
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 150
}
},
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
{
label: '检验方案编码',
field: 'inspectionSchemeCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
}
},
table: {
width: 150
}
},
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
{
label: '检验批次',
field: 'inspectionBatch',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '检验批数量',
field: 'inspectionBatchAmount',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
// {
// label: '采样总数量',
// field: 'sampleTotalAmount',
// sort: 'custom',
// isSearch: false,
// isForm:false,
// table: {
// width: 150
// }
// },
{
label: '检验类型',
field: 'inspectionType',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'Select'
},
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '检验阶段',
field: 'inspectionStage',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '检验严格性',
field: 'inspectionStringency',
dictType: DICT_TYPE.INSPECTION_SEVERITY,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
table: {
width: 175
}
},
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm:false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
{
label: '计划开始时间',
field: 'planStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '计划结束时间',
field: 'planEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '实际开始时间',
field: 'realStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
isForm:false,
table: {
width: 150
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
{
label: '实际结束时间',
field: 'realEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '检验水平',
field: 'inspectionLevel',
dictType: DICT_TYPE.INSPECTION_LEVEL,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: 'AQL值',
field: 'aqlValue',
dictType: DICT_TYPE.BASIC_AQL,
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 150
}
},
{
label: '使用决策',
field: 'useDecision',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.USAGE_DECISION,
table: {
width: 150
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 200,
fixed: 'right'
}
}
}
]))
])
)
//表单校验
export const InspectionRecordMainRules = reactive({

784
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -4,441 +4,471 @@ import * as ItemApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { validateInteger,validateTwoNum } from '@/utils/validator'
import { validateInteger, validateTwoNum } from '@/utils/validator'
// 表单校验
export const InspectionMainRules = reactive({
requestStartTime: [required],
itemCode: [required],
requestEndTime: [required],
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
referenceCertificateRow: [{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}],
batch: [required, { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }],
requestInspectionNum: [
required,
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
referenceCertificateRow: [
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
inspectionType: [required],
minPackageQty: [required],
minPackageQty: [required]
})
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '申请编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form:{
componentProps:{
disabled:true
}
}
},
{
label: '申请日期',
field: 'applicationDate',
sort: 'custom',
formatter: dateFormatter2,
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')]
export const InspectionMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '申请编码',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 200,
fixed: 'left'
},
form: {
componentProps: {
disabled: true
}
}
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{
label: '申请时间',
field: 'applicationTime',
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')]
{
label: '申请日期',
field: 'applicationDate',
sort: 'custom',
formatter: dateFormatter2,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
}
},
isForm:false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '申请时间',
field: 'applicationTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '要求开始时间',
field: 'requestStartTime',
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')]
{
label: '要求开始时间',
field: 'requestStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '要求结束时间',
field: 'requestEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '要求结束时间',
field: 'requestEndTime',
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')]
{
label: '完成时间',
field: 'finishTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
}
},
{
label: '完成时间',
field: 'finishTime',
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')]
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form: {
componentProps: {
disabled: true
}
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple: false,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
}
},
table: {
width: 175
}
},
{
label: '供应商编码',
field: 'supplierCode',
sort: 'custom',
isSearch: false,
table: {
width: 175
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
form:{
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
{
label: '待检数量',
field: 'requestInspectionNum',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
},
form:{
componentProps: {
disabled:true
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form:{
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '物料信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form:{
componentProps: {
disabled:true
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '待检数量',
field: 'requestInspectionNum',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考订单号',
field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
{
label: '参考凭证号',
field: 'referenceCertificateCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
table: {
width: 150
}
},
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: {
componentProps: {
{
label: '检验类型',
field: 'inspectionType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.INSPECTION_TYPE,
dictClass: 'string',
form: {
componentProps: {}
},
table: {
width: 175
}
},
table: {
width: 175
}
},
{
label: '小包装数',
field: 'minPackageQty',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '小包装数',
field: 'minPackageQty',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
table: {
width: 150
}
},
table: {
width: 150
}
}, {
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
{
label: '检验水平',
field: 'inspectionLevel',
sort: 'custom',
dictType: DICT_TYPE.INSPECTION_LEVEL,
dictClass: 'string',
table: {
width: 150
},
isSearch: true
},
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
},
isSearch: true,
}, {
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
}, {
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
}
}
}
]))
])
)
// 表单校验
export const InspectionRequestPackageRules = reactive({
// packageCode: [required],
// packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}],
measuringUnit: [required],
amount: [required, { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }],
measuringUnit: [required]
})
/**
* @returns {Array}
*/
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:true
},
isTableForm:false,
form:{
componentProps:{
disabled:true
export const InspectionRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '编码',
field: 'number',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: true
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
},
tableForm:{
disabled:false
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
},
},
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
{
label: '数量',
field: 'amount',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
},
tableForm: {
disabled: false
}
},
table:{
width:150
{
label: '计量单位',
field: 'measuringUnit',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
},
table: {
width: 150
}
}
}
]))
])
)

2
src/views/qms/inspectionScheme/addForm.vue

@ -233,7 +233,7 @@
</el-form>
<el-tabs
v-model="editableTabsValue"
editable
closable
class="demo-tabs"
@edit="handleTabsEdit"
type="border-card"

25
src/views/qms/inspectionTemplate/addForm.vue

@ -81,6 +81,18 @@
:label="item.description"
:name="item.name"
>
<template #label>
<span class="custom-tabs-label" style="display: flex; align-items: center">
<span>{{ item.description }}</span>
<Icon
icon="ep:document-copy"
color="#67C23A"
style="margin-left: 10px"
@click.stop="copy(item)"
/>
</span>
</template>
<div class="small-title">检验工序</div>
<!-- <Form
:ref="`formRefProcess`+index"
@ -1016,6 +1028,19 @@ const changeIsTarget = (e,item) => {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
}
//
const copy = (item)=>{
const newItem = JSON.parse(JSON.stringify(item))
newItem.name = data.value.process[data.value.process.length-1].name + 1
newItem.code = ''
newItem.id = ''
newItem.sequenceCode =data.value?.process[data.value?.process?.length-1]?.sequenceCode? parseInt(data.value.process[data.value.process.length-1].sequenceCode) + 1 : ''
newItem.inspectionCharacteristicsBaseVO.code = ''
newItem.inspectionCharacteristicsBaseVO. id = ''
newItem.inspectionCharacteristicsBaseVO.concurrencyStamp = 1
data.value.process.push(newItem)
editableTabsValue.value = newItem.name
}
</script>
<style scoped>
.small-title {

2
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -52,7 +52,7 @@
:tableData="tableData"
:apiUpdate="ItemareaApi.updateItemarea"
:apiCreate="ItemareaApi.createItemarea"
:isBusiness="false"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"

43
src/views/wms/basicDataManage/itemManage/itempackage/index.vue

@ -174,25 +174,31 @@ const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
Itempackaging.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if (item.field == 'packUnit') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
})
if (item.field == 'itemCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if (item.field == 'packUnit') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if (item.field == 'packType') {
item.componentProps.disabled = false
}
})
}else {
Itempackaging.allSchemas.formSchema.forEach((item) => {
if (item.field == 'itemCode') {
item.componentProps.disabled = false
item.componentProps.isSearchList = true
}
if (item.field == 'packUnit') {
item.componentProps.disabled = false
item.componentProps.isSearchList = true
}
if (item.field == 'itemCode') {
item.componentProps.disabled = false
item.componentProps.isSearchList = true
}
if (item.field == 'packUnit') {
item.componentProps.disabled = false
item.componentProps.isSearchList = true
}
if (item.field == 'packType') {
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row)
@ -262,6 +268,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if('itemCode'==formField){
setV['uom'] = val[0]['uom']
}
if('packUnit'==formField){
setV['packType'] = val[0]['type']
}
formRef.setValues(setV)
})
}

6
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -86,7 +86,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
label: '包装名称',
field: 'packName',
sort: 'custom',
isSearch: true,
isSearch: false,
table: {
width: 120
},
@ -101,7 +101,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.PACK_UNIT_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
isSearch: false,
table: {
width: 150
},
@ -110,7 +110,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
label: '包装数量',
field: 'packQty',
sort: 'custom',
isSearch: true,
isSearch: false,
table: {
width: 120
},

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

@ -280,14 +280,14 @@ const butttondata = (row, $index) => {
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:deliver-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:deliver-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:deliver-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:deliver-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:relegate-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:update'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:relegate-request-main:delete'}), //
]
}

478
src/views/wms/basicDataManage/orderManage/shift/shift.data.ts

@ -1,283 +1,273 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { dateFormatter, dateFormatter3 } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import {validateYS} from '@/utils/validator'
import { validateYS } from '@/utils/validator'
/**
* @returns {Array}
*/
export const Shift = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
export const Shift = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isSearch: true
},
isSearch: true,
},
{
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
},
},
{
label: '开始时间',
field: 'beginTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180,
},
form: {
component: 'TimePicker',
componentProps: {
style: {width:'100%'},
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x',
{
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect',
{
label: '开始时间',
field: 'beginTime',
isTable: true,
formatter: dateFormatter3,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: { width: '100%' },
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect'
}
}
}
},
{
label: '结束时间',
field: 'entTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'HH:mm:ss',
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: {width:'100%'},
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x',
{
label: '结束时间',
field: 'entTime',
isTable: true,
formatter: dateFormatter3,
detail: {
dateFormat: 'HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'TimePicker',
componentProps: {
style: { width: '100%' },
type: 'time',
dateFormat: 'HH:mm:ss',
valueFormat: 'x'
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect'
}
}
},
isSearch: false,
search: {
show: false,
component: 'TimePicker',
componentProps: {
valueFormat: 'HH:mm:ss',
type: 'timeSelect',
{
label: '是否跨天',
field: 'endAtNextDay',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
}
},
{
label: '是否跨天',
field: 'endAtNextDay',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '生效时间',
field: 'activeTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '失效时间',
field: 'expireTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
},
{
label: '失效时间',
field: 'expireTime',
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}
]))
])
)
//表单校验
export const ShiftRules = reactive({
code: [
{ required: true, message: '请输入代码', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateYS, message: '请输入正确的代码', trigger: 'blur'}
],
name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
beginTime: [
{ required: true, message: '请输入开始时间', trigger: 'blur' }
],
entTime: [
{ required: true, message: '请输入结束时间', trigger: 'blur' }
],
endAtNextDay: [
{ required: true, message: '请选择是否跨天', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
{ validator: validateYS, message: '请输入正确的代码', trigger: 'blur' }
],
name: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
beginTime: [{ required: true, message: '请输入开始时间', trigger: 'blur' }],
entTime: [{ required: true, message: '请输入结束时间', trigger: 'blur' }],
endAtNextDay: [{ required: true, message: '请选择是否跨天', trigger: 'change' }],
available: [{ required: true, message: '请选择是否可用', trigger: 'change' }]
})

37
src/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data.ts

@ -17,6 +17,7 @@ export const SubjectAccountRules = reactive({
projectId: [required],
projectCode: [required],
available: [required],
isFromPlMstr:[required]
})
export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
@ -180,6 +181,42 @@ export const SubjectAccount = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '是否来自产品类',
field: 'isFromPlMstr',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
table: {
width: 140
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
},
},
{
label: '产品类类型',
field: 'plMstrType',
sort: 'custom',
isSearch: false,
dictType: DICT_TYPE.PL_MSTR_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 120
},
form:{
componentProps:{
disabled:false
}
}
},
{
label: '备注',
field: 'remark',

48
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

@ -83,22 +83,6 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
// {
// label: '仓库代码',
// field: 'warehouseCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '库位代码',
// field: 'locationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '申请时间',
field: 'requestTime',
@ -655,6 +639,38 @@ export const CountJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '器具号',
field: 'containerNumber',

1
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -55,6 +55,7 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isDetail:false,
isTable:false,
form:{
componentProps:{

114
src/views/wms/countManage/count/countPlanMain/index.vue

@ -111,38 +111,36 @@ import {
CountPlanDetail,
CountPlanDetailRules,
CountPlanMain,
CountPlanMainRules,
CountPlanMainRules
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'
import {Owner} from '@/views/wms/basicDataManage/orderManage/owner/owner.data'
import { Owner } from '@/views/wms/basicDataManage/orderManage/owner/owner.data'
import * as OwnerApi from '@/api/wms/owner'
import {Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierApi from '@/api/wms/supplier'
import {Customer} from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as CustomerApi from '@/api/wms/customer'
import {Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import {Warehouse} from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import {Area} from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import {
Locationgroup
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import {Location} from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as LocationApi from '@/api/wms/location'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import {DICT_TYPE, getStrDictOptions} from '@/utils/dict'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue'
//
@ -412,11 +410,28 @@ const openForm = async (type: string, row?: any) => {
] //
row = row ? row : {}
// row.dimension = 'BY_INEVNEOTY'
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
// CountPlanMain.allSchemas.formSchema.forEach((item) => {
// if (item.field == 'crontab') {
// item.componentProps.disabled = true
// }
// })
if (row.type == 'CYCLE') {
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = false
item.label = '执行周期'
}
})
CountPlanMainRules.crontab[0].required = true
} else {
CountPlanMainRules.crontab[0].required = false
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
item.label = ''
}
})
}
})
formRef.value.open(type, row)
// Promise.all([getOwnerAllList(),
@ -572,7 +587,7 @@ const detailOpenForm = (type, row) => {
})
break
}
} else if ( row.type == 'PROJECT') {
} else if (row.type == 'PROJECT') {
formTypeDetail.value = 'InputString'
}
}
@ -635,7 +650,7 @@ const handleAddTable = () => {
//
const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){
if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1)
}
}
@ -644,6 +659,15 @@ const tableSelectionDelete = (selection) => {
}
//
const submitForm = async (formType, data) => {
var isHave = CountPlanMain.allSchemas.formSchema.some(function (item) {
return item.field === 'beginTime' || item.field === 'endTime'
})
if (isHave) {
if (data.beginTime && data.endTime && data.beginTime >= data.endTime) {
message.error('开始时间大于结束时间')
return
}
}
data.subList = tableData.value.map((item) => {
return {
type: item.type,
@ -721,22 +745,34 @@ const selectChange = (field, val) => {
}
})
}
  formRef.value.formRef.setValues({
       crontab:''
    })
if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else if (val == 'LOW' || val == 'RANDOM') {
CountPlanMain.allSchemas.formSchema[3].label = '限值'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false
} else {
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true
}
formRef.value.formRef.setValues({
crontab: ''
})
// if (val == 'DYNAMIC') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max = 100
// item.componentProps.disabled = false
// }
// })
// } else if (val == 'LOW' || val == 'RANDOM') {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.label = '%'
// item.componentProps.min = 0
// item.componentProps.max =Infinity
// item.componentProps.disabled = false
// }
// })
// } else {
// CountPlanMain.allSchemas.formSchema.forEach(item=>{
// if(item.field == 'limitedValue'){
// item.componentProps.disabled = true
// }
// })
// }
}
}
const formTypeDetail = ref('InputString') //
@ -823,7 +859,7 @@ const selectChangeDetail = (field, val) => {
case 'ITEMS_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '物品信息'
item.componentProps.searchAllSchemas = Itembasic.allSchemas
item.componentProps.searchPage = ItembasicApi.getItembasicPage
@ -833,7 +869,7 @@ const selectChangeDetail = (field, val) => {
case 'WAREHOUSE_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '仓库信息'
item.componentProps.searchAllSchemas = Warehouse.allSchemas
item.componentProps.searchPage = WarehouseApi.getWarehousePage
@ -843,7 +879,7 @@ const selectChangeDetail = (field, val) => {
case 'AREABASIC_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库区信息'
item.componentProps.searchAllSchemas = Area.allSchemas
item.componentProps.searchPage = AreaApi.getAreaPage
@ -853,7 +889,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATIONGROUP_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Locationgroup.allSchemas
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage
@ -863,7 +899,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATION_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true
item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Location.allSchemas
item.componentProps.searchPage = LocationApi.getLocationPage

24
src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts

@ -482,6 +482,30 @@ export const CountRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
type: 'Select'
}
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',

106
src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts

@ -51,22 +51,22 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:true,
isForm: true
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '出库事务类型',
// field: 'outTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '入库事务类型',
// field: 'inTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '申请时间',
field: 'requestTime',
@ -164,17 +164,17 @@ export const CountadjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '备注',
field: 'remark',
@ -267,9 +267,9 @@ export const CountadjustRecordMainRules =reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
// interfaceType: [
// { required: true, message: '请选择接口类型', trigger: 'change' }
// ],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
@ -360,6 +360,30 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
@ -455,17 +479,17 @@ export const CountadjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150
// },
// },
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '备注',
field: 'remark',

24
src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts

@ -518,6 +518,30 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6
}
},
{
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库区代码',
field: 'areaCode',
sort: 'custom',
table: {
width: 150
},
},{
label: '库位组代码',
field: 'locationGroupCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',

5
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts

@ -45,8 +45,9 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isSearch: false,
isTable: false,
isDetail: false,
isForm: false,
sort: 'custom',
table: {

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

@ -20,7 +20,9 @@ export const CustomerreturnRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isTable: true,
isSearch: false,
isTable: false,
isDetail: false,
isForm: false,
sort: 'custom',
table: {

23
src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts

@ -44,10 +44,23 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: true,
},
{
label: '发货月台',
field: 'deliverDock',
sort: 'custom',
isSearch: false,
isTable: false,
isDetail: false,
isForm: false,
table: {
width: 150
},
@ -81,16 +94,6 @@ export const DeliverJobMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150
},
isTable: false,
},
{
label: '承运商',
field: 'carrierCode',

6
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -40,6 +40,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
// {
// label: '发货计划单号',
@ -63,8 +66,9 @@ export const DeliverRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: false,
isTable: true,
isTable: false,
isForm: false,
isDetail:false,
sort: 'custom',
table: {
width: 150

10
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -883,7 +883,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number',
sort: 'custom',
table: {
width: 180
width: 350
},
form: {
componentProps: {
@ -896,7 +896,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemCode',
sort: 'custom',
table: {
width: 150
width: 350
},
tableForm:{
multiple:true,
@ -923,7 +923,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'planQty',
sort: 'custom',
table: {
width: 150
width: 350
},
form: {
component: 'InputNumber',
@ -946,7 +946,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true,
sort: 'custom',
table: {
width: 150
width: 360
},
tableForm: {
disabled: true,
@ -958,4 +958,4 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
]))
]))

3
src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue

@ -62,6 +62,9 @@
:detailAllSchemas="StockupDetailJob.allSchemas"
:detailAllSchemasRules="StockupDetailJobRules"
:searchTableParams="searchTableParams"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
:apiPage="StockupJobDetailApi.getStockupDetailJobPage"
/>
</template>

4
src/views/wms/deliversettlementManage/stockup/stockupMainRecord/stockupMainRecord.data.ts

@ -314,6 +314,7 @@ export const StockupMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
@ -557,7 +558,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
isTable: false,
hiddenInMain: true,
sort: 'custom',
table: {
@ -618,6 +619,7 @@ export const StockupDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isTable: false,
hiddenInMain: true,
table: {
width: 150,

2
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -741,6 +741,8 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
isTableForm: false,
isTable: false,
table: {
width: 150
},

16
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="containerNumber"
@success="getList"
:rules="ContainerMainRequestRules"
:formAllSchemas="ContainerMainRequest.allSchemas"
@ -131,11 +133,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'containerNumber') {
row['containerNumber'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['fromLocationCode'] = val[0]['locationCode']
row['fromInventoryStatus'] = val[0]['inventoryStatus']
row['toInventoryStatus'] = 'SCRAP'
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['fromLocationCode'] = item['locationCode']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['toInventoryStatus'] = 'SCRAP'
tableData.value.push(newRow)
})
}else if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code']
}else {

1
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts

@ -357,6 +357,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber',
sort: 'custom',
tableForm: {
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择器具号',
searchField: 'itemCode',

43
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="packingNumber"
@success="getList"
:rules="ScrapRequestMainRules"
:formAllSchemas="ScrapRequestMain.allSchemas"
@ -104,6 +106,7 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref([...ScrapRequestMain.allSchemas.tableColumns,...ScrapRequestDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -114,16 +117,32 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['packingNumber'] = val[0]['packingNumber']
row['batch'] = val[0]['batch']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
// val.forEach(item=>{
// const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
// newRow[formField] = item[searchField]
// newRow['packingNumber'] = item['packingNumber']
// newRow['batch'] = item['batch']
// newRow['fromLocationCode'] = item['locationCode']
// newRow['itemCode'] = item['itemCode']
// newRow['uom'] = item['uom']
// tableData.value.push(newRow)
// })
//
let param = {'itemCode':val[0]['itemCode'] as string}
let param = {'itemCodes':val.map(item=>item.itemCode).join(',') as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
row['singlePrice'] = res.price
val.forEach(item=>{
const itemCode = res.find(item1=>item1['itemCode']==item['itemCode'])
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['packingNumber'] = item['packingNumber']
newRow['batch'] = item['batch']
newRow['fromLocationCode'] = item['locationCode']
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['singlePrice'] = itemCode?itemCode['price']:''
tableData.value.push(newRow)
})
// row['singlePrice'] = res.price
})
} else {
const setV = {}
@ -143,10 +162,12 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom']
//
let param = {'itemCode':val[0]['itemCode'] as string}
let param = {'itemCodes':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
setV['singlePrice'] = res.price
})
if(res&&res.length>0){
setV['singlePrice'] = res[0].price
}
})
formRef.setValues(setV)
})
}

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

@ -396,6 +396,9 @@ export const ScrapRequestMainRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode:[
{required: true,message: '请选择从仓库代码',trigger: 'change' }
]
})
/**
@ -480,6 +483,7 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
@ -503,6 +507,12 @@ export const ScrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'inventoryStatus',
value: 'SCRAP',
action: '==',
isSearch: true,
isMainValue: false
}]
},
form: {

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

@ -61,6 +61,7 @@
@submitForm="submitForm"
@onEnter="onEnter"
@onChange="onChange"
@clearSearchInput="onChange"
/>
<!-- 详情 -->
@ -117,8 +118,15 @@ const onChange = async (field,value) => {
setV['productionLineCode'] = ''
setV['workStationCode'] = ''
formRef.value.formRef.setValues(setV)
}else if(field== 'productionLineCode'){
//线
const setV = {}
setV['workStationCode'] = ''
formRef.value.formRef.setValues(setV)
}
}
const onEnter = async (field,value) => {
if (field == 'productionLineCode') {
//线

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStation"
@success="getList"
:rules="PreparetoissueMainRules"
:formAllSchemas="PreparetoissueMain.allSchemas"
@ -113,8 +115,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['componentItemCode']
row['uom'] = val[0]['componentUom']
} else {
row[formField] = val[0][searchField]
row['toLocationCode'] = val[0]['rawLocationCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['toLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
}
} else {
const setV = {}

1
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -503,6 +503,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm: {
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -193,8 +195,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
}
} else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
} else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']

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

@ -105,6 +105,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

4
src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts

@ -440,7 +440,7 @@ export const RepleinshJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '承接人用户名',
field: 'acceptUserId',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 150
@ -449,7 +449,7 @@ export const RepleinshJobMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '完成人用户名',
field: 'completeUserId',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150

8
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
@success="getList"
:rules="ProductdismantleRequestMainRules"
:formAllSchemas="ProductdismantleRequestMain.allSchemas"
@ -269,7 +271,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['bomVersion'] = ''
row['childList'] = []
} else {
row[formField] = val[0][searchField]
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
tableData.value.push(newRow)
})
}
} else {
const setV = {}

1
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -474,6 +474,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
width: 150
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

19
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
//
@ -119,10 +120,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// })
if(formField=='itemCode'){
// row[formField] = val[0][searchField]
val.forEach(item=>{
val.forEach(async item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['id'] = item['id']
// BOM
console.log(22,item)
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainAssemble' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainASparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

18
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain'
import * as ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductionMainPredictSparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
val.forEach(item=>{
val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
// BOM
const param1 = {
productItemCode: item['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
})
} else {

16
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -149,6 +149,7 @@ import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

16
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -149,6 +149,7 @@ import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{

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

@ -136,6 +136,7 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth'
import * as BomApi from "@/api/wms/bom";
import {
SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
@ -204,8 +205,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['uom'] = res[0]['uom']
}
row[formField] = val[0][searchField]
console.log('获取计量单位',res)
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else{
//
val.forEach(item=>{

12
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductrepairRequestMainRules"
:formAllSchemas="ProductrepairRequestMain.allSchemas"
@ -247,8 +249,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
} else if(formField == 'workStationCode'){
row['fromLocationCode'] = val[0]['rawLocationCode']
row['workStationCode'] = val[0]['code']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['fromLocationCode'] = item['rawLocationCode']
newRow['workStationCode'] =item['code']
tableData.value.push(newRow)
})
} else if(formField == 'formField'){
row['workStationCode'] = val[0]['code']
} else if(formField == 'bomVersion'){

2
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -553,6 +553,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:5,
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -917,6 +918,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},
sortTableDefault:17,
tableForm: {
disabled: true,
type: 'Select'
}
},

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

@ -85,7 +85,6 @@
<!-- BOM弹窗列表 -->
<BasicForm
ref="detailBomRef"
@success="getList"
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas"
:tableFormRules="ProdcutscrapBomScrapRules"
@ -121,7 +120,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle"
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductscrapRequestMain' })
const message = useMessage() //
@ -309,7 +308,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
}else if(formField == 'processCode'){
row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
@ -318,29 +317,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['bomVersion'] = ''
row['childList'] = []
//
let param = {'itemCode':val[0]['itemCode'] as string}
let param = {'itemCodes':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
console.log(res)
row['uom'] = res.uom
row['singlePrice'] = res.price
if(res&&res.length>0){
row['uom'] = res[0].uom
row['singlePrice'] = res[0].price
}
})
// BOM
console.log(formRef.formModel)
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
// row['singlePrice'] = res.price
})
}else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version']
@ -370,7 +368,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['bomVersion'] = ''
setV['childList'] = []
//
let param = {'itemCode':val[0]['itemCode'] as string}
let param = {'itemCodes':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
console.log(res)
})

3038
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

File diff suppressed because it is too large

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

@ -232,8 +232,9 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
if (formField == 'purchaseReceiptRecordNumber') {
row[formField] = val[0][searchField]
//--
row['supplierCode'] = val[0]['supplierCode']
row['poNumber'] = val[0]['poNumber']
@ -271,6 +272,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['amount'] = val[0]['amount']
row['projectCode'] = val[0]['projectCode']
} else if (formField == 'itemCode') {
row[formField] = val[0][searchField]
row['batch'] = val[0]['toBatch']
row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber']
@ -278,6 +280,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
// row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode']
} else if (formField == 'fromLocationCode') {
row[formField] = val[0][searchField]
// let params = {
// itemCode: row.itemCode,
// batch: row.batch,
@ -287,7 +290,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
// console.log('23423423',aa);
// row['inventoryBalance'] = aa//
} else if (formField == 'packingNumber') {
row['inventoryBalance'] = val[0]['qty'] //
// row[formField] = val[0][searchField]
val.forEach((item,index)=>{
if(index==0){
row[formField] = item[searchField]
row['inventoryBalance'] = item['qty'] //
}else{
let newRow = {...row}
newRow[formField] = item[searchField]
row['inventoryBalance'] = item['qty'] //
tableData.value.push(newRow)
}
})
// row['inventoryBalance'] = val[0]['qty'] //
}else{
row[formField] = val[0][searchField]
}
} else {
const setV = {}

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

@ -982,6 +982,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
tableForm:{
multiple: true,
// labelMessage: '信息提示说明!!!',
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码、批次、从库位代码',

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -106,7 +106,9 @@
hiddenDelete:true
}"
:isBasic="false"
:allSchemas="SupplierinvoiceRecordMain.allSchemas"
direction="horizontal"
:column="3"
:allSchemas="SupplierinvoiceRecordDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
@ -119,7 +121,7 @@
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordMainRules,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules } from './supplierinvoiceRecordMain.data'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordMainRules,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain } from './supplierinvoiceRecordMain.data'
import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain'
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -189,7 +191,7 @@ const buttonBaseClick = (val, item) => {
}
const BASE_URL = getJmreportBaseUrl()
const srcPoint = ref(BASE_URL + '/jmreport/view/970564557155733504?token=' + getAccessToken())
const srcPoint = ref(BASE_URL + '/jmreport/view/970966724605804544?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{

374
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -755,7 +755,381 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
}
]))
/**
* @returns {Array}
*/
export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '汇总信息',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: '供应商信息',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: 'SCP系统数据',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统价税合计',
field: 'afterTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务凭证号',
field: 'voucherNumber',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统未税金额',
field: 'amount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商创建日期',
field: 'supplierDate',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '订单类型',
field: 'orderType',
dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE,
dictClass: 'string',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统税额',
field: 'taxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS,
dictClass: 'string',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '发票号码',
field: 'goldenTaxInvoiceNumber',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '采购价格审批人',
field: 'procurementCreator',
sortTableDefault: 1003,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '开票日期',
field: 'invoiceTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '采购价格审批时间',
field: 'procurementCreateTime',
sortTableDefault: 1003,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '税率(%)',
field: 'taxRate',
dictType: DICT_TYPE.TAX_RATE_DICT,
dictClass: 'string',
sortTableDefault: 3,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价差通过说明',
field: 'balanceStatement',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价税合计金额',
field: 'adTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务审批人',
field: 'financialCreatorName',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '未税金额',
field: 'beforeTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '差额',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务审批时间',
field: 'financialCreateTime',
formatter: dateFormatter,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '税额',
field: 'totalTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价税合计差额(价税合计-系统价税合计)',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务过账日期',
field: 'postingDate',
isTable: true,
sortTableDefault: 15,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '折扣金额',
field: 'discountAmount1',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '未税差额(未税金额-系统未税金额)',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
detail:{
span:2
}
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
]))
//表单校验
export const SupplierinvoiceRecordMainRules = reactive({
requestNumber: [

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

@ -146,6 +146,8 @@
:isOpenSearchTable="true"
fieldTableColumn="poLine"
:annexTable="detailAnnexTable"
direction="horizontal"
:column="3"
:annexAlias="{
hidden:true,
label:t('ts.其他附件')
@ -196,7 +198,7 @@
})
}"
:isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas"
:allSchemas="SupplierinvoiceRequestDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules"
:searchTableParams="searchTableParams"
@ -244,7 +246,8 @@ import dayjs from 'dayjs'
SupplierinvoiceRequestFinance,
SupplierinvoiceRequestFinanceRules,
PurchasePass,
PurchasePassRules
PurchasePassRules,
SupplierinvoiceRequestDetailMain
} from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'

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

@ -1042,9 +1042,383 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
}
]))
/**
* @returns {Array}
*/
export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '汇总信息',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: '供应商信息',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: 'SCP系统数据',
field: '',
sort: 'custom',
isForm: false,
isSearch: false,
isTable: false,
isDetail: true,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统价税合计',
field: 'afterTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务凭证号',
field: 'voucherNumber',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统未税金额',
field: 'amount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '供应商创建日期',
field: 'supplierDate',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '订单类型',
field: 'orderType',
dictType: DICT_TYPE.PURCHASE_INVOICE_ORDER_TYPE,
dictClass: 'string',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '系统税额',
field: 'taxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.SUPPLIERINVOICE_REQUEST_STATUS,
dictClass: 'string',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '发票号码',
field: 'goldenTaxInvoiceNumber',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '采购价格审批人',
field: 'procurementCreator',
sortTableDefault: 1003,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '开票日期',
field: 'invoiceTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '采购价格审批时间',
field: 'procurementCreateTime',
sortTableDefault: 1003,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '税率(%)',
field: 'taxRate',
dictType: DICT_TYPE.TAX_RATE_DICT,
dictClass: 'string',
sortTableDefault: 3,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价差通过说明',
field: 'balanceStatement',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价税合计金额',
field: 'adTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务审批人',
field: 'financialCreatorName',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '未税金额',
field: 'beforeTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '差额',
field: '',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务审批时间',
field: 'financialCreateTime',
formatter: dateFormatter,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '税额',
field: 'totalTaxAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '价税合计差额(价税合计-系统价税合计)',
field: 'totalTaxDiffAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '财务过账日期',
field: 'postingDate',
isTable: true,
sortTableDefault: 15,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '折扣金额',
field: 'discountAmount1',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '未税差额(未税金额-系统未税金额)',
field: 'beforeTaxDiffAmount',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
detail:{
span:2
}
},
{
label: '税额差异',
field: 'taxAmountDiff',
formatter: accountantFormart,
sortTableDefault: 6,
isForm: false,
isTable: false,
isSearch: false,
isDetail: true,
},
]))
const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(5)
cellValue= Number(cellValue).toFixed(2)
cellValue = cellValue + '' || ''
let x = cellValue.split('.')
@ -1281,6 +1655,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
@ -1288,6 +1663,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
tableForm:{
type: 'InputNumber',
disabled: true,
min: 0,
precision: 2,

Loading…
Cancel
Save