Browse Source

预约添加库存品信息

dev-warehouse
kilo 2 years ago
parent
commit
385885f652
  1. 12
      src/api/distribution/distributionReservation.js
  2. 10
      src/api/distribution/distributionStockArticle.js
  3. 19
      src/api/distribution/distributionStockList.js
  4. 2
      src/option/distribution/distributionReservation.js
  5. 175
      src/option/distribution/distributionStockArticle.js
  6. 1
      src/option/distribution/distributionStockList.js
  7. 10
      src/router/views/index.js
  8. 3
      src/views/distribution/reservation/atlas.vue
  9. 19
      src/views/distribution/reservation/reservation.vue
  10. 386
      src/views/distribution/reservation/reservationFrom.vue
  11. 283
      src/views/distribution/turndelivery/deliveryInfo.vue

12
src/api/distribution/distributionReservation.js

@ -90,5 +90,17 @@ export const getReservationAddr = (ids) => {
}
/**
* 预约批量确认
* @param row
* @returns {AxiosPromise}
*/
export const deliveryTask = (data) => {
return request({
url: '/api/logpm-distribution/reservation/deliveryTask',
method: 'post',
data:data
})
}

10
src/api/distribution/distributionStockArticle.js

@ -78,3 +78,13 @@ export const addIncrement = (row) => {
})
}
export const getStockArticleList = ( ids) => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/stockArticleInfo',
method: 'get',
params: {
ids
}
})
}

19
src/api/distribution/distributionStockList.js

@ -48,3 +48,22 @@ export const update = (row) => {
})
}
/**
* 库存品列表
* @param current
* @param size
* @param params
* @returns {AxiosPromise}
*/
export const getInventoryList = (current, size, params) => {
return request({
url: '/api/logpm-distribution/distributionStockList/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}

2
src/option/distribution/distributionReservation.js

@ -60,7 +60,7 @@ export default {
},
{
label: "订单自编号",
prop: "orderId",
prop: "stockArticleId",
width:'173'
},
{

175
src/option/distribution/distributionStockArticle.js

@ -452,5 +452,180 @@ export default {
// prop: "state",
// search: true,
// },
],
columnReservations: [
{
label: "租户号",
prop: "tenantId",
display: false,
hide: true,
},
{
label: "创建人",
prop: "createUser",
display: false,
hide: true,
},
{
label: "创建时间",
prop: "createTime",
display: false,
hide: true,
},
{
label: "更新人",
prop: "updateUser",
display: false,
hide: true,
},
{
label: "更新时间",
prop: "updateTime",
display: false,
hide: true,
},
{
label: "状态",
prop: "status",
display: false,
hide: true,
},
{
label: "是否已删除",
prop: "isDeleted",
display: false,
hide: true,
},
{
label: "创建部门",
prop: "createDept",
display: false,
hide: true,
},
{
label: "主键",
prop: "id",
display: false,
hide: true,
},
{
label: "预留1",
prop: "reserve1",
display: false,
hide: true,
},
{
label: "预留2",
prop: "reserve2",
display: false,
hide: true,
},
{
label: "预留3",
prop: "reserve3",
display: false,
hide: true,
},
{
label: "预留4",
prop: "reserve4",
display: false,
hide: true,
},
{
label: "预留5",
prop: "reserve5",
display: false,
hide: true,
},
{
label: "服务号",
prop: "serviceNumber",
display: false,
hide: true,
},
{
label: "订单自编号",
prop: "orderSelfNumbering",
},
{
label: "商场名称",
prop: "mallName",
search: true,
},
{
label: "货物名称",
prop: "descriptionGoods",
search: true,
},
{
label: "仓库",
prop: "warehouse",
search: true,
},
{
label: "入库时间",
prop: "warehouseEntryTime",
display: false,
hide: true,
},
{
label: "在库时间",
prop: "storeTime",
},
{
label: "订单总件数",
prop: "totalNumber",
},
{
label: "在库件数",
prop: "handQuantity",
},
{
label: "是否齐套",
prop: "completeSet",
search: true,
display: false,
hide: true,
},
{
label: "品牌",
prop: "brand",
search: true,
display: false,
hide: true,
},
{
label: "服务类型",
prop: "typeService",
search: true,
},
{
label: "顾客名字",
prop: "customerName",
},
{
label: "顾客电话",
prop: "customerTelephone",
},
{
label: "顾客地址",
prop: "customerAddress",
},
{
label: "增值服务",
prop: "fee",
},
// {
// label: "类型;1 预约单 2库存单",
// prop: "genre",
// search: true,
// },
// {
// label: "状态;1 配送 2 待配送",
// prop: "state",
// search: true,
// },
]
}

1
src/option/distribution/distributionStockList.js

@ -142,5 +142,6 @@ export default {
label: "发运车次",
prop: "despatch",
},
]
}

10
src/router/views/index.js

@ -424,15 +424,15 @@ export default [
],
},
{
path: '/distribution/deliveryInfo/deliveryInfo',
path: '/distribution/turndelivery/deliveryInfo',
component: Layout,
redirect: '/distribution/deliveryInfo/deliveryInfo',
redirect: '/distribution/turndelivery/deliveryInfo',
children: [
{
path: '/distribution/deliveryInfo/deliveryInfo',
name: '配送计划',
path: '/distribution/turndelivery/deliveryInfo',
name: 'name',
id:'id',
component: () => import('@/views/distribution/deliveryInfo/deliveryInfo.vue'),
component: () => import('@/views/distribution/turndelivery/deliveryInfo.vue'),
},
],
},

3
src/views/distribution/reservation/atlas.vue

@ -141,9 +141,10 @@ export default {
console.log('>>>>>>>>>>>', details.reservationIds);
let ids = details.reservationIds.join(',');
router.push({
path: '/distribution/deliveryInfo/deliveryInfo',
path: '/distribution/turndelivery/deliveryInfo',
query: {
id: ids,
name:'配送计划'
},
});
}

19
src/views/distribution/reservation/reservation.vue

@ -16,16 +16,16 @@
<el-button type="primary" icon="el-icon-warning" @click="aaa">待确认</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="bbb">已确认<i
class="el-icon-arrow-right el-icon--right"></i></el-button>
<el-button type="primary" icon="el-icon-view" @click="ccc">全部</el-button>
<!-- <el-button type="primary" icon="el-icon-view" @click="ccc">全部</el-button>-->
</el-button-group>
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left" style="margin-top: 20px">
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">添加预约</el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleConfirmReservations" plain>批量确认
<el-button v-if="this.query.reservationStatus==='1'" type="danger" icon="el-icon-delete" @click="handleConfirmReservations" plain>批量确认
</el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleStockUp" plain>批量转备货</el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDeliverys" plain>批量转配送</el-button>
<el-button v-if="this.query.reservationStatus==='2'" type="danger" icon="el-icon-delete" @click="handleStockUp" plain>批量转备货</el-button>
<el-button v-if="this.query.reservationStatus==='2'" type="danger" icon="el-icon-delete" @click="handleDeliverys" plain>批量转配送</el-button>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -363,10 +363,6 @@
this.query.reservationStatus = '2';
this.onLoad(this.page);
},
ccc() {
this.query.reservationStatus = '';
this.onLoad(this.page);
},
handleView(row) {
this.title = '查看';
this.view = true;
@ -393,7 +389,7 @@
this.$router.push({
path: '/distribution/reservation/atlas',
query: {
id: ids
id: ids,
}
});
// console.log(">>>>>>>>>>",ids);
@ -473,7 +469,7 @@
},
selectionClear() {
this.selectionList = [];
this.$refs.table.clearSelection();
// this.$refs.table.clearSelection();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
@ -486,6 +482,9 @@
onLoad(page, params = {}) {
this.loading = true;
if (!this.query.reservationStatus){
this.query.reservationStatus = '1';
}
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
console.log('>>>>>>>', data);

386
src/views/distribution/reservation/reservationFrom.vue

@ -105,127 +105,86 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form>
<!-- <el-dialog :title="title"-->
<!-- v-model="box"-->
<!-- width="50%"-->
<!-- :before-close="beforeClose"-->
<!-- append-to-body>-->
<!-- <el-form :disabled="view" ref="form" :model="form" label-width="80px">-->
<!-- &lt;!&ndash; 表单字段 &ndash;&gt;-->
<!-- <el-form-item label="订单自编号" prop="orderId">-->
<!-- <el-input v-model="form.orderId" placeholder="请输入订单自编号"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="运单号" prop="waybillId">-->
<!-- <el-input v-model="form.waybillId" placeholder="请输入运单号"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="商城编号" prop="shoppingId">-->
<!-- <el-input v-model="form.shoppingId" placeholder="请输入商城编号"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="收货地址" prop="deliveryAddress">-->
<!-- <el-input v-model="form.deliveryAddress" placeholder="请输入收货地址"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="收货人" prop="consignee">-->
<!-- <el-input v-model="form.consignee" placeholder="请输入收货人"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="在库时长" prop="durationInStock">-->
<!-- <el-input v-model="form.durationInStock" placeholder="请输入在库时长"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="总件数" prop="goodsTotal">-->
<!-- <el-input v-model="form.goodsTotal" placeholder="请输入总件数"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="配载件数" prop="allocateTotal">-->
<!-- <el-input v-model="form.allocateTotal" placeholder="请输入配载件数"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="体积" prop="volume">-->
<!-- <el-input v-model="form.volume" placeholder="请输入体积"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="重量" prop="weight">-->
<!-- <el-input v-model="form.weight" placeholder="请输入重量"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="到付费用" prop="collectFee">-->
<!-- <el-input v-model="form.collectFee" placeholder="请输入到付费用"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="待收货款" prop="replaceFee">-->
<!-- <el-input v-model="form.replaceFee" placeholder="请输入待收货款"/>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; <el-form-item label="预留1" prop="reserve1">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.reserve1" placeholder="请输入预留1"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="预留2" prop="reserve2">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.reserve2" placeholder="请输入预留2"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="预留3" prop="reserve3">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.reserve3" placeholder="请输入预留3"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="预留4" prop="reserve4">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.reserve4" placeholder="请输入预留4"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item label="预留5" prop="reserve5">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-input v-model="form.reserve5" placeholder="请输入预留5"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- </el-form>-->
<!-- &lt;!&ndash; 表单按钮 &ndash;&gt;-->
<!-- <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>-->
<el-row style="margin: 50px;">
<el-button-group>
<el-button type="primary" icon="el-icon-plus" @click="bbb">增加订单</el-button>
<el-button type="primary" icon="el-icon-plus">增加包件<i class="el-icon-arrow-right el-icon--right"></i></el-button>
</el-button-group>
<div class="avue-crud__left" style="margin-left: 50px">
<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>
<el-table ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="data"
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="80px" align="center"></el-table-column>
<template v-for="(item,index) in option.column">
<el-tabs type="border-card" >
<el-tab-pane label="订单">
<el-button type="text" @click="handleAddOrder">新增</el-button>
<el-table ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="orderData"
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="80px" align="center"></el-table-column>
<template v-for="(item,index) in option.columnReservations">
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index">
</el-table-column>
</template>
<el-table-column label="预约数量" type="index" width="100px">
<template #="{row}">
<el-input v-model="row.number" type="number" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{row}">
<el-button type="primary" text icon="el-icon-view" @click="viewPackage(row)">查看包件</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">移除</el-button>
<el-button type="primary" text icon="el-icon-delete" @click="addvalueServe(row)">增值服务</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="库存品">
<el-button type="text" @click="handleAddInventory">新增</el-button>
<el-table ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="inventoryData"
:height="height"
style="width: 100%"
:border="stockList.border">
<el-table-column type="selection" v-if="stockList.selection" width="55" align="center"></el-table-column>
<el-table-column v-if="stockList.index" label="序号" type="index" width="80px" align="center"></el-table-column>
<template v-for="(item,index) in stockList.column">
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index">
</el-table-column>
</template>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{row}">
<el-button type="primary" text icon="el-icon-view" @click="viewPackage(row)">查看包件</el-button>
<el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">移除</el-button>
<el-button type="primary" text icon="el-icon-delete" @click="addvalueServe(row)">增值服务</el-button>
</template>
</el-table-column>
</el-table>
<el-form-item style="margin-left: 45%;margin-top: 5px">
</template>
<el-table-column label="预约数量" type="index" width="100px">
<template #="{row}">
<el-input v-model="row.number" type="number" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-form-item style="margin-left: 45%;margin-top: 5px">
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmit">提交(配送订单预约)</el-button>
<el-button icon="el-icon-circle-close" @click="$router.go(-1)"> </el-button>
</el-form-item>
</el-row>
</el-form-item>
<el-dialog
v-model="orderShow"
title="在库订单信息"
width="100%"
:model="addvalue"
:before-close="handleClose"
>
:before-close="handleClose">
<el-form :inline="true" :model="query">
<el-form-item label="商场名称:">
<el-input v-model="query.mallName" placeholder="请输入商场名称"></el-input>
@ -273,7 +232,7 @@
@selection-change="selectionChange"
:data="stockArticleInfo"
:height="height"
style="width: 90%"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="80px" align="center"></el-table-column>
@ -285,30 +244,64 @@
:key="index">
</el-table-column>
</template>
<!-- 操作栏模块 -->
<!-- <el-table-column prop="menu" label="操作" :width="220" align="center">-->
<!-- <template #="{row}">-->
<!-- <el-button type="primary" text icon="el-icon-view" @click="viewPackage(row)">查看包件</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">移除</el-button>-->
<!-- <el-button type="primary" text icon="el-icon-delete" @click="addvalueServe(row)">增值服务</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<el-form-item style="margin-left: 45%;margin-top: 5px">
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitOrder">提交(订单选择)</el-button>
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitOrder">提交(订单)</el-button>
<el-button icon="el-icon-circle-close" @click="orderShow=false"> </el-button>
</el-form-item>
</el-dialog>
<el-dialog
v-model="stockListShow"
title="库存品信息"
width="100%"
:model="addvalue"
:before-close="handleClose">
<el-form :inline="true" :model="query">
<el-form-item label="顾客电话:">
<el-input v-model="query.customerTelephone" placeholder="请输入服务类型"></el-input>
</el-form-item>
<el-form-item label="顾客地址:">
<el-input v-model="query.customerAddress" placeholder="请输入服务类型"></el-input>
</el-form-item>
<!-- 查询按钮 -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchChange"> </el-button>
<el-button icon="el-icon-delete" @click="searchReset()"> </el-button>
</el-form-item>
</el-form>
<el-table ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="inventoryInfo"
:height="height"
style="width: 90%"
:border="stockList.border">
<el-table-column type="selection" v-if="stockList.selection" width="55" align="center"></el-table-column>
<el-table-column v-if="stockList.index" label="序号" type="index" width="80px" align="center"></el-table-column>
<template v-for="(item,index) in stockList.column">
<el-table-column v-if="item.hide!==true"
:prop="item.prop"
:label="item.label"
:width="item.width"
:key="index">
</el-table-column>
</template>
</el-table>
<el-form-item style="margin-left: 45%;margin-top: 5px">
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitInventory">提交(库存品)</el-button>
<el-button icon="el-icon-circle-close" @click="stockListShow=false"> </el-button>
</el-form-item>
</el-dialog>
<el-dialog
v-model="dialogVisible"
title="增值服务"
width="30%"
:model="addvalue"
:before-close="handleClose"
>
:before-close="handleClose">
<el-form-item label="增值服务" prop="freightMark">
<el-checkbox-group v-model="form.addvalueType" @change="handleCheckedCitiesChange">
<el-checkbox style="width: 100%;margin-bottom: 3%;"
@ -340,8 +333,6 @@
<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;"/>
</span>
<!-- <el-input type="number" v-model="item.remark" placeholder="请输入费用" :disabled = "this.form?.freightMark?.indexOf(item.dictKey) == -1"-->
<!-- @change="textbox($event,index)" style="width: 50%;border:none; border-bottom:2px solid #eee;"/>-->
</el-checkbox>
</el-checkbox-group>
</el-form-item>
@ -362,15 +353,14 @@
<script>
import { add, update, remove } from "@/api/distribution/distributionReservation";
import { getList } from "@/api/distribution/distributionStockArticle";
import { getListDelivery, getDetailDelivery, addDelivery, updateDelivery, removeDelivery } from "@/api/distribution/distributionDelivery";
import { getList, getStockArticleList } from '@/api/distribution/distributionStockArticle';
import { getDetailDelivery, addDelivery } from "@/api/distribution/distributionDelivery";
import { addIncrement } from "@/api/distribution/distributionStockArticle";
import { getInventoryList } from "@/api/distribution/distributionStockList";
// import option from "@/option/distribution/distributionDelivery";
import option from "@/option/distribution/distributionStockArticle";
import StockList from "@/option/distribution/distributionStockList";
import { mapGetters } from "vuex";
import { getDictionaryBiz } from '@/api/system/dict';
@ -402,6 +392,7 @@ export default {
selectionList: [],
//
option: option,
stockList:StockList,
//
data: [],
//
@ -430,10 +421,28 @@ export default {
orderShow:false,
//
stockArticleInfo:{},
//
inventoryInfo:{},
//
periodOfTimeData:[],
//
orderIds:'',
inventoryData:[],
orderData:[],
stockListShow:false,
}
},
created() {
this.$watch(
() => this.$route.params,
() => {
this.fetchData();
},
//
// data observed
{ immediate: true }
);
},
mounted () {
this.init();
this.onLoad(this.page);
@ -450,6 +459,13 @@ export default {
}
},
methods: {
fetchData() {
this.error = this.post = null;
this.loading = true;
if (this.$route.query.id) {
this.orderIds = this.$route.query.id;
}
},
init () {
this.height = this.setPx(document.body.clientHeight - 340);
},
@ -487,10 +503,12 @@ export default {
message: "操作成功!"
});
})
console.log("a[]>>>>>>>",params);
},
bbb(){
this.orderShow = true;
handleAddOrder(){
this.orderShow = true;
},
handleAddInventory(){
this.stockListShow = true;
},
handleCheckedCitiesChange(value) {
console.log(">>>>>>>",value );
@ -528,25 +546,20 @@ export default {
this.costList[index+1]=e;
//
console.log(">>>>>>>",this.costList);
},
//
getDictionary(){
getDictionaryBiz("addvalue_serve_type").then(res=>{
this.addvalueServeTypeData = res.data.data;
console.log(this.addvalueServeTypeData);
})
getDictionaryBiz("delivery_way").then(res=>{
this.deliveryWayData = res.data.data;
console.log(this.deliveryWayData);
})
getDictionaryBiz("delivery_type").then(res=>{
this.deliveryTypeData = res.data.data;
console.log(this.deliveryTypeData);
})
getDictionaryBiz("period_of_time").then(res=>{
this.periodOfTimeData = res.data.data;
console.log(this.deliveryTypeData);
})
},
addvalueServe(row){
@ -594,11 +607,12 @@ export default {
this.isaddvalue = true;
},
onSubmit(){
console.log(">>>>>>>>this.form",this.form);
let ids = [];
this.data.forEach(item=>{
this.orderData.forEach(item=>{
ids.push(item.id)
})
console.log(">>>>>>>>>>>",this.inventoryData);
console.log(">>>>>>>>>>>",this.orderData);
ids.join(",");
console.log(ids);
this.form.ids=ids.toString();
@ -627,15 +641,16 @@ export default {
})
})
this.form.serveType= a.toString();
add(this.form).then(() => {
this.box = false;
this.onLoad(this.page);
this.$router.go(-1);
this.$message({
type: "success",
message: "操作成功!"
});
});
console.log(this.form);
// add(this.form).then(() => {
// this.box = false;
// this.onLoad(this.page);
// this.$router.go(-1);
// this.$message({
// type: "success",
// message: "!"
// });
// });
},
handleClose(done) {
@ -645,17 +660,8 @@ export default {
})
.catch(_ => {});
},
handleAdd () {
this.title = '新增'
this.form = {}
this.box = true
},
handleEdit (row) {
this.title = '编辑'
this.box = true
getDetailDelivery(row.id).then(res => {
this.form = res.data.data;
});
},
handleView (row) {
this.title = '查看'
@ -713,6 +719,15 @@ export default {
console.log(">>>>>>>>>>>>>",list);
this.selectionList = list;
},
//
onSubmitInventory(){
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.inventoryData = this.selectionList
this.stockListShow =false
},
/**
* 增加订单提交
*/
@ -738,7 +753,7 @@ export default {
});
return ;
}
this.data = this.selectionList
this.orderData = this.selectionList
this.orderShow =false
@ -756,15 +771,60 @@ export default {
this.onLoad(this.page);
},
onLoad (page, params = {}) {
console.log(">>>>>>>>>>>>>>>>",this.orderIds);
this.loading = true;
this.query.genre = 1;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.stockArticleInfo = data.records;
this.loading = false;
this.selectionClear();
});
if (this.orderIds){
getStockArticleList(this.orderIds).then(res=>{
console.log(res.data.data);
const data = res.data.data
let name = '';
let phone = '';
let address = '';
let f = false;
for (let i = 0; i <data.length; i++) {
if (i===0){
name = data[0].customerName;
phone = data[0].customerTelephone;
address = data[0].customerAddress;
}
if (data[i].customerName === name && data[i].customerTelephone === phone && data[i].customerAddress === address){
f=true;
}else
f=false;
}
if (!f){
this.$message({
type: "error",
message: "请选择同一顾客订单!"
});
this.$router.go(-1);
}
this.form.consignee =name
this.form.deliveryPhone=phone
this.form.deliveryAddress=address
this.orderData=data;
this.loading = false;
})
}else {
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)) .then(res=>{
const data = res.data.data;
this.page.total = data.total;
this.inventoryInfo = data.records;
this.loading = false;
this.selectionClear();
})
this.query.genre = 1;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.stockArticleInfo = data.records;
this.loading = false;
this.selectionClear();
});
}
}
},

283
src/views/distribution/deliveryinfo/deliveryInfo.vue → src/views/distribution/turndelivery/deliveryInfo.vue

@ -10,12 +10,12 @@
<el-row>
<el-col :span="8">
<el-form-item label="车辆信息:" prop="goodsShelfId">
<el-select v-model="form.vehicle" multiple placeholder="请选择车辆">
<el-select v-model="form.vehicleIds" multiple placeholder="请选择车辆">
<el-option
v-for="item in vehicleData"
:key="item.id"
:label="item.vehicleNub"
:value="item.vehicleNub">
:value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -46,28 +46,17 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" prop="remarks">
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="form.remarks">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="叉车司机:" prop="forklift" >
<el-form-item label="叉车司机:" prop="forklift" >
<el-select v-model="form.forklift" placeholder="请选择叉车司机">
<el-option
v-for="item in forkliftData"
:key="item.value"
:label="item.label"
:value="item.value">
v-for="item in this.forkliftData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
<!-- {{this.forkliftData}}-->
</el-select>
</el-form-item>
</el-col>
@ -76,21 +65,31 @@
<el-select v-model="form.loader" placeholder="请选择装卸班组">
<el-option
v-for="item in loaderData"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<!-- <el-radio-group v-model="form.loadAndUnload" >-->
<!-- <el-radio v-for="item in this.loadAndUnloadData" :label="item.dictValue" :value="item.dictKey"></el-radio>-->
<!-- </el-radio-group>-->
<el-checkbox-group v-model="this.loadAndUnload">
<el-checkbox v-for="item in loadAndUnloadData" :label="item.dictKey" :value="item.dictKey">{{item.dictValue}}</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="备货区域:" prop="goodsAreaId">
<el-select v-model="form.goodsAreaId" placeholder="请选择备货区域">
<el-option
v-for="item in goodsAreaData"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
@ -105,17 +104,134 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" prop="remarks">
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="form.remarks">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div style="border: 3px solid pink;margin: 3%" v-if="bbb">
aaa
<div style="border: 3px solid pink;margin: 2%" v-if="bbb">
<el-form ref="form" :model="form" label-width="100px" style="margin: 3px">
<el-row>
<el-col :span="6">
<el-form-item label="外协来源:" prop="goodsShelfId">
<el-select v-model="form.tripartiteSource" placeholder="请选择来源">
<el-option
v-for="item in tripartiteSourceData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="司机名称:" prop="goodsShelfId">
<el-input v-model="form.driverName" placeholder="请输入司机名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="司机电话:" prop="goodsShelfId">
<el-input v-model="form.deiverPhone" placeholder="请输入本次费用"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车辆车牌:" prop="goodsShelfId">
<el-input v-model="form.vehicleNum" placeholder="请输入本次费用"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配送费用:" prop="goodsShelfId">
<el-input v-model="form.deliveryFee" placeholder="请输入本次费用"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="叉车司机:" prop="forklift" >
<el-select v-model="form.forklift" placeholder="请选择叉车司机">
<el-option
v-for="item in this.forkliftData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="装卸班组:" prop="loader">
<el-select v-model="form.loader" placeholder="请选择装卸班组">
<el-option
v-for="item in loaderData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<!-- <el-radio-group v-model="form.loadAndUnload" >-->
<!-- <el-radio v-for="item in this.loadAndUnloadData" :label="item.dictValue" :value="item.dictKey"></el-radio>-->
<!-- </el-radio-group>-->
<el-checkbox-group v-model="form.loadAndUnload">
<el-checkbox v-for="item in loadAndUnloadData" :label="item.dictKey" :value="item.dictKey">{{item.dictValue}}</el-checkbox>
</el-checkbox-group>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="备货区域:" prop="goodsAreaId">
<el-select v-model="form.goodsAreaId" placeholder="请选择备货区域">
<el-option
v-for="item in goodsAreaData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictKey">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="备货时间:" prop="goodsShelfId">
<el-date-picker
v-model="form.stockupDate"
type="date"
placeholder="请选择备货时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注:" prop="remarks">
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="form.remarks">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div>
<el-row>
<!-- 列表模块 -->
<el-table
:data="tableData"
:data="data"
:height="height"
:border="option.border"
style="width: 100%">
@ -131,7 +247,6 @@
</el-table>
<el-table ref="table" v-loading="loading"
:data="data"
style="width: 100%; height:100%"
:border="option.border">
@ -169,7 +284,8 @@
import {
getList,
getDetail,
getReservationAddr
getReservationAddr,
deliveryTask
} from '@/api/distribution/distributionReservation';
import { getListUser } from '@/api/distribution/distributionStockup';
import { getPostList } from '@/api/system/post';
@ -216,6 +332,10 @@
goodsAreaData:[],
deptId:'',
driverData:[],
loadAndUnloadData:[],
tripartiteSourceData:[],
loadAndUnload:[],
};
},
@ -255,14 +375,16 @@
let ides = '';
let ide = { };
await getListUser().then(res =>{
// console.log("res>>>",res.data.data);
console.log("res>>>",res.data.data);
ides = res.data.data.tenantId;
this.deptId = res.data.data.deptId;
})
await getPostList(ides).then(res =>{
// console.log(">>>>",res.data.data);
console.log(">>>>",res.data.data);
// this.forkliftData = res.data.data;
res.data.data.forEach(i =>{
if(i.postName == "叉车"){
console.log(">>>>>>>>",i);
ide = i;
}
})
@ -295,7 +417,6 @@
department: this.deptId
}
getListTeam(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res =>{
// console.log(">><><",res.data.data.records);
let fo= [];
res.data.data.records.forEach(i =>{
let a= {
@ -305,6 +426,7 @@
fo.push(a);
});
this.loaderData = fo;
console.log("this.loaderData",this.loaderData);
})
},
//
@ -313,7 +435,6 @@
department: this.deptId
}
stockUp(params).then(res =>{
// console.log("res>>>",res.data.data);
let fo =[];
res.data.data.forEach(i =>{
let v = {
@ -322,7 +443,7 @@
}
fo.push(v)
})
this.goodsAreaIdData = fo;
this.goodsAreaData = fo;
})
},
//
@ -331,7 +452,6 @@
this.masterDriverData = res.data.data.records;
this.slaveDriverData = res.data.data.records;
this.driverData = res.data.data.records;
console.log("^^^^^^^^^^^^",this.driverData);
})
},
//
@ -342,37 +462,28 @@
})
},
//
changeMasterDriver(){
changeMasterDriver(params){
this.masterDriverData = JSON.parse(JSON.stringify(this.driverData));
// let i = 0;
console.log(">>>>>>>>>",params);
this.slaveDriverData=JSON.parse(JSON.stringify(this.driverData));
this.slaveDriverData.forEach((slave,index)=>{
this.masterDriverData.forEach(master=>{
if (slave.id===master.id){
if (slave.id===params){
this.slaveDriverData.splice(index,1)
console.log("111111111111");
}
})
})
console.log(">>>>>>>>>",i);
// this.slaveDriverData=this.slaveDriverData.splice(i,1);
console.log(">>>>>>>>>slaveDriverData",this.slaveDriverData);
console.log(">>>>>>>>>driverData",this.driverData);
},
//
changeSlaveDriver(params){
console.log("::::::::::",params);
// this.slaveDriverData = JSON.parse(JSON.stringify(this.driverData));
this.masterDriverData = JSON.parse(JSON.stringify(this.driverData));
params.forEach(par=>{
this.masterDriverData.forEach((master,index)=>{
if (par===master.id){
console.log(">>>>>>>>>>>>>>",master);
this.masterDriverData.splice(index,1)
}
})
})
console.log(">>>>>>>>>",this.masterDriverData);
},
//
getDictionary() {
@ -390,33 +501,99 @@
//
getDictionaryBiz('resvervation_status').then(res => {
this.resvervationStatusData = res.data.data;
console.log(this.deliveryTypeData);
});
//
getDictionaryBiz('stockup_status').then(res => {
this.stockupStatusData = res.data.data;
console.log(this.deliveryTypeData);
});
//
getDictionaryBiz('period_of_time').then(res => {
this.periodOfTimeData = res.data.data;
console.log(this.deliveryTypeData);
});
getDictionaryBiz('delivery_way').then(res => {
this.deliveryWayData = res.data.data;
});
getDictionaryBiz('load_and_unload').then(res => {
this.loadAndUnloadData = res.data.data;
});
//
getDictionaryBiz('tripartite_source').then(res => {
this.tripartiteSourceData = res.data.data;
});
},
ccc(){
this.aaa=true;
this.bbb=false;
this.form = {};
this.loadAndUnload=[];
},
ddd(){
this.aaa=false;
this.bbb=true;
this.form = {};
this.loadAndUnload=[];
},
onSubmitOrder(){
console.log(this.form);
const params = this.form;
if (params.tripartiteSource){
this.tripartiteSourceData.forEach(item=>{
if (params.tripartiteSource === item.dictValue){
params.tripartiteSource = item.dictKey;
}
})
}
params.loadAndUnload = this.loadAndUnload.join(",");
if (params.loader){
this.loaderData.forEach(item=>{
if (params.loader === item.dictKey){
this.form.loaderName = item.dictValue;
}
})
}
if (params.slaveDriver){
let slaveDriverName = [];
this.slaveDriverData.forEach(item=>{
params.slaveDriver.forEach(slave=>{
if (slave === item.id){
slaveDriverName.push(item.name)
}
})
})
params.slaveDriver = params.slaveDriver.join(",");
this.form.slaveDriverNames = slaveDriverName.join(",");
}
if (params.vehicleIds){
let vehicleNums = [];
this.vehicleData.forEach(item=>{
params.vehicleIds.forEach(id=>{
if (id === item.id){
vehicleNums.push(item.vehicleNub)
}
})
})
params.vehicleIds = params.vehicleIds.join(",");
this.form.vehicleNums = vehicleNums.join(",");
}
if (params.masterDriver){
this.driverData.forEach(driver=>{
if (params.masterDriver === driver.id){
this.form.masterDriverName = driver.name;
}
})
}
this.form = params;
this.form.reservationIds = this.ids;
console.log(">>>>>>>>>>>>>>>>",this.form);
deliveryTask(this.form).then(res=>{
this.$message({
type: 'success',
message: '操作成功!'
});
})
},
onLoad() {
this.loading=false;
Loading…
Cancel
Save