Browse Source

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

hella_online_20240816
ljlong_2630 3 months ago
parent
commit
95c0271d1e
  1. 164
      src/views/wms/countManage/count/countJobMain/index.vue
  2. 26
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  3. 467
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

164
src/views/wms/countManage/count/countJobMain/index.vue

@ -1,22 +1,27 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="CountJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="CountJobMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas" :allSchemas="CountJobMain.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -27,13 +32,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>
@ -58,7 +66,7 @@
ref="detailRef" ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="CountJobMain.allSchemas" :allSchemas="CountJobMain.allSchemas"
:detailAllSchemas="CountJobDetail.allSchemas" :detailAllSchemas="countJobDetailTableColumns"
:detailAllSchemasRules="CountJobDetailRules" :detailAllSchemasRules="CountJobDetailRules"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
:apiPage="CountJobDetailApi.getCountJobDetailPage" :apiPage="CountJobDetailApi.getCountJobDetailPage"
@ -76,17 +84,21 @@
:extend="rowMasterIdRef" :extend="rowMasterIdRef"
:isShowDownloadBtn="true" :isShowDownloadBtn="true"
/> />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CountJobMain,CountJobMainRules,CountJobDetail,CountJobDetailRules } from './countJobMain.data' import {
CountJobMain,
CountJobMainRules,
CountJobDetail,
CountJobDetailRules
} from './countJobMain.data'
import * as CountJobMainApi from '@/api/wms/countJobMain' import * as CountJobMainApi from '@/api/wms/countJobMain'
import * as CountJobDetailApi from '@/api/wms/countJobDetail' import * as CountJobDetailApi from '@/api/wms/countJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as PackageunitApi from "@/api/wms/packageunit"; import * as PackageunitApi from '@/api/wms/packageunit'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'CountJobMain' }) defineOptions({ name: 'CountJobMain' })
@ -106,16 +118,16 @@ const updataTableColumns = (val) => {
// //
const searchTableParams = ref([ const searchTableParams = ref([
//{ //{
// formField: 'productItemCode', // formField: 'productItemCode',
// searchTableTitle: '', // searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas, // searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage // searchTablePage: ItembasicApi.getItembasicPage
//} //}
]) ])
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
@ -141,7 +153,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
// //
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountJobMainApi.getCountJobMainPage // getListApi: CountJobMainApi.getCountJobMainPage //
@ -152,10 +164,10 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:count-job-main:export'}), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-job-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',
@ -168,24 +180,28 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'export') { // 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 {
@ -194,15 +210,17 @@ const isShowMainButton = (row,val) => {
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row, $index) => {
return [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobAccBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), // defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1', '2']),
hasPermi: 'wms:count-job-main:close'
}), //
{ {
label: '导出', label: '导出',
name: 'exportCountJob', name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']), hide: isShowMainButton(row, ['1', '2']),
type: 'primary', type: 'primary',
color: '', color: '',
link: true, // link: true, //
@ -211,58 +229,64 @@ const butttondata = (row,$index) => {
{ {
label: '导入', label: '导入',
name: 'importCountJob', name: 'importCountJob',
hide: isShowMainButton(row,['2']), hide: isShowMainButton(row, ['2']),
type: 'success', type: 'success',
color: '', color: '',
link: true, // link: true, //
hasPermi: '' // wms:count-job-main:importCountJob hasPermi: '' // wms:count-job-main:importCountJob
}, },
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListJobAbaBtn({ hide: isShowMainButton(row, ['2']) }), //
{ {
label: '完成', label: '完成',
name: 'done', name: 'done',
hide: isShowMainButton(row,['2']), hide: isShowMainButton(row, ['2']),
type: 'success', type: 'success',
color: '', color: '',
link: true, // link: true, //
hasPermi: '' // wms:count-job-main:importCountJob hasPermi: '' // wms:count-job-main:importCountJob
}, }
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), // // defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') {
//
console.log('列表-操作按钮事件-执行') console.log('列表-操作按钮事件-执行')
} else if (val == 'mainJobAba') { // } else if (val == 'mainJobAba') {
//
console.log('列表-操作按钮事件-放弃') console.log('列表-操作按钮事件-放弃')
tableObject.loading = true tableObject.loading = true
try { try {
await CountJobMainApi.abandonCountJobMain(row.id) await CountJobMainApi.abandonCountJobMain(row.id)
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} finally { } finally {
tableObject.loading = false tableObject.loading = false
} }
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') {
//
handleClose(row.id) handleClose(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') {
//
tableObject.loading = true tableObject.loading = true
try { try {
await CountJobMainApi.acceptCountJobMain(row.id) await CountJobMainApi.acceptCountJobMain(row.id)
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} finally { } finally {
tableObject.loading = false tableObject.loading = false
} }
console.log('列表-操作按钮事件-承接') console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){// } else if (val == 'exportCountJob') {
handleExportCountJob(row.id,row.number) //
} else if( val == 'importCountJob'){ // handleExportCountJob(row.id, row.number)
} else if (val == 'importCountJob') {
//
handleImport(row.id) handleImport(row.id)
} else if( val == 'done'){ // } else if (val == 'done') {
//
handleDone(row.id) handleDone(row.id)
} }
} }
/** 关闭按钮操作 */ /** 关闭按钮操作 */
@ -272,7 +296,7 @@ const handleClose = async (id: number) => {
tableObject.loading = true tableObject.loading = true
await CountJobMainApi.closeCountJobMain(id) await CountJobMainApi.closeCountJobMain(id)
message.success(t('common.closeSuccess')) message.success(t('common.closeSuccess'))
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} finally { } finally {
tableObject.loading = false tableObject.loading = false
} }
@ -283,21 +307,37 @@ const handleDone = async (id: number) => {
await message.confirm('确认完成吗?') await message.confirm('确认完成吗?')
tableObject.loading = true tableObject.loading = true
await CountJobMainApi.doneCountJobMain(id) await CountJobMainApi.doneCountJobMain(id)
buttonBaseClick('refresh',null) buttonBaseClick('refresh', null)
} finally { } finally {
tableObject.loading = false tableObject.loading = false
} }
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const countJobDetailTableColumns = 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,"jobCountMain") //
countJobDetailTableColumns.value.tableColumns = []
if (!row.isShow) {
CountJobDetail.allSchemas.tableColumns.forEach((item) => {
if (item.field != 'qty') {
countJobDetailTableColumns.value.tableColumns.push(item)
}
})
} else {
countJobDetailTableColumns.value.tableColumns = JSON.parse(
JSON.stringify(CountJobDetail.allSchemas.tableColumns)
)
}
detailRef.value.openDetail(row, titleName, titleValue, 'jobCountMain')
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -318,7 +358,7 @@ const handleExport = async () => {
} }
/** 单条任务导出 */ /** 单条任务导出 */
const handleExportCountJob = async (id: number,number: string) => { const handleExportCountJob = async (id: number, number: string) => {
try { try {
await message.exportConfirm() await message.exportConfirm()
exportLoading.value = true exportLoading.value = true
@ -327,7 +367,7 @@ const handleExportCountJob = async (id: number,number: string) => {
// download.excel(data, ''+number+'.xlsx') // download.excel(data, ''+number+'.xlsx')
download.excel(data, `${excelTitle.value}${number}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}${number}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
}finally { } finally {
exportLoading.value = false exportLoading.value = false
} }
} }
@ -336,7 +376,7 @@ const handleExportCountJob = async (id: number,number: string) => {
const importFormRef = ref() const importFormRef = ref()
const rowMasterIdRef = ref('') const rowMasterIdRef = ref('')
const handleImport = (id: string) => { const handleImport = (id: string) => {
rowMasterIdRef.value = id; rowMasterIdRef.value = id
importFormRef.value.open() importFormRef.value.open()
} }

26
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -54,10 +54,10 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
@success="getList" @success="getList"
:rules="PurchasereturnRequestMainRules" :rules="PurchasereturnRequestMainRulesNew"
:formAllSchemas="PurchasereturnRequestMain.allSchemas" :formAllSchemas="PurchasereturnRequestMainNew.allSchemas"
:tableAllSchemas="PurchasereturnRequestDetail.allSchemas" :tableAllSchemas="PurchasereturnRequestDetailNew.allSchemas"
:tableFormRules="PurchasereturnRequestDetailRules" :tableFormRules="PurchasereturnRequestDetailRulesNew"
:tableData="tableData" :tableData="tableData"
:apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain" :apiUpdate="PurchasereturnRequestMainApi.updatePurchasereturnRequestMain"
:apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain" :apiCreate="PurchasereturnRequestMainApi.createPurchasereturnRequestMain"
@ -140,15 +140,19 @@
<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 {
PurchasereturnRequestMainNew,
PurchasereturnRequestMainRulesNew,
PurchasereturnRequestDetailNew,
PurchasereturnRequestDetailRulesNew,
PurchasereturnPurchasereceiptRecordNew
} from './purchasereturnRequestMainNew.data'
import { import {
PurchasereturnRequestMain, PurchasereturnRequestMain,
PurchasereturnRequestMainRules,
PurchasereturnRequestDetail, PurchasereturnRequestDetail,
PurchasereturnRequestDetailRules, PurchasereturnRequestDetailRules,
PurchasereReturnRequestDetailLabel, PurchasereReturnRequestDetailLabel
PurchasereceiptRecordMain1, } from '../purchasereturnRequestMain/purchasereturnRequestMain.data'
PurchasereturnPurchasereceiptRecord
} from './purchasereturnRequestMain.data'
import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain' import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMain'
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
@ -275,7 +279,7 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
}) })
console.log('物料供应商',res) console.log('物料供应商',res)
if(res&&res.length>0){ if(res&&res.length>0){
PurchasereturnRequestMain.allSchemas.formSchema.forEach(item=>{ PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode'){ if(item.field == 'supplierCode'){
item.componentProps.options = res item.componentProps.options = res
} }
@ -604,7 +608,7 @@ const chooseReceiptList = ()=>{
} }
searchTableRef.value.open( searchTableRef.value.open(
"收货单明细", "收货单明细",
PurchasereturnPurchasereceiptRecord.allSchemas, PurchasereturnPurchasereceiptRecordNew.allSchemas,
PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode, PurchasereturnRequestDetailApi.getPurchasereturnPurchasereceiptRecordByItemCode,
"hahaha", "hahaha",
"hahaha", "hahaha",

467
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts → src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

@ -43,120 +43,10 @@ const userDept = userStore.userSelfInfo.dept
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray: any = [userDept] const userDeptArray: any = [userDept]
// 采购收货记录展示列
export const PurchasereceiptRecordMain1 = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
fixed: 'left',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '采购收货记录单号',
field: 'number',
fixed: 'left',
sort: 'custom',
table: {
width: 200
},
isSearch: true
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 180
},
sortTableDefault: 2,
isSearch: true
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
}
},
{
label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面
field: 'fromBatch',
sort: 'custom',
isForm: false,
isTableForm: false,
table: {
width: 150
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
// {
// label: '包装规格',
// field: 'packUnit',
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从库位代码',
// field: 'fromLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
//
// },
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
}
}
])
)
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const PurchasereturnRequestMain = useCrudSchemas( export const PurchasereturnRequestMainNew = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '物料代码', label: '物料代码',
@ -431,9 +321,53 @@ export const PurchasereturnRequestMain = useCrudSchemas(
} }
]) ])
) )
//表单校验
export const PurchasereturnRequestMainRulesNew = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
// purchaseReceiptRecordNumber: [
// { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
// ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
})
export const PurchasereturnPurchasereceiptRecordNew = useCrudSchemas(
export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '收货日期', label: '收货日期',
@ -556,56 +490,12 @@ export const PurchasereturnPurchasereceiptRecord = useCrudSchemas(
]) ])
) )
//表单校验
export const PurchasereturnRequestMainRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'blur' }
],
// purchaseReceiptRecordNumber: [
// { required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
// ],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
],
fromAreaTypes: [
{ required: true, message: '请选择从库区类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' }
],
})
/** /**
* @returns {Array} 退 * @returns {Array} 退
*/ */
export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
@ -731,264 +621,7 @@ export const PurchasereturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
])) ]))
//表单校验 //表单校验
export const PurchasereturnRequestDetailRules = reactive({ export const PurchasereturnRequestDetailRulesNew = reactive({
}) })
export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true
},
isTableForm: true,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isTable:false,
isTableForm: false,
isForm: false
},
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
},
},
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '从库位代码1',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
},
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// isTableForm: false,
// isForm: false
// },
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
type: 'Select'
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
isTableForm: true,
isForm: true
},
{
label: '包装规格',
field: 'packUnit',
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm:{
disabled:true
},
isTableForm: true,
isForm: true
},
]))
Loading…
Cancel
Save