一些修正
This commit is contained in:
parent
d3711a5010
commit
b4c2c91557
@ -46,7 +46,7 @@ class OrderController extends Controller
|
|||||||
return [
|
return [
|
||||||
'id' => $item->id,
|
'id' => $item->id,
|
||||||
'sn' => $item->sn,
|
'sn' => $item->sn,
|
||||||
'package_name' => $item->package->name,
|
'package_name' => $item->package['name'],
|
||||||
'pay_channel' => CommonService::namePayChannel($item->pay_channel),
|
'pay_channel' => CommonService::namePayChannel($item->pay_channel),
|
||||||
'carrier_operator' => $carrierOperators[$item->package->carrier_operator],
|
'carrier_operator' => $carrierOperators[$item->package->carrier_operator],
|
||||||
'unit_price' => $item->unit_price,
|
'unit_price' => $item->unit_price,
|
||||||
|
@ -58,13 +58,13 @@ class OrderController extends Controller
|
|||||||
'sn' => $item->sn,
|
'sn' => $item->sn,
|
||||||
'transaction_no' => $item->transaction_no,
|
'transaction_no' => $item->transaction_no,
|
||||||
'package_id' => $item->package_id,
|
'package_id' => $item->package_id,
|
||||||
'package_name' => $item->package->name,
|
'package_name' => $item->package['name'],
|
||||||
'company_id' => $item->company_id,
|
'company_id' => $item->company_id,
|
||||||
'company_name' => $item->company->name,
|
'company_name' => $item->company['name'],
|
||||||
'pay_channel' => $item->pay_channel,
|
'pay_channel' => $item->pay_channel,
|
||||||
'pay_channel_name' => CommonService::namePayChannel($item->pay_channel),
|
'pay_channel_name' => CommonService::namePayChannel($item->pay_channel),
|
||||||
'carrier_operator' => $item->package->carrier_operator,
|
'carrier_operator' => $item->package['carrier_operator'],
|
||||||
'carrier_operator_name' => $carrierOperators[$item->package->carrier_operator],
|
'carrier_operator_name' => $carrierOperators[$item->package['carrier_operator']],
|
||||||
'unit_price' => $item->unit_price,
|
'unit_price' => $item->unit_price,
|
||||||
'counts' => $item->counts,
|
'counts' => $item->counts,
|
||||||
'total_price' => $item->total_price,
|
'total_price' => $item->total_price,
|
||||||
|
@ -140,6 +140,8 @@ class OrderService extends Service
|
|||||||
|
|
||||||
if (isset($attributes['unit_price'])) {
|
if (isset($attributes['unit_price'])) {
|
||||||
$attributes['unit_price'] = intval($attributes['unit_price'] * 100);
|
$attributes['unit_price'] = intval($attributes['unit_price'] * 100);
|
||||||
|
$attributes['total_price'] = $attributes['unit_price'] * $attributes['counts'];
|
||||||
|
$attributes['custom_price'] = $attributes['unit_price'] * $attributes['counts'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$attributes['id']) {
|
if (!$attributes['id']) {
|
||||||
@ -223,6 +225,12 @@ class OrderService extends Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->orderRepository->setModel($node)->update($attributes);
|
$this->orderRepository->setModel($node)->update($attributes);
|
||||||
|
|
||||||
|
if (isset($attributes['unit_price'])) {
|
||||||
|
$this->orderCardPartitionRepository->where('type', $node->type)->where('order_id', $node->id)->update([
|
||||||
|
'unit_price' => $attributes['unit_price'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$maxId = Order::withTrashed()->max('id');
|
$maxId = Order::withTrashed()->max('id');
|
||||||
$attributes['id'] = ++$maxId;
|
$attributes['id'] = ++$maxId;
|
||||||
@ -231,7 +239,7 @@ class OrderService extends Service
|
|||||||
throw new NotAllowedException('非法操作');
|
throw new NotAllowedException('非法操作');
|
||||||
}
|
}
|
||||||
|
|
||||||
$attributes['price'] = $product->price;
|
$attributes['unit_price'] = $product->price;
|
||||||
$attributes['total_price'] = $attributes['unit_price'] * $attributes['counts'];
|
$attributes['total_price'] = $attributes['unit_price'] * $attributes['counts'];
|
||||||
$attributes['custom_price'] = $attributes['unit_price'] * $attributes['counts'];
|
$attributes['custom_price'] = $attributes['unit_price'] * $attributes['counts'];
|
||||||
$attributes['order_at'] = $attributes['order_at'] ?? date('Y-m-d H:i:s');
|
$attributes['order_at'] = $attributes['order_at'] ?? date('Y-m-d H:i:s');
|
||||||
|
@ -85,8 +85,8 @@
|
|||||||
<Option :value="'bank'">银行转账</Option>
|
<Option :value="'bank'">银行转账</Option>
|
||||||
<Option :value="'wx'">微信支付</Option>
|
<Option :value="'wx'">微信支付</Option>
|
||||||
<Option :value="'alipay'">支付宝</Option>
|
<Option :value="'alipay'">支付宝</Option>
|
||||||
<Option :value="'account'">余额支付</Option>
|
<!-- <Option :value="'account'">余额支付</Option> -->
|
||||||
<Option :value="'tmall'">天猫续费</Option>
|
<!-- <Option :value="'tmall'">天猫续费</Option> -->
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@ -113,10 +113,11 @@
|
|||||||
<Col span="12">
|
<Col span="12">
|
||||||
<li class="ui-list">
|
<li class="ui-list">
|
||||||
<div class="ui-list-title">
|
<div class="ui-list-title">
|
||||||
<span class="title-require">*</span>订单卡量
|
<span class="title-require">*</span>订单量
|
||||||
</div>
|
</div>
|
||||||
<div class="ui-list-content">
|
<div class="ui-list-content">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
|
:disabled="data ? true : false"
|
||||||
v-if="!counts"
|
v-if="!counts"
|
||||||
:max="100000"
|
:max="100000"
|
||||||
:min="1"
|
:min="1"
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<Input clearable placeholder="流水号" v-model.trim="params.transaction_no"></Input>
|
<Input clearable placeholder="流水号" v-model.trim="params.transaction_no"></Input>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="handle-item w-120" v-if="type === 0">
|
<li class="handle-item w-250" v-if="type === 0">
|
||||||
<Select clearable placeholder="订单状态" v-model="params.order_status">
|
<Select clearable placeholder="订单状态" v-model="params.order_status">
|
||||||
<Option :value="0">已下单</Option>
|
<Option :value="0">已下单</Option>
|
||||||
<Option :value="1">已取消</Option>
|
<Option :value="1">已取消</Option>
|
||||||
@ -57,21 +57,23 @@
|
|||||||
</Select>
|
</Select>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="handle-item w-120" v-if="type === 0">
|
<!--
|
||||||
|
<li class="handle-item w-250" v-if="type === 0">
|
||||||
<Select clearable placeholder="收款状态" v-model="params.transaction_status">
|
<Select clearable placeholder="收款状态" v-model="params.transaction_status">
|
||||||
<Option :value="0">未收款</Option>
|
<Option :value="0">未收款</Option>
|
||||||
<Option :value="1">已收款</Option>
|
<Option :value="1">已收款</Option>
|
||||||
<Option :value="2">已退款</Option>
|
<Option :value="2">已退款</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</li>
|
</li>
|
||||||
|
-->
|
||||||
|
|
||||||
<li class="handle-item w-250">
|
<li class="handle-item w-250">
|
||||||
<Select clearable placeholder="支付方式" v-model="params.pay_channel">
|
<Select clearable placeholder="支付方式" v-model="params.pay_channel">
|
||||||
<Option :value="'bank'">银行转账</Option>
|
<Option :value="'bank'">银行转账</Option>
|
||||||
<Option :value="'wx'">微信支付</Option>
|
<Option :value="'wx'">微信支付</Option>
|
||||||
<Option :value="'alipay'">支付宝</Option>
|
<Option :value="'alipay'">支付宝</Option>
|
||||||
<Option :value="'account'">余额支付</Option>
|
<!-- <Option :value="'account'">余额支付</Option> -->
|
||||||
<Option :value="'tmall'">天猫续费</Option>
|
<!-- <Option :value="'tmall'">天猫续费</Option> -->
|
||||||
</Select>
|
</Select>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.params.counts) {
|
if (!this.params.counts) {
|
||||||
return this.$Message.info('请输入订单卡量');
|
return this.$Message.info('请输入订单量');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.params.order_at) {
|
if (!this.params.order_at) {
|
||||||
@ -210,6 +210,7 @@ export default {
|
|||||||
this.params.counts = 0;
|
this.params.counts = 0;
|
||||||
this.params.area = [];
|
this.params.area = [];
|
||||||
this.my_show = false;
|
this.my_show = false;
|
||||||
|
this.groupIndex = '';
|
||||||
},
|
},
|
||||||
handleChange(type) {
|
handleChange(type) {
|
||||||
this.initCompletePackages().then(packages => {
|
this.initCompletePackages().then(packages => {
|
||||||
@ -231,7 +232,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof(this.params.carrier_operator) === 'number') {
|
if (typeof this.params.carrier_operator === 'number') {
|
||||||
packages = packages.filter(item => {
|
packages = packages.filter(item => {
|
||||||
return item.carrier_operator === this.params.carrier_operator;
|
return item.carrier_operator === this.params.carrier_operator;
|
||||||
});
|
});
|
||||||
@ -293,16 +294,19 @@ export default {
|
|||||||
case '支付宝':
|
case '支付宝':
|
||||||
this.params.pay_channel = 'alipay';
|
this.params.pay_channel = 'alipay';
|
||||||
break;
|
break;
|
||||||
case '余额支付':
|
// case '余额支付':
|
||||||
this.params.pay_channel = 'account';
|
// this.params.pay_channel = 'account';
|
||||||
break;
|
// break;
|
||||||
case '天猫续费':
|
// case '天猫续费':
|
||||||
this.params.pay_channel = 'tmall';
|
// this.params.pay_channel = 'tmall';
|
||||||
break;
|
// break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.params.carrier_operator = order.carrier_operator;
|
||||||
|
this.params.unit_price = order.unit_price;
|
||||||
|
|
||||||
this.params.order_at = order.order_at;
|
this.params.order_at = order.order_at;
|
||||||
this.params.transaction_no = order.transaction_no;
|
this.params.transaction_no = order.transaction_no;
|
||||||
this.params.contacts = order.contacts;
|
this.params.contacts = order.contacts;
|
||||||
|
@ -19,7 +19,10 @@ export default {
|
|||||||
carrier_operator: '',
|
carrier_operator: '',
|
||||||
trashed: '',
|
trashed: '',
|
||||||
sim: '',
|
sim: '',
|
||||||
time: []
|
time: [
|
||||||
|
this.moment().subtract('1', 'months').startOf('month').format('YYYY-MM-DD'),
|
||||||
|
this.moment().subtract('1', 'months').endOf('month').format('YYYY-MM-DD')
|
||||||
|
]
|
||||||
},
|
},
|
||||||
type: 0,
|
type: 0,
|
||||||
list_data: null,
|
list_data: null,
|
||||||
@ -35,7 +38,7 @@ export default {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
show: false
|
show: true
|
||||||
},
|
},
|
||||||
row: {}, // 当前行
|
row: {}, // 当前行
|
||||||
orderConfirmShow: false,
|
orderConfirmShow: false,
|
||||||
@ -579,6 +582,8 @@ export default {
|
|||||||
this.index(1);
|
this.index(1);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.table_titles.splice(10, 1); // 隐藏收款状态
|
||||||
|
|
||||||
if (this.type === 0) {
|
if (this.type === 0) {
|
||||||
this.table_titles.splice(7, 0, {
|
this.table_titles.splice(7, 0, {
|
||||||
title: '退货量',
|
title: '退货量',
|
||||||
@ -588,7 +593,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.type !== 0) {
|
if (this.type !== 0) {
|
||||||
this.table_titles.splice(9, 2);
|
this.table_titles.splice(9, 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -625,12 +630,14 @@ export default {
|
|||||||
|
|
||||||
API.exportOrders(params).then(res => {
|
API.exportOrders(params).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.downloadFile(res.data);
|
if (res.data) {
|
||||||
} else {
|
this.downloadFile(res.data);
|
||||||
this.$Modal.success({
|
} else {
|
||||||
title: '提示',
|
this.$Modal.success({
|
||||||
content: '当前导出数据量大,已进入后台队列导出模式,请稍后至导出列表查看下载。'
|
title: '提示',
|
||||||
});
|
content: '当前导出数据量大,已进入后台队列导出模式,请稍后至导出列表查看下载。'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.isShowLoading(false);
|
this.isShowLoading(false);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -682,7 +689,10 @@ export default {
|
|||||||
resetSearch() {
|
resetSearch() {
|
||||||
for (let k in this.params) {
|
for (let k in this.params) {
|
||||||
if (k === 'time') {
|
if (k === 'time') {
|
||||||
this.params[k] = [];
|
this.params[k] = [
|
||||||
|
this.moment().subtract('1', 'months').startOf('month').format('YYYY-MM-DD'),
|
||||||
|
this.moment().subtract('1', 'months').endOf('month').format('YYYY-MM-DD')
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
this.params[k] = '';
|
this.params[k] = '';
|
||||||
}
|
}
|
||||||
|
2
public/js/app.5a483cca.js
Normal file
2
public/js/app.5a483cca.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.5a483cca.js.map
Normal file
1
public/js/app.5a483cca.js.map
Normal file
File diff suppressed because one or more lines are too long
2
public/js/chunk-7a0075e3.b3690026.js
Normal file
2
public/js/chunk-7a0075e3.b3690026.js
Normal file
File diff suppressed because one or more lines are too long
1
public/js/chunk-7a0075e3.b3690026.js.map
Normal file
1
public/js/chunk-7a0075e3.b3690026.js.map
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-7a0075e3.b9f7c25b.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-7a0075e3.998d6baa.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.c357cc09.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.c357cc09.js></script></body></html>
|
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=\favicon.ico><script src=\config.js></script><title></title><link href=/css/chunk-7a0075e3.b9f7c25b.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.3874cd10.js rel=prefetch><link href=/js/chunk-07a274ec.c3ad5dec.js rel=prefetch><link href=/js/chunk-7a0075e3.b3690026.js rel=prefetch><link href=/js/chunk-996b1e80.d3b45e46.js rel=prefetch><link href=/css/app.d71a8195.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.5a483cca.js rel=preload as=script><link href=/js/chunk-vendors.ed6443e8.js rel=preload as=script><link href=/css/chunk-vendors.3c3b2e85.css rel=stylesheet><link href=/css/app.d71a8195.css rel=stylesheet></head><body><noscript><strong>很抱歉,如果没有启用JavaScript,程序不能正常工作,若要继续使用请启用它。</strong></noscript><div id=app></div><script src=/js/chunk-vendors.ed6443e8.js></script><script src=/js/app.5a483cca.js></script></body></html>
|
Loading…
x
Reference in New Issue
Block a user