Browse Source

【nev-平板】第三方api联调暂存

ag_report_nev
安虹睿 11 months ago
parent
commit
2774079150
  1. 2
      fe/PC/public/config.js
  2. 1
      fe/PC/src/App.vue
  3. 39
      fe/PC/src/api/wms-pad.js
  4. 3
      fe/PC/src/layout/index.vue
  5. 1
      fe/PC/src/mixins/padListPageMixins.js
  6. 51
      fe/PC/src/router/index.js
  7. 11
      fe/PC/src/styles/padMain.scss
  8. 10
      fe/PC/src/utils/index.js
  9. 1
      fe/PC/src/utils/tableColumns/index.js
  10. 1
      fe/PC/src/utils/tabsDesTions/index.js
  11. 10
      fe/PC/src/views/login/index.vue
  12. 15
      fe/PC/src/views/padManage/components/padListPage/index.vue
  13. 3
      fe/PC/src/views/padManage/isPadForMenuPage.vue
  14. 203
      fe/PC/src/views/padManage/isPadForOutStockFinish.vue
  15. 138
      fe/PC/src/views/padManage/isPadForReceiveBackStock.vue
  16. 80
      fe/PC/src/views/padManage/isPadForReceiveTractorAction.vue
  17. 278
      fe/PC/src/views/padManage/isPadForTransferLibJob_old.vue

2
fe/PC/public/config.js

@ -26,6 +26,8 @@ window.SITE_CONFIG['companyName'] = '长春一汽富维东阳汽车塑料零部
window.SITE_CONFIG['padKittingPackUpdate'] = 180000
// 高拍仪获取地址
window.SITE_CONFIG['grabimageURL'] = 'http://192.168.1.75:33336/video/index.html'
// 供应商接口地址(如立体库等)
window.SITE_CONFIG['supplierOuterURL'] = 'http://7e42682n64.goho.co:21171'
// 接口看板地址
window.SITE_CONFIG['interfaceBoardUrl'] = 'http://dev.ccwin-in.com:60090/'

1
fe/PC/src/App.vue

@ -24,6 +24,7 @@ localStorage.setItem('company',window.SITE_CONFIG['company'])
localStorage.setItem('largeScreen',window.SITE_CONFIG['largeScreen'])
localStorage.setItem('padKittingPackUpdate',window.SITE_CONFIG['padKittingPackUpdate'])
localStorage.setItem('grabimageURL',window.SITE_CONFIG['grabimageURL'])
localStorage.setItem('supplierOuterURL',window.SITE_CONFIG['supplierOuterURL'])
localStorage.setItem('apifoxToken',window.SITE_CONFIG['apifoxToken'])
localStorage.setItem('reportsUrl',window.SITE_CONFIG['reportsUrl'])
localStorage.setItem('companyName',window.SITE_CONFIG['companyName'])

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

@ -1,5 +1,15 @@
import request from '@/utils/request'
let baseURL = localStorage.getItem('base') + '/api/'
let supplierOuterURL = localStorage.getItem('supplierOuterURL')
//分页+筛选(外界接口)
export function getPageListForOuter(url,data) {
return request({
url: url,
method: 'post',
data
})
}
// 【pad】 Kitting组包 - 获取中间底盘数据
export function ChassisGetListWithNextCount(params) {
@ -45,4 +55,31 @@ export function inventoryBalanceRecommendList(params) {
method: 'get',
params: params,
})
}
}
// 出库任务完成-提交
export function outStockFinishCommit(data) {
return request({
url: supplierOuterURL + '/zozocnApi/custom/OutStockByDY',
method: 'post',
data
})
}
// 回库器具或空器具AGV搬运-转换位置码为locationCode
export function getLocationCodeByPosition(code) {
return request({
url: baseURL + 'basedata/position-code/by-code/'+code,
method: 'get',
})
}
// 回库器具或空器具AGV搬运-提交
export function receiveBackStockAction(data) {
return request({
url: supplierOuterURL + '/zozocnApi/custom/receiveBackStockAction',
method: 'post',
data
})
}

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

@ -61,6 +61,9 @@ export default {
'isPadForTransferLibJob',
'isPadForTransferLibJob_new',
'isPadForKittingPack',
'isPadForReceiveTractorAction',
'isPadForOutStockFinish',
'isPadForReceiveBackStock'
]
}
},

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

@ -82,6 +82,7 @@ export const padListPageMixins = {
// 查询条件拼接
intSearchFilters(){
let _filters = []
if(!this.searchForm)return
this.searchForm.forEach(item => {
if(this.searchFormData[item.prop]){
_filters.push(

51
fe/PC/src/router/index.js

@ -205,6 +205,57 @@ export const constantRoutes = [
}
}]
},
// 下架指导牵引车
{
path: '/',
component: Layout,
redirect: '/isPadForReceiveTractorAction',
hidden: false,
children: [{
path: 'isPadForReceiveTractorAction',
component: () => import('@/views/padManage/isPadForReceiveTractorAction'),
name: 'isPadForReceiveTractorAction',
meta: {
keepAlive : true,
title: '下架指导牵引车',
icon: '系统首页',
}
}]
},
// 出库任务完成
{
path: '/',
component: Layout,
redirect: '/isPadForOutStockFinish',
hidden: false,
children: [{
path: 'isPadForOutStockFinish',
component: () => import('@/views/padManage/isPadForOutStockFinish'),
name: 'isPadForOutStockFinish',
meta: {
keepAlive : true,
title: '出库任务完成',
icon: '系统首页',
}
}]
},
// 回库器具或空器具AGV搬运
{
path: '/',
component: Layout,
redirect: '/isPadForReceiveBackStock',
hidden: false,
children: [{
path: 'isPadForReceiveBackStock',
component: () => import('@/views/padManage/isPadForReceiveBackStock'),
name: 'isPadForReceiveBackStock',
meta: {
keepAlive : true,
title: '回库器具或空器具AGV搬运',
icon: '系统首页',
}
}]
},
// {
// path: '/',
// component: Layout,

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

@ -9,7 +9,6 @@
}
.padListPageOuter{
height: 100%;
padding:15px;
overflow: auto;
}
.padListPage{
@ -30,6 +29,16 @@
::v-deep .el-form-item{
margin-bottom: 10px;
}
.pageTitle{
margin: 0;
padding: 0;
font-weight: bold;
height: 38px;
line-height: 30px;
padding-left: 10px;
overflow: hidden;
}
.pageToTop{
width: 30px;

10
fe/PC/src/utils/index.js

@ -559,11 +559,13 @@ export function createNewTabs (url) {
// 生成UUID
export function generateUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = crypto.randomBytes(1)[0] % 16 | 0,
v = c === 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
let d = new Date().getTime();
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
const r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
});
return uuid;
}
// 接口对应类型转义封装

1
fe/PC/src/utils/tableColumns/index.js

@ -1619,7 +1619,6 @@ export const ScrapNote = [
width: orderWidth
},
{ label: "报废日期", prop: "activeDate",type: "dateTime" },
{ label: "报废类型", prop: 'type' },
{ label: "操作员", prop: "worker" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
]

1
fe/PC/src/utils/tabsDesTions/index.js

@ -1011,7 +1011,6 @@ export const PurchaseReturnNote = [
export const ScrapNote = [
{ label: "报废记录单号", prop: "number" },
{ label: "报废日期", prop: "activeDate",type: "dateTime" },
{ label: "报废类型", prop: 'type' },
{ label: "操作员", prop: "worker" },
{ label: "创建时间", prop: 'creationTime', type: "dateTime" },
]

10
fe/PC/src/views/login/index.vue

@ -1,7 +1,7 @@
<template>
<div class="login-container">
<!-- <iframe v-show="false" id="myIframe" src='http://192.168.1.75:33336/video/index.html' style="z-index:200;background:#fff;width:100px;height:100px;position:fixed;left:0"></iframe>
<el-button style="z-index:200;position:fixed;right:0" @click="getBase64">获取base64</el-button> -->
<!-- <iframe v-show="false" id="getGrabimageIframe" :src='getGrabimageIframeUrl' style="z-index:200;background:#fff;width:100px;height:100px;position:fixed;left:0"></iframe>
<el-button style="z-index:200;position:fixed;left:0;bottom:0;background:#000737;border:none" @click="getBase64">获取base64</el-button> -->
<img class="loginLogoImg" src="../../../public/login_logo.png" alt="">
<div class="login-form-wrapper">
<div class="left"></div>
@ -94,6 +94,7 @@ export default {
}
}
return {
// getGrabimageIframeUrl:localStorage.getItem('grabimageURL'),
loginForm: {
grant_type: 'password',
client_id: 'Auth_App',
@ -147,7 +148,7 @@ export default {
// window.addEventListener('message', function(event) {
// // if (event.origin === 'http://iframe-domain.com') { // iframe
// var result = event.data; //
// console.log(result)
// console.log('base64',result)
// // }
// });
},
@ -157,7 +158,8 @@ export default {
methods: {
// getBase64(){
// //
// var iframeWindow = document.getElementById('myIframe').contentWindow;
// this.getGrabimageIframeUrl = localStorage.getItem('grabimageURL') + '?time='+new Date().getTime()
// var iframeWindow = document.getElementById('getGrabimageIframe').contentWindow;
// iframeWindow.postMessage('callMyFunction', '*');
// },
checkCapslock (e) {

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

@ -2,7 +2,7 @@
<div class="padListPage">
<!-- 搜索头部 -->
<div class="padListHeader">
<div class="leftSearchHeader">
<div class="leftSearchHeader" v-if="searchForm && searchForm.length > 0">
<el-form :inline="true" :model="searchFormData" :size="'mini'">
<el-form-item
v-for="(item,index) in searchForm"
@ -45,6 +45,7 @@
</el-form-item>
</el-form>
</div>
<p class="pageTitle" v-if="(!searchForm || searchForm.length <= 0) && pageTitle">{{pageTitle}}</p>
<el-button circle icon="el-icon-upload2" type="primary" class="pageToTop" @click="pageToTopHandle"></el-button>
</div>
<!-- 列表 -->
@ -111,7 +112,7 @@
<el-empty v-if="(!padListData || padListData.length <= 0) && !padListLoading" description="暂无数据"></el-empty>
<!-- 页脚 -->
<div class="padListPager" v-if="padListData && padListData.length > 0">
<div v-loading="padListLoading" element-loading-text="拼命加载中">当前页:{{padListPager.currentPage}}/{{padListPager.totalPage}}{{padListPager.totalCount}}条数据</div>
<div v-loading="padListLoading" element-loading-text="拼命加载中"><span v-if="!noPager">当前页:{{padListPager.currentPage}}/{{padListPager.totalPage}}(</span>共{{padListPager.totalCount}}条数据<span v-if="!noPager"></span></div>
</div>
<!-- 查看明细 -->
<el-dialog
@ -155,6 +156,11 @@ export default {
name: 'padListPage',
components: { currenDescriptions },
props:{
//
pageTitle:{
type: String,
default: null
},
// url
listUrl:{
type: String,
@ -228,6 +234,11 @@ export default {
type: Boolean,
default: false
},
//
noPager:{
type: Boolean,
default: false
},
//
padListPager:{
type: Object,

3
fe/PC/src/views/padManage/isPadForMenuPage.vue

@ -2,6 +2,9 @@
<div class="isPadForMenuPage">
<div class="item"><el-button type="primary"><a href="/#/isPadForTransferLibJob">业务库移</a></el-button></div>
<div class="item"><el-button type="warning"><a href="/#/isPadForKittingPack">Kitting组包</a></el-button></div>
<div class="item"><el-button type="success"><a href="/#/isPadForReceiveTractorAction">下架指导牵引车</a></el-button></div>
<div class="item"><el-button type="success"><a href="/#/isPadForOutStockFinish">出库任务完成</a></el-button></div>
<div class="item"><el-button type="success"><a href="/#/isPadForReceiveBackStock">回库器具或空器具AGV搬运</a></el-button></div>
</div>
</template>

203
fe/PC/src/views/padManage/isPadForOutStockFinish.vue

@ -0,0 +1,203 @@
<template>
<div class="padListPageOuter isPadForOutStockFinishPage">
<p class="pageTitle">{{pageTitle}}</p>
<div class="bottomBox">
<el-form class="formBox" :inline="true" :model="formData" size="small">
<el-form-item label="出库物品条码">
<el-input ref="itemCode_Ref" clearable v-model="formData.itemCode" placeholder="请扫描出库物品条码"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="sureItem">确定</el-button>
</el-form-item>
</el-form>
<div class="isScanCodeBox">
<div class="isScanCodeTitle">
已扫描数据 ({{scanCodes.length}})
<el-button size="mini" class="btn-clear-all" type="danger" @click="deleteAllHandel">清除全部</el-button>
</div>
<ul class="isScanCodeList">
<li
v-for="(item,key) in scanCodes"
:key="key"
>
<span @click="deleteHandel(item,key)" class="del-button el-icon-circle-close"></span>
<span>{{item}}</span>
</li>
</ul>
</div>
</div>
<div class="btnBox"><el-button size="small" type="success" @click="onSubmit">提交</el-button></div>
</div>
</template>
<script>
import { outStockFinishCommit } from "@/api/wms-pad";
export default {
name: 'isPadForOutStockFinish',
data () {
return {
pageTitle:'出库任务完成',
formData:{
itemCode:null
},
scanCodes:[]
}
},
mounted(){
this.$nextTick(()=>{
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus()
})
},
methods: {
sureItem(){
if(!this.formData.itemCode){
this.$warningMsg("请先扫描");
this.$nextTick(()=>{
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus()
})
}else{
if(this.scanCodes.indexOf(this.formData.itemCode) < 0){
this.scanCodes.push(this.formData.itemCode)
this.$nextTick(()=>{
this.formData.itemCode = null;
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus()
})
}else{
this.$warningMsg("当前扫描项已存在")
this.$nextTick(()=>{
if(this.$refs.itemCode_Ref)this.$refs.itemCode_Ref.focus()
})
}
}
},
onSubmit(){
if(!this.scanCodes || this.scanCodes.length <= 0){
this.$warningMsg("请先扫描")
return
}
this.$confirm('您是否确定提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
outStockFinishCommit(this.scanCodes)
.then((res) => {
if(res.Code == 0){
this.$successMsg("提交成功")
this.scanCodes = []
}else{
this.$errorMsg(res.Message || '提交失败')
}
}).catch(() => {
this.$errorMsg("提交失败")
});
}).catch(() => {
});
},
deleteHandel(item,key){
this.$confirm('您确定删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.scanCodes.splice(key, 1)
}).catch(() => {
});
},
deleteAllHandel(){
if(!this.scanCodes || this.scanCodes.length <= 0){return}
this.$confirm('您确定要清除所有已扫描项吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.scanCodes = [];
}).catch(() => {
});
}
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/padMain.scss";
.isPadForOutStockFinishPage{
background:#fff;
.pageTitle{
text-align:center;
height:40px;
line-height:40px;
overflow:hidden;
font-weight:bold;
box-shadow: 1px 1px 5px #ddd;
margin:0;
border-bottom: #efefef solid 1px;
}
.bottomBox{
padding:10px 20px 0 20px;
height:calc(100% - 90px);
padding-top: 10px;
background:#f8f8f8;
.formBox{
height:45px;
overflow:hidden
}
.isScanCodeBox{
height: calc(100% - 60px);
background: #fff;
padding: 15px;
box-shadow: 1px 1px 5px #ddd;
.isScanCodeTitle{
height:30px;
color:#666;
position:relative;
.btn-clear-all{
position:absolute;
right:20px;
top:0;
}
}
.isScanCodeList{
height:calc(100% - 30px);
overflow:auto;
list-style:none;
margin:0;
padding:0;
li{
margin-bottom:10px;
padding:10px;
border-bottom:dashed 1px #ddd;
.del-button{
color:#999;
margin-right:8px;
cursor: pointer;
font-size:18px
}
}
}
}
}
.btnBox{
height:50px;
text-align:right;
padding-right:20px;
padding-top:8px;
border-top: #efefef solid 1px;
.el-button{
width:100px
}
}
}
</style>

138
fe/PC/src/views/padManage/isPadForReceiveBackStock.vue

@ -0,0 +1,138 @@
<template>
<div class="padListPageOuter isPadForOutStockFinishPage">
<p class="pageTitle">{{pageTitle}}</p>
<div class="bottomBox" v-loading="pageLoading">
<el-form class="formBox" ref="form_Ref" :rules="rules" :model="formData" size="small">
<el-form-item label="位置码" prop="site">
<el-input ref="site_Ref" @change="positionChange" clearable v-model="formData.site" placeholder="请扫描位置码"></el-input>
</el-form-item>
<el-form-item label="库位码" prop="locationCode">
<el-input disabled v-model="formData.locationCode"></el-input>
</el-form-item>
<el-form-item label="托盘号" prop="code">
<el-input ref="code_Ref" clearable v-model="formData.code" placeholder="请扫描托盘号"></el-input>
</el-form-item>
</el-form>
</div>
<div class="btnBox"><el-button size="small" type="success" @click="onSubmit">提交</el-button></div>
</div>
</template>
<script>
import { getLocationCodeByPosition,receiveBackStockAction } from "@/api/wms-pad";
import { generateUUID } from "@/utils/index"
export default {
name: 'isPadForReceiveBackStock',
data () {
return {
pageLoading:false,
pageTitle:'回库器具或空器具AGV搬运',
formData:{
site:null,//
code:null,//
locationCode:null,//locationCode
},
rules: {
site: [{ required: true, message: '请扫描位置码', trigger: 'change' }],
code: [{ required: true, message: '请扫描托盘号', trigger: 'change' }],
}
}
},
mounted(){
this.$nextTick(()=>{
if(this.$refs.site_Ref)this.$refs.site_Ref.focus()
})
},
methods: {
positionChange(){
this.pageLoading = true
getLocationCodeByPosition(this.formData.site)
.then((res) => {
this.pageLoading = false
this.formData.locationCode = res.locationCode;
this.$nextTick(()=>{
if(this.$refs.code_Ref)this.$refs.code_Ref.focus()
})
}).catch(() => {
this.pageLoading = false
this.$errorMsg("位置码转换失败!")
});
},
onSubmit(){
this.$refs.form_Ref.validate((valid) => {
if (valid) {
if(!this.formData.locationCode){
this.$errorMsg("未查到位置码相关信息,请检查位置码!")
return
}
this.$confirm('您是否确定提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let _data = {
uuid: generateUUID(),
operatorName: this.$store.getters.name.userName,
data:{
site: this.formData.locationCode,
code: this.formData.code
}
}
receiveBackStockAction(_data)
.then((res) => {
if(res.Code == 0){
this.$successMsg("提交成功")
}else{
this.$errorMsg(res.Message || '提交失败')
}
}).catch(() => {
this.$errorMsg("提交失败")
});
}).catch(() => {
});
} else {
return false;
}
});
},
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/padMain.scss";
.isPadForOutStockFinishPage{
background:#fff;
.pageTitle{
text-align:center;
height:40px;
line-height:40px;
overflow:hidden;
font-weight:bold;
box-shadow: 1px 1px 5px #ddd;
margin:0;
border-bottom: #efefef solid 1px;
}
.bottomBox{
padding:10px 20px 0 20px;
height:calc(100% - 90px);
padding-top: 10px;
background:#f8f8f8;
}
.btnBox{
height:50px;
text-align:right;
padding-right:20px;
padding-top:8px;
border-top: #efefef solid 1px;
.el-button{
width:100px
}
}
}
</style>

80
fe/PC/src/views/padManage/isPadForReceiveTractorAction.vue

@ -0,0 +1,80 @@
<template>
<div class="padListPageOuter" v-loading="pageLoading">
<padListPage
:pageTitle="pageTitle"
:listUrl="listUrl"
ref="padListPage_Ref"
:padListData="padListData"
:padMainColumn="padMainColumn"
:padListLoading="padListLoading"
:padListPager="padListPager"
:getPadList="getPadList"
:padMainStaColumn="[{prop:'taskNo'}]"
:noPager="true"
></padListPage>
</div>
</template>
<script>
import { padListPageMixins } from "@/mixins/padListPageMixins"
import padListPage from "./components/padListPage/index"
import { getPageListForOuter } from "@/api/wms-pad";
export default {
name: 'isPadForReceiveTractorAction',
mixins: [
padListPageMixins,
],
components: { padListPage },
data () {
return {
// listUrl:'wms/store/transfer-lib-job',
outerListUrl:localStorage.getItem('supplierOuterURL') + '/zozocnApi/custom/receiveTractorAction',
padMainColumn:[
{ label: "产品名称", prop: "yGoodsName" },
{ label:'产品编号',prop:'productNo'},
{ label: "产品颜色", prop: "productColor" },
{ label: "产品类型", prop: "yPostion" },
{ label: "车型", prop: "yCarType" },
{ label: "托盘号", prop: "codeNo" },
{ label: "需求工位", prop: "needSite" },
{ label: "所在库口", prop: "outSite" },
{ label: "数量", prop: "count" },
],
pageTitle:this.$route.meta.title,
pageLoading:false
}
},
mounted(){
this.initPage()
},
methods: {
getPadList(page=1){
if(this.pageLoading)return
this.padListLoading = true
this.pageLoading = true
getPageListForOuter(this.outerListUrl).then(res => {
//
if(res.Code == 0 && (!res.Data || res.Data == "" || res.Data == null || res.Data.length < 0)){
this.padListData = []
this.padListPager.totalCount = 0
}else{
this.padListData = res.Data
this.padListPager.totalCount = res.Data.length
}
this.padListPager.totalPage = 1
this.pageLoading = false
this.padListLoading = false
this.padListPager.currentPage = 1
}).catch(err => {
this.pageLoading = false
this.padListLoading = false
console.log(err)
})
},
}
}
</script>
<style lang="scss" scoped>
@import "@/styles/padMain.scss";
</style>

278
fe/PC/src/views/padManage/isPadForTransferLibJob_old.vue

@ -1,278 +0,0 @@
<template>
<div class="page-box" v-loading="Loading.appMainLoading">
<tablePagination
:currenButtonData="currenButtonData"
:tableData="tableData"
:tableLoading="Loading.tableLoading"
:tableColumns="tableColumns"
@rowDrop="rowDrop"
:totalCount="totalCount"
:multipleSelection="multipleSelection"
:MaxResultCount="PageListParams.MaxResultCount"
@topbutton="topbuttonHandle"
@inlineDialog="inlineDialog"
@sortChange="sortChange"
@alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange"
:currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick"
@quicklySearchClear="quicklySearchClear"
:primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData"
:setUTableHeight="140"
>
</tablePagination>
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用-->
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 -->
<importFile
:loading="Loading.importLoading"
:show="displayDialog.importDialog"
:URL="URL"
:disabledMethod = {method1:false,method2:false,method3:false}
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false}
isAllowPartImportValue="1"
@importClick="postImportMergeClick(arguments)"
@postImportDown="importDown"
></importFile>
<!--抽屉-->
<curren-Drawer
:title="tableColumns"
:DrawerLoading="Loading.DrawerLoading"
:drawer="displayDialog.detailsDialog"
:propsData="propsData"
:tabsDesTions="tabsDesTions"
:Butttondata="DrawerButtonData"
@drawerbutton="drawerbutton"
@drawerShut="(val) => (displayDialog.detailsDialog = val)"
@handleCommand="drawerHandle"
@close-value="closeValue"
:tableColumns="detailsTableColumns"
:totalCount="totalCountDetails"
:MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails"
></curren-Drawer>
<!-- 新增与编辑 -->
<newAndEdiDialog
:loading="Loading.newAndEdiLoading"
:active="active"
:pageStatus="pageStatus"
:formReveal="formReveal"
:formTitle="formTitle"
:displayDialog="editDialog"
:FormData="formReveal ? CreateFormData : editFormData"
:Form="formReveal ? CreateForm : editForm"
:Options="editOptions"
:Handle="editHandle"
:Rules="formReveal ? editRules.cerateRule : editRules.editRule"
@FormSubmit="FormSubmitHandle"
@close="FormCloseHandle"
@goBack="goBack"
>
<template>
<curren-descriptions
v-if="this.displayDialog.newDialog"
:border="true"
:column="3"
:direction="'horizontal'"
:colon="false"
:tabsDesTions="detailsTableColumns"
:propsData="propsData.details[0]"
class="drawerDescriptionsFirst"
style="width:100%;padding-top:20px"
>
</curren-descriptions>
</template>
</newAndEdiDialog>
<!-- 搜索按钮窗体组件 -->
<searchPage
ref="searchTable"
:tableLoading="Loading.autoTableLoading"
:advancedFilter="advancedFilter()"
:filterPageListParams="filterPageListParams"
:formTitle="searchTitle"
:displayDialog="displayDialog.AddNewDialog"
:searchTableData="searchData"
:searchTableColumns="searchColumns"
:searchTotalCount="searchTotalCount"
:supplierItemPage="searchPageListParams"
@handleSelectionChange="prepareFormData"
@SizeChange="searchAlterResultCount($event, searchPageListParams)"
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)"
@tableButtonClick="searchSubmit(arguments)"
></searchPage>
</div>
</template>
<script>
import { tableMixins } from "@/mixins/TableMixins";
import { LoadingMixins } from "@/mixins/LoadingMixins";
import { drawerMixins } from "@/mixins/drawerMixins";
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins";
import { mixins } from "@/mixins/mixins";
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins"
import { filterSelectMixins } from '@/mixins/filter-Select'
import { transferLibJobHandel } from '@/api/wms-job'
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api'
import currenDescriptions from "@/components/currenDescriptions"
export default {
name: "isPadForTransferLibJob",
components: {
currenDescriptions,
},
mixins: [
tableMixins,
LoadingMixins,
drawerMixins,
TableHeaderMixins,
mixins,
filterSelectMixins,
newAndEdiDialogMixins
],
computed: {
editDialog: {
get: function () {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
//
hideButton: function () {
return function (val) {
let data = true
val.forEach(key => {
if (this.propsData.jobStatus == key) {
data = false
}
})
return data
}
}
},
data() {
return {
URL: "wms/store/transfer-lib-job",
//
currenButtonData: [
// this.defaultImportBtn(),//
{
type: 'warning',
label: '查看待执行数据',
name: "showCanHandle",
size: 'mini'
},
{
type: 'success',
label: '查看所有数据',
name: "showAllData",
size: 'mini'
},
this.defaultFieldSettingBtn(),//
this.defaultFreshBtn(),//
this.defaultFilterBtn(),//
],
DrawerButtonData:[
{
type:'success',
label: '完成库移',
name: "handle",
hide: () => { return this.hideButton([1,2,4]) },
size:"mini"
},
],
CreateFormData: {
packingCode:"",
fromLocationCode:"",
toLocationCode:"",
},
CreateForm: [
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, },
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, },
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, },
],
editRules: {
cerateRule: {
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }],
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }],
},
},
};
},
mounted() {
this.paging();
},
methods:{
topbuttonHandle(val,item){
if(val == 'showCanHandle'){
this.PageListParams.condition.filters.push({
logic:"And",
column:"jobStatus",
action:"In",
value: JSON.stringify([1,2,4,30])
})
this.paging();
}
else if(val == 'showAllData'){
this.PageListParams.condition.filters = this.PageListParams.condition.filters.filter(obj => obj.column != 'jobStatus');
this.paging();
}
else{
this.topbutton(val,item)
}
},
drawerbutton(val){
//
if(val == "handle"){
this.formTitle = "完成库移";
this.formReveal = true
this.theEvent = "newly"
this.displayDialog.newDialog = true;
}
},
FormSubmitHandle(val){
this.Loading.newAndEdiLoading = true
//
getInventoryByPackingCode(this.CreateFormData.packingCode).then(inventory => {
// details
let _data = this.propsData
_data.details[0].handledFromPackingCode = this.CreateFormData.packingCode
_data.details[0].handledToPackingCode = this.CreateFormData.packingCode
_data.details[0].handledFromLocationCode = this.CreateFormData.fromLocationCode
_data.details[0].handledToLocationCode = this.CreateFormData.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.propsData.id, _data).then(res => {
this.Loading.newAndEdiLoading = false
this.FormResult("success")
}).catch(err => {
this.Loading.newAndEdiLoading = false
this.FormResult("error")
})
}).catch(err => {
this.Loading.newAndEdiLoading = false
})
},
FormCloseHandle(val){
this.FormClose(val)
this.Loading.appMainLoading = true
getDetailed(this.propsData.id, this.URL)
.then(res => {
this.propsData = res
this.Loading.appMainLoading = false
})
.catch(err=>{
this.Loading.appMainLoading = false
})
}
}
};
</script>
<style lang="scss" scoped>
@import "@/styles/mainbasicData.scss";
</style>
Loading…
Cancel
Save