Browse Source

【nev-pad】暂存

ag_report_nev
安虹睿 12 months ago
parent
commit
32461edfd7
  1. 9
      fe/PC/src/api/wms-pad.js
  2. 7
      fe/PC/src/components/currenDescriptions/index.vue
  3. 2
      fe/PC/src/components/currenForm/index.vue
  4. 6
      fe/PC/src/layout/index.vue
  5. 63
      fe/PC/src/mixins/padListPageMixins.js
  6. 47
      fe/PC/src/styles/padMain.scss
  7. 254
      fe/PC/src/views/padManage/components/padListPage/index.vue
  8. 333
      fe/PC/src/views/padManage/isPadForTransferLibJob_new.vue
  9. 245
      fe/PC/src/views/padManage/isPadForpadListPage_jt.vue

9
fe/PC/src/api/wms-pad.js

@ -27,3 +27,12 @@ export function pageLockToLogout(params) {
params: params,
})
}
// 库移-查看余额
export function inventoryBalanceUsableList(params) {
return request({
url: baseURL + 'wms/inventory/inventory-balance/usable-list',
method: 'get',
params: params,
})
}

7
fe/PC/src/components/currenDescriptions/index.vue

@ -35,6 +35,13 @@
<span v-else-if="item.type && item.type == 'filter'">
{{ propsData[item.prop] | trigger(item.filters,"label", item.dictType) }}
</span>
<span v-else-if="item.type && item.type == 'tagFilter'">
<el-tag
size="small"
:style="{color:'#fff',borderColor:'rgba(0,0,0,0)'}"
:color="propsData[item.prop] | trigger(item.filters, 'background')"
>{{ propsData[item.prop] | trigger(item.filters,"label", item.dictType) }}</el-tag>
</span>
<span v-else-if="item.type && item.type == 'objectFilter'">
{{ propsData[item.prop]?propsData[item.prop][item.showProp]:false | trigger(item.filters,"label") }}
</span>

2
fe/PC/src/components/currenForm/index.vue

@ -253,7 +253,7 @@
@change="radioChange(item.prop,$event)"
>
<el-radio
v-for="ra in searchOptions[item.radio]"
v-for="ra in item.options || searchOptions[item.radio]"
:label="ra.id"
:key="ra.value"
>{{ ra.label }}</el-radio

6
fe/PC/src/layout/index.vue

@ -57,7 +57,11 @@ export default {
data() {
return {
//
isOnlyAppMainPages:['isPadForTransferLibJob','isPadForTransferLibJob_new','isPadForKittingPack']
isOnlyAppMainPages:[
'isPadForTransferLibJob',
'isPadForTransferLibJob_new',
'isPadForKittingPack',
]
}
},
methods: {

63
fe/PC/src/mixins/padListPageMixins.js

@ -1,6 +1,8 @@
import { getPageList } from "@/api/wms-api";
export const padListPageMixins = {
data() {
return{
listUrl:null,
// searchForm:[],// 查询条件属性
// searchFormData:null,//查询条件数据
padListLoading:false,//页面加载
@ -14,15 +16,37 @@ export const padListPageMixins = {
},
// 查询条件配置
padListParams:{
sorting: null,
sorting: "",
maxResultCount: 10,
skipCount:0,
condition:{filters:null}
condition:{filters:[]}
}
}
},
methods:{
initPadParams(page){
// 页面初始化
initPage(){
this.initPadParams()
this.getPadList()
let _this = this
document.getElementById("padListCard").addEventListener('scroll', function() {
_this.handleScroll()
});
},
// 滚动加载
handleScroll(){
let windowHeight = document.getElementById("padListCard").clientHeight;
let scrollHeight = document.getElementById("padListCard").scrollHeight;
let scrollTop = document.getElementById("padListCard").scrollTop;
if (scrollTop + windowHeight >= scrollHeight - 30) {
let page = Number(JSON.stringify(this.padListPager.currentPage + 1))
if(Number(page) > Number(this.padListPager.totalPage))return
console.log('翻页')
this.getPadList(page);
}
},
// 初始化列表参数
initPadParams(page = 1){
this.padListParams={
sorting: null,
maxResultCount: this.padListPager.pageSize,
@ -32,6 +56,28 @@ export const padListPageMixins = {
}
}
},
// 获取列表
getPadList(page=1){
if(this.padListLoading)return
console.log('请求页数',page)
if(page != 1 && (Number(page) > Number(this.padListPager.totalPage)))return
this.padListLoading = true
this.padListParams.skipCount = this.padListPager.pageSize * (Number(page) - 1),
getPageList(this.padListParams,this.listUrl,true).then(res => {
if(page == 1){this.padListData = []}
this.padListData = [
...this.padListData,
...res.items,
];
this.padListPager.totalCount = res.totalCount
this.padListPager.totalPage = Math.ceil(res.totalCount / this.padListPager.pageSize)
this.padListLoading = false
this.padListPager.currentPage = page
}).catch(err => {
this.padListLoading = false
console.log(err)
})
},
// 查询条件拼接
intSearchFilters(){
let _filters = []
@ -49,5 +95,16 @@ export const padListPageMixins = {
});
return _filters
},
// 清空筛选条件
clearSearchHandle(ifFlesh){
console.log(100)
for(let i in this.searchFormData){
this.searchFormData[i] = ""
}
if(ifFlesh){
this.initPadParams()
this.getPadList()
}
},
}
}

47
fe/PC/src/styles/padMain.scss

@ -10,11 +10,12 @@
.padListPageOuter{
height: 100%;
padding:15px;
overflow: auto;
}
.padListPage{
background:#fff;
height: 100%;
min-width:800px;
min-width:760px;
overflow:auto;
display: flex;
flex-direction: column;
@ -47,15 +48,16 @@
.padListRow{
box-shadow: 1px 1px 5px #ddd;
padding: 10px;
padding: 15px 10px;
background: #fff;
margin-bottom: 10px;
margin-bottom: 20px;
border-bottom: #ddd solid 1px;
}
.detailDataBox{
padding: 10px 10px 5px 10px;
border: #ddd dashed 1px;
margin-top: 10px;
}
}
@ -67,6 +69,7 @@
color: #999;
overflow: hidden;
box-shadow: 1px -1px 5px #ddd;
font-size: 14px;
::v-deep .el-loading-spinner {
display: flex;
@ -83,5 +86,43 @@
.listRowButtonBox{
text-align: right;
padding-top: 10px;
.el-button{
margin-left: 20px;
}
}
}
.showDetailsPop{
::v-deep .el-dialog__body{
padding: 0 10px !important;
}
.showDetailsBox{
height:calc(100vh - 220px);
overflow:auto;
.detailsRow{
margin-bottom: 20px;
.el-descriptions{
padding: 0 !important;
}
}
}
}
.commonRowTitle{
background: #ecf5ff;
padding: 10px;
border: 1px solid #e6ebf5;
border-bottom: none;
display: flex;
.el-tag{
margin-right: 10px;
}
.left{
width: 100%;
display: flex;
}
}

254
fe/PC/src/views/padManage/components/padListPage/index.vue

@ -32,6 +32,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchHandle">查询</el-button>
<el-button @click="resetSearchHandle">重置</el-button>
<el-button
v-for="(btnItem,btnIndex) in headerButton"
:key="btnIndex"
@ -45,25 +46,31 @@
<el-button circle icon="el-icon-upload2" type="primary" class="pageToTop" @click="pageToTopHandle"></el-button>
</div>
<!-- 列表 -->
<div class="padListCard" v-show="padListPager.totalCount" id="padListCard">
<div class="padListCard" v-show="padListData && padListData.length > 0" v-loading="padListLoading" id="padListCard">
<div
class="padListRow"
v-for="(item,index) in padListData"
:key="index"
>
<div class="commonRowTitle" :style="{background:getRowTitleBack(item)}">
<el-tag size="mini" effect="dark">{{index + 1}}</el-tag>
<!-- <div>aaa:{{item | initMainFirstColumn(item)}}</div> -->
<div>{{item[padMainFirstColumnProp] || item[padMainColumn[0].prop]}}</div>
</div>
<!-- 主表 -->
<div class="mainDataBox">
<curren-descriptions
:column="5"
:column="mainColumnNum"
:border="true"
:tabsDesTions="padMainColumn"
:propsData="item"
:labelStyle="{'margin-right':'5px'}"
></curren-descriptions>
</div>
<!-- 子表 todo封装时候确定是否为子表直接显示数据-->
<div class="detailDataBox">
<!-- 主表内直接显示的子表 -->
<div class="detailDataBox" v-if="mainIsShowDetail">
<curren-descriptions
:column="4"
:column="detailColumnNum"
:tabsDesTions="padDeatilColumn"
:propsData="item.details[0]"
:labelStyle="{'margin-right':'5px'}"
@ -75,34 +82,70 @@
v-for="(btnItem,btnIndex) in listRowButton"
:key="btnIndex"
:type="btnItem.type"
@click="headerButtonClick(btnItem,btnIndex)"
@click="listRowButtonClick(item,btnItem)"
:size="'mini'"
v-show="typeof btnItem.hide == 'function' ? !btnItem.hide(item) : !btnItem.hide"
>{{ btnItem.label }}</el-button>
<el-button
plain
type="primary"
v-if="showDetailBtn"
@click="showDetailHandel(item)"
:size="'mini'"
>查看明细</el-button>
</div>
</div>
</div>
<!-- 无数据 -->
<el-empty v-show="!padListPager.totalCount || padListPager.totalCount<=0" description="暂无数据"></el-empty>
<el-empty v-if="(!padListData || padListData.length <= 0) && !padListLoading" description="暂无数据"></el-empty>
<!-- 页脚 -->
<div class="padListPager" v-if="padListPager.totalCount">
<div v-loading="padListLoading" element-loading-text="拼命加载中">{{padListPager.currentPage}}/{{padListPager.totalPage}}</div>
<div class="padListPager" v-if="padListData && padListData.length > 0">
<div v-loading="padListLoading" element-loading-text="拼命加载中">当前页:{{padListPager.currentPage}}/{{padListPager.totalPage}}{{padListPager.totalCount}}条数据</div>
</div>
<!-- 查看明细 -->
<el-dialog
title="查看明细"
:visible="showDetailsVisible"
class="showDetailsPop"
top="5vh"
width="90%">
<div class="showDetailsBox" v-loading="showDetailsLoading">
<div
class="detailsRow"
v-for="(item,index) in currentDetailsData"
:key="index">
<div class="commonRowTitle">
<el-tag size="mini" effect="dark">{{index + 1}}</el-tag>
<div>{{item[padDetailFirstColumnProp] || item[padDeatilColumn[0].prop]}}</div>
</div>
<curren-descriptions
:border="true"
:column="detailPopColumnNum"
:direction="'horizontal'"
:tabsDesTions="padDeatilColumn"
:propsData="item"
style="width:100%;padding-top:20px"
></curren-descriptions>
</div>
<el-empty v-if="!currentDetailsData || currentDetailsData.length <= 0" description="暂无数据"></el-empty>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="showDetailsClose()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getPageList } from "@/api/wms-api";
import currenDescriptions from "@/components/currenDescriptions"
import { padListPageMixins } from "@/mixins/padListPageMixins"
import * as statusType from "@/filters/statusType"
import { getDetailed} from "@/api/wms-api"
export default {
name: 'padListPage',
components: { currenDescriptions },
mixins: [
padListPageMixins,
],
props:{
//
listUrl: {
// url
listUrl:{
type: String,
default: null
},
@ -137,6 +180,11 @@ export default {
return []
}
},
// title
padMainFirstColumnProp:{
type: String,
default: null
},
//
padDeatilColumn: {
type: Array,
@ -144,6 +192,11 @@ export default {
return []
}
},
// title
padDetailFirstColumnProp:{
type: String,
default: null
},
//
listRowButton: {
type: Array,
@ -151,89 +204,134 @@ export default {
return []
}
},
//
padListData:{
type: Array,
default: () => {
return []
}
},
//
padListLoading:{
type: Boolean,
default: false
},
//
padListPager:{
type: Object,
default: null
},
//
padListParams:{
type: Object,
default: null
},
//
getPadList:{
type: Function,
default: null
},
//
intSearchFilters:{
type: Function,
default: null
},
//
mainIsShowDetail:{
type: Boolean,
default: false
},
//
showDetailBtn:{
type: Boolean,
default: false
},
//
mainColumnNum:{
type: Number,
default: 3
},
//
detailColumnNum:{
type: Number,
default: 3
},
//
detailPopColumnNum:{
type: Number,
default: 2
},
},
watch: {
//
filters:{
handler(val, oldVal) {
console.log(666,val)
},
deep: true,
immediate: true,
},
headerButton:{
handler(val, oldVal) {
console.log(777,val)
},
deep: true,
immediate: true,
filters:{
initMainFirstColumn(item){
console.log(item)
return 1
},
},
data () {
return {
//
showDetailsVisible:false,
showDetailsLoading:false,
currentDetailsData:[],
}
},
mounted(){
this.initPage()
},
methods: {
//
initPage(){
this.initPadParams(1)
this.getPadList()
let _this = this
document.getElementById("padListCard").addEventListener('scroll', function() {
_this.handleScroll()
});
getRowTitleBack(item){
let _backRow = null
this.padMainColumn.forEach(item=>{ if(item.titleBack){ _backRow = item } })
if(_backRow){
let _filter = statusType.default[_backRow.filters]()
let _back = null
_filter.forEach(fItem=>{
if(fItem.value == item[_backRow.prop]){
_back = fItem.background + '1a'//
}
})
return _back || '#ecf5ff'
}else{
return '#ecf5ff'
}
},
//
pageToTopHandle(){
document.getElementById("padListCard").scrollTop = 0
},
//
handleScroll(){
let windowHeight = document.getElementById("padListCard").clientHeight;
let scrollHeight = document.getElementById("padListCard").scrollHeight;
let scrollTop = document.getElementById("padListCard").scrollTop;
if (scrollTop + windowHeight >= scrollHeight - 30) {
let page = Number(JSON.stringify(this.padListPager.currentPage + 1))
if(Number(page) > Number(this.padListPager.totalPage))return
console.log('翻页')
this.initPadParams(page)
this.getPadList(page);
}
},
getPadList(page=1){
if(this.padListLoading)return
console.log('请求页数',page)
if(page != 1 && (Number(page) > Number(this.padListPager.totalPage)))return
if(page == 1){this.padListData = []}
this.padListLoading = true
console.log(21111,this.padListParams.skipCount)
getPageList(this.padListParams,this.listUrl,true).then(res => {
this.padListData = [
...this.padListData,
...res.items,
];
this.padListPager.totalCount = res.totalCount
this.padListPager.totalPage = Math.ceil(res.totalCount / this.padListPager.pageSize)
this.padListLoading = false
this.padListPager.currentPage = page
}).catch(err => {
this.padListLoading = false
console.log(err)
})
},
//
searchHandle(){
this.pageToTopHandle()
this.padListParams.condition.filters = this.intSearchFilters()
this.getPadList()
this.$emit("headerSearchHandle")
},
clearSearchHandle(){
//
resetSearchHandle(){
this.$emit("resetSearchHandle")
},
//
headerButtonClick(item,index){
this.$emit("headerButtonClick",item,index)
},
//
listRowButtonClick(row,item){
this.$emit("listRowButtonClick",row,item)
},
//
showDetailHandel(row){
this.showDetailsVisible = true
this.showDetailsLoading = true
getDetailed(row.id, this.listUrl)
.then(res => {
this.showDetailsLoading = false
this.currentDetailsData = res.details
})
.catch(res => {
this.showDetailsLoading = false
})
},
showDetailsClose(){
this.currentDetailsData = []
this.showDetailsVisible = false
}
}
}

333
fe/PC/src/views/padManage/isPadForTransferLibJob_new.vue

@ -1,105 +1,368 @@
<template>
<div class="padListPageOuter">
<padListPage
:listUrl="listUrl"
ref="padListPage_Ref"
:listUrl="'wms/store/transfer-lib-job'"
:padListData="padListData"
:searchFormData="searchFormData"
:searchForm="searchForm"
:headerButton="headerButton"
:padMainColumn="padMainColumn"
:padDeatilColumn="padDeatilColumn"
:listRowButton="listRowButton"
:padListLoading="padListLoading"
:padListPager="padListPager"
:getPadList="getPadList"
:intSearchFilters="intSearchFilters"
:padListParams="padListParams"
:showDetailBtn="true"
:mainIsShowDetail="true"
@listRowButtonClick="listRowButtonClick"
@headerButtonClick="headerButtonClick"
:filters="filters"
@headerSearchHandle="headerSearchHandle"
@resetSearchHandle="resetSearchHandle"
></padListPage>
<!-- :mainIsShowDetail="true" -->
<!-- 完成库移弹窗 -->
<el-dialog
title="完成库移"
:visible="compeletHandleVisible"
v-loading="compeletLoading"
top="5vh"
width="90%">
<div style="height:calc(100vh - 280px);overflow:auto">
<currenForm
:labelWidth="'90px'"
ref="compeletHandleForm_Ref"
:style="'width:calc(100% - 100px)'"
size="medium"
:searchData="compeletFormData"
:searchForm="compeletForm"
:rules="compeletRule"
></currenForm>
<curren-descriptions
v-if="compeletHandleVisible"
:border="true"
:column="3"
:direction="'horizontal'"
:colon="false"
:tabsDesTions="padDeatilColumn"
:propsData="currentRowData.details[0]"
style="width:100%;padding-top:20px"
></curren-descriptions>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="compeletHandleClose()"> </el-button>
<el-button type="primary" @click="compeletHandleSure()"> </el-button>
</span>
</el-dialog>
<!-- 查看余额 -->
<el-dialog
title="查看余额"
:visible="showInventoryVisible"
top="5vh"
width="90%">
<div v-loading="showInventoryLoading" style="height:calc(100vh - 280px);overflow:auto">
<curren-descriptions
v-for="(item,index) in inventoryTableData"
:key="index"
:column="3"
:direction="'horizontal'"
:tabsDesTions="inventoryColumn"
:propsData="currentRowData.details[0]"
style="width:100%;padding-top:20px"
:labelStyle="{'width':'200px'}"
></curren-descriptions>
<el-empty v-if="(!inventoryTableData || inventoryTableData.length <= 0) && !showInventoryLoading" description="暂无数据"></el-empty>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="inventoryCloseHandle()"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import padListPage from "./components/padListPage/index"
import { padListPageMixins } from "@/mixins/padListPageMixins"
import padListPage from "./components/padListPage/index"
import currenForm from "@/components/currenForm"
import currenDescriptions from "@/components/currenDescriptions"
import { getInventoryByPackingCode } from '@/api/wms-api'
import { transferLibJobHandel } from '@/api/wms-job'
import { inventoryBalanceUsableList } from '@/api/wms-pad'
import { filterSelectMixins } from '@/mixins/filter-Select'
export default {
name: 'isPadForTransferLibJob',
mixins: [
padListPageMixins,
filterSelectMixins,
],
components: { padListPage },
components: { padListPage,currenForm,currenDescriptions },
computed: {
//
hideButton: function () {
return function (val) {
return this.showFilterSta == val
}
},
//
hideRowButton: function () {
return function (row,val) {
let data = true
val.forEach(key => {
if (row.jobStatus == key) {
data = false
}
})
return data
}
}
},
data () {
return {
listUrl:'wms/store/transfer-lib-job',
searchFormData:{
number:""
number:"",
requestNumber:"",
},
searchForm:[
{label:'任务单号',prop:'number',type:'input'},
{label:'申请单号',prop:'requestNumber',type:'input'},
],
isFilterSta:false,
showFilterSta:false,
headerButton:[
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
hide: this.isFilterSta,
hide: () => { return this.hideButton(true) },
},
{
type: 'success',
label: '查看所有数据',
type: 'danger',
label: '重置数据状态[当前待执行]',
name: "showAllData",
hide: !this.isFilterSta,
hide: () => { return this.hideButton(false) },
},
],
padMainColumn:[
{label:'任务单号',prop:'number'},
{label:'申请单号',prop:'requestNumber'},
{ label: "状态", prop: "jobStatus",type: "filter", filters: "jobStatus" },
{ label:'任务单号',prop:'number'},
{ label:'申请单号',prop:'requestNumber'},
{ label: "状态", prop: "jobStatus",type: "tagFilter", filters: "jobStatus",titleBack:true },
{ label: "传入申请单号", prop: "callRequestNumber" },
{ label: "传入任务单号", prop: "callJobNumber" },
{ label: "任务描述", prop: 'jobDescription' },
{ label: "使用在途库", prop: 'useOnTheWayLocation', type: "filter", filters: "whetherOrNot" },
{ label: "已确认", prop: 'confirmed',type: "filter", filters: "whetherOrNot" },
{ label: "确认时间", prop: 'confirmTime' },
{ label: "备注", prop: "remark" },
{ label: "操作员", prop: "worker" },
{ label: "承接用户", prop: "acceptUserName" },
{ label: "承接时间", prop: 'acceptTime', type: "dateTime" },
{ label: "完成者用户名", prop: 'completeUserName' },
{ label: "完成时间", prop: "completeTime", type: "dateTime" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
// { label: "", prop: "lastModificationTime", type: "dateTime" },
// { label: "", prop: "callServerName" },
// { label: "", prop: "callBusinessType" },
],
padDeatilColumn:[
{label:'物品代码',prop:'itemCode'},
{label:'物品名称',prop:'itemName'},
{label:'物料描述1',prop:'itemDesc1'},
{label:'物料描述2',prop:'itemDesc2'},
{label:'数量',prop:'recommendToQty'},
{ label: "物品代码", prop: "itemCode"},
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "请求数量", prop: 'requestQty' },
{ label: "请求ERP库位", prop: 'requestLocationErpCode' },
{ label: "推荐来源数量", prop: 'recommendFromQty' },
{ label: "推荐目标数量", prop: 'recommendToQty' },
{ label: "推荐来源箱标签", prop: 'recommendFromPackingCode' },
{ label: "推荐目标箱标签", prop: 'recommendToPackingCode' },
{ label: "推荐来源库位", prop: 'recommendFromLocationCode' },
{ label: "推荐目标库位", prop: 'recommendToLocationCode' },
{ label: "推荐来源ERP库位", prop: 'recommendFromLocationErpCode' },
{ label: "推荐目标ERP库位", prop: 'recommendToLocationErpCode' },
{ label: "推荐来源批次", prop: 'recommendFromLot' },
{ label: "推荐目标批次", prop: 'recommendToLot' },
{ label: "推荐来源过期时间", prop: 'recommendFromExpireDate', type: "dateTime" },
{ label: "推荐目标过期时间", prop: 'recommendToExpireDate', type: "dateTime" },
{ label: "实际来源数量", prop: 'handledFromQty' },
{ label: "实际目标数量", prop: 'handledToQty' },
{ label: "实际来源箱标签", prop: 'handledFromPackingCode' },
{ label: "实际目标箱标签", prop: 'handledToPackingCode' },
{ label: "实际来源库位", prop: 'handledFromLocationCode' },
{ label: "实际目标库位", prop: 'handledToLocationCode' },
{ label: "实际来源ERP库位", prop: 'handledFromLocationErpCode' },
{ label: "实际目标ERP库位", prop: 'handledToLocationErpCode' },
{ label: "实际来源批次", prop: 'handledFromLot' },
{ label: "实际目标批次", prop: 'handledToLot' },
{ label: "实际来源过期时间", prop: 'handledFromExpireDate', type: "dateTime" },
{ label: "实际目标过期时间", prop: 'handledToExpireDate', type: "dateTime" },
{ label: "位置码", prop: 'positionCode' },
{ label: "生产线", prop: 'prodLine' },
{ label: "任务状态", prop: "jobStatus",type: "filter", filters: "jobStatus" },
{ label: "推荐类型", prop: 'recommendType' },
],
listRowButton:[
{
type: 'primary',
label: '查看余额',
name: "showCanHandle",
},
{
type: 'success',
label: '完成库移',
name: "showAllData",
name: "compelet",
hide: (row) => { return this.hideRowButton(row,[1,2,4]) },
},
{
type: 'primary',
label: '查看余额',
name: "showInventory",
},
],
filters:null
//
compeletHandleVisible:false,
compeletLoading:false,
compeletFormData: {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
},
compeletForm: [
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, },
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, },
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, },
// filterSelect
// { type: "filterSelect", label: "", prop: "toLocationCode", optionsLabel: "name", optionsValue: "code",
// focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},colSpan: 12
// },
],
compeletRule: {
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
//
currentRowData:null,
//
showInventoryVisible:false,
showInventoryLoading:false,
inventoryTableData:[],
inventoryColumn:[
{ label: "物品代码", prop: "itemCode"},
{ label: "物品名称", prop: "itemName" },
{ label: "物品描述1", prop: "itemDesc1" },
{ label: "物品描述2", prop: "itemDesc2" },
{ label: "请求数量", prop: 'requestQty' },
{ label: "请求ERP库位", prop: 'requestLocationErpCode' },
]
}
},
mounted(){
this.initPage()
},
methods: {
//
headerButtonClick(item,index){
if(item.name == 'showCanHandle'){
this.isFilterSta = true
this.showFilterSta = true
let _filters = [{
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
}]
console.log(999,this.padListParams)
this.padListParams.condition.filters = [
...this.intSearchFilters(),
..._filters
]
this.$refs.padListPage_Ref.getPadList();
this.padListParams.condition.filters = _filters
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle()
this.getPadList();
}
else if(item.name == 'showAllData'){
this.isFilterSta = false
this.filters = null
this.$refs.padListPage_Ref.getPadList();
this.showFilterSta = false
document.getElementById("padListCard").scrollTop = 0
this.clearSearchHandle(true)
this.getPadList();
}
},
//
listRowButtonClick(row,item){
if(item.name == "showInventory"){
this.currentRowData = row
this.showInventoryVisible = true
let _params = {
itemCode:row.details[0].itemCode,
qty:9999999999,
statuses:'OK',
isPackingCode:true
}
this.showInventoryLoading = true
inventoryBalanceUsableList(_params)
.then(res=>{
this.inventoryTableData = res
this.showInventoryLoading = false
})
.catch(err=>{
this.showInventoryLoading = false
})
}
if(item.name == "compelet"){
this.currentRowData = row
this.compeletHandleVisible = true
}
},
headerSearchHandle(){
this.showFilterSta = false
},
resetSearchHandle(){
this.clearSearchHandle(true)
this.showFilterSta = false
},
// -
compeletHandleClose(){
this.compeletFormData = {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
}
if(this.$refs.compeletHandleForm_Ref)this.$refs.compeletHandleForm_Ref.clearValidate()
this.compeletHandleVisible = false
},
// -
compeletHandleSure(val){
let _form = this.$refs.compeletHandleForm_Ref.$refs.form
_form.validate((valid) => {
if (valid) {
this.compeletLoading = true
//
getInventoryByPackingCode(this.compeletFormData.packingCode).then(inventory => {
// details
let _data = this.currentRowData
_data.details[0].handledFromPackingCode = this.compeletFormData.packingCode
_data.details[0].handledToPackingCode = this.compeletFormData.packingCode
_data.details[0].handledFromLocationCode = this.compeletFormData.fromLocationCode
_data.details[0].handledToLocationCode = this.compeletFormData.toLocationCode
_data.details[0].handledToLot = inventory.lot
_data.details[0].handledFromLot = inventory.lot
_data.details[0].handledFromSupplierBatch = inventory.supplierBatch
_data.details[0].handledToSupplierBatch = inventory.supplierBatch
_data.details[0].handledFromQty = inventory.qty
_data.details[0].handledToQty = inventory.qty
transferLibJobHandel(this.currentRowData.id, _data).then(res => {
this.compeletLoading = false
this.$successMsg("完成库移成功!")
this.initPage()
this.compeletHandleClose()
}).catch(err => {
this.compeletLoading = false
this.$errorMsg("完成库移失败!")
})
}).catch(err => {
this.compeletLoading = false
})
} else {
return false;
}
});
},
//
inventoryCloseHandle(){
this.showInventoryVisible = false
this.inventoryTableData = []
}
}
}

245
fe/PC/src/views/padManage/isPadForpadListPage_jt.vue

@ -0,0 +1,245 @@
<template>
<div class="isPadForTransferLibJobPage padListPage">
<!-- 搜索头部 -->
<div class="padListHeader">
<div class="leftSearchHeader">
<el-form :inline="true" :model="searchFormData" :size="'mini'">
<el-form-item
v-for="(item,index) in searchForm"
:key="index"
:label="item.label"
>
<!-- input -->
<el-input
v-if="item.type == 'input'"
v-model="searchFormData[item.prop]"
:placeholder="item.label"
clearable
></el-input>
<!-- select -->
<el-select
v-if="item.type == 'select'"
v-model="searchFormData[item.prop]"
:placeholder="item.label"
>
<el-option
v-for="(opItem,opIndex) in item.options"
:key="opIndex"
:label="opItem.label"
:value="opItem.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchHandle">查询</el-button>
<el-button
v-for="(btnItem,btnIndex) in headerButton"
:key="btnIndex"
:type="btnItem.type"
@click="headerButtonClick(btnItem,btnIndex)"
>{{ btnItem.label }}</el-button>
</el-form-item>
</el-form>
</div>
<el-button circle icon="el-icon-upload2" type="primary" class="pageToTop" @click="pageToTopHandle"></el-button>
</div>
<!-- 列表 -->
<div class="padListCard" v-show="padListPager.totalCount" id="padListCard">
<div
class="padListRow"
v-for="(item,index) in padListData"
:key="index"
>
<!-- 主表 -->
<div class="mainDataBox">
<curren-descriptions
:column="5"
:tabsDesTions="padMainColumn"
:propsData="item"
:labelStyle="{'margin-right':'5px'}"
></curren-descriptions>
</div>
<!-- 子表 todo封装时候确定是否为子表直接显示数据-->
<div class="detailDataBox">
<curren-descriptions
:column="4"
:tabsDesTions="padDeatilColumn"
:propsData="item.details[0]"
:labelStyle="{'margin-right':'5px'}"
></curren-descriptions>
</div>
<!-- 按钮 -->
<div class="listRowButtonBox">
<el-button
v-for="(btnItem,btnIndex) in listRowButton"
:key="btnIndex"
:type="btnItem.type"
@click="headerButtonClick(btnItem,btnIndex)"
:size="'mini'"
>{{ btnItem.label }}</el-button>
</div>
</div>
</div>
<!-- 无数据 -->
<el-empty v-show="!padListPager.totalCount || padListPager.totalCount<=0" description="暂无数据"></el-empty>
<!-- 页脚 -->
<div class="padListPager" v-if="padListPager.totalCount">
<div v-loading="padListLoading" element-loading-text="拼命加载中">{{padListPager.currentPage}}/{{padListPager.totalPage}}</div>
</div>
</div>
</template>
<script>
import { getPageList } from "@/api/wms-api";
import currenDescriptions from "@/components/currenDescriptions"
export default {
name: 'padListPage_jt',
components: { currenDescriptions },
data () {
return {
searchFormData:{
number:""
},
searchForm:[
{label:'任务单号',prop:'number',type:'input'},
],
headerButton:[
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
},
{
type: 'success',
label: '查看所有数据',
name: "showAllData",
},
],
padListLoading:false,
padListData:[],
padMainColumn:[
{label:'任务单号',prop:'number'},
{label:'申请单号',prop:'requestNumber'},
{ label: "状态", prop: "jobStatus",type: "filter", filters: "jobStatus" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
],
padDeatilColumn:[
{label:'物品代码',prop:'itemCode'},
{label:'物品名称',prop:'itemName'},
{label:'物料描述1',prop:'itemDesc1'},
{label:'物料描述2',prop:'itemDesc2'},
{label:'数量',prop:'recommendToQty'},
],
listRowButton:[
{
type: 'primary',
label: '查看余额',
name: "showCanHandle",
},
{
type: 'success',
label: '完成库移',
name: "showAllData",
},
],
padListPager:{
totalCount:null,//
pageSize:10,//
currentPage:0,//
totalPage:null,//
},
searchFilters:[]
}
},
mounted(){
this.getPadList()
let _this = this
document.getElementById("padListCard").addEventListener('scroll', function() {
_this.handleScroll()
});
},
methods: {
pageToTopHandle(){
document.getElementById("padListCard").scrollTop = 0
},
handleScroll(){
let windowHeight = document.getElementById("padListCard").clientHeight;
let scrollHeight = document.getElementById("padListCard").scrollHeight;
let scrollTop = document.getElementById("padListCard").scrollTop;
if (scrollTop + windowHeight >= scrollHeight - 30) {
let page = Number(JSON.stringify(this.padListPager.currentPage + 1))
if(Number(page) > Number(this.padListPager.totalPage))return
console.log('翻页')
this.getPadList(page);
}
},
intSearchFilters(){
let _filters = []
this.searchForm.forEach(item => {
if(this.searchFormData[item.prop]){
_filters.push(
{
logic: 'And',
column: item.prop,
action: item.action || "==",
value: this.searchFormData[item.prop]
}
)
}
});
return _filters
},
getPadList(page=1){
if(this.padListLoading)return
console.log('请求页数',page)
if(page != 1 && (Number(page) > Number(this.padListPager.totalPage)))return
if(page == 1){this.padListData = []}
let params = {
sorting: null,
maxResultCount: this.padListPager.pageSize,
skipCount: this.padListPager.pageSize * (Number(page) - 1),
condition: {
filters: this.intSearchFilters()
}
}
this.padListLoading = true
getPageList(params,'wms/store/transfer-lib-job',true).then(res => {
this.padListData = [
...this.padListData,
...res.items,
];
this.padListPager.totalCount = res.totalCount
this.padListPager.totalPage = Math.ceil(res.totalCount / this.padListPager.pageSize)
this.padListLoading = false
this.padListPager.currentPage = page
}).catch(err => {
this.padListLoading = false
console.log(err)
})
},
//
searchHandle(){
this.getPadList()
},
//
headerButtonClick(item,index){
if(val.name == 'showCanHandle'){
this.PageListParams.condition.filters.push({
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
})
this.paging();
}
else if(val.name == 'showAllData'){
this.PageListParams.condition.filters = this.PageListParams.condition.filters.filter(obj => obj.column != 'jobStatus');
this.paging();
}
}
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/padMain.scss";
</style>
Loading…
Cancel
Save