Browse Source

1.托盘详情

dev-warehouse
0.0 2 years ago
parent
commit
957798645d
  1. 73
      src/api/basicdata/basicdataTray.js
  2. 13
      src/option/basicdata/basicdataTray.js
  3. 19
      src/router/views/index.js
  4. 72
      src/views/basicdata/warehouse/tray/basicdataTray.vue
  5. 214
      src/views/basicdata/warehouse/tray/basicdataTrayedt.vue
  6. 863
      src/views/basicdata/warehouse/tray/basicdataTrayhistory.vue

73
src/api/basicdata/basicdataTray.js

@ -11,6 +11,72 @@ export const getList = (current, size, params) => {
}
})
}
export const getpackList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/packageList',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getinventoryList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/inventoryList',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getlclList = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/lclList',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getpackListhistory = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/packageListhistory',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getinventoryListhistory = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/inventoryListhistory',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getlclListhistory = (current, size, params) => {
return request({
url: '/api/logpm-basicdata/tray/lclListhistory',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
@ -47,4 +113,11 @@ export const update = (row) => {
data: row
})
}
export const vacant = (row) => {
return request({
url: '/api/logpm-basicdata/tray/vacant',
method: 'post',
data: row
})
}

13
src/option/basicdata/basicdataTray.js

@ -6,7 +6,9 @@ export default {
searchShow: true,
searchMenuSpan: 6,
border: true,
viewBtn: true,
viewBtn: false,
delBtn: false,
editBtn: false,
selection: false,
index: true,
indexLabel:'序号',
@ -205,6 +207,15 @@ export default {
editDisplay: true,
viewDisplay: true,
},
{
label: "禁用状态",
prop: "disableTypeName",
type: "input",
labelWidth:'100',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "旧ID",
prop: "oldId",

19
src/router/views/index.js

@ -800,6 +800,25 @@ export default [
},
],
},
{
path: '/basicdata/warehouse/tray/basicdataTrayhistory',
component: Layout,
redirect: '/warehouse/tray/basicdataTrayhistory',
children: [
{
path: '/basicdata/warehouse/tray/basicdataTrayhistory',
name: '历史记录',
meta: {
i18n: 'dict',
},
props: route => ({
name: route.query.name,
id: route.query.id
}),
component: () => import('@/views/basicdata/warehouse/tray/basicdataTrayhistory.vue'),
},
],
},
// {
// path: '/distribution/inventory/distributionPrints',
// component: Layout,

72
src/views/basicdata/warehouse/tray/basicdataTray.vue

@ -20,23 +20,26 @@
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<el-button type="danger"
icon="el-icon-delete"
plain
v-if="permission.BasicdataTray_delete"
@click="handleDelete">
</el-button>
<!-- <el-button type="danger"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- v-if="permission.BasicdataTray_delete"-->
<!-- @click="handleDelete"> -->
<!-- </el-button>-->
<el-button type="warning"
plain
icon="el-icon-download"
@click="handleExport">
</el-button>
</template>
<!-- <template #menu="{size,row,index}">-->
<!-- <el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3'" @click="losses(row)"> </el-button>-->
<!-- <el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3'" @click="Details(row)"> </el-button>-->
<!-- <el-button type="primary" text icon="el-icon-view" @click="losses(row)"> </el-button>-->
<!-- </template>-->
<template #menu="{size,row,index}">
<el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3'" @click="losses(row)"> </el-button>
<el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3' && row.disableType==1 " @click="vacant(row)"> </el-button>
<el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3' && row.disableType==1" @click="disable(row)"> </el-button>
<el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3' && row.disableType==2" @click="disable(row)"> </el-button>
<el-button type="primary" text icon="el-icon-view" v-if="row.trayStatus !=='3'" @click="Details(row)"> </el-button>
<el-button type="primary" text icon="el-icon-view" @click="historys(row)"> </el-button>
</template>
</avue-crud>
<el-dialog :title="'确认破损'"
v-model="damagedBox"
@ -59,7 +62,7 @@
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/basicdata/basicdataTray";
import {getList, getDetail, add, update, remove,vacant} from "@/api/basicdata/basicdataTray";
import option from "@/option/basicdata/basicdataTray";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
@ -163,10 +166,18 @@
cancellation(){
this.damagedBox = false;
},
historys(row){
this.$router.push({
path: '/basicdata/warehouse/tray/basicdataTrayhistory',
query: {
data: encodeURIComponent(JSON.stringify(row)),
name: row.palletCode +'-查看历史记录'
}
});
},
submitForm(){
let row = {}
row.id = this.damagedform.id
console.log("更新参数>>>>>>>>",row);
update(row).then(() => {
this.$message({
@ -182,6 +193,41 @@
this.damagedform = row
this.damagedBox = true
},
vacant(row){
this.$confirm('确认空置?')
.then(_ => {
vacant(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
loading();
console.log(error);
});
})
.catch(_ => {
});
},
disable(row){
this.$confirm('确认禁用?')
.then(_ => {
row.disableType =2
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
loading();
console.log(error);
});
})
.catch(_ => {
});
},
Details(row){
this.$router.push({
path: '/basicdata/warehouse/tray/basicdataTrayedt',

214
src/views/basicdata/warehouse/tray/basicdataTrayedt.vue

@ -16,7 +16,7 @@
</el-col>
</el-row>
<el-divider>在托货物</el-divider>
<el-divider> </el-divider>
<el-tabs type="border-card" v-model="activeTab" @tab-click="handleTabClick" >
<el-tab-pane label="包 件 列 表" name="tab1">
<!-- 列表模块 -->
@ -53,7 +53,6 @@
:total="packpage.total">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="库 存 品 列 表" name="tab2">
<!-- 列表模块 -->
@ -141,8 +140,8 @@
</template>
<script>
import { getDetail, add, update, remove } from '@/api/basicdata/basicdataTray';
import { update as updatesign,getOneclickq } from "@/api/distribution/distributionSignfor";
import { getDetail, add, update, remove ,getpackList,getinventoryList,getlclList} from '@/api/basicdata/basicdataTray';
import option from '@/option/basic/basicPdarecords';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
@ -167,7 +166,7 @@ export default {
//
isadd: false,
traydata:{
reservationList:[],
},
//
loading: true,
@ -175,6 +174,7 @@ export default {
edt:false,
activeTab:'tab1',
previousTab: null,
trayId:null,
//
pake:false,
cus:true,
@ -212,69 +212,57 @@ export default {
selection: true,
column: [
{
label: "配送车次号",
prop: "trainNumber",
label: "经销商名称",
prop: "dealerName",
search: true,
width:"100px"
},
{
label: "收货人",
prop: "consignee",
label: "运单号",
prop: "waybillNumber",
search: true,
width:"100px"
},
{
label: "收货电话",
prop: "deliveryPhone",
label: "经销商编码",
prop: "dealerCode",
search: true,
width:"100px"
},
{
label: "收货地址",
prop: "deliveryAddress",
label: "运单收货人",
prop: "consigneePerson",
search: true,
width:"100px"
},
{
label: "订单自编号",
prop: "orderIds",
label: "运单收货地址",
prop: "consigneeAddress",
search: true,
width:"100px"
},
{
label: "配送件数",
prop: "packageNub",
search: true,
width:"100px"
},
{
label: "配送库存品数",
prop: "reservationStockListNum",
label: "运单收货电话",
prop: "consigneeMobile",
search: true,
width:"100px"
},
{
label: "扫描件数",
prop: "loadedNub",
search: true,
width:"100px"
},
{
label: "是否加急",
prop: "businessDepartment",
label: "货位信息",
prop: "goodsAllocationName",
search: true,
width:"100px"
},
{
label: "签收件数",
prop: "receivedQuantity",
label: "所在列",
prop: "columnNum",
search: true,
width:"100px"
},
{
label: "签收状态",
prop: "signingStatus",
label: "所在行",
prop: "layerNum",
search: true,
width:"100px"
},
@ -445,26 +433,47 @@ export default {
width:"100px"
},
{
label: "物编号",
label: "物编号",
prop: "materialCode",
search: true,
width:"100px"
},
{
label: "物名称",
label: "物名称",
prop: "materialName",
search: true,
width:"100px"
},
{
label: "托盘码",
prop: "pallet",
label: "品牌",
prop: "brandName",
search: true,
width:"100px"
},
{
label: "库位号",
prop: "goodsAllocation",
label: "运单号",
prop: "waybillNumber",
search: true,
width:"100px"
},
// {
// label: "",
// prop: "pallet",
// width:"100px"
// },
{
label: "库位名称",
prop: "goodsAllocationName",
width:"100px"
},
{
label: "所在列",
prop: "columnNum",
width:"100px"
},
{
label: "所在层",
prop: "layerNum",
width:"100px"
},
@ -495,48 +504,51 @@ export default {
search: true,
width:"100px"
},
// {
// label: "",
// prop: "cargoUnit",
// search: true,
// width:"100px"
// },
{
label: "备货数",
prop: "deliveryNumber",
label: "物料编号",
prop: "cargoNumber",
search: true,
width:"100px"
},
{
label: "已备数量",
prop: "readyStock",
label: "规格",
prop: "cargoNorms",
search: true,
width:"100px"
},
{
label: "物料编号",
prop: "cargoNumber",
label: "单位",
prop: "cargoUnit",
search: true,
width:"100px"
},
{
label: "单位",
prop: "cargoUnit",
label: "仓库",
prop: "warehouseName",
search: true,
width:"100px"
},
{
label: "托盘码",
prop: "pallet",
label: "所属商场",
prop: "shoppingMall",
search: true,
width:"100px"
},
{
label: "库位信息",
prop: "goodsAllocation",
label: "库位名称",
prop: "goodsAllocationName",
width:"100px"
},
{
label: "所在列",
prop: "columnNum",
width:"100px"
},
{
label: "所在层",
prop: "layerNum",
width:"100px"
},
]
},
//
@ -769,45 +781,7 @@ export default {
}
});
},
submitForm(){
this.$refs.signform.validate(valid => {
if (valid) {
if (this.signtitle='复核签收'){
let row = {}
row.id = this.signform.deliveryId
row.deliverySignPictures = this.signform.deliverySignPictures
row.clerkSignRemarks = this.signform.clerkSignRemarks
row.signingTime =dayjs().format("YYYY-MM-DD HH:mm:ss")
row.signingStatus = '2'
console.log("更新参数>>>>>>>>",row);
// if (!!row.id){
updatesign(row).then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
this.signBox = false;
this.onLoad()
}, error => {
console.log(error);
this.signBox = false;
});
}else {
let data ={}
data.reservationId =row.id
data.deliveryId =this.traydata.id
data.deliverySignPictures = this.signform.deliverySignPictures
data.clerkSignRemarks = this.signform.clerkSignRemarks
console.log("一键签收data>>>>>>>>>>",data);
getOneclickq(data).then(res => {
this.$message.success(res.data.msg)
this.signBox = false;
this.onLoad()
});
}
}
});
},
//
handleCustom(){
this.cus =true
@ -829,20 +803,29 @@ export default {
//
handlePackage(page){
let params={}
params.deliveryId = this.traydata.id
getpackdetail(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>包间>>",res.data.data);
params.id = this.traydata.id
getpackList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data =res.data.data
this.packdata = data.records
this.packpage.total = data.total
});
},
//
handlelcl(page){
let params={}
params.id = this.traydata.id
getlclList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data =res.data.data
this.data = data.records
this.page.total = data.total
});
},
//
handleInventory(page){
let params={}
params.deliveryId = this.traydata.id
getinventorydetail(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
params.id = this.traydata.id
getinventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>库存>>",res.data.data);
const data =res.data.data
this.inventorydata = data.records
@ -1009,16 +992,15 @@ export default {
this.traydata = JSON.parse(data);
console.log("data>>>>>>>>", this.traydata);
this.loading = true;
let id = this.traydata.id;
getDetail(id).then(res => {
console.log("res.data>>>>>>>>>>>>",res.data.data);
const data = res.data.data
//this.traydata = data
this.data = data.reservationList
});
// this.handleOrder(this.packpage);
// this.handlePackage(this.packpage);
// this.handleInventory(this.packpage);
// getDetail(id).then(res => {
// console.log("res.data>>>>>>>>>>>>",res.data.data);
// const data = res.data.data
// //this.traydata = data
// this.data = data.reservationList
// });
this.handlelcl(this.page);
this.handlePackage(this.packpage);
this.handleInventory(this.inventorypage);
this.loading = false;
}
}

863
src/views/basicdata/warehouse/tray/basicdataTrayhistory.vue

@ -0,0 +1,863 @@
<template>
<basic-container>
<div class="avue-crud">
<el-divider> </el-divider>
<!-- <avue-form :option="propertyoption" ref="myForm" v-model="dataForm" @row-update="rowUpdate" >-->
<!-- <template #input="{row}">-->
<!-- <el-tag>序号:{{row.$index}}-数据:{{row.input}}</el-tag>-->
<!-- </template>-->
<!-- </avue-form>-->
<el-row :gutter="24" class="rows">
<el-col :xl="7" :lg="7" :md="8" :sm="24" >
<span>托盘码{{traydata.palletCode}} </span>
</el-col>
<el-col :xl="7" :lg="7" :md="8" :sm="24">
<span> {{traydata.$type}} </span>
</el-col>
</el-row>
<el-divider> </el-divider>
<el-tabs type="border-card" v-model="activeTab" @tab-click="handleTabClick" >
<el-tab-pane label="包 件 列 表" name="tab1">
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="packdata"
:height="height"
style="width: 100%"
:border="option.border"
>
<el-table-column type="expand" v-if="wrapoption.expand" align="center"></el-table-column>
<template v-for="(item,index) in wrapoption.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
align="center"
:width="item.width"
:key="index">
</el-table-column>
</template>
</el-table>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="psizeChange"
@current-change="pcurrentChange"
:current-page="packpage.currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="packpage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="packpage.total">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="库 存 品 列 表" name="tab2">
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="inventorydata"
:height="height"
style="width: 100%"
:border="option.border"
>
<el-table-column type="expand" v-if="inventoryoption.expand" align="center"></el-table-column>
<template v-for="(item,index) in inventoryoption.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
align="center"
:width="item.width"
:key="index">
</el-table-column>
</template>
</el-table>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="isizeChange"
@current-change="icurrentChange"
:current-page="inventorypage.currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="inventorypage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="inventorypage.total">
</el-pagination>
</div>
</el-tab-pane>
<el-tab-pane label="零 担 列 表" name="tab3">
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="data"
:height="height"
style="width: 100%"
:border="option.border"
>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<template v-for="(item,index) in option.column">
<!-- table字段 -->
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
align="center"
:width="item.width"
:key="index">
</el-table-column>
</template>
</el-table>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total">
</el-pagination>
</div>
</el-tab-pane>
</el-tabs>
<el-row>
</el-row>
</div>
</basic-container>
</template>
<script>
import { getDetail, add, update, remove ,getpackListhistory,getinventoryListhistory,getlclListhistory} from '@/api/basicdata/basicdataTray';
import option from '@/option/basic/basicPdarecords';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
import dayjs from 'dayjs';
export default {
data() {
return {
height: 300,
//
title: '',
signtitle: '',
//
box: false,
//
signBox: false,
//
signBoxO: false,
dataForm: {},
//
search: true,
//
isadd: false,
traydata:{
},
//
loading: true,
//
edt:false,
activeTab:'tab1',
previousTab: null,
trayId:null,
//
pake:false,
cus:true,
ord:false,
inventory:false,
//pda
padview:false,
//
view: false,
//
signView:false,
//
query: {},
inputTypeData:[],
//
page: {
currentPage: 1,
pageSize: 10,
total: 40
},
//
form: {},
//
signform: {},
//
selectionList: [],
isLiabilityData: [],
//
stateData: [],
//
option: {
expand: false,
index: true,
border: true,
selection: true,
column: [
{
label: "经销商名称",
prop: "dealerName",
search: true,
width:"100px"
},
{
label: "运单号",
prop: "waybillNumber",
search: true,
width:"100px"
},
{
label: "经销商编码",
prop: "dealerCode",
search: true,
width:"100px"
},
{
label: "运单收货人",
prop: "consigneePerson",
search: true,
width:"100px"
},
{
label: "运单收货地址",
prop: "consigneeAddress",
search: true,
width:"100px"
},
{
label: "运单收货电话",
prop: "consigneeMobile",
search: true,
width:"100px"
},
{
label: "货位信息",
prop: "goodsAllocationName",
search: true,
width:"100px"
},
{
label: "所在列",
prop: "columnNum",
search: true,
width:"100px"
},
{
label: "所在行",
prop: "layerNum",
search: true,
width:"100px"
},
{
label: "关系类型",
prop: "bindingType",
width:"100px"
},
{
label: "操作时间",
prop: "operateTime",
width:"100px"
},
{
label: "操作人",
prop: "operateUserName",
width:"100px"
},
{
label: "操作数量",
prop: "num",
width:"100px"
},
]
},
//
wrapoption: {
expand: false,
index: true,
border: true,
selection: true,
column: [
{
label: "包条码",
prop: "orderPackageCode",
search: true,
width:"100px"
},
{
label: "仓库",
prop: "warehouse",
search: true,
width:"100px"
},
{
label: "一级品类",
prop: "firsts",
search: true,
width:"100px"
},
{
label: "二级品类",
prop: "second",
search: true,
width:"100px"
},
{
label: "三级品类",
prop: "thirdProduct",
search: true,
width:"100px"
},
{
label: "物品编号",
prop: "materialCode",
search: true,
width:"100px"
},
{
label: "物品名称",
prop: "materialName",
search: true,
width:"100px"
},
{
label: "品牌",
prop: "brandName",
search: true,
width:"100px"
},
{
label: "运单号",
prop: "waybillNumber",
search: true,
width:"100px"
},
// {
// label: "",
// prop: "pallet",
// width:"100px"
// },
{
label: "库位名称",
prop: "goodsAllocationName",
width:"100px"
},
{
label: "所在列",
prop: "columnNum",
width:"100px"
},
{
label: "所在层",
prop: "layerNum",
width:"100px"
},
{
label: "关系类型",
prop: "bindingType",
width:"100px"
},
{
label: "操作时间",
prop: "operateTime",
width:"100px"
},
{
label: "操作人",
prop: "operateUserName",
width:"100px"
},
{
label: "操作数量",
prop: "num",
width:"100px"
},
]
},
//
inventoryoption: {
expand: false,
index: true,
border: true,
selection: true,
column: [
{
label: "sku",
prop: "sku",
search: true,
width:"100px"
},
{
label: "物料名称",
prop: "descriptionGoods",
search: true,
width:"100px"
},
{
label: "物料编号",
prop: "cargoNumber",
search: true,
width:"100px"
},
{
label: "规格",
prop: "cargoNorms",
search: true,
width:"100px"
},
{
label: "单位",
prop: "cargoUnit",
search: true,
width:"100px"
},
{
label: "仓库",
prop: "warehouseName",
search: true,
width:"100px"
},
{
label: "所属商场",
prop: "shoppingMall",
search: true,
width:"100px"
},
{
label: "库位名称",
prop: "goodsAllocationName",
width:"100px"
},
{
label: "所在列",
prop: "columnNum",
width:"100px"
},
{
label: "所在层",
prop: "layerNum",
width:"100px"
},
{
label: "关系类型",
prop: "bindingType",
width:"100px"
},
{
label: "操作时间",
prop: "operateTime",
width:"100px"
},
{
label: "操作人",
prop: "operateUserName",
width:"100px"
},
{
label: "操作数量",
prop: "num",
width:"100px"
},
]
},
//
wpage:{
currentPage: 1,
pageSize: 10,
total: 40
},
//
packpage:{
currentPage: 1,
pageSize: 10,
total: 40
},
ordpage:{
currentPage: 1,
pageSize: 10,
total: 40
},
inventorypage:{
currentPage: 1,
pageSize: 10,
total: 40
},
//
data: [],
//
signdata: [],
//id
wid:null,
//
wrapdata:[],
//
packdata:[],
//
orddata:[],
//
inventorydata:[],
};
},
watch: {
// eslint-disable-next-line no-unused-vars
'$route'(to, from) {
// this.isadd =false;
// this.query.masterId = null;
// this.masterId = null;
// if (!!this.$route.query.data) {
// // //
// // // this.isadd =true;
// // this.query.masterId = this.$route.query.data;
// // this.masterId = this.$route.query.data;
// //
// this.onLoad(this.page);
// } else {
// }
}
},
mounted() {
this.init();
this.onLoad();
},
created() {
// //
// this.queryDictionary();
},
computed: {
...mapGetters(['permission']),
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(',');
}
},
methods: {
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
//
rowUpdate(row, index, done, loading) {
console.log("row>>>>>>>>",row);
},
queryDictionary() {
getDictionaryBiz('yes_no').then(res => {
this.isLiabilityData = res.data.data;
});
getDictionaryBiz('basic_in_type').then(res => {
this.inputTypeData = res.data.data;
});
},
//
handleViewpda() {
},
//
cancellation(){
this.signBox = false;
},
init() {
this.height = this.setPx(document.body.clientHeight - 340);
},
handleTabClick(tab, event){
console.log("tab>>>>>>>>", tab.paneName);
let tabName = tab.paneName
switch (tabName){
case 'tab1':
console.log("ssss")
break;
case 'tab2':
console.log("ssss")
break;
case 'tab3':
console.log("ssss")
break;
case 'tab4':
console.log("ssss")
break;
}
},
searchHide() {
this.search = !this.search;
},
searchChange() {
this.onLoad(this.page);
},
searchReset() {
this.query = {};
this.page.currentPage = 1;
this.onLoad(this.page);
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.form.stringValue =jsonString;
if (!this.form.id) {
this.form.masterId = this.propertyformdata.id;
add(this.form).then(() => {
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
let str = {
val: false
}
this.$emit("returnproperty", str);
});
} else {
update(this.form).then(() => {
this.box = false;
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
let str = {
val: false
}
this.$emit("returnproperty", str);
});
}
} else {
console.log('error submit!!');
return false;
}
});
},
//
handleCustom(){
this.cus =true
this.pake =false
this.ord =false
this.inventory =false
},
//
handleOrder(page){
let params={}
params.deliveryId = this.traydata.id
getorddetail(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>订单>>",res.data.data);
const data =res.data.data
this.orddata = data.records
this.ordpage.total = data.total
});
},
//
handlePackagehistory(page){
let params={}
params.id = this.traydata.id
getpackListhistory(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("包件res.data.data>>>>>>>>>>>{}",res.data.data);
const data =res.data.data
this.packdata = data.records
this.packpage.total = data.total
});
},
//
handlelcl(page){
let params={}
params.id = this.traydata.id
getlclListhistory(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data =res.data.data
this.data = data.records
this.page.total = data.total
});
},
//
handleInventory(page){
let params={}
params.id = this.traydata.id
getinventoryListhistory(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>库存>>",res.data.data);
const data =res.data.data
this.inventorydata = data.records
this.inventorypage.total = data.total
});
},
handleAdd() {
this.title = '新增';
this.form = {};
this.box = true;
},
handleEdit(row) {
this.title = '编辑';
this.box = true;
getDetail(row.id).then(res => {
this.form = res.data.data;
});
},
handleView(row) {
console.log("查看>>>>>>>>>>",row);
this.title = '查看';
this.view = true;
this.box = true;
this.wid= row.id
this.getWrapdetails(this.wpage)
},
handleSign(row) {
console.log("签收>>>>>>>>>>",row);
this.signtitle = '复核签收';
// this.view = true;
this.signform = row
this.signBox = true;
// this.wid= row.id
// this.getWrapdetails(this.wpage)
},
getWrapdetails(page){
let params={}
params.reservationId = this.wid
getWrapdetail(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>>>",res.data.data);
const data =res.data.data
this.wrapdata = data.records
this.wpage.total = data.total
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
});
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!'
});
});
},
beforeClose(done) {
done();
this.form = {};
this.view = false;
},
selectionChange(list) {
console.log("sllsls");
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.table.clearSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.onLoad(this.page);
},
wcurrentChange(currentPage) {
this.wpage.currentPage = currentPage;
this.getWrapdetails(this.wpage)
},
wsizeChange(pageSize) {
this.wpage.pageSize = pageSize;
this.getWrapdetails(this.wpage)
},
pcurrentChange(currentPage) {
this.packpage.currentPage = currentPage;
this.handlePackagehistory(this.packpage)
},
psizeChange(pageSize) {
this.packpage.pageSize = pageSize;
this.handlePackagehistory(this.packpage)
},
ocurrentChange(currentPage) {
this.ordpage.currentPage = currentPage;
this.handleordpage(this.ordpage)
},
osizeChange(pageSize) {
this.inventorypage.pageSize = pageSize;
this.handleordpage(this.inventorypage)
},
icurrentChange(currentPage) {
this.inventorypage.currentPage = currentPage;
this.handleordpage(this.inventorypage)
},
isizeChange(pageSize) {
this.inventorypage.pageSize = pageSize;
this.handleordpage(this.inventorypage)
},
onLoad() {
//
const data = decodeURIComponent(this.$route.query.data);
this.traydata = JSON.parse(data);
console.log("data>>>>>>>>", this.traydata);
this.loading = true;
// getDetail(id).then(res => {
// console.log("res.data>>>>>>>>>>>>",res.data.data);
// const data = res.data.data
// //this.traydata = data
// this.data = data.reservationList
// });
this.handlelcl(this.page);
this.handlePackagehistory(this.packpage);
this.handleInventory(this.inventorypage);
this.loading = false;
}
}
};
</script>
Loading…
Cancel
Save