Browse Source

HL-5465预生产和装配报工申请中修改物料选择方法

hella_online_20240821
zhang_li 3 months ago
parent
commit
cae2a034c1
  1. 477
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 185
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  3. 61
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  4. 36
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

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

@ -1,7 +1,14 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...ProductreceiptRequestMain.allSchemas.searchSchema,...ProductreceiptRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="[
...ProductreceiptRequestMain.allSchemas.searchSchema,
...ProductreceiptRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -17,7 +24,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -28,13 +36,16 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{row}"> <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,$index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -43,7 +54,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -60,12 +71,18 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
> >
<template v-slot="{row}"> <template v-slot="{ row }">
<el-date-picker v-bind:modelValue="row['expireTime']?addDay(row['produceDate'],row['expireTime']):dayjs('2099-12-31').valueOf()" <el-date-picker
v-bind:modelValue="
row['expireTime']
? addDay(row['produceDate'], row['expireTime'])
: dayjs('2099-12-31').valueOf()
"
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
:placeholder="t('ts.选择日期')"/> :placeholder="t('ts.选择日期')"
/>
</template> </template>
</BasicForm> </BasicForm>
@ -123,21 +140,37 @@
</Dialog> </Dialog>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productreceipt-request-main/import" :importTemplateData="importTemplateData" <ImportForm
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend="'predict'"/> ref="importFormRef"
url="/wms/productreceipt-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
:extend="'predict'"
/>
<!-- 标签打印 --> <!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> <SearchTable
style="width: 905px"
ref="searchTableRef"
@searchTableSuccess="searchTableSuccessLabel"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail, import {
ProductreceiptRequestDetailRules, BackflushDetailRequest, ProductreceiptRequestMain,
ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from './productreceiptRequestMain.data' ProductreceiptRequestMainRules,
import { ProductreceiptRequestDetail,
SupplierdeliverRequestPackage ProductreceiptRequestDetailRules,
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' BackflushDetailRequest,
ProductreceiptRequestLabel,
ProductreceiptRequestLabelRules
} from './productreceiptRequestMain.data'
import { SupplierdeliverRequestPackage } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
// } from '../../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' // } from '../../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain' import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain'
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail' import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail'
@ -149,7 +182,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"; import * as BomApi from '@/api/wms/bom'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
@ -163,9 +196,13 @@ 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([...ProductreceiptRequestMain.allSchemas.tableColumns,...ProductreceiptRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([
...ProductreceiptRequestMain.allSchemas.tableColumns,
...ProductreceiptRequestDetail.allSchemas.tableMainColumns
])
// table // table
const buttondataTable = ref([{ const buttondataTable = ref([
{
label: 'Bom', label: 'Bom',
name: 'bom', name: 'bom',
hide: false, hide: false,
@ -173,98 +210,98 @@ const buttondataTable = ref([{
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
}]) }
])
// //
const detailListTableColumns = ProductreceiptRequestLabel.allSchemas const detailListTableColumns = ProductreceiptRequestLabel.allSchemas
const isCreateLabel = ref(false) const isCreateLabel = ref(false)
const formLabelRef = ref() const formLabelRef = ref()
const labelType = ref('') // const labelType = ref('') //
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage getListApi: ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage
}) })
const { getList:getDetailList } = detatableMethods const { getList: getDetailList } = detatableMethods
// Bom // Bom
const DialogTitle = ref('Bom信息') const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false) const bomModelVisible = ref(false)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } = useTable({
getListApi: BackflushRequestDetailbApi.getBackflushRequestDetailbPage getListApi: BackflushRequestDetailbApi.getBackflushRequestDetailbPage
}) })
const { getList:getDetailListBom } = detatableMethodsBom const { getList: getDetailListBom } = detatableMethodsBom
// //
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(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'secondPackUnit') { if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit'] row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty'] row['secondPackQty'] = val[0]['packQty']
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}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']
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}else if (formField == 'itemCode') { } else if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
row['uom'] = val[0]['uom'] const index1 = 0
row['produceDate'] = dayjs().valueOf() setTableFormsValues(val, index1)
} else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
// BOM }
} else {
const setV = {}
setV[formField] = val[0][searchField]
if ('workshopCode' == formField) {
//
setV['productionLineCode'] = ''
tableData.value = []
} else if ('productionLineCode' == formField) {
//线
tableData.value = []
}
formRef.setValues(setV)
}
})
}
const setTableFormsValues = async (val, index1) => {
if (index1 <= val.length - 1) {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['produceDate'] = dayjs().valueOf()
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 => { await 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 newRow['bomVersion'] = res.list[0].version
} }
}) })
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(newRow) tableData.value.push(newRow)
}) console.log(tableData.value)
}else{ index1++
row[formField] = val[0][searchField] setTableFormsValues(val, index1)
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
if('workshopCode'==formField){
 //
setV['productionLineCode'] = ''
tableData.value = []
}else if('productionLineCode'==formField){
 //线
tableData.value = []
} }
formRef.setValues(setV)
}
})
} }
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -281,12 +318,12 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productreceipt-request-main:create'}), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:productreceipt-request-main:create' }), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productreceipt-request-main:import'}), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:productreceipt-request-main:import' }), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productreceipt-request-main:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:productreceipt-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -299,28 +336,34 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { //
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({ searchFormClick({
filters: tableObject.params.filters filters: tableObject.params.filters
}) })
} else { } else {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
@ -329,100 +372,137 @@ const isShowMainButton = (row,val) => {
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row, $index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']
if(findIndex>-1&&findIndex<$index){ ? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productreceipt-request-main:close'}), // defaultButtons.mainListCloseBtn({
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), // hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), // hasPermi: 'wms:productreceipt-request-main:close'
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), // }), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:agree'}), // defaultButtons.mainListReAddBtn({
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productreceipt-request-main:handle'}), // hide: isShowMainButton(row, ['4', '5']),
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:update'}), // hasPermi: 'wms:productreceipt-request-main:reAdd'
}), //
defaultButtons.mainListSubmitBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:productreceipt-request-main:submit'
}), //
defaultButtons.mainListTurnDownBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:productreceipt-request-main:refused'
}), //
defaultButtons.mainListApproveBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:productreceipt-request-main:agree'
}), //
defaultButtons.mainListHandleBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: 'wms:productreceipt-request-main:handle'
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:productreceipt-request-main:update'
}), //
{ {
label: '创建标签', label: '创建标签',
name: 'cjbq', name: 'cjbq',
hide: isShowMainButton(row,['3']), hide: isShowMainButton(row, ['3']),
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
}, },
defaultButtons.mainListPointBtn({hide:isShowMainButton(row,['3','6','8'])}), // defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3', '6', '8']) }) //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') {
//
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.close(row.masterId).then(() => { ProductreceiptRequestMainApi.close(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') {
//
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.reAdd(row.masterId).then(() => { ProductreceiptRequestMainApi.reAdd(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') {
//
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.submit(row.masterId).then(() => { ProductreceiptRequestMainApi.submit(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') {
//
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.refused(row.masterId).then(() => { ProductreceiptRequestMainApi.refused(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') {
//
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.agree(row.masterId).then(() => { ProductreceiptRequestMainApi.agree(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'cjbq') { // } else if (val == 'cjbq') {
//
// //
let isCreateLabel = false let isCreateLabel = false
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then(res => { }).then((res) => {
if (res) { if (res) {
if (res.list.length > 0) isCreateLabel = true if (res.list.length > 0) isCreateLabel = true
} }
@ -432,7 +512,7 @@ const buttonTableClick = async (val, row) => {
return return
} }
detatableData.params = { detatableData.params = {
masterId:row.masterId masterId: row.masterId
} }
await getDetailList() await getDetailList()
// //
@ -445,19 +525,19 @@ const buttonTableClick = async (val, row) => {
pageNo: 1, pageNo: 1,
code: item.itemCode, code: item.itemCode,
sort: '', sort: '',
by: 'ASC', by: 'ASC'
}).then(res => { }).then((res) => {
if (res.list.length > 0) { if (res.list.length > 0) {
// //
if (res.list[0].enableMake == "FALSE") { if (res.list[0].enableMake == 'FALSE') {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map((itemColumns) => {
if(itemColumns.field == 'productionLineCodePackage') { if (itemColumns.field == 'productionLineCodePackage') {
// itemColumns.tableForm.isInpuFocusShow = false // itemColumns.tableForm.isInpuFocusShow = false
// itemColumns.tableForm.disabled = true // itemColumns.tableForm.disabled = true
ProductreceiptRequestLabelRules.productionLineCodePackage[0].required = false ProductreceiptRequestLabelRules.productionLineCodePackage[0].required = false
} }
if(itemColumns.field == 'supplierItemCode') { if (itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = true itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = false itemColumns.tableForm.disabled = false
ProductreceiptRequestLabelRules.supplierItemCode[0].required = true ProductreceiptRequestLabelRules.supplierItemCode[0].required = true
@ -465,13 +545,13 @@ const buttonTableClick = async (val, row) => {
}) })
} else { } else {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map((itemColumns) => {
if(itemColumns.field == 'supplierItemCode') { if (itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = false itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true itemColumns.tableForm.disabled = true
ProductreceiptRequestLabelRules.supplierItemCode[0].required = false ProductreceiptRequestLabelRules.supplierItemCode[0].required = false
} }
if(itemColumns.field == 'productionLineCodePackage') { if (itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode item.productionLineCodePackage = item.productionLineCode
// itemColumns.tableForm.isInpuFocusShow = true // itemColumns.tableForm.isInpuFocusShow = true
// itemColumns.tableForm.disabled = false // itemColumns.tableForm.disabled = false
@ -485,13 +565,13 @@ const buttonTableClick = async (val, row) => {
} }
}) })
}) })
} else if (val == 'mainHandle') {
} else if (val == 'mainHandle') { // //
// //
let isCreateLabel = false let isCreateLabel = false
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then(res => { }).then((res) => {
if (res) { if (res) {
if (res.list.length > 0) isCreateLabel = true if (res.list.length > 0) isCreateLabel = true
} }
@ -501,39 +581,44 @@ const buttonTableClick = async (val, row) => {
return return
} }
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.handle(row.masterId).then(() => { ProductreceiptRequestMainApi.handle(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
}) })
} else if (val == 'edit') { // } else if (val == 'edit') {
//
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.masterId) handleDelete(row.masterId)
} else if (val == 'point') { // } else if (val == 'point') {
//
handlePoint(row) handlePoint(row)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
// //
if (type == 'update') { if (type == 'update') {
// tableform // tableform
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if(itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = false itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true itemColumns.componentProps.disabled = true
} }
}) })
} else { } else {
// tableform // tableform
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if(itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = true itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false itemColumns.componentProps.disabled = false
} }
@ -547,9 +632,11 @@ const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,'requestProductreceiptMain') detailRef.value.openDetail(row, titleName, titleValue, 'requestProductreceiptMain')
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -563,8 +650,9 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
tableObject.loading = false tableObject.loading = false
// //
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -578,7 +666,9 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(
tableObject.params
)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
@ -588,9 +678,9 @@ const handleExport = async () => {
/** /**
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
@ -604,25 +694,27 @@ 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)
} }
} }
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter((item) => !selection.includes(item))
} }
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = {...submitData} let data = { ...submitData }
if(data.masterId){ if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach((row, index) => { tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() row['expireDate'] = row['expireTime']
? addDay(row['produceDate'], row['expireTime']).valueOf()
: dayjs('2099-12-31').valueOf()
}) })
data.type = 'predict' data.type = 'predict'
data.subList = tableData.value // data.subList = tableData.value //
if(data.subList.find(item => (item.qty <= 0))) { if (data.subList.find((item) => item.qty <= 0)) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
formRef.value.formLoading = false formRef.value.formLoading = false
return return
@ -640,8 +732,8 @@ const submitForm = async (formType, submitData) => {
// //
if (formType === 'create') { if (formType === 'create') {
getList() getList()
}else{ } else {
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} }
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
@ -676,19 +768,21 @@ const searchFormClick = (searchData) => {
// //
const submitFormLabel = async (formType, submitData) => { const submitFormLabel = async (formType, submitData) => {
let data = {...submitData} let data = { ...submitData }
if(data.masterId){ if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
try { try {
console.log("aaaaa",data); console.log('aaaaa', data)
data.subList=detatableData.tableList data.subList = detatableData.tableList
console.log("bbbbb",data); console.log('bbbbb', data)
// //
await ProductreceiptRequestMainApi.productCreateLabel(data).then(res => { await ProductreceiptRequestMainApi.productCreateLabel(data)
.then((res) => {
isCreateLabel.value = true isCreateLabel.value = true
message.success('创建标签成功') message.success('创建标签成功')
}).catch(err => { })
.catch((err) => {
isCreateLabel.value = false isCreateLabel.value = false
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
@ -700,8 +794,9 @@ const submitFormLabel = async (formType, submitData) => {
} }
// Bom // Bom
const tableFormButton = async (val , row) => { const tableFormButton = async (val, row) => {
if (val == 'bom') { // bom if (val == 'bom') {
// bom
bomModelVisible.value = true bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = { detatableDataBom.params = {
@ -713,14 +808,14 @@ const tableFormButton = async (val , row) => {
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = false; let tag = false
if(data.qty <= 0){ if (data.qty <= 0) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
tag = false; tag = false
return tag; return tag
}else { } else {
tag = true; tag = true
return tag; return tag
} }
} }
@ -730,8 +825,9 @@ const handlePoint = async (row) => {
// //
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then((res) => { })
if(res.list.length > 0) { .then((res) => {
if (res.list.length > 0) {
isCreateLabel.value = true isCreateLabel.value = true
if (res.list[0].productionLineCode != null) { if (res.list[0].productionLineCode != null) {
labelType.value = 'zz' labelType.value = 'zz'
@ -741,7 +837,8 @@ const handlePoint = async (row) => {
} else { } else {
isCreateLabel.value = false isCreateLabel.value = false
} }
}).catch(err => { })
.catch((err) => {
isCreateLabel.value = false isCreateLabel.value = false
console.log(err) console.log(err)
}) })
@ -765,58 +862,60 @@ const searchTableRef = ref()
// //
const labelPrint = async (row) => { const labelPrint = async (row) => {
tableObject.loading = true tableObject.loading = true
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number} const defaultParams = { moduleName: 'productreceipt_predict', recordNumber: row.number }
const {tableObject:tableObjectPrint ,tableMethods} = useTable({ const { tableObject: tableObjectPrint, tableMethods } = useTable({
defaultParams, defaultParams,
getListApi: PackageApi.getLabelDetailPage // getListApi: PackageApi.getLabelDetailPage //
}) })
// //
const { getList:getListPrint } = tableMethods const { getList: getListPrint } = tableMethods
getListPrint() getListPrint()
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true)
} }
// -- // --
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val) console.log('批量打印', val)
// let rows:any = [] // let rows:any = []
// val.forEach(item=>{ // val.forEach(item=>{
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)] // rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
// }) // })
if(val.length == 0){ if (val.length == 0) {
message.warning("请先选择要打印的数据!") message.warning('请先选择要打印的数据!')
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(','))
.then((res) => {
console.log(res) console.log(res)
if (labelType.value == 'cg') { if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res) window.open(src.value + '&asn_number=' + res)
} else { } else {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res) window.open(src.value + '&asn_number=' + res)
} }
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
}) })
} }
const getDefaultWorkshopCode = async ()=>{ const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({ let res = await WorkshopApi.getWorkshopPage({
available: "TRUE" available: 'TRUE'
}) })
if(res&&res.list.length>0){ if (res && res.list.length > 0) {
if(res.list.find(item=>item.code=='PRC')){ if (res.list.find((item) => item.code == 'PRC')) {
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if(itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRC' itemColumns.value = 'PRC'
} }
}) })

185
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
@ -36,21 +36,21 @@ const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize: 10,
pageNo:1, pageNo: 1,
code:'ProductReceiptRequest' code: 'ProductReceiptRequest'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
@ -74,7 +74,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
isTable: true, isTable: true,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -95,7 +95,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: true, isSearch: true,
isForm: false, isForm: false,
isTable:true, isTable: true,
}, },
{ {
label: '车间代码', label: '车间代码',
@ -151,7 +151,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -172,7 +172,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -266,7 +266,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false isForm: false
}, },
{ {
@ -276,7 +276,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false, isForm: false,
}, },
{ {
@ -288,7 +288,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTable:false, isTable: false,
isForm: false, isForm: false,
}, },
{ {
@ -340,7 +340,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
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',
@ -382,7 +382,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
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',
@ -417,7 +417,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isForm:false, isForm: false,
table: { table: {
width: 150 width: 150
}, },
@ -452,7 +452,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
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',
@ -477,7 +477,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -498,7 +498,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -519,7 +519,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
isForm:false, isForm: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -613,7 +613,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
isTableForm: false, isTableForm: false,
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', searchListPlaceholder: '请选择生产线代码',
searchField: 'code', searchField: 'code',
@ -624,7 +624,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -644,7 +644,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'workshopCode', key: 'workshopCode',
value: 'workshopCode', value: 'workshopCode',
message: '请填写车间代码!', message: '请填写车间代码!',
@ -660,27 +660,26 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -693,8 +692,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true, enterSearch: true,
isSearchList: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -704,7 +703,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
@ -741,6 +740,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -783,8 +783,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
isTable:false, isTable: false,
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
@ -807,7 +807,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
dictClass: 'string', dictClass: 'string',
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -819,7 +819,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'woNumber', field: 'woNumber',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -831,7 +831,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'woLine', field: 'woLine',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -843,7 +843,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'packQty', field: 'packQty',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -864,7 +864,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// dictClass: 'string', // dictClass: 'string',
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -876,7 +876,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'toOwnerCode', field: 'toOwnerCode',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 150 width: 150
}, },
@ -888,7 +888,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
table: { table: {
width: 180 width: 180
}, },
@ -903,13 +903,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
sortTableDefault:1003, sortTableDefault: 1003,
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -919,12 +921,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',
@ -948,7 +953,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
@ -972,7 +977,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1004, sortTableDefault: 1004,
tableForm: { tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本 searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
@ -981,11 +986,11 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productItemCode', key: 'productItemCode',
value:'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
isMainValue: true isMainValue: true
},{ }, {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -1001,11 +1006,11 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类 searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法 searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'productItemCode', key: 'productItemCode',
value:'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
isMainValue: true isMainValue: true
},{ }, {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
@ -1017,7 +1022,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
sortTableDefault:1006, sortTableDefault: 1006,
table: { table: {
width: 150 width: 150
}, },
@ -1026,7 +1031,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
sortTableDefault:1005, sortTableDefault: 1005,
table: { table: {
width: 150 width: 150
}, },
@ -1036,7 +1041,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '物料描述1', label: '物料描述1',
field: 'itemDesc1', field: 'itemDesc1',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1048,7 +1053,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '物料描述2', label: '物料描述2',
field: 'itemDesc2', field: 'itemDesc2',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1060,7 +1065,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1073,7 +1078,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
sortTableDefault:1006, sortTableDefault: 1006,
table: { table: {
width: 150 width: 150
}, },
@ -1095,7 +1100,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'uom', field: 'uom',
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
sortTableDefault:1007, sortTableDefault: 1007,
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
@ -1114,7 +1119,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
detail: { detail: {
dateFormat: 'YYYY-MM-DD' dateFormat: 'YYYY-MM-DD'
}, },
sortTableDefault:1008, sortTableDefault: 1008,
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 180
@ -1126,7 +1131,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x',
@ -1136,7 +1141,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
{ {
label: '过期日期', label: '过期日期',
field: 'expireDate', field: 'expireDate',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
formatter: dateFormatter2, formatter: dateFormatter2,
detail: { detail: {
@ -1150,14 +1155,14 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// type: 'FormDate', // type: 'FormDate',
// valueFormat: 'x', // valueFormat: 'x',
// }, // },
tableForm:{ tableForm: {
type: 'slot', type: 'slot',
disabled: true disabled: true
}, },
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'}, style: { width: '100%' },
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x',
@ -1172,13 +1177,13 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain: true,
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
formatter: dateFormatter, formatter: dateFormatter,
sortTableDefault:1009, sortTableDefault: 1009,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
@ -1189,7 +1194,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
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',
@ -1202,7 +1207,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
sortTableDefault:1010, sortTableDefault: 1010,
table: { table: {
width: 150 width: 150
}, },
@ -1213,7 +1218,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
isTable: false, isTable: false,
hiddenInMain:true, hiddenInMain: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -1225,7 +1230,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
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',
@ -1238,7 +1243,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '最后更新者', label: '最后更新者',
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
hiddenInMain:true, hiddenInMain: true,
isTable: false, isTable: false,
table: { table: {
width: 150 width: 150
@ -1248,15 +1253,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
{ {
label: '操作', label: '操作',
hiddenInMain:true, hiddenInMain: true,
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false , isForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm: false,
} }
])) ]))
@ -1641,7 +1646,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
disabled: true disabled: true
// isInpuFocusShow: true, // isInpuFocusShow: true,
// searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 // searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
@ -1663,14 +1668,14 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'supplierCode', // 查询弹窗赋值字段 searchField: 'supplierCode', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题 searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition:[{ searchCondition: [{
key: 'itemCode', key: 'itemCode',
value: 'itemCode', value: 'itemCode',
message: '请填写物料代码!', message: '请填写物料代码!',
@ -1914,7 +1919,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
enterSearch:true, enterSearch: true,
disabled: true, disabled: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择包装', searchListPlaceholder: '请选择包装',
@ -1983,7 +1988,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
} }
}, },
tableForm: { tableForm: {
enterSearch:true, enterSearch: true,
disabled: true, disabled: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择包装', searchListPlaceholder: '请选择包装',
@ -2014,7 +2019,7 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
componentProps: { componentProps: {
disabled:true disabled: true
} }
}, },
tableForm: { tableForm: {

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

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -212,38 +212,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}else if (formField == 'itemCode') { } else if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
row['uom'] = val[0]['uom'] const index1 = 0
row['produceDate'] = dayjs().valueOf() setTableFormsValues(val, index1)
row[formField] = val[0][searchField] } else{
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(newRow)
})
}else{
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
} else { } else {
@ -261,6 +237,33 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}) })
} }
const setTableFormsValues = async (val, index1) => {
if (index1 <= val.length - 1) {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['produceDate'] = dayjs().valueOf()
const param1 = {
productItemCode: val[0]['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)
console.log(tableData.value)
index1++
setTableFormsValues(val, index1)
}
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {

36
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -670,27 +670,26 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -703,7 +702,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -713,7 +713,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
@ -750,6 +750,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -760,9 +761,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}, },
form: { form: {
enterSearch: true,
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择工序代码', searchListPlaceholder: '请选择工序代码',
searchField: 'code', searchField: 'code',
@ -912,13 +913,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
sortTableDefault: 1003,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1003, tableForm: {
tableForm:{
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -928,12 +931,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',
@ -957,7 +963,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{ }, {
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请填写生产线代码!',

Loading…
Cancel
Save