阶段性提交
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user