Browse Source

YT-1162,YT-1062,YT-1114: 问题修复

intex
ljlong_2630 6 days ago
parent
commit
ca26eb9bbd
  1. 260
      src/components/ImportForm/src/ImportFormOnlyAdd.vue
  2. 225
      src/components/ImportForm/src/ImportFormStep.vue
  3. 4
      src/utils/dict.ts
  4. 46
      src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  5. 16
      src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/index.vue
  6. 46
      src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  7. 21
      src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue
  8. 61
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts
  9. 11
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue
  10. 48
      src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  11. 21
      src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/index.vue
  12. 46
      src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts
  13. 21
      src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/index.vue

260
src/components/ImportForm/src/ImportFormOnlyAdd.vue

@ -1,6 +1,14 @@
<!-- 导入组件 -->
<template>
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false">
<Form
ref="formRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@opensearchTable="opensearchTable"
style="margin-top:20px"
/>
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
@ -16,7 +24,8 @@
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
'&toInventoryStatus=' + toInventoryStatus +
(formRef?.formModel ? Object.entries(formRef.formModel).map(([key, value]) => `&${key}=${value}`).join('') : '')
"
:auto-upload="false"
:disabled="formLoading"
@ -99,6 +108,17 @@
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
<SearchTable
ref="searchTableRef"
:showSearchTableQueryFields="showSearchTableQueryFields"
:hiddenFilterBtnFields="hiddenFilterBtnFields"
:isCheckStrictly="isCheckStrictly"
@searchTableSuccess="searchTableSuccess"
>
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }">
<slot :name="name" :selections="selections"></slot>
</template>
</SearchTable>
</Dialog>
</template>
<script lang="ts" setup>
@ -198,6 +218,47 @@ const props = defineProps({
required: false,
default: false
},
//
formSchema: {
type: Array,
required: false,
default: () => []
},
//
confirmFormSuccess: {
type: Function,
required: false,
},
detailData:{
type:Object,
required: false,
default: () => ({})
},
isSearch:{
type:Boolean,
default:false
},
showSearchTableQueryFields: {
type: Array,
required: false,
default: []
},
hiddenFilterBtnFields:{
type: Array,
required: false,
default: []
},
//
isJiaoyan: {
type: Boolean,
required: false,
default: false
},
// true ; false
isCheckStrictly:{
type:Boolean,
default:false
},
})
const importTemplateData = ref(props.importTemplateData)
const accept = ref(props.accept)
@ -207,7 +268,7 @@ const appendIsDisable = ref(props.appendIsDisable) //追加是否禁用,默认
const coverIsDisable = ref(props.coverIsDisable) //,
const updatePart = ref(props.updatePart) //
const outFile = ref(props.outFile) //
const formRef = ref() //
const importUrl = getBaseUrl() + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */
@ -217,25 +278,65 @@ const open = () => {
}
defineExpose({ open }) // open
//
const emits = defineEmits([
'success',
'tableSelectionChange',
'tableSelectionDelete',
'tableFormSelectOnBlur',
'extendedButtonsClick',
'formSelectChange',
'formSelectvVisibleChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
'handleDeleteTable',
'handleAddTable',
'inpuFocus',
'searchTableSuccess',
'opensearchTable',
'submitForm',
'selectChange',
'selectChangeDetail',
'tableFormChange',
'buttonOperationClick',
'inputStringBlur',
'onChange',
'onBlur',
'onEnter',
'inputNumberChange',
'formFormDateChange',
'footButtonClick',
'clearSearchInput',
'clearInput',
'sumFormDataHandle',
'visibleChange'
])
/** 提交表单 */
const submitForm = async () => {
// -
const elForm = unref(formRef)?.getElFormRef()
if (!elForm) return
const valid = await elForm.validate()
if (!valid) return
if (fileList.value.length == 0) {
message.error('请上传文件')
return
}
//
//
const fileName = fileList.value[0].name
const fileExtension = fileName.substring(fileName.lastIndexOf('.')).toLowerCase()
const acceptedTypes = accept.value.split(',').map(type => type.toLowerCase())
//
if (!acceptedTypes.some(type => type === fileExtension || type === `.*${fileExtension}`)) {
message.error(`只能上传 ${accept.value} 格式的文件`)
return
}
file.value = fileName
//
uploadHeaders.value = {
Authorization: 'Bearer ' + getAccessToken(),
@ -245,8 +346,149 @@ const submitForm = async () => {
uploadRef.value!.submit()
}
/** 文件上传成功 */
const emits = defineEmits(['success'])
const searchTableRef = ref()
const opensearchTable = (
formField,
searchField,
searchTitle,
searchAllSchemas,
searchPage,
searchCondition,
multiple,
type,
row,
isConcatDetailSchemas = false,
searchDetailSchemas: any
) => {
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
//
let filters: any[] = []
for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// row
if (searchCondition[i].isMainValue) {
if (searchCondition[i].isFilterValue) {
//filters
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
})
} else {
_searchCondition[searchCondition[i].key] = formRef.value.formModel[
searchCondition[i].value
]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
//
let isNull = false
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
if(!searchCondition[i].isOptional){ //
isNull = true
}
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
if(searchCondition[i].isRemoveParams){
//
_searchCondition[searchCondition[i].key] = ''
}
}
} else if (searchCondition[i].isTableRowValue) {
if (searchCondition[i].required) {
if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
row[searchCondition[i].value]
//table
_searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
} else {
//
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if (searchCondition[i].required) {
if (
formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
if(!searchCondition[i].isOptional){ //
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
}
if(formRef.value.formModel[searchCondition[i].value]){
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
}
} else {
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
}
}
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
}
const _searchTableTitle = searchTitle
const _searchTableAllSchemas = searchAllSchemas
const _searchTablePage = searchPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
formField,
searchField,
multiple,
type,
row,
_searchCondition,
undefined,
isConcatDetailSchemas,
searchDetailSchemas
)
}
const submitFormSuccess = (response: any) => {
formLoading.value = true
console.log(response)
@ -333,6 +575,10 @@ const handleExceed = (): void => {
message.error('最多只能上传一个文件!')
}
const searchTableSuccess = (formField, searchField, val, type, row) => {
emits('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
/** 下载模板操作 */
const importTemplate = () => {
const res = importTemplateData.value.templateUrl

225
src/components/ImportForm/src/ImportFormStep.vue

@ -13,6 +13,7 @@
:rules="rules"
:schema="formSchema"
:is-col="true"
@opensearchTable="opensearchTable"
style="margin-top:20px"
/>
<el-upload
@ -92,6 +93,17 @@
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
<SearchTable
ref="searchTableRef"
:showSearchTableQueryFields="showSearchTableQueryFields"
:hiddenFilterBtnFields="hiddenFilterBtnFields"
:isCheckStrictly="isCheckStrictly"
@searchTableSuccess="searchTableSuccess"
>
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }">
<slot :name="name" :selections="selections"></slot>
</template>
</SearchTable>
</Dialog>
</template>
@ -103,6 +115,7 @@ import { UploadFilled, List, CircleCheckFilled,WarningFilled } from '@element-pl
import { waitForDebugger } from 'node:inspector/promises'
import * as XLSX from 'xlsx';
defineOptions({ name: 'ImportForm' })
const { t } = useI18n()
@ -185,6 +198,36 @@ const props = defineProps({
type: Function,
required: false,
},
detailData:{
type:Object,
required: false,
default: () => ({})
},
isSearch:{
type:Boolean,
default:false
},
showSearchTableQueryFields: {
type: Array,
required: false,
default: []
},
hiddenFilterBtnFields:{
type: Array,
required: false,
default: []
},
//
isJiaoyan: {
type: Boolean,
required: false,
default: false
},
// true ; false
isCheckStrictly:{
type:Boolean,
default:false
},
})
// tableObject
@ -198,6 +241,41 @@ const importUrl = ref('')
const active = ref(props.active)
const error = ref(false)
//
const emits = defineEmits([
'success',
'tableSelectionChange',
'tableSelectionDelete',
'tableFormSelectOnBlur',
'extendedButtonsClick',
'formSelectChange',
'formSelectvVisibleChange',
'tableSortChange',
'selectCallback',
'handleTableSelect',
'handleDeleteTable',
'handleAddTable',
'inpuFocus',
'searchTableSuccess',
'opensearchTable',
'submitForm',
'selectChange',
'selectChangeDetail',
'tableFormChange',
'buttonOperationClick',
'inputStringBlur',
'onChange',
'onBlur',
'onEnter',
'inputNumberChange',
'formFormDateChange',
'footButtonClick',
'clearSearchInput',
'clearInput',
'sumFormDataHandle',
'visibleChange'
])
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
@ -312,8 +390,147 @@ const submitForm = async () => {
fileReader.readAsArrayBuffer(originalFile)
}
/** 文件上传成功 */
const emits = defineEmits(['success'])
const searchTableRef = ref(null)
const opensearchTable = (
formField,
searchField,
searchTitle,
searchAllSchemas,
searchPage,
searchCondition,
multiple,
type,
row,
isConcatDetailSchemas = false,
searchDetailSchemas: any
) => {
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
//
let filters: any[] = []
for (var i = 0; i < searchCondition.length; i++) {
// searchCondition.forEach((item) => {
// row
if (searchCondition[i].isMainValue) {
if (searchCondition[i].isFilterValue) {
//filters
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
})
} else {
_searchCondition[searchCondition[i].key] = formRef.value.formModel[
searchCondition[i].value
]
? formRef.value.formModel[searchCondition[i].value]
: props.detailData
? props.detailData[searchCondition[i].value]
: row
? row[searchCondition[i].value]
: ''
//
let isNull = false
if (
_searchCondition[searchCondition[i].key] == '' ||
_searchCondition[searchCondition[i].key] == undefined
) {
if(!searchCondition[i].isOptional){ //
isNull = true
}
}
if (isNull) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
if(searchCondition[i].isRemoveParams){
//
_searchCondition[searchCondition[i].key] = ''
}
}
} else if (searchCondition[i].isTableRowValue) {
if (searchCondition[i].required) {
if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) {
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
row[searchCondition[i].value]
//table
_searchCondition[searchCondition[i].key] = row[searchCondition[i].value]
} else {
//
if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) {
//formModel
if (searchCondition[i].required) {
if (
formRef.value.formModel[searchCondition[i].value] == '' ||
formRef.value.formModel[searchCondition[i].value] == undefined
) {
if(!searchCondition[i].isOptional){ //
message.warning(
searchCondition[i].message ? searchCondition[i].message : '前置条件未选择!'
)
return
}
}
}
if(formRef.value.formModel[searchCondition[i].value]){
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: formRef.value.formModel[searchCondition[i].value]
})
}
} else {
filters.push({
action: searchCondition[i].action,
column: searchCondition[i].key,
value: searchCondition[i].value
})
}
} else {
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
}
}
if (filters.length > 0) {
_searchCondition.isSearch = true
_searchCondition.filters = filters
}
}
const _searchTableTitle = searchTitle
const _searchTableAllSchemas = searchAllSchemas
const _searchTablePage = searchPage
searchTableRef.value.open(
_searchTableTitle,
_searchTableAllSchemas,
_searchTablePage,
formField,
searchField,
multiple,
type,
row,
_searchCondition,
undefined,
isConcatDetailSchemas,
searchDetailSchemas
)
}
const submitFormSuccess = (response: any) => {
formLoading.value = true
console.log(response)
@ -445,6 +662,10 @@ const importTemplate = () => {
download.excel(res, importTemplateData.value.templateTitle)
}
const searchTableSuccess = (formField, searchField, val, type, row) => {
emits('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
const downloadDifferenceData = () => {
if (props.tableObject.tableList.length === 0) {
message.warning('没有可下载的差异数据');

4
src/utils/dict.ts

@ -412,6 +412,6 @@ export enum DICT_TYPE {
LINE_SCRAP_REASON = 'Reason_or_scrapping_of_production_line', // 线边报废原因(现场史力维护的字典)
CUSTOMER_STATEMENT_TYPE = 'customer_statement_type', // wms客户对账单 模具分摊状态
DELIVER_METHOD = 'deliver_method',
CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type' // 销售开票
CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type', // 销售开票
LEADERSHIP_MATERIAL_TYPE = 'leadership_material_type',
}

46
src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -1,6 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
/**
* @returns {Array}
*/
@ -871,3 +874,46 @@ export const DeliverRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
export const ExtendColumn = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
])
)
//表单校验
export const ExtendColumnRules = reactive({
requestNumber: [
{ required: true, message: '请选择从库位', trigger: 'change' }
],
})

16
src/views/wms/deliversettlementManage/directSupplyPinRecordMain/deliverRecordMain/index.vue

@ -69,14 +69,18 @@
@success="importSuccess"
:isShowDownloadBtn="true"
:extend="importExtend"
:formSchema="ExtendColumn.allSchemas.formSchema"
:rules="ExtendColumnRules"
accept=".xlsx,.xls"
:importTemplateData="importTemplateData"/>
:importTemplateData="importTemplateData"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain, DeliverRecordMainRules, DeliverRecordDetail, DeliverRecordDetailRules } from './deliverRecordMain.data'
import { DeliverRecordMain, DeliverRecordMainRules, DeliverRecordDetail, DeliverRecordDetailRules, ExtendColumn, ExtendColumnRules } from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -229,6 +233,14 @@ const importSuccess = () => {
getList()
}
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
if(formField == 'fromLocationCode'){
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
tableObject.params.businessType = 'DirectSupply'

46
src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -1,5 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
/**
* @returns {Array}
@ -871,3 +874,46 @@ export const DeliverRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
export const ExtendColumn = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
])
)
//表单校验
export const ExtendColumnRules = reactive({
requestNumber: [
{ required: true, message: '请选择从库位', trigger: 'change' }
],
})

21
src/views/wms/deliversettlementManage/ftSuppliesRecordMain/deliverRecordMain/index.vue

@ -56,13 +56,22 @@
:apiPage="DeliverRecordDetailApi.getDeliverRecordDetailPage"
/>
<!-- 导入 -->
<ImportFormOnlyAdd ref="importFormRef" :url="importUrl" @success="importSuccess" :isShowDownloadBtn="false" :extend="importExtend"/>
<ImportFormOnlyAdd
ref="importFormRef"
:url="importUrl"
@success="importSuccess"
:isShowDownloadBtn="false"
:formSchema="ExtendColumn.allSchemas.formSchema"
:rules="ExtendColumnRules"
:extend="importExtend"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules } from './deliverRecordMain.data'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules, ExtendColumn, ExtendColumnRules } from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -251,6 +260,14 @@ const importSuccess = () => {
getList()
}
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
if(formField == 'fromLocationCode'){
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
if (routeName.value == 'ToyotaSupplies') {

61
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '../../../basicDataManage/customerManage/customer/customer.data'
/**
* @returns {Array}
@ -893,6 +895,53 @@ export const DeliverRecordImport = useCrudSchemas(reactive<CrudSchema[]>([
field: 'customerOrderNumber',
sort: 'custom',
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'type',
value: 'DEFAULT',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '物料类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.LEADERSHIP_MATERIAL_TYPE,
dictClass: 'string',
},
{
label: '开始日期',
field: 'startDate',
@ -965,7 +1014,10 @@ export const DeliverRecordImportRules = reactive({
endNo: [
{ required: true, message: '请输入结束序号', trigger: 'change' },
{ type: 'number', message: '结束序号必须为数字', trigger: 'blur' }
]
],
type: [
{ required: true, message: '请选择顺引物料类型', trigger: 'blur' }
],
})
/**
@ -983,6 +1035,13 @@ export const ImportLeadershipDocTempData = useCrudSchemas(reactive<CrudSchema[]>
field: 'incorporationNumber',
sort: 'custom',
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.LEADERSHIP_MATERIAL_TYPE,
dictClass: 'string',
},
{
label: '订单号',
field: 'orderNumber',

11
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue

@ -72,12 +72,13 @@
accept=".txt"
:isShowDownloadBtn="false"
:confirmFormSuccess="confirmFormSuccess"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules,DeliverRecordImport,DeliverRecordImportRules,ImportLeadershipDocErrorData,ImportLeadershipDocTempData } from './deliverRecordMain.data'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules,DeliverRecordImport,DeliverRecordImportRules,ImportLeadershipDocErrorData,ImportLeadershipDocTempData} from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -265,6 +266,14 @@ const importTemplateData = reactive({
templateTitle: '已发未结发货记录主导入模版.xlsx'
})
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
if(formField == 'customerCode'){
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
tableObject.params.businessType = 'InducedProduct'

48
src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -1,5 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
/**
* @returns {Array}
@ -870,3 +874,47 @@ export const DeliverRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
export const ExtendColumn = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
])
)
//表单校验
export const ExtendColumnRules = reactive({
requestNumber: [
{ required: true, message: '请选择从库位', trigger: 'change' }
],
})

21
src/views/wms/deliversettlementManage/ssSuppliesRecordMain/deliverRecordMain/index.vue

@ -56,13 +56,22 @@
:apiPage="DeliverRecordDetailApi.getDeliverRecordDetailPage"
/>
<!-- 导入 -->
<ImportFormOnlyAdd ref="importFormRef" :url="importUrl" @success="importSuccess" :isShowDownloadBtn="false" :extend="importExtend"/>
<ImportFormOnlyAdd
ref="importFormRef"
:url="importUrl"
@success="importSuccess"
:isShowDownloadBtn="false"
:extend="importExtend"
:formSchema="ExtendColumn.allSchemas.formSchema"
:rules="ExtendColumnRules"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules } from './deliverRecordMain.data'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules,ExtendColumn, ExtendColumnRules } from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -251,6 +260,14 @@ const importSuccess = () => {
getList()
}
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
if(formField == 'fromLocationCode'){
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
if (routeName.value == 'ToyotaSupplies') {

46
src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/deliverRecordMain.data.ts

@ -1,5 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
/**
* @returns {Array}
@ -871,3 +874,46 @@ export const DeliverRecordDetailRules = reactive({
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
export const ExtendColumn = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '从库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
colProps: {
span: 24
}
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
isSearch: true
},
])
)
//表单校验
export const ExtendColumnRules = reactive({
requestNumber: [
{ required: true, message: '请选择从库位', trigger: 'change' }
],
})

21
src/views/wms/deliversettlementManage/tjdtSuppliesRecordMain/deliverRecordMain/index.vue

@ -56,13 +56,22 @@
:apiPage="DeliverRecordDetailApi.getDeliverRecordDetailPage"
/>
<!-- 导入 -->
<ImportFormOnlyAdd ref="importFormRef" :url="importUrl" @success="importSuccess" :isShowDownloadBtn="false" :extend="importExtend"/>
<ImportFormOnlyAdd
ref="importFormRef"
:url="importUrl"
@success="importSuccess"
:isShowDownloadBtn="false"
:extend="importExtend"
:formSchema="ExtendColumn.allSchemas.formSchema"
:rules="ExtendColumnRules"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules } from './deliverRecordMain.data'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules , ExtendColumn, ExtendColumnRules } from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -251,6 +260,14 @@ const importSuccess = () => {
getList()
}
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
if(formField == 'fromLocationCode'){
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}
/** 初始化 **/
onMounted(async () => {
if (routeName.value == 'ToyotaSupplies') {

Loading…
Cancel
Save