Browse Source

YT-868:纳入受领书成功后没有入库问题

intex
ljlong_2630 2 weeks ago
parent
commit
551a72b444
  1. 8
      src/api/wms/deliverRecordMain/index.ts
  2. 89
      src/components/ImportForm/src/ImportFormStep.vue
  3. 12
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue

8
src/api/wms/deliverRecordMain/index.ts

@ -92,4 +92,12 @@ export const importDirectSupplyTemplate = () => {
return request.download({ url: '/wms/deliver-record-main/get-direct-supply-import-template' })
}
//纳入受领书导入成功,入库
export const inducedProductBatchUpdate = (data) => {
return request.post({ url: '/wms/leadership-incorporation-doc-request/induced-product-batch-update',data })
}

89
src/components/ImportForm/src/ImportFormStep.vue

@ -47,23 +47,24 @@
</template>
</el-upload>
</div>
<div v-if="active == 1">
<div class="red">
<div v-if="active == 1" class="step-two-container">
<div class="warning-message">
<el-icon color="#E44033" size="18" style="margin-right: 6px;"><WarningFilled /></el-icon>
纳入受领书数量与顺引发货记录数量不一致无法导入以下是差异数据
</div>
<Table v-clientTable
:columns="Array.isArray(currentColumns) ? currentColumns : []"
: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"
/>
<div class="table-container">
<Table v-clientTable
:columns="Array.isArray(currentColumns) ? currentColumns : []"
: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"
/>
</div>
</div>
<div v-else-if="active == 2" class="success">
<el-icon color="#409eff" size="60"><CircleCheckFilled /></el-icon>
@ -175,6 +176,11 @@ const props = defineProps({
required: false,
default: true
},
//
confirmFormSuccess: {
type: Function,
required: false,
},
})
// tableObject
@ -206,10 +212,26 @@ const formRef = ref()
/** 提交表单 */
const submitForm = async () => {
//
//
if (active.value === 1) {
active.value = 2
return
if (props.confirmFormSuccess) {
const result = await props.confirmFormSuccess(props.tableObject.tableList,
(msg)=>{
if(msg){
message.error(msg)
return
}else{
message.success(msg)
active.value = 2 //
return
}
}
)
}
}
if(active.value === 2){
dialogVisible.value = false
return;
}
const elForm = unref(formRef)?.getElFormRef()
@ -441,4 +463,37 @@ const importTemplate = () => {
align-items: center;
margin-top: 8px;
}
.step-two-container {
display: flex;
flex-direction: column;
height: 400px; //
.warning-message {
margin-bottom: 10px;
color: #E44033;
display: flex;
align-items: center;
}
.table-container {
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
:deep(.el-table) {
flex: 1;
overflow: hidden;
.el-table__body-wrapper {
overflow-y: auto;
}
}
:deep(.el-pagination) {
margin-top: 10px;
padding: 5px 0;
}
}
}
</style>

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

@ -71,6 +71,7 @@
@success="importSuccess"
accept=".txt"
:isShowDownloadBtn="false"
:confirmFormSuccess="confirmFormSuccess"
/>
</template>
<script setup lang="ts">
@ -242,6 +243,17 @@ const searchFormClick = (searchData) => {
getList() //
}
const confirmFormSuccess = (dataList,callback) => {
DeliverRecordMainApi.inducedProductBatchUpdate(dataList).then(res=>{
if (res && res.code == 200) {
getList()
}
callback(res.msg);
})
}
/** 导入 */
const importFormRef = ref()
const receiptOfInclusion = async () => {

Loading…
Cancel
Save