对公类型
This commit is contained in:
parent
45d309ea7e
commit
956e673f25
@ -30,6 +30,7 @@ class Dicts extends Repository
|
||||
'logistics' => ['sf' => '顺丰速运', 'sto' => '申通快递','yto' => '圆通速递', 'zto' => '中通快递', 'best' => '百世快递', 'yunda' => '韵达快递', 'ttkd'=> '天天快递', 'ems' => 'EMS邮政特快专递'],
|
||||
'export_status' => ['准备中', '写入中', '保存中', '已完成', '导出失败', '文件丢失'],
|
||||
'shares' => ['未知', '纵向共享', '横向共享'],
|
||||
'business_type' => ['对私', '对公'],
|
||||
];
|
||||
|
||||
public function __construct()
|
||||
|
@ -20,6 +20,8 @@ class AddedOrderSync extends Command
|
||||
|
||||
protected $chunks = 1000;
|
||||
|
||||
protected $business_type = ['3875569' => 0, '9632627' => 1];
|
||||
|
||||
protected $types;
|
||||
|
||||
protected $tables = [
|
||||
@ -123,6 +125,7 @@ class AddedOrderSync extends Command
|
||||
|
||||
$select = [
|
||||
'sn',
|
||||
'account_no',
|
||||
'status',
|
||||
'custom_no as company_id',
|
||||
'transaction_no',
|
||||
@ -133,6 +136,7 @@ class AddedOrderSync extends Command
|
||||
|
||||
$orders = DB::connection('real')->table('jxc_custom_order')->select($select)->whereIn('status', [3, 7, 8])
|
||||
->whereIn('custom_no', $this->companies->keys())
|
||||
->whereIn('account_no', array_keys($this->business_type))
|
||||
->where('create_time', '>=', $starttime->timestamp)
|
||||
->where('create_time', '<=', $endtime->timestamp)
|
||||
->orderBy('create_time')->get()->collect()->toArray();
|
||||
@ -140,12 +144,14 @@ class AddedOrderSync extends Command
|
||||
$array = [];
|
||||
|
||||
foreach ($orders as $item) {
|
||||
$item['business_type'] = $this->business_type[$item['account_no']];
|
||||
$item['company_id'] = $this->companies[$item['company_id']]['id'] ?? 0;
|
||||
$item['pay_channel'] = CommonService::transformerPayChannel($item['pay_channel']);
|
||||
$item['order_at'] = date('Y-m-d H:i:s', $item['order_at']);
|
||||
$item['created_at'] = $item['order_at'];
|
||||
$item['updated_at'] = ($item['updated_at'] == '0000-00-00 00:00:00') ? $item['order_at'] : $item['updated_at'];
|
||||
$item['deleted_at'] = $item['status'] === 3 ? null : $item['updated_at'];
|
||||
unset($item['account_no']);
|
||||
unset($item['status']);
|
||||
$array[] = $item;
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ class OrderController extends Controller
|
||||
return $item->only([
|
||||
'id',
|
||||
'sn',
|
||||
'business_type',
|
||||
'business_type_name',
|
||||
'company_id',
|
||||
'package_id',
|
||||
'carrier_operator',
|
||||
|
@ -39,6 +39,7 @@ class OrderService extends Service
|
||||
$limit = $conditions['limit'] ?? 10;
|
||||
|
||||
$carrierOperators = app(Dicts::class)->get('carrier_operator');
|
||||
$businessTypes = app(Dicts::class)->get('business_type');
|
||||
|
||||
$res = $this->orderRepository->withConditions($conditions)->applyConditions()->paginate($limit);
|
||||
|
||||
@ -52,7 +53,8 @@ class OrderService extends Service
|
||||
->groupBy('order_id')->get()->keyBy('order_id')->toArray();
|
||||
}
|
||||
|
||||
$res->map(function ($item) use ($carrierOperators, $cards) {
|
||||
$res->map(function ($item) use ($carrierOperators, $businessTypes, $cards) {
|
||||
$item->business_type_name = $businessTypes[$item->business_type] ?? '';
|
||||
$item->pay_channel_name = CommonService::namePayChannel($item->pay_channel);
|
||||
$item->company_name = CommonService::company($item->company_id)['name'];
|
||||
$item->package = CommonService::package($item->package_id);
|
||||
@ -121,6 +123,7 @@ class OrderService extends Service
|
||||
|
||||
$item['company_name'] = !$item['company_id'] ? '' : $companyService->load($item['company_id'])['name'] ?? '';
|
||||
$item['package_name'] = !$item['package_id'] ? '' : $packageService->load($item['package_id'])['name'] ?? '';
|
||||
$item['package_sn'] = !$item['package_id'] ? '' : $packageService->load($item['package_id'])['sn'] ?? '';
|
||||
}
|
||||
|
||||
return array_values(array_sort($cards, function ($value) {
|
||||
|
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddBusinessTypeToRealOrders extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('real_orders', function (Blueprint $table) {
|
||||
$table->tinyInteger('business_type')->unsigned()->default(0)->comment('业务类型(0:对私 1:对公)')->after('type');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('real_orders', function (Blueprint $table) {
|
||||
$table->dropColumn('business_type');
|
||||
});
|
||||
}
|
||||
}
|
@ -5,8 +5,8 @@
|
||||
<script>
|
||||
export default {
|
||||
components: {
|
||||
themeOne: resolve => require(['views/layout/theme/one'], resolve),
|
||||
themeTwo: resolve => require(['views/layout/theme/two'], resolve)
|
||||
themeOne: resolve => require(["views/layout/theme/one"], resolve),
|
||||
themeTwo: resolve => require(["views/layout/theme/two"], resolve)
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
@ -21,14 +21,14 @@ export default {
|
||||
// console.log(data);
|
||||
// 设置左侧菜单高亮和菜单展开项
|
||||
const mids = data.map(item => Number(item.id)).filter(id => id);
|
||||
this.$store.commit('SET_ACTIVES', this.deepClone(mids));
|
||||
this.$store.commit("SET_ACTIVES", this.deepClone(mids));
|
||||
}
|
||||
},
|
||||
tagnavs: {
|
||||
deep: true,
|
||||
handler(data) {
|
||||
// 设置缓存页面
|
||||
this.$store.dispatch('getCachPage');
|
||||
this.$store.dispatch("getCachPage");
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -41,7 +41,7 @@ export default {
|
||||
if (mid !== undefined) {
|
||||
this.menuChange(mid);
|
||||
}
|
||||
this.$store.dispatch('getCurrentNodes'); // 获取当前页面操作按钮
|
||||
this.$store.dispatch("getCurrentNodes"); // 获取当前页面操作按钮
|
||||
this.getBreadcrumb();
|
||||
},
|
||||
|
||||
@ -50,10 +50,12 @@ export default {
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
indexPermissions() {
|
||||
this.$store.dispatch('getSiteInfo').then(res => {
|
||||
this.$store.dispatch("getSiteInfo").then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$nextTick(() => {
|
||||
// 渲染页面数据
|
||||
this.init();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -90,14 +92,14 @@ export default {
|
||||
params: this.deepClone(route.params),
|
||||
title: cur_permission ? cur_permission.title : route.meta.title
|
||||
};
|
||||
this.$store.commit('SET_TAGNAVS', obj);
|
||||
this.$store.commit("SET_TAGNAVS", obj);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 获取面包屑
|
||||
getBreadcrumb() {
|
||||
this.$store.dispatch('getBreadcrumb');
|
||||
this.$store.dispatch("getBreadcrumb");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -11,33 +11,43 @@
|
||||
<div class="page-handle-wrap">
|
||||
<div class="search-wrap">
|
||||
<ul class="handle-wraper">
|
||||
<li class="handle-item w-250">
|
||||
<li class="handle-item w-200">
|
||||
<Input clearable placeholder="订单编号" v-model.trim="params.sn"></Input>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<li class="handle-item w-200">
|
||||
<Input clearable placeholder="流水号" v-model.trim="params.transaction_no"></Input>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<Select clearable placeholder="支付方式" v-model="params.pay_channel_name">
|
||||
<Option :value="'银行转账'">银行转账</Option>
|
||||
<Option :value="'微信支付'">微信支付</Option>
|
||||
<Option :value="'支付宝'">支付宝</Option>
|
||||
<Option :value="'余额支付'">余额支付</Option>
|
||||
<Option :value="'天猫续费'">天猫续费</Option>
|
||||
<li class="handle-item w-200">
|
||||
<Select placeholder="企业名称" v-model="params.company_name" clearable filterable>
|
||||
<Option
|
||||
:key="index"
|
||||
:value="item ? item : ''"
|
||||
v-for="(item, index) in real_companies"
|
||||
>{{ item }}</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<Select clearable placeholder="使用状态" v-model="params.used">
|
||||
<Option :value="0">未使用</Option>
|
||||
<Option :value="1">部分可用</Option>
|
||||
<Option :value="2">不可用</Option>
|
||||
<li class="handle-item w-200">
|
||||
<Select clearable placeholder="运营商" v-model="params.carrier_operator">
|
||||
<Option :value="0">联通</Option>
|
||||
<Option :value="1">移动</Option>
|
||||
<Option :value="2">电信</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<li class="handle-item w-200">
|
||||
<Select placeholder="套餐名称" v-model="params.package_name" clearable filterable>
|
||||
<Option
|
||||
:key="index"
|
||||
:value="item ? item : ''"
|
||||
v-for="(item, index) in real_packages"
|
||||
>{{ item }}</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-200">
|
||||
<DatePicker
|
||||
:editable="false"
|
||||
placeholder="请选择时间"
|
||||
@ -50,35 +60,32 @@
|
||||
</ul>
|
||||
|
||||
<ul class="handle-wraper">
|
||||
<li class="handle-item w-250">
|
||||
<Select placeholder="企业名称" v-model="params.company_name" clearable filterable>
|
||||
<Option
|
||||
:key="index"
|
||||
:value="item ? item : ''"
|
||||
v-for="(item, index) in real_companies"
|
||||
>{{ item }}</Option>
|
||||
<li class="handle-item w-200" v-if="type !== 0">
|
||||
<Select clearable placeholder="业务类型" v-model="params.business_type">
|
||||
<Option :value="0">对私</Option>
|
||||
<Option :value="1">对公</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<Select clearable placeholder="运营商" v-model="params.carrier_operator">
|
||||
<Option :value="0">联通</Option>
|
||||
<Option :value="1">移动</Option>
|
||||
<Option :value="2">电信</Option>
|
||||
<li class="handle-item w-200">
|
||||
<Select clearable placeholder="支付方式" v-model="params.pay_channel_name">
|
||||
<Option :value="'银行转账'">银行转账</Option>
|
||||
<Option :value="'微信支付'">微信支付</Option>
|
||||
<Option :value="'支付宝'">支付宝</Option>
|
||||
<Option :value="'余额支付'">余额支付</Option>
|
||||
<Option :value="'天猫续费'">天猫续费</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<Select placeholder="套餐名称" v-model="params.package_name" clearable filterable>
|
||||
<Option
|
||||
:key="index"
|
||||
:value="item ? item : ''"
|
||||
v-for="(item, index) in real_packages"
|
||||
>{{ item }}</Option>
|
||||
<li class="handle-item w-200">
|
||||
<Select clearable placeholder="使用状态" v-model="params.used">
|
||||
<Option :value="0">未使用</Option>
|
||||
<Option :value="1">部分可用</Option>
|
||||
<Option :value="2">不可用</Option>
|
||||
</Select>
|
||||
</li>
|
||||
|
||||
<li class="handle-item w-250">
|
||||
<li class="handle-item w-200">
|
||||
<Input placeholder="SIM" type="textarea" v-model="params.sim"/>
|
||||
</li>
|
||||
|
||||
@ -110,11 +117,7 @@
|
||||
</Tooltip>
|
||||
</Checkbox>
|
||||
|
||||
<Checkbox
|
||||
v-model="vdChecked"
|
||||
v-if="orderObj && type != 0"
|
||||
@on-change="index(1)"
|
||||
>
|
||||
<Checkbox v-model="vdChecked" v-if="orderObj && type != 0" @on-change="index(1)">
|
||||
<Tooltip content="仅筛选含有相同VD企业卡的订单">
|
||||
<span class="fz-12">过滤VD企业</span>
|
||||
</Tooltip>
|
||||
@ -161,7 +164,7 @@
|
||||
></Table>
|
||||
<ul class="common-tips-wraper umar-t5">
|
||||
<li class="t-title">提示</li>
|
||||
<li class="t-content">双击可以查看订单卡详情数据并标亮</li>
|
||||
<li class="t-content">双击可以查看订单卡详情数据</li>
|
||||
</ul>
|
||||
|
||||
<div class="page-turn-wrap" v-if="orders">
|
||||
|
@ -71,6 +71,7 @@ export default {
|
||||
carrier_operator: "",
|
||||
transaction_no: "",
|
||||
pay_channel_name: "",
|
||||
business_type: "",
|
||||
time: [
|
||||
this.moment()
|
||||
.subtract("1", "months")
|
||||
@ -142,6 +143,18 @@ export default {
|
||||
html.push(h("Row", { class: [] }, col));
|
||||
}
|
||||
|
||||
if (this.type !== 0) {
|
||||
col = [];
|
||||
col.push(
|
||||
h(
|
||||
"Col",
|
||||
{ props: { span: 16 }, class: [] },
|
||||
"业务类型: " + row.business_type_name
|
||||
)
|
||||
);
|
||||
html.push(h("Row", { class: [] }, col));
|
||||
}
|
||||
|
||||
return h("div", { class: ["fz-13"] }, html);
|
||||
}
|
||||
},
|
||||
@ -413,6 +426,11 @@ export default {
|
||||
title: "VD套餐",
|
||||
key: "package_name",
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: "VD套餐编号",
|
||||
key: "package_sn",
|
||||
width: 150
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -553,6 +571,15 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
this.params.business_type !== "" &&
|
||||
this.params.business_type !== undefined
|
||||
) {
|
||||
filterOrders = filterOrders.filter(el => {
|
||||
return el.business_type === this.params.business_type;
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
this.params.carrier_operator !== "" &&
|
||||
this.params.carrier_operator !== undefined
|
||||
@ -610,6 +637,7 @@ export default {
|
||||
carrier_operator: "",
|
||||
transaction_no: "",
|
||||
pay_channel_name: "",
|
||||
business_type: "",
|
||||
time: [
|
||||
this.moment()
|
||||
.subtract("1", "months")
|
||||
@ -644,11 +672,17 @@ export default {
|
||||
{ title: "订单时间", key: "order_at" },
|
||||
{ title: "SIM", key: "sim" },
|
||||
{ title: "数量", key: "counts" },
|
||||
{ title: "订单金额", key: "total_price" },
|
||||
{ title: "使用状态", key: "virtual_order_id" },
|
||||
{ title: "VD企业", key: "virtual_company_name" },
|
||||
{ title: "VD套餐", key: "virtual_package_name" }
|
||||
{ title: "VD套餐", key: "virtual_package_name" },
|
||||
{ title: "VD编号", key: "virtual_package_sn" }
|
||||
];
|
||||
|
||||
if (this.type !== 0) {
|
||||
columns.splice(5, 0, { title: "业务类型", key: "business_type_name" });
|
||||
}
|
||||
|
||||
if (this.type === 0) {
|
||||
columns.push({ title: "退货", key: "refunded" });
|
||||
}
|
||||
@ -677,11 +711,17 @@ export default {
|
||||
order_at: order.order_at,
|
||||
sim: element.sim + "\t",
|
||||
counts: element.counts,
|
||||
total_price: element.total_price,
|
||||
virtual_order_id: element.virtual_order_id ? "已使用" : "未使用",
|
||||
virtual_company_name: element.company_name,
|
||||
virtual_package_name: element.package_name
|
||||
virtual_package_name: element.package_name,
|
||||
virtual_package_sn: element.package_sn
|
||||
};
|
||||
|
||||
if (this.type !== 0) {
|
||||
obj.business_type_name = order.business_type_name;
|
||||
}
|
||||
|
||||
if (this.type === 0) {
|
||||
obj.refunded = element.refunded_at ? "是" : "否";
|
||||
}
|
||||
|
@ -301,6 +301,8 @@ export default {
|
||||
this.groupIndex = index;
|
||||
this.group = item;
|
||||
|
||||
this.setParamsByReal(item);
|
||||
|
||||
this.params.counts = item.reduce((acc, cur) => {
|
||||
return acc + cur.counts;
|
||||
}, 0);
|
||||
@ -311,8 +313,6 @@ export default {
|
||||
this.params.package_id = item[0].package_id;
|
||||
}
|
||||
|
||||
this.setParamsByReal(item);
|
||||
|
||||
this.handleChange(2);
|
||||
},
|
||||
setParamsByReal(array) {
|
||||
|
2
public/css/chunk-2cc41ab2.bcb99373.css
Normal file
2
public/css/chunk-2cc41ab2.bcb99373.css
Normal file
File diff suppressed because one or more lines are too long
1
public/js/app.aa6d2b39.js
Normal file
1
public/js/app.aa6d2b39.js
Normal file
File diff suppressed because one or more lines are too long
14
public/js/chunk-2cc41ab2.617b73d2.js
Normal file
14
public/js/chunk-2cc41ab2.617b73d2.js
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-6fbb1fdb.915b8cee.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.d130b440.js rel=prefetch><link href=/js/chunk-07a274ec.55e1b3b0.js rel=prefetch><link href=/js/chunk-6fbb1fdb.df330944.js rel=prefetch><link href=/js/chunk-996b1e80.92847c4e.js rel=prefetch><link href=/css/app.8e379248.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.71974a6d.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.8e379248.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.71974a6d.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-2cc41ab2.bcb99373.css rel=prefetch><link href=/css/chunk-996b1e80.5cadf3d0.css rel=prefetch><link href=/js/chunk-00ae0766.d130b440.js rel=prefetch><link href=/js/chunk-07a274ec.55e1b3b0.js rel=prefetch><link href=/js/chunk-2cc41ab2.617b73d2.js rel=prefetch><link href=/js/chunk-996b1e80.92847c4e.js rel=prefetch><link href=/css/app.8e379248.css rel=preload as=style><link href=/css/chunk-vendors.3c3b2e85.css rel=preload as=style><link href=/js/app.aa6d2b39.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.8e379248.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.aa6d2b39.js></script></body></html>
|
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'AccountSeeder' => $baseDir . '/database/seeds/AccountSeeder.php',
|
||||
'AddBusinessTypeToRealOrders' => $baseDir . '/database/migrations/2019_04_16_110601_add_business_type_to_real_orders.php',
|
||||
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
'CompanyAccountSeeder' => $baseDir . '/database/seeds/CompanyAccountSeeder.php',
|
||||
|
1
vendor/composer/autoload_static.php
vendored
1
vendor/composer/autoload_static.php
vendored
@ -726,6 +726,7 @@ class ComposerStaticInite79258a3e34ad3e251999111d9f334d9
|
||||
|
||||
public static $classMap = array (
|
||||
'AccountSeeder' => __DIR__ . '/../..' . '/database/seeds/AccountSeeder.php',
|
||||
'AddBusinessTypeToRealOrders' => __DIR__ . '/../..' . '/database/migrations/2019_04_16_110601_add_business_type_to_real_orders.php',
|
||||
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
|
||||
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
|
||||
'CompanyAccountSeeder' => __DIR__ . '/../..' . '/database/seeds/CompanyAccountSeeder.php',
|
||||
|
Loading…
x
Reference in New Issue
Block a user