Browse Source

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

hella_online_20240829
chenfang 2 months ago
parent
commit
1b7ae347ed
  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. 8
      src/layout/components/ToolHeader.vue
  6. 12
      src/layout/components/UserInfo/src/UserInfo.vue
  7. 20
      src/utils/formatTime.ts
  8. 605
      src/views/qms/inspectionJob/index.vue
  9. 1135
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  10. 756
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  11. 784
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  12. 2
      src/views/qms/inspectionScheme/addForm.vue
  13. 25
      src/views/qms/inspectionTemplate/addForm.vue
  14. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  15. 43
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  16. 6
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  17. 478
      src/views/wms/basicDataManage/orderManage/shift/shift.data.ts
  18. 48
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  19. 1
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  20. 114
      src/views/wms/countManage/count/countPlanMain/index.vue
  21. 24
      src/views/wms/countManage/count/countRequestMain/countRequestMain.data.ts
  22. 106
      src/views/wms/countManage/countadjust/countadjustRecordMain/countadjustRecordMain.data.ts
  23. 24
      src/views/wms/countManage/countadjust/countadjustRequestMain/countadjustRequestMain.data.ts
  24. 5
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  25. 4
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  26. 23
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/deliverJobMain.data.ts
  27. 6
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  28. 10
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  29. 3
      src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue
  30. 4
      src/views/wms/deliversettlementManage/stockup/stockupMainRecord/stockupMainRecord.data.ts
  31. 2
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts
  32. 16
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  33. 1
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/scrapContainerMainRequest.data.ts
  34. 43
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  35. 10
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  36. 8
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  37. 10
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  38. 1
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  39. 10
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  40. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  41. 8
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  42. 1
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  43. 19
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  44. 18
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  45. 18
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  46. 18
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  47. 16
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  48. 16
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  49. 18
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  50. 12
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  51. 2
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  52. 34
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  53. 3038
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  54. 21
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  55. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  56. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  57. 374
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  58. 7
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  59. 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-align="labelAlign"
:label-class-name="labelClassName" :label-class-name="labelClassName"
:width="width" :width="width"
:span="item.span"
> >
<template #label> <template #label>
<slot <slot

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

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

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

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

4
src/components/RouterSearch/index.vue

@ -17,7 +17,7 @@
/> />
</el-select> --> </el-select> -->
</ElDialog> </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"/> <Icon icon="ep:search" color="#ffffff"/>
<el-select <el-select
filterable filterable
@ -170,7 +170,7 @@ defineExpose({
.w-220px { .w-220px {
width: 220px !important; width: 220px !important;
} }
.custom-hover1{ .custom-hover2:hover{
background-color: transparent; background-color: transparent;
} }
</style> </style>

8
src/layout/components/ToolHeader.vue

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

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

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

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) { export function addDay(date: Date | number, addDay: number) {
return dayjs(date).add(addDay,'day') return dayjs(date).add(addDay, 'day')
} }
/** /**
* + * +
*/ */
@ -163,6 +162,21 @@ export const dateFormatter = (row, column, cellValue) => {
} }
return formatDate(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) => { export const formatGetTime = (row, column, cellValue) => {
console.log(cellValue.getTime()) console.log(cellValue.getTime())

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

@ -1,33 +1,52 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="InspectionJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="InspectionJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" <TableHead
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :HeadButttondata="HeadButttondata"
:allSchemas="InspectionJobMain.allSchemas" /> @button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="InspectionJobMain.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ <Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" }"
v-model:sort="tableObject.sort"> v-model:pageSize="tableObject.pageSize"
<template #number="{row}"> v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<AddForm <AddForm
ref="formRef" ref="formRef"
basicFormWidth="80" basicFormWidth="80"
:formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas" :formAllSchemasFeatures="InspectionTemplateFeatures.allSchemas"
@ -41,298 +60,366 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" :isBasic="false" :allSchemas="InspectionJobMain.allSchemas" ref="detailRef"
:isBasic="false"
:allSchemas="InspectionJobMain.allSchemas"
:detailAllSchemas="InspectionJobDetail.allSchemas" :detailAllSchemas="InspectionJobDetail.allSchemas"
:detailAllSchemasRules="InspectionJobDetailRules" :detailAllSchemasRules="InspectionJobDetailRules"
:apiCreate="InspectionJobDetailApi.createInspectionJobDetail" :apiCreate="InspectionJobDetailApi.createInspectionJobDetail"
:apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail" :apiUpdate="InspectionJobDetailApi.updateInspectionJobDetail"
:apiPage="InspectionJobDetailApi.getInspectionJobDetailPage" :apiPage="InspectionJobDetailApi.getInspectionJobDetailPage"
:apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail" @searchTableSuccessDetail="searchTableSuccessDetail" :apiDelete="InspectionJobDetailApi.deleteInspectionJobDetail"
:isShowAddBtn="false" :detailButtonIsShow="true" @searchTableSuccessDetail="searchTableSuccessDetail"
:isShowAddBtn="false"
:detailButtonIsShow="true"
/> />
<!-- 包装信息 --> <!-- 包装信息 -->
<ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionJobMain.allSchemas" <ListTable
:detailAllSchemas="InspectionJobPackage.allSchemas" :detailAllSchemasRules="InspectionJobPackageRules" ref="listTableRef"
:list="list" /> 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> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { InspectionJobMain, InspectionJobMainRules, InspectionJobDetail, InspectionJobDetailRules,InspectionJobPackage,InspectionJobPackageRules} from './inspectionJobMain.data' import {
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' 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 InspectionJobPackageApi from '@/api/qms/inspectionJob/InspectionJobPackage/InspectionJobPackage'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail' import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ListTable from '@/components/ListTable/src/ListTable.vue' import ListTable from '@/components/ListTable/src/ListTable.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
// //
defineOptions({ name: 'InspectionJobMain' }) defineOptions({ name: 'InspectionJobMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns) const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
// row['itemNumber'] = val[0]['number'] // row['itemNumber'] = val[0]['number']
// row['itemName'] = val[0]['name'] // row['itemName'] = val[0]['name']
// row['uom'] = val[0]['uom'] // row['uom'] = val[0]['uom']
// row['isRadeIn'] = val[0]['isRadeIn'] // row['isRadeIn'] = val[0]['isRadeIn']
// row['available'] = val[0]['available'] // row['available'] = val[0]['available']
} else { } else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {} const setV = {}
// if(formField == 'itemCode'){ setV[formField] = val[0][searchField]
// await ItembasicApi.getItembasicPage({
// code: setV['itemCode']
// }).then(res => {
// setV['uom'] = res.list[0].uom
// setV[formField] = val[0][searchField]
// })
// }
formRef.setValues(setV) 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 = [ const { getList, setSearchParams } = tableMethods
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
// //
const buttonBaseClick = (val, item) => { const HeadButttondata = [
if (val == 'add') { // defaultButtons.defaultFreshBtn(null), //
openForm('create') defaultButtons.defaultFilterBtn(null), //
} else if (val == 'import') { // defaultButtons.defaultSetBtn(null) //
handleImport() ]
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// //
const isShowMainButton = (row, val) => { const buttonBaseClick = (val, item) => {
if (val.indexOf(row.status) > -1) { if (val == 'add') {
return false //
} else { openForm('create')
return true } 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) { const isShowMainButton = (row, val) => {
return false if (val.indexOf(row.status) > -1) {
} else { return false
return true } else {
} return true
} }
}
// - //
const butttondata = (row) => { const isShowMainButton2 = (row, val) => {
return [ if (val.indexOf(row.isStaging) > -1) {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:accept'}), // return false
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'qms:inspection-job-main:close'}), // } else {
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2']),hasPermi:'qms:inspection-job-main:abandon'}), // return true
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 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 listTableRef = ref()
const list = ref([]) const list = ref([])
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') {
execute('execute', row) //
}else if (val == 'mainPackage') { // execute('execute', row)
} else if (val == 'mainPackage') {
list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id) //
// row.status = '1'
listTableRef.value.openPackage(row,'包装信息',InspectionJobPackage.allSchemas.tableColumns) list.value = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
}else if (val == 'mainJobAba') { // // row.status = '1'
listTableRef.value.openPackage(row, '包装信息', InspectionJobPackage.allSchemas.tableColumns)
} else if (val == 'mainJobAba') {
//
handleAbandon(row.id) handleAbandon(row.id)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') {
//
handleClose(row.id) handleClose(row.id)
} else if (val == 'mainOrderPub') { // } else if (val == 'mainOrderPub') {
//
handleRelease(row.id) handleRelease(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainJobAcc') {
//
handleAccept(row.id) handleAccept(row.id)
} }
} }
/** 添加/修改操作 */ //
// const formRef = ref() const showQualityReport = ref(false)
// const openForm = async (type : string, row ?: number) => { const qualityReport = ref('')
// tableData.value = [] // const checkQualityReport = async (row) => {
// formRef.value.open(type, row) showQualityReport.value = true
// } qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 详情操作 */ /** 添加/修改操作 */
const detailRef = ref() // const formRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => { // const openForm = async (type : string, row ?: number) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain') // tableData.value = [] //
} // formRef.value.open(type, row)
// // }
const formRef = ref()
const execute = async (type : string, row ?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id : number) => {
try {
//
await message.confirm(t('common.confirmColse'))
//
await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess'))
//
await getList()
} catch { }
}
/** 发布按钮操作 */
const handleRelease = async (id : number) => {
try {
//
await message.confirm('确认发布吗?')
//
await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!')
//
await getList()
} catch { }
}
//
const handleAccept = async (id : number) => {
try {
//
await message.confirm(t('common.confirmAccept'))
//
await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess'))
//
await getList()
} catch { }
}
//
const handleAbandon = async (id : number) => {
try {
//
await message.confirm(t('common.confirmGiveup'))
//
await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
download.excel(data, '检验任务.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** /** 详情操作 */
* tableForm方法 const detailRef = ref()
*/ const openDetail = (row: any, titleName: any, titleValue: any) => {
const tableFormKeys = {} detailRef.value.openDetail(row, titleName, titleValue, 'basicInspectionJobMain')
InspectionJobDetail.allSchemas.tableFormColumns.forEach(item => { }
tableFormKeys[item.field] = item.default ? item.default : '' //
})
const tableData = ref([])
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) => { const exportLoading = ref(false) //
// return const handleExport = async () => {
try { try {
if (formType === 'create') { //
await InspectionJobMainApi.createInspectionJobMain(data) await message.exportConfirm()
message.success(t('common.createSuccess')) //
} else if(formType === 'execute') { exportLoading.value = true
await InspectionJobMainApi.executeInspectionJobMain(data) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params)
message.success(t('common.updateSuccess')) download.excel(data, '检验任务.xlsx')
} } catch {
formRef.value.dialogVisible = false } finally {
// exportLoading.value = false
getList()
} finally {
formRef.value.formLoading = false
}
} }
}
/** 导入 */ /**
const importFormRef = ref() * tableForm方法
const handleImport = () => { */
importFormRef.value.open() 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) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
}
getList() //
} }
getList() //
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
}) })
</script> </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 { dateFormatter2 } from '@/utils/formatTime'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {validateTwoNum,validateSixNum } from '@/utils/validator' import { validateTwoNum, validateSixNum } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRecordMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '记录编码', {
field: 'number', label: '记录编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
isForm:false, isSearch: true,
table: { isForm: false,
width: 200, table: {
fixed: 'left' 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
}, },
form: { {
componentProps:{ label: '申请编码',
disabled:true field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 200
} }
}, },
}, {
{ label: '任务编码',
label: '物料编码', field: 'jobNumber',
field: 'itemCode', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 200
width: 150 }
}, },
form: { {
componentProps:{ label: '发货单号',
disabled:true field: 'asnNumber',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
} }
}, },
}, {
{ label: '供应商编码',
label: '物料名称', field: 'supplierCode',
field: 'itemName', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 200
width: 200 }
}, },
form: { {
componentProps:{ label: '供应商名称',
disabled:true field: 'supplierName',
sort: 'custom',
isSearch: false,
isForm: false,
table: {
width: 200
},
form: {
componentProps: {
disabled: true
}
} }
}, },
}, {
{ label: '物料编码',
label: '批次', field: 'itemCode',
field: 'batch', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: false, isForm: false,
isForm:false, table: {
table: { width: 150
width: 150 },
} form: {
}, componentProps: {
{ disabled: true
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'
}, },
table: { {
width: 150 label: '物料名称',
} field: 'itemName',
}, sort: 'custom',
{ isSearch: false,
label: '参考订单号', isForm: false,
field: 'referenceOrderCode', table: {
sort: 'custom', width: 200
isSearch: false, },
isForm:false, form: {
table: { componentProps: {
width: 150 disabled: true
} }
}, }
{
label: '参考订单行',
field: 'referenceOrderRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '批次',
} field: 'batch',
}, sort: 'custom',
{ isSearch: false,
label: '参考凭证号', isForm: false,
field: 'referenceCertificateCode', table: {
sort: 'custom', width: 150
isSearch: false, }
isForm:false,
table: {
width: 150
}
},
{
// reference_certificate_row
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验方案编码',
} field: 'inspectionSchemeCode',
}, sort: 'custom',
{ isSearch: false,
label: '检验阶段', isForm: false,
field: 'inspectionStage', table: {
sort: 'custom', width: 200
isSearch: false, }
isForm:false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验批次',
} field: 'inspectionBatch',
}, sort: 'custom',
{ isSearch: false,
label: '检验严格性', isForm: false,
field: 'inspectionStringency', table: {
dictType: DICT_TYPE.INSPECTION_SEVERITY, width: 150
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')]
} }
}, },
form: { {
component: 'DatePicker', label: '检验批数量',
componentProps: { field: 'inspectionBatchAmount',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'referenceOrderCode',
}, sort: 'custom',
{ isSearch: false,
label: '计划结束时间', isForm: false,
field: 'planEndTime', table: {
sort: 'custom', width: 150
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', label: '参考订单行',
componentProps: { field: 'referenceOrderRow',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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 // reference_certificate_row
} label: '参考凭证行',
}, field: 'referenceCertificateRow',
{ sort: 'custom',
label: '实际开始时间', isSearch: false,
field: 'realStartTime', isForm: false,
sort: 'custom', form: {
formatter: dateFormatter, component: 'InputNumber',
isSearch: false, value: 0
isForm:false, },
search: { table: {
component: 'DatePicker', width: 150
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', label: '检验阶段',
componentProps: { field: 'inspectionStage',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'planStartTime',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '实际结束时间', isSearch: false,
field: 'realEndTime', isForm: false,
sort: 'custom', search: {
formatter: dateFormatter, component: 'DatePicker',
isSearch: false, componentProps: {
isForm:false, valueFormat: 'YYYY-MM-DD HH:mm:ss',
search: { type: 'daterange',
component: 'DatePicker', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
componentProps: { }
valueFormat: 'YYYY-MM-DD HH:mm:ss', },
type: 'daterange', form: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '计划结束时间',
componentProps: { field: 'planEndTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'realEndTime',
}, sort: 'custom',
{ formatter: dateFormatter,
label: '检验水平', isSearch: false,
field: 'inspectionLevel', isForm: false,
dictType: DICT_TYPE.INSPECTION_LEVEL, search: {
sort: 'custom', component: 'DatePicker',
isSearch: false, componentProps: {
isForm:false, valueFormat: 'YYYY-MM-DD HH:mm:ss',
table: { type: 'daterange',
width: 150 defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
{ form: {
label: 'AQL值', component: 'DatePicker',
field: 'aqlValue', componentProps: {
dictType: DICT_TYPE.BASIC_AQL, type: 'datetime',
sort: 'custom', valueFormat: 'x'
isSearch: false, }
isForm:false, },
table: { detail: {
width: 150 dateFormat: 'YYYY-MM-DD HH:mm:ss'
} },
}, table: {
{ width: 175
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: { label: '检验水平',
dateFormat: 'YYYY-MM-DD HH:mm:ss' 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: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 200, width: 200,
fixed: 'right' fixed: 'right'
}
} }
} ])
])) )
//表单校验 //表单校验
export const InspectionRecordMainRules = reactive({ 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 { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' 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({ export const InspectionMainRules = reactive({
requestStartTime: [required], requestStartTime: [required],
itemCode: [required], itemCode: [required],
requestEndTime: [required], requestEndTime: [required],
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], batch: [required, { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }],
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], requestInspectionNum: [
referenceCertificateRow: [{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], required,
{ validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
],
referenceCertificateRow: [
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
inspectionType: [required], inspectionType: [required],
minPackageQty: [required], minPackageQty: [required]
}) })
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionMain = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '申请编码', {
field: 'number', label: '申请编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
table: { isSearch: true,
width: 200, table: {
fixed: 'left' width: 200,
}, fixed: 'left'
form:{ },
componentProps:{ form: {
disabled:true 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')]
} }
}, },
isForm:false, {
form: { label: '发货单号',
component: 'DatePicker', field: 'asnNumber',
componentProps: { sort: 'custom',
type: 'datetime', isSearch: false,
valueFormat: 'x' isForm: false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 150
} }
}, },
table: { {
width: 120 label: '申请日期',
}, field: 'applicationDate',
detail: { sort: 'custom',
dateFormat: 'YYYY-MM-DD' formatter: dateFormatter2,
}, isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '申请时间', componentProps: {
field: 'applicationTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', isForm: false,
componentProps: { form: {
valueFormat: 'YYYY-MM-DD HH:mm:ss', component: 'DatePicker',
type: 'daterange', componentProps: {
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 120
},
detail: {
dateFormat: 'YYYY-MM-DD'
} }
}, },
isForm:false, {
form: { label: '申请时间',
component: 'DatePicker', field: 'applicationTime',
componentProps: { sort: 'custom',
type: 'datetime', formatter: dateFormatter,
valueFormat: 'x' 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' label: '要求开始时间',
}, field: 'requestStartTime',
table: { sort: 'custom',
width: 175 formatter: dateFormatter,
} isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '要求开始时间', componentProps: {
field: 'requestStartTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', form: {
componentProps: { component: 'DatePicker',
valueFormat: 'YYYY-MM-DD HH:mm:ss', componentProps: {
type: 'daterange', type: 'datetime',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '要求结束时间',
componentProps: { field: 'requestEndTime',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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' label: '完成时间',
}, field: 'finishTime',
table: { sort: 'custom',
width: 175 formatter: dateFormatter,
} isSearch: false,
}, search: {
{ component: 'DatePicker',
label: '要求结束时间', componentProps: {
field: 'requestEndTime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
sort: 'custom', type: 'daterange',
formatter: dateFormatter, defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
isSearch: false, }
search: { },
component: 'DatePicker', form: {
componentProps: { component: 'DatePicker',
valueFormat: 'YYYY-MM-DD HH:mm:ss', componentProps: {
type: 'daterange', type: 'datetime',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 175
} }
}, },
form: { {
component: 'DatePicker', label: '供应商编码',
componentProps: { field: 'supplierCode',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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' label: '供应商名称',
}, field: 'supplierName',
table: { sort: 'custom',
width: 175 isSearch: false,
} table: {
}, width: 175
{ },
label: '完成时间', form: {
field: 'finishTime', componentProps: {
sort: 'custom', disabled: true
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', label: '物料编码',
componentProps: { field: 'itemCode',
type: 'datetime', sort: 'custom',
valueFormat: 'x' 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: 'batch',
}, sort: 'custom',
{ isSearch: false,
label: '供应商编码', table: {
field: 'supplierCode', width: 150
sort: 'custom', }
isSearch: false,
table: {
width: 175
}, },
form:{ {
componentProps: { label: '待检数量',
isSearchList: true, // 开启查询弹窗 field: 'requestInspectionNum',
searchTitle: '供应商信息', // 查询弹窗标题 sort: 'custom',
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 isSearch: false,
searchField: 'code', // 查询弹窗赋值字段 table: {
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 width: 150
multiple:false,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
}
},
{
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
isSearch: false,
table: {
width: 175
}, },
form:{ {
componentProps: { label: '参考订单号',
disabled:true field: 'referenceOrderCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
} }
}
},
{
label: '物料编码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form:{ {
componentProps: { label: '参考订单行',
isSearchList: true, // 开启查询弹窗 field: 'referenceOrderRow',
searchTitle: '物料信息', // 查询弹窗标题 sort: 'custom',
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 isSearch: false,
searchField: 'code', // 查询弹窗赋值字段 form: {
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法 component: 'InputNumber',
multiple:false, value: 0
searchCondition: [{ },
key: 'available', table: {
value: 'TRUE', width: 150
isMainValue: false
}]
} }
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form:{ {
componentProps: { label: '参考凭证号',
disabled:true 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: 'referenceCertificateRow',
}, sort: 'custom',
{ isSearch: false,
label: '参考凭证号', form: {
field: 'referenceCertificateCode', component: 'InputNumber',
sort: 'custom', value: 0
isSearch: false, },
table: { table: {
width: 150 width: 150
} }
},
{
label: '参考凭证行',
field: 'referenceCertificateRow',
sort: 'custom',
isSearch: false,
form: {
component: 'InputNumber',
value: 0
}, },
table: { {
width: 150 label: '检验类型',
} field: 'inspectionType',
}, sort: 'custom',
{ isSearch: false,
label: '检验类型', dictType: DICT_TYPE.INSPECTION_TYPE,
field: 'inspectionType', dictClass: 'string',
sort: 'custom', form: {
isSearch: false, componentProps: {}
dictType: DICT_TYPE.INSPECTION_TYPE, },
dictClass: 'string', table: {
form: { width: 175
componentProps: {
} }
}, },
table: { {
width: 175 label: '小包装数',
} field: 'minPackageQty',
}, sort: 'custom',
{ isSearch: false,
label: '小包装数', form: {
field: 'minPackageQty', component: 'InputNumber',
sort: 'custom', value: 0
isSearch: false, },
form: { table: {
component: 'InputNumber', width: 150
value: 0 }
}, },
table: { {
width: 150 label: '检验水平',
} field: 'inspectionLevel',
}, { sort: 'custom',
label: '检验水平', dictType: DICT_TYPE.INSPECTION_LEVEL,
field: 'inspectionLevel', dictClass: 'string',
sort: 'custom', table: {
dictType: DICT_TYPE.INSPECTION_LEVEL, width: 150
dictClass: 'string', },
table: { isSearch: true
width: 150 },
{
label: 'aql',
field: 'aql',
sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string',
table: {
width: 150
}
}, },
isSearch: true, {
}, { label: '操作',
label: 'aql', field: 'action',
field: 'aql', isForm: false,
sort: 'custom', table: {
dictType: DICT_TYPE.BASIC_AQL, width: 240,
dictClass: 'string', fixed: 'right'
table: { }
width: 150
}
}, {
label: '操作',
field: 'action',
isForm: false,
table: {
width: 240,
fixed: 'right'
} }
} ])
])) )
// 表单校验 // 表单校验
export const InspectionRequestPackageRules = reactive({ export const InspectionRequestPackageRules = reactive({
// packageCode: [required], // packageCode: [required],
// packageSpecificationCode: [required], // packageSpecificationCode: [required],
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], amount: [required, { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }],
measuringUnit: [required], measuringUnit: [required]
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionRequestPackage = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: '编码', {
field: 'number', label: '编码',
sort: 'custom', field: 'number',
isSearch: true, sort: 'custom',
tableForm:{ isSearch: true,
disabled:true tableForm: {
}, disabled: true
isTableForm:false, },
form:{ isTableForm: false,
componentProps:{ form: {
disabled:true componentProps: {
disabled: true
}
} }
}
},
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
},
},
{
label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm:{
disabled:false
}, },
}, {
{ label: '包装号',
label: '数量', field: 'packageCode',
field: 'amount', sort: 'custom',
sort: 'custom', isSearch: true,
isSearch: false, tableForm: {
form: { disabled: false
component: 'InputNumber', }
value: 0
}, },
tableForm:{ {
disabled:false label: '包装规格',
field: 'packageSpecificationCode',
sort: 'custom',
isSearch: true,
tableForm: {
disabled: false
}
}, },
}, {
{ label: '数量',
label: '计量单位', field: 'amount',
field: 'measuringUnit', sort: 'custom',
sort: 'custom', isSearch: false,
isSearch: true, form: {
tableForm:{ component: 'InputNumber',
disabled:false 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-form>
<el-tabs <el-tabs
v-model="editableTabsValue" v-model="editableTabsValue"
editable closable
class="demo-tabs" class="demo-tabs"
@edit="handleTabsEdit" @edit="handleTabsEdit"
type="border-card" type="border-card"

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

@ -81,6 +81,18 @@
:label="item.description" :label="item.description"
:name="item.name" :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> <div class="small-title">检验工序</div>
<!-- <Form <!-- <Form
:ref="`formRefProcess`+index" :ref="`formRefProcess`+index"
@ -1016,6 +1028,19 @@ const changeIsTarget = (e,item) => {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false 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> </script>
<style scoped> <style scoped>
.small-title { .small-title {

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -111,38 +111,36 @@ import {
CountPlanDetail, CountPlanDetail,
CountPlanDetailRules, CountPlanDetailRules,
CountPlanMain, CountPlanMain,
CountPlanMainRules, CountPlanMainRules
} from './countPlanMain.data' } from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain' import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail' 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 * 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 * 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 * 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 * 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 * 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 * as AreaApi from '@/api/wms/areabasic'
import { import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
Locationgroup
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationgroupApi from '@/api/wms/locationgroup' 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 LocationApi from '@/api/wms/location'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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' import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue'
// //
@ -412,11 +410,28 @@ const openForm = async (type: string, row?: any) => {
] // ] //
row = row ? row : {} row = row ? row : {}
// row.dimension = 'BY_INEVNEOTY' // row.dimension = 'BY_INEVNEOTY'
CountPlanMain.allSchemas.formSchema.forEach((item) => { // CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') { // if (item.field == 'crontab') {
item.componentProps.disabled = true // 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) formRef.value.open(type, row)
// Promise.all([getOwnerAllList(), // Promise.all([getOwnerAllList(),
@ -572,7 +587,7 @@ const detailOpenForm = (type, row) => {
}) })
break break
} }
} else if ( row.type == 'PROJECT') { } else if (row.type == 'PROJECT') {
formTypeDetail.value = 'InputString' formTypeDetail.value = 'InputString'
} }
} }
@ -635,7 +650,7 @@ const handleAddTable = () => {
// //
const handleDeleteTable = (item, index) => { const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item) let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){ if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1) tableData.value.splice(itemIndex, 1)
} }
} }
@ -644,6 +659,15 @@ const tableSelectionDelete = (selection) => {
} }
// //
const submitForm = async (formType, data) => { 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) => { data.subList = tableData.value.map((item) => {
return { return {
type: item.type, type: item.type,
@ -721,22 +745,34 @@ const selectChange = (field, val) => {
} }
}) })
} }
  formRef.value.formRef.setValues({ formRef.value.formRef.setValues({
       crontab:'' crontab: ''
    }) })
if (val == 'DYNAMIC') { // if (val == 'DYNAMIC') {
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)' // CountPlanMain.allSchemas.formSchema.forEach(item=>{
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 // if(item.field == 'limitedValue'){
CountPlanMain.allSchemas.formSchema[3].componentProps.max = 100 // item.label = '%'
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false // item.componentProps.min = 0
} else if (val == 'LOW' || val == 'RANDOM') { // item.componentProps.max = 100
CountPlanMain.allSchemas.formSchema[3].label = '限值' // item.componentProps.disabled = false
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0 // }
CountPlanMain.allSchemas.formSchema[3].componentProps.max = Infinity // })
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = false // } else if (val == 'LOW' || val == 'RANDOM') {
} else { // CountPlanMain.allSchemas.formSchema.forEach(item=>{
CountPlanMain.allSchemas.formSchema[3].componentProps.disabled = true // 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') // const formTypeDetail = ref('InputString') //
@ -823,7 +859,7 @@ const selectChangeDetail = (field, val) => {
case 'ITEMS_CODE': case 'ITEMS_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => { CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') { if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true item.componentProps.isSearchList = true
item.componentProps.searchTitle = '物品信息' item.componentProps.searchTitle = '物品信息'
item.componentProps.searchAllSchemas = Itembasic.allSchemas item.componentProps.searchAllSchemas = Itembasic.allSchemas
item.componentProps.searchPage = ItembasicApi.getItembasicPage item.componentProps.searchPage = ItembasicApi.getItembasicPage
@ -833,7 +869,7 @@ const selectChangeDetail = (field, val) => {
case 'WAREHOUSE_CODE': case 'WAREHOUSE_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => { CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') { if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true item.componentProps.isSearchList = true
item.componentProps.searchTitle = '仓库信息' item.componentProps.searchTitle = '仓库信息'
item.componentProps.searchAllSchemas = Warehouse.allSchemas item.componentProps.searchAllSchemas = Warehouse.allSchemas
item.componentProps.searchPage = WarehouseApi.getWarehousePage item.componentProps.searchPage = WarehouseApi.getWarehousePage
@ -843,7 +879,7 @@ const selectChangeDetail = (field, val) => {
case 'AREABASIC_CODE': case 'AREABASIC_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => { CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') { if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库区信息' item.componentProps.searchTitle = '库区信息'
item.componentProps.searchAllSchemas = Area.allSchemas item.componentProps.searchAllSchemas = Area.allSchemas
item.componentProps.searchPage = AreaApi.getAreaPage item.componentProps.searchPage = AreaApi.getAreaPage
@ -853,7 +889,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATIONGROUP_CODE': case 'LOCATIONGROUP_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => { CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') { if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息' item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Locationgroup.allSchemas item.componentProps.searchAllSchemas = Locationgroup.allSchemas
item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage item.componentProps.searchPage = LocationgroupApi.getLocationgroupPage
@ -863,7 +899,7 @@ const selectChangeDetail = (field, val) => {
case 'LOCATION_CODE': case 'LOCATION_CODE':
CountPlanDetail.allSchemas.formSchema.forEach((item) => { CountPlanDetail.allSchemas.formSchema.forEach((item) => {
if (item.field == 'value') { if (item.field == 'value') {
item.componentProps.isInpuFocusShow = true item.componentProps.isSearchList = true
item.componentProps.searchTitle = '库位组信息' item.componentProps.searchTitle = '库位组信息'
item.componentProps.searchAllSchemas = Location.allSchemas item.componentProps.searchAllSchemas = Location.allSchemas
item.componentProps.searchPage = LocationApi.getLocationPage 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' 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: '库位代码', label: '库位代码',
field: 'locationCode', field: 'locationCode',

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

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

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

@ -518,6 +518,30 @@ export const CountadjustRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6 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: '库位代码', label: '库位代码',
field: 'locationCode', field: 'locationCode',

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

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

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

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

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

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

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

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

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

@ -883,7 +883,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 350
}, },
form: { form: {
componentProps: { componentProps: {
@ -896,7 +896,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 350
}, },
tableForm:{ tableForm:{
multiple:true, multiple:true,
@ -923,7 +923,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'planQty', field: 'planQty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 350
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -946,7 +946,7 @@ export const DeliverPlanDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 360
}, },
tableForm: { tableForm: {
disabled: true, 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" :detailAllSchemas="StockupDetailJob.allSchemas"
:detailAllSchemasRules="StockupDetailJobRules" :detailAllSchemasRules="StockupDetailJobRules"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
:apiPage="StockupJobDetailApi.getStockupDetailJobPage" :apiPage="StockupJobDetailApi.getStockupDetailJobPage"
/> />
</template> </template>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductionreturnRequestMainRules" :rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas" :formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -193,8 +195,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}) })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code'] val.forEach(item=>{
row['fromLocationCode'] = val[0]['rawLocationCode'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
} else if(formField == 'packUnit') { } else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] 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:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
@success="getList" @success="getList"
:rules="ProductdismantleRequestMainRules" :rules="ProductdismantleRequestMainRules"
:formAllSchemas="ProductdismantleRequestMain.allSchemas" :formAllSchemas="ProductdismantleRequestMain.allSchemas"
@ -269,7 +271,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['bomVersion'] = '' row['bomVersion'] = ''
row['childList'] = [] row['childList'] = []
} else { } 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 { } else {
const setV = {} const setV = {}

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

@ -474,6 +474,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' 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'){ if(formField=='itemCode'){
// row[formField] = val[0][searchField] // row[formField] = val[0][searchField]
val.forEach(item=>{ val.forEach(async item=>{
if(tableData.value.find(item1=>item1['id'] == item['id'])) return if(tableData.value.find(item1=>item1['id'] == item['id'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['id'] = item['id'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainAssemble' }) defineOptions({ name: 'ProductionMainAssemble' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainASparePart' }) defineOptions({ name: 'ProductionMainASparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 ProductionDetailApi from '@/api/wms/productionDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as ItemBasicApi from '@/api/wms/itembasic' import * as ItemBasicApi from '@/api/wms/itembasic'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductionMainPredictSparePart' }) defineOptions({ name: 'ProductionMainPredictSparePart' })
@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
val.forEach(item=>{ val.forEach(async item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField] newRow[formField] = item[searchField]
newRow['uom'] = item['uom'] 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) tableData.value.push(newRow)
}) })
} else { } 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 { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
// //
// //
defineOptions({ name: 'ProductreceiptRequestMain' }) defineOptions({ name: 'ProductreceiptRequestMain' })
@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField] 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') { }else if (formField == 'workStationCode') {
// //
val.forEach(item=>{ 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 { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductreceiptRequestMainA' }) defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField] 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') { }else if (formField == 'workStationCode') {
// //
val.forEach(item=>{ 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 * as PackageApi from '@/api/wms/package'
import { formatTime } from '@/utils/index' import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import * as BomApi from "@/api/wms/bom";
import { import {
SupplierdeliverRequestPackage SupplierdeliverRequestPackage
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' } 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['uom'] = res[0]['uom']
} }
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
// BOM
console.log('获取计量单位',res) 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{ }else{
// //
val.forEach(item=>{ val.forEach(item=>{

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductrepairRequestMainRules" :rules="ProductrepairRequestMainRules"
:formAllSchemas="ProductrepairRequestMain.allSchemas" :formAllSchemas="ProductrepairRequestMain.allSchemas"
@ -247,8 +249,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else if(formField == 'productionLineCode'){ } else if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code'] row['productionLineCode'] = val[0]['code']
} else if(formField == 'workStationCode'){ } 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'){ } else if(formField == 'formField'){
row['workStationCode'] = val[0]['code'] row['workStationCode'] = val[0]['code']
} else if(formField == 'bomVersion'){ } 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, sortTableDefault:5,
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
@ -917,6 +918,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
}, },
sortTableDefault:17, sortTableDefault:17,
tableForm: { tableForm: {
disabled: true,
type: 'Select' type: 'Select'
} }
}, },

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

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

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

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

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

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

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

@ -146,6 +146,8 @@
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="poLine" fieldTableColumn="poLine"
:annexTable="detailAnnexTable" :annexTable="detailAnnexTable"
direction="horizontal"
:column="3"
:annexAlias="{ :annexAlias="{
hidden:true, hidden:true,
label:t('ts.其他附件') label:t('ts.其他附件')
@ -196,7 +198,7 @@
}) })
}" }"
:isBasic="false" :isBasic="false"
:allSchemas="SupplierinvoiceRequestMain.allSchemas" :allSchemas="SupplierinvoiceRequestDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" :detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRequestDetailRules" :detailAllSchemasRules="SupplierinvoiceRequestDetailRules"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
@ -244,7 +246,8 @@ import dayjs from 'dayjs'
SupplierinvoiceRequestFinance, SupplierinvoiceRequestFinance,
SupplierinvoiceRequestFinanceRules, SupplierinvoiceRequestFinanceRules,
PurchasePass, PurchasePass,
PurchasePassRules PurchasePassRules,
SupplierinvoiceRequestDetailMain
} from './supplierinvoiceRequestMain.data' } from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain' import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' 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) => { const singlePriceFormart = (row, column, cellValue) => {
cellValue= Number(cellValue).toFixed(5) cellValue= Number(cellValue).toFixed(2)
cellValue = cellValue + '' || '' cellValue = cellValue + '' || ''
let x = cellValue.split('.') let x = cellValue.split('.')
@ -1281,6 +1655,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
disabled: true, disabled: true,
min: 0, min: 0,
@ -1288,6 +1663,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
tableForm:{ tableForm:{
type: 'InputNumber',
disabled: true, disabled: true,
min: 0, min: 0,
precision: 2, precision: 2,

Loading…
Cancel
Save