Merge remote-tracking branch 'origin/feature/hant' into feature/hant

This commit is contained in:
hant 2025-07-11 00:08:44 +08:00
commit a7c8c023a8
30 changed files with 432 additions and 137 deletions

View File

@ -48,7 +48,8 @@ class OrderDispatchLog
'type' => 1, 'type' => 1,
'outid' => md5(time().rand(1000,9999).rand(1000,9999)), 'outid' => md5(time().rand(1000,9999).rand(1000,9999)),
'create_time' => date('Y-m-d H:i:s'), 'create_time' => date('Y-m-d H:i:s'),
'status' => $alibaba_dyvms['sync']?1:0 'status' => $alibaba_dyvms['sync']?1:0,
'mobile' => $dispatch->worker_tel,
]; ];
$service = new NoticeLogic(); $service = new NoticeLogic();
$service->dispatchNotice($dispatch); $service->dispatchNotice($dispatch);

View File

@ -374,6 +374,6 @@ class Ajax extends Backend
public function getItems(){ public function getItems(){
return $items = \app\admin\model\Item::where('level',1)->field('id,title as name')->select(); return $items = \app\admin\model\Item::where('level',1)->field('id,title as name')->order('sort','desc')->select();
} }
} }

View File

@ -177,6 +177,11 @@ class Order extends Backend
]) ])
->where($where); ->where($where);
$filter = (array)json_decode(input()['filter'] ?? '', true); $filter = (array)json_decode(input()['filter'] ?? '', true);
if(isset($filter['audit_time'])){
$build->where('status',\app\admin\model\Order::STATUS_FINISHED);
}
$admin_filter = $filter['user.nickname'] ?? false; $admin_filter = $filter['user.nickname'] ?? false;
$area_id = $filter['area_id'] ?? false; $area_id = $filter['area_id'] ?? false;
$item_id = $filter['item_id'] ?? false; $item_id = $filter['item_id'] ?? false;
@ -252,6 +257,10 @@ class Order extends Backend
}else{ }else{
$item->source_total_name = ($item->getRelation('source')->title??''); $item->source_total_name = ($item->getRelation('source')->title??'');
} }
if($item->status <60){
$item->audit_time = null;
}
unset($item->source); unset($item->source);
} }
$result = ['total' => $list->total(), 'rows' => $list->items()]; $result = ['total' => $list->total(), 'rows' => $list->items()];
@ -327,6 +336,7 @@ class Order extends Backend
$params['create_time'] = date('Y-m-d H:i:s'); $params['create_time'] = date('Y-m-d H:i:s');
$params['update_time'] = date('Y-m-d H:i:s'); $params['update_time'] = date('Y-m-d H:i:s');
$params['receive_type'] = $params['receive_type']?: 1; $params['receive_type'] = $params['receive_type']?: 1;
$params['audit_time'] = date('Y-m-d H:i:s');
$result = $this->model->allowField(true)->save($params); $result = $this->model->allowField(true)->save($params);
$auth = clone $this->auth; $auth = clone $this->auth;
@ -627,14 +637,16 @@ class Order extends Backend
'update_time' => now()->format('Y-m-d H:m:s'), 'update_time' => now()->format('Y-m-d H:m:s'),
]; ];
$orderDispatch = OrderDispatch::where('order_id',$order->id)->whereBetween('status','>=',0)->find();
if ($params['abnormal_id'] == 2 || $params['abnormal_id'] == 3) { if ($params['abnormal_id'] == 2 || $params['abnormal_id'] == 3) {
$order->status = \app\admin\model\Order::STATUS_CANCEL; $order->status = \app\admin\model\Order::STATUS_CANCEL;
$order->save(); $order->save();
if (!empty($order->dispatch->id)) {
if (!empty($orderDispatch)) {
$orderLogic = new OrderLogic(); $orderLogic = new OrderLogic();
$orderLogic->cancelOrderDispatch($order->dispatch, $this->auth, '订单被取消', false); $orderLogic->cancelOrderDispatch($orderDispatch, $this->auth, '订单被取消', false);
//日志 //日志
$hookparams['order'] = $order; $hookparams['order'] = $order;
$hookparams['role'] = 1; $hookparams['role'] = 1;
@ -654,9 +666,9 @@ class Order extends Backend
$order->status = \app\admin\model\Order::STATUS_DISPATCHING; $order->status = \app\admin\model\Order::STATUS_DISPATCHING;
$order->save(); $order->save();
if (!empty($order->dispatch->id)) { if (!empty($orderDispatch)) {
$OrderLogic = new OrderLogic(); $OrderLogic = new OrderLogic();
$OrderLogic->noWorkerCanGetIt($order->dispatch, '系统取消' . $abnormal_title); $OrderLogic->noWorkerCanGetIt($orderDispatch, '系统取消' . $abnormal_title);
AutoDispatchLogic::autoDispatch($order); AutoDispatchLogic::autoDispatch($order);
} }
@ -679,7 +691,6 @@ class Order extends Backend
$result = \model('order_abnormal')->insert($insert); $result = \model('order_abnormal')->insert($insert);
Db::commit(); Db::commit();
} catch (ValidateException|PDOException|Exception $e) { } catch (ValidateException|PDOException|Exception $e) {
throw $e;
Db::rollback(); Db::rollback();
$this->error($e->getMessage()); $this->error($e->getMessage());
} }

View File

@ -133,13 +133,13 @@ class Orderplan extends Backend
} }
$build->field([ $build->field([
'DATE(create_time) day', 'DATE(audit_time) day',
'sum(total) total', 'sum(total) total',
'count(id) count', 'count(id) count',
'sum(performance) performance' 'sum(performance) performance'
]) ])
->where('status',\app\admin\model\Order::STATUS_FINISHED) ->where('status',\app\admin\model\Order::STATUS_FINISHED)
->group(' DATE(create_time)'); ->group(' DATE(audit_time)');
$res = $this->buildDate($build)->select(); $res = $this->buildDate($build)->select();
$data = []; $data = [];
@ -300,17 +300,26 @@ class Orderplan extends Backend
$start = now()->format('Y-m-d 00:00:00'); $start = now()->format('Y-m-d 00:00:00');
$end_at = now()->format('Y-m-d 23:59:59'); $end_at = now()->format('Y-m-d 23:59:59');
$build = new \app\admin\model\Order();
$build->whereBetween('audit_time', [$start, $end_at])
->where('status',\app\admin\model\Order::STATUS_FINISHED);
$data1 = $build->field([
'sum(total) total',
'count(*) count',
])->select();
$build = new \app\admin\model\Order(); $build = new \app\admin\model\Order();
$build->whereBetween('create_time', [$start, $end_at]); $build->whereBetween('create_time', [$start, $end_at]);
$data = $build->field([ $data = $build->field([
'sum(total) total', /* 'sum(total) total',
'count(id) count', 'count(id) count',*/
'count(if(status=-10,1,null)) cancel' 'count(if(status=-10,1,null)) cancel'
])->select(); ])->select();
$today = [ $today = [
'total' => $data[0]->total ?? 0, 'total' => $data1[0]->total ?? 0,
'count' => $data[0]->count ?? 0, 'count' => $data1[0]->count ?? 0,
'cancel' => $data[0]->cancel ?? 0, 'cancel' => $data[0]->cancel ?? 0,
]; ];

View File

@ -264,6 +264,7 @@ class Aftersale extends Backend
$this->error('订单不存在'); $this->error('订单不存在');
} }
$order->status = Order::STATUS_FINISHED; $order->status = Order::STATUS_FINISHED;
$order->audit_time = date('Y-m-d H:i:s');
$order->save(); $order->save();
} }

View File

@ -478,6 +478,7 @@ class Aftersale2 extends Backend
$order = Order::get($row->order_id); $order = Order::get($row->order_id);
//重新计算订单利润 //重新计算订单利润
$order->status = Order::STATUS_FINISHED; $order->status = Order::STATUS_FINISHED;
$order->audit_time = date('Y-m-d H:i:s');
$order->save(); $order->save();
$orderLogic = new OrderLogic(); $orderLogic = new OrderLogic();
$orderLogic->recacle($order,$row); $orderLogic->recacle($order,$row);

View File

@ -124,7 +124,8 @@ class Auditorder extends Backend
if (false === $this->request->isPost()) { if (false === $this->request->isPost()) {
$order = Order::where('id',$ids)->find(); $order = Order::where('id',$ids)->find();
$this->view->assign('row', $row); $this->view->assign('row', $row);
$this->view->assign('worker',Worker::where('id',$order->worker_id)->find()); $worker = Worker::withTrashed()->where('id', $order->worker_id)->find();
$this->view->assign('worker',$worker);
$this->view->assign('cdnurl', config('upload.cdnurl')); $this->view->assign('cdnurl', config('upload.cdnurl'));
return $this->view->fetch(); return $this->view->fetch();
} }

View File

@ -118,7 +118,8 @@ class Configorder extends Backend
} }
if (false === $this->request->isPost()) { if (false === $this->request->isPost()) {
$this->view->assign('row', $row); $this->view->assign('row', $row);
$worker = Worker::where('id',$row->worker_id)->find(); //$worker = Worker::where('id',$row->worker_id)->find();
$worker = Worker::withTrashed()->where('id', $row->worker_id)->find();
$this->view->assign('worker', $worker); $this->view->assign('worker', $worker);
return $this->view->fetch(); return $this->view->fetch();
} }
@ -143,6 +144,7 @@ class Configorder extends Backend
$data = [ $data = [
'status' => Order::STATUS_AUDITING, 'status' => Order::STATUS_AUDITING,
'online_amount' => $params['online_amount'],
'online_amount_last' => $params['online_amount_last'], 'online_amount_last' => $params['online_amount_last'],
'offline_amount' => $params['offline_amount'], 'offline_amount' => $params['offline_amount'],
// 'refund_amount' => $params['refund_amount'], // 'refund_amount' => $params['refund_amount'],
@ -160,7 +162,7 @@ class Configorder extends Backend
$cost = bcadd($params['cost'],$params['material_cost'],2); $cost = bcadd($params['cost'],$params['material_cost'],2);
$data['total'] = bcadd($row->online_amount,$last_amount,2); $data['total'] = bcadd($params['online_amount'],$last_amount,2);
$data['real_amount'] = $data['total']; $data['real_amount'] = $data['total'];
$data['performance'] = bcsub($data['real_amount'],$cost,2); $data['performance'] = bcsub($data['real_amount'],$cost,2);
$result = $row->allowField(true)->save($data); $result = $row->allowField(true)->save($data);

View File

@ -323,6 +323,7 @@ class Dispatch2 extends Backend
//计算价格 //计算价格
$data = [ $data = [
'online_amount' => $orderParsms['online_amount'], //线上尾款
'online_amount_last' => $row->online_total, //线上尾款 'online_amount_last' => $row->online_total, //线上尾款
'offline_amount' => $row->total, //线下尾款 'offline_amount' => $row->total, //线下尾款
'cost' => $orderParsms['cost'], 'cost' => $orderParsms['cost'],
@ -340,7 +341,7 @@ class Dispatch2 extends Backend
$cost = bcadd($data['cost'],$data['material_cost'],2); $cost = bcadd($data['cost'],$data['material_cost'],2);
$data['total'] = bcadd($order->online_amount,$last_amount,2); $data['total'] = bcadd($data['online_amount'],$last_amount,2);
$data['real_amount'] = $data['total']; $data['real_amount'] = $data['total'];
$data['performance'] = bcsub($data['real_amount'],$cost,2); $data['performance'] = bcsub($data['real_amount'],$cost,2);
$order->allowField(true)->save($data); $order->allowField(true)->save($data);

View File

@ -137,14 +137,17 @@ class Dispatcher extends Backend
// 使用 IFNULL 确保结果为 null 时返回 0 // 使用 IFNULL 确保结果为 null 时返回 0
"IFNULL(COUNT(CASE WHEN status = 60 THEN 1 END), 0) AS finish_num", //完成数 "IFNULL(COUNT(CASE WHEN status = 60 THEN 1 END), 0) AS finish_num", //完成数
"IFNULL(COUNT(CASE WHEN status IN (".$orderValid.") THEN 1 END), 0) AS count_num", //总订单数 (排除取消 和草稿) "IFNULL(COUNT(CASE WHEN status IN (".$orderValid.") THEN 1 END), 0) AS count_num", //总订单数 (排除取消 和草稿)
"IFNULL(COUNT(CASE WHEN is_overtime = 1 THEN 1 END), 0) AS overtime_num", //超时数 "IFNULL(COUNT(CASE WHEN status = 60 AND is_overtime = 1 THEN 1 END), 0) AS overtime_num", //超时数
"IFNULL(SUM(CASE WHEN status = 60 THEN total END), 0) AS total", //成效额 "IFNULL(SUM(CASE WHEN status = 60 THEN total END), 0) AS total", //成效额
"IFNULL(SUM(CASE WHEN status = 60 THEN performance END), 0) AS performance", //业绩 "IFNULL(SUM(CASE WHEN status = 60 THEN performance END), 0) AS performance", //业绩
"IFNULL(SUM(CASE WHEN status = 60 THEN (cost + material_cost) END), 0) AS cost_total", //总成本 "IFNULL(SUM(CASE WHEN status = 60 THEN (cost + material_cost) END), 0) AS cost_total", //总成本
"IFNULL(SUM(CASE WHEN status = 60 THEN (refund_amount + worker_refund_amount) END), 0) AS refund_total", //退款总数 //"IFNULL(SUM(CASE WHEN status = 60 THEN (refund_amount + worker_refund_amount) END), 0) AS refund_total", //退款总数
"IFNULL(COUNT(CASE WHEN refund_amount > 0 OR worker_refund_amount > 0 THEN 1 END), 0) AS refund_count", //退款订单数量 "SUM(
"IFNULL(AVG(CASE WHEN status > 10 THEN UNIX_TIMESTAMP(dispatch_time) - UNIX_TIMESTAMP(create_time) END), 0) AS avg_time_diff", //派单时效 CASE WHEN status = 60 THEN (refund_amount + worker_refund_amount) ELSE 0 END
) AS refund_total",
"IFNULL(COUNT(CASE WHEN status = 60 AND (refund_amount > 0 OR worker_refund_amount > 0) THEN 1 END), 0) AS refund_count", //退款订单数量
"IFNULL(AVG(CASE WHEN status = 60 THEN UNIX_TIMESTAMP(dispatch_time) - UNIX_TIMESTAMP(create_time) END), 0) AS avg_time_diff", //派单时效
// "SUM(CASE WHEN status = 60 THEN (field1 + field2) END) AS performance", // "SUM(CASE WHEN status = 60 THEN (field1 + field2) END) AS performance",
]; ];

View File

@ -10,6 +10,7 @@ use app\admin\model\OrderReview;
use app\common\controller\Backend; use app\common\controller\Backend;
use PDOStatement; use PDOStatement;
use think\Collection; use think\Collection;
use think\Db;
use think\Exception; use think\Exception;
use think\exception\DbException; use think\exception\DbException;
use think\Loader; use think\Loader;
@ -24,7 +25,7 @@ use function Symfony\Component\Clock\now;
*/ */
class Item extends Backend class Item extends Backend
{ {
protected $itemsformattedTree = null;
protected $noNeedRight = ['list','chartData']; protected $noNeedRight = ['list','chartData'];
@ -33,6 +34,43 @@ class Item extends Backend
public function _initialize() public function _initialize()
{ {
parent::_initialize(); parent::_initialize();
$sources = Db::name('source')
->where('status', 1)
->field(['id', 'title', 'key_word', 'pid'])
->order('pid', 'asc')
->order('sort', 'desc')
->select();
$filtered = array_filter($sources, function ($item) {
return $item['pid'] == 0;
});
$pid_map = array_column($filtered, null, 'id');
$res = [];
foreach ($sources as $item) {
if ($item['pid'] != 0 && isset($pid_map[$item['pid']])) {
$res [] = [
...$item, 'ptitle' => $pid_map[$item['pid']]['title']
];
}
}
/* $items = Db::name('item')
->where('status', 1)
->field(['id', 'title', 'key_word', 'pid'])
->order('pid', 'asc')
->order('sort', 'desc')
->select();
$tree = $this->buildTree($items);
$formattedTree = $this->formatTree($tree);
$this->items = $items;
$this->itemsformattedTree = $formattedTree;*/
$items = \app\admin\model\Item::where('level',1)->field('id,title')->order('sort','desc')->select();
$this->view->assign("sources", $res);
$this->view->assign("items", $items);
} }
public function index() public function index()
@ -48,6 +86,8 @@ class Item extends Backend
public function list() public function list()
{ {
$build = new Order(); $build = new Order();
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
$start = now()->modify('-7 days')->format('Y-m-d'); $start = now()->modify('-7 days')->format('Y-m-d');
$end_at = now()->format('Y-m-d 23:29:59'); $end_at = now()->format('Y-m-d 23:29:59');
@ -69,6 +109,21 @@ class Item extends Backend
$build->where('area_id', 'like', $area_id . '%'); $build->where('area_id', 'like', $area_id . '%');
} }
//来源
if(!empty(request()->get('source',null))){
$build->where('source',request()->get('source'));
}
//城市
/* if(!empty(request()->post('area_id',null))){
$build->where('area_id','LIKE',request()->post('source').'%');
}*/
if(!empty(request()->get('item_id',null))){
$item_id =request()->get('item_id');
$item_ids = $this->getItemsById($item_id);
$item_ids [] = $item_id;
$build->whereIn('item_id', $item_ids);
}
$build->whereBetween('create_time', [$start, $end_at]) $build->whereBetween('create_time', [$start, $end_at])
->field([ ->field([
@ -86,7 +141,7 @@ class Item extends Backend
])->group('item_title') ])->group('item_title')
->order('count_num', 'desc'); ->order('count_num', 'desc');
// dd($total); // dd($total);
$res = $build->paginate(); $res = $build->paginate($limit);
$total = $res->total(); $total = $res->total();
$ress = $res->items(); $ress = $res->items();
$data = []; $data = [];
@ -103,7 +158,7 @@ class Item extends Backend
$re['total_avg'] = $this->mydiv($re['total'],$re['count_num'],2,false); $re['total_avg'] = $this->mydiv($re['total'],$re['count_num'],2,false);
$re['performance_avg'] = $this->mydiv($re['performance'],$re['finish_num'],2,false); $re['performance_avg'] = $this->mydiv($re['performance'],$re['finish_num'],2,false);
$re['avg_time_diff'] = $this->mydiv($re['avg_time_diff'],3600,2,false); $re['avg_time_diff'] = $this->mydiv($re['avg_time_diff'],3600,2,false);
$re['cost_total'] = $cost_total; $re['cost_total'] = number_format($cost_total,2,'.','');
// $re['id'] = $re['item_id']; // $re['id'] = $re['item_id'];
$data [] = $re; $data [] = $re;
} }
@ -139,6 +194,8 @@ class Item extends Backend
$filter ['daterange'] = request()->post('daterange'); $filter ['daterange'] = request()->post('daterange');
if (!empty($filter['daterange'])) { if (!empty($filter['daterange'])) {
$arr = explode(' - ', $filter['daterange']); $arr = explode(' - ', $filter['daterange']);
if (trim($arr[0])) { if (trim($arr[0])) {
@ -149,9 +206,28 @@ class Item extends Backend
} }
} }
$res = $build $build = $build
->whereBetween('create_time', [$start, $end_at]) ->whereBetween('create_time', [$start, $end_at]);
->field([
//来源
if(!empty(request()->post('source',null))){
$build->where('source',request()->post('source'));
}
//城市
if(!empty(request()->post('area_id',null))){
$build->where('area_id','LIKE',request()->post('source').'%');
}
if(!empty(request()->post('item_id',null))){
$item_id =request()->post('item_id');
$item_ids = $this->getItemsById($item_id);
$item_ids [] = $item_id;
$build->whereIn('item_id', $item_ids);
}
$res = $build->field([
'item_title name', // 类型 'item_title name', // 类型
'sum(total) total', // 营业额 'sum(total) total', // 营业额
'count(id) count', // 单量 'count(id) count', // 单量

View File

@ -167,7 +167,8 @@ class Order extends Model
self::STATUS_CHECKING, self::STATUS_CHECKING,
self::STATUS_CHECKONCE, self::STATUS_CHECKONCE,
self::STATUS_AUDITING, self::STATUS_AUDITING,
self::STATUS_FINISHED self::STATUS_FINISHED,
self::STATUS_AFTERSALE
], ],
]; ];
return $tabStatus[$tab] ?? []; return $tabStatus[$tab] ?? [];

View File

@ -3,14 +3,14 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-order_id" data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.order_no|htmlentities}"> <input id="c-order_id" data-field="order_no" class="form-control" readonly type="text" value="{$order.order_no|htmlentities}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">客户姓名:</label> <label class="control-label col-xs-12 col-sm-2">客户姓名:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.customer|htmlentities}"> <input data-field="order_no" class="form-control" readonly type="text" value="{$order.customer|htmlentities}">
</div> </div>
</div> </div>
@ -18,7 +18,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">客户电话:</label> <label class="control-label col-xs-12 col-sm-2">客户电话:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.tel|htmlentities}"> <input data-field="order_no" class="form-control" readonly type="text" value="{$order.tel|htmlentities}">
</div> </div>
</div> </div>

View File

@ -3,14 +3,14 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-order_id" data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.order_no|htmlentities}"> <input id="c-order_id" data-field="order_no" class="form-control" readonly type="text" value="{$order.order_no|htmlentities}">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">客户姓名:</label> <label class="control-label col-xs-12 col-sm-2">客户姓名:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.customer|htmlentities}"> <input data-field="order_no" class="form-control" readonly type="text" value="{$order.customer|htmlentities}">
</div> </div>
</div> </div>
@ -18,7 +18,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">客户电话:</label> <label class="control-label col-xs-12 col-sm-2">客户电话:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.tel|htmlentities}"> <input data-field="order_no" class="form-control" readonly type="text" value="{$order.tel|htmlentities}">
</div> </div>
</div> </div>

View File

@ -11,14 +11,12 @@
<tr> <tr>
<th>姓名</th> <th>姓名</th>
<th>录单数</th> <th>录单数</th>
<th>录单业绩</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>{$adminname|htmlentities}</td> <td>{$adminname|htmlentities}</td>
<td>{$data['total']|htmlentities}</td> <td>{$data['total']|htmlentities}</td>
<td>{$data['money']|htmlentities}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -8,20 +8,20 @@
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">订单渠道:</label> <label class="control-label col-xs-12 col-sm-2">订单渠道:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-detail" readonly class="form-control" placeholder="订单详情" value="{$row.source_shop|htmlentities}"> <input id="c-detail" readonly class="form-control" placeholder="订单详情" value="{$row.source_shop|htmlentities}">
</div> </div>
</div> </div>-->
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">客户昵称:</label> <label class="control-label col-xs-12 col-sm-2">客户昵称:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-customer" class="form-control" readonly type="text" value="{$row.customer|htmlentities}"> <input id="c-customer" class="form-control" readonly type="text" value="{$row.customer|htmlentities}">
</div> </div>
</div> </div>-->
<!-- <!--
<div class="form-group"> <div class="form-group">
@ -75,10 +75,10 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('收款依据')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('收款凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-amount_images" class="form-control" size="50" type="text" value="{$row.amount_images}" > <input id="c-amount_images" readonly class="form-control" size="50" type="text" value="{$row.amount_images}" >
<div class="input-group-addon no-border no-padding"> <div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-amount_images" class="btn btn-danger faupload" data-input-id="c-amount_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-amount_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> <span><button type="button" id="faupload-amount_images" class="btn btn-danger faupload" data-input-id="c-amount_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-amount_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-amount_images" class="btn btn-primary fachoose" data-input-id="c-amount_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span> <span><button type="button" id="fachoose-amount_images" class="btn btn-primary fachoose" data-input-id="c-amount_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
@ -111,13 +111,13 @@
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">师傅名称:</label> <label class="control-label col-xs-12 col-sm-2">师傅名称:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input readonly class="form-control" type="text" value="{$worker.name|htmlentities}"> <input readonly class="form-control" type="text" value="{$worker.name|htmlentities}">
</div> </div>
</div> </div>
-->
<div class="form-group"> <div class="form-group">
@ -160,18 +160,20 @@
</div> </div>
<div class="form-group"> <input id="c-material_cost" name="row[material_cost]" type="hidden" value="0">
<!--<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-material_cost" readonly class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}"> <input id="c-material_cost" readonly class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}">
</div> </div>
</div> </div>-->
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-material_images" class="form-control" size="50" value="{$row.material_images}" name="row[material_images]" type="text"> <input id="c-material_images" readonly class="form-control" size="50" value="{$row.material_images}" name="row[material_images]" type="text">
<div class="input-group-addon no-border no-padding"> <div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> <span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span> <span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
@ -180,14 +182,14 @@
</div> </div>
<ul class="row list-inline faupload-preview" id="p-material_images"></ul> <ul class="row list-inline faupload-preview" id="p-material_images"></ul>
</div> </div>
</div> </div>-->
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('定金核销凭证')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('定金核销凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-off_images" class="form-control" size="50" value="{$row.off_images}" name="row[off_images]" type="text"> <input id="c-off_images" readonly class="form-control" size="50" value="{$row.off_images}" name="row[off_images]" type="text">
<div class="input-group-addon no-border no-padding"> <div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-off_images" class="btn btn-danger faupload" data-input-id="c-off_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-off_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> <span><button type="button" id="faupload-off_images" class="btn btn-danger faupload" data-input-id="c-off_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-off_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-off_images" class="btn btn-primary fachoose" data-input-id="c-off_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span> <span><button type="button" id="fachoose-off_images" class="btn btn-primary fachoose" data-input-id="c-off_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
@ -225,6 +227,7 @@
<!--
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('转账凭证')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('转账凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
@ -239,6 +242,7 @@
<ul class="row list-inline faupload-preview" id="p-trans_images"></ul> <ul class="row list-inline faupload-preview" id="p-trans_images"></ul>
</div> </div>
</div> </div>
-->

View File

@ -18,7 +18,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Item_title')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('Item_title')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-item_title" readonly class="form-control" type="text" value="{$row.item_title|htmlentities}"> <input id="c-item_title" readonly class="form-control" type="text" value="{$row.item_title|htmlentities}">
@ -29,7 +29,7 @@
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-order_admin" readonly class="form-control" type="text" value="{$row.dispatch.admin_user|htmlentities}"> <input id="c-order_admin" readonly class="form-control" type="text" value="{$row.dispatch.admin_user|htmlentities}">
</div> </div>
</div> </div>-->
<!-- <div class="form-group">--> <!-- <div class="form-group">-->
@ -51,11 +51,12 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('Online_amount')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="c-online_amount" readonly class="form-control" step="0.01" name="row[online_amount]" type="number" value="{$row.online_amount|htmlentities}"> <input id="c-online_amount" data-rule="required" class="form-control" step="0.01" name="row[online_amount]" type="number" value="{$row.online_amount|htmlentities}">
</div> </div>
</div> </div>
{if condition='$row.status eq 40'} {if condition='$row.status eq 40'}
<div class="form-group"> <div class="form-group">
@ -82,7 +83,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('收款依据')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('收款凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.dispatch.image}" > <input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.dispatch.image}" >
@ -97,12 +98,12 @@
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">师傅名称:</label> <label class="control-label col-xs-12 col-sm-2">师傅名称:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input readonly min="0" max="100" step="1" class="form-control" value="{$worker->name}" /> <input readonly min="0" max="100" step="1" class="form-control" value="{$worker->name}" />
</div> </div>
</div> </div>-->
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label>
@ -111,12 +112,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('分成备注')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('分成备注')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input readonly type="text" class="form-control" value="{$worker.rate_remark}"> <input readonly type="text" class="form-control" value="{$worker.rate_remark}">
</div> </div>
</div> </div>-->
<div class="form-group"> <div class="form-group">
@ -126,6 +127,8 @@
</div> </div>
</div> </div>
<input id="c-material_cost" name="row[material_cost]" type="hidden" value="0">
<!--
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
@ -148,6 +151,7 @@
<ul class="row list-inline faupload-preview" id="p-material_images"></ul> <ul class="row list-inline faupload-preview" id="p-material_images"></ul>
</div> </div>
</div> </div>
-->
@ -181,7 +185,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('收款依据')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('收款凭证')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.amount_images}" > <input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.amount_images}" >
@ -195,12 +199,12 @@
</div> </div>
</div> </div>
<div class="form-group"> <!-- <div class="form-group">-->
<label class="control-label col-xs-12 col-sm-2">师傅名称:</label> <!-- <label class="control-label col-xs-12 col-sm-2">师傅名称:</label>-->
<div class="col-xs-12 col-sm-8"> <!-- <div class="col-xs-12 col-sm-8">-->
<input readonly min="0" max="100" step="1" class="form-control" value="{$worker->name}" /> <!-- <input readonly min="0" max="100" step="1" class="form-control" value="{$worker->name}" />-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('师傅提点(%)')}:</label>
@ -208,13 +212,13 @@
<input name="row[cost_rate]" readonly type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}" /> <input name="row[cost_rate]" readonly type="number" min="0" max="100" step="1" class="form-control" value="{$worker.rate|htmlentities}" />
</div> </div>
</div> </div>
<!--
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('分成备注')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('分成备注')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input readonly type="text" class="form-control" value="{$worker.rate_remark}"> <input readonly type="text" class="form-control" value="{$worker.rate_remark}">
</div> </div>
</div> </div>-->
<div class="form-group"> <div class="form-group">
@ -224,29 +228,31 @@
</div> </div>
</div> </div>
<input id="c-material_cost" name="row[material_cost]" type="hidden" value="0">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-material_cost" data-rule="required" class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}">
</div>
</div>
<div class="form-group"> <!-- <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('材料成本')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <input id="c-material_cost" data-rule="required" class="form-control" step="0.01" name="row[material_cost]" type="number" value="{$row.material_cost|htmlentities}">
<input id="c-material_images" class="form-control" size="50" value="{$row.material_images}" name="row[material_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-material_images"></span>
</div> </div>
<ul class="row list-inline faupload-preview" id="p-material_images"></ul>
</div> </div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-material_images" class="form-control" size="50" value="{$row.material_images}" name="row[material_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-material_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-material_images"></ul>
</div>
</div>-->
{/if} {/if}

View File

@ -89,7 +89,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('线上收款')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('线上收款')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="order-online-amount" readonly type="text" class="form-control" value="{$order.online_amount|htmlentities}"> <input id="order-online-amount" name="order[online_amount]" type="text" class="form-control" value="{$order.online_amount|htmlentities}">
</div> </div>
</div> </div>
@ -107,7 +107,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('线上预付')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('线上预付')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="order-online-amount" readonly type="text" class="form-control" value="{$order.online_amount|htmlentities}"> <input id="order-online-amount" name="order[online_amount]" type="text" class="form-control" value="{$order.online_amount|htmlentities}">
</div> </div>
</div> </div>
@ -153,28 +153,31 @@
{/if} {/if}
<div class="form-group"> <!--<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料成本(¥)')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('材料成本(¥)')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<input id="order-material_cost" data-rule="required" name="order[material_cost]" min="1" step="0.01" type="number" class="form-control" value="{$order.material_cost}"> <input id="order-material_cost" data-rule="required" name="order[material_cost]" min="1" step="0.01" type="number" class="form-control" value="{$order.material_cost}">
</div> </div>
</div> </div>-->
<input id="order-material_cost" name="order[material_cost]" min="1" step="0.01" type="hidden" class="form-control" value="0">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label> <!-- <div class="form-group">
<div class="col-xs-12 col-sm-8"> <label class="control-label col-xs-12 col-sm-2">{:__('材料凭证')}:</label>
<div class="input-group"> <div class="col-xs-12 col-sm-8">
<input id="c-material_images" class="form-control" size="50" value="{$order.material_images}" name="order[material_images]" type="text"> <div class="input-group">
<div class="input-group-addon no-border no-padding"> <input id="c-material_images" class="form-control" size="50" value="{$order.material_images}" name="order[material_images]" type="text">
<span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> <div class="input-group-addon no-border no-padding">
<span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span> <span><button type="button" id="faupload-material_images" class="btn btn-danger faupload" data-input-id="c-material_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-material_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-material_images" class="btn btn-primary fachoose" data-input-id="c-material_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-material_images"></span>
</div> </div>
<span class="msg-box n-right" for="c-material_images"></span> <ul class="row list-inline faupload-preview" id="p-material_images"></ul>
</div> </div>
<ul class="row list-inline faupload-preview" id="p-material_images"></ul> </div>-->
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('完成图片')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('完成图片')}:</label>

View File

@ -10,7 +10,6 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('客户姓名')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('客户姓名')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
@ -33,13 +32,70 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('订单详情')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('线上预付')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<textarea id="c-detail" readonly class="form-control" placeholder="订单详情" >{$row.detail|htmlentities}</textarea> <input id="c-online_amount" readonly class="form-control" type="number" value="{$row.online_amount|htmlentities}">
</div> </div>
</div> </div>
{if condition='$row.status eq 60'}
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('线上尾款')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-online_amount_last" readonly class="form-control" step="0.01" type="number" value="{$row.online_amount_last|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('线上尾款类型')}:</label>
<div class="col-xs-12 col-sm-8">
{:build_select('row[offline_amount_type]',$offlineTotalTypeList,$row['offline_amount_type'],['class'=>'form-control readonly','data-rule'=>'required'])}
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('线下尾款')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-offline_amount" readonly class="form-control" step="0.01" type="number" value="{$row.offline_amount|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('总收款')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-total" readonly class="form-control" type="number" value="{$row.online_amount|htmlentities}">
</div>
</div>
{/if}
<!--
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('订单详情')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-detail" readonly class="form-control" placeholder="订单详情" >{$row.detail|htmlentities}</textarea>
</div>
</div>-->
{if condition='$row.status eq -10'}
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('订单备注')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea class="form-control" readonly >{$row.remark|htmlentities}</textarea>
</div>
</div>
{/if}
{if condition='$row.cancel_detail neq ""'} {if condition='$row.cancel_detail neq ""'}

View File

@ -1,3 +1,34 @@
<style>
/* 保持 form-inline 中子元素水平排列 */
#chart-filter-table > div {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
}
/* 城市选择的容器,定位弹层基准 */
#select_city_wrapper {
position: relative; /* 弹层相对定位 */
width: 250px;
display: inline-block;
}
/* city-picker 弹层,确保宽度和输入框一致 */
.city-picker-dropdown {
position: absolute !important;
top: 100% !important; /* 紧贴输入框下方 */
left: 0 !important;
width: 100% !important;
max-height: 400px !important;
overflow: auto !important;
background: #fff !important;
border: 1px solid #ccc !important;
box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
z-index: 9999 !important;
}
</style>
<div class="panel panel-default panel-intro"> <div class="panel panel-default panel-intro">
<div class="panel-heading"> <div class="panel-heading">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
@ -29,6 +60,9 @@
<input type="text" class="form-control datetimerange" value = "{$default_daterange}" data-locale='{"format":"YYYY-MM-DD"}' placeholder="指定日期" name="filter[daterange]" id="daterange" autocomplete="off" style="width: 200px;"> <input type="text" class="form-control datetimerange" value = "{$default_daterange}" data-locale='{"format":"YYYY-MM-DD"}' placeholder="指定日期" name="filter[daterange]" id="daterange" autocomplete="off" style="width: 200px;">
</div> </div>
<!-- 查询按钮 --> <!-- 查询按钮 -->
<button class="btn btn-default" id="filter-btn" style="margin-left: 15px;">查询</button> <button class="btn btn-default" id="filter-btn" style="margin-left: 15px;">查询</button>
</div> </div>
@ -43,22 +77,55 @@
</section> </section>
</div> </div>
<div class="tab-pane fade" id="second"> <div class="tab-pane fade" id="second">
<div id="chart-filter-table" style="margin-top:20px;margin-bottom: 30px;"> <div id="chart-filter-table" class="form-inline">
<div style="display: inline-block;width: 300px;position: relative"> <!-- 地区选择移除input-group改成一个div包裹 -->
<input class="form-control" data-toggle="city-picker" type="text" placeholder="地区" id="area-table"> <div id="select_city_wrapper">
<input style="display: none" type="text" id="area_id"> <input style="padding-left: 5px;" id="select_city" class="form-control" data-toggle="city-picker" type="text" placeholder="选择城市" />
<input id="select_area_id" type="hidden" class="operate" name="area_id" />
</div>
<!-- 渠道选择 -->
<div class="input-group" style="width: 200px;">
<select id="source" data-live-search="true" title="订单渠道" name="filter[source]" class="form-control selectpicker show-tick">
<option value="">--订单渠道--</option>
{foreach $sources as $item}
<option value="{$item['id']}">【{$item['ptitle']}】{$item['title']}</option>
{/foreach}
</select>
</div>
<!-- 项目组选择 -->
<div class="input-group" style="width: 200px;">
<select id="item_id" data-live-search="true" title="项目组" name="filter[item_id]" class="form-control selectpicker show-tick">
<option value="">--项目组--</option>
{foreach $items as $item}
<option value="{$item['id']}">{$item['title']}</option>
{/foreach}
</select>
</div>
<!-- 日期选择 -->
<div class="input-group" style="width: 200px;">
<input type="text" class="form-control datetimerange"
data-locale='{"format":"YYYY-MM-DD"}'
value="{$default_daterange}"
placeholder="指定日期"
name="filter[daterange]"
id="daterange-table"
autocomplete="off">
</div>
<!-- 查询按钮 -->
<div class="input-group">
<button class="btn btn-default" id="filter-btn-table">查询</button>
</div>
</div> </div>
<div style="display: inline-block;width: 200px;position: relative">
<input type="text" class="form-control datetimerange" data-locale='{"format":"YYYY-MM-DD"}' <table id="table2" class="table table-striped table-bordered table-hover">
value = "{$default_daterange}"
placeholder="指定日期" name="filter[daterange]" id="daterange-table" autocomplete="off" style="width: 180px;">
</div>
<!-- 查询按钮 -->
<button class="btn btn-default" id="filter-btn-table" style="margin-left: 15px;">查询</button>
</div>
<table id="table2" class="table table-striped table-bordered table-hover">
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -75,7 +75,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">师傅收款码:</label> <label class="control-label col-xs-12 col-sm-2">收款码:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-images" class="form-control" size="50" name="row[images]" type="text"> <input id="c-images" class="form-control" size="50" name="row[images]" type="text">

View File

@ -92,10 +92,10 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-xs-12 col-sm-2">师傅收款码:</label> <label class="control-label col-xs-12 col-sm-2">收款码:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<div class="input-group"> <div class="input-group">
<input id="c-images" class="form-control" size="50" name="row[images]" type="text"> <input id="c-images" class="form-control" size="50" name="row[images]" value="{$row.images|htmlentities}" type="text">
<div class="input-group-addon no-border no-padding"> <div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span> <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span> <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>

View File

@ -147,7 +147,7 @@ ${data.receive_type == 1 ? '已收定金' : '已收全款'}
}, },
operate: '=', operate: '=',
}, },
{field: 'dispatch_admin_user', title: '派单员',operate: 'LIKE'}, {field: 'customer', title: __('Customer'), operate: 'LIKE'},
{ {
field: 'dispatch_type', field: 'dispatch_type',
title: '派单方式', title: '派单方式',
@ -161,7 +161,8 @@ ${data.receive_type == 1 ? '已收定金' : '已收全款'}
{field: 'user.nickname', title: '录单员',operate: 'LIKE'}, {field: 'user.nickname', title: '录单员',operate: 'LIKE'},
{field: 'customer', title: __('Customer'), operate: 'LIKE'}, {field: 'dispatch_admin_user', title: '派单员',operate: 'LIKE'},
{field: 'tel', title: __('Tel'), operate: 'LIKE'}, {field: 'tel', title: __('Tel'), operate: 'LIKE'},
{field: 'area.merge_name', title: __('Area_id'), searchable: false}, {field: 'area.merge_name', title: __('Area_id'), searchable: false},
{ {

View File

@ -55,7 +55,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
{field: 'dispatch_admin_id', title: __('派单员'), searchList:$.getJSON("orders/configorder/getadminuser"),operate: 'IN',visible:false}, {field: 'dispatch_admin_id', title: __('派单员'), searchList:$.getJSON("orders/configorder/getadminuser"),operate: 'IN',visible:false},
{field: 'time_by', title: __('时间维度'), visible:false,searchList: {"1":__('录单时间'),"2":__('派单时间')},defaultValue:1, formatter: Table.api.formatter.normal}, {field: 'time_by', title: __('时间维度'), visible:false,searchList: {"1":__('审核时间')},defaultValue:1, formatter: Table.api.formatter.normal},
{field: 'daterange', title: __('时间筛选'), addclass:'datetimerange', {field: 'daterange', title: __('时间筛选'), addclass:'datetimerange',
autocomplete:false, autocomplete:false,
operate: "RANGE", operate: "RANGE",

View File

@ -1,4 +1,5 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-theme', 'template', 'addtabs', 'moment','citypicker'], function ($, undefined, Backend, Table, Form, echarts, undefined, Template, Datatable, Moment) { define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts','echarts-theme', 'template', 'addtabs', 'moment','citypicker','cascader'], function ($, undefined, Backend, Table, Form, echarts, undefined, Template, Datatable, Moment) {
var Controller = { var Controller = {
@ -56,6 +57,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
}); });
// 为表格2绑定事件 // 为表格2绑定事件
Table.api.bindevent(table2); Table.api.bindevent(table2);
setTimeout(function () {
var $city = $('#select_city');
if ($city.data('citypicker')) {
$city.citypicker('destroy');
}
$city.citypicker();
$city.off("cp:updated").on("cp:updated", function () {
var citypicker = $(this).data("citypicker");
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
$("#select_area_id").val(code);
});
}, 500);
} }
}); });
@ -74,20 +90,49 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
$('#filter-btn-table').on('click', function () { $('#filter-btn-table').on('click', function () {
const area_id = $('#area_id').val(); const area_id = $('#select_area_id').val();
const range = $('#daterange-table').val(); const range = $('#daterange-table').val();
const source1 = $('#source').val();
const item_id = $('#item_id').val();
let data = ''; let data = '';
if (area_id !== ''){ if (area_id !== '' ){
data += 'area_id=' + area_id+'&'; data += 'area_id=' + area_id+'&';
} }
if (range !== ''){ if (range !== ''){
data += 'range=' + range; data += 'range=' + range+'&';
} }
if (source1!== ''){
data += 'source=' + source1+'&';
}
if (item_id !== '' && item_id !== 'undefined'){
data +='item_id=' + item_id + '&';
}
// data = encodeURIComponent(data); // data = encodeURIComponent(data);
$("#table2").bootstrapTable('refresh',{ $("#table2").bootstrapTable('refresh',{
url:'statistics/item/list?' + data, url:'statistics/item/list?' + data,
}); });
}); });
/* var _data = items;
$('#select_item').zdCascader({
data: _data,
onChange: function ($this, data, allPathData) {
// console.log(data,allPathData);
$('#select_item_id').val(data.value);
},
clear: true,
clickParent: true
});*/
}, },
add: function () { add: function () {
@ -187,10 +232,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
getChartData: function () { getChartData: function () {
// 获取日期范围值 // 获取日期范围值
var daterange = $('#daterange').val(); var daterange = $('#daterange').val();
/* var source = $('#source').val();
var city_id = $('#area_id').val();
var item_id = $('#item_id').val();
*/
// 构建查询参数 // 构建查询参数
var params = { var params = {
'daterange': daterange, 'daterange': daterange,
/* 'source': source,
'area_id': city_id,
'item_id': item_id,*/
}; };
$.ajax({ $.ajax({
@ -205,7 +256,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
console.error("图表数据加载失败"); console.error("图表数据加载失败");
} }
}); });
} },
} }
}; };
return Controller; return Controller;

View File

@ -83,8 +83,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
visible: false visible: false
}, },
{field: 'item_id', title: __('工程'), searchList:$.getJSON("ajax/getItems"),operate: 'IN',visible:false}, {field: 'item_id', title: __('工种'), searchList:$.getJSON("ajax/getItems"),operate: 'IN',visible:false},
{field: 'operate', title: __('Operate'), table: table2, events: Table.api.events.operate, formatter: Table.api.formatter.operate, {field: 'operate', title: __('Operate'), table: table2, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
buttons: [ buttons: [

View File

@ -86,8 +86,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree','cascader'],
}, visible: false }, visible: false
}, },
{ {
field: '收款码', field: 'images',
title: __('Images'), title: __('收款码'),
operate: false, operate: false,
events: Table.api.events.image, events: Table.api.events.image,
formatter: Table.api.formatter.images formatter: Table.api.formatter.images

View File

@ -11880,7 +11880,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列 ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列
}, },
pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10, pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10,
pageList: [10, 15, 20, 25, 50, 'All'], pageList: [10, 15, 20, 25, 50, 100],
pagination: true, pagination: true,
clickToSelect: true, //是否启用点击选中 clickToSelect: true, //是否启用点击选中
dblClickToEdit: true, //是否启用双击编辑 dblClickToEdit: true, //是否启用双击编辑

View File

@ -11624,7 +11624,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列 ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列
}, },
pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10, pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10,
pageList: [10, 15, 20, 25, 50, 'All'], pageList: [10, 15, 20, 25, 50, 100],
pagination: true, pagination: true,
clickToSelect: true, //是否启用点击选中 clickToSelect: true, //是否启用点击选中
dblClickToEdit: true, //是否启用双击编辑 dblClickToEdit: true, //是否启用双击编辑

View File

@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列 ignoreColumn: [0, 'operate'] //默认不导出第一列(checkbox)与操作(operate)列
}, },
pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10, pageSize: Config.pagesize || localStorage.getItem("pagesize") || 10,
pageList: [10, 15, 20, 25, 50, 'All'], pageList: [10, 15, 20, 25, 50, 100],
pagination: true, pagination: true,
clickToSelect: true, //是否启用点击选中 clickToSelect: true, //是否启用点击选中
dblClickToEdit: true, //是否启用双击编辑 dblClickToEdit: true, //是否启用双击编辑