阶段性提交

This commit is contained in:
@fawn-nine
2023-10-26 13:13:41 +08:00
parent a5b5d2a24b
commit 16d7333f46
6 changed files with 539 additions and 233 deletions

View File

@@ -78,6 +78,7 @@ import {
Notification, Notification,
Timeline, Timeline,
TimelineItem, TimelineItem,
// Drawer
} from 'element-ui' } from 'element-ui'
Vue.use(Timeline) Vue.use(Timeline)
@@ -145,6 +146,7 @@ Vue.use(Header)
Vue.use(Aside) Vue.use(Aside)
Vue.use(Main) Vue.use(Main)
Vue.use(Footer) Vue.use(Footer)
// Vue.use(Drawer)
Vue.use(Loading.directive) Vue.use(Loading.directive)

View File

@@ -7,7 +7,7 @@
<el-tab-pane label="充值订单" name="2"></el-tab-pane> <el-tab-pane label="充值订单" name="2"></el-tab-pane>
</el-tabs> --> </el-tabs> -->
<el-radio-group size="mini" v-model="tabChange.tabActiveName" style="margin-bottom: 10px;"> <el-radio-group size="mini" v-model="tabChange.tabActiveName" style="margin-bottom: 10px;">
<el-radio-button label="all">全部</el-radio-button> <el-radio-button label="">全部</el-radio-button>
<el-radio-button label="0">待付款</el-radio-button> <el-radio-button label="0">待付款</el-radio-button>
<el-radio-button label="1">待发货</el-radio-button> <el-radio-button label="1">待发货</el-radio-button>
<el-radio-button label="2">已发货</el-radio-button> <el-radio-button label="2">已发货</el-radio-button>
@@ -24,11 +24,11 @@
<!-- <el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder:delete')" type="primary" @click="printHandle(dataListSelections)" <!-- <el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder:delete')" type="primary" @click="printHandle(dataListSelections)"
:disabled="dataListSelections.length <= 0" >批量打印</el-button> --> :disabled="dataListSelections.length <= 0" >批量打印</el-button> -->
</div> </div>
<div style="margin-bottom: 10px; float:left" v-if="tabChange.isPrint == '1'"> <!-- <div style="margin-bottom: 10px; float:left" v-if="tabChange.isPrint == '1'">
<el-radio v-model="tabChange.sheetCode" label="0" border size="mini">未打印</el-radio> <el-radio v-model="tabChange.sheetCode" label="0" border size="mini">未打印</el-radio>
<el-radio v-model="tabChange.sheetCode" label="1" border size="mini">已打印</el-radio> <el-radio v-model="tabChange.sheetCode" label="1" border size="mini">已打印</el-radio>
</div> </div> -->
<div style="margin-bottom: 10px; float:left;margin-left: 10px; "> <div style="margin-bottom: 10px; float:left; ">
<el-form v-if="tabChange.isPrint == '1'" :inline="true" size="mini" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form v-if="tabChange.isPrint == '1'" :inline="true" size="mini" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item>
<el-input style="width:200px" v-model="dataForm.key" placeholder="订单编号/运单编号" clearable></el-input> <el-input style="width:200px" v-model="dataForm.key" placeholder="订单编号/运单编号" clearable></el-input>
@@ -74,24 +74,24 @@
<el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder')" type="primary" <el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder')" type="primary"
:disabled="checkedOrders.length <= 0" @click="checkDeliver">批量发货</el-button> :disabled="checkedOrders.length <= 0" @click="checkDeliver">批量发货</el-button>
</span> --> </span> -->
<!-- <span style="" v-if="tabChange.tabActiveName == 2 && tabChange.isPrint == 1"> <span style="" v-if="tabChange.tabActiveName == 2 && tabChange.isPrint == 1">
<el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder')" type="warning" <el-button style="margin-left: 10px;" size="mini" v-if="isAuth('book:buyorder')" type="warning"
:disabled="dataListSelections.length <= 0" @click="printHandle">批量打印</el-button> :disabled="SheetSelectionList.length <= 0" @click="printHandle(null,null,'piliang')">批量打印</el-button>
</span> --> </span>
</div> </div>
<!-- 更新样式 --> <!-- 更新样式 -->
<!--面单列表 --> <!--面单列表 -->
<div class="order_list_ui paper_list_ui" v-if="tabChange.tabActiveName == 2 && tabChange.isPrint == 1"> <div class="order_list_ui paper_list_ui" v-if="tabChange.tabActiveName == 2 && tabChange.isPrint == 1">
<el-table border v-loading="dataListLoading" :data="PrintSheetList" stripe @selection-change="selectionChangeHandle" <el-table border v-loading="dataListLoading" :data="PrintSheetList" stripe @selection-change="SheetSelectionChangeHandle"
style="width: 100%"> style="width: 100%">
<el-table-column type="selection" width="55"> <el-table-column type="selection" width="55">
</el-table-column> </el-table-column>
<el-table-column label="运单号" prop="shippingSn"></el-table-column> <el-table-column label="运单号" prop="expressOrderSn"></el-table-column>
<el-table-column prop="shipperName" label="快递公司"> <el-table-column prop="expressCompanyCode" label="快递公司">
</el-table-column> </el-table-column>
<el-table-column prop="isPrint" label="是否打印"> <el-table-column prop="isPrint" label="是否打印">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.isPrint == '1'" type="success"></el-tag> <el-tag v-if="scope.row.templatedPrinted == 1" type="success"></el-tag>
<el-tag v-else type="success"></el-tag> <el-tag v-else type="success"></el-tag>
</template> </template>
</el-table-column> </el-table-column>
@@ -102,17 +102,21 @@
<!-- <router-link :to="{ path: 'buyorder-print', query: { orderId: scope.row.orderId } }"> <!-- <router-link :to="{ path: 'buyorder-print', query: { orderId: scope.row.orderId } }">
<el-button size="mini" type="primary" plain>打印面单</el-button> 跳转到详情页面 <el-button size="mini" type="primary" plain>打印面单</el-button> 跳转到详情页面
</router-link> --> </router-link> -->
<el-button size="mini" type="primary" plain @click="printHandle(scope.row.orderId)">打印面单</el-button> <el-button size="mini" type="primary" plain @click="printHandle(scope.row.expressOrderSn,scope.row)">打印面单</el-button>
<!-- <el-button size="mini" type="danger" plain @click="deleteVoid">面单作废</el-button> --> <!-- <el-button size="mini" type="danger" plain @click="deleteVoid">面单作废</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
:page-sizes="[40, 60, 100, 150]" :page-size="pageSize" :total="MDtotalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div> </div>
<div class="box" style="display: none;"> <div class="box" style="display: none;">
<div> <div>
<ul id=""> <ul id="">
<li v-for="(item, index) of selectedPrintList" :key="index" v-html="item" :id="'printDiv' + index" <li v-for="(item, index) of selectedPrintList" :key="index" v-html="item" :id="'printDiv' + index"
style="page-break-after:always;"> style="page-break-after:always; position: relative; min-height:600px">
</li> </li>
</ul> </ul>
@@ -130,7 +134,7 @@
<span><span class="infoTitle">订单编号</span>{{ fitem.orderSn }} </span> <span><span class="infoTitle">订单编号</span>{{ fitem.orderSn }} </span>
<span style="margin-left: 20px;"> <span style="margin-left: 20px;">
<span class="infoTitle">下单时间</span>{{ fitem.createTime }}</span> <span class="infoTitle">下单时间</span>{{ fitem.createTime }}</span>
<router-link :to="{ path: 'order-buyorderdetail', query: { orderId: fitem.orderId , ordertype: fitem.orderStatus} }" style="margin-left:20px"> <router-link :to="{ path: 'order-buyorderdetail', query: { orderSn: fitem.orderSn , ordertype: fitem.orderStatus} }" style="margin-left:20px">
<el-button type="warning" style="" size="mini" plain>订单详情</el-button> <el-button type="warning" style="" size="mini" plain>订单详情</el-button>
</router-link> </router-link>
</el-col> </el-col>
@@ -150,14 +154,14 @@
<div class="item_body"> <div class="item_body">
<div class="flexbox" style="justify-content: space-between;"> <div class="flexbox" style="justify-content: space-between;">
<div class="td1 flexbox" style="width:600px; align-items: flex-start; flex-wrap: wrap;"> <div class="td1 flexbox" style="width:600px; align-items: flex-start; flex-wrap: wrap;">
<div v-show="fitem.orderType == 'order'" class="flexbox orderProducts" :class="{ nobottomBorder: fitem.products.length <= 3 }" <div v-show="fitem.orderType == 'order'" class="flexbox orderProducts" :class="{ nobottomBorder: fitem.goodsList.length <= 3 }"
v-for="(children, index2) in fitem.products" :key="children.id" style="width: 50%;" > v-for="(children, index2) in fitem.goodsList" :key="children.id" style="width: 50%;" >
<el-tooltip class="item" v-if="children.shippingSn" effect="light" :content="`快递信息:${children.shipperName} ${children.shippingSn}`" <el-tooltip class="item" v-if="children.expressInfo && children.expressInfo.expressOrderSn != null" effect="light" :content="`快递信息:${children.expressInfo.expressCompany} ${children.expressInfo.expressOrderSn}`"
placement="right"> placement="right">
<span class="normal hasDeliver"></span> <span class="normal hasDeliver"></span>
</el-tooltip> </el-tooltip>
<div class=" productItem k4545"> <div class=" productItem k4545">
<img :class="children.orderStatus == '1' ? 'greeyImg' : 'lightImg'" :src="children.productUrl" width="60px" height="60px"> <img :class="children.expressInfo && children.expressInfo.expressOrderSn != null ? 'greeyImg' : 'lightImg'" :src="children.productImage" width="60px" height="60px">
</div> </div>
<div class="price " style="flex:1"> <div class="price " style="flex:1">
@@ -189,7 +193,7 @@
<!-- <img v-if="fitem.orderType == 'vip'" src="../../../../static/img/oder_vip.png" width="60px" height="60px"> --> <!-- <img v-if="fitem.orderType == 'vip'" src="../../../../static/img/oder_vip.png" width="60px" height="60px"> -->
</div> </div>
<div class="total td2 xcenter"> <div class="total td2 xcenter">
<div class="tabName">合计<em>{{ fitem.orderMoney }}</em></div> <div class="tabName">合计<em>{{ fitem.orderPrice }}</em></div>
<div class="tabContent"> <div class="tabContent">
<div></div> <div></div>
<!-- <div>含快递费10.00优惠券{{ fitem.couponName }}积分抵扣-10.00</div> --> <!-- <div>含快递费10.00优惠券{{ fitem.couponName }}积分抵扣-10.00</div> -->
@@ -201,10 +205,10 @@
</div> </div>
<div class="buier td3 xcenter"> <div class="buier td3 xcenter">
<div class="tabName">收货信息 <div class="tabName">收货信息
<div style="color: #515a6e;"><span style="color: #515a6e;">{{ fitem.shippingUser }}</span>&nbsp;&nbsp;&nbsp;<span style="color: #515a6e;">{{ fitem.userPhone }}</span></div> <div style="color: #515a6e;"><span style="color: #515a6e;">{{ fitem.consignee.consigneeName }}</span>&nbsp;&nbsp;&nbsp;<span style="color: #515a6e;">{{ fitem.consignee.consigneeMobile }}</span></div>
<div style="color: #515a6e;">{{ fitem.province }}-{{ fitem.city }}-{{ fitem.district }}-{{ fitem.address }}</div> <div style="color: #515a6e;">{{ fitem.consignee.province }}-{{ fitem.consignee.city }}-{{ fitem.consignee.county }}-{{ fitem.consignee.address }}</div>
<div style="margin-bottom:10px"> <div style="margin-bottom:10px">
<el-button @click="changeAddressShow" type="primary" size="mini" plain>修改收货信息</el-button> <el-button @click="changeAddressShow(fitem)" type="primary" size="mini" plain>修改收货信息</el-button>
<!-- <a href="#" v-if="fitem.orderStatus <= 1"><i class="el-icon-edit"></i>修改收货信息</a> --> <!-- <a href="#" v-if="fitem.orderStatus <= 1"><i class="el-icon-edit"></i>修改收货信息</a> -->
</div> </div>
</div> </div>
@@ -268,7 +272,16 @@
prop="shippingUser" prop="shippingUser"
header-align="center" header-align="center"
align="center" align="center"
label="收货人姓名"> label="收货人信息">
<template slot-scope="scope">
<span v-if="scope.row.consignee.consigneeName && scope.row.consignee.consigneeName != ''">{{scope.row.consignee.consigneeName}}</span>
<span v-else>暂无</span>
-<span>{{scope.row.consignee.consigneeMobile}}</span><br/>
<span>{{scope.row.consignee.province}}</span>
<span v-if="scope.row.consignee.city && scope.row.consignee.city != ''">-</span><span>{{scope.row.consignee.city}}</span>
<span v-if="scope.row.consignee.county && scope.row.consignee.county != ''">-</span><span>{{scope.row.consignee.county}}</span>
<span v-if="scope.row.consignee.address && scope.row.consignee.address != ''">-</span><span>{{scope.row.consignee.address}}</span>
</template>
</el-table-column> </el-table-column>
<!--<el-table-column <!--<el-table-column
prop="province" prop="province"
@@ -303,17 +316,17 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 1 支付宝 2 微信 3 ios内购--> <!-- 1 支付宝 2 微信 3 ios内购-->
<el-table-column prop="orderMoney" header-align="center" align="center" label="订单金额" width="80"> <!-- <el-table-column prop="orderMoney" header-align="center" align="center" label="订单金额" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.orderMoney}}</span> <span>{{scope.row.orderMoney}}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<!-- <el-table-column prop="districtMoney" header-align="center" align="center" label="优惠金额"> <!-- <el-table-column prop="districtMoney" header-align="center" align="center" label="优惠金额">
</el-table-column> --> </el-table-column> -->
<el-table-column prop="realMoney" header-align="center" align="center" label="实收金额"> <el-table-column prop="realMoney" header-align="center" align="center" label="实收金额">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="detailsFonts"> <div class="detailsFonts">
<span>实收<b style="font-size: 16px; color: #fda328;">{{scope.row.realMoney}}</b></span> <span>实收<b style="font-size: 16px; color: #fda328;">{{scope.row.orderPrice}}</b></span>
<span v-if="scope.row.couponId">优惠券-</span> <span v-if="scope.row.couponId">优惠券-</span>
<span v-if="scope.row.shippingMoney">运费+{{scope.row.shippingMoney}}</span> <span v-if="scope.row.shippingMoney">运费+{{scope.row.shippingMoney}}</span>
<!-- <span >积分抵扣-</span> --> <!-- <span >积分抵扣-</span> -->
@@ -343,20 +356,20 @@
</el-table-column> --> </el-table-column> -->
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作"> <el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{ path: 'order-buyorderdetail', query: { orderId: scope.row.orderId, ordertype: scope.row.orderStatus} }"> <router-link :to="{ path: 'order-buyorderdetail', query: { orderSn: scope.row.orderSn, ordertype: scope.row.orderStatus} }">
<el-button type="text" size="small">订单详情</el-button> <el-button type="text" size="small">订单详情</el-button>
</router-link> </router-link>
<span v-if="scope.row.orderStatus"> <!-- <span v-if="scope.row.orderStatus">
<el-button type="text" size="small" @click="deliverDetail(scope.row)" <el-button type="text" size="small" @click="deliverDetail(scope.row)"
v-if="isAuth('book:buyorderdetail:deliver')">物流详情</el-button> v-if="isAuth('book:buyorderdetail:deliver')">物流详情</el-button>
</span> </span> -->
<!-- 新增修改订单按钮显示与隐藏判断 v-if="scope.row.orderStatus != 3" --> <!-- 新增修改订单按钮显示与隐藏判断 v-if="scope.row.orderStatus != 3" -->
<router-link :to="{ path: 'buyorder-print', query: { orderId: scope.row.orderId } }"> <!-- <router-link :to="{ path: 'buyorder-print', query: { orderId: scope.row.orderId } }">
<el-button type="text" size="small">打印面单</el-button> <el-button type="text" size="small">打印面单</el-button>
</router-link> </router-link> -->
<el-button type="text" size="small" @click="showOrderSheet(scope.row)">查看面单</el-button> <!-- <el-button type="text" size="small" @click="showOrderSheet(scope.row)">查看面单</el-button> -->
<el-dropdown size="mini" v-if="tabChange.tabActiveName === '2'"> <el-dropdown size="mini" v-if="tabChange.tabActiveName === '2'">
<span class="el-dropdown-link" style="font-size: 12px; color: #17B3A3;"> <span class="el-dropdown-link" style="font-size: 12px; color: #17B3A3;">
更多<i class="el-icon-arrow-down el-icon--right"></i> 更多<i class="el-icon-arrow-down el-icon--right"></i>
@@ -390,11 +403,11 @@
<el-form-item label="收货联系电话:" prop="tel"> <el-form-item label="收货联系电话:" prop="tel">
<el-input v-model="addressForm.tel"></el-input> <el-input v-model="addressForm.tel"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收货地址:" prop="county"> <el-form-item label="收货地址:" prop="haveValue">
<!-- <el-input v-model="addressForm.address"></el-input> --> <!-- <el-input v-model="addressForm.address"></el-input> -->
<!-- 省市区--> <!-- 省市区-->
<!-- --> <!-- -->
<el-select v-model="addressForm.province" placeholder="请选择省份" style="width:200px" @change="provinceChange"> <el-select v-model="addressForm.provinceCode" placeholder="请选择省份" style="width:200px" @change="provinceChange">
<el-option <el-option
v-for="item in provinceEntity" v-for="item in provinceEntity"
:key="item.regionCode" :key="item.regionCode"
@@ -402,7 +415,7 @@
:value="item.regionCode"> :value="item.regionCode">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addressForm.city" placeholder="请选择市" @change="cityChange"> <el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
<el-option <el-option
v-for="item in cityEntity.cityList" v-for="item in cityEntity.cityList"
:key="item.regionCode" :key="item.regionCode"
@@ -410,7 +423,7 @@
:value="item.regionCode"> :value="item.regionCode">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addressForm.county" placeholder="请选择区"> <el-select v-model="addressForm.countyCode" placeholder="请选择区" @change="countyChange">
<el-option <el-option
v-for="item in countyEntity.countyList" v-for="item in countyEntity.countyList"
:key="item.regionCode" :key="item.regionCode"
@@ -429,7 +442,7 @@
<el-button type="primary" @click="changeAddress"> </el-button> <el-button type="primary" @click="changeAddress"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex" <el-pagination v-if="tabChange.isPrint != 1" @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
:page-sizes="[40, 60, 100, 150]" :page-size="pageSize" :total="totalPage" :page-sizes="[40, 60, 100, 150]" :page-size="pageSize" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
@@ -442,11 +455,11 @@
<setDeliverDialog ref="setDeliverDialog" :visible="setDeliverVisible" :selectData="checkedOrders" <setDeliverDialog ref="setDeliverDialog" :visible="setDeliverVisible" :selectData="checkedOrders"
@closeDeliverDialog='closeDeliverDialog'></setDeliverDialog> @closeDeliverDialog='closeDeliverDialog'></setDeliverDialog>
<!-- 设置备注 --> <!-- 设置备注 -->
<updateOrderBeiZhu ref="updateOrderBeiZhu" :orderId="oprateOrder.orderId" :visible="editBeizhudialogVisible" <updateOrderBeiZhu ref="updateOrderBeiZhu" :orderId="oprateOrder.orderId" :orderSn="oprateOrder.orderSn" :visible="editBeizhudialogVisible"
:editBeizhuform="editBeizhuform" @closeDialog='closeBeizhuDialog' @refreshDataList="getDataList"> :editBeizhuform="editBeizhuform" @closeDialog='closeBeizhuDialog' @refreshDataList="getDataList">
</updateOrderBeiZhu> </updateOrderBeiZhu>
<!-- 单个订单发货 --> <!-- 单个订单发货 -->
<splitDeliver :orderitem="oprateOrder" :visible="splitDeliverVisible" @closeDialog='closeOrder1Dialog'> <splitDeliver :orderitem="oprateOrder" :visible="splitDeliverVisible" @closeDialog='closeOrder1Dialog'>
</splitDeliver> </splitDeliver>
<!--点合并发货时弹出 可合并订单弹窗 --> <!--点合并发货时弹出 可合并订单弹窗 -->
<mergeDliver v-if="mergeList" :visible="mergeDliverVisible" :mergeList="mergeList" <mergeDliver v-if="mergeList" :visible="mergeDliverVisible" :mergeList="mergeList"
@@ -521,6 +534,7 @@ export default {
dataListLoading: false, dataListLoading: false,
dataListSelections: [], dataListSelections: [],
addOrUpdateVisible: false, addOrUpdateVisible: false,
MDtotalPage:0,
// 时间段设置项 // 时间段设置项
timePickerOptions: { timePickerOptions: {
shortcuts: [{ shortcuts: [{
@@ -551,12 +565,17 @@ export default {
}, },
setDeliverVisible: false, setDeliverVisible: false,
addressForm:{ addressForm:{
province:null, provinceCode:null, //省份串码
city:null, provinceName:null,
county:null, cityCode:null, //市区串码
cityName:null,
countyCode:null, //省份串码
countyName:null,
name:'', name:'',
tel:'', tel:'',
addressXX:'' addressXX:'',
haveValue:false,
orderSn:null,
}, },
provinceEntity:[], // 城市列表 provinceEntity:[], // 城市列表
cityEntity:[], // 市 cityEntity:[], // 市
@@ -575,7 +594,11 @@ export default {
addressXX: [ addressXX: [
{ required: true, message: '请输入详细地址信息', trigger: 'blur' } { required: true, message: '请输入详细地址信息', trigger: 'blur' }
], ],
} haveValue:[
{ required: true, message: '请选择要修改的省市区', trigger: 'blur' }
]
},
SheetSelectionList:[]
} }
}, },
components: { components: {
@@ -591,37 +614,77 @@ export default {
}, },
methods: { methods: {
changeAddress(){ changeAddress(){
console.log(this.addressForm.orderSn,'this.addressForm')
if(this.addressForm.provinceCode && this.addressForm.cityCode && this.addressForm.countyCode){
this.addressForm.haveValue = true
}
this.$refs['addressFormRef'].validate((valid) => { this.$refs['addressFormRef'].validate((valid) => {
if (valid) { if (valid) {
console.log('修改收货地址') console.log('修改收货地址')
this.$http({
url: this.$http.adornUrl('/book/buyOrder/modifyConsigneeAddress'),
method: 'post',
data: this.$http.adornData({
'orderSn': this.addressForm.orderSn,
// 'province': this.addressForm.provinceName,
// 'city': this.addressForm.cityName,
// 'county': this.addressForm.countyName,
'address': this.addressForm.addressXX,
'consigneeName': this.addressForm.name,
'consigneeMobile': this.addressForm.tel,
"provinceCode": this.addressForm.provinceCode,
"cityCode": this.addressForm.cityCode,
"countyCode": this.addressForm.countyCode,
//'orderId': this.addressForm.orderId
})
}).then(({ data }) => {
console.log('修改地址返回值', data)
this.$message.success('修改地址成功!')
this.changeAddHandleClose()
this.getDataList()
}).catch( e => {
console.log(e,'e')
})
} else { } else {
return false; return false;
} }
}); });
},
countyChange(e){
console.log(e,'countyName')
this.countyEntity.countyList.find((val,index,arr)=>{
this.addressForm.countyName = val.countyName
return val.regionCode == e
})
console.log('this.addressForm.countyName', this.addressForm)
}, },
cityChange(e){ cityChange(e){
// console.log('修改了市',e) this.addressForm.countyCode = null
this.addressForm.county = null
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{ this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
this.addressForm.cityName = val.cityName
return val.regionCode == e return val.regionCode == e
}) })
// console.log('对应的city数组',this.countyEntity) console.log(' this.addressForm.cityName', this.addressForm.cityName)
}, },
provinceChange(e){ provinceChange(e){
// console.log('修改了省份',e) this.addressForm.cityCode = null;
this.addressForm.city = null; this.addressForm.countyCode = null
this.addressForm.county = null
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{ this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
this.addressForm.provinceName = val.provName
return val.regionCode == e return val.regionCode == e
}) })
// console.log('对应的city数组',this.cityEntity) console.log('this.addressForm.provinceName',this.addressForm.provinceName)
}, },
changeAddHandleClose(){ changeAddHandleClose(){
this.changeAddVisible = false this.changeAddVisible = false
this.addressForm.province = null this.addressForm.provinceCode = null
this.addressForm.city = null; this.addressForm.cityCode = null;
this.addressForm.county = null this.addressForm.countyCode = null
this.addressForm.provinceName = null
this.addressForm.cityName = null;
this.addressForm.countyName = null
this.addressForm.orderSn = null
this.provinceEntity = [] this.provinceEntity = []
this.cityEntity = [] this.cityEntity = []
this.countyEntity = [] this.countyEntity = []
@@ -635,7 +698,8 @@ export default {
// $refs[formName].resetFields() // $refs[formName].resetFields()
console.log('关闭了', this.addressForm) console.log('关闭了', this.addressForm)
}, },
changeAddressShow(){ changeAddressShow(val){
console.log(val,'val')
this.$http({ this.$http({
url: this.$http.adornUrl('/api/province/getProvince'), url: this.$http.adornUrl('/api/province/getProvince'),
method: 'post', method: 'post',
@@ -645,31 +709,51 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
console.log('获取地址三级列表', data) console.log('获取地址三级列表', data)
if(data.code == 0){ if(data.code == 0){
this.addressForm.orderSn = val.orderSn
this.provinceEntity = data.provinceEntity this.provinceEntity = data.provinceEntity
this.addressForm.addressXX = val.consignee.address
this.addressForm.provinceCode = val.consignee.provinceCode
this.addressForm.cityCode = val.consignee.cityCode
this.addressForm.countyCode = val.consignee.countyCode
this.addressForm.provinceName = val.consignee.provinceCode
this.addressForm.cityName = val.consignee.city
this.addressForm.countyName = val.consignee.county
this.addressForm.name = val.consignee.consigneeName
this.addressForm.tel = val.consignee.consigneeMobile
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
return val.regionCode == this.addressForm.provinceCode
})
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
return val.regionCode == this.addressForm.cityCode
})
console.log(this.provinceEntity,addressForm,'this.provinceEntity')
} }
}).catch( e => { }).catch( e => {
console.log(e,'e') console.log(e,'e')
}) })
this.changeAddVisible = true this.changeAddVisible = true
console.log('显示修改收货地址') console.log('显示修改收货地址')
}, },
// 混合发货 // 混合发货
showAnyDialog(item) { showAnyDialog(item) {
this.anyDialogContent = item.fmsHtml this.anyDialogContent = item.printTemplate
console.log('面单',item) console.log('面单',item)
if (item.fmsHtml == null) return this.$message.error('暂无面单数据') if (item.printTemplate == null) return this.$message.error('暂无面单数据')
this.anyDialogVisible = true this.anyDialogVisible = true
this.anyDialogTitle = '查看面单' this.anyDialogTitle = '查看面单'
}, },
// 查询可打印面单 // 查询可打印面单
getNotPrintSheetList() { getNotPrintSheetList() {
this.$http({ this.$http({
url: this.$http.adornUrl('/book/buyOrderdetail/querySheetPage'), url: this.$http.adornUrl('/express/getPrintTemplateList'),
method: 'post', method: 'get',
/// data: {} /// data: {}
}).then(({ data }) => { }).then(({ data }) => {
console.log(data.result.totalDataSize,'面单列表')
if (data && data.code === 0) { if (data && data.code === 0) {
this.PrintSheetList = data.page.list this.PrintSheetList = data.result.data
this.MDtotalPage = data.result.totalDataSize
} else { } else {
this.PrintSheetList = [] this.PrintSheetList = []
this.totalPage = 0 this.totalPage = 0
@@ -703,7 +787,7 @@ export default {
this.oprateOrder = val this.oprateOrder = val
this.editBeizhudialogVisible = true this.editBeizhudialogVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.updateOrderBeiZhu.init(val.orderId) this.$refs.updateOrderBeiZhu.init(val.orderSn, val.orderId)
}) })
}, },
@@ -724,22 +808,32 @@ export default {
getDataList() { getDataList() {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
url: this.$http.adornUrl('/book/buyOrder/list'), // url: this.$http.adornUrl('/book/buyOrder/list'),
method: 'get', url: this.$http.adornUrl('/book/buyOrder/orderList'),
params: this.$http.adornParams({ method: 'post',
'page': this.pageIndex, // params: this.$http.adornParams({
'limit': this.pageSize, // 'page': this.pageIndex,
'key': this.dataForm.key, // 'limit': this.pageSize,
'startTime': this.dataForm.time[0], // 'key': this.dataForm.key,
'endTime': this.dataForm.time[1], // 'startTime': this.dataForm.time[0],
'orderStatus': this.tabChange.tabActiveName, // 订单状态参数 // 'endTime': this.dataForm.time[1],
'isPrint': this.tabChange.isPrint, // 'orderStatus': this.tabChange.tabActiveName, // 订单状态参数
'orderorderType': this.tabChange.orderName, // 'isPrint': this.tabChange.isPrint,
// 'orderorderType': this.tabChange.orderName,
// }),
data:this.$http.adornData({
"searchKeyWord": this.dataForm.key,
"startTime": this.dataForm.time[0],
"endTime": this.dataForm.time[1],
"orderStatus": this.tabChange.tabActiveName,
"pageIndex": this.pageIndex,
"pageSize": this.pageSize,
}) })
}).then(({ data }) => { }).then(({ data }) => {
console.log(data,'列表数据')
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.result.data
this.totalPage = data.page.totalCount this.totalPage = data.result.totalDataSize
if (this.tabChange.tabActiveName === '1') { // 判断可选按钮是否可用 if (this.tabChange.tabActiveName === '1') { // 判断可选按钮是否可用
this.isMultipleDisabled() this.isMultipleDisabled()
} }
@@ -769,6 +863,11 @@ export default {
selectionChangeHandle(val) { selectionChangeHandle(val) {
this.dataListSelections = val this.dataListSelections = val
}, },
// 面单批量选择
SheetSelectionChangeHandle(val){
this.SheetSelectionList = val
console.log(this.SheetSelectionList,'选中的打印列表')
},
// 新增 / 修改 // 新增 / 修改
addOrUpdateHandle(id) { addOrUpdateHandle(id) {
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
@@ -826,43 +925,52 @@ export default {
} }
}, },
// 批量/打印面单 // 批量/打印面单
printHandle(id) { printHandle(id, row) {
console.log(id, row)
// 如果是传了id // 如果是传了id
if(isFinite(id)){ if(id){
console.log(id, '传了') // console.log(id, '传了')
this.$confirm(`确定对选中的 1 条面单进行批量打印操作?`, '提示', { this.$confirm(`确定进行打印操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.SheetSelectionList = [row]
let SheetList = this.SheetSelectionList.map(item => item.printTemplate)
this.selectedPrintList = SheetList
console.log(this.selectedPrintList, 'this.selectedPrintList')
//遍历数组列表 //遍历数组列表
this.PrintSheetList.map(item => { // this.PrintSheetList.map(item => {
if(item.orderId == id){ return this.selectedPrintList = [item.fmsHtml]} // if(item.expressOrderSn == id){ return this.selectedPrintList = [item.printTemplate]}
// console.log(this.selectedPrintList,'this.selectedPrintList待打印列表')
setTimeout(() => { setTimeout(() => {
this.handlePrintSheet() this.handlePrintSheet()
}, 1000); }, 1000);
setTimeout(() => { setTimeout(() => {
this.selectedPrintList = [] this.confirmPrint()
}, 1000); }, 1000);
}) // })
}).catch(()=>{}) }).catch((e)=>{
console.log('打印报错了')
})
}else{ }else{
// console.log(ids) console.log('批量打印')
//this.printDialogVisible = true this.printDialogVisible = true
this.$confirm(`确定对选中的${this.dataListSelections.length}面单进行批量打印操作?`, '提示', { this.$confirm(`确定对选中的 ${this.SheetSelectionList.length}面单进行批量打印操作?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// 计算出选中了多少条面单 // 计算出选中了多少条面单
let SheetList = this.dataListSelections.map(item => item.fmsHtml) let SheetList = this.SheetSelectionList.map(item => item.printTemplate)
this.selectedPrintList = SheetList this.selectedPrintList = SheetList
console.log(this.selectedPrintList,'即将打印的面单数组')
setTimeout(() => { setTimeout(() => {
this.handlePrintSheet() this.handlePrintSheet()
}, 1000); }, 1000);
setTimeout(() => { setTimeout(() => {
this.selectedPrintList = [] this.confirmPrint()
}, 1000); }, 1000);
}).catch(() => { }) }).catch(() => { })
} }
@@ -883,6 +991,54 @@ export default {
newWin.close(); //关闭窗口 newWin.close(); //关闭窗口
}, 100); }, 100);
}, },
// 弹出打印结果确认内容
confirmPrint(){
this.$confirm('是否已完成此次打印任务?', '提示', {
confirmButtonText: '已完成打印',
cancelButtonText: '打印出错',
type: 'warning'
}).then(() => {
// 开始请求批量打印接口(改变打印状态)
let loading = this.$loading({
lock: true,
text: '正在更新面单数据',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var printids = this.SheetSelectionList.map( item => item.id)
console.log(printids,'printids打印的isd',)
this.$http({
url: this.$http.adornUrl('/express/printTemplate'),
method: 'post',
data:
printids
}).then(({ data }) => {
if(data.code == 0){
console.log(data,'data')
this.selectedPrintList = []
this.SheetSelectionList = []
this.getNotPrintSheetList()
loading.close() }
}).catch(({e}) => {
this.selectedPrintList = []
this.SheetSelectionList = []
console.log(e,'e')
loading.close()
})
// setTimeout(() => {
// this.selectedPrintList = []
// this.SheetSelectionList = []
// }, 1000);
// this.$message({
// type: 'success',
// message: '删除成功!'
// });
}).catch(() => {
console.log('打印出错了')
});
},
closePrintDialog(val) { closePrintDialog(val) {
this.printDialogVisible = val this.printDialogVisible = val
}, },

View File

@@ -10,10 +10,10 @@
<div> <div>
<ul class="list"> <ul class="list">
<div class="liName">用户信息</div> <div class="liName">用户信息</div>
<li><span class="infoTitle">用户名</span><span>{{orderDetails.userName ? orderDetails.userName : '暂无'}}</span></li> <li><span class="infoTitle">用户名</span><span>{{orderDetails.userInfo.userName !== null ? orderDetails.userInfo.userName : '暂无'}}</span></li>
<li><span class="infoTitle">用户ID</span><span>{{orderDetails.userId}}</span></li> <!-- <li><span class="infoTitle">用户ID</span><span>{{orderDetails.userId}}</span></li> -->
<li><span class="infoTitle">联系电话</span><span>{{orderDetails.userPhone}}</span></li> <li><span class="infoTitle">联系电话</span><span>{{orderDetails.userInfo.userPhone}}</span></li>
<li><br/></li> <li style="clear:both"></li>
<!-- <li><span class="infoTitle"> </span><span>187898544875</span></li> --> <!-- <li><span class="infoTitle"> </span><span>187898544875</span></li> -->
<!-- <li><span class="infoTitle"> </span><span>天津市天津市天津市天津市天津市天津市</span></li> --> <!-- <li><span class="infoTitle"> </span><span>天津市天津市天津市天津市天津市天津市</span></li> -->
<li class="line"></li> <li class="line"></li>
@@ -24,13 +24,13 @@
<span v-if="orderDetails.orderStatus == 1" class="hightLight">待发货</span> <span v-if="orderDetails.orderStatus == 1" class="hightLight">待发货</span>
<span v-if="orderDetails.orderStatus == 2" class="hightLight">已发货</span> <span v-if="orderDetails.orderStatus == 2" class="hightLight">已发货</span>
<span v-if="orderDetails.orderStatus == 3" class="hightLight">已完成</span> <span v-if="orderDetails.orderStatus == 3" class="hightLight">已完成</span>
<el-button v-if="orderDetails.orderStatus == 1" @click="godeliver" class="text_button" size="mini" type="text">去发货</el-button> <!-- <el-button v-if="orderDetails.orderStatus == 1" @click="godeliver" class="text_button" size="mini" type="text">去发货</el-button> -->
</li> </li>
<!-- <li><span class="infoTitle">商品总数</span><span>{{orderDetails.}}</span></li> --> <!-- <li><span class="infoTitle">商品总数</span><span>{{orderDetails.}}</span></li> -->
<li><span class="infoTitle">订单金额</span><span>{{orderDetails.orderMoney}}</span></li> <li><span class="infoTitle">订单金额</span><span>{{orderDetails.orderPrice}}</span></li>
<li><span class="infoTitle">交付邮费</span><span>{{orderDetails.shippingMoney}}</span></li> <li><span class="infoTitle">交付邮费</span><span>{{orderDetails.shippingPrice}}</span></li>
<li><span class="infoTitle" v-if="orderDetails.orderStatus > 0">实际支付金额</span><span>{{orderDetails.realMoney}}</span></li> <li v-if="orderDetails.orderStatus > 0"><span class="infoTitle" >实际支付金额</span><span>{{orderDetails.realPrice}}</span></li>
<li><span class="infoTitle">创建时间</span><span>{{orderDetails.createTime}}</span></li> <li><span class="infoTitle">创建时间</span><span>{{orderDetails.createTime}}</span></li>
<li><span class="infoTitle" v-if="orderDetails.orderStatus > 0">支付时间</span><span>{{orderDetails.paymentDate}}</span></li> <li><span class="infoTitle" v-if="orderDetails.orderStatus > 0">支付时间</span><span>{{orderDetails.paymentDate}}</span></li>
<li style="width: 100%;" v-if="orderDetails.orderStatus > 0"><span class="infoTitle">支付方式</span> <li style="width: 100%;" v-if="orderDetails.orderStatus > 0"><span class="infoTitle">支付方式</span>
@@ -46,56 +46,45 @@
<div style="clear:both"></div> <div style="clear:both"></div>
<div v-if="orderDetails.orderStatus > 0"> <div v-if="orderDetails.orderStatus > 0">
<div class="liName">优惠信息</div> <div class="liName">优惠信息</div>
<li><span class="infoTitle">优惠金额</span><span>0</span></li> <!-- <li><span class="infoTitle">优惠金额</span><span>0</span></li>
<li><span class="infoTitle">会员商品优惠</span><span>0</span></li> <li><span class="infoTitle">会员商品优惠</span><span>0</span></li> -->
<li><span class="infoTitle">积分抵扣</span><span>0</span></li> <li><span class="infoTitle">积分抵扣</span><span>{{orderDetails.districtPrice}}</span></li>
<li class="line"></li> <li class="line"></li>
</div> </div>
<div style="clear:both"></div> <div style="clear:both"></div>
<div class="liName">物流信息 <a href="#" @click="changeAddressShow" v-if="orderDetails.orderStatus <= 1"><i class="el-icon-edit"></i>修改收货信息</a></div> <div class="liName">物流信息 <a href="#" @click="changeAddressShow" v-if="orderDetails.orderStatus <= 1"><i class="el-icon-edit"></i>修改收货信息</a></div>
<li><span class="infoTitle">收货人</span><span>{{orderDetails.shippingUser}}</span>&nbsp;&nbsp;&nbsp;<span>{{orderDetails.userPhone}}</span></li> <li><span class="infoTitle">收货人</span><span>{{orderDetails.consignee.consigneeName}}</span>&nbsp;&nbsp;&nbsp;<span>{{orderDetails.consignee.consigneeMobile}}</span></li>
<li><span class="infoTitle">收货地址</span><span>{{orderDetails.province}}-{{orderDetails.city}}-{{orderDetails.district}}-{{orderDetails.address}}</span></li> <li><span class="infoTitle">收货地址</span><span>{{orderDetails.consignee.province}}-{{orderDetails.consignee.city}}-{{orderDetails.consignee.county}}-{{orderDetails.consignee.address}}</span></li>
<!-- <el-alert title="`该订单下共有 2 条物流信息`" type="info"> <!-- <el-alert title="`该订单下共有 2 条物流信息`" type="info">
</el-alert> --> </el-alert> -->
<li class="flexbox deliverBox" style="width: 100%;"> <li class="flexbox deliverBox" style="width: 100%;" v-if="sheetList.length > 0">
<el-row :gutter="20" style="100%"> <el-row :gutter="20" style="100%">
<el-col v-if="activities != []" :md="12" :lg="8" class="item" v-for="(item, index) in activities" :key="index"> <el-col :md="12" :lg="8" class="item" v-for="(item, index) in sheetList" :key="index">
<div class="deliver_heade"> <div class="deliver_heade">
<div><span class="infoTitle">物流公司</span><span>{{item.expressCompanyName}}</span></div>
<div><span class="infoTitle">物流公司</span><span>{{item.ShipperName}}</span></div> <div><span class="infoTitle">运单号</span><span style="margin-right:10px">{{item.expressOrderSn}}</span>
<div><span class="infoTitle">运单号</span><span>{{item.LogisticCode}}</span></div> <el-button type="primary" size="mini" plain @click="seeSheetDetails(item)">查看物流进度</el-button>
<div class="deliver_info">
<div class="scroll" style="padding: 10px;" v-if="item.Traces != []">
<el-timeline>
<el-timeline-item :reverse="reverse" v-for="(activity, index2) in item.Traces" :key="index2" :icon="activity.icon"
:type="activity.Action" :color="activity.color" :size="activity.size"
:timestamp="activity.AcceptTime">
{{ activity.AcceptStation }}
</el-timeline-item>
</el-timeline>
</div>
<div v-else class="noinfo">-暂无物流信息-</div>
</div> </div>
<div></div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</li> </li>
<li class="line" style="margin:10px 0;"></li> <li class="line" style="margin:10px 0;"></li>
<!-- 订单商品 --> <!-- 订单商品 -->
<div class="liName">商品信息</div> <div class="liName">商品信息</div>
<el-table :data="orderDetails.products" <el-table :data="orderDetails.goodsList"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
label="商品名" label="商品名"
width="280"> width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flexbox"> <div class="flexbox">
<img style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;" :src="scope.row.productUrl" width="30px" height="30px"> <img style="padding: 2px; border:1px solid #f1f1f1; margin-right: 5px;" :src="scope.row.productImage" width="30px" height="30px">
<div class="proname">{{ scope.row.productName}}</div> <div class="proname">{{ scope.row.productName}}</div>
</div> </div>
</template> </template>
@@ -112,6 +101,24 @@
</el-table> </el-table>
</ul> </ul>
</div> </div>
<!-- 抽屉 -->
<el-dialog
title="物流详情"
:visible.sync="tracesShow"
@close="drawerHandleClose">
<div class="deliver_info">
<div>运单信息{{currentSheet.expressCompanyName}} - {{currentSheet.expressOrderSn}}</div>
<div class="scroll" style="padding: 10px;" v-if="traces.length > 0">
<el-timeline :reverse="reverse">
<el-timeline-item v-for="(activity, index2) in traces" :key="index2" :icon="activity.icon"
:timestamp="activity.acceptTime">
{{ activity.acceptStation }}
</el-timeline-item>
</el-timeline>
</div>
<div v-else class="noinfo">-暂无物流信息-</div>
</div>
</el-dialog>
<el-dialog <el-dialog
title="修改收货信息" title="修改收货信息"
:visible.sync="changeAddVisible" :visible.sync="changeAddVisible"
@@ -119,17 +126,17 @@
:close="changeAddHandleClose"> :close="changeAddHandleClose">
<div> <div>
<el-form ref="addressFormRef" :model="addressForm" label-width="120px" :rules="addressFormRule"> <el-form ref="addressFormRef" :model="addressForm" label-width="120px" :rules="addressFormRule">
<el-form-item label="收货人:"> <el-form-item label="收货人:" prop="name">
<el-input v-model="addressForm.name"></el-input> <el-input v-model="addressForm.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收货联系电话:"> <el-form-item label="收货联系电话:" prop="tel">
<el-input v-model="addressForm.tel"></el-input> <el-input v-model="addressForm.tel"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="收货地址:"> <el-form-item label="收货地址:">
<!-- <el-input v-model="addressForm.address"></el-input> --> <!-- <el-input v-model="addressForm.address"></el-input> -->
<!-- 省市区--> <!-- 省市区-->
<!-- --> <!-- -->
<el-select v-model="addressForm.province" placeholder="请选择省份" style="width:200px" @change="provinceChange"> <el-select v-model="addressForm.provinceCode" placeholder="请选择省份" style="width:200px" @change="provinceChange">
<el-option <el-option
v-for="item in provinceEntity" v-for="item in provinceEntity"
:key="item.regionCode" :key="item.regionCode"
@@ -137,7 +144,7 @@
:value="item.regionCode"> :value="item.regionCode">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addressForm.city" placeholder="请选择市" @change="cityChange"> <el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
<el-option <el-option
v-for="item in cityEntity.cityList" v-for="item in cityEntity.cityList"
:key="item.regionCode" :key="item.regionCode"
@@ -145,7 +152,7 @@
:value="item.regionCode"> :value="item.regionCode">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addressForm.county" placeholder="请选择区"> <el-select v-model="addressForm.countyCode" placeholder="请选择区" @change="countyChange">
<el-option <el-option
v-for="item in countyEntity.countyList" v-for="item in countyEntity.countyList"
:key="item.regionCode" :key="item.regionCode"
@@ -154,7 +161,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="详细地址:"> <el-form-item label="详细地址:" prop="addressXX">
<el-input type="textarea" v-model="addressForm.addressXX"></el-input> <el-input type="textarea" v-model="addressForm.addressXX"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -180,7 +187,11 @@ export default {
dataForm: { dataForm: {
key: '' key: ''
}, },
reverse: false, traces:[], // 物流轨迹
tracesShow:false,
currentSheet:{},
reverse: true,
activities: [ ], activities: [ ],
deliverData: [], // 物流信息 deliverData: [], // 物流信息
@@ -189,15 +200,18 @@ export default {
dataListSelections: [], dataListSelections: [],
// addOrUpdateVisible: false, // addOrUpdateVisible: false,
query: { query: {
orderId: 0, orderSn: 0,
ordertype:null ordertype:null
}, },
changeAddVisible: false, changeAddVisible: false,
orderDetails:{}, orderDetails:{},
addressForm:{ addressForm:{
province:null, provinceCode:null, //省份串码
city:null, provinceName:null,
county:null, cityCode:null, //市区串码
cityName:null,
countyCode:null, //省份串码
countyName:null,
name:'', name:'',
tel:'', tel:'',
addressXX:'' addressXX:''
@@ -224,44 +238,103 @@ export default {
addressXX: [ addressXX: [
{ required: true, message: '请输入详细地址信息', trigger: 'blur' } { required: true, message: '请输入详细地址信息', trigger: 'blur' }
], ],
} },
sheetList:[], // 面单列表
} }
}, },
components: { components: {
AddOrUpdate AddOrUpdate
}, },
activated() { activated() {
this.query.orderId = this.$route.query.orderId; this.query.orderSn = this.$route.query.orderSn;
this.query.ordertype = this.$route.query.ordertype; this.query.ordertype = this.$route.query.ordertype;
console.log(this.$route.query.orderId) console.log(this.$route.query.orderSn)
this.getData() this.getData()
// this.getOrderSheetList()
}, },
methods: { methods: {
cityChange(e){ drawerHandleClose(){
// console.log('修改了市',e) console.log('关闭')
this.addressForm.county = null this.traces = []
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{ this.tracesShow = false
this.currentSheet = {}
},
// 获取某一快递的物流进度
seeSheetDetails(item){
console.log('正在查询快递进度',item)
this.currentSheet = item
let loading = this.$loading({
lock: true,
text: '正在获取物流信息...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
var mobileLeng = this.orderDetails.consignee.consigneeMobile.length
this.$http({
url: this.$http.adornUrl('/book/buyOrder/queryExpress'),
method: 'get',
params: this.$http.adornParams({
'expressOrderSn': item.expressOrderSn,
'expressCompanyCode': item.expressCompanyCode,
'customerName': this.orderDetails.consignee.consigneeMobile.substring(mobileLeng-4, mobileLeng)
})
}).then(({ data }) => {
if(data.code == 0){
if(data.result.traces.length > 0){
this.traces = data.result.traces
this.tracesShow = true
console.log(data,'data')
loading.close()
}else{
this.$message('暂无物流信息哦~');
loading.close()
}
}
}).catch(({e}) => {
console.log(e,'e')
loading.close()
})
},
countyChange(e){
console.log(e,'countyName')
this.countyEntity.countyList.find((val,index,arr)=>{
this.addressForm.countyName = val.countyName
return val.regionCode == e return val.regionCode == e
}) })
// console.log('对应的city数组',this.countyEntity) console.log('this.addressForm.countyName', this.addressForm)
},
cityChange(e){
// console.log('修改了市',e)
this.addressForm.countyCode = null
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
this.addressForm.cityName = val.cityName
return val.regionCode == e
})
console.log(' this.addressForm.cityName', this.addressForm.cityName)
}, },
provinceChange(e){ provinceChange(e){
// console.log('修改了省份',e) // console.log('修改了省份',e)
this.addressForm.city = null; this.addressForm.cityCode = null;
this.addressForm.county = null this.addressForm.countyCode = null
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{ this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
this.addressForm.provinceName = val.provName
return val.regionCode == e return val.regionCode == e
}) })
// console.log('对应的city数组',this.cityEntity) console.log('this.addressForm.provinceName',this.addressForm.provinceName)
}, },
changeAddHandleClose(){ changeAddHandleClose(){
this.changeAddVisible = false this.changeAddVisible = false
this.addressForm.province = null this.addressForm.provinceCode = null
this.addressForm.city = null; this.addressForm.cityCode = null;
this.addressForm.county = null this.addressForm.countyCode = null
this.addressForm.provinceName = null
this.addressForm.cityName = null;
this.addressForm.countyName = null
this.provinceEntity = [] this.provinceEntity = []
this.cityEntity = [] this.cityEntity = []
this.countyEntity = [] this.countyEntity = []
this.$refs['addressFormRef'].clearValidate()
this.$nextTick(() => { this.$nextTick(() => {
this.addressForm.name = '' this.addressForm.name = ''
this.addressForm.tel = '' this.addressForm.tel = ''
@@ -282,11 +355,27 @@ export default {
console.log('获取地址三级列表', data) console.log('获取地址三级列表', data)
if(data.code == 0){ if(data.code == 0){
this.provinceEntity = data.provinceEntity this.provinceEntity = data.provinceEntity
this.addressForm.addressXX = this.orderDetails.consignee.address
this.addressForm.provinceCode = this.orderDetails.consignee.provinceCode
this.addressForm.cityCode = this.orderDetails.consignee.cityCode
this.addressForm.countyCode = this.orderDetails.consignee.countyCode
this.addressForm.provinceName = this.orderDetails.consignee.provinceCode
this.addressForm.cityName = this.orderDetails.consignee.cityCode
this.addressForm.countyName = this.orderDetails.consignee.countyCode
this.addressForm.name = this.orderDetails.consignee.consigneeName
this.addressForm.tel = this.orderDetails.consignee.consigneeMobile
console.log(this.provinceEntity,'this.provinceEntity')
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
return val.regionCode == this.addressForm.provinceCode
})
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
return val.regionCode == this.addressForm.cityCode
})
} }
}).catch( e => { }).catch( e => {
console.log(e,'e') console.log(e,'e')
}) })
// this.changeAddVisible = true this.changeAddVisible = true
console.log('显示修改收货地址') console.log('显示修改收货地址')
}, },
// 修改收货信息 // 修改收货信息
@@ -294,62 +383,88 @@ export default {
this.$refs['addressFormRef'].validate((valid) => { this.$refs['addressFormRef'].validate((valid) => {
if (valid) { if (valid) {
console.log('修改收货地址') console.log('修改收货地址')
this.$http({
url: this.$http.adornUrl('/book/buyOrder/modifyConsigneeAddress'),
method: 'post',
data: this.$http.adornData({
'orderSn': this.query.orderSn,
// 'province': this.addressForm.provinceName,
// 'city': this.addressForm.cityName,
// 'county': this.addressForm.countyName,
'address': this.addressForm.addressXX,
'consigneeName': this.addressForm.name,
'consigneeMobile': this.addressForm.tel,
"provinceCode": this.addressForm.provinceCode,
"cityCode": this.addressForm.cityCode,
"countyCode": this.addressForm.countyCode,
//'orderId': this.addressForm.orderId
})
}).then(({ data }) => {
console.log('修改地址返回值', data)
this.$message.success('修改地址成功!')
this.changeAddHandleClose()
this.getData()
}).catch( e => {
console.log(e,'e')
})
} else { } else {
return false; return false;
} }
}); });
}, },
// 获取地址数据三级联动
// 获取 物流 // 获取订单下的快递单
getdeliverDetails(){ getOrderSheetList(){
let loading = this.$loading({
lock: true,
text: '正在获取物流信息...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.$http({ this.$http({
url: this.$http.adornUrl('/book/buyOrder/queryFMS'), url: this.$http.adornUrl('/express/getPrintTemplateList'),
method: 'post', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
'orderId': this.query.orderId 'expressOrderSn': this.query.orderSn,
}) })
/// data: {}
}).then(({ data }) => { }).then(({ data }) => {
if(data && data.code === 0){ console.log(data.result,'面单列表')
if(data.rntStr != []){ if (data && data.code === 0) {
this.activities = data.rntStr this.sheetList = data.result.data
// console.log(this.activities) // this.MDtotalPage = data.result.totalDataSize
}else{ } else {
this.activities = [] // this.PrintSheetList = []
} // this.totalPage = 0
loading.close() }
}else{
loading.close()
return this.$message.error('物流获取失败,请重试')
}
}).catch(({e}) => {
loading.close()
console.log(e,'e')
}) })
}, },
// 获取数据列表 // 获取数据列表
getData() { getData() {
this.dataListLoading = true this.dataListLoading = true
this.$http({ this.$http({
// url: this.$http.adornUrl(`/book/buyOrder/appGetOrderInfo/${this.query.ordertype}`), // url: this.$http.adornUrl(`/book/buyOrder/appGetOrderInfo/${this.query.ordertype}`),
url: this.$http.adornUrl(`/book/buyOrder/getOrderDetail/`), url: this.$http.adornUrl(`/book/buyOrder/orderDetail`),
method: 'get', method: 'get',
params: this.$http.adornParams({ params: this.$http.adornParams({
'orderId': this.query.orderId, 'orderSn': this.query.orderSn,
}) })
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.orderDetails = data.detail console.log(data.result,'data.result')
if(this.query.ordertype != 0){ // 不是待付款订单时 this.orderDetails = data.result
this.getdeliverDetails() if(this.orderDetails.goodsList.length > 0){
console.log('存在商品数据', this.orderDetails.goodsList.length)
var ids = []
ids.push(this.orderDetails.goodsList[0].expressInfo.expressOrderSn)
this.sheetList.push(this.orderDetails.goodsList[0].expressInfo)
for (let index = 0; index < this.orderDetails.goodsList.length; index++) {
if (!ids.includes(this.orderDetails.goodsList[index].expressInfo.expressOrderSn)) {
ids.push(this.orderDetails.goodsList[index].expressInfo.expressOrderSn)
this.sheetList.push(this.orderDetails.goodsList[index].expressInfo)}
console.log(this.orderDetails.goodsList[index].expressInfo.expressOrderSn,'expressOrderSn')
}
console.log(ids,this.sheetList,'this.sheetList')
} }
// if(this.query.ordertype != 0){ // 不是待付款订单时
// this.getdeliverDetails()
// }
} else { } else {
this.orderDetails = {} this.orderDetails = {}
return this.$message.error('商品详情获取失败,请重试') return this.$message.error('商品详情获取失败,请重试')
@@ -363,7 +478,7 @@ export default {
}, },
// 去发货 // 去发货
godeliver() { godeliver() {
this.orderList[0] = this.query.orderId this.orderList[0] = this.query.orderSn
this.setDeliverVisible = true this.setDeliverVisible = true
} }
}, },
@@ -461,6 +576,7 @@ ul.list {
.el-timeline-item__node { .el-timeline-item__node {
background-color: rgb(11, 189, 135); background-color: rgb(11, 189, 135);
} }
color: rgb(11, 189, 135) !important;
} }
.el-timeline-item { .el-timeline-item {

View File

@@ -97,7 +97,7 @@ export default {
return this.$message.error('获取失败,请重新尝试') return this.$message.error('获取失败,请重新尝试')
} }
}).catch(() => { }).catch(() => {
return this.$message.error('获取失败,请重新尝试')
}) })
}, },
beforeCloseDialog() { beforeCloseDialog() {

View File

@@ -23,6 +23,10 @@ export default {
type: Number, type: Number,
value: null value: null
}, },
orderSn:{
type: String,
value: ''
},
}, },
data() { data() {
return { return {
@@ -36,19 +40,22 @@ export default {
beforeCloseDialog() { beforeCloseDialog() {
this.$emit('closeDialog', false) this.$emit('closeDialog', false)
}, },
init (id) { init (sn,id) {
this.orderId = id || 0 this.orderId = id || 0
this.orderSn = sn || 0
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
if (this.orderId) { if (this.orderSn) {
this.$http({ this.$http({
url: this.$http.adornUrl(`/book/buyOrder/info/${this.orderId}`), url: this.$http.adornUrl('/book/buyOrder/orderDetail'),
method: 'get', method: 'get',
params: this.$http.adornParams() params: this.$http.adornParams({
'orderSn': this.orderSn,
})
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
console.log(data.buyOrder) console.log(data.result)
this.dataForm.remark = data.buyOrder.remark this.dataForm.remark = data.result.remark
// console.log(this.dataForm.remark) // console.log(this.dataForm.remark)
} }
}) })

View File

@@ -30,9 +30,10 @@
<div class="flexbox orderProducts" v-for="products in productsCodeList" :key="products.productId"> <div class="flexbox orderProducts" v-for="products in productsCodeList" :key="products.productId">
<div class="flexbox productItem" style=""> <div class="flexbox productItem" style="">
<!-- <el-checkbox :label="products.allOrderId"></el-checkbox> --> <!-- <el-checkbox :label="products.allOrderId"></el-checkbox> -->
<img :src="products.productUrl" width="30px" height="30px"> <img :src="products.productImage" width="30px" height="30px" :class="products.expressInfo && products.expressInfo.expressOrderSn != null ? 'gray' : ''" >
<div class="flexbox" style="align-items: center;"> <div class="" style="align-items: center;">
<div class="bookName">{{ products.productName }}</div> <div class="bookName" style="margin-left:0">{{ products.productName }}</div>
<div style="width:100%; color:#17B3A3; font-size:12px" v-if="products.expressInfo && products.expressInfo.expressOrderSn != null">快递信息{{products.expressInfo.expressCompany}}-{{products.expressInfo.expressOrderSn}}</div>
</div> </div>
</div> </div>
<div class="flexbox"> <div class="flexbox">
@@ -41,7 +42,9 @@
<div>× {{ products.quantity }}</div> <div>× {{ products.quantity }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -56,10 +59,19 @@
</div> </div>
</div> </div>
<div v-else> <div v-else>
<div style="">
<div style="padding-bottom: 10px;" class="">
<div><span class="infoTitle">用户名</span><span>{{mixOrderList[0].consignee.consigneeName}}</span>
<span class="infoTitle">电话</span><span>{{mixOrderList[0].consignee.consigneeMobile}}</span>
<span class="infoTitle">收货地址</span><span>{{mixOrderList[0].consignee.province}}-{{mixOrderList[0].consignee.city}}-{{mixOrderList[0].consignee.county}}-{{mixOrderList[0].consignee.address}}</span>
</div>
<div></div>
</div>
</div>
<el-checkbox-group v-model="checkedList" @change="handleCheckedCitiesChange"> <el-checkbox-group v-model="checkedList" @change="handleCheckedCitiesChange">
<li class="flexbox mergeList" style="border:1px solid #ddf6f3" v-for="(item, index) in mixOrderList" :key="index"> <li class="flexbox mergeList" style="border:1px solid #ddf6f3" v-for="(item, index) in mixOrderList" :key="index">
<div class="buierInfo flexbox"> <!-- <div class="buierInfo flexbox">
<div style="display: flex;width:180px; align-items: center;"> <div style="display: flex;width:180px; align-items: center;">
<div style="padding: 10px;" class=""> <div style="padding: 10px;" class="">
<div><span class="infoTitle">用户名</span><span>{{item.userName}}</span></div> <div><span class="infoTitle">用户名</span><span>{{item.userName}}</span></div>
@@ -67,15 +79,15 @@
<div><span class="infoTitle">收货地址</span><span>{{item.address}}</span></div> <div><span class="infoTitle">收货地址</span><span>{{item.address}}</span></div>
</div> </div>
</div> </div>
</div> </div> -->
<div class="productInfo" style="width:100%;"> <div class="productInfo" style="width:100%;">
<div class="item" v-for="(item2, index) in item.orderList" :key="index"> <div class="item" >
<div class="item_head no_right_border"> <div class="item_head no_right_border">
<el-row> <el-row>
<el-col :span="24" <el-col :span="24"
style="display: flex; justify-content: space-between;"> style="display: flex; justify-content: space-between;">
<span><span class="infoTitle">订单编号</span>{{item2.orderSn}} </span> <span><span class="infoTitle">订单编号</span>{{item.orderSn}} </span>
<!-- <el-button style="margin: 0; padding: 0;" type="text">移除</el-button> --> <!-- <el-button style="margin: 0; padding: 0;" type="text">移除</el-button> -->
</el-col> </el-col>
</el-row> </el-row>
@@ -83,17 +95,17 @@
<div class="item_body no_right_border no_bottom_border"> <div class="item_body no_right_border no_bottom_border">
<div class="flexbox" style="justify-content: space-between;"> <div class="flexbox" style="justify-content: space-between;">
<div class="td1" style="width:100%; "> <div class="td1" style="width:100%; ">
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item2, index) in item.goodsList" :key="index">
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item3, index) in item2.products" :key="index">
<div class="flexbox productItem" style="width:100%;"> <div class="flexbox productItem" style="width:100%;">
<el-checkbox :label="item3.allOrderId" :disabled="item3.orderStatus == '1'"><br></el-checkbox> <el-checkbox :label="item2.buyOrderProductId" :disabled="item2.expressInfo && item2.expressInfo.expressOrderSn ? true : false"><br></el-checkbox>
<img :src="item3.productUrl" width="30px" style="margin-left: -15px;" <img :src="item2.productImage" width="30px" style="margin-left: -15px;"
height="30px"> height="30px">
<div class="flexbox" style="align-items: center;"> <div class="" style="align-items: center;">
<div class="bookName">{{item3.productName}}</div> <div class="bookName">{{item2.productName}}</div>
<div style="width:100%; color:#17B3A3; font-size:12px" v-if="item2.expressInfo && item2.expressInfo.expressOrderSn">快递信息{{item2.expressInfo.expressCompany}}-{{item2.expressInfo.expressOrderSn}}</div>
</div> </div>
</div> </div>
<div class="num xcenter"><span>× {{item3.quantity}}</span></div> <div class="num xcenter"><span>× {{item2.quantity}}</span></div>
</div> </div>
</div> </div>
@@ -188,14 +200,19 @@ export default {
}, },
// 获取可合并订单 // 获取可合并订单
getMixDeliverOrderList() { getMixDeliverOrderList() {
this.orderIds[0] = this.orderitem.orderId // this.orderIds[0] = this.orderitem.orderId
this.$http({ this.$http({
url: this.$http.adornUrl(`/book/buyOrder/checkMerge`), // url: this.$http.adornUrl(`/book/buyOrder/checkMerge`),
url: this.$http.adornUrl(`/book/buyOrder/decomposeShipment`),
method: 'post', method: 'post',
data: this.orderIds data: this.$http.adornData({
'orderId': this.orderitem.orderId,
'pageIndex':1,
'pageSize':20
})
}).then(({ data }) => { }).then(({ data }) => {
console.log(data,'data')
this.mixOrderList = data.list this.mixOrderList = data.result.data
}) })
}, },
@@ -212,14 +229,13 @@ export default {
this.productsCodeList.splice(index, 1) this.productsCodeList.splice(index, 1)
console.log(index) console.log(index)
} }
this.productsIdsList = this.productsCodeList.map( item => item.id) this.productsIdsList = this.productsCodeList.map( item => item.buyOrderProductId)
}) })
}, },
// //
// getProductsCodeList // getProductsCodeList
// 普通发货 // 普通发货
submit1() { submit1() {
this.getNewProducts() this.getNewProducts()
console.log(this.productsIdsList) console.log(this.productsIdsList)
this.$refs['ruleForm'].validate((valid) => { this.$refs['ruleForm'].validate((valid) => {
@@ -232,7 +248,7 @@ export default {
}); });
this.$http({ this.$http({
// url: this.$http.adornUrl(`/book/buyOrder/blendSendFMS/${this.ruleForm.deliverLcd}`), // url: this.$http.adornUrl(`/book/buyOrder/blendSendFMS/${this.ruleForm.deliverLcd}`),
url: this.$http.adornUrl(`/book/buyOrder/delivery/`), url: this.$http.adornUrl(`/book/buyOrder/delivery`),
method: 'post', method: 'post',
params: this.$http.adornParams({ params: this.$http.adornParams({
// "shipperName" : this.ruleForm.dictValue // "shipperName" : this.ruleForm.dictValue
@@ -310,8 +326,9 @@ export default {
if(data && data.code === 0){ if(data && data.code === 0){
// console.log(data) // console.log(data)
loading.close() loading.close()
this.beforeCloseDialog()
return this.$message.success('发货成功') return this.$message.success('发货成功')
this.beforeCloseDialog()
} }
}).catch(({e}) => { }).catch(({e}) => {
loading.close(); loading.close();
@@ -350,7 +367,7 @@ export default {
orderitem: { orderitem: {
handler(val, oldVal) { handler(val, oldVal) {
console.log('变化',val) console.log('变化',val)
this.productsCodeList = val.products this.productsCodeList = val.goodsList
this.getNewProducts() this.getNewProducts()
console.log('productsIdsList',this.productsIdsList) console.log('productsIdsList',this.productsIdsList)
this.getMixDeliverOrderList() this.getMixDeliverOrderList()
@@ -602,6 +619,14 @@ export default {
border-bottom: none; border-bottom: none;
} }
.gray{
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
.hasSplit { .hasSplit {
background-color: #fffae8; background-color: #fffae8;
border: 1px solid #ffedd6; border: 1px solid #ffedd6;