|
|
@ -1,33 +1,21 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema,...RelegateRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="[...RelegateRequestMain.allSchemas.searchSchema, ...RelegateRequestDetail.allSchemas.searchSchema]" |
|
|
|
@search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="RelegateRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="RelegateRequestDetail.allSchemas" |
|
|
|
/> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
|
:allSchemas="RelegateRequestMain.allSchemas" :detailAllSchemas="RelegateRequestDetail.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
|
:pagination="{ |
|
|
|
<Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
> |
|
|
|
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort"> |
|
|
|
<template #number="{ row }"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
|
<span>{{ row.number }}</span> |
|
|
@ -40,9 +28,8 @@ |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="basicFormRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
<BasicForm ref="basicFormRef" |
|
|
|
:isOpenSearchTable="false" |
|
|
|
fieldTableColumn="itemCode" |
|
|
|
@success="getList" |
|
|
|
:rules="RelegateRequestMainRules" |
|
|
@ -52,18 +39,15 @@ |
|
|
|
:tableData="tableData" |
|
|
|
:apiUpdate="RelegateRequestMainApi.updateRelegateRequestMain" |
|
|
|
:apiCreate="RelegateRequestMainApi.createRelegateRequestMain" |
|
|
|
:isBusiness="true" |
|
|
|
fromeWhere="RelegateRequestMain" |
|
|
|
:isBusiness="true" fromeWhere="RelegateRequestMain" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
:isShowButton = isShowButton |
|
|
|
/> |
|
|
|
:isShowButton=isShowButton /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
<Detail ref="detailRef" |
|
|
|
:isBasic="true" |
|
|
|
:allSchemas="RelegateRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="RelegateRequestDetail.allSchemas" |
|
|
@ -75,11 +59,11 @@ |
|
|
|
fromeWhere="RelegateRequestMain" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
:detailButtonIsShowAdd="trueFalse" |
|
|
|
:detailButtonIsShowDelete="trueFalse" |
|
|
|
/> |
|
|
|
:detailButtonIsShowDelete="trueFalse" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/relegate-request-main/import" :importTemplateData="importTemplateData" |
|
|
|
@success="importSuccess" /> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
@ -99,6 +83,7 @@ const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
const businessType = 'relegate' |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref([...RelegateRequestMain.allSchemas.tableColumns, ...RelegateRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
const isShowButton = ref(true) |
|
|
@ -106,11 +91,34 @@ const isShowButton = ref(true) |
|
|
|
const trueFalse = ref(false) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
if (formField == 'itemCode') { |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
row['qty'] = val[0]['qty'] |
|
|
|
row['fromBatch'] = val[0]['batch'] |
|
|
|
row['fromPackingNumber'] = val[0]['packingNumber'] |
|
|
|
row['toBatch'] = val[0]['batch'] |
|
|
|
row['toPackingNumber'] = val[0]['packingNumber'] |
|
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
row['fromInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
} else if (formField == 'downItemCode') { |
|
|
|
row['downItemCode'] = val[0]['code'] |
|
|
|
} else if (formField == 'toLocationCode') { |
|
|
|
row['toLocationCode'] = val[0]['code'] |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
if (formField == 'fromWarehouseCode') { |
|
|
|
setV['fromWarehouseCode'] = val[0]['code'] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -118,15 +126,57 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
|
nextTick(() => { |
|
|
|
const setV = {} |
|
|
|
if(formField == 'itemCode') { |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
setV['uom'] = val[0]['customerUom'] |
|
|
|
}else { |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 修改 tableform 属性 |
|
|
|
RelegateRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if (item.field == 'itemCode') { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
if (item.field == "toLocationCode") { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|