|
|
@ -7,19 +7,13 @@ |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="PurchaseclaimRequestMain.allSchemas" |
|
|
|
/> |
|
|
|
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" |
|
|
|
:allSchemas="PurchaseclaimRequestMain.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"> |
|
|
@ -35,36 +29,22 @@ |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
@success="getList" |
|
|
|
:rules="PurchaseclaimRequestMainRules" |
|
|
|
:formAllSchemas="PurchaseclaimRequestMain.allSchemas" |
|
|
|
:tableAllSchemas="PurchaseclaimRequestDetail.allSchemas" |
|
|
|
:tableFormRules="PurchaseclaimRequestDetailRules" |
|
|
|
:tableData="tableData" |
|
|
|
<BasicForm ref="formRef" @success="getList" :rules="PurchaseclaimRequestMainRules" |
|
|
|
:formAllSchemas="PurchaseclaimRequestMain.allSchemas" :tableAllSchemas="PurchaseclaimRequestDetail.allSchemas" |
|
|
|
:tableFormRules="PurchaseclaimRequestDetailRules" :tableData="tableData" |
|
|
|
:apiUpdate="PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain" |
|
|
|
:apiCreate="PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain" |
|
|
|
:isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
/> |
|
|
|
:apiCreate="PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain" :isBusiness="true" |
|
|
|
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" /> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
|
:isBasic="false" |
|
|
|
:allSchemas="PurchaseclaimRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchaseclaimRequestDetail.allSchemas" |
|
|
|
:detailAllSchemasRules="PurchaseclaimRequestDetailRules" |
|
|
|
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchaseclaimRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="PurchaseclaimRequestDetail.allSchemas" :detailAllSchemasRules="PurchaseclaimRequestDetailRules" |
|
|
|
:apiCreate="PurchaseclaimRequestDetailApi.createPurchaseclaimRequestDetail" |
|
|
|
:apiUpdate="PurchaseclaimRequestDetailApi.updatePurchaseclaimRequestDetail" |
|
|
|
:apiPage="PurchaseclaimRequestDetailApi.getPurchaseclaimRequestDetailPage" |
|
|
|
:apiDelete="PurchaseclaimRequestDetailApi.deletePurchaseclaimRequestDetail" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
/> |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<ImportForm ref="importFormRef" url="/wms/purchaseclaim-request-main/import" :importTemplateData="importTemplateData" |
|
|
@ -99,8 +79,10 @@ const updataTableColumns = (val) => { |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
|
|
|
|
// 子表查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
row['poLine'] = val[0]['poLine'] |
|
|
@ -117,6 +99,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
// 主表查询页赋值 |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
|
|
|
|
if(formField=='asnNumber'){ |
|
|
|
// 获取子表数据 getBomDisassemble |
|
|
|
PurchasePlanDetailApi.getPurchasePlanDetailList({ |
|
|
|
number: val[0]['asnNumber']}).then(res => { |
|
|
|
if (res) tableData.value = res; |
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
item.batch = item.toBatch |
|
|
|
item.qty = 1 |
|
|
|
}) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setV['ppNumber'] = val[0]['ppNumber'] |
|
|
|
setV['supplierCode'] = val[0]['supplierCode'] |
|
|
|
formRef.setValues(setV) |
|
|
@ -125,7 +126,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} |
|
|
|
// 查询页面返回——详情 |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { |
|
|
|
console.log(456) |
|
|
|
nextTick(() => { |
|
|
|
|
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
setV['poLine'] = val[0]['poLine'] |
|
|
@ -314,9 +317,7 @@ const submitForm = async (formType, data) => { |
|
|
|
getList() |
|
|
|
} finally { |
|
|
|
formRef.value.formLoading = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|