Browse Source

1.配送详情

dev-warehouse
0.0 2 years ago
parent
commit
274e7bd925
  1. 17
      src/api/distribution/distributionDeliveryList.js
  2. 26
      src/router/views/index.js
  3. 104
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  4. 192
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

17
src/api/distribution/distributionDeliveryList.js

@ -44,12 +44,25 @@ export const getDetail = (id) => {
})
}
export const getWrapdetail = (id) => {
export const getWrapdetail = (current, size, params) => {
return request({
url: '/api/logpm-distribution/deliveryList/wrapdetail',
method: 'get',
params: {
id
...params,
current,
size,
}
})
}
export const getpackdetail = (current, size, params) => {
return request({
url: '/api/logpm-distribution/deliveryList/packdetail',
method: 'get',
params: {
...params,
current,
size,
}
})
}

26
src/router/views/index.js

@ -423,19 +423,19 @@ export default [
},
],
},
{
path: '/distribution/deliverylist/distributionDeliveryList',
component: Layout,
redirect: '/distribution/deliverylist/distributionDeliveryList',
children: [
{
path: '/distribution/deliverylist/distributionDeliveryList',
id:'id',
name:'name',
component: () => import('@/views/distribution/deliverylist/distributionDeliveryList.vue'),
},
],
},
// {
// path: '/distribution/deliverylist/distributionDeliveryList',
// component: Layout,
// redirect: '/distribution/deliverylist/distributionDeliveryList',
// children: [
// {
// path: '/distribution/deliverylist/distributionDeliveryList',
// id:'id',
// name:'name',
// component: () => import('@/views/distribution/deliverylist/distributionDeliveryList.vue'),
// },
// ],
// },
{
path: '/distribution/turndelivery/deliveryInfo',
component: Layout,

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

@ -117,37 +117,37 @@
<el-input type="number" v-model="item.f"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,1)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
<span v-if="index===1">公里:
<el-input type="primary" v-model="item.a"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,2)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
<span v-if="index===3">距离:
<el-input type="number" v-model="item.b"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,3)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
<span v-if="index===5">人数:
<el-input type="number" v-model="item.c"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,4)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
<span v-if="index===0">楼层:
<el-input type="number" v-model="item.d"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,5)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
<span v-if="item">预计费用:
<el-input type="number" v-model="item.e"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@change="textbox($event,index,6)"
style="width: 10%;border:none; border-bottom:2px solid #eee;"/>
style="width: 20%;border:none; border-bottom:2px solid #eee;"/>
</span>
</el-checkbox>
</el-checkbox-group>
@ -175,6 +175,7 @@ import { getList, getDetail, add, update, remove,getPage,getstatistics } from "@
import option from "@/option/distribution/distributionDeliveryList";
import { mapGetters } from "vuex";
import { getDictionaryBiz } from '@/api/system/dict';
import { addIncrement } from '@/api/distribution/distributionStockArticle';
export default {
data () {
@ -374,8 +375,17 @@ export default {
addvalueServeTypeData: [],
//
addvalueServeType: [],
//
deliveryWayData: [],
//
addvalueObj: {},
//
orderInfo: {},
deliverId: null,
//
feeList: [],
//
floorList: [],
//
data: [],
}
@ -487,6 +497,76 @@ export default {
}
},
handleCheckedCitiesChange(value) {
if (value) {
this.form.addvalueType = value;
}
console.log('>>>>>', this.form);
if (value.length < 1) {
this.costList = [];
this.costListName = [];
}
this.deliveryWayData.forEach(i => {
if (value.includes(i.dictKey)) {
console.log(i);
i.pitch = true;
this.costListName = value;
}
});
},
textbox(e, index, a) {
if (a === 6) {
this.feeList[index + 1] = e;
return;
}
if (a === 5)
if (index === 0 && a === 5) {
this.floorList[index + 1] = e;
return;
}
this.costList[index + 1] = e;
//
},
aaa() {
let addvalueInfos = [];
this.form.addvalueType.forEach((item, index) => {
let addvalueInfo = {};
addvalueInfo.addvalueId = item;
if (item == 1 || item == 3 || item == 5 || item == 7) {
addvalueInfo.number = this.costList[item];
}
if (item == 2) {
addvalueInfo.kilometer = this.costList[item];
}
if (item == 4) {
addvalueInfo.distance = this.costList[item];
}
if (item == 6) {
addvalueInfo.peopleNum = this.costList[item];
}
if (this.floorList.length > 1) {
addvalueInfo.floor = this.floorList[1];
this.floorList = [];
}
addvalueInfo.fee = this.feeList[item];
addvalueInfos.push(addvalueInfo);
});
let params = {};
params.id = this.deliverId;
params.addvalue = addvalueInfos;
params.relatedId=2
console.log("params>>>>>>>>>>>>>>>>>>",params);
addIncrement(params).then(res => {
this.dialogVisible = false;
this.$message({
type: 'success',
message: '操作成功!'
});
});
this.onLoad(this.page);
},
selectionsc(value) {
console.log("进来了>>>>>>>>>>>>>",value);
},
@ -515,13 +595,8 @@ export default {
},
costadd(scope) {
const { row } = scope;
// this.$router.push({
// path: '/distribution/deliverylist/distributionDeliveryListedt',
// query: {
// id: row.id,
// name: row.trainNumber +'-'
// }
// });
console.log("row>>>>>>>>>>",row);
this.deliverId =row.id
//
this.addvalueServeType = [];
this.addvalue = {};
@ -558,6 +633,9 @@ export default {
getDictionaryBiz('addvalue_serve_type').then(res => {
this.addvalueServeTypeData = res.data.data;
});
getDictionaryBiz('delivery_way').then(res => {
this.deliveryWayData = res.data.data;
});
getDictionaryBiz('distribution_deliverylist_kind').then(res => {
this.deliverykindData = res.data.data;
this.columnList[2].checkarr =res.data.data.map(item=>{

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

@ -45,23 +45,26 @@
</el-col>
</el-row>
<el-divider>订单列表</el-divider>
<!-- <el-row>-->
<!-- <div class="avue-crud__header">-->
<!-- &lt;!&ndash; 头部左侧按钮模块 &ndash;&gt;-->
<!-- <div class="avue-crud__left">-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>-->
<!-- <el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-row>-->
<el-row>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="el-icon-plus" @click="handleCustom"> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="handlePackage(this.packpage)" plain> </el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleInventory" plain> </el-button>
</div>
</div>
</el-row>
<el-row v-if="cus" >
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="data"
:height="height"
style="width: 100%"
:border="option.border">
:border="option.border"
v-if="cus"
>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<template v-for="(item,index) in option.column">
<!-- table字段 -->
@ -81,6 +84,44 @@
</el-table-column>
</el-table>
</el-row>
<el-row v-if="pake" >
<!-- 列表模块 -->
<el-table ref="table" v-loading="loading"
@selection-change="selectionChange"
:data="packdata"
:height="height"
style="width: 100%"
:border="option.border"
v-if="pake"
>
<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-row>
<el-row>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
@ -120,20 +161,34 @@
</el-table-column>
</template>
</el-table>
<div class="avue-crud__pagination" style="width:100%">
<!-- 分页模块 -->
<el-pagination align="right"
background
@size-change="wsizeChange"
@current-change="wcurrentChange"
:current-page="wpage.currentPage"
:page-sizes="[10, 20, 30, 40, 50, 100]"
:page-size="wpage.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="wpage.total">
</el-pagination>
</div>
<!-- 表单按钮 -->
<template #footer>
<span v-if="!view" class="dialog-footer">
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>
<el-button icon="el-icon-circle-close" @click="box = false"> </el-button>
</span>
</template>
<!-- <template #footer>-->
<!-- <span v-if="!view" class="dialog-footer">-->
<!-- <el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit"> </el-button>-->
<!-- <el-button icon="el-icon-circle-close" @click="box = false"> </el-button>-->
<!-- </span>-->
<!-- </template>-->
</el-dialog>
</div>
</basic-container>
</template>
<script>
import { getList, getDetail, add, update, remove,getPage,getstatistics,getWrapdetail } from "@/api/distribution/distributionDeliveryList";
import { getList, getDetail, add, update, remove,getPage,getstatistics,getWrapdetail,getpackdetail } from "@/api/distribution/distributionDeliveryList";
import option from '@/option/basic/basicPdarecords';
import { mapGetters } from 'vuex';
import { getDictionaryBiz } from '@/api/system/dict';
@ -156,6 +211,10 @@ export default {
loading: true,
//
edt:false,
//
pake:false,
cus:true,
//pda
padview:false,
//
@ -213,6 +272,7 @@ export default {
search: true,
width:"100px"
},
{
label: "配送件数",
prop: "packageNub",
@ -220,7 +280,7 @@ export default {
width:"100px"
},
{
label: "装车件数",
label: "扫描件数",
prop: "loadedNub",
search: true,
width:"100px"
@ -231,8 +291,22 @@ export default {
search: true,
width:"100px"
},
{
label: "签收件数",
prop: "receivedQuantity",
search: true,
width:"100px"
},
{
label: "签收状态",
prop: "signingStatus",
search: true,
width:"100px"
},
]
},
//
wrapoption: {
expand: false,
@ -246,6 +320,12 @@ export default {
search: true,
width:"100px"
},
{
label: "仓库",
prop: "warehouse",
search: true,
width:"100px"
},
{
label: "一级品类",
prop: "firsts",
@ -264,6 +344,12 @@ export default {
search: true,
width:"100px"
},
{
label: "物料编号",
prop: "encoded",
search: true,
width:"100px"
},
{
label: "物料名称",
prop: "material",
@ -271,13 +357,28 @@ export default {
width:"100px"
},
]
},
//
wpage:{
currentPage: 1,
pageSize: 10,
total: 40
},
//
packpage:{
currentPage: 1,
pageSize: 10,
total: 40
},
//
data: [],
//
//id
wid:null,
//
wrapdata:[],
//
packdata:[],
};
},
watch: {
@ -384,6 +485,29 @@ export default {
return false;
}
});
},
//
handleCustom(){
this.cus =true
this.pake =false
},
//
handlePackage(page){
let params={}
params.deliveryId = this.$route.query.id
getpackdetail(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log("查看>>>>>sss>>",res.data.data);
const data =res.data.data
this.packdata = data.records
this.packpage.total = data.total
this.cus =false
this.pake =true
});
},
//
handleInventory(){
},
handleAdd() {
this.title = '新增';
@ -402,10 +526,20 @@ export default {
this.title = '查看';
this.view = true;
this.box = true;
getWrapdetail(row.id).then(res => {
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('请选择至少一条数据');
@ -465,6 +599,22 @@ export default {
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.handlePackage(this.packpage)
},
psizeChange(pageSize) {
this.packpage.pageSize = pageSize;
this.handlePackage(this.packpage)
},
onLoad() {
//
this.loading = true;

Loading…
Cancel
Save