|
|
@ -60,6 +60,7 @@ |
|
|
|
@onEnter="onEnter" |
|
|
|
@inputNumberChange="inputNumberChange" |
|
|
|
@clearSearchInput="clearSearchInput" |
|
|
|
:key="updateKey" |
|
|
|
/> |
|
|
|
<!-- 添加明细:采购收货记录单号 --> |
|
|
|
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" /> |
|
|
@ -119,6 +120,7 @@ import { getAccessToken } from '@/utils/auth' |
|
|
|
import { getJmreportBaseUrl } from '@/utils/systemParam' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import { getSwitchByCode } from '@/api/wms/switch' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 客户退货申请 |
|
|
|
defineOptions({ name: 'CustomerreturnRequestMain' }) |
|
|
@ -131,8 +133,30 @@ const routeName = ref() |
|
|
|
const customerCode = ref() |
|
|
|
const genLabelId = ref(); //主表ID |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
const CustomerreturnRequestMainAllSchema =ref(JSON.parse(JSON.stringify(CustomerreturnRequestMain))) |
|
|
|
const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns, ...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
|
|
|
|
// 是否启用QMS开启显示q1q2q3 |
|
|
|
const EnableQms = ref(true) |
|
|
|
const updateKey = ref(0) |
|
|
|
const getSwitchByCode1 =async () => { |
|
|
|
await getSwitchByCode("EnableQms").then((res) => { |
|
|
|
EnableQms.value = res == 'TRUE' ? true : false |
|
|
|
if (EnableQms.value) { |
|
|
|
CustomerreturnRequestMain.allSchemas = CustomerreturnRequestMainAllSchema.value.allSchemas |
|
|
|
} else { |
|
|
|
CustomerreturnRequestMain.allSchemas.formSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number') |
|
|
|
CustomerreturnRequestMain.allSchemas.tableColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number') |
|
|
|
CustomerreturnRequestMain.allSchemas.tableFormColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number') |
|
|
|
CustomerreturnRequestMain.allSchemas.tableMainColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number') |
|
|
|
CustomerreturnRequestMain.allSchemas.detailSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number') |
|
|
|
CustomerreturnRequestMain.allSchemas.searchSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number') |
|
|
|
console.log(344,CustomerreturnRequestMain.allSchemas) |
|
|
|
} |
|
|
|
updateKey.value++ |
|
|
|
}) |
|
|
|
} |
|
|
|
getSwitchByCode1() |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -561,6 +585,7 @@ const showLabelSuccess = async (formField, searchField, val, formRef, type, row) |
|
|
|
const formRef = ref() |
|
|
|
const openForm =async (type: string, row?: number) => { |
|
|
|
originTableData.value = [] |
|
|
|
|
|
|
|
if(type == "update"){ |
|
|
|
CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'deliverRecordNumber'){ |
|
|
@ -577,6 +602,7 @@ const openForm =async (type: string, row?: number) => { |
|
|
|
// } |
|
|
|
}) |
|
|
|
}else { |
|
|
|
|
|
|
|
CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'deliverRecordNumber'){ |
|
|
|
item.componentProps.isSearchList = true |
|
|
@ -831,8 +857,11 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|
importTemplateData.templateUrl = await CustomerreturnRequestMainApi.importTemplate() |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
</script> |
|
|
|