|
|
|
@ -20,7 +20,9 @@
|
|
|
|
|
<!-- 头部左侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="Upload" @click="Pushstorage">推送入库</el-button> |
|
|
|
|
<el-button type="success" icon="Download" @click="Pushoutbounddelivery">推送出库</el-button> |
|
|
|
|
<el-button type="success" icon="Download" @click="Pushoutbounddelivery" |
|
|
|
|
>推送出库</el-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<!-- 头部右侧按钮模块 --> |
|
|
|
|
<div class="avue-crud__right"> |
|
|
|
@ -34,9 +36,17 @@
|
|
|
|
|
<!-- 首页表格 --> |
|
|
|
|
<el-row> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt class="tableNode" :columnList="details.columnList" :tableData="data" :loading="loadingObj.list" |
|
|
|
|
@inputTxt="inputsc" @timeCheck="timesc" @btnCheck="btnsc" @selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange"> |
|
|
|
|
<tablecmt |
|
|
|
|
class="tableNode" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
:tableData="data" |
|
|
|
|
:loading="loadingObj.list" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
|
<el-text @click="Pushstorage(slotProps.scope.row)">推送入库</el-text> |
|
|
|
@ -50,9 +60,17 @@
|
|
|
|
|
<el-row class="el-fy"> |
|
|
|
|
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> |
|
|
|
|
<div></div> |
|
|
|
|
<el-pagination align="right" background @size-change="sizeChange" @current-change="currentChange" |
|
|
|
|
:current-page="page.currentPage" :page-sizes="[30, 50, 80, 120]" :page-size="page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="page.total"> |
|
|
|
|
<el-pagination |
|
|
|
|
align="right" |
|
|
|
|
background |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
:current-page="page.currentPage" |
|
|
|
|
:page-sizes="[30, 50, 80, 120]" |
|
|
|
|
:page-size="page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="page.total" |
|
|
|
|
> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
@ -69,8 +87,12 @@
|
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
<edittablehead @closce="showdrawer" :drawerShow="drawerShow" :columnList="details.columnList" |
|
|
|
|
v-model="details.columnList"></edittablehead> |
|
|
|
|
<edittablehead |
|
|
|
|
@closce="showdrawer" |
|
|
|
|
:drawerShow="drawerShow" |
|
|
|
|
:columnList="details.columnList" |
|
|
|
|
v-model="details.columnList" |
|
|
|
|
></edittablehead> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
@ -78,7 +100,7 @@ import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue
|
|
|
|
|
import { columnList } from '@/option/op/Oppaidatapushback.js'; |
|
|
|
|
import { $_Getfactoryre, $_sendDataByChoes } from '@/api/op/index.js'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; //字典 |
|
|
|
|
import { processRowProperty, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import { handleTranslationDataSeclect, processRowProperty, setNodeHeight } from '@/utils/util'; |
|
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'; |
|
|
|
|
import { downloadXls } from '@/utils/util'; |
|
|
|
|
import { useStore } from 'vuex'; |
|
|
|
@ -301,7 +323,8 @@ const onLoad = () => {
|
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
details.data = res.data.data.records || []; |
|
|
|
|
details.page.total = res.data.data.total; |
|
|
|
|
stateData(details.data); |
|
|
|
|
handleTranslationDataSeclect(details.data, details.columnList); |
|
|
|
|
// stateData(details.data); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(error => { |
|
|
|
@ -313,7 +336,6 @@ const onLoad = () => {
|
|
|
|
|
}; |
|
|
|
|
// onLoad(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 常量定义 |
|
|
|
|
const PUSH_STATUS = { |
|
|
|
|
UNPUSHED: 0, |
|
|
|
@ -335,7 +357,9 @@ const pushData = async (selectionList, requiredStatus, newStatus, successMessage
|
|
|
|
|
|
|
|
|
|
if (!isValid) { |
|
|
|
|
return ElMessage({ |
|
|
|
|
message: `推送的数据必须都是${requiredStatus == PUSH_STATUS.UNPUSHED ? '未推送' : '已推送入库'}`, |
|
|
|
|
message: `推送的数据必须都是${ |
|
|
|
|
requiredStatus == PUSH_STATUS.UNPUSHED ? '未推送' : '已推送入库' |
|
|
|
|
}`, |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -345,15 +369,11 @@ const pushData = async (selectionList, requiredStatus, newStatus, successMessage
|
|
|
|
|
pushStatus: newStatus, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
ElMessageBox.confirm( |
|
|
|
|
`是否确认推送${successMessage}`, |
|
|
|
|
'提示', |
|
|
|
|
{ |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
ElMessageBox.confirm(`是否确认推送${successMessage}`, '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(async () => { |
|
|
|
|
try { |
|
|
|
|
details.loadingObj.list = true; |
|
|
|
@ -376,18 +396,26 @@ const pushData = async (selectionList, requiredStatus, newStatus, successMessage
|
|
|
|
|
details.loadingObj.list = false; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
.catch(() => {}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 批量推送入库 |
|
|
|
|
const Pushstorage = async (row) => { |
|
|
|
|
await pushData(row.id ? [row] : details.selectionList, PUSH_STATUS.UNPUSHED, PUSH_STATUS.PUSHED_IN, '入库'); |
|
|
|
|
const Pushstorage = async row => { |
|
|
|
|
await pushData( |
|
|
|
|
row.id ? [row] : details.selectionList, |
|
|
|
|
PUSH_STATUS.UNPUSHED, |
|
|
|
|
PUSH_STATUS.PUSHED_IN, |
|
|
|
|
'入库' |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
// 批量推送出库 |
|
|
|
|
const Pushoutbounddelivery = async (row) => { |
|
|
|
|
await pushData(row.id ? [row] : details.selectionList, PUSH_STATUS.PUSHED_IN, PUSH_STATUS.PUSHED_OUT, '出库'); |
|
|
|
|
const Pushoutbounddelivery = async row => { |
|
|
|
|
await pushData( |
|
|
|
|
row.id ? [row] : details.selectionList, |
|
|
|
|
PUSH_STATUS.PUSHED_IN, |
|
|
|
|
PUSH_STATUS.PUSHED_OUT, |
|
|
|
|
'出库' |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
// 清空 |
|
|
|
|
const searchReset = () => { |
|
|
|
@ -395,7 +423,7 @@ const searchReset = () => {
|
|
|
|
|
details.columnList.forEach(item => { |
|
|
|
|
item.values = ''; |
|
|
|
|
}); |
|
|
|
|
details.data=[] |
|
|
|
|
details.data = []; |
|
|
|
|
// onLoad(); |
|
|
|
|
}; |
|
|
|
|
// 页面初始化方法 |
|
|
|
|