|
|
|
<template>
|
|
|
|
<basic-container>
|
|
|
|
<div class="avue-crud">
|
|
|
|
|
|
|
|
<el-form ref="form"
|
|
|
|
:model="form"
|
|
|
|
prop="consignee"
|
|
|
|
label-width="80px">
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="收货人:" prop="consignee" label-width="100px" >
|
|
|
|
<el-input v-model="form.consignee" clearable placeholder="请输入收货人"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="预约时间:" prop="reservationDate" label-width="100px" >
|
|
|
|
<el-date-picker
|
|
|
|
v-model="form.reservationDate"
|
|
|
|
type="date"
|
|
|
|
clearable
|
|
|
|
placeholder="选择日期时间">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="收件地址:" prop="deliveryAddress" label-width="100px" >
|
|
|
|
<el-input v-model="form.deliveryAddress" clearable placeholder="请输入收件地址"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="配送类型:" prop="serveType" label-width="100px" >
|
|
|
|
<el-radio-group v-model="form.deliveryType" >
|
|
|
|
<el-radio v-for="item in this.deliveryTypeData" :label="item.dictValue" :value="item.dictKey"></el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="收件人电话:" prop="deliveryPhone" label-width="100px">
|
|
|
|
<el-input v-model="form.deliveryPhone" placeholder="请输入收件人电话"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="配送方式:" prop="serveType" label-width="100px" >
|
|
|
|
<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>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="备注:" prop="orderSource" label-width="100px" style="width: 100%">
|
|
|
|
<el-input
|
|
|
|
type="textarea"
|
|
|
|
:rows="2"
|
|
|
|
placeholder="请输入内容"
|
|
|
|
v-model="form.textarea">
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="服务类型:" prop="serveType" label-width="100px" >
|
|
|
|
<!-- <el-input v-model="form.serveType" clearable placeholder="请选择服务类型"/>-->
|
|
|
|
<el-checkbox-group v-model="form.serveType">
|
|
|
|
<el-checkbox v-for="item in this.addvalueServeTypeData" :label="item.dictValue" :value="item.dictKey" ></el-checkbox>
|
|
|
|
</el-checkbox-group>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="到付运费:" prop="collectFee" label-width="100px">
|
|
|
|
<el-input v-model="form.collectFee" :disabled="true" placeholder="请输入到付运费"/>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="其他费用:" prop="collectFee" label-width="100px">
|
|
|
|
<el-input v-model="form.otherFee" placeholder="请输入到付运费"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="代收运费:" prop="replaceFee" label-width="100px">
|
|
|
|
<el-input v-model="form.replaceFee" :disabled="true" placeholder="请输入代付运费"/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
</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">
|
|
|
|
<!-- 表单字段 -->
|
|
|
|
<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>
|
|
|
|
<!-- <el-form-item label="预留1" prop="reserve1">-->
|
|
|
|
<!-- <el-input v-model="form.reserve1" placeholder="请输入预留1"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- <el-form-item label="预留2" prop="reserve2">-->
|
|
|
|
<!-- <el-input v-model="form.reserve2" placeholder="请输入预留2"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- <el-form-item label="预留3" prop="reserve3">-->
|
|
|
|
<!-- <el-input v-model="form.reserve3" placeholder="请输入预留3"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- <el-form-item label="预留4" prop="reserve4">-->
|
|
|
|
<!-- <el-input v-model="form.reserve4" placeholder="请输入预留4"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
<!-- <el-form-item label="预留5" prop="reserve5">-->
|
|
|
|
<!-- <el-input v-model="form.reserve5" placeholder="请输入预留5"/>-->
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
</el-form>
|
|
|
|
<!-- 表单按钮 -->
|
|
|
|
<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-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="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"
|
|
|
|
title="增值服务"
|
|
|
|
width="30%"
|
|
|
|
:model="addvalue"
|
|
|
|
: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%;"
|
|
|
|
v-for="(item,index) in addvalueServeTypeData"
|
|
|
|
:key="item.dictKey"
|
|
|
|
:label="item.dictKey"
|
|
|
|
>{{item.dictValue}}
|
|
|
|
<span v-if="index===0||index===6||index===2||index===4"> 件数:
|
|
|
|
<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;"/>
|
|
|
|
</span>
|
|
|
|
<span v-if="index===1">公里:
|
|
|
|
<el-input type="text" 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;"/>
|
|
|
|
</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;"/>
|
|
|
|
</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;"/>
|
|
|
|
</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;"/>
|
|
|
|
</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;"/>
|
|
|
|
</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>
|
|
|
|
<template #footer>
|
|
|
|
<span class="dialog-footer">
|
|
|
|
<el-button @click="dialogVisible = false">取消</el-button>
|
|
|
|
<el-button type="primary" @click="aaa">
|
|
|
|
确定(增值服务)
|
|
|
|
</el-button>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</basic-container>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<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 { 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';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
height: 0,
|
|
|
|
// 弹框标题
|
|
|
|
title: '',
|
|
|
|
// 是否展示弹框
|
|
|
|
box: false,
|
|
|
|
// 是否显示查询
|
|
|
|
search: true,
|
|
|
|
// 加载中
|
|
|
|
loading: true,
|
|
|
|
// 是否为查看模式
|
|
|
|
view: false,
|
|
|
|
// 查询信息
|
|
|
|
query: {},
|
|
|
|
// 分页信息
|
|
|
|
page: {
|
|
|
|
currentPage: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
total: 40
|
|
|
|
},
|
|
|
|
// 表单数据
|
|
|
|
form: {},
|
|
|
|
// 选择行
|
|
|
|
selectionList: [],
|
|
|
|
// 表单配置
|
|
|
|
option: option,
|
|
|
|
// 表单列表
|
|
|
|
data: [],
|
|
|
|
//增值服务弹窗
|
|
|
|
dialogVisible:false,
|
|
|
|
textarea:"",
|
|
|
|
//增值服务字典列表
|
|
|
|
addvalueServeTypeData:[],
|
|
|
|
//配送方式字典列表
|
|
|
|
deliveryWayData:[],
|
|
|
|
//配送类型字典列表
|
|
|
|
deliveryTypeData:[],
|
|
|
|
//增值服务列表
|
|
|
|
addvalueServeType:[],
|
|
|
|
//增值表单输入框对象
|
|
|
|
addvalue:{},
|
|
|
|
costList:[], //字典
|
|
|
|
//增值服务对象
|
|
|
|
addvalueObj:{},
|
|
|
|
//费用列表
|
|
|
|
feeList:[],
|
|
|
|
//楼层
|
|
|
|
floorList:[],
|
|
|
|
//订单行数据
|
|
|
|
orderInfo:{},
|
|
|
|
//增加订单弹窗
|
|
|
|
orderShow:false,
|
|
|
|
//在库订单信息
|
|
|
|
stockArticleInfo:{},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
this.init();
|
|
|
|
this.onLoad(this.page);
|
|
|
|
this.getDictionary();
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapGetters(["permission"]),
|
|
|
|
ids () {
|
|
|
|
let ids = [];
|
|
|
|
this.selectionList.forEach(ele => {
|
|
|
|
ids.push(ele.id);
|
|
|
|
});
|
|
|
|
return ids.join(",");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
init () {
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 340);
|
|
|
|
},
|
|
|
|
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.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 );
|
|
|
|
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) {
|
|
|
|
console.log("e,index",e,index,a);
|
|
|
|
// 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);
|
|
|
|
},
|
|
|
|
//数据字典数据获取
|
|
|
|
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);
|
|
|
|
})
|
|
|
|
},
|
|
|
|
addvalueServe(row){
|
|
|
|
this.addvalueServeType = [];
|
|
|
|
this.addvalue={};
|
|
|
|
this.dialogVisible =true;
|
|
|
|
this.costList=[];
|
|
|
|
this.feeList=[];
|
|
|
|
this.floorList=[];
|
|
|
|
this.orderInfo = row;
|
|
|
|
},
|
|
|
|
searchHide () {
|
|
|
|
this.search = !this.search;
|
|
|
|
},
|
|
|
|
searchChange () {
|
|
|
|
this.onLoad(this.page);
|
|
|
|
},
|
|
|
|
searchReset () {
|
|
|
|
this.query = {};
|
|
|
|
this.page.currentPage = 1;
|
|
|
|
this.onLoad(this.page);
|
|
|
|
},
|
|
|
|
handleSubmit () {
|
|
|
|
if (!this.form.id) {
|
|
|
|
addDelivery(this.form).then(() => {
|
|
|
|
this.box = false;
|
|
|
|
this.onLoad(this.page);
|
|
|
|
this.$message({
|
|
|
|
type: "success",
|
|
|
|
message: "操作成功!"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
update(this.form).then(() => {
|
|
|
|
this.box = false;
|
|
|
|
this.onLoad(this.page);
|
|
|
|
this.$message({
|
|
|
|
type: "success",
|
|
|
|
message: "操作成功!"
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
viewPackage(){
|
|
|
|
this.isaddvalue = true;
|
|
|
|
},
|
|
|
|
onSubmit(){
|
|
|
|
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: "操作成功!"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
handleClose(done) {
|
|
|
|
this.$confirm('确认关闭?')
|
|
|
|
.then(_ => {
|
|
|
|
done();
|
|
|
|
})
|
|
|
|
.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 = '查看'
|
|
|
|
this.view = true;
|
|
|
|
this.box = true;
|
|
|
|
getDetailDelivery(row.id).then(res => {
|
|
|
|
this.form = res.data.data;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleDelete () {
|
|
|
|
if (this.selectionList.length === 0) {
|
|
|
|
this.$message.warning("请选择至少一条数据");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
return remove(this.ids);
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
this.selectionClear();
|
|
|
|
this.onLoad(this.page);
|
|
|
|
this.$message({
|
|
|
|
type: "success",
|
|
|
|
message: "操作成功!"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
rowDel (row) {
|
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning"
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
return remove(row.id);
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
this.onLoad(this.page);
|
|
|
|
this.$message({
|
|
|
|
type: "success",
|
|
|
|
message: "操作成功!"
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
beforeClose (done) {
|
|
|
|
done()
|
|
|
|
this.form = {};
|
|
|
|
this.view = false;
|
|
|
|
},
|
|
|
|
selectionChange (list) {
|
|
|
|
console.log(">>>>>>>>>>>>>",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();
|
|
|
|
},
|
|
|
|
currentChange (currentPage) {
|
|
|
|
this.page.currentPage = currentPage;
|
|
|
|
this.onLoad(this.page);
|
|
|
|
},
|
|
|
|
sizeChange (pageSize) {
|
|
|
|
this.page.pageSize = pageSize;
|
|
|
|
this.onLoad(this.page);
|
|
|
|
},
|
|
|
|
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.stockArticleInfo = data.records;
|
|
|
|
this.loading = false;
|
|
|
|
this.selectionClear();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
|
|
|
|
input::-webkit-outer-spin-button,
|
|
|
|
input::-webkit-inner-spin-button {
|
|
|
|
-webkit-appearance: none;
|
|
|
|
}
|
|
|
|
input[type="number"]{
|
|
|
|
-moz-appearance: textfield;
|
|
|
|
}
|
|
|
|
</style>
|