阶段性提交
This commit is contained in:
@@ -78,6 +78,7 @@ import {
|
||||
Notification,
|
||||
Timeline,
|
||||
TimelineItem,
|
||||
// Drawer
|
||||
} from 'element-ui'
|
||||
|
||||
Vue.use(Timeline)
|
||||
@@ -145,6 +146,7 @@ Vue.use(Header)
|
||||
Vue.use(Aside)
|
||||
Vue.use(Main)
|
||||
Vue.use(Footer)
|
||||
// Vue.use(Drawer)
|
||||
|
||||
Vue.use(Loading.directive)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-tab-pane label="充值订单" name="2"></el-tab-pane>
|
||||
</el-tabs> -->
|
||||
<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="1">待发货</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)"
|
||||
:disabled="dataListSelections.length <= 0" >批量打印</el-button> -->
|
||||
</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="1" border size="mini">已打印</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; float:left;margin-left: 10px; ">
|
||||
</div> -->
|
||||
<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-item>
|
||||
<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"
|
||||
:disabled="checkedOrders.length <= 0" @click="checkDeliver">批量发货</el-button>
|
||||
</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"
|
||||
:disabled="dataListSelections.length <= 0" @click="printHandle">批量打印</el-button>
|
||||
</span> -->
|
||||
:disabled="SheetSelectionList.length <= 0" @click="printHandle(null,null,'piliang')">批量打印</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- 更新样式 -->
|
||||
<!--面单列表 -->
|
||||
<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%">
|
||||
<el-table-column type="selection" width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="运单号" prop="shippingSn"></el-table-column>
|
||||
<el-table-column prop="shipperName" label="快递公司">
|
||||
<el-table-column label="运单号" prop="expressOrderSn"></el-table-column>
|
||||
<el-table-column prop="expressCompanyCode" label="快递公司">
|
||||
</el-table-column>
|
||||
<el-table-column prop="isPrint" label="是否打印">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -102,17 +102,21 @@
|
||||
<!-- <router-link :to="{ path: 'buyorder-print', query: { orderId: scope.row.orderId } }">
|
||||
<el-button size="mini" type="primary" plain>打印面单</el-button> 跳转到详情页面
|
||||
</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> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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 class="box" style="display: none;">
|
||||
<div>
|
||||
<ul id="">
|
||||
<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>
|
||||
</ul>
|
||||
@@ -130,7 +134,7 @@
|
||||
<span><span class="infoTitle">订单编号:</span>{{ fitem.orderSn }} </span>
|
||||
<span style="margin-left: 20px;">
|
||||
<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>
|
||||
</router-link>
|
||||
</el-col>
|
||||
@@ -150,14 +154,14 @@
|
||||
<div class="item_body">
|
||||
<div class="flexbox" style="justify-content: space-between;">
|
||||
<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 }"
|
||||
v-for="(children, index2) in fitem.products" :key="children.id" style="width: 50%;" >
|
||||
<el-tooltip class="item" v-if="children.shippingSn" effect="light" :content="`快递信息:${children.shipperName} ${children.shippingSn}`"
|
||||
<div v-show="fitem.orderType == 'order'" class="flexbox orderProducts" :class="{ nobottomBorder: fitem.goodsList.length <= 3 }"
|
||||
v-for="(children, index2) in fitem.goodsList" :key="children.id" style="width: 50%;" >
|
||||
<el-tooltip class="item" v-if="children.expressInfo && children.expressInfo.expressOrderSn != null" effect="light" :content="`快递信息:${children.expressInfo.expressCompany} ${children.expressInfo.expressOrderSn}`"
|
||||
placement="right">
|
||||
<span class="normal hasDeliver"></span>
|
||||
</el-tooltip>
|
||||
<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 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"> -->
|
||||
</div>
|
||||
<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></div>
|
||||
<!-- <div>含快递费:10.00,优惠券:{{ fitem.couponName }},积分抵扣:-10.00</div> -->
|
||||
@@ -201,10 +205,10 @@
|
||||
</div>
|
||||
<div class="buier td3 xcenter">
|
||||
<div class="tabName">收货信息:
|
||||
<div style="color: #515a6e;"><span style="color: #515a6e;">{{ fitem.shippingUser }}</span> <span style="color: #515a6e;">{{ fitem.userPhone }}</span></div>
|
||||
<div style="color: #515a6e;">{{ fitem.province }}-{{ fitem.city }}-{{ fitem.district }}-{{ fitem.address }}</div>
|
||||
<div style="color: #515a6e;"><span style="color: #515a6e;">{{ fitem.consignee.consigneeName }}</span> <span style="color: #515a6e;">{{ fitem.consignee.consigneeMobile }}</span></div>
|
||||
<div style="color: #515a6e;">{{ fitem.consignee.province }}-{{ fitem.consignee.city }}-{{ fitem.consignee.county }}-{{ fitem.consignee.address }}</div>
|
||||
<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> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -268,7 +272,16 @@
|
||||
prop="shippingUser"
|
||||
header-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
|
||||
prop="province"
|
||||
@@ -303,17 +316,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 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">
|
||||
<span>¥{{scope.row.orderMoney}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column prop="districtMoney" header-align="center" align="center" label="优惠金额">
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="realMoney" header-align="center" align="center" label="实收金额">
|
||||
<template slot-scope="scope">
|
||||
<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.shippingMoney">运费:+{{scope.row.shippingMoney}}</span>
|
||||
<!-- <span >积分抵扣:-</span> -->
|
||||
@@ -343,20 +356,20 @@
|
||||
</el-table-column> -->
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<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>
|
||||
</router-link>
|
||||
<span v-if="scope.row.orderStatus">
|
||||
<!-- <span v-if="scope.row.orderStatus">
|
||||
<el-button type="text" size="small" @click="deliverDetail(scope.row)"
|
||||
v-if="isAuth('book:buyorderdetail:deliver')">物流详情</el-button>
|
||||
</span>
|
||||
</span> -->
|
||||
<!-- 新增修改订单按钮显示与隐藏判断 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>
|
||||
</router-link>
|
||||
<el-button type="text" size="small" @click="showOrderSheet(scope.row)">查看面单</el-button>
|
||||
</router-link> -->
|
||||
<!-- <el-button type="text" size="small" @click="showOrderSheet(scope.row)">查看面单</el-button> -->
|
||||
<el-dropdown size="mini" v-if="tabChange.tabActiveName === '2'">
|
||||
<span class="el-dropdown-link" style="font-size: 12px; color: #17B3A3;">
|
||||
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
@@ -390,11 +403,11 @@
|
||||
<el-form-item label="收货联系电话:" prop="tel">
|
||||
<el-input v-model="addressForm.tel"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址:" prop="county">
|
||||
<el-form-item label="收货地址:" prop="haveValue">
|
||||
<!-- <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
|
||||
v-for="item in provinceEntity"
|
||||
:key="item.regionCode"
|
||||
@@ -402,7 +415,7 @@
|
||||
:value="item.regionCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="addressForm.city" placeholder="请选择市" @change="cityChange">
|
||||
<el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
|
||||
<el-option
|
||||
v-for="item in cityEntity.cityList"
|
||||
:key="item.regionCode"
|
||||
@@ -410,7 +423,7 @@
|
||||
:value="item.regionCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="addressForm.county" placeholder="请选择区">
|
||||
<el-select v-model="addressForm.countyCode" placeholder="请选择区" @change="countyChange">
|
||||
<el-option
|
||||
v-for="item in countyEntity.countyList"
|
||||
:key="item.regionCode"
|
||||
@@ -429,7 +442,7 @@
|
||||
<el-button type="primary" @click="changeAddress">确 定</el-button>
|
||||
</span>
|
||||
</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"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
@@ -442,11 +455,11 @@
|
||||
<setDeliverDialog ref="setDeliverDialog" :visible="setDeliverVisible" :selectData="checkedOrders"
|
||||
@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">
|
||||
</updateOrderBeiZhu>
|
||||
<!-- 单个订单发货 -->
|
||||
<splitDeliver :orderitem="oprateOrder" :visible="splitDeliverVisible" @closeDialog='closeOrder1Dialog'>
|
||||
<splitDeliver :orderitem="oprateOrder" :visible="splitDeliverVisible" @closeDialog='closeOrder1Dialog'>
|
||||
</splitDeliver>
|
||||
<!--点合并发货时弹出 可合并订单弹窗 -->
|
||||
<mergeDliver v-if="mergeList" :visible="mergeDliverVisible" :mergeList="mergeList"
|
||||
@@ -521,6 +534,7 @@ export default {
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false,
|
||||
MDtotalPage:0,
|
||||
// 时间段设置项
|
||||
timePickerOptions: {
|
||||
shortcuts: [{
|
||||
@@ -551,12 +565,17 @@ export default {
|
||||
},
|
||||
setDeliverVisible: false,
|
||||
addressForm:{
|
||||
province:null,
|
||||
city:null,
|
||||
county:null,
|
||||
provinceCode:null, //省份串码
|
||||
provinceName:null,
|
||||
cityCode:null, //市区串码
|
||||
cityName:null,
|
||||
countyCode:null, //省份串码
|
||||
countyName:null,
|
||||
name:'',
|
||||
tel:'',
|
||||
addressXX:''
|
||||
addressXX:'',
|
||||
haveValue:false,
|
||||
orderSn:null,
|
||||
},
|
||||
provinceEntity:[], // 城市列表
|
||||
cityEntity:[], // 市
|
||||
@@ -574,8 +593,12 @@ export default {
|
||||
],
|
||||
addressXX: [
|
||||
{ required: true, message: '请输入详细地址信息', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
],
|
||||
haveValue:[
|
||||
{ required: true, message: '请选择要修改的省市区', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
SheetSelectionList:[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -591,37 +614,77 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
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) => {
|
||||
if (valid) {
|
||||
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 {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
cityChange(e){
|
||||
// console.log('修改了市',e)
|
||||
this.addressForm.county = null
|
||||
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
|
||||
countyChange(e){
|
||||
console.log(e,'countyName')
|
||||
this.countyEntity.countyList.find((val,index,arr)=>{
|
||||
this.addressForm.countyName = val.countyName
|
||||
return val.regionCode == e
|
||||
})
|
||||
// console.log('对应的city数组',this.countyEntity)
|
||||
console.log('this.addressForm.countyName', this.addressForm)
|
||||
},
|
||||
cityChange(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){
|
||||
// console.log('修改了省份',e)
|
||||
this.addressForm.city = null;
|
||||
this.addressForm.county = null
|
||||
this.addressForm.cityCode = null;
|
||||
this.addressForm.countyCode = null
|
||||
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
|
||||
this.addressForm.provinceName = val.provName
|
||||
return val.regionCode == e
|
||||
})
|
||||
// console.log('对应的city数组',this.cityEntity)
|
||||
console.log('this.addressForm.provinceName',this.addressForm.provinceName)
|
||||
},
|
||||
changeAddHandleClose(){
|
||||
this.changeAddVisible = false
|
||||
this.addressForm.province = null
|
||||
this.addressForm.city = null;
|
||||
this.addressForm.county = null
|
||||
this.addressForm.provinceCode = null
|
||||
this.addressForm.cityCode = null;
|
||||
this.addressForm.countyCode = null
|
||||
this.addressForm.provinceName = null
|
||||
this.addressForm.cityName = null;
|
||||
this.addressForm.countyName = null
|
||||
this.addressForm.orderSn = null
|
||||
this.provinceEntity = []
|
||||
this.cityEntity = []
|
||||
this.countyEntity = []
|
||||
@@ -635,7 +698,8 @@ export default {
|
||||
// $refs[formName].resetFields()
|
||||
console.log('关闭了', this.addressForm)
|
||||
},
|
||||
changeAddressShow(){
|
||||
changeAddressShow(val){
|
||||
console.log(val,'val')
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/api/province/getProvince'),
|
||||
method: 'post',
|
||||
@@ -645,31 +709,51 @@ export default {
|
||||
}).then(({ data }) => {
|
||||
console.log('获取地址三级列表', data)
|
||||
if(data.code == 0){
|
||||
this.addressForm.orderSn = val.orderSn
|
||||
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 => {
|
||||
console.log(e,'e')
|
||||
})
|
||||
|
||||
this.changeAddVisible = true
|
||||
console.log('显示修改收货地址')
|
||||
},
|
||||
// 混合发货
|
||||
showAnyDialog(item) {
|
||||
this.anyDialogContent = item.fmsHtml
|
||||
this.anyDialogContent = item.printTemplate
|
||||
console.log('面单',item)
|
||||
if (item.fmsHtml == null) return this.$message.error('暂无面单数据')
|
||||
if (item.printTemplate == null) return this.$message.error('暂无面单数据')
|
||||
this.anyDialogVisible = true
|
||||
this.anyDialogTitle = '查看面单'
|
||||
},
|
||||
// 查询可打印面单
|
||||
getNotPrintSheetList() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/buyOrderdetail/querySheetPage'),
|
||||
method: 'post',
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/express/getPrintTemplateList'),
|
||||
method: 'get',
|
||||
/// data: {}
|
||||
}).then(({ data }) => {
|
||||
console.log(data.result.totalDataSize,'面单列表')
|
||||
if (data && data.code === 0) {
|
||||
this.PrintSheetList = data.page.list
|
||||
this.PrintSheetList = data.result.data
|
||||
this.MDtotalPage = data.result.totalDataSize
|
||||
} else {
|
||||
this.PrintSheetList = []
|
||||
this.totalPage = 0
|
||||
@@ -703,7 +787,7 @@ export default {
|
||||
this.oprateOrder = val
|
||||
this.editBeizhudialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updateOrderBeiZhu.init(val.orderId)
|
||||
this.$refs.updateOrderBeiZhu.init(val.orderSn, val.orderId)
|
||||
})
|
||||
|
||||
},
|
||||
@@ -724,22 +808,32 @@ export default {
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/buyOrder/list'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.pageIndex,
|
||||
'limit': this.pageSize,
|
||||
'key': this.dataForm.key,
|
||||
'startTime': this.dataForm.time[0],
|
||||
'endTime': this.dataForm.time[1],
|
||||
'orderStatus': this.tabChange.tabActiveName, // 订单状态参数
|
||||
'isPrint': this.tabChange.isPrint,
|
||||
'orderorderType': this.tabChange.orderName,
|
||||
// url: this.$http.adornUrl('/book/buyOrder/list'),
|
||||
url: this.$http.adornUrl('/book/buyOrder/orderList'),
|
||||
method: 'post',
|
||||
// params: this.$http.adornParams({
|
||||
// 'page': this.pageIndex,
|
||||
// 'limit': this.pageSize,
|
||||
// 'key': this.dataForm.key,
|
||||
// 'startTime': this.dataForm.time[0],
|
||||
// 'endTime': this.dataForm.time[1],
|
||||
// 'orderStatus': this.tabChange.tabActiveName, // 订单状态参数
|
||||
// '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 }) => {
|
||||
console.log(data,'列表数据')
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.page.list
|
||||
this.totalPage = data.page.totalCount
|
||||
this.dataList = data.result.data
|
||||
this.totalPage = data.result.totalDataSize
|
||||
if (this.tabChange.tabActiveName === '1') { // 判断可选按钮是否可用
|
||||
this.isMultipleDisabled()
|
||||
}
|
||||
@@ -769,6 +863,11 @@ export default {
|
||||
selectionChangeHandle(val) {
|
||||
this.dataListSelections = val
|
||||
},
|
||||
// 面单批量选择
|
||||
SheetSelectionChangeHandle(val){
|
||||
this.SheetSelectionList = val
|
||||
console.log(this.SheetSelectionList,'选中的打印列表')
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle(id) {
|
||||
this.addOrUpdateVisible = true
|
||||
@@ -826,43 +925,52 @@ export default {
|
||||
}
|
||||
},
|
||||
// 批量/打印面单
|
||||
printHandle(id) {
|
||||
printHandle(id, row) {
|
||||
console.log(id, row)
|
||||
// 如果是传了id
|
||||
if(isFinite(id)){
|
||||
console.log(id, '传了')
|
||||
this.$confirm(`确定对选中的 1 条面单进行批量打印操作?`, '提示', {
|
||||
if(id){
|
||||
// console.log(id, '传了')
|
||||
this.$confirm(`确定进行打印操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).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 => {
|
||||
if(item.orderId == id){ return this.selectedPrintList = [item.fmsHtml]}
|
||||
// this.PrintSheetList.map(item => {
|
||||
// if(item.expressOrderSn == id){ return this.selectedPrintList = [item.printTemplate]}
|
||||
// console.log(this.selectedPrintList,'this.selectedPrintList待打印列表')
|
||||
setTimeout(() => {
|
||||
this.handlePrintSheet()
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
this.selectedPrintList = []
|
||||
this.confirmPrint()
|
||||
}, 1000);
|
||||
})
|
||||
}).catch(()=>{})
|
||||
// })
|
||||
}).catch((e)=>{
|
||||
console.log('打印报错了')
|
||||
})
|
||||
}else{
|
||||
// console.log(ids)
|
||||
//this.printDialogVisible = true
|
||||
this.$confirm(`确定对选中的${this.dataListSelections.length}条面单进行批量打印操作?`, '提示', {
|
||||
console.log('批量打印')
|
||||
this.printDialogVisible = true
|
||||
this.$confirm(`确定对选中的 ${this.SheetSelectionList.length} 个面单进行批量打印操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
// 计算出选中了多少条面单
|
||||
let SheetList = this.dataListSelections.map(item => item.fmsHtml)
|
||||
let SheetList = this.SheetSelectionList.map(item => item.printTemplate)
|
||||
this.selectedPrintList = SheetList
|
||||
console.log(this.selectedPrintList,'即将打印的面单数组')
|
||||
setTimeout(() => {
|
||||
this.handlePrintSheet()
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
this.selectedPrintList = []
|
||||
this.confirmPrint()
|
||||
}, 1000);
|
||||
}).catch(() => { })
|
||||
}
|
||||
@@ -883,6 +991,54 @@ export default {
|
||||
newWin.close(); //关闭窗口
|
||||
}, 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) {
|
||||
this.printDialogVisible = val
|
||||
},
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
<div>
|
||||
<ul class="list">
|
||||
<div class="liName">用户信息</div>
|
||||
<li><span class="infoTitle">用户名:</span><span>{{orderDetails.userName ? orderDetails.userName : '暂无'}}</span></li>
|
||||
<li><span class="infoTitle">用户ID:</span><span>{{orderDetails.userId}}</span></li>
|
||||
<li><span class="infoTitle">联系电话:</span><span>{{orderDetails.userPhone}}</span></li>
|
||||
<li><br/></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">联系电话:</span><span>{{orderDetails.userInfo.userPhone}}</span></li>
|
||||
<li style="clear:both"></li>
|
||||
<!-- <li><span class="infoTitle">电 话:</span><span>187898544875</span></li> -->
|
||||
<!-- <li><span class="infoTitle">地 址:</span><span>天津市天津市天津市天津市天津市天津市</span></li> -->
|
||||
<li class="line"></li>
|
||||
@@ -24,13 +24,13 @@
|
||||
<span v-if="orderDetails.orderStatus == 1" class="hightLight">待发货</span>
|
||||
<span v-if="orderDetails.orderStatus == 2" 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><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.shippingMoney}}</span></li>
|
||||
<li><span class="infoTitle">订单金额:</span><span>¥{{orderDetails.orderPrice}}</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" v-if="orderDetails.orderStatus > 0">支付时间:</span><span>{{orderDetails.paymentDate}}</span></li>
|
||||
<li style="width: 100%;" v-if="orderDetails.orderStatus > 0"><span class="infoTitle">支付方式:</span>
|
||||
@@ -46,41 +46,30 @@
|
||||
<div style="clear:both"></div>
|
||||
<div v-if="orderDetails.orderStatus > 0">
|
||||
<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>
|
||||
</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>
|
||||
<li><span class="infoTitle">收货人:</span><span>{{orderDetails.shippingUser}}</span> <span>{{orderDetails.userPhone}}</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.consigneeName}}</span> <span>{{orderDetails.consignee.consigneeMobile}}</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> -->
|
||||
<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-col v-if="activities != []" :md="12" :lg="8" class="item" v-for="(item, index) in activities" :key="index">
|
||||
<div class="deliver_heade">
|
||||
|
||||
<div><span class="infoTitle">物流公司:</span><span>{{item.ShipperName}}</span></div>
|
||||
<div><span class="infoTitle">运单号:</span><span>{{item.LogisticCode}}</span></div>
|
||||
<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>
|
||||
<el-col :md="12" :lg="8" class="item" v-for="(item, index) in sheetList" :key="index">
|
||||
<div class="deliver_heade">
|
||||
<div><span class="infoTitle">物流公司:</span><span>{{item.expressCompanyName}}</span></div>
|
||||
<div><span class="infoTitle">运单号:</span><span style="margin-right:10px">{{item.expressOrderSn}}</span>
|
||||
<el-button type="primary" size="mini" plain @click="seeSheetDetails(item)">查看物流进度</el-button>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</li>
|
||||
@@ -88,14 +77,14 @@
|
||||
<li class="line" style="margin:10px 0;"></li>
|
||||
<!-- 订单商品 -->
|
||||
<div class="liName">商品信息</div>
|
||||
<el-table :data="orderDetails.products"
|
||||
<el-table :data="orderDetails.goodsList"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="商品名"
|
||||
width="280">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
</template>
|
||||
@@ -112,6 +101,24 @@
|
||||
</el-table>
|
||||
</ul>
|
||||
</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
|
||||
title="修改收货信息"
|
||||
:visible.sync="changeAddVisible"
|
||||
@@ -119,17 +126,17 @@
|
||||
:close="changeAddHandleClose">
|
||||
<div>
|
||||
<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-form-item>
|
||||
<el-form-item label="收货联系电话:">
|
||||
<el-form-item label="收货联系电话:" prop="tel">
|
||||
<el-input v-model="addressForm.tel"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址:">
|
||||
<!-- <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
|
||||
v-for="item in provinceEntity"
|
||||
:key="item.regionCode"
|
||||
@@ -137,7 +144,7 @@
|
||||
:value="item.regionCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="addressForm.city" placeholder="请选择市" @change="cityChange">
|
||||
<el-select v-model="addressForm.cityCode" placeholder="请选择市" @change="cityChange">
|
||||
<el-option
|
||||
v-for="item in cityEntity.cityList"
|
||||
:key="item.regionCode"
|
||||
@@ -145,7 +152,7 @@
|
||||
:value="item.regionCode">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="addressForm.county" placeholder="请选择区">
|
||||
<el-select v-model="addressForm.countyCode" placeholder="请选择区" @change="countyChange">
|
||||
<el-option
|
||||
v-for="item in countyEntity.countyList"
|
||||
:key="item.regionCode"
|
||||
@@ -154,7 +161,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址:">
|
||||
<el-form-item label="详细地址:" prop="addressXX">
|
||||
<el-input type="textarea" v-model="addressForm.addressXX"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -180,7 +187,11 @@ export default {
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
reverse: false,
|
||||
traces:[], // 物流轨迹
|
||||
tracesShow:false,
|
||||
currentSheet:{},
|
||||
|
||||
reverse: true,
|
||||
activities: [ ],
|
||||
deliverData: [], // 物流信息
|
||||
|
||||
@@ -189,15 +200,18 @@ export default {
|
||||
dataListSelections: [],
|
||||
// addOrUpdateVisible: false,
|
||||
query: {
|
||||
orderId: 0,
|
||||
orderSn: 0,
|
||||
ordertype:null
|
||||
},
|
||||
changeAddVisible: false,
|
||||
orderDetails:{},
|
||||
addressForm:{
|
||||
province:null,
|
||||
city:null,
|
||||
county:null,
|
||||
provinceCode:null, //省份串码
|
||||
provinceName:null,
|
||||
cityCode:null, //市区串码
|
||||
cityName:null,
|
||||
countyCode:null, //省份串码
|
||||
countyName:null,
|
||||
name:'',
|
||||
tel:'',
|
||||
addressXX:''
|
||||
@@ -224,44 +238,103 @@ export default {
|
||||
addressXX: [
|
||||
{ required: true, message: '请输入详细地址信息', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
},
|
||||
sheetList:[], // 面单列表
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
activated() {
|
||||
this.query.orderId = this.$route.query.orderId;
|
||||
this.query.orderSn = this.$route.query.orderSn;
|
||||
this.query.ordertype = this.$route.query.ordertype;
|
||||
console.log(this.$route.query.orderId)
|
||||
console.log(this.$route.query.orderSn)
|
||||
this.getData()
|
||||
// this.getOrderSheetList()
|
||||
},
|
||||
methods: {
|
||||
cityChange(e){
|
||||
// console.log('修改了市',e)
|
||||
this.addressForm.county = null
|
||||
this.countyEntity = this.cityEntity.cityList.find((val,index,arr)=>{
|
||||
methods: {
|
||||
drawerHandleClose(){
|
||||
console.log('关闭')
|
||||
this.traces = []
|
||||
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
|
||||
})
|
||||
// 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){
|
||||
// console.log('修改了省份',e)
|
||||
this.addressForm.city = null;
|
||||
this.addressForm.county = null
|
||||
this.addressForm.cityCode = null;
|
||||
this.addressForm.countyCode = null
|
||||
this.cityEntity = this.provinceEntity.find((val,index,arr)=>{
|
||||
this.addressForm.provinceName = val.provName
|
||||
return val.regionCode == e
|
||||
})
|
||||
// console.log('对应的city数组',this.cityEntity)
|
||||
console.log('this.addressForm.provinceName',this.addressForm.provinceName)
|
||||
},
|
||||
changeAddHandleClose(){
|
||||
this.changeAddVisible = false
|
||||
this.addressForm.province = null
|
||||
this.addressForm.city = null;
|
||||
this.addressForm.county = null
|
||||
this.addressForm.provinceCode = null
|
||||
this.addressForm.cityCode = null;
|
||||
this.addressForm.countyCode = null
|
||||
this.addressForm.provinceName = null
|
||||
this.addressForm.cityName = null;
|
||||
this.addressForm.countyName = null
|
||||
this.provinceEntity = []
|
||||
this.cityEntity = []
|
||||
this.countyEntity = []
|
||||
this.$refs['addressFormRef'].clearValidate()
|
||||
this.$nextTick(() => {
|
||||
this.addressForm.name = ''
|
||||
this.addressForm.tel = ''
|
||||
@@ -282,74 +355,116 @@ export default {
|
||||
console.log('获取地址三级列表', data)
|
||||
if(data.code == 0){
|
||||
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 => {
|
||||
console.log(e,'e')
|
||||
})
|
||||
// this.changeAddVisible = true
|
||||
})
|
||||
this.changeAddVisible = true
|
||||
console.log('显示修改收货地址')
|
||||
},
|
||||
// 修改收货信息
|
||||
changeAddress(){
|
||||
this.$refs['addressFormRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (valid) {
|
||||
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 {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取地址数据三级联动
|
||||
// 获取 物流
|
||||
getdeliverDetails(){
|
||||
let loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在获取物流信息...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/book/buyOrder/queryFMS'),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams({
|
||||
'orderId': this.query.orderId
|
||||
|
||||
// 获取订单下的快递单
|
||||
getOrderSheetList(){
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/express/getPrintTemplateList'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'expressOrderSn': this.query.orderSn,
|
||||
})
|
||||
/// data: {}
|
||||
}).then(({ data }) => {
|
||||
if(data && data.code === 0){
|
||||
if(data.rntStr != []){
|
||||
this.activities = data.rntStr
|
||||
// console.log(this.activities)
|
||||
}else{
|
||||
this.activities = []
|
||||
}
|
||||
loading.close()
|
||||
}else{
|
||||
loading.close()
|
||||
return this.$message.error('物流获取失败,请重试')
|
||||
|
||||
}
|
||||
}).catch(({e}) => {
|
||||
loading.close()
|
||||
console.log(e,'e')
|
||||
console.log(data.result,'面单列表')
|
||||
if (data && data.code === 0) {
|
||||
this.sheetList = data.result.data
|
||||
// this.MDtotalPage = data.result.totalDataSize
|
||||
} else {
|
||||
// this.PrintSheetList = []
|
||||
// this.totalPage = 0
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
},
|
||||
// 获取数据列表
|
||||
getData() {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
// 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',
|
||||
params: this.$http.adornParams({
|
||||
'orderId': this.query.orderId,
|
||||
'orderSn': this.query.orderSn,
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.orderDetails = data.detail
|
||||
if(this.query.ordertype != 0){ // 不是待付款订单时
|
||||
this.getdeliverDetails()
|
||||
}
|
||||
console.log(data.result,'data.result')
|
||||
this.orderDetails = data.result
|
||||
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 {
|
||||
this.orderDetails = {}
|
||||
return this.$message.error('商品详情获取失败,请重试')
|
||||
@@ -363,7 +478,7 @@ export default {
|
||||
},
|
||||
// 去发货
|
||||
godeliver() {
|
||||
this.orderList[0] = this.query.orderId
|
||||
this.orderList[0] = this.query.orderSn
|
||||
this.setDeliverVisible = true
|
||||
}
|
||||
},
|
||||
@@ -457,10 +572,11 @@ ul.list {
|
||||
content: "\e740";
|
||||
}
|
||||
|
||||
.el-timeline-item:first-child {
|
||||
.el-timeline-item:first-child {
|
||||
.el-timeline-item__node {
|
||||
background-color: rgb(11, 189, 135);
|
||||
}
|
||||
color: rgb(11, 189, 135) !important;
|
||||
}
|
||||
|
||||
.el-timeline-item {
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
return this.$message.error('获取失败,请重新尝试')
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
return this.$message.error('获取失败,请重新尝试')
|
||||
})
|
||||
},
|
||||
beforeCloseDialog() {
|
||||
|
||||
@@ -22,7 +22,11 @@ export default {
|
||||
orderId:{
|
||||
type: Number,
|
||||
value: null
|
||||
},
|
||||
},
|
||||
orderSn:{
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -36,19 +40,22 @@ export default {
|
||||
beforeCloseDialog() {
|
||||
this.$emit('closeDialog', false)
|
||||
},
|
||||
init (id) {
|
||||
init (sn,id) {
|
||||
this.orderId = id || 0
|
||||
this.orderSn = sn || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
if (this.orderId) {
|
||||
if (this.orderSn) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/book/buyOrder/info/${this.orderId}`),
|
||||
url: this.$http.adornUrl('/book/buyOrder/orderDetail'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
params: this.$http.adornParams({
|
||||
'orderSn': this.orderSn,
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
console.log(data.buyOrder)
|
||||
this.dataForm.remark = data.buyOrder.remark
|
||||
console.log(data.result)
|
||||
this.dataForm.remark = data.result.remark
|
||||
// console.log(this.dataForm.remark)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -30,10 +30,11 @@
|
||||
<div class="flexbox orderProducts" v-for="products in productsCodeList" :key="products.productId">
|
||||
<div class="flexbox productItem" style="">
|
||||
<!-- <el-checkbox :label="products.allOrderId"></el-checkbox> -->
|
||||
<img :src="products.productUrl" width="30px" height="30px">
|
||||
<div class="flexbox" style="align-items: center;">
|
||||
<div class="bookName">{{ products.productName }}</div>
|
||||
</div>
|
||||
<img :src="products.productImage" width="30px" height="30px" :class="products.expressInfo && products.expressInfo.expressOrderSn != null ? 'gray' : ''" >
|
||||
<div class="" style="align-items: center;">
|
||||
<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 class="flexbox">
|
||||
<div class="price xcenter">
|
||||
@@ -41,7 +42,9 @@
|
||||
<div>× {{ products.quantity }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,10 +59,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
|
||||
<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="padding: 10px;" class="">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<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">
|
||||
<el-row>
|
||||
<el-col :span="24"
|
||||
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-col>
|
||||
</el-row>
|
||||
@@ -83,17 +95,17 @@
|
||||
<div class="item_body no_right_border no_bottom_border">
|
||||
<div class="flexbox" style="justify-content: space-between;">
|
||||
<div class="td1" style="width:100%; ">
|
||||
|
||||
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item3, index) in item2.products" :key="index">
|
||||
<div class="flexbox orderProducts" style="width:50%; float: left;" v-for="(item2, index) in item.goodsList" :key="index">
|
||||
<div class="flexbox productItem" style="width:100%;">
|
||||
<el-checkbox :label="item3.allOrderId" :disabled="item3.orderStatus == '1'"><br></el-checkbox>
|
||||
<img :src="item3.productUrl" width="30px" style="margin-left: -15px;"
|
||||
<el-checkbox :label="item2.buyOrderProductId" :disabled="item2.expressInfo && item2.expressInfo.expressOrderSn ? true : false"><br></el-checkbox>
|
||||
<img :src="item2.productImage" width="30px" style="margin-left: -15px;"
|
||||
height="30px">
|
||||
<div class="flexbox" style="align-items: center;">
|
||||
<div class="bookName">{{item3.productName}}</div>
|
||||
<div class="" style="align-items: center;">
|
||||
<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 class="num xcenter"><span>× {{item3.quantity}}</span></div>
|
||||
<div class="num xcenter"><span>× {{item2.quantity}}</span></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -188,14 +200,19 @@ export default {
|
||||
},
|
||||
// 获取可合并订单
|
||||
getMixDeliverOrderList() {
|
||||
this.orderIds[0] = this.orderitem.orderId
|
||||
// this.orderIds[0] = this.orderitem.orderId
|
||||
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',
|
||||
data: this.orderIds
|
||||
data: this.$http.adornData({
|
||||
'orderId': this.orderitem.orderId,
|
||||
'pageIndex':1,
|
||||
'pageSize':20
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
|
||||
this.mixOrderList = data.list
|
||||
console.log(data,'data')
|
||||
this.mixOrderList = data.result.data
|
||||
})
|
||||
},
|
||||
|
||||
@@ -212,14 +229,13 @@ export default {
|
||||
this.productsCodeList.splice(index, 1)
|
||||
console.log(index)
|
||||
}
|
||||
this.productsIdsList = this.productsCodeList.map( item => item.id)
|
||||
this.productsIdsList = this.productsCodeList.map( item => item.buyOrderProductId)
|
||||
})
|
||||
},
|
||||
//
|
||||
// getProductsCodeList
|
||||
// 普通发货
|
||||
submit1() {
|
||||
|
||||
submit1() {
|
||||
this.getNewProducts()
|
||||
console.log(this.productsIdsList)
|
||||
this.$refs['ruleForm'].validate((valid) => {
|
||||
@@ -232,7 +248,7 @@ export default {
|
||||
});
|
||||
this.$http({
|
||||
// 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',
|
||||
params: this.$http.adornParams({
|
||||
// "shipperName" : this.ruleForm.dictValue
|
||||
@@ -310,8 +326,9 @@ export default {
|
||||
if(data && data.code === 0){
|
||||
// console.log(data)
|
||||
loading.close()
|
||||
this.beforeCloseDialog()
|
||||
return this.$message.success('发货成功')
|
||||
this.beforeCloseDialog()
|
||||
|
||||
}
|
||||
}).catch(({e}) => {
|
||||
loading.close();
|
||||
@@ -350,7 +367,7 @@ export default {
|
||||
orderitem: {
|
||||
handler(val, oldVal) {
|
||||
console.log('变化',val)
|
||||
this.productsCodeList = val.products
|
||||
this.productsCodeList = val.goodsList
|
||||
this.getNewProducts()
|
||||
console.log('productsIdsList',this.productsIdsList)
|
||||
this.getMixDeliverOrderList()
|
||||
@@ -602,6 +619,14 @@ export default {
|
||||
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 {
|
||||
background-color: #fffae8;
|
||||
border: 1px solid #ffedd6;
|
||||
|
||||
Reference in New Issue
Block a user