Browse Source

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

hella_online_20240904
gaojs 3 months ago
parent
commit
611a6c1d04
  1. 133
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  2. 683
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  3. 2
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

133
src/views/wms/productionManage/productscrap/productscrapRequestMain/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="ProductscrapRequestMainRules" :rules="ProductscrapRequestMainRules"
:formAllSchemas="ProductscrapRequestMain.allSchemas" :formAllSchemas="ProductscrapRequestMain.allSchemas"
@ -100,6 +100,7 @@
@searchTableSuccess="searchTableBomSuccess" @searchTableSuccess="searchTableBomSuccess"
:footButttondata="footButttondata" :footButttondata="footButttondata"
@footButtonClick="buttonBaseClickBom" @footButtonClick="buttonBaseClickBom"
@formSelectChange="formSelectChange"
/> />
@ -167,7 +168,7 @@ const isShowFooterButtton = ref(true)
const isShowReduceButtonSelection = ref(true) const isShowReduceButtonSelection = ref(true)
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getProductscrapBomRecordPage getListApi: BomDismantleApi.getProductscrapBomRecordPageBatch
}) })
const { getList:getDetailListBom } = detatableMethodsBom const { getList:getDetailListBom } = detatableMethodsBom
detatableDataBom.params.isRecord = false detatableDataBom.params.isRecord = false
@ -264,6 +265,8 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> {
detailQty.value = row.qty detailQty.value = row.qty
bomModelVisible.value = true bomModelVisible.value = true
detatableDataBom.params.isRecord = false detatableDataBom.params.isRecord = false
detatableDataBom.params.fromLocationCode = row.fromLocationCode
await getDetailListBom() await getDetailListBom()
console.log(row.fromLocationCode); console.log(row.fromLocationCode);
detatableDataBom.tableList.forEach(async (item) => { detatableDataBom.tableList.forEach(async (item) => {
@ -296,9 +299,9 @@ const buttonOperationClick = async (row, label, index,isSave = false)=> {
// }else { // }else {
item.qty = item.bomQty * row.qty item.qty = item.bomQty * row.qty
// } // }
const obj = await banchBomPage(row.fromLocationCode, item) // const obj = await banchBomPage(row.fromLocationCode, item)
console.log('obj',obj) // console.log('obj',obj)
item.batch = obj.batch // item.batch = obj.batch
}) })
if(isSave){ if(isSave){
buttonBaseClickBom('save') buttonBaseClickBom('save')
@ -381,51 +384,66 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if(formField == 'productionLineCode'){ if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code'] row['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){ }else if(formField == 'fromLocationCode'){
val.forEach(item=>{ // val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) // const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code'] row['workStationCode'] = val[0]['code']
newRow['fromLocationCode'] = item['rawLocationCode'] row['fromLocationCode'] = val[0]['rawLocationCode']
tableData.value.push(newRow) // tableData.value.push(newRow)
}) // })
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
}else if(formField == 'processCode'){ }else if(formField == 'processCode'){
row['processCode'] = val[0]['code'] row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){ }else if(formField == 'itemCode'){
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] val.forEach(async item=>{
row['bomVersion'] = '' const newRow = JSON.parse(JSON.stringify({...tableFormKeys}))
row['childList'] = [] newRow['itemCode'] = item['itemCode']
// newRow['uom'] = item['uom']
let param = {'itemCodes':val[0]['itemCode'] as string} newRow['childList'] = []
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => { newRow['singlePrice'] = item['singlePrice']
console.log(res) newRow['amount'] = newRow['qty']*item['singlePrice']
if(res&&res.length>0){
row['uom'] = res[0].uom if(item['bomList'].length>0){
row['singlePrice'] = res[0].price newRow['bomVersionInitOptions'] = item['bomList'].map(item1=>({
} label:item1,
}) value:item1
}))
newRow['bomVersion'] = item['bomList'][0]
}
// //
// let param = {'itemCodes':item['itemCode'] as string}
// let resyStdcost = await StdcostpriceApi.queryStdcostpriceByItemCode(param)
// console.log('resyStdcost',resyStdcost)
// if(resyStdcost&&resyStdcost.length>0){
// newRow['uom'] = resyStdcost[0].uom
// newRow['singlePrice'] = resyStdcost[0].price
// }
// BOM // BOM
const param1 = { // const param1 = {
productItemCode: val[0]['itemCode'], // productItemCode: item['itemCode'],
available: 'TRUE', // available: 'TRUE',
pageSize: 20, // pageSize: 20,
pageNo: 1, // pageNo: 1,
sort: '', // sort: '',
by: 'ASC', // by: 'ASC',
} // }
BomApi.getBomPage(param1).then(res => { // let resBom = await BomApi.getBomPage(param1)
console.log(res) // console.log('resBom',resBom)
if(res?.list?.length>0){ // if(resBom?.list?.length>0){
row['bomVersion'] = res.list[0].version // newRow['bomVersion'] = resBom.list[0].version
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true) // buttonOperationClick(newRow,'Bom',tableData.value.indexOf(newRow),true)
} // }
tableData.value.push(newRow)
}) })
}else if(formField == 'bomVersion'){ }else if(formField == 'bomVersion'){
row['bomVersion'] = val[0]['version'] row['bomVersion'] = val[0]['version']
buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true) buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
@ -436,37 +454,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'costCenterCode'){
//
//
setV['costCenterType'] = val[0]['costcentreType']
}
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
// // bom
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const formSelectChange= (field, val, row) => {
nextTick(() => { if (field == 'bomVersion') {
const setV = {} buttonOperationClick(row,'Bom',tableData.value.indexOf(row),true)
console.log("formField=="+formField+",val=="+val)
//
if(formField == 'productionLineCode'){
setV['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){
setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['fgLocationCode']
}else if(formField == 'processCode'){
setV['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
setV['itemCode'] = val[0]['itemCode']
setV['bomVersion'] = ''
setV['childList'] = []
//
let param = {'itemCodes':val[0]['itemCode'] as string}
StdcostpriceApi.queryStdcostpriceByItemCode(param).then(res => {
console.log(res)
})
}else if(formField == 'bomVersion'){
setV['bomVersion'] = val[0]['version']
} }
formRef.setValues(setV)
})
} }
// //

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

@ -20,9 +20,13 @@ import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
import * as BomApi from '@/api/wms/bom' import * as BomApi from '@/api/wms/bom'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main' import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data' import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -104,6 +108,138 @@ export const ProductscrapRequestMain = useCrudSchemas(
} }
} }
}, },
{
label: '报废原因',
field: 'scrappingReason',
dictType: DICT_TYPE.SCRAPPING_REASON,
dictClass: 'string',
isForm: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心原因代码',
searchField: 'code',
searchTitle: '原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costCenterCode',
value: 'costCenterCode',
message: '成本中代码不能为空!',
isMainValue: true
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择领用原因代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
@ -236,92 +372,6 @@ export const ProductscrapRequestMain = useCrudSchemas(
} }
} }
}, },
{
label: '班组',
field: 'team',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择班组',
searchField: 'code',
searchTitle: '班组信息',
searchAllSchemas: Team.allSchemas,
searchPage: TeamApi.getTeamPage,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择班次',
searchField: 'code',
searchTitle: '班次信息',
searchAllSchemas: Shift.allSchemas,
searchPage: ShiftApi.getShiftPage,
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '报废原因',
field: 'scrappingReason',
dictType: DICT_TYPE.SCRAPPING_REASON,
dictClass: 'string',
isForm: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '从仓库代码', label: '从仓库代码',
field: 'fromWarehouseCode', field: 'fromWarehouseCode',
@ -629,12 +679,12 @@ export const ProductscrapRequestMainRules = reactive({
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' } { required: true, message: '请选择车间代码', trigger: 'change' }
], ],
costCenterCode: [
{ required: true, message: '请选择成本中心代码', trigger: 'change' }
],
// dueTime: [ // dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' } // { required: true, message: '请选择截止时间', trigger: 'change' }
// ], // ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
@ -666,107 +716,217 @@ export const ProductscrapRequestMainRules = reactive({
*/ */
export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '从货主代码', label: '物料代码',
field: 'fromOwnerCode', field: 'itemCode',
sort: 'custom',
table: {
width: 150,
show: false
},
isTable: false,
isForm: false,
isTableForm: false,
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm:{ form: {
multiple: true, // labelMessage: '信息提示说明!!!',
// isInpuFocusShow: true, componentProps: {
disabled:true, enterSearch:true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 isSearchList: true, // 开启查询弹窗
searchField: 'code', // 查询弹窗赋值字段 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchTitle: '工位信息', // 查询弹窗标题 searchField: 'itemCode', // 查询弹窗赋值字段
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchCondition: [{ searchPage: ProductionlineitemApi.getProductionlineitemPageBom, // 查询弹窗所需分页方法
searchCondition: [
{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
},{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'itemCode',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
isSearch: true, isSearch: true,
isFormModel: true, isFormModel: true,
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}
}, },
form: { tableForm:{
// labelMessage: '信息提示说明!!!', multiple: true,
componentProps: { enterSearch:true,
isSearchList: true, // 开启查询弹窗 isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPageBom, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
},{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
}], }],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'itemCode',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
isSearch: true, isSearch: true,
isFormModel: true, isFormModel: true,
}], // 失去焦点校验参数 }], // 失去焦点校验参数
},
},
{
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type:'Select',
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
// searchField: 'version', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
},
form: {
componentProps: {
type:'Select',
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
// searchField: 'version', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
} }
},
},
{
label: '报废数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
max:9999,
// precision: 6
},
},
tableForm: {
type: 'InputNumber',
default:1,
min: 0,
max:9999,
precision: 0
} }
}, },
{ {
label: '工序代码', label: '计量单位',
field: 'processCode', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
enterSearch: true, type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码', disabled:true,
searchField: 'code', searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchTitle: '工序信息', searchField: 'code', // 查询弹窗赋值字段
searchAllSchemas: Process.allSchemas, searchTitle: '工位信息', // 查询弹窗标题
searchPage: ProcessApi.getProcessPage, searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
},{
key: 'itemCode',
value: 'itemCode',
message: '请选择物料代码',
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue:false
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'rawLocationCode',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
@ -777,17 +937,33 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch:true, isSearchList: true, // 开启查询弹窗
isSearchList: true, searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchListPlaceholder: '请选择工序代码', searchField: 'code', // 查询弹窗赋值字段
searchField: 'code', searchTitle: '工位信息', // 查询弹窗标题
searchTitle: '工序信息', searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchAllSchemas: Process.allSchemas, searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchPage: ProcessApi.getProcessPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key:'workshopCode',
value:'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
},{
key: 'itemCode',
value: 'itemCode',
message: '请选择物料代码',
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue:false
}], }],
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
@ -798,72 +974,94 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isFormModel: true, isFormModel: true,
}], // 失去焦点校验参数 }], // 失去焦点校验参数
} }
} },
isTable:true,
isTableForm:true,
}, },
{ {
label: '物料代码', label: '来源工位代码',
field: 'itemCode', field: 'workStationCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
},
form: { form: {
// labelMessage: '信息提示说明!!!', componentProps:{
componentProps: { disabled: true
enterSearch:true, }
isSearchList: true, // 开启查询弹窗 },
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 },
searchTitle: '生产线物料关系信息', // 查询弹窗标题 {
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 label: '从货主代码',
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150,
show: false
},
isTable: false,
isForm: false,
isTableForm: false,
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage,
searchCondition: [{ searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'code',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
isSearch: true, isSearch: true,
isFormModel: true, isFormModel: true,
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}
}, },
tableForm:{ form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true, enterSearch:true,
isInpuFocusShow: true, isSearchList: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择工序代码',
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'code',
searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '工序信息',
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Process.allSchemas,
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProcessApi.getProcessPage,
searchCondition: [{ searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'code',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
isSearch: true, isSearch: true,
isFormModel: true, isFormModel: true,
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}, }
}
}, },
{ {
label: '物料名称', label: '物料名称',
@ -875,52 +1073,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
{
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
message: '请填写物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
message: '请填写物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
@ -932,49 +1085,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false, isTable:false,
isTableForm:false, isTableForm:false,
}, },
{
label: '报废数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
max:9999,
// precision: 6
},
},
tableForm: {
type: 'InputNumber',
default:1,
min: 0,
max:9999,
// precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '单价', label: '单价',
field: 'singlePrice', field: 'singlePrice',
@ -1023,24 +1135,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false, isTable:false,
isTableForm:false, isTableForm:false,
}, },
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps:{
disabled: true
}
},
isTable:false,
isTableForm:false,
},
{ {
label: '包装号', label: '包装号',
@ -1285,7 +1380,7 @@ export const ProductscrapRequestDetailRules = reactive({
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],
workStationCode: [ workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' } { required: true, message: '请选择来源工位代码', trigger: 'change' }
], ],
qty:[ qty:[
{ validator:validateQty, message: '数量必须大于0', trigger: 'change'} { validator:validateQty, message: '数量必须大于0', trigger: 'change'}

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

@ -1779,7 +1779,7 @@ export const SupplierinvoiceRecordMainTransfer = useCrudSchemas(reactive<CrudSch
}, },
}, },
{ {
label: '回转日期11', label: '回转日期',
field: 'reversepostingdate', field: 'reversepostingdate',
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {

Loading…
Cancel
Save