Browse Source

批量转配送任务

dev-warehouse
kilo 2 years ago
parent
commit
83d07b76e5
  1. 1
      index.html
  2. 12
      src/api/distribution/distributionDelivery.js
  3. 17
      src/api/distribution/distributionReservation.js
  4. 13
      src/api/distribution/distributionStockArticle.js
  5. 17
      src/main.js
  6. 8
      src/option/basicdata/basicdataGoodsAllocation.js
  7. 22
      src/option/basicdata/basicdataTray.js
  8. 20
      src/option/distribution/distributionDelivery.js
  9. 6
      src/option/distribution/distributionReservation.js
  10. 4
      src/option/distribution/distributionStockArticle.js
  11. 19
      src/router/views/index.js
  12. 6
      src/views/basicdata/warehouse/goodsArea/basicdataGoodsArea.vue
  13. 18
      src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue
  14. 125
      src/views/distribution/reservation/reservation.vue
  15. 252
      src/views/distribution/reservation/reservationFrom.vue

1
index.html

@ -23,6 +23,7 @@
</script>
<script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=f003ec4feb3fcc4cf0742e94f569fd33&plugin=AMap.PlaceSearch'></script>
<script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=FpjVxjf9nGo47eLj9I0ZuUvSZm1wGGqr"></script>
</head>
<body>

12
src/api/distribution/distributionDelivery.js

@ -47,4 +47,16 @@ export const updateDelivery = (row) => {
data: row
})
}
/**
* 订单添加增值服务
* @param row
* @returns {AxiosPromise}
*/
export const addIncrement = (row) => {
return request({
url: '/api/logpm-distribution/delivery/addIncrement',
method: 'post',
data: row
})
}

17
src/api/distribution/distributionReservation.js

@ -34,7 +34,7 @@ export const remove = (ids) => {
export const add = (row) => {
return request({
url: '/api/logpm-distribution/reservation/submit',
url: '/api/logpm-distribution/reservation/save',
method: 'post',
data: row
})
@ -55,7 +55,20 @@ export const update = (row) => {
*/
export const confirms = (row) => {
return request({
url: '/api/logpm-distribution/reservation/addIds',
url: '/api/logpm-distribution/reservation/stockUpTask',
method: 'post',
data:row
})
}
/**
* 批量转备货
* @param row
* @returns {AxiosPromise}
*/
export const addReservations = (row) => {
return request({
url: '/api/logpm-distribution/reservation/confirmReservations',
method: 'post',
data:row
})

13
src/api/distribution/distributionStockArticle.js

@ -58,3 +58,16 @@ export const update = (row) => {
})
}
/**
* 订单添加增值服务
* @param row
* @returns {AxiosPromise}
*/
export const addIncrement = (row) => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/addIncrement',
method: 'post',
data: row
})
}

17
src/main.js

@ -27,10 +27,15 @@ import dayjs from 'dayjs';
import 'styles/common.scss';
// 业务组件
import tenantPackage from './views/system/tenantpackage.vue';
// import AvueMap from 'avue-plugin-map';
// main.js
// import htmlToPdf from './utils/htmlToPdf'
import AvueMap from 'vue-amap';
// AvueMap.initAMapApiLoader({
// //申请地址 https://lbs.amap.com/ 选择web端jsAPI
// key: '40448f21dfc7a531e9db4c405d955bea',
// // 插件集合,用到什么插件就使用什么插件
// plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
// v: '1.4.4', // 高德sdk版本,最新的sdk已经出到了2.0
// //官网解释:JSAPI 2.0 提供的开发接口与 1.4 版本达到 99%的兼容度,但是为了保证插件的稳定性我们还是选择1.4.4。
// })
window.$crudCommon = crudCommon;
window.axios = axios;
@ -50,8 +55,8 @@ app.config.globalProperties.website = website;
app.config.globalProperties.getScreen = getScreen;
app.use(error);
app.use(i18n);
// app.use(AvueMap);
// app.use(htmlToPdf)
app.use(AvueMap);
app.use(store);
app.use(router);

8
src/option/basicdata/basicdataGoodsAllocation.js

@ -8,6 +8,7 @@ export default {
index: true,
viewBtn: true,
selection: true,
addBtn:false,
indexWidth:'150',
indexLabel:"序号",
dialogClickModal: false,
@ -208,7 +209,7 @@ export default {
label: "启用状态",
prop: "enableStatus",
type: "select",
search: true,
search: false,
labelWidth:'100',
dicUrl: '/api/blade-system/dict-biz/dictionary?code=enable_status',
props: {
@ -217,7 +218,9 @@ export default {
},
addDisplay: false,
align:'center',
editDisplay: false,
viewDisplay: false,
hide: true,
},
{
label: "货位状态",
@ -232,7 +235,6 @@ export default {
},
addDisplay: false,
align:'center',
},
{
label: "二维码",

22
src/option/basicdata/basicdataTray.js

@ -119,12 +119,12 @@ export default {
// prop: "reserve5",
// type: "input",
// },
{
label: "托盘名称",
prop: "palletName",
type: "input",
labelWidth:'100',
},
// {
// label: "托盘名称",
// prop: "palletName",
// type: "input",
// labelWidth:'100',
// },
{
label: "仓 库",
prop: "warehouseId",
@ -184,6 +184,16 @@ export default {
viewDisplay: true,
hide: false
},
{
label: "数量",
prop: "number",
type: "number",
labelWidth:'100',
addDisplay: true,
editDisplay: false,
viewDisplay: false,
hide: true
},
// {
// label: "二维码",
// prop: "qrCode",

20
src/option/distribution/distributionDelivery.js

@ -59,13 +59,17 @@ export default {
hide: true,
},
{
label: "订单自编号",
prop: "orderId",
label: "预约编号",
prop: "reservationId",
},
{
label: "运单号",
prop: "waybillId",
},
{
label: "订单自编号",
prop: "orderId",
},
{
label: "商城编号",
prop: "shoppingId",
@ -106,6 +110,18 @@ export default {
label: "待收货款",
prop: "replaceFee",
},
{
label: "预约状态",
prop: "reservationStatus",
},
{
label: "订单来源",
prop: "orderSource",
},
// {
// label: "预留1",
// prop: "reserve1",

6
src/option/distribution/distributionReservation.js

@ -61,7 +61,7 @@ export default {
{
label: "订单自编号",
prop: "orderId",
width:'120'
width:'173'
},
{
label: "收货人",
@ -77,7 +77,7 @@ export default {
},
{
label: "预约时间",
prop: "reservationData",
prop: "reservationDate",
width:'150'
},
{
@ -112,7 +112,7 @@ export default {
},
{
label: "预约信息状态",
prop: "resvervationStatus",
prop: "reservationStatus",
width:'120'
},
{

4
src/option/distribution/distributionStockArticle.js

@ -154,6 +154,10 @@ export default {
label: "顾客地址",
prop: "customerAddress",
},
{
label: "增值服务",
prop: "fee",
},
// {
// label: "类型;1 预约单 2库存单",
// prop: "genre",

19
src/router/views/index.js

@ -398,18 +398,31 @@ export default [
component: () => import('@/views/basic/property/basicPropertyform.vue'),
},
],
}, {
},
{
path: '/distribution/reservation/reservationFrom',
component: Layout,
redirect: '/distribution/reservation',
redirect: '/distribution/reservation/reservationFrom',
children: [
{
path: '/distribution/reservation/reservationFrom',
name: 'name',
name: '添加预约',
component: () => import('@/views/distribution/reservation/reservationFrom.vue'),
},
],
},
{
path: '/distribution/reservation/atlas',
component: Layout,
redirect: '/distribution/reservation/atlas',
children: [
{
path: '/distribution/reservation/atlas',
name: '地图展示',
component: () => import('@/views/distribution/reservation/atlas.vue'),
},
],
},
{
path: '/basic/property/basicrecordslist',
component: Layout,

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

@ -139,7 +139,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="货区状态:" prop="enableStatus" label-width="110px">
<el-form-item label="货区状态:" v-if="aaa" prop="enableStatus" label-width="110px">
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>-->
<el-select v-model="form.enableStatus" clearable placeholder="请选择货区状态" style="width: 70%" >
<el-option
@ -254,6 +254,7 @@ export default {
{required: true, message: '请选择货区类型!',trigger: 'change'}
]
},
aaa:false,
}
},
created() {
@ -345,14 +346,17 @@ export default {
this.form = {}
this.box = true
this.isShow=true;
this.aaa=false;
this.$refs['form'].resetFields();
},
handleEdit (row) {
this.title = '编辑';
this.box = true;
this.isShow=false;
this.aaa=true;
getDetail(row.id).then(res => {
this.form = res.data.data;
console.log(this.form);
});
},
handleView (row) {

18
src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue

@ -163,12 +163,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="货架名称:" prop="goodsShelfName" label-width="100px" >
<el-input v-model="form.goodsShelfName" placeholder="请输入货架名称" style="width: 88%;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用状态:" prop="enableStatus" label-width="100px" >
<el-form-item label="启用状态:" v-if="idShowStatus" prop="enableStatus" label-width="100px" >
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>-->
<el-select v-model="form.enableStatus" clearable placeholder="请选择货区状态" style="width: 88%" >
<el-option
@ -181,7 +176,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="货架状态:" prop="goodsShelfStatus" label-width="100px" >
<el-form-item label="货架状态:" v-if="idShowStatus" prop="goodsShelfStatus" label-width="100px" >
<!-- <el-input v-model="form.areaStatus" placeholder="请输入货区状态;1-启用,2-禁用"/>-->
<el-select v-model="form.goodsShelfStatus" clearable placeholder="请选择货架状态" style="width: 88%" >
<el-option
@ -193,6 +188,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="货架名称:" prop="goodsShelfName" label-width="100px" >
<el-input v-model="form.goodsShelfName" placeholder="请输入货架名称" style="width: 88%;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="列 数:" prop="rowNum" label-width="100px">
<el-input v-model="form.rowNum" placeholder="请输入货架层数" style="width: 88%;"/>
@ -348,6 +348,8 @@ export default {
{ required: true, message: '请选择启用状态!', trigger: 'change' }
],
},
//
idShowStatus:false,
}
},
created() {
@ -453,6 +455,7 @@ export default {
this.box = true
this.isShowgoodsArea=true;
this.isShowQRCode = false;
this.idShowStatus = false;
this.$refs['form'].resetFields();
},
@ -461,6 +464,7 @@ export default {
this.box = true
this.isShowgoodsArea=false;
this.isShowQRCode = false;
this.idShowStatus = true;
getDetail(row.id).then(res => {
console.log(">>>>>>>>>>>",row);
res.data.data.goodsShelfStatus = res.data.data.goodsShelfStatus.toString();

125
src/views/distribution/reservation/reservation.vue

@ -21,7 +21,9 @@
<!-- 头部左侧按钮模块 -->
<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="handleDelete" plain>批量确认</el-button>
<el-button 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>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -94,7 +96,7 @@
<el-input v-model="form.deliveryAddress" placeholder="请输入收件地址"/>
</el-form-item>
<el-form-item label="预约时间" prop="reservationData">
<el-input v-model="form.reservationData" placeholder="请输入预约时间"/>
<el-input v-model="form.reservationDate" placeholder="请输入预约时间"/>
</el-form-item>
<el-form-item label="服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;" prop="serveType">
<el-input v-model="form.serveType" placeholder="请输入服务类型;预约服务类型;1-上楼、2-超区、3-拆样、4-平移、5-分拣、6-搬运、7-返货;"/>
@ -155,9 +157,10 @@
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/api/distribution/distributionReservation";
import { getList, getDetail, add, update, remove,confirms,addReservations } from "@/api/distribution/distributionReservation";
import option from "@/option/distribution/distributionReservation";
import { mapGetters } from "vuex";
import { getDictionaryBiz } from '@/api/system/dict';
export default {
data () {
@ -189,11 +192,18 @@ export default {
option: option,
//
data: [],
//
deliveryTypeData:[],
//
resvervationStatusData:[],
stockupStatusData:[],
orderSourceData:[],
}
},
mounted () {
this.init();
this.onLoad(this.page);
this.getDictionary();
},
computed: {
...mapGetters(["permission"]),
@ -209,6 +219,33 @@ export default {
init () {
this.height = this.setPx(document.body.clientHeight - 340);
},
//
getDictionary(){
getDictionaryBiz("addvalue_serve_type").then(res=>{
this.addvalueServeTypeData = res.data.data;
console.log(this.addvalueServeTypeData);
})
getDictionaryBiz("delivery_type").then(res=>{
this.deliveryTypeData = res.data.data;
console.log(this.deliveryWayData);
})
//
getDictionaryBiz("order_source").then(res=>{
this.orderSourceData = res.data.data;
console.log(this.deliveryTypeData);
})
//
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);
})
},
searchHide () {
this.search = !this.search;
},
@ -220,6 +257,23 @@ export default {
this.page.currentPage = 1;
this.onLoad(this.page);
},
handleConfirmReservations(){
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
let param = {};
param.ids=this.ids.toString();
addReservations(param).then(res=>{
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
})
},
handleSubmit () {
if (!this.form.id) {
add(this.form).then(() => {
@ -242,15 +296,8 @@ export default {
}
},
handleAdd () {
// this.title = ''
// this.form = {}
// this.box = true
this.$router.push({
path: '/distribution/reservation/reservationFrom',
query: {
name:'新增',
type:'add'
}
});
},
handleEdit (row) {
@ -280,6 +327,40 @@ export default {
this.form = res.data.data;
});
},
/**
* 批量转配送
*/
handleDeliverys(){
this.$router.push({
path: '/distribution/reservation/atlas',
});
},
handleStockUp(){
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
let param= {}
param.ids = this.ids;
const date = new Date();
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const formattedDate = `${year}-${month}-${day}`;
console.log(formattedDate);
param.stockupDate=formattedDate;
param.goodsAreaId="46546456156";
param.addvalueType="1";
confirms(param).then(()=>{
this.selectionClear();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
})
},
handleDelete () {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
@ -343,6 +424,30 @@ export default {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
console.log(">>>>>>>",data);
data.records.forEach(item=>{
this.orderSourceData.forEach(a=>{
if (item.orderSource===a.dictKey){
item.orderSource = a.dictValue;
}
})
this.stockupStatusData.forEach(b=>{
if (item.stockupStatus===b.dictKey){
item.stockupStatus = b.dictValue;
}
})
this.resvervationStatusData.forEach(e=>{
if (item.reservationStatus===e.dictKey){
item.reservationStatus = e.dictValue;
}
})
this.deliveryTypeData.forEach(c=>{
if (item.deliveryType===c.dictKey){
console.log("465465465465");
item.deliveryType = c.dictValue;
}
})
})
this.page.total = data.total;
this.data = data.records;
this.loading = false;

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

@ -13,10 +13,10 @@
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="预约时间:" prop="reservationData" label-width="100px" >
<el-form-item label="预约时间:" prop="reservationDate" label-width="100px" >
<el-date-picker
v-model="form.reservationData"
type="datetime"
v-model="form.reservationDate"
type="date"
clearable
placeholder="选择日期时间">
</el-date-picker>
@ -48,7 +48,7 @@
</el-col>
<el-col :span="10">
<el-form-item label="配送方式:" prop="serveType" label-width="100px" >
<el-radio-group v-model="form.deliveryType">
<el-radio-group v-model="form.deliveryWay">
<el-radio v-for="item in this.deliveryWayData" :label="item.dictValue" :value="item.dictKey"></el-radio>
</el-radio-group>
</el-form-item>
@ -168,7 +168,7 @@
<el-row style="margin: 50px;">
<el-button-group>
<el-button type="primary" icon="el-icon-plus">增加订单</el-button>
<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">
@ -204,11 +204,50 @@
</el-table>
<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 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-dialog
v-model="orderShow"
title="在库订单信息"
width="100%"
:model="addvalue"
:before-close="handleClose"
>
<el-table ref="table"
v-loading="loading"
@selection-change="selectionChange"
:data="stockArticleInfo"
:height="height"
style="width: 90%"
: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-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">
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitOrder">提交(订单选择)</el-button>
<el-button icon="el-icon-circle-close" @click="$router.go(-1)"> </el-button>
</el-form-item>
</el-dialog>
<el-dialog
v-model="dialogVisible"
@ -218,8 +257,8 @@
:before-close="handleClose"
>
<el-form-item label="费用类型" prop="freightMark">
<el-checkbox-group v-model="form.freightMark" @change="handleCheckedCitiesChange">
<el-form-item label="增值服务" prop="freightMark">
<el-checkbox-group v-model="form.addvalueType" @change="handleCheckedCitiesChange">
<el-checkbox style="width: 100%;margin-bottom: 3%;"
v-for="(item,index) in addvalueServeTypeData"
:key="item.dictKey"
@ -252,33 +291,8 @@
<!-- <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>
<div v-for="(item,index) in this.addvalueServeTypeData">
<el-checkbox :label="item.dictValue" :value="item.dictKey" v-model="this.addvalueServeType"/>
<span v-if="index===0||index===6||index===2||index===4">&nbsp;件数:
<input v-model="addvalueServeType.number" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
<span v-if="index===1">公里:
<input v-model="addvalueServeType.kilometer" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
<span v-if="index===3">距离:
<input v-model="addvalueServeType.distance" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
<span v-if="index===5">人数:
<input v-model="addvalueServeType.peopleNum" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
<span v-if="index===0">楼层:
<input v-model="addvalueServeType.floor" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
<span v-if="item">预计费用:
<input v-model="addvalueServeType.fee" type="text" style="width: 5%;border:none; border-bottom:2px solid #eee;">
</span>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
@ -295,11 +309,16 @@
<script>
import { getList, getDetail, add, update, remove } from "@/api/distribution/distributionReservation";
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 option from "@/option/distribution/distributionDelivery";
import { addIncrement } from "@/api/distribution/distributionStockArticle";
// import option from "@/option/distribution/distributionDelivery";
import option from "@/option/distribution/distributionStockArticle";
import { mapGetters } from "vuex";
import { getDictionaryBiz } from '@/api/system/dict';
@ -349,6 +368,16 @@ export default {
costList:[], //
//
addvalueObj:{},
//
feeList:[],
//
floorList:[],
//
orderInfo:{},
//
orderShow:false,
//
stockArticleInfo:{},
}
},
mounted () {
@ -371,8 +400,43 @@ export default {
this.height = this.setPx(document.body.clientHeight - 340);
},
aaa(){
console.log(this.addvalueServeType);
console.log(this.costList);
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.orderInfo.id
params.addvalue = addvalueInfos;
addIncrement(params).then(res=>{
this.dialogVisible =false;
this.$message({
type: "success",
message: "操作成功!"
});
})
console.log("a[]>>>>>>>",params);
},
bbb(){
this.orderShow = true;
},
handleCheckedCitiesChange(value) {
console.log(">>>>>>>",value );
@ -385,31 +449,31 @@ export default {
this.costListName = [];
}
this.deliveryWayData.forEach(i =>{
// console.log("value.includes(i.dictkey)",value,i.dictKey);
if(value.includes(i.dictKey)){
console.log(i);
i.pitch = true;
this.costListName = value;
// console.log(this.costListName);
// this.$set(i,'pitch',false);
}
// else{
// console.log("123");
// i.pitch = false;
// this.costList[i] = null;
// i.remark = null;
// }
});
// let checkedCount = value.length;
// this.checkAll = checkedCount === this.cities.length;
// this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
textbox(e,index,a) {
console.log("e,index",e,index,a);
this.costList[index+1] = e;
if (index===1 && a === 1 ){
// if (index===1 && a === 1 ){
//
// }
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;
//
console.log(">>>>>>>",this.costList);
},
//
@ -427,10 +491,14 @@ export default {
console.log(this.deliveryTypeData);
})
},
addvalueServe(){
addvalueServe(row){
this.addvalueServeType = [];
this.addvalue={};
this.dialogVisible =true;
this.costList=[];
this.feeList=[];
this.floorList=[];
this.orderInfo = row;
},
searchHide () {
this.search = !this.search;
@ -468,10 +536,38 @@ export default {
this.isaddvalue = true;
},
onSubmit(){
this.dialogVisible = true;
addDelivery(this.form).then(() => {
console.log(">>>>>>>>this.form",this.form);
let ids = [];
this.data.forEach(item=>{
ids.push(item.id)
})
ids.join(",");
console.log(ids);
this.form.ids=ids.toString();
this.deliveryWayData.forEach(item=>{
if (this.form.deliveryWay === item.dictValue){
this.form.deliveryWay = item.dictKey;
}
})
this.deliveryTypeData.forEach(item=>{
if (this.form.deliveryType === item.dictValue){
this.form.deliveryType = item.dictKey;
}
})
let a=[]
this.addvalueServeTypeData.forEach(item=>{
this.form.serveType.forEach(type=>{
if (type===item.dictValue){
a.push(item.dictKey)
// this.form.serveType=item.dictKey;
}
})
})
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: "操作成功!"
@ -481,27 +577,20 @@ export default {
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
.then(_ => {
done();
})
.catch(_ => {});
},
handleAdd () {
this.title = '新增'
this.form = {}
this.box = true
// this.$router.push({
// path: '/distribution/reservation/reservationFrom',
// query: {
// name:'',
// type:'add'
// }
// });
},
handleEdit (row) {
this.title = '编辑'
this.box = true
getDetail(row.id).then(res => {
getDetailDelivery(row.id).then(res => {
this.form = res.data.data;
});
},
@ -509,7 +598,7 @@ export default {
this.title = '查看'
this.view = true;
this.box = true;
getDetail(row.id).then(res => {
getDetailDelivery(row.id).then(res => {
this.form = res.data.data;
});
},
@ -558,8 +647,21 @@ export default {
this.view = false;
},
selectionChange (list) {
console.log(">>>>>>>>>>>>>",list);
this.selectionList = list;
},
/**
* 增加订单提交
*/
onSubmitOrder(){
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.data = this.selectionList
this.orderShow =false
},
selectionClear () {
this.selectionList = [];
this.$refs.table.clearSelection();
@ -574,22 +676,16 @@ export default {
},
onLoad (page, params = {}) {
this.loading = true;
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// const data = res.data.data;
// this.page.total = data.total;
// // this.data = data.records;
// this.loading = false;
// this.selectionClear();
// });
getListDelivery(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.stockArticleInfo = data.records;
this.loading = false;
this.selectionClear();
});
}
}
},
};
</script>
<style>

Loading…
Cancel
Save