From 987c8a33ae8c2eec63a4da1f35b5510224962409 Mon Sep 17 00:00:00 2001
From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com>
Date: Fri, 15 Mar 2024 14:42:18 +0800
Subject: [PATCH] 1
---
src/views/order/index.vue | 463 ++++++++++++++++++--------------------
1 file changed, 216 insertions(+), 247 deletions(-)
diff --git a/src/views/order/index.vue b/src/views/order/index.vue
index 9b76cb5..0fd99bc 100644
--- a/src/views/order/index.vue
+++ b/src/views/order/index.vue
@@ -3,103 +3,83 @@
-
- 全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}
- 待付款 {{ '(' +orderChartType.unpaid?orderChartType.unpaid:0+ ')' }}
- 待发货 {{ '(' +orderChartType.unshipped?orderChartType.unshipped:0+ ')' }}
- 待收货 {{ '(' +orderChartType.untake?orderChartType.untake:0+ ')' }}
- 待评价 {{ '(' +orderChartType.unevaluate?orderChartType.unevaluate:0+ ')' }}
- 交易完成 {{ '(' +orderChartType.complete?orderChartType.complete:0+ ')' }}
- 已退款 {{ '(' +orderChartType.refund?orderChartType.refund:0+ ')' }}
- 已删除 {{ '(' +orderChartType.del?orderChartType.del:0+ ')' }}
+
+ 全部 {{ '(' + orderChartType.all ? orderChartType.all : 0 + ')' }}
+ 待付款 {{ '(' + orderChartType.unpaid ? orderChartType.unpaid : 0 + ')'
+ }}
+ 待发货 {{ '(' + orderChartType.unshipped ? orderChartType.unshipped : 0 + ')'
+ }}
+ 待收货 {{ '(' + orderChartType.untake ? orderChartType.untake : 0 + ')'
+ }}
+ 待评价 {{ '(' + orderChartType.unevaluate ? orderChartType.unevaluate : 0 + ')'
+ }}
+ 交易完成 {{ '(' + orderChartType.complete ? orderChartType.complete : 0 + ')'
+ }}
+ 已退款 {{ '(' + orderChartType.refund ? orderChartType.refund : 0 + ')'
+ }}
+ 已删除 {{ '(' + orderChartType.del ? orderChartType.del : 0 + ')'
+ }}
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
-
+
+
搜索
- 重置
+ 重置
-
+
-
-
+
+
订单核销
@@ -112,21 +92,15 @@
导出发货单
-
+
导入批量发货
批量发货记录
批量发送货
-
+
@@ -149,14 +123,20 @@
- 选中本页
- 选中全部
+ 选中本页
+ 选中全部
-
+
- changeOne(v,scope.row)" />
+ changeOne(v, scope.row)" />
@@ -165,7 +145,7 @@
用户已删除
-
+
@@ -173,12 +153,16 @@
- {{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}
+ {{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku
+ }}
- {{ '¥'+ val.cart_info.productPresellAttr.presell_price + ' x '+ val.product_num }}
- {{ '¥'+ val.cart_info.productAssistAttr.assist_price + ' x '+ val.product_num }}
- {{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}
- (-{{ val.product_num - val.refund_num }})
+ {{ '¥' +
+ val.cart_info.productPresellAttr.presell_price + ' x ' + val.product_num }}
+ {{ '¥' +
+ val.cart_info.productAssistAttr.assist_price + ' x ' + val.product_num }}
+ {{ '¥' + val.cart_info.productAttr.price + ' x ' + val.product_num }}
+ (-{{ val.product_num - val.refund_num }})
@@ -205,7 +189,8 @@
待付款
- {{ scope.row.status | orderStatusFilter }}
+ {{ scope.row.status |
+ orderStatusFilter }}
{{ scope.row.status | takeOrderStatusFilter }}
@@ -216,16 +201,24 @@
详情
- 查看退款单
- 编辑
- 发送货
- 删除
- 去核销
+ 查看退款单
+ 编辑
+ 发送货
+ 删除
+ 去核销
-
+
@@ -236,7 +229,9 @@
-
+
@@ -263,158 +258,130 @@
-
+
-
+
{{ original.delivery_name }}
-
+
{{ original.delivery_id }}
- 手动发货
- {{orderType == 1 ? '虚拟发货' : '无需物流'}}
- 电子面单打印
- 自己配送
- 同城配送
+
+ 自己配送
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
-
+
+
+
预览
-
+
-
+
-
+
-
+
-
-
+
+
+
-
-
+
+
可选择表格中的商品单独发货,发货后会生成新的订单且不能撤回,请谨慎操作!
-
-
-
+
+
+
-
+
-
{{scope.row.cart_info.product.store_name}}
+
{{ scope.row.cart_info.product.store_name }}
- {{scope.row.cart_info.productAttr.sku}}
+ {{ scope.row.cart_info.productAttr.sku }}
- {{scope.row.cart_info.productAttr.price}}
+ {{ scope.row.cart_info.productAttr.price }}
- {{scope.row.stock_num}}
+ {{ scope.row.stock_num }}
-
+
-
+
-
+
@@ -428,17 +395,8 @@
-
+
@@ -529,7 +487,7 @@ export default {
type: this.$route.query.order_type || '1',
username: '',
filter_delivery: '',
- filter_product : '',
+ filter_product: '',
pay_type: '',
order_id: this.$route.query.id ? this.$route.query.id : '',
activity_type: ''
@@ -622,10 +580,10 @@ export default {
storeList: [], //门店列表
multipleSelection: [],
shipment: {
- delivery_type: 1,
+ delivery_type: 2,
station_id: '',
- is_split:"0",
- split:[]
+ is_split: "0",
+ split: []
},
original: {
delivery_name: '',
@@ -698,7 +656,7 @@ export default {
},
methods: {
/**重置 */
- searchReset(){
+ searchReset() {
this.timeVal = []
this.tableFrom.date = ""
this.$refs.searchForm.resetFields()
@@ -706,7 +664,7 @@ export default {
},
// 回
limitCount(row) {
- if (row.stock > row.product_num)row.stock = row.product_num
+ if (row.stock > row.product_num) row.stock = row.product_num
},
changeDrawer(v) {
this.drawer = v;
@@ -719,7 +677,7 @@ export default {
this.multipleSelection = val
const data = []
this.multipleSelection.map((item) => {
- data.push({id:item.order_product_id,num:item.product_num})
+ data.push({ id: item.order_product_id, num: item.product_num })
})
this.ids = data
},
@@ -760,13 +718,13 @@ export default {
temp_id: ""
// temp_id: data.mer_config_temp_id
}
- if(data.mer_from_com != ''){
+ if (data.mer_from_com != '') {
this.getTempsLst(data.mer_from_com)
}
})
- .catch((res) => {
- this.$message.error(res.message)
- })
+ .catch((res) => {
+ this.$message.error(res.message)
+ })
},
//获取门店列表
getStoreList() {
@@ -778,7 +736,7 @@ export default {
},
changeSend(e) {
this.$refs['shipment'].clearValidate();
- if(e == 3){
+ if (e == 3) {
//如果是无需配送,就重置拆单信息
this.shipment.is_split = '0';
delete this.shipment.split;
@@ -798,18 +756,18 @@ export default {
},
// 批量发送货
batchSend() {
- if (!this.allCheck&&this.checkedIds.length == 0) {
+ if (!this.allCheck && this.checkedIds.length == 0) {
return this.$message.warning('请先选择订单')
} else {
this.isBatch = true
this.sendVisible = true
this.shipment.delivery_type = 2
this.shipment.select_type = this.allCheck ? 'all' : 'select'
- if(this.allCheck){
+ if (this.allCheck) {
this.shipment.where = this.tableFrom
- }else{
+ } else {
this.shipment.order_id = this.checkedIds
- }
+ }
}
},
handleClose() {
@@ -909,15 +867,15 @@ export default {
})
},
// 订单退款
- onOrderRefund(id){
- this.$refs.orderRefund.getOrderDetails(id)
+ onOrderRefund(id) {
+ this.$refs.orderRefund.getOrderDetails(id)
},
// 退款回调
- refundSuccess(){
+ refundSuccess() {
setTimeout(() => {
this.drawer = false;
this.getList();
- },500)
+ }, 500)
},
// 表格某一行添加特定的样式
addTdClass(val) {
@@ -940,18 +898,18 @@ export default {
async exports(value) {
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
excelData.page = 1
- excelData.ids = this.checkedIds.toString()
+ excelData.ids = this.checkedIds.toString()
let pageCount = 1
let lebData = {};
for (let i = 0; i < pageCount; i++) {
lebData = value == 1 ? await this.downOrderData(excelData) : await this.downInvoiceData(excelData)
- pageCount = Math.ceil(lebData.count/excelData.limit)
+ pageCount = Math.ceil(lebData.count / excelData.limit)
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
- }
+ }
}
- createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
+ createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename);
return
},
/**订单 */
@@ -990,12 +948,12 @@ export default {
orderCancellation(code) {
const that = this
that.$refs.orderCancellate.dialogVisible = true;
- if(code) {
- that.$refs.orderCancellate.productDetails(code)
- that.$refs.orderCancellate.isColum = true;
- }else{
- that.$refs.orderCancellate.isColum = false;
- that.$refs.orderCancellate.resetData()
+ if (code) {
+ that.$refs.orderCancellate.productDetails(code)
+ that.$refs.orderCancellate.isColum = true;
+ } else {
+ that.$refs.orderCancellate.isColum = false;
+ that.$refs.orderCancellate.resetData()
}
},
// 去核销
@@ -1077,9 +1035,9 @@ export default {
this.$confirm(
'您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!',
'提示', {
- confirmButtonText: '确定',
- type: 'error'
- }
+ confirmButtonText: '确定',
+ type: 'error'
+ }
)
}
},
@@ -1110,8 +1068,8 @@ export default {
pay_postage: res.data.pay_postage,
total_price: res.data.total_price,
integral_price: res.data.integral_price,
- coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2) ,
- pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2)
+ coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2),
+ pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2)
}
this.loading = false
}).catch(({ message }) => {
@@ -1132,21 +1090,22 @@ export default {
this.formValidate.pay_price = (this.formValidate.total_price + this.formValidate.pay_postage - this.formValidate.coupon_price).toFixed(2)
},
// 发货
- send(row,id) {
+ send(row, id) {
this.isBatch = false
this.sendVisible = true
this.isResend = false
this.orderId = id
this.activityType = row.activity_type
this.orderType = row.is_virtual
- this.shipment.delivery_type = this.orderType === 1 ? 3 : 1
+ // this.shipment.delivery_type = this.orderType === 1 ? 3 : 1 设置自己配送
+ this.shipment.delivery_type = 2;
row.orderProduct.forEach(item => {
item.stock_num = item.product_num
})
this.productList = row.orderProduct
- this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0
+ this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0
delete this.shipment.order_id
- if(this.tableFrom.order_type == 2)this.shipment.delivery_type = 3
+ // if (this.tableFrom.order_type == 2) this.shipment.delivery_type = 3
},
sendReset() {
this.shipment = {
@@ -1186,13 +1145,13 @@ export default {
this.shipment.delivery_name = this.shipment.to_name
this.shipment.delivery_id = this.shipment.to_phone
}
- if(this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2){
+ if (this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2) {
if (!this.multipleSelection.length) {
return this.$message.warning('请选择拆单商品!')
}
const data = []
this.multipleSelection.map((item) => {
- data.push({id:item.order_product_id,num:item.product_num_input})
+ data.push({ id: item.order_product_id, num: item.product_num_input })
})
this.ids = data
this.shipment.split = this.ids
@@ -1207,7 +1166,7 @@ export default {
this.sendVisible = false
this.$message.success(res.message)
this.getList('')
- if(this.drawer)this.$refs.orderDetail.getInfo(id);
+ if (this.drawer) this.$refs.orderDetail.getInfo(id);
// this.$refs[name].resetFields()
this.sendReset()
}).catch(({ message }) => {
@@ -1218,7 +1177,7 @@ export default {
this.$message.success(res.message)
this.getList('')
// this.$refs[name].resetFields()
- if(this.drawer)this.$refs.orderDetail.getInfo(id);
+ if (this.drawer) this.$refs.orderDetail.getInfo(id);
this.sendReset()
//修改增加打印机打印
if (res.data.label) this.printImg(res.data.label);
@@ -1295,25 +1254,30 @@ export default {