Browse Source

1.物料导出导入,托盘报损

dev-warehouse
0.0 2 years ago
parent
commit
e3c6e255ff
  1. 50
      src/api/warehouse/warehouseRetentionRecord.js
  2. 3
      src/option/basic/basicMaterial.js
  3. 8
      src/option/basicdata/basicdataTray.js
  4. 231
      src/option/warehouse/warehouseRetentionRecord.js
  5. 19
      src/router/views/index.js
  6. 75
      src/views/basic/material/basicMaterial.vue
  7. 6
      src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue
  8. 122
      src/views/basicdata/warehouse/tray/basicdataTray.vue
  9. 1026
      src/views/basicdata/warehouse/tray/basicdataTrayedt.vue
  10. 1
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  11. 37
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue
  12. 225
      src/views/warehouse/warehouseRetentionRecord.vue

50
src/api/warehouse/warehouseRetentionRecord.js

@ -0,0 +1,50 @@
import request from '@/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/logpm-warehouse/warehouseRetentionRecord/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/logpm-warehouse/warehouseRetentionRecord/detail',
method: 'get',
params: {
id
}
})
}
export const remove = (ids) => {
return request({
url: '/api/logpm-warehouse/warehouseRetentionRecord/remove',
method: 'post',
params: {
ids,
}
})
}
export const add = (row) => {
return request({
url: '/api/logpm-warehouse/warehouseRetentionRecord/submit',
method: 'post',
data: row
})
}
export const update = (row) => {
return request({
url: '/api/logpm-warehouse/warehouseRetentionRecord/submit',
method: 'post',
data: row
})
}

3
src/option/basic/basicMaterial.js

@ -7,7 +7,8 @@ export default {
border: true,
index: true,
viewBtn: true,
selection: true,
delBtn:true,
selection: false,
indexLabel: "序号",
indexWidth: '80',
dialogClickModal: false,

8
src/option/basicdata/basicdataTray.js

@ -7,7 +7,7 @@ export default {
searchMenuSpan: 6,
border: true,
viewBtn: true,
selection: true,
selection: false,
index: true,
indexLabel:'序号',
indexWidth:'150',
@ -136,6 +136,7 @@ export default {
label: 'name',
value: 'id',
},
rules: [{ required: true, message: '请选择仓库!',trigger: 'blur'}],
placeholder:'请输入仓库关键词',
labelWidth:'100',
addDisplay: true,
@ -171,7 +172,7 @@ export default {
align:'center',
labelWidth:'100',
width:200,
addDisplay: false,
},
{
@ -192,7 +193,8 @@ export default {
addDisplay: true,
editDisplay: false,
viewDisplay: false,
hide: true
hide: true,
rules: [{ required: true, message: '请选择状态!',trigger: 'blur'}],
},
{
label: "旧托盘码",

231
src/option/warehouse/warehouseRetentionRecord.js

@ -0,0 +1,231 @@
export default {
height:'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: true,
selection: true,
dialogClickModal: false,
column: [
{
label: "主键",
prop: "id",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "租户号",
prop: "tenantId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新人",
prop: "updateUser",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "更新时间",
prop: "updateTime",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "状态",
prop: "status",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留1",
prop: "reserve1",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留2",
prop: "reserve2",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留3",
prop: "reserve3",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留4",
prop: "reserve4",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "预留5",
prop: "reserve5",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "订单自编码",
prop: "orderCode",
type: "input",
},
{
label: "包件码",
prop: "packageCode",
type: "input",
},
{
label: "运单号",
prop: "waybillNo",
type: "input",
},
{
label: "滞留车次号",
prop: "retentionCarId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "滞留车次号",
prop: "retentionCarNo",
type: "input",
},
{
label: "滞留仓库id",
prop: "retentionWarehouseId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "滞留仓库名称",
prop: "retentionWarehouseName",
type: "input",
},
{
label: "滞留类型;1=装车滞留,2=配送滞留,3=取消滞留,4=出库滞留",
prop: "retentionType",
type: "input",
},
{
label: "装车时间",
prop: "assembleCarDate",
type: "input",
},
{
label: "装车人id",
prop: "assembleCarPersonId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "装车人名称",
prop: "assembleCarPersonName",
type: "input",
},
{
label: "备注",
prop: "remark",
type: "input",
},
{
label: "取消滞留人id",
prop: "cancelRetentionUserId",
type: "input",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "取消滞留人名称",
prop: "cancelRetentionUserName",
type: "input",
},
{
label: "取消滞留备注",
prop: "cancelRemark",
type: "input",
},
]
}

19
src/router/views/index.js

@ -781,6 +781,25 @@ export default [
},
],
},
{
path: '/basicdata/warehouse/tray/basicdataTrayedt',
component: Layout,
redirect: '/warehouse/tray/basicdataTrayedt',
children: [
{
path: '/basicdata/warehouse/tray/basicdataTrayedt',
name: '在托货物',
meta: {
i18n: 'dict',
},
props: route => ({
name: route.query.name,
id: route.query.id
}),
component: () => import('@/views/basicdata/warehouse/tray/basicdataTrayedt.vue'),
},
],
},
// {
// path: '/distribution/inventory/distributionPrints',
// component: Layout,

75
src/views/basic/material/basicMaterial.vue

@ -23,9 +23,9 @@
<el-button type="danger"
icon="el-icon-delete"
plain
v-if="permission.basicMaterial_delete"
@click="handleDelete">
@click="handleImport">
</el-button>
<!-- v-if="permission.basicMaterial_delete"-->
<el-button type="warning"
plain
icon="el-icon-download"
@ -39,6 +39,15 @@
@click="rowDelTripartite(row,index)">三方物料</el-button>
</template>
</avue-crud>
<el-dialog title="物料导入" append-to-body v-model="excelBox" width="555px">
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
<template #excelTemplate>
<el-button type="primary" @click="handleTemplate">
点击下载<i class="el-icon-download el-icon--right"></i>
</el-button>
</template>
</avue-form>
</el-dialog>
</basic-container>
</template>
@ -60,6 +69,8 @@
query: {},
search: {},
loading: true,
excelBox: false,
excelForm: {},
page: {
pageSize: 10,
currentPage: 1,
@ -67,7 +78,32 @@
},
selectionList: [],
option: option,
data: []
data: [],
excelOption: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '文件上传',
prop: 'excelFile',
type: 'upload',
drag: true,
loadText: '文件上传,请稍等',
span: 24,
propsHttp: {
res: 'data',
},
tip: '请上传 .xls,.xlsx 标准格式文件',
action: '/api/logpm-basic/material/import-basicMaterial',
},
// {
// label: '',
// prop: 'excelTemplate',
// formslot: true,
// span: 24,
// },
],
},
};
},
computed: {
@ -88,6 +124,15 @@
return ids.join(",");
}
},
watch:{
'excelForm.isCovered'() {
if (this.excelForm.isCovered !== '') {
const column = this.findObject(this.excelOption.column, 'excelFile');
column.action = `/api/logpm-warehouse/warehouseWarehousingEntry/import-WarehousingEntry?isCovered=${this.excelForm.isCovered}`;
}
},
},
methods: {
rowDelTripartite(row,num){
@ -174,8 +219,14 @@
this.$refs.crud.toggleSelection();
});
},
uploadAfter(res, done, loading, column) {
window.console.log(column);
this.excelBox = false;
this.refreshChange();
done();
},
handleExport() {
let downloadUrl = `/blade-basicMaterial/basicMaterial/export-basicMaterial?${this.website.tokenHeader}=${getToken()}`;
let downloadUrl = `/api/logpm-basic/material/export-basicMaterial?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
@ -192,6 +243,19 @@
})
});
},
//
handleImport(){
this.excelBox = true;
},
//
handleTemplate() {
console.log("下载模板!!!");
exportBlob(
`/api/logpm-warehouse/warehouseWarehousingEntry/export-warehouseWarehousingEntry?${this.website.tokenHeader}=${getToken()}`
).then(res => {
downloadXls(res.data, '物料数据模板.xlsx');
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
@ -237,7 +301,8 @@
let values = {
productCode:productCode,
name:name,
brandId:brandId
brandId:brandId,
hide:1
};
getList(page.currentPage, page.pageSize, values).then(res => {

6
src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue

@ -296,9 +296,9 @@ export default {
},
getListInfo(){
// getDictionaryBiz( 'area_type').then(res => {
// this.areaTypeData = res.data.data;
// });
getDictionaryBiz( 'area_type').then(res => {
this.areaTypeData = res.data.data;
});
getDictionaryBiz( 'enable_status').then(res => {
this.enableStatus = res.data.data;

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

@ -32,7 +32,29 @@
@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>
</avue-crud>
<el-dialog :title="'确认破损'"
v-model="damagedBox"
width="45%"
append-to-body>
<avue-form :option="damagedoption"
v-model="damagedform"
:data="damageddata"
ref="signform"
>
</avue-form>
<div style="bottom: 7%;margin-left: 500px;width: 50%">
<div style="width: 100%">
<el-button type="primary" @click="submitForm" style="margin-right: 20%" >确定</el-button>
<el-button type="primary" @click="cancellation" >取消</el-button>
</div>
</div>
</el-dialog>
</basic-container>
</template>
@ -46,12 +68,15 @@
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import dayjs from 'dayjs';
export default {
data() {
return {
form: {},
query: {},
//
damagedBox:false,
search: {},
loading: true,
page: {
@ -59,6 +84,57 @@
currentPage: 1,
total: 0
},
//
damagedform: {},
//
damageddata: [],
//
damagedoption: {
height:'auto',
width:'40px',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
viewBtn: true,
dialogClickModal: false,
emptyBtn: false, //
submitBtn: false, //
column: [
{
label: "破损图片",
prop: "damagedPhotos",
labelWidth:'150',
type: 'upload',
listType: 'picture-card',
width:"150px",
span:15,
multiple:true,
align:'left',
action: '/blade-resource/oss/endpoint/put-file',
limit: 5,
propsHttp: {
res: 'data',
url: 'link',
},
disabled:false,
},
{
label: "备注",
prop: "damagedNote",
labelWidth:'150',
span:15,
type: "input",
width:"150px",
align:'center',
},
]
},
damagedId:null,
selectionList: [],
option: option,
data: []
@ -83,8 +159,41 @@
}
},
methods: {
//
cancellation(){
this.damagedBox = false;
},
submitForm(){
let row = {}
row.id = this.damagedform.id
console.log("更新参数>>>>>>>>",row);
update(row).then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
}, error => {
loading();
console.log(error);
});
},
losses(row){
this.damagedform = row
this.damagedBox = true
},
Details(row){
this.$router.push({
path: '/basicdata/warehouse/tray/basicdataTrayedt',
query: {
data: encodeURIComponent(JSON.stringify(row)),
name: row.palletCode +'-查看在托情况'
}
});
},
rowSave(row, done, loading) {
console.log(this.form);
console.log("this.form>>>>>>>>>>>>",this.form);
// this.form.trayStatus("1");
add(row).then(() => {
this.onLoad(this.page);
this.$message({
@ -150,7 +259,7 @@
});
},
handleExport() {
let downloadUrl = `/blade-BasicdataTray/BasicdataTray/export-BasicdataTray?${this.website.tokenHeader}=${getToken()}`;
let downloadUrl = `/api/logpm-basicdata/material/export-BasicdataTray?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
@ -205,15 +314,20 @@
this.loading = true;
const {
warehouseId,
trayStatus,
type
} = this.query;
let values = {
warehouseId:warehouseId,
trayStatus:trayStatus,
type:type
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
console.log(">>>>>>",data);
// this.page.total = data.total;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();

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

File diff suppressed because it is too large Load Diff

1
src/views/distribution/deliverylist/distributionDeliveryList.vue

@ -52,7 +52,6 @@
<template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="editmap(slotProps.scope)"> </el-button>
<!-- <el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>-->
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button>
</template>
</tablecmt>

37
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -266,7 +266,7 @@
<!-- </template>-->
</el-dialog>
<el-dialog :title="'签收'"
<el-dialog :title="signtitle"
v-model="signBox"
width="45%"
append-to-body>
@ -313,6 +313,7 @@ export default {
height: 300,
//
title: '',
signtitle: '',
//
box: false,
//
@ -930,9 +931,10 @@ export default {
submitForm(){
this.$refs.signform.validate(valid => {
if (valid) {
if (this.signtitle='复核签收'){
let row = {}
row.id = this.signform.deliveryId
row.clerkSignPictures = this.signform.clerkSignPictures
row.deliverySignPictures = this.signform.deliverySignPictures
row.clerkSignRemarks = this.signform.clerkSignRemarks
row.signingTime =dayjs().format("YYYY-MM-DD HH:mm:ss")
row.signingStatus = '2'
@ -949,6 +951,19 @@ export default {
console.log(error);
this.signBox = false;
});
}else {
let data ={}
data.reservationId =row.id
data.deliveryId =this.deliverydata.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()
});
}
}
});
},
@ -1015,7 +1030,7 @@ export default {
},
handleSign(row) {
console.log("签收>>>>>>>>>>",row);
// this.title = '';
this.signtitle = '复核签收';
// this.view = true;
this.signform = row
this.signBox = true;
@ -1025,19 +1040,9 @@ export default {
//
handleSignone(row) {
console.log("一键签收>>>>>>>>>>",row);
this.$confirm('确认一键签收?')
.then(_ => {
let data ={}
data.reservationId =row.id
data.deliveryId =this.deliverydata.id
console.log("一键签收data>>>>>>>>>>",data);
getOneclickq(data).then(res => {
this.$message.success(res.data.msg)
this.onLoad()
});
})
.catch(_ => {
});
this.signtitle = '一键签收';
this.signform = row
this.signBox = true
},
handleOne(row) {
console.log("签收>>>>>>>>>>",row);

225
src/views/warehouse/warehouseRetentionRecord.vue

@ -0,0 +1,225 @@
<template>
<basic-container>
<avue-crud :option="option"
v-model:search="search"
v-model:page="page"
v-model="form"
:table-loading="loading"
:data="data"
:permission="permissionList"
:before-open="beforeOpen"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@row-del="rowDel"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template #menu-left>
<el-button type="danger"
icon="el-icon-delete"
plain
v-if="permission.warehouseRetentionRecord_delete"
@click="handleDelete">
</el-button>
<el-button type="warning"
plain
icon="el-icon-download"
@click="handleExport">
</el-button>
</template>
</avue-crud>
</basic-container>
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/warehouse/warehouseRetentionRecord";
import option from "@/option/warehouse/warehouseRetentionRecord";
import {mapGetters} from "vuex";
import {exportBlob} from "@/api/common";
import {getToken} from '@/utils/auth';
import {downloadXls} from "@/utils/util";
import {dateNow} from "@/utils/date";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
export default {
data() {
return {
form: {},
query: {},
search: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: option,
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.validData(this.permission.warehouseRetentionRecord_add, false),
viewBtn: this.validData(this.permission.warehouseRetentionRecord_view, false),
delBtn: this.validData(this.permission.warehouseRetentionRecord_delete, false),
editBtn: this.validData(this.permission.warehouseRetentionRecord_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
rowSave(row, done, loading) {
add(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
window.console.log(error);
});
},
rowUpdate(row, index, done, loading) {
update(row).then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
done();
}, error => {
loading();
console.log(error);
});
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
handleExport() {
let downloadUrl = `/retentionRecord/warehouseRetentionRecord/export-warehouseRetentionRecord?${this.website.tokenHeader}=${getToken()}`;
const {
} = this.query;
let values = {
};
this.$confirm("是否导出数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(downloadUrl, values).then(res => {
downloadXls(res.data, `滞留记录${dateNow()}.xlsx`);
NProgress.done();
})
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
currentChange(currentPage){
this.page.currentPage = currentPage;
},
sizeChange(pageSize){
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
const {
} = this.query;
let values = {
};
getList(page.currentPage, page.pageSize, values).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
}
}
};
</script>
<style>
</style>
Loading…
Cancel
Save