Browse Source

YT-1078生产退料申请创建标签页面不应该同时显示“标签生产线代码”和“标签供应商代码”字段

intex
zhang_li 1 week ago
parent
commit
8fb48c2b4d
  1. 44
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

44
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -83,7 +83,7 @@
ref="formLabelRef"
@success="getList"
:tableAllSchemas="detailListTableColumns"
:tableFormRules="ProductionreturnRequestDetailLabelRules"
:tableFormRules="detailListTableColumnsRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@ -118,6 +118,7 @@ import * as LocationApi from '@/api/wms/location'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
const { loadStart, loadDone } = usePageLoading()
import { cloneDeep } from 'lodash-es'
// 退
defineOptions({ name: 'ProductionreturnRequestMain' })
@ -130,7 +131,8 @@ routeName.value = route.name
const tableColumns = ref([...ProductionreturnRequestMain.allSchemas.tableColumns,...ProductionreturnRequestDetail.allSchemas.tableMainColumns])
//
const detailListTableColumns = ProductionreturnRequestDetailLabel.allSchemas
const detailListTableColumns =cloneDeep(ProductionreturnRequestDetailLabel.allSchemas)
const detailListTableColumnsRules =cloneDeep(ProductionreturnRequestDetailLabel)
const isCreateLabel = ref(false)
const formLabelRef = ref()
const labelType = ref('') //
@ -558,15 +560,13 @@ const buttonTableClick = async (val, row) => {
}).then(res => {
if (res.list.length > 0) {
//
detailListTableColumnsRules.value = cloneDeep(ProductionreturnRequestDetailLabelRules)
if (res.list[0].enableBuy == "TRUE") {
// tableform
detailListTableColumns.tableFormColumns = ProductionreturnRequestDetailLabel.allSchemas.tableFormColumns.filter(item=>item.field != 'productionLineCodePackage')
delete detailListTableColumnsRules.value.productionLineCodePackage
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
// tableform
if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = false
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true
formLabelRef.value.formLoading = true
SupplieritemApi.getSupplieritemPage({
pageSize: 10,
pageNo: 1,
@ -579,27 +579,14 @@ const buttonTableClick = async (val, row) => {
})
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false
}
})
}
//
if (res.list[0].enableMake == "TRUE") {
// tableform
// tableform
detailListTableColumns.tableFormColumns = ProductionreturnRequestDetailLabel.allSchemas.tableFormColumns.filter(item=>item.field != 'supplierItemCode')
delete detailListTableColumnsRules.value.supplierItemCode
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') {
item.productionLineCodePackage = item.productionLineCode
itemColumns.tableForm.isInpuFocusShow = true
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true
formLabelRef.value.formLoading = true
ProductionlineitemApi.getProductionlineitemPage({
pageNo: 1,
code: item.itemCode,
@ -611,15 +598,6 @@ const buttonTableClick = async (val, row) => {
})
}
})
} else {
// tableform
detailListTableColumns.tableFormColumns.map(itemColumns => {
if(itemColumns.field == 'productionLineCodePackage') {
itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true
ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false
}
})
}
} else {
message.warning('没有查询到物料代码:【' + item.itemCode + '】')

Loading…
Cancel
Save