Merge branch 'develop' of e.coding.net:g-bcrc3009/allocatr/allocatr into feature/dgg
This commit is contained in:
commit
a47d1944ed
1
addons/.htaccess
Executable file
1
addons/.htaccess
Executable file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
1
addons/editable/.addonrc
Normal file
1
addons/editable/.addonrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"files":["public\/assets\/addons\/editable\/css\/bootstrap-editable.css","public\/assets\/addons\/editable\/img\/clear.png","public\/assets\/addons\/editable\/img\/loading.gif","public\/assets\/addons\/editable\/js\/bootstrap-editable.min.js","public\/assets\/addons\/editable\/less\/bootstrap-editable.less"],"license":"regular","licenseto":"15976","licensekey":"sQBJOrTzvke89ZHK TKQknw3vTsKKB6lZzEFy1A==","domains":["fast.cc"],"licensecodes":[],"validations":["043c5318e9fc4870124f0d65db900fc1"]}
|
||||
54
addons/editable/Editable.php
Normal file
54
addons/editable/Editable.php
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
namespace addons\editable;
|
||||
|
||||
use app\common\library\Menu;
|
||||
use think\Addons;
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
class Editable extends Addons
|
||||
{
|
||||
|
||||
/**
|
||||
* 插件安装方法
|
||||
* @return bool
|
||||
*/
|
||||
public function install()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件卸载方法
|
||||
* @return bool
|
||||
*/
|
||||
public function uninstall()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件启用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function enable()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件禁用方法
|
||||
* @return bool
|
||||
*/
|
||||
public function disable()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
26
addons/editable/bootstrap.js
vendored
Normal file
26
addons/editable/bootstrap.js
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
require.config({
|
||||
paths: {
|
||||
'editable': '../libs/bootstrap-table/dist/extensions/editable/bootstrap-table-editable.min',
|
||||
'x-editable': '../addons/editable/js/bootstrap-editable.min',
|
||||
},
|
||||
shim: {
|
||||
'editable': {
|
||||
deps: ['x-editable', 'bootstrap-table']
|
||||
},
|
||||
"x-editable": {
|
||||
deps: ["css!../addons/editable/css/bootstrap-editable.css"],
|
||||
}
|
||||
}
|
||||
});
|
||||
if ($("table.table").length > 0) {
|
||||
require(['editable', 'table'], function (Editable, Table) {
|
||||
$.fn.bootstrapTable.defaults.onEditableSave = function (field, row, oldValue, $el) {
|
||||
var data = {};
|
||||
data["row[" + field + "]"] = row[field];
|
||||
Fast.api.ajax({
|
||||
url: this.extend.edit_url + "/ids/" + row[this.pk],
|
||||
data: data
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
5
addons/editable/config.php
Normal file
5
addons/editable/config.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
];
|
||||
15
addons/editable/controller/Index.php
Normal file
15
addons/editable/controller/Index.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace addons\editable\controller;
|
||||
|
||||
use think\addons\Controller;
|
||||
|
||||
class Index extends Controller
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->error("当前插件暂无前台页面");
|
||||
}
|
||||
|
||||
}
|
||||
10
addons/editable/info.ini
Normal file
10
addons/editable/info.ini
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
name = editable
|
||||
title = 无刷新表格行内编辑
|
||||
intro = 基于x-editable的无刷新表格行内编辑
|
||||
author = FastAdmin
|
||||
website = https://www.fastadmin.net
|
||||
version = 1.0.2
|
||||
state = 1
|
||||
url = http://fast.cc:8088/addons/editable
|
||||
license = regular
|
||||
licenseto = 15976
|
||||
147
application/admin/controller/Message.php
Normal file
147
application/admin/controller/Message.php
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\exception\DbException;
|
||||
use think\response\Json;
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Message extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Message模型对象
|
||||
* @var \app\admin\model\Message
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\Message;
|
||||
$this->view->assign("typeList", $this->model->getTypeList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*
|
||||
* @return string|Json
|
||||
* @throws \think\Exception
|
||||
* @throws DbException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if (false === $this->request->isAjax()) {
|
||||
return $this->view->fetch();
|
||||
}
|
||||
//如果发送的来源是 Selectpage,则转发到 Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||
$list = $this->model
|
||||
->auth($this->auth)
|
||||
->where($where)
|
||||
->where('type',1)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
||||
|
||||
$update = [];
|
||||
foreach ($list as &$item){
|
||||
$readUids = explode(',',$item->read_uid??'');
|
||||
$item->status = 1;
|
||||
if(!in_array($this->auth->id,$readUids)){
|
||||
$readUids[] = $this->auth->id;
|
||||
$update[] = [
|
||||
'id' => $item->id,
|
||||
'read_uid' => implode(',',$readUids),
|
||||
'update_time' => date('Y-m-d H:i:s')
|
||||
];
|
||||
$item->status = 0;
|
||||
}
|
||||
}
|
||||
if($update){
|
||||
$this->batchUpdateByIdSimple('fa_message',$update);
|
||||
}
|
||||
return json($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通用批量更新方法(自动识别主键和字段,无循环)
|
||||
*
|
||||
* @param string $table 表名
|
||||
* @param array $data 数据数组,格式如 [['id' => 1, 'field1' => 'v1'], ['id' => 2, 'field1' => 'v2']]
|
||||
* @param string $idField 主键字段名,默认 'id'
|
||||
* @return int 更新影响行数
|
||||
*/
|
||||
protected function batchUpdateByIdSimple(string $table, array $data, string $idField = 'id'): int
|
||||
{
|
||||
if (empty($data)) return 0;
|
||||
|
||||
$ids = array_column($data, $idField);
|
||||
$fields = array_keys(array_diff_key($data[0], [$idField => '']));
|
||||
|
||||
$sqlParts = [];
|
||||
foreach ($fields as $field) {
|
||||
$case = "CASE {$idField}";
|
||||
foreach ($data as $row) {
|
||||
$id = intval($row[$idField]);
|
||||
$val = addslashes($row[$field]);
|
||||
$case .= " WHEN {$id} THEN '{$val}'";
|
||||
}
|
||||
$case .= " END";
|
||||
$sqlParts[] = "{$field} = {$case}";
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
"UPDATE %s SET %s WHERE %s IN (%s)",
|
||||
$table,
|
||||
implode(", ", $sqlParts),
|
||||
$idField,
|
||||
implode(',', array_map('intval', $ids))
|
||||
);
|
||||
|
||||
return Db::execute($sql);
|
||||
}
|
||||
|
||||
|
||||
public function getNoreadCount()
|
||||
{
|
||||
$count = 0;
|
||||
//超管不提醒新消息
|
||||
if(!$this->auth->isSuperAdmin()){
|
||||
$count = $this->model
|
||||
->where('type',1)
|
||||
->auth($this->auth)
|
||||
//->whereRaw("FIND_IN_SET(?, read_uid) = 0 OR read_uid IS NULL OR read_uid = ''", [$this->auth->id])
|
||||
->whereRaw("FIND_IN_SET({$this->auth->id}, read_uid) = 0 OR read_uid = '' or read_uid is null")
|
||||
->whereTime('create_time', '>=', '-30 days')
|
||||
->count();
|
||||
}
|
||||
return [
|
||||
'count' => $count
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ namespace app\admin\controller;
|
|||
|
||||
use app\admin\addresmart\Address;
|
||||
use app\admin\model\AuthGroupAccess;
|
||||
use app\admin\model\order\Invoice;
|
||||
use app\admin\model\OrderDispatch;
|
||||
use app\admin\model\Worker;
|
||||
use app\admin\model\WorkerItem;
|
||||
|
|
@ -11,6 +12,7 @@ use app\common\controller\Backend;
|
|||
use app\common\Logic\OrderLogic;
|
||||
use fast\Tree;
|
||||
use think\Db;
|
||||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Hook;
|
||||
|
|
@ -32,6 +34,7 @@ class Order extends Backend
|
|||
protected $model = null;
|
||||
protected $sources = null;
|
||||
protected $items = null;
|
||||
protected $itemsformattedTree = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
|
|
@ -79,6 +82,7 @@ class Order extends Backend
|
|||
->select();
|
||||
|
||||
$this->items = $items;
|
||||
$this->itemsformattedTree = $formattedTree;
|
||||
|
||||
|
||||
$coupons = Db::name('coupons')
|
||||
|
|
@ -91,7 +95,6 @@ class Order extends Backend
|
|||
->field(['id', 'nickname'])
|
||||
->select();
|
||||
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
$this->view->assign("sources", $res);
|
||||
$this->view->assign("coupons", $coupons);
|
||||
$this->view->assign("items", $formattedTree);
|
||||
|
|
@ -133,7 +136,7 @@ class Order extends Backend
|
|||
$build = $this->model
|
||||
->field(['id', 'order_no', 'admin_id', 'customer', 'tel', 'status', 'area_id', 'address',
|
||||
'source', 'source_shop', 'source_uid', 'source', 'item_title', 'item_id', 'work_tel_id',
|
||||
'detail', 'remark', 'images', 'create_time', 'update_time', 'admin_id', 'dispatch_type', 'receive_type'])
|
||||
'detail', 'remark', 'images', 'create_time', 'update_time', 'admin_id', 'dispatch_type', 'receive_type','aftersale_id'])
|
||||
->where($where);
|
||||
|
||||
if ($type == 1){
|
||||
|
|
@ -166,6 +169,16 @@ class Order extends Backend
|
|||
}])
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as &$item){
|
||||
$item->aftersale_btn = false;
|
||||
if($item->status == \app\admin\model\Order::STATUS_FINISHED && $item->aftersale_id==0){
|
||||
if($this->auth->check('aftersales/aftersale/add')){
|
||||
$item->aftersale_btn = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
||||
return json($result);
|
||||
}
|
||||
|
|
@ -195,11 +208,12 @@ class Order extends Backend
|
|||
}
|
||||
|
||||
$sources = $this->sources;
|
||||
$items = $this->items;
|
||||
$sources = array_column($sources, 'title', 'id');
|
||||
$items = array_column($items, 'title', 'id');
|
||||
$params['source_shop'] = $sources[$params['source']] ?? null;
|
||||
$params['item_title'] = $items[$params['item_id']] ?? null;
|
||||
|
||||
$params['item_title'] = $this->findElementByValue($this->itemsformattedTree,$params['item_id'] ?? null);
|
||||
|
||||
|
||||
$params['admin_id'] = ($params['admin_id'] ?? -1) == -1 ? $this->auth->id : $params['admin_id'];
|
||||
if (empty($params['admin_id'])) {
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
|
|
@ -266,15 +280,13 @@ class Order extends Backend
|
|||
$items = $this->items;
|
||||
|
||||
$sources = array_column($sources, 'title', 'id');
|
||||
$items = array_column($items, 'title', 'id');
|
||||
|
||||
$params['admin_id'] = ($params['admin_id'] == -1) ? $this->auth->id : $params['admin_id'];
|
||||
if (empty($params['admin_id'])) {
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
}
|
||||
$params['source_shop'] = $sources[$params['source']] ?? null;
|
||||
$params['item_title'] = $items[$params['item_id']] ?? null;
|
||||
|
||||
$params['item_title'] = $this->findElementByValue($this->itemsformattedTree,$params['item_id'] ?? null);
|
||||
// $params['create_time'] = date('Y-m-d H:i:s');
|
||||
$params['update_time'] = date('Y-m-d H:i:s');
|
||||
|
||||
|
|
@ -409,7 +421,7 @@ class Order extends Backend
|
|||
public function addAbnormal($ids = null){
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
$abnormals = model('abnormal')->order('sort','desc')->select();
|
||||
$abnormals = model('abnormal')->where('type',1)->order('sort','desc')->select();
|
||||
$abnormals_data = [];
|
||||
foreach ($abnormals as $abnormal){
|
||||
$abnormals_data [] = $abnormal->toArray();
|
||||
|
|
@ -482,7 +494,7 @@ class Order extends Backend
|
|||
|
||||
if(!empty($order->dispatch)){
|
||||
$orderLogic = new OrderLogic();
|
||||
$orderLogic->cancelOrderDispatch($order->dispatch,$this->auth,'后台取消订单,操作人'.$this->auth->nickname,false);
|
||||
$orderLogic->cancelOrderDispatch($order->dispatch,$this->auth,'订单被取消',false);
|
||||
}
|
||||
|
||||
//日志
|
||||
|
|
@ -572,4 +584,62 @@ class Order extends Backend
|
|||
// 重新索引数组
|
||||
return array_values($filtered_codes);
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function invoice($ids = null){
|
||||
if (false === $this->request->isPost()) {
|
||||
$order = model('order')->get($ids);
|
||||
return $this->fetch('order/invoice/add',['row' => $order]);
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||
$params[$this->dataLimitField] = $this->auth->id;
|
||||
}
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
$params['invoice_method'] = 1;
|
||||
$result = (new Invoice())->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
function findElementByValue($data, $targetValue, $path = []) {
|
||||
foreach ($data as $item) {
|
||||
// 将当前节点的 label 添加到路径中
|
||||
$newPath = array_merge($path, [$item['label']]);
|
||||
|
||||
// 如果找到目标值,返回路径
|
||||
if ($item['value'] == $targetValue) {
|
||||
return implode(' / ', $newPath);
|
||||
}
|
||||
|
||||
// 如果当前节点有 children,递归搜索
|
||||
if (isset($item['children']) && is_array($item['children'])) {
|
||||
$result = $this->findElementByValue($item['children'], $targetValue, $newPath);
|
||||
if ($result) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null; // 如果找不到返回 null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@
|
|||
|
||||
namespace app\admin\controller\aftersales;
|
||||
|
||||
use app\admin\model\Order;
|
||||
use app\common\controller\Backend;
|
||||
use Exception;
|
||||
use think\Db;
|
||||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 售后列管理
|
||||
|
|
@ -72,4 +78,147 @@ class Aftersale extends Backend
|
|||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @return string
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function add($ids = null)
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
if ($ids){
|
||||
$order = model('order')->get($ids);
|
||||
$this->view->assign('order',$order);
|
||||
}else{
|
||||
$order_id = $this->request->param('order_id');
|
||||
if(empty($order_id)){
|
||||
$this->error('请选择订单');
|
||||
}
|
||||
$order = Order::get($order_id);
|
||||
if(empty($order)){
|
||||
$this->error('订单不存在');
|
||||
}
|
||||
$this->assign('order',$order);
|
||||
}
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||
$params[$this->dataLimitField] = $this->auth->id;
|
||||
}
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||
$this->model->validateFailException()->validate($validate);
|
||||
}
|
||||
$order = Order::get($params['order_id'],['dispatch']);
|
||||
if(empty($order)){
|
||||
$this->error('订单不存在');
|
||||
}
|
||||
/* if($order->status != Order::STATUS_FINISHED){
|
||||
$this->error('订单不是完成状态,不可创建售后');
|
||||
}*/
|
||||
if(\app\admin\model\Aftersale::where('order_id',$params['order_id'])->find()){
|
||||
$this->error('订单已存在售后信息,不可重复创建');
|
||||
}
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
$params['admin_user'] = $this->auth->nickname;
|
||||
if(!empty($order->dispatch)){
|
||||
$params['worker_id'] = $order->dispatch->worker_id;
|
||||
$params['worker_name'] = $order->dispatch->worker_name;
|
||||
}
|
||||
$params['status'] = 1;
|
||||
$params['refund_amount'] = bcadd($params['company_refund_amount'],$params['worker_refund_amount'],2);
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
$order->aftersale_id = $this->model->id;
|
||||
$order->save();
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
throw $e;
|
||||
// $this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$order = Order::get($row->order_id);
|
||||
if(empty($order)){
|
||||
$this->error('订单不存在');
|
||||
}
|
||||
$this->view->assign('order',$order);
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
$params['handle_admin_id'] = $this->auth->id;
|
||||
$params['handle_admin_user'] = $this->auth->nickname;
|
||||
$params['refund_amount'] = bcadd($params['company_refund_amount'],$params['worker_refund_amount'],2);
|
||||
|
||||
if(empty($params['company_refund_time'])){
|
||||
$params['company_refund_time'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
if(empty($params['worker_refund_time'])){
|
||||
$params['worker_refund_time'] = date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
$result = $row->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\model\Message;
|
||||
use app\admin\model\Order;
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
|
|
@ -130,7 +131,7 @@ class Auditorder extends Backend
|
|||
if($audit_status){
|
||||
$params['status'] = Order::STATUS_FINISHED;
|
||||
}else{
|
||||
$params['status'] = Order::STATUS_CHECKING;
|
||||
$params['status'] = Order::STATUS_CHECKONCE;
|
||||
}
|
||||
|
||||
$params['audit_admin_id'] = $this->auth->id;
|
||||
|
|
@ -143,6 +144,13 @@ class Auditorder extends Backend
|
|||
$hookParams['remark'] = $params['audit_remark'];
|
||||
Hook::listen('order_change',$hookParams);
|
||||
|
||||
//未通过审核,通知派单员,重新配置
|
||||
Message::create([
|
||||
'to_id' => $row->dispatch_admin_id,
|
||||
'type' => 1,
|
||||
'title' => '订单'.$row->order_no.'财务审核未通过,请重新配置',
|
||||
'content' => '订单编号:'.$row->order_no.',审核说明:'.$params['audit_remark'].',审核人:'.$this->auth->nickname
|
||||
]);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class Configorder extends Backend
|
|||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if($row->status != Order::STATUS_CHECKING){
|
||||
if(!in_array($row->status,[Order::STATUS_CHECKING,Order::STATUS_CHECKONCE])){
|
||||
$this->error('订单不允许操作');
|
||||
}
|
||||
$result = false;
|
||||
|
|
@ -128,7 +128,8 @@ class Configorder extends Backend
|
|||
'offline_amount' => $params['offline_amount'],
|
||||
'refund_amount' => $params['refund_amount'],
|
||||
'cost' => $params['cost'],
|
||||
'offline_amount_type'=> $params['offline_amount_type']
|
||||
'offline_amount_type'=> $params['offline_amount_type'],
|
||||
'amount_images' => $params['amount_images'],
|
||||
];
|
||||
|
||||
$last_amount = bcadd($params['online_amount_last'],$params['offline_amount'],2);
|
||||
|
|
|
|||
|
|
@ -76,19 +76,34 @@ class Dispatch2 extends Backend
|
|||
->paginate($limit);
|
||||
|
||||
foreach ($list as &$row) {
|
||||
$row->btn_edit = (in_array($row->status, $this->model->btnActiveStatusList('btn_edit'))) ? true : false;
|
||||
$row->btn_cancel = (in_array($row->status, $this->model->btnActiveStatusList('btn_cancel'))) ? true : false;
|
||||
$row->btn_abnormal = (in_array($row->status, $this->model->btnActiveStatusList('btn_abnormal'))) ? true : false;
|
||||
$row->btn_finished = (in_array($row->status, $this->model->btnActiveStatusList('btn_finished'))) ? true : false;
|
||||
$row->is_disabled = (in_array($row->status, $this->model->btnActiveStatusList('disabled_status'))) ? true : false;
|
||||
|
||||
$row->btn_record = (in_array($row->status, $this->model->btnActiveStatusList('btn_record'))) ? true : false;
|
||||
$row->btn_edit = in_array($row->status, $this->model->btnActiveStatusList('btn_edit')) && $this->auth->check('orders/dispatch2/edit');
|
||||
$row->btn_cancel = in_array($row->status, $this->model->btnActiveStatusList('btn_cancel')) && $this->auth->check('orders/dispatch2/del');
|
||||
$row->btn_abnormal = in_array($row->status, $this->model->btnActiveStatusList('btn_abnormal'));
|
||||
$row->btn_finished = in_array($row->status, $this->model->btnActiveStatusList('btn_finished')) && $this->auth->check('orders/dispatch2/finish');
|
||||
$row->is_disabled = in_array($row->status, $this->model->btnActiveStatusList('disabled_status'));
|
||||
$row->btn_record = in_array($row->status, $this->model->btnActiveStatusList('btn_record')) && $this->auth->check('orders/dispatchrecord/add');
|
||||
// $row->btn_income = (in_array($row->status, $this->model->btnActiveStatusList('btn_income')) && in_array($row->order->status, $orderModel->incomeBtnStatus())) ? true : false;
|
||||
|
||||
if($row->status == -10){ //拒绝
|
||||
$row->remark = $row->reject_reason;
|
||||
}
|
||||
|
||||
}
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
|
||||
$abnormal = \app\admin\model\Abnormal::where('type',3)->order('sort','desc')->order('id','asc')->select();
|
||||
|
||||
$newList = [];
|
||||
foreach ($abnormal as $item){
|
||||
$newList[$item->title] = $item->title;
|
||||
}
|
||||
|
||||
$selectBuild = build_select('reason_title',$newList,null,['id'=>'reason_title']);
|
||||
$this->assignconfig('abnormal_select',$selectBuild);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
|
@ -243,11 +258,11 @@ class Dispatch2 extends Backend
|
|||
|
||||
$params['status'] = OrderDispatch::STATUS_FINISH;
|
||||
$params['finish_time'] = date('Y-m-d H:i:s');
|
||||
$params['follow'] = 2;
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
//修改订单状态
|
||||
$OrderLogic = new OrderLogic();
|
||||
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台操作完成任务,操作人:'.$this->auth->nickname]);
|
||||
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台完成任务,操作人:'.$this->auth->nickname]);
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
|
|
@ -378,12 +393,7 @@ class Dispatch2 extends Backend
|
|||
];
|
||||
Hook::listen('order_dispatch_change', $hookParams);*/
|
||||
|
||||
$remark2='操作人:'.$this->auth->nickname;
|
||||
if(!empty($remark)){
|
||||
$remark2 .= ',说明:'.$remark;
|
||||
}
|
||||
|
||||
$OrderLogic->cancelOrderDispatch($item,$this->auth,$remark2);
|
||||
$OrderLogic->cancelOrderDispatch($item,$this->auth,$remark);
|
||||
}
|
||||
Db::commit();
|
||||
} catch (PDOException | Exception $e) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use think\Exception;
|
|||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\response\Json;
|
||||
|
||||
/**
|
||||
* 任务记录
|
||||
|
|
@ -40,6 +41,40 @@ class Dispatchrecord extends Backend
|
|||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*
|
||||
* @return string|Json
|
||||
* @throws \think\Exception
|
||||
* @throws DbException
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
|
||||
$dispatch_id = $this->request->get('dispatch_id');
|
||||
|
||||
if (false === $this->request->isAjax()) {
|
||||
return $this->view->fetch();
|
||||
}
|
||||
//如果发送的来源是 Selectpage,则转发到 Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||
$list = $this->model
|
||||
->where($where)
|
||||
->where('dispatch_id',$dispatch_id)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
$result = ['total' => $list->total(), 'rows' => $list->items()];
|
||||
return json($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
@ -55,11 +90,11 @@ class Dispatchrecord extends Backend
|
|||
if(empty($dispatch)){
|
||||
$this->error('没有关联派单');
|
||||
}
|
||||
$list = $this->model->where('dispatch_id',$ids)->order('id','desc')->select();
|
||||
// $list = $this->model->where('dispatch_id',$ids)->order('id','desc')->select();
|
||||
|
||||
$this->assign('dispatch',$dispatch);
|
||||
|
||||
$this->assign('records',$list);
|
||||
// $this->assign('records',$list);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
|
@ -83,8 +118,16 @@ class Dispatchrecord extends Backend
|
|||
}
|
||||
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
$dispatch = OrderDispatch::get($params['dispatch_id']);
|
||||
|
||||
if(empty($dispatch)){
|
||||
$this->error('任务不存在');
|
||||
}
|
||||
$dispatch->follow = 1;
|
||||
$dispatch->record_count ++;
|
||||
$dispatch->save();
|
||||
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
|
|
|
|||
126
application/admin/controller/orders/Invoice.php
Normal file
126
application/admin/controller/orders/Invoice.php
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\controller\order\Exception;
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 发票信息管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Invoice extends Backend
|
||||
{
|
||||
/**
|
||||
* Invoice模型对象
|
||||
* @var \app\admin\model\order\Invoice
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new \app\admin\model\order\Invoice;
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
public function add()
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||
$params[$this->dataLimitField] = $this->auth->id;
|
||||
}
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||
$this->model->validateFailException()->validate($validate);
|
||||
}
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$order = model('order')->get($row['order_id']);
|
||||
$this->view->assign('order', $order);
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
$result = $row->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\model\Aftersale;
|
||||
use app\admin\model\Order;
|
||||
use app\common\controller\Backend;
|
||||
use Exception;
|
||||
use think\Db;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
|
@ -49,7 +51,7 @@ class Review extends Backend
|
|||
public function edit($ids=null)
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
$this->assign('statusList',['0'=>'否','1'=>'是']);
|
||||
//$ids = $this->request->request('ids');
|
||||
|
||||
if(empty($ids)){
|
||||
|
|
@ -62,14 +64,16 @@ class Review extends Backend
|
|||
$this->error('订单不存在');
|
||||
}
|
||||
|
||||
if($order->status != Order::STATUS_FINISHED){
|
||||
/* if($order->status != Order::STATUS_FINISHED){
|
||||
$this->error('订单未完成,不能回访');
|
||||
}
|
||||
}*/
|
||||
if($order->revisit_id > 0){
|
||||
$this->error('订单已完成回访');
|
||||
}
|
||||
|
||||
$this->assign('order',$order);
|
||||
if($order->aftersale_id){
|
||||
$order->aftersale = Aftersale::get($order->aftersale_id);
|
||||
}
|
||||
$this->assign('row',$order);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
|
|
@ -100,7 +104,13 @@ class Review extends Backend
|
|||
}
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
$params['admin_user'] = $this->auth->nickname;
|
||||
$params['worker_id'] = $order->dispatch->worker_id;
|
||||
|
||||
if(!empty($order->dispatch->worker_id)){
|
||||
$params['worker_id'] = $order->dispatch;
|
||||
}
|
||||
if($order->status == 60){
|
||||
$params['is_star'] = 1;
|
||||
}
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
$order->revisit_id = $this->auth->id;
|
||||
$order->save();
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Revisitorder extends Backend
|
|||
$list = $this->model
|
||||
//->with(['orderreview'])
|
||||
->where($where)
|
||||
->where('status',Order::STATUS_FINISHED)
|
||||
->whereIn('status',[Order::STATUS_FINISHED,Order::STATUS_CANCEL])
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
|
|
@ -77,6 +77,10 @@ class Revisitorder extends Backend
|
|||
foreach ($list as $row) {
|
||||
if($row->revisit_id && isset($reviews[$row->revisit_id])){
|
||||
$row->review = $reviews[$row->revisit_id];
|
||||
if(empty($row->review) || $row->review['is_star'] == 0){
|
||||
$row->pt_star = '-';
|
||||
$row->worker_star = '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace app\admin\controller\workers;
|
|||
|
||||
use app\admin\model\AuthGroup;
|
||||
use app\admin\model\Item;
|
||||
use app\admin\model\Order;
|
||||
use app\common\controller\Backend;
|
||||
use fast\Tree;
|
||||
use think\Db;
|
||||
|
|
@ -81,22 +82,24 @@ class Worker extends Backend
|
|||
$item_id = request()->get('item_id');
|
||||
$keyword = request()->get('keyword');
|
||||
$build = $this->model
|
||||
->with(['area'])
|
||||
->with(['area','admin' => function($q){
|
||||
$q->withField(['id','username']);
|
||||
}])
|
||||
->where($where)
|
||||
->field('worker.id,name,tel,area_id,create_time,deposit_amount,update_time,status,star')
|
||||
->field('worker.id,admin_id,type,name,tel,area_id,create_time,deposit_amount,update_time,status,star')
|
||||
->order($sort, $order);
|
||||
if ($keyword){
|
||||
if ($keyword) {
|
||||
$build->where(function ($q) use ($keyword) {
|
||||
$q->where('name','like','%'.$keyword.'%')->whereOr('tel','like','%'.$keyword.'%');
|
||||
$q->where('name', 'like', '%' . $keyword . '%')->whereOr('tel', 'like', '%' . $keyword . '%');
|
||||
});
|
||||
}
|
||||
if ($item_id){
|
||||
$build->join('worker_item','worker_item.worker_id = worker.id','left');
|
||||
$build->where('worker_item.item_id',$item_id);
|
||||
if ($item_id) {
|
||||
$build->join('worker_item', 'worker_item.worker_id = worker.id', 'left');
|
||||
$build->where('worker_item.item_id', $item_id);
|
||||
}
|
||||
|
||||
if ($area_code){
|
||||
$build->where('area_id','like',$this->getSelectAreaCode($area_code).'%');
|
||||
if ($area_code) {
|
||||
$build->where('area_id', 'like', $this->getSelectAreaCode($area_code) . '%');
|
||||
}
|
||||
|
||||
$list = $build
|
||||
|
|
@ -107,22 +110,22 @@ class Worker extends Backend
|
|||
return json($result);
|
||||
}
|
||||
|
||||
$items = Db::name('item')
|
||||
->where('status',1)
|
||||
->field(['id','title','key_word','pid'])
|
||||
->order('pid','asc')
|
||||
->order('sort','desc')
|
||||
$items = Db::name('item')
|
||||
->where('status', 1)
|
||||
->field(['id', 'title', 'key_word', 'pid'])
|
||||
->order('pid', 'asc')
|
||||
->order('sort', 'desc')
|
||||
->select();
|
||||
$filtered = array_filter($items, function($item) {
|
||||
$filtered = array_filter($items, function ($item) {
|
||||
return $item['pid'] == 0;
|
||||
});
|
||||
|
||||
$pid_map = array_column($filtered,null,'id');
|
||||
$pid_map = array_column($filtered, null, 'id');
|
||||
$res_items = [];
|
||||
foreach ($items as $item){
|
||||
if ($item['pid'] != 0 && isset($pid_map[$item['pid']])){
|
||||
foreach ($items as $item) {
|
||||
if ($item['pid'] != 0 && isset($pid_map[$item['pid']])) {
|
||||
$res_items [] = [
|
||||
...$item,'ptitle' => $pid_map[$item['pid']]['title']
|
||||
...$item, 'ptitle' => $pid_map[$item['pid']]['title']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -154,9 +157,10 @@ class Worker extends Backend
|
|||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||
$this->model->validateFailException()->validate($validate);
|
||||
}
|
||||
$params['admin_id'] = $this->auth->id;
|
||||
$result = $this->model->allowField(true)->save($params);
|
||||
$item_map = model('item')->getAll();
|
||||
$item_map = array_column($item_map,'level','id');
|
||||
$item_map = array_column($item_map, 'level', 'id');
|
||||
if ($result) {
|
||||
$items = explode(',', $params['rules']);
|
||||
if ($items) {
|
||||
|
|
@ -173,7 +177,7 @@ class Worker extends Backend
|
|||
}
|
||||
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
|
|
@ -188,12 +192,12 @@ class Worker extends Backend
|
|||
{
|
||||
|
||||
if (!$ids) {
|
||||
if (request()->isPost()){
|
||||
if (request()->isPost()) {
|
||||
$ids = input('id');
|
||||
if (!$ids){
|
||||
if (!$ids) {
|
||||
$this->error('缺少订单ID');
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$this->error('缺少订单ID');
|
||||
}
|
||||
}
|
||||
|
|
@ -210,7 +214,7 @@ class Worker extends Backend
|
|||
$params = input('post.row/a');
|
||||
|
||||
$item_map = model('item')->getAll();
|
||||
$item_map = array_column($item_map,'level','id');
|
||||
$item_map = array_column($item_map, 'level', 'id');
|
||||
if ($ids) {
|
||||
$items = explode(',', $params['rules']);
|
||||
if ($items) {
|
||||
|
|
@ -222,7 +226,7 @@ class Worker extends Backend
|
|||
'item_path_id' => $item_map[$item] ?? 0
|
||||
];
|
||||
}
|
||||
model('WorkerItem')->where('worker_id',$ids)->delete();
|
||||
model('WorkerItem')->where('worker_id', $ids)->delete();
|
||||
model('WorkerItem')->insertAll($insert);
|
||||
}
|
||||
}
|
||||
|
|
@ -234,14 +238,14 @@ class Worker extends Backend
|
|||
$this->success('更新成功', 'index');
|
||||
}
|
||||
$area_name = model('area')->getNameByCode($worker->area_id);
|
||||
$worker->area_name = str_replace(',','/',$area_name);
|
||||
$worker->area_name = str_replace(',', '/', $area_name);
|
||||
|
||||
|
||||
$select_ids = model('WorkerItem')->where('worker_id',$ids)->field('item_id')
|
||||
$select_ids = model('WorkerItem')->where('worker_id', $ids)->field('item_id')
|
||||
->select();
|
||||
$select_ids = array_column($select_ids,'item_id');
|
||||
foreach ($this->tree as $index=>$item){
|
||||
if (in_array($item['parent'],$select_ids)){
|
||||
$select_ids = array_column($select_ids, 'item_id');
|
||||
foreach ($this->tree as $index => $item) {
|
||||
if (in_array($item['parent'], $select_ids)) {
|
||||
$this->tree[$index]['state']['selected'] = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -253,23 +257,32 @@ class Worker extends Backend
|
|||
return $this->fetch();
|
||||
}
|
||||
|
||||
public function dispatchList(){
|
||||
public function dispatchList()
|
||||
{
|
||||
|
||||
$area_id = request()->get('area_id');
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$build = model('worker')
|
||||
->where('status',1)
|
||||
->where('status', 1)
|
||||
->with(['area'])
|
||||
->field(['id','name','tel','area_id','lng','lat']);
|
||||
->withCount(['myorder' => function ($query) {
|
||||
$query->where('status', Order::STATUS_FINISHED);
|
||||
return 'finish_order';
|
||||
},])
|
||||
->withCount(['myorder' => function ($query) {
|
||||
$query->where('status', '<', Order::STATUS_FINISHED)
|
||||
->where('status', '>=', Order::STATUS_DRAFT);
|
||||
return 'doing_order';
|
||||
}])
|
||||
->field(['id', 'name', 'tel', 'area_id', 'lng', 'lat']);
|
||||
|
||||
if ($area_id){
|
||||
if ($area_id) {
|
||||
$code = $this->getSelectAreaCode(substr_replace($area_id, '00', -2));
|
||||
$build->where('area_id','like', $code.'%');
|
||||
$build->where('area_id', 'like', $code . '%');
|
||||
}
|
||||
$list = $build
|
||||
->paginate($limit);
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ return [
|
|||
'Id' => 'ID',
|
||||
'Order_id' => '订单ID',
|
||||
'Status' => '状态',
|
||||
'Status 1' => '售后中',
|
||||
'Set status to 1' => '设为售后中',
|
||||
'Status 1' => '待处理',
|
||||
'Set status to 1' => '设为待处理',
|
||||
'Status 2' => '已办结',
|
||||
'Set status to 2' => '设为已办结',
|
||||
'Status 3' => '已退款',
|
||||
|
|
@ -25,6 +25,7 @@ return [
|
|||
'Company_refund_amount' => '公司退款金额',
|
||||
'Worker_refund_amount' => '师傅退款金额',
|
||||
'Refund_type' => '退款方式',
|
||||
'Refund_type 0' => '无',
|
||||
'Refund_type 1' => '微信支付',
|
||||
'Refund_type 2' => '平台退款',
|
||||
'Worker_refund_entry' => '师傅退款入账',
|
||||
|
|
|
|||
15
application/admin/lang/zh-cn/message.php
Normal file
15
application/admin/lang/zh-cn/message.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'To_id' => '接收人',
|
||||
'Area_id' => '接收地址',
|
||||
'Type' => '类型',
|
||||
'Type 1' => '系统消息',
|
||||
'Type 2' => '师傅消息',
|
||||
'Title' => '标题',
|
||||
'Read_uid' => '已读用户',
|
||||
'Content' => '内容',
|
||||
'Uri' => '带参相对地址',
|
||||
'Create_time' => '创建时间',
|
||||
'Update_time' => '更新时间'
|
||||
];
|
||||
|
|
@ -16,10 +16,10 @@ return [
|
|||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待配置',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 41' => '审核驳回',
|
||||
'Set status to 41' => '设为审核驳回',
|
||||
'Status 50' => '待财务审核',
|
||||
'Set status to 50' => '设为待财务审核',
|
||||
'Status 41' => '结算驳回',
|
||||
'Set status to 41' => '设为结算驳回',
|
||||
'Status 50' => '待结算',
|
||||
'Set status to 50' => '设为待结算',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '取消',
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ return [
|
|||
'Status 30' => '进行中',
|
||||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待配置',
|
||||
'Status 41' => '审核驳回',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 50' => '待财务审核',
|
||||
'Set status to 50' => '设为待财务审核',
|
||||
'Status 50' => '待结算',
|
||||
'Set status to 50' => '设为待结算',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '取消',
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ return [
|
|||
'Order.status 30' => '进行中',
|
||||
'Order.status 40' => '待配置',
|
||||
'Order.status 41' => '审核驳回',
|
||||
'Order.status 50' => '待财务审核',
|
||||
'Order.status 50' => '待结算',
|
||||
'Order.status 60' => '已完成',
|
||||
'Order.status -10' => '取消',
|
||||
'Order.area_id' => '地域',
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ return [
|
|||
'Order.status 30' => '进行中',
|
||||
'Order.status 40' => '待配置',
|
||||
'Order.status 41' => '审核驳回',
|
||||
'Order.status 50' => '待财务审核',
|
||||
'Order.status 50' => '待结算',
|
||||
'Order.status 60' => '已完成',
|
||||
'Order.status -10' => '取消',
|
||||
'Order.area_id' => '地域',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
return [
|
||||
'Dispatch_id' => '任务ID',
|
||||
'Worker_id' => '师傅ID',
|
||||
'Remark' => '备注',
|
||||
'Remark' => '跟进内容',
|
||||
'Need_notice' => '是否提醒',
|
||||
'Need_notice 0' => '不需要',
|
||||
'Need_notice 1' => '需要',
|
||||
|
|
@ -12,7 +12,7 @@ return [
|
|||
'Set status to 0'=> '设为未通知',
|
||||
'Status 1' => '已通知',
|
||||
'Set status to 1'=> '设为已通知',
|
||||
'Notice_time' => '提醒时间',
|
||||
'Notice_time' => '下次跟进',
|
||||
'Create_time' => '创建时间',
|
||||
'Update_time' => '更新时间',
|
||||
'Admin_id' => '管理员ID'
|
||||
|
|
|
|||
22
application/admin/lang/zh-cn/orders/invoice.php
Normal file
22
application/admin/lang/zh-cn/orders/invoice.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'Id' => '发票ID',
|
||||
'Order_id' => '订单ID',
|
||||
'Invoice_type' => '发票类型',
|
||||
'Title' => '发票抬头',
|
||||
'Tax_number' => '纳税人识别号',
|
||||
'Amount' => '发票金额',
|
||||
'Invoice_method' => '发票方式',
|
||||
'Recipient_email' => '接收邮箱(电子)',
|
||||
'Company_address' => '公司注册地址',
|
||||
'Company_phone' => '公司注册电话',
|
||||
'Bank_name' => '开户行名称',
|
||||
'Bank_account' => '银行账号',
|
||||
'Recipient_address' => '收件地址(纸质)',
|
||||
'Recipient_name' => '收件人姓名',
|
||||
'Recipient_phone' => '收件人电话',
|
||||
'Issued_at' => '开票时间',
|
||||
'Status' => '开票状态',
|
||||
'Remark' => '备注'
|
||||
];
|
||||
|
|
@ -16,8 +16,8 @@ return [
|
|||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待验收',
|
||||
'Set status to 40' => '设为待验收',
|
||||
'Status 50' => '待财务审核',
|
||||
'Set status to 50' => '设为待财务审核',
|
||||
'Status 50' => '待结算',
|
||||
'Set status to 50' => '设为待结算',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '取消',
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class Aftersale extends Model
|
|||
|
||||
public function getRefundTypeList()
|
||||
{
|
||||
return ['1' => __('Refund_type 1'), '2' => __('Refund_type 2')];
|
||||
return ['0' => __('Refund_type 0'),'1' => __('Refund_type 1'), '2' => __('Refund_type 2')];
|
||||
}
|
||||
|
||||
public function getWorkerRefundEntryList()
|
||||
|
|
|
|||
86
application/admin/model/Message.php
Normal file
86
application/admin/model/Message.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\admin\library\Auth;
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Message extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'message';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'datetime';
|
||||
|
||||
protected $dateFormat = 'Y-m-d H:i:s';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'create_time';
|
||||
protected $updateTime = 'update_time';
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'type_text'
|
||||
];
|
||||
|
||||
|
||||
|
||||
public function getTypeList()
|
||||
{
|
||||
return ['1' => __('Type 1'), '2' => __('Type 2')];
|
||||
}
|
||||
|
||||
|
||||
public function getTypeTextAttr($value, $data)
|
||||
{
|
||||
$value = $value ?: ($data['type'] ?? '');
|
||||
$list = $this->getTypeList();
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 管理员权限
|
||||
* @param $query
|
||||
* @param Auth $auth
|
||||
* @param string $auth_admin_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeAuth($query, Auth $auth, string $admin_id_field='to_id'){
|
||||
|
||||
if(!$auth->isSuperAdmin()){
|
||||
$query->where($admin_id_field,$auth->id);
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 地域权限
|
||||
* @param $query
|
||||
* @param Auth $auth
|
||||
* @param string $area_id_field
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeAreaauth($query,Auth $auth,string $area_id_field='area_id'){
|
||||
if(!$auth->isSuperAdmin()){
|
||||
$areaIds = array_unique(array_filter(explode(',',trim($auth->area_ids))));
|
||||
if(!in_array('*',$areaIds)){
|
||||
$query->whereIn($area_id_field,$areaIds);
|
||||
}
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -49,7 +49,8 @@ class Order extends Model
|
|||
const STATUS_DISPATCHING = 10; //待派单
|
||||
const STATUS_DISPATCHED = 20; //已派单
|
||||
//const STATUS_ING = 30; //进行中
|
||||
const STATUS_CHECKING = 40; //待派单
|
||||
const STATUS_CHECKING = 40; //待审核
|
||||
const STATUS_CHECKONCE = 41; //审核未通过
|
||||
const STATUS_AUDITING = 50; //审核中
|
||||
const STATUS_FINISHED = 60; //已完成
|
||||
const STATUS_CANCEL = -10; //取消
|
||||
|
|
@ -61,7 +62,9 @@ class Order extends Model
|
|||
{
|
||||
return ['0' => __('Status 0'),'10' => __('Status 10'), '20' => __('Status 20'),
|
||||
//'30' => __('Status 30'),
|
||||
'40' => __('Status 40'), '50' => __('Status 50'), '60' => __('Status 60'), '-10' => __('Status -10')];
|
||||
'40' => __('Status 40'),
|
||||
'41' => __('Status 41'),
|
||||
'50' => __('Status 50'), '60' => __('Status 60'), '-10' => __('Status -10')];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -146,7 +149,8 @@ class Order extends Model
|
|||
self::STATUS_FINISHED
|
||||
],
|
||||
self::TAB_SETTING => [
|
||||
self::STATUS_CHECKING
|
||||
self::STATUS_CHECKING,
|
||||
self::STATUS_CHECKONCE
|
||||
],
|
||||
];
|
||||
return $tabStatus[$tab] ?? [];
|
||||
|
|
|
|||
|
|
@ -50,4 +50,16 @@ class Worker extends BaseModel
|
|||
return $this->belongsTo('Area', 'area_id', 'area_code');
|
||||
}
|
||||
|
||||
public function admin()
|
||||
{
|
||||
return $this->belongsTo('admin', 'admin_id');
|
||||
}
|
||||
|
||||
|
||||
public function myorder(){
|
||||
|
||||
return $this->hasMany(OrderDispatch::class, 'worker_id');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
47
application/admin/model/order/Invoice.php
Normal file
47
application/admin/model/order/Invoice.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\model\order;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Invoice extends Model
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 表名
|
||||
protected $name = 'order_invoice';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
protected $deleteTime = false;
|
||||
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
|
||||
];
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return [
|
||||
'0' => '代处理',
|
||||
'1' => '已开票',
|
||||
'2' => '已完成',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
27
application/admin/validate/Message.php
Normal file
27
application/admin/validate/Message.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Message extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/order/Invoice.php
Normal file
27
application/admin/validate/order/Invoice.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\validate\order;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Invoice extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -1,24 +1,19 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id" data-field="order_no" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
|
||||
{if isset($order)}
|
||||
<input id="c-order_sn" disabled data-rule="required" value="{$order.order_no}" class="form-control" type="text" >
|
||||
<input id="c-order_id" value="{$order.id}" style="display: none" class="form-control" name="row[order_id]" type="text" >
|
||||
{else /}value3
|
||||
<input id="c-order_no" readonly data-rule="required" class="form-control" type="text" value="{$order.order_no}">
|
||||
<input type="hidden" name="row[order_id]" value="{$order.id}">
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-handle_type" data-rule="required" class="form-control selectpicker" name="row[handle_type]">
|
||||
{foreach name="handleTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('From')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -31,22 +26,17 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_amount" data-rule="required" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_amount" data-rule="required" class="form-control" step="0.01" name="row[company_refund_amount]" type="number" value="0.00">
|
||||
<input id="c-company_refund_amount" data-rule="required" min="0" class="form-control" step="0.01" name="row[company_refund_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_amount" data-rule="required" class="form-control" step="0.01" name="row[worker_refund_amount]" type="number" value="0.00">
|
||||
<input id="c-worker_refund_amount" data-rule="required" min="0" class="form-control" step="0.01" name="row[worker_refund_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -73,12 +63,12 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refund_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_appeal')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -88,10 +78,18 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_qrcode')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_qrcode" class="form-control" name="row[customer_qrcode]" type="text">
|
||||
<div class="input-group">
|
||||
<input id="c-customer_qrcode" class="form-control" size="50" name="row[customer_qrcode]" type="text" value="">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-customer_qrcode" class="btn btn-danger faupload" data-input-id="c-customer_qrcode" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple=false data-preview-id="p-customer_qrcode"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-customer_qrcode" class="btn btn-primary fachoose" data-input-id="c-customer_qrcode" data-mimetype="image/*" data-multiple=false><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-customer_qrcode"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-customer_qrcode"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
|
|
@ -104,51 +102,16 @@
|
|||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-remark" class="form-control" name="row[remark]" placeholder="备注"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[company_refund_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[worker_refund_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-star" data-rule="required" class="form-control" name="row[star]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,13 @@
|
|||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input placeholder="选择订单编号" id="c-order_id" data-field="order_no" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|htmlentities}">
|
||||
<input placeholder="选择订单编号" id="c-order_id" data-field="order_no" data-rule="required" class="form-control" readonly type="text" value="{$order.order_no|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-handle_type" data-rule="required" class="form-control selectpicker" name="row[handle_type]">
|
||||
{foreach name="handleTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.handle_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('From')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -31,22 +20,17 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_amount" data-rule="required" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="{$row.refund_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_amount" data-rule="required" class="form-control" step="0.01" name="row[company_refund_amount]" type="number" value="{$row.company_refund_amount|htmlentities}">
|
||||
<input id="c-company_refund_amount" data-rule="required" min="0" class="form-control" step="0.01" name="row[company_refund_amount]" type="number" value="{$row.company_refund_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_amount" data-rule="required" class="form-control" step="0.01" name="row[worker_refund_amount]" type="number" value="{$row.worker_refund_amount|htmlentities}">
|
||||
<input id="c-worker_refund_amount" data-rule="required" min="0" class="form-control" step="0.01" name="row[worker_refund_amount]" type="number" value="{$row.worker_refund_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -73,24 +57,48 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refund_time]" type="text" value="{$row.refund_time}">
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[company_refund_time]" type="text" value="{$row.company_refund_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[worker_refund_time]" type="text" value="{$row.worker_refund_time}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_appeal')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea class="form-control" id="c-customer_appeal" name="row[customer_appeal]" data-rule="required" placeholder="客户诉求">{$row.customer_appeal|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_qrcode')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_qrcode" class="form-control" name="row[customer_qrcode]" type="text" value="{$row.customer_qrcode|htmlentities}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_qrcode')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="c-customer_qrcode" class="form-control" size="50" name="row[customer_qrcode]" type="text" value="{$row.customer_qrcode|htmlentities}">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-customer_qrcode" class="btn btn-danger faupload" data-input-id="c-customer_qrcode" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple=false data-preview-id="p-customer_qrcode"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-customer_qrcode" class="btn btn-primary fachoose" data-input-id="c-customer_qrcode" data-mimetype="image/*" data-multiple=false><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-customer_qrcode"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-customer_qrcode"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -108,44 +116,16 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
|
||||
<textarea id="c-remark" class="form-control" name="row[remark]" >{$row.remark|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[company_refund_time]" type="text" value="{$row.company_refund_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[worker_refund_time]" type="text" value="{$row.worker_refund_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Admin_user')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-admin_user" data-rule="required" class="form-control" name="row[admin_user]" type="text" value="{$row.admin_user|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_admin_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-handle_admin_id" data-rule="required" data-source="handle/admin/index" class="form-control selectpage" name="row[handle_admin_id]" type="text" value="{$row.handle_admin_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_admin_user')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-handle_admin_user" data-rule="required" class="form-control" name="row[handle_admin_user]" type="text" value="{$row.handle_admin_user|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-star" data-rule="required" class="form-control" name="row[star]" type="number" value="{$row.star|htmlentities}">
|
||||
<input id="c-star" data-rule="required" min="1" max="5" step="1" class="form-control" name="row[star]" type="number" value="{$row.star|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -163,10 +143,28 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-handle_type" data-rule="required" class="form-control selectpicker" name="row[handle_type]">
|
||||
{foreach name="handleTypeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.handle_type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{if condition='$row.status eq 1'}
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('aftersales/aftersale/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('aftersales/aftersale/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('aftersales/aftersale/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('aftersales/aftersale/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
|
||||
-->
|
||||
<div class="dropdown btn-group {:$auth->check('aftersales/aftersale/multi')?'':'hide'}">
|
||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
||||
<ul class="dropdown-menu text-left" role="menu">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,24 @@
|
|||
<input id="c-username" class="form-control" name="row[username]" type="text">
|
||||
</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-nickname" class="form-control" name="row[nickname]" type="text">
|
||||
</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-phone" class="form-control" name="row[phone]" type="text">
|
||||
</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">
|
||||
<textarea id="c-address" class="form-control " rows="5" name="row[address]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
|
|
@ -6,12 +6,33 @@
|
|||
<input id="c-username" class="form-control" name="row[username]" type="text" value="{$row.username|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-nickname" class="form-control" value="{$row.nickname|htmlentities}" name="row[nickname]" type="text">
|
||||
</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-phone" class="form-control" value="{$row.phone|htmlentities}" name="row[phone]" type="text">
|
||||
</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">
|
||||
<textarea id="c-address" class="form-control " rows="5" name="row[address]" cols="50">{$row.address|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-reason" class="form-control " rows="5" name="row[reason]" cols="50">{$row.reason|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li class="hidden-xs">
|
||||
<a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- 清除缓存 -->
|
||||
<li class="hidden-xs">
|
||||
|
|
@ -45,6 +43,14 @@
|
|||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="hidden-xs">
|
||||
<!-- <a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>-->
|
||||
<a href="message/index" class="addtabsit my-message">
|
||||
<i class="fa fa-bullhorn"></i>
|
||||
消息(<span class="my-message-count text-danger text-bold">0</span>)
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- 多语言列表 -->
|
||||
{if $Think.config.lang_switch_on}
|
||||
<li class="hidden-xs">
|
||||
|
|
@ -83,14 +89,24 @@
|
|||
</li>
|
||||
<li class="user-body">
|
||||
<div class="visible-xs">
|
||||
<div class="pull-left">
|
||||
<!-- <div class="pull-left">
|
||||
<a href="__PUBLIC__" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> {:__('Home')}</a>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="pull-right">
|
||||
<a href="javascript:;" data-type="all" class="wipecache"><i class="fa fa-trash fa-fw"></i> {:__('Wipe all cache')}</a>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<a href="/admin/message/index" class="addtabsit my-message">
|
||||
<i class="fa fa-bullhorn"></i>
|
||||
消息(<span class="my-message-count text-danger text-bold">0</span>)
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
|
|
|
|||
69
application/admin/view/message/add.html
Normal file
69
application/admin/view/message/add.html
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('To_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-to_id" data-rule="required" data-source="to/index" class="form-control selectpage" name="row[to_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-area_id" data-rule="required" data-source="area/index" class="form-control selectpage" name="row[area_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||
{foreach name="typeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Read_uid')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-read_uid" class="form-control " rows="5" name="row[read_uid]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Uri')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-uri" class="form-control" name="row[uri]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
69
application/admin/view/message/edit.html
Normal file
69
application/admin/view/message/edit.html
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('To_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-to_id" data-rule="required" data-source="to/index" class="form-control selectpage" name="row[to_id]" type="text" value="{$row.to_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-area_id" data-rule="required" data-source="area/index" class="form-control selectpage" name="row[area_id]" type="text" value="{$row.area_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||
{foreach name="typeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Read_uid')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-read_uid" class="form-control " rows="5" name="row[read_uid]" cols="50">{$row.read_uid|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Uri')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-uri" class="form-control" name="row[uri]" type="text" value="{$row.uri|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
26
application/admin/view/message/index.html
Normal file
26
application/admin/view/message/index.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('message/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('message/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('message/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
-->
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('message/edit')}"
|
||||
data-operate-del="{:$auth->check('message/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -6,7 +6,6 @@
|
|||
<div class="form-area">
|
||||
<div>
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">录入订单</h5>
|
||||
<form id="add-form" class="row" role="form" data-toggle="validator" method="POST" action="">
|
||||
<div class="form-group col-xs-6">
|
||||
<label class="control-label col-xs-12 col-sm-3">{:__('Customer')}:</label>
|
||||
|
|
@ -56,8 +55,8 @@
|
|||
<label class="control-label col-xs-12 col-sm-3">派单方式:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select data-live-search="true" name="row[dispatch_type]" class="form-control selectpicker show-tick">
|
||||
<option selected value="1">手动派单</option>
|
||||
<option value="2">自动派单</option>
|
||||
<option value="1">手动派单</option>
|
||||
<option selected value="2">自动派单</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -194,7 +193,7 @@
|
|||
<link rel="stylesheet" href="/assets/css/select.css">
|
||||
<style>
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
/*height: 100vh;*/
|
||||
width: 100vw;
|
||||
background: #fff;
|
||||
}
|
||||
|
|
@ -216,7 +215,7 @@
|
|||
}
|
||||
.content {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
/*height: 100vh;*/
|
||||
}
|
||||
.form-area {
|
||||
flex: 2;
|
||||
|
|
@ -249,6 +248,18 @@
|
|||
.suggestion-item:hover {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
.control-label{
|
||||
text-align: right;
|
||||
}
|
||||
.col-xs-12{
|
||||
margin: 5px 0;
|
||||
position: relative;
|
||||
}
|
||||
.msg-box{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@
|
|||
<label class="control-label col-xs-12 col-sm-3">派单方式:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select data-live-search="true" value="" name="row[dispatch_type]" class="form-control selectpicker show-tick">
|
||||
<option {if 1 == $row.dispatch_type} value="1">手动派单</option>
|
||||
<option {if 2 == $row.dispatch_type} value="2">自动派单</option>
|
||||
<option {if 1 == $row.dispatch_type} selected {/if} value="1">手动派单</option>
|
||||
<option {if 2 == $row.dispatch_type} selected {/if} value="2">自动派单</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -67,8 +67,8 @@
|
|||
<label class="control-label col-xs-12 col-sm-3">收款方式:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select name="row[receive_type]" class="form-control selectpicker">
|
||||
<option {if 1 == $row.receive_type} value="1">已收定金</option>
|
||||
<option {if 2 == $row.receive_type} value="2">已收全款</option>
|
||||
<option {if 1 == $row.receive_type} selected {/if} value="1">已收定金</option>
|
||||
<option {if 2 == $row.receive_type} selected {/if} value="2">已收全款</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
<label class="control-label col-xs-12 col-sm-3">{:__('Coupons')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-coupon" data-live-search="true" title="请选择" data-rule="required" name="row[coupon_id]" class="form-control selectpicker show-tick">
|
||||
<option {if $item['id'] == $row.coupon_id} selected {/if} selected value="0">不使用优惠</option>
|
||||
<option {if $item['id'] == $row.coupon_id} selected {/if} value="0">不使用优惠</option>
|
||||
{foreach $coupons as $item}
|
||||
<option {if $item['id'] == $row.coupon_id} selected {/if} data-subtext="{$item['description']}" value="{$item['id']}">{$item['code']}</option>
|
||||
{/foreach}
|
||||
|
|
|
|||
101
application/admin/view/order/invoice/add.html
Normal file
101
application/admin/view/order/invoice/add.html
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<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-order_id" data-rule="required" disabled data-source="order/index" class="form-control" type="text" value="{$row.order_no}">
|
||||
</div>
|
||||
</div>
|
||||
<input class="form-control" style="display: none" name="row[order_id]" type="text" value="{$row.id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">发票类型:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-source" data-live-search="true" title="请选择" data-rule="required" name="row[invoice_type]" class="form-control">
|
||||
<option selected value="1">公司发票</option>
|
||||
<option value="2">个人发票</option>
|
||||
</select>
|
||||
</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-title" data-rule="required" class="form-control" name="row[title]" type="text">
|
||||
</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-tax_number" class="form-control" name="row[tax_number]" type="text">
|
||||
</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-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" value="{$row.total}" type="number">
|
||||
</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-company_address" class="form-control" name="row[company_address]" type="text">
|
||||
</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-company_phone" class="form-control" name="row[company_phone]" type="text">
|
||||
</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-bank_name" class="form-control" name="row[bank_name]" type="text">
|
||||
</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-bank_account" class="form-control" name="row[bank_account]" type="text">
|
||||
</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-recipient_email" class="form-control" name="row[recipient_email]" type="text">
|
||||
</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-recipient_address" class="form-control" name="row[recipient_address]" type="text">
|
||||
</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-recipient_name" class="form-control" name="row[recipient_name]" type="text">
|
||||
</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-recipient_phone" class="form-control" name="row[recipient_phone]" type="text">
|
||||
</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">
|
||||
<textarea id="c-remark" class="form-control " rows="5" name="row[remark]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Abnormal_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-abnormal_id" data-field="title" data-rule="required" data-source="setting/abnormal/index" class="form-control selectpage" name="row[abnormal_id]" type="text" value="">
|
||||
<input id="c-abnormal_id" data-field="title" data-params='{"custom[type]":"1"}' data-rule="required" data-source="setting/abnormal/index" class="form-control selectpage" name="row[abnormal_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-handle_detail" class="form-control" rows="5" name="row[handle_detail]" cols="50">{$row.handle_detail|htmlentities}</textarea>
|
||||
<textarea id="c-handle_detail" data-rule="required" class="form-control" rows="5" name="row[handle_detail]" cols="50">{$row.handle_detail|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-detail" readonly class="form-control" type="text" value="{$row.detail|htmlentities}">
|
||||
<textarea id="c-detail" readonly class="form-control" placeholder="订单详情" >{$row.detail|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -36,12 +36,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-address" class="form-control" readonly type="text" value="{$row.address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--
|
||||
|
|
@ -76,6 +70,17 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input readonly class="form-control" value="{$row['offline_amount_type_text']}">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -85,12 +90,18 @@
|
|||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('收款依据')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input readonly class="form-control" value="{$row['offline_amount_type_text']}">
|
||||
<div class="input-group">
|
||||
<input id="c-amount_images" class="form-control" size="50" type="text" value="{$order.amount_images}" >
|
||||
<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="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>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-amount_images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-amount_images"></ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
<div class="panel-heading">
|
||||
{:build_heading(null,FALSE)}
|
||||
<ul class="nav nav-tabs" data-field="status">
|
||||
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
|
||||
{foreach name="statusList" item="vo"}
|
||||
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
|
||||
{/foreach}
|
||||
<li class="active">
|
||||
<a href="#t-50" data-value="50" data-toggle="tab">待结算</a>
|
||||
</li>
|
||||
<li class="{:$Think.get.status === '60' ? 'active' : ''}">
|
||||
<a href="#t-60" data-value="60" data-toggle="tab">已完成</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -49,27 +49,109 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{if condition='$row.status eq 40'}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount_last')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-online_amount_last" data-rule="required" class="form-control" step="0.01" name="row[online_amount_last]" type="number" value="{$row.dispatch.online_total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[offline_amount_type]',$offlineTotalTypeList,$row['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-offline_amount" data-rule="required" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.dispatch.total|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">
|
||||
<div class="input-group">
|
||||
<input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.dispatch.image}" >
|
||||
<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="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>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-amount_images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-amount_images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.dispatch.amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/if}
|
||||
|
||||
{if condition='$row.status eq 41'}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount_last')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-online_amount_last" data-rule="required" class="form-control" step="0.01" name="row[online_amount_last]" type="number" value="{$row.dispatch.online_total|htmlentities}">
|
||||
<input id="c-online_amount_last" data-rule="required" class="form-control" step="0.01" name="row[online_amount_last]" type="number" value="{$row.online_amount_last|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
{:build_select('row[offline_amount_type]',$offlineTotalTypeList,$row['offline_amount_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-offline_amount" data-rule="required" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.dispatch.total|htmlentities}">
|
||||
<input id="c-offline_amount" data-rule="required" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.offline_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount_type')}:</label>
|
||||
<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['dispatch']['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
<div class="input-group">
|
||||
<input id="c-amount_images" class="form-control" size="50" name="row[amount_images]" type="text" value="{$row.amount_images}" >
|
||||
<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="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>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-amount_images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-amount_images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -78,12 +160,6 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.dispatch.amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group">
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="text-align: left;padding-left: 0px;">工种:</label>
|
||||
<div style="width: 300px;display: inline-block;">
|
||||
<input type="text" id="item_id" name="item_id" data-value="{$row.item_title}" value="{$row.item_id}" class="zd-input__inner">
|
||||
<input type="text" id="item_id" name="item_id" value="{$row.item_title}" class="zd-input__inner">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -108,25 +108,27 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('线上尾款')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input name="row[online_total]" data-rule="required" type="number" min="0" placeholder="请输入线上尾款金额" class="form-control" value="{$order.online_total|htmlentities}">
|
||||
<input name="row[online_total]" data-rule="required" type="number" min="0" placeholder="请输入线上尾款金额" class="form-control" value="{$row.online_total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_total_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
|
||||
{:build_select('row[offline_total_type]',$offlineTotalTypeList,$row['offline_total_type'],['class'=>'form-control','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-total" data-rule="required" placeholder="请输入线下尾款金额" class="form-control" name="row[total]" type="number" min="0" value="{$row.total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_total_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
|
||||
{:build_select('row[offline_total_type]',$offlineTotalTypeList,$row['offline_total_type'],['class'=>'form-control','data-rule'=>'required'])}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('收款凭据')}:</label>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('orders/dispatch/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
-->
|
||||
|
||||
<a href="javascript:;" class="btn btn-warning btn-disabled disabled btn-add-normal {:$auth->check('orders/abnormal/add')}?'':'hide'}" title="{:__('创建异常')}" ><i class="fa fa-plus"></i> {:__('创建异常')}</a>
|
||||
<a href="javascript:;" class="btn btn-warning btn-disabled disabled btn-add-normal {:$auth->check('orders/abnormal/add')}?'':'hide'}" title="{:__('上报错误')}" ><i class="fa fa-plus"></i> {:__('上报错误')}</a>
|
||||
|
||||
<a href="javascript:;" class="btn btn-danger btn-cancel-selected btn-disabled disabled {:$auth->check('orders/dispatch2/del')?'':'hide'}" title="{:__('取消任务')}" ><i class="fa fa-trash"></i> {:__('取消任务')}</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<div class="panel-heading">
|
||||
<!--<div class="panel-lead"><em>多表格(Multitable)</em>用于展示在一个页面展示多个表格数据,并且每次切换时刷新</div>-->
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#first" data-toggle="tab">任务变更日志</a></li>
|
||||
<li><a href="#second" data-toggle="tab">跟进记录</a></li>
|
||||
<li class="active"><a href="#first" data-toggle="tab">跟进记录</a></li>
|
||||
<li><a href="#second" data-toggle="tab">任务变更日志</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -21,5 +21,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,10 +7,36 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" data-rule="required" class="form-control" name="row[remark]" type="text">
|
||||
<textarea id="c-remark" data-rule="required" class="form-control" placeholder="跟进内容" name="row[remark]" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
<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-images" class="form-control" size="50" name="row[images]" type="text">
|
||||
<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="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>
|
||||
</div>
|
||||
<span class="msg-box n-right" for="c-images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Notice_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-notice_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[notice_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Need_notice')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
|
|
@ -23,19 +49,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Notice_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-notice_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[notice_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('提交')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
101
application/admin/view/orders/invoice/add.html
Normal file
101
application/admin/view/orders/invoice/add.html
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<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-order_id" data-rule="required" disabled data-source="order/index" class="form-control" type="text" value="{$row.order_no}">
|
||||
</div>
|
||||
</div>
|
||||
<input class="form-control" style="display: none" name="row[order_id]" type="text" value="{$row.id}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">发票类型:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-source" data-live-search="true" title="请选择" data-rule="required" name="row[invoice_type]" class="form-control">
|
||||
<option selected value="1">公司发票</option>
|
||||
<option value="2">个人发票</option>
|
||||
</select>
|
||||
</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-title" data-rule="required" class="form-control" name="row[title]" type="text">
|
||||
</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-tax_number" class="form-control" name="row[tax_number]" type="text">
|
||||
</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-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" value="{$row.total}" type="number">
|
||||
</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-company_address" class="form-control" name="row[company_address]" type="text">
|
||||
</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-company_phone" class="form-control" name="row[company_phone]" type="text">
|
||||
</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-bank_name" class="form-control" name="row[bank_name]" type="text">
|
||||
</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-bank_account" class="form-control" name="row[bank_account]" type="text">
|
||||
</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-recipient_email" class="form-control" name="row[recipient_email]" type="text">
|
||||
</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-recipient_address" class="form-control" name="row[recipient_address]" type="text">
|
||||
</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-recipient_name" class="form-control" name="row[recipient_name]" type="text">
|
||||
</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-recipient_phone" class="form-control" name="row[recipient_phone]" type="text">
|
||||
</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">
|
||||
<textarea id="c-remark" class="form-control " rows="5" name="row[remark]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
119
application/admin/view/orders/invoice/edit.html
Normal file
119
application/admin/view/orders/invoice/edit.html
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id" data-rule="required" data-source="order/index" class="form-control" disabled type="text" value="{$order.order_no|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-source" data-live-search="true" title="请选择" data-rule="required" name="row[invoice_type]" class="form-control">
|
||||
<option {if 1 == $row.invoice_type} selected {/if} value="1">公司发票</option>
|
||||
<option {if 2 == $row.invoice_type} selected {/if} value="2">个人发票</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tax_number')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tax_number" class="form-control" name="row[tax_number]" type="text" value="{$row.tax_number|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-amount" data-rule="required" class="form-control" step="0.01" name="row[amount]" type="number" value="{$row.amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Invoice_method')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-invoice_method" data-rule="required" class="form-control" name="row[invoice_method]" type="number" value="{$row.invoice_method|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Recipient_email')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-recipient_email" class="form-control" name="row[recipient_email]" type="text" value="{$row.recipient_email|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_address" class="form-control" name="row[company_address]" type="text" value="{$row.company_address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_phone" class="form-control" name="row[company_phone]" type="text" value="{$row.company_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_name" class="form-control" name="row[bank_name]" type="text" value="{$row.bank_name|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Bank_account')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-bank_account" class="form-control" name="row[bank_account]" type="text" value="{$row.bank_account|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Recipient_address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-recipient_address" class="form-control" name="row[recipient_address]" type="text" value="{$row.recipient_address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Recipient_name')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-recipient_name" class="form-control" name="row[recipient_name]" type="text" value="{$row.recipient_name|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Recipient_phone')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-recipient_phone" class="form-control" name="row[recipient_phone]" type="text" value="{$row.recipient_phone|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Issued_at')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-issued_at" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[issued_at]" type="text" value="{$row.issued_at}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-status" data-live-search="true" title="请选择" data-rule="required" name="row[status]" class="form-control">
|
||||
<option {if 0 == $row.status} selected {/if} value="1">待处理</option>
|
||||
<option {if 1 == $row.status} selected {/if} value="2">已开票</option>
|
||||
<option {if 2 == $row.status} selected {/if} value="2">已完成</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-remark" class="form-control " rows="5" name="row[remark]" cols="50">{$row.remark|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
29
application/admin/view/orders/invoice/index.html
Normal file
29
application/admin/view/orders/invoice/index.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
<div class="widget-body no-padding">
|
||||
<div id="toolbar" class="toolbar">
|
||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('order.invoice/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
|
||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('order.invoice/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('order.invoice/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
data-operate-edit="{:$auth->check('order.invoice/edit')}"
|
||||
data-operate-del="{:$auth->check('order.invoice/del')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,59 +1,108 @@
|
|||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||
|
||||
|
||||
<input name="row[order_id]" type="hidden" value="{$order.id}">
|
||||
<input name="row[order_id]" type="hidden" value="{$row.id}">
|
||||
|
||||
<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-order_no" readonly class="form-control" type="text" value="{$order.order_no|htmlentities}">
|
||||
<input id="c-order_no" readonly class="form-control" type="text" value="{$row.order_no|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-item_title" readonly class="form-control" type="text" value="{$order.item_title|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-detail" readonly class="form-control" type="text" value="{$order.detail|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-customer"readonly class="form-control" type="text" value="{$order.customer|htmlentities}">
|
||||
<input id="c-customer" class="form-control" readonly type="text" value="{$row.customer|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-tel" readonly class="form-control" name="row[tel]" type="text" value="{$order.tel|htmlentities}">
|
||||
<input id="c-tel" class="form-control" readonly type="text" value=" {$row.tel|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-item_title" readonly class="form-control" type="text" value="{$row.item_title|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">
|
||||
<textarea id="c-detail" readonly class="form-control" placeholder="订单详情" >{$row.detail|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{if condition='$row.cancel_detail neq ""'}
|
||||
|
||||
{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.cancel_detail|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
{notempty name='row.aftersale'}
|
||||
{if condition='$row.aftersale.refund_amount > 0'}
|
||||
<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.aftersale.remark|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/notempty}
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Pt_star')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('回访情况属实')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-pt_star" data-rule="required" class="form-control" min="1" max="5" step="1" name="row[pt_star]" type="number" value="5">
|
||||
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[is_same]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_star" data-rule="required" min="1" max="5" step="1" class="form-control" name="row[worker_star]" type="number" value="5">
|
||||
|
||||
|
||||
|
||||
{if condition ='$row.status eq 60'}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Pt_star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-pt_star" data-rule="required" class="form-control" min="1" max="5" step="1" name="row[pt_star]" type="number" value="5">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_star" data-rule="required" min="1" max="5" step="1" class="form-control" name="row[worker_star]" type="number" value="5">
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('回访备注')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" data-rule="required" class="form-control" name="row[remark]" type="text">
|
||||
<textarea id="c-remark" data-rule="required" class="form-control" name="row[remark]" placeholder="填写回访备注" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-detail"readonly type="text" value="{$row.detail|htmlentities}">
|
||||
<input id="c-detail" readonly type="text" value="{$row.detail|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -71,9 +71,9 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('回访备注')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" name="row[remark]" data-rule="required" type="text" value="">
|
||||
<textarea id="c-remark" data-rule="required" class="form-control" placeholder="回访备注" name="row[remark]" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@
|
|||
<div class="col-xs-12 col-sm-8">
|
||||
<select id="c-source" data-live-search="true" title="请选择" data-rule="required" name="row[type]"
|
||||
class="form-control">
|
||||
<option selected value="1">异常类型</option>
|
||||
<option value="2">取消类型</option>
|
||||
<option selected value="1">报错类型</option>
|
||||
<option value="2">订单取消类型</option>
|
||||
<option value="3">派单取消类型</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
<div class="panel panel-default panel-intro">
|
||||
{:build_heading()}
|
||||
<div class="panel-heading">
|
||||
<ul class="nav nav-tabs" data-field="type">
|
||||
<li class="{:$Think.get.type === (string)1 ? 'active' : ''}"><a href="#t-1" data-value="1" data-toggle="tab">异常类型</a></li>
|
||||
<li class="{:$Think.get.type === (string)2 ? 'active' : ''}"><a href="#t-2" data-value="2" data-toggle="tab">取消类型</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div id="myTabContent" class="tab-content">
|
||||
<div class="tab-pane fade active in" id="one">
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@
|
|||
<input id="area_id" style="display: none" class="form-control" name="row[area_id]" hidden type="text" value="" />
|
||||
</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'>
|
||||
<select data-live-search="true" name="row[type]" class="form-control">
|
||||
<option selected value="1">自营</option>
|
||||
<option value="2">非自营</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Deposit_amount')}:</label>
|
||||
|
|
@ -35,7 +44,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Items')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">师傅技能:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><span>{:__('Check all')}</span></label></span>
|
||||
<span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><span>{:__('Expand all')}</span></label></span>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,15 @@
|
|||
value="{$row.area_id}"/>
|
||||
</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'>
|
||||
<select data-live-search="true" name="row[type]" class="form-control">
|
||||
<option {if 1 == $row.type} selected {/if} value="1">自营</option>
|
||||
<option {if 2 == $row.type} selected {/if} value="2">非自营</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Deposit_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -51,7 +60,7 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Items')}:</label>
|
||||
<label class="control-label col-xs-12 col-sm-2">师傅技能:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<span class="text-muted"><input type="checkbox" name="" id="checkall"/> <label for="checkall"><span>{:__('Check all')}</span></label></span>
|
||||
<span class="text-muted"><input type="checkbox" name="" id="expandall"/> <label for="expandall"><span>{:__('Expand all')}</span></label></span>
|
||||
|
|
|
|||
|
|
@ -30,16 +30,16 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('workers/worker/recyclebin')?'':'hide'}" href="workers/worker/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
|
||||
<!-- <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('workers/worker/recyclebin')?'':'hide'}" href="workers/worker/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>-->
|
||||
|
||||
<form id="select-form" style="padding-left: 15px;margin-top: 10px" role="form" class="form-horizontal" data-toggle="validator" method="POST" action="">
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">区域:</label>-->
|
||||
<!-- <div style="display: inline-block;width: 300px;position: absolute">-->
|
||||
<!-- <input id="c-city-search" data-rule="required" class="form-control" data-toggle="city-picker" type="text" />-->
|
||||
<!-- <input id="area_id" style="display: none" class="form-control" name="area_id" hidden type="text" />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-3" style="padding-left: 0px;text-align: left">区域:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
<input id="c-city-search" data-rule="required" class="form-control" data-toggle="city-picker" type="text" />
|
||||
<input id="area_id" style="display: none" class="form-control" name="area_id" hidden type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-xs-12 col-sm-2" style="text-align: left;padding-left: 0px;">工种:</label>-->
|
||||
<!-- <div style="width: 300px;display: inline-block;">-->
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">关键字:</label>
|
||||
<label class="col-xs-12 col-sm-3" style="padding-left: 0px;text-align: left">关键字:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
<input id="keyword" class="form-control" style="width: 100%;height: 32px" placeholder="名称或电话号码搜索" name="keyword" type="text" value="" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -21,4 +21,9 @@ return [
|
|||
'app\admin\command\ItemImportCommand',
|
||||
'app\admin\command\ImportServiceItems',
|
||||
'app\admin\command\Test',
|
||||
|
||||
'app\common\command\UpdateWorkerManCommand', //更新师傅评分
|
||||
'app\common\command\CheckOrderDispatchCommand', //检测超时的任务
|
||||
'app\common\command\CheckOrderDispatchGotCommand', //dispatch未接单通知
|
||||
'app\common\command\CheckOrdeRecordCommand', //跟进记录
|
||||
];
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ class OrderLogic
|
|||
$orderUpdate = [
|
||||
'status' => Order::STATUS_CHECKING
|
||||
];
|
||||
$orderDispatch->follow = 2; //结束跟进
|
||||
$orderDispatch->save();
|
||||
|
||||
if($orderDispatch->is_receipt == 1){ //要收款,计算确认尾款
|
||||
$offline_amount = $orderDispatch->total;
|
||||
$total = bcadd($order->online_amount,$offline_amount,2);
|
||||
|
|
@ -115,23 +118,22 @@ class OrderLogic
|
|||
public function cancelOrderDispatch(OrderDispatch $dispatch,$auth=null,$remark='',$cancelOrder=true)
|
||||
{
|
||||
//取消
|
||||
$dispatch->allowField(true)->save(['status' => OrderDispatch::STATUS_CANCEL, 'remark' => $remark]);
|
||||
$dispatch->allowField(true)->save(['status' => OrderDispatch::STATUS_CANCEL, 'follow'=>0,'remark' => $remark]);
|
||||
|
||||
$hookParams = [
|
||||
'dispatch' => $dispatch,
|
||||
'remark' => '后台取消,操作人:'.$auth->nickname,
|
||||
'remark' => '后台取消,操作说明:'.$remark?:'无'.',操作人:'.$auth->nickname
|
||||
];
|
||||
Hook::listen('order_dispatch_change', $hookParams);
|
||||
|
||||
|
||||
if($cancelOrder){
|
||||
$order = Order::where('id',$dispatch->id)->where('status',Order::STATUS_DISPATCHED)->find();
|
||||
if(!empty($order)){
|
||||
$order = Order::where('id',$dispatch->order_id)->where('status',Order::STATUS_DISPATCHED)->find();
|
||||
if(empty($order)){
|
||||
throw new Exception('未找到关联订单');
|
||||
}
|
||||
|
||||
//回退订单状态
|
||||
$order->allowField(true)->save(['status' => Order::STATUS_DISPATCHING]);
|
||||
$order->status = Order::STATUS_DISPATCHING;
|
||||
|
||||
$params['order'] = $order;
|
||||
$params['role'] = 1;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\common\command;
|
||||
|
||||
use app\admin\model\OrderDispatch;
|
||||
use app\admin\model\OrderDispatchRecord;
|
||||
|
||||
use think\console\Command;
|
||||
|
|
@ -21,18 +22,25 @@ class CheckOrdeRecordCommand extends Command
|
|||
$Model = new OrderDispatchRecord();
|
||||
$now = date('Y-m-d H:i:s'); //创建三十分名以上未接的任务
|
||||
|
||||
$Model->where('need_notice',1)
|
||||
->where('notice_time','<=',$now)
|
||||
//$Model->where('need_notice',1)
|
||||
$Model->where('notice_time','<=',$now)
|
||||
->where('status',0)
|
||||
->chunk(100, function ($list) {
|
||||
$ids = [];
|
||||
$dispatchIds = [];
|
||||
foreach ($list as $item) {
|
||||
//todo...通知逻辑
|
||||
$ids[] = $item->id;
|
||||
$dispatchIds[] = $item->dispatch_id;
|
||||
//修改状态
|
||||
if($item->need_notice == 1){ //需要通知
|
||||
|
||||
}
|
||||
}
|
||||
OrderDispatchRecord::whereIn('id',$ids)->update(['status'=>1]);
|
||||
OrderDispatch::whereIn('id',$dispatchIds)->where('follow',1)->update(['follow'=>0]);
|
||||
});
|
||||
|
||||
$output->info('OVER');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class CheckOrderDispatchCommand extends Command
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
$output->info('OVER');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class CheckOrderDispatchGotCommand extends Command
|
|||
$OrderLogic->noWorkerCanGetIt($item);
|
||||
}
|
||||
});
|
||||
$output->info('OVER');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
37
application/common/command/UpdateWorkerManCommand.php
Normal file
37
application/common/command/UpdateWorkerManCommand.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace app\common\command;
|
||||
|
||||
use app\admin\model\order\Review;
|
||||
use app\admin\model\OrderDispatch;
|
||||
use app\admin\model\OrderDispatchRecord;
|
||||
|
||||
use app\admin\model\Worker;
|
||||
use think\console\Command;
|
||||
use think\console\Input;
|
||||
use think\console\Output;
|
||||
|
||||
class UpdateWorkerManCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('update-worker-man-info')
|
||||
->setDescription('更新师傅信息(评分),每天一次');
|
||||
}
|
||||
|
||||
protected function execute(Input $input, Output $output)
|
||||
{
|
||||
$workers = Worker::all();
|
||||
foreach ($workers as $worker)
|
||||
{
|
||||
$avg = Review::where('worker_id',$worker->id)->avg('worker_star');
|
||||
if($avg){
|
||||
$worker->star = $avg;
|
||||
$worker->save();
|
||||
}
|
||||
}
|
||||
$output->info('OVER');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ return [
|
|||
'connector' => 'Redis', // Redis 驱动
|
||||
'expire' => 0, // 任务的过期时间,默认为60秒; 若要禁用,则设置为 null
|
||||
'default' => 'default', // 默认的队列名称
|
||||
'host' => '127.0.0.1', // redis 主机ip
|
||||
'port' => 6379, // redis 端口
|
||||
'host' => \think\Env::get('redis.redis_host'), // redis 主机ip
|
||||
'port' => \think\Env::get('redis.redis_host'), // redis 端口
|
||||
'password' => '', // redis 密码
|
||||
'select' => 0, // 使用哪一个 db,默认为 db0
|
||||
'timeout' => 0, // redis连接的超时时间
|
||||
|
|
|
|||
10652
dbbackup/wanyu-20250418.sql
Normal file
10652
dbbackup/wanyu-20250418.sql
Normal file
File diff suppressed because it is too large
Load Diff
1061
public/assets/addons/editable/css/bootstrap-editable.css
vendored
Normal file
1061
public/assets/addons/editable/css/bootstrap-editable.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
public/assets/addons/editable/img/clear.png
Normal file
BIN
public/assets/addons/editable/img/clear.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 509 B |
BIN
public/assets/addons/editable/img/loading.gif
Normal file
BIN
public/assets/addons/editable/img/loading.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
7
public/assets/addons/editable/js/bootstrap-editable.min.js
vendored
Normal file
7
public/assets/addons/editable/js/bootstrap-editable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1305
public/assets/addons/editable/less/bootstrap-editable.less
vendored
Normal file
1305
public/assets/addons/editable/less/bootstrap-editable.less
vendored
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -12,9 +12,9 @@ define([], function () {
|
|||
var zoom_id = $(that).data("zoom-id") ? $(that).data("zoom-id") : "";
|
||||
var lat = lat_id ? $("#" + lat_id).val() : '';
|
||||
var lng = lng_id ? $("#" + lng_id).val() : '';
|
||||
var city_code = $("#c-city").val();
|
||||
var city_code = $("#area_id").val();
|
||||
var zoom = zoom_id ? $("#" + zoom_id).val() : '';
|
||||
var url = "/addons/address/index/select?a=1";
|
||||
var url = "/addons/address/index/select?1=1";
|
||||
url += (lat && lng) ? 'lat=' + lat + '&lng=' + lng +
|
||||
(input_id ? "&address=" + $("#" + input_id).val() : "")
|
||||
+(zoom ? "&zoom=" + zoom : "") : ''
|
||||
|
|
@ -312,6 +312,33 @@ require(['fast', 'layer'], function (Fast, Layer) {
|
|||
}
|
||||
}
|
||||
});
|
||||
require.config({
|
||||
paths: {
|
||||
'editable': '../libs/bootstrap-table/dist/extensions/editable/bootstrap-table-editable.min',
|
||||
'x-editable': '../addons/editable/js/bootstrap-editable.min',
|
||||
},
|
||||
shim: {
|
||||
'editable': {
|
||||
deps: ['x-editable', 'bootstrap-table']
|
||||
},
|
||||
"x-editable": {
|
||||
deps: ["css!../addons/editable/css/bootstrap-editable.css"],
|
||||
}
|
||||
}
|
||||
});
|
||||
if ($("table.table").length > 0) {
|
||||
require(['editable', 'table'], function (Editable, Table) {
|
||||
$.fn.bootstrapTable.defaults.onEditableSave = function (field, row, oldValue, $el) {
|
||||
var data = {};
|
||||
data["row[" + field + "]"] = row[field];
|
||||
Fast.api.ajax({
|
||||
url: this.extend.edit_url + "/ids/" + row[this.pk],
|
||||
data: data
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
require.config({
|
||||
paths: {
|
||||
'nkeditor': '../addons/nkeditor/js/customplugin',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
index_url: 'aftersales/aftersale/index' + location.search,
|
||||
add_url: 'aftersales/aftersale/add',
|
||||
edit_url: 'aftersales/aftersale/edit',
|
||||
del_url: 'aftersales/aftersale/del',
|
||||
// del_url: 'aftersales/aftersale/del',
|
||||
multi_url: 'aftersales/aftersale/multi',
|
||||
import_url: 'aftersales/aftersale/import',
|
||||
table: 'aftersale',
|
||||
|
|
@ -29,32 +29,54 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
// {field: 'order_id', title: __('Order_id')},
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: '='},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: false},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: '='},
|
||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"-1":__('Status -1')}, formatter: Table.api.formatter.status},
|
||||
{field: 'handle_type', title: __('Handle_type'), searchList: {"1":__('Handle_type 1'),"2":__('Handle_type 2'),"3":__('Handle_type 3'),"4":__('Handle_type 4')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'from', title: __('From'), searchList: {"1":__('From 1'),"2":__('From 2'),"3":__('From 3')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'refund_amount', title: __('Refund_amount'), operate:'BETWEEN'},
|
||||
{field: 'company_refund_amount', title: __('Company_refund_amount'), operate:'BETWEEN'},
|
||||
{field: 'worker_refund_amount', title: __('Worker_refund_amount'), operate:'BETWEEN'},
|
||||
{field: 'refund_type', title: __('Refund_type'), searchList: {"1":__('Refund_type 1'),"2":__('Refund_type 2')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'refund_amount', title: __('Refund_amount'), operate:false},
|
||||
{field: 'company_refund_amount', title: __('Company_refund_amount'), operate:false},
|
||||
{field: 'worker_refund_amount', title: __('Worker_refund_amount'), operate:false},
|
||||
{field: 'refund_type', title: __('Refund_type'), searchList: {"0":__('Refund_type 0'),"1":__('Refund_type 1'),"2":__('Refund_type 2')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'worker_refund_entry', title: __('Worker_refund_entry'), searchList: {"0":__('Worker_refund_entry 0'),"1":__('Worker_refund_entry 1')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'refund_time', title: __('Refund_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'customer_appeal', title: __('Customer_appeal'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'customer_qrcode', title: __('Customer_qrcode'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'company_refund_time', title: __('Company_refund_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'worker_refund_time', title: __('Worker_refund_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
//{field: 'refund_time', title: __('Refund_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'customer_appeal', title: __('Customer_appeal'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
//{field: 'customer_qrcode', title: __('Customer_qrcode'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'customer_qrcode', title: __('Customer_qrcode'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
|
||||
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'company_refund_time', title: __('Company_refund_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'worker_refund_time', title: __('Worker_refund_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'remark', title: __('Remark'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
//{field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: 'LIKE'},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: '='},
|
||||
//{field: 'handle_admin_id', title: __('Handle_admin_id')},
|
||||
{field: 'handle_admin_user', title: __('Handle_admin_user'), operate: 'LIKE'},
|
||||
{field: 'star', title: __('Star')},
|
||||
{field: 'handle_admin_user', title: __('Handle_admin_user'), operate: '='},
|
||||
{field: 'star', title: __('Star'),operate:false},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'update_time', title: __('Update_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text:"处理",
|
||||
title:"售后处理",
|
||||
icon: 'fa fa-pencil',
|
||||
//title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-editone',
|
||||
visible:function(row){
|
||||
if(row.status === 1){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -26,12 +26,36 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'user.nickname', title: __('User_id')},
|
||||
{field: 'username', title: __('Username'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'user.nickname', title: '创建人'},
|
||||
{field: 'username', title: '账号', operate: 'LIKE', formatter: Table.api.formatter.content},
|
||||
{field: 'nickname', title: '昵称'},
|
||||
{field: 'phone', title: '电话'},
|
||||
{field: 'address', title: '地址'},
|
||||
{field: 'reason', title: '原因'},
|
||||
{field: 'remarks', title: '备注'},
|
||||
{field: 'added_time', title: __('Added_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'removed_time', title: __('Removed_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||
{field: 'status', title: __('Status'), searchList: {"active":__('Active'),"removed":__('Removed')}, formatter: Table.api.formatter.status},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'), table: table,
|
||||
buttons:[
|
||||
{
|
||||
name: 'edit',
|
||||
text: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: "删除",
|
||||
icon: 'fa fa-trash',
|
||||
title: __('Delete'),
|
||||
extend: 'data-toggle="tooltip"',
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
},
|
||||
],
|
||||
events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -419,5 +419,30 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
window.setInterval(function(){
|
||||
// window.location.reload();
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: 'message/getNoreadCount',
|
||||
async : true,
|
||||
dataType:"json",//返回整个HTML
|
||||
success: function (data) {
|
||||
var noread = data.count;
|
||||
$(".my-message-count").html(noread);
|
||||
if(noread>0){
|
||||
Toastr.info('未读消息',"有 "+noread+" 条未读消息",{
|
||||
timeOut:"30000",
|
||||
onclick:function(){
|
||||
//window.location.href='/admin/message/index';
|
||||
Backend.api.addtabs('/admin/message/index','消息列表')
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
},60*1000);
|
||||
|
||||
return Controller;
|
||||
});
|
||||
|
|
|
|||
71
public/assets/js/backend/message.js
Normal file
71
public/assets/js/backend/message.js
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'message/index' + location.search,
|
||||
//add_url: 'message/add',
|
||||
//edit_url: 'message/edit',
|
||||
//del_url: 'message/del',
|
||||
multi_url: 'message/multi',
|
||||
import_url: 'message/import',
|
||||
table: 'message',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
commonSearch:false,
|
||||
search:false,
|
||||
columns: [
|
||||
[
|
||||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
//{field: 'to_id', title: __('To_id')},
|
||||
//{field: 'area_id', title: __('Area_id')},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
//{field: 'status', title: __('状态'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
{field: 'title', title: __('Title'), operate: false, table: table, class: 'autocontent', formatter: function (val,row){
|
||||
if(row.status == 0){
|
||||
val = '<span class="label label-danger">new</span> '+ val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
},
|
||||
{field: 'content', title: __('Content'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'uri', title: __('Uri'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -21,6 +21,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
Toastr.info('复制成功');
|
||||
}
|
||||
|
||||
|
||||
// 拼装文本
|
||||
function assembleOrderMessage(data) {
|
||||
const message = `
|
||||
|
|
@ -66,31 +67,49 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
|
||||
fixedRightNumber: 1,
|
||||
fixedNumber: 3,
|
||||
fixedColumns: true,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'user.nickname', title: '录单员'},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{
|
||||
field: 'status',
|
||||
title: __('Status'),
|
||||
fixed:true,
|
||||
searchList: {
|
||||
"0": __('Status 0'),
|
||||
"10": __('Status 10'),
|
||||
"20": __('Status 20'),
|
||||
"30": __('Status 30'),
|
||||
"40": __('Status 40'),
|
||||
"41": __('Status 41'),
|
||||
"50": __('Status 50'),
|
||||
"60": __('Status 60'),
|
||||
"-10": __('Status -10'),
|
||||
"-20": __('Status -20'),
|
||||
"-30": __('Status -30')
|
||||
/*"-20": __('Status -20'),
|
||||
"-30": __('Status -30')*/
|
||||
},
|
||||
formatter: Table.api.formatter.status
|
||||
},
|
||||
{
|
||||
field: 'dispatch_type',
|
||||
title: '派单方式',
|
||||
searchList: {
|
||||
"1": '手动派单',
|
||||
"2": '自动派单',
|
||||
},
|
||||
formatter: Table.api.formatter.label
|
||||
},
|
||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
||||
|
||||
|
||||
{field: 'user.nickname', title: '录单员'},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{field: 'area.merge_name', title: __('Area_id')},
|
||||
{
|
||||
field: 'address',
|
||||
|
|
@ -101,15 +120,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
formatter: Table.api.formatter.content
|
||||
},
|
||||
|
||||
{
|
||||
field: 'dispatch_type',
|
||||
title: '派单方式',
|
||||
searchList: {
|
||||
"1": '手动派单',
|
||||
"2": '自动派单',
|
||||
},
|
||||
formatter: Table.api.formatter.label
|
||||
},
|
||||
{
|
||||
field: 'receive_type',
|
||||
title: '收款方式',
|
||||
|
|
@ -120,10 +130,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
formatter: Table.api.formatter.label
|
||||
},
|
||||
|
||||
{
|
||||
field: 'total',
|
||||
title: '总收款',
|
||||
formatter: Table.api.formatter.Text
|
||||
},
|
||||
|
||||
// {field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'source_shop', title: __('Source')},
|
||||
// {field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
||||
{
|
||||
field: 'detail',
|
||||
title: __('Detail'),
|
||||
|
|
@ -171,23 +186,29 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text: "编辑",
|
||||
text: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs button-edit btn-editone',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
visible: function (row) {
|
||||
if (row.status != 60) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
name: 'push',
|
||||
icon: 'fa fa-copy',
|
||||
title: '复制',
|
||||
text: "复制",
|
||||
title: '复制订单',
|
||||
text: "复制订单",
|
||||
url: 'order/copy',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs button-copy btn-dialog',
|
||||
classname: 'btn btn-dialog',
|
||||
callback: function ($data) {
|
||||
console.log($data);
|
||||
// console.log($data);
|
||||
},
|
||||
dropdown: "更多"
|
||||
},
|
||||
|
|
@ -196,8 +217,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
text: "派单",
|
||||
title: "派单",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs button-dispatch btn-dialog',
|
||||
//classname:"btn-view btn-dialog",
|
||||
classname: 'btn btn-xs btn-info btn-dialog',
|
||||
icon: 'fa fa-add',
|
||||
url: function (row) {
|
||||
return 'orders/dispatch/add?order_id=' + row.id;
|
||||
|
|
@ -213,9 +233,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
{
|
||||
name: "reminder",
|
||||
text: "催单",
|
||||
title: "派单",
|
||||
title: "催单",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs button-remind btn-magic btn-ajax',
|
||||
classname: 'btn btn-ajax',
|
||||
icon: 'fa fa-bolt',
|
||||
url: 'order/reminder',
|
||||
dropdown: "更多",
|
||||
|
|
@ -246,7 +266,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
text: "复制信息",
|
||||
title: "复制信息",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs button-error btn-click',
|
||||
classname: 'btn btn-xs btn-info btn-click',
|
||||
icon: 'fa fa-text',
|
||||
click: function (data, item) {
|
||||
const text = assembleOrderMessage(item);
|
||||
|
|
@ -254,19 +274,68 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
}
|
||||
}, {
|
||||
name: 'delete',
|
||||
text: '取消',
|
||||
title: '取消',
|
||||
classname: 'btn btn-xs button-cancel btn-dialog',
|
||||
text: '取消订单',
|
||||
title: '取消订单',
|
||||
classname: 'btn btn-dialog',
|
||||
icon: 'fa fa-trash',
|
||||
url: 'order/delete',
|
||||
dropdown: "更多",
|
||||
visible: function (row) {
|
||||
if (row.status >= 0) {
|
||||
if (row.status >= 0 && row.status < 60) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
{
|
||||
name:"error",
|
||||
text:"订单报错",
|
||||
title:"订单报错",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-dialog',
|
||||
icon: 'fa fa-bolt',
|
||||
url: 'order/addAbnormal',
|
||||
refresh:true,
|
||||
dropdown: "更多",
|
||||
visible: function (row) {
|
||||
if (row.status != 60) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'invoice',
|
||||
text: '申请开票',
|
||||
title: '申请开票',
|
||||
classname: 'btn btn-dialog',
|
||||
icon: 'fa fa-send',
|
||||
url: 'order/invoice/',
|
||||
dropdown: "更多",
|
||||
|
||||
visible: function (row) {
|
||||
if (row.status == 60) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'aftersale',
|
||||
text: '申请售后',
|
||||
title: '申请售后',
|
||||
classname: 'btn btn-dialog',
|
||||
icon: 'fa fa-phone-square',
|
||||
url: 'aftersales/aftersale/add',
|
||||
dropdown: "更多",
|
||||
visible: function (row) {
|
||||
if (row.aftersale_btn==true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
}
|
||||
]
|
||||
|
|
@ -374,11 +443,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
});
|
||||
},
|
||||
edit: function () {
|
||||
var _data = items;
|
||||
|
||||
$('#item_id').zdCascader({
|
||||
data: _data,
|
||||
onChange: function ($this, data, allPathData) {
|
||||
// console.log(data,allPathData);
|
||||
$('#item_id_value').val(data.value);
|
||||
}
|
||||
});
|
||||
$('#item_id').val($('#item_id').data('value')).focus();
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
copy: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
saleafter: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
addabnormal: function () {
|
||||
console.log('abnormal');
|
||||
Form.api.bindevent($("#add-form"), null, null, function (data) {
|
||||
|
|
@ -388,7 +470,34 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'cascader'], function
|
|||
});
|
||||
},
|
||||
delete: function () {
|
||||
console.log('delete');
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
invoice: function () {
|
||||
function toggleInvoiceFields() {
|
||||
const type = $('#c-source').val();
|
||||
if (type === '1') {
|
||||
// 公司发票
|
||||
$('#c-tax_number').closest('.form-group').show();
|
||||
$('#c-company_address').closest('.form-group').show();
|
||||
$('#c-company_phone').closest('.form-group').show();
|
||||
$('#c-bank_name').closest('.form-group').show();
|
||||
$('#c-bank_account').closest('.form-group').show();
|
||||
} else {
|
||||
// 个人发票
|
||||
$('#c-tax_number').closest('.form-group').hide();
|
||||
$('#c-company_address').closest('.form-group').hide();
|
||||
$('#c-company_phone').closest('.form-group').hide();
|
||||
$('#c-bank_name').closest('.form-group').hide();
|
||||
$('#c-bank_account').closest('.form-group').hide();
|
||||
}
|
||||
}
|
||||
// 初始化时执行一次
|
||||
toggleInvoiceFields();
|
||||
|
||||
// 监听 select 改变
|
||||
$('#c-source').on('change',function () {
|
||||
toggleInvoiceFields();
|
||||
});
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
api: {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
index_url: 'orders/abnormal/index' + location.search,
|
||||
add_url: 'orders/abnormal/add',
|
||||
edit_url: 'orders/abnormal/edit',
|
||||
del_url: 'orders/abnormal/del',
|
||||
//del_url: 'orders/abnormal/del',
|
||||
multi_url: 'orders/abnormal/multi',
|
||||
import_url: 'orders/abnormal/import',
|
||||
table: 'order_abnormal',
|
||||
|
|
@ -42,20 +42,34 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'abnormal_title', title: __('Abnormal_title'), operate: false},
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"-1":__('Status -1')}, formatter: Table.api.formatter.status},
|
||||
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
//{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
//{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
// {field: 'order.worker_name', title: __('Order.worker_name'), operate: 'LIKE'},
|
||||
// {field: 'order.worker_tel', title: __('Order.worker_tel'), operate: 'LIKE'},
|
||||
//{field: 'handle_admin_id', title: __('Handle_admin_id')},
|
||||
{field: 'handle_admin_user', title: __('Handle_admin_user'), operate: 'LIKE'},
|
||||
{field: 'handle_time', title: __('Handle_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: 'LIKE'},
|
||||
{field: 'handle_admin_user', title: __('Handle_admin_user'), operate: 'LIKE'},
|
||||
// {field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'handle_time', title: __('Handle_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'update_time', title: __('Update_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text:"编辑",
|
||||
title:"编辑",
|
||||
icon: 'fa fa-pencil',
|
||||
//title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-editone',
|
||||
}
|
||||
],
|
||||
|
||||
// buttons:[
|
||||
// {
|
||||
// name:"detail",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
|
||||
queryParams: function (params) {
|
||||
var filter = params.filter ? JSON.parse(params.filter) : {};
|
||||
var op = params.op ? JSON.parse(params.op) : {};
|
||||
|
||||
// 如果没有 status 参数,则默认使用 50
|
||||
if (!('status' in filter)) {
|
||||
filter.status = '50';
|
||||
op.status = '=';
|
||||
}
|
||||
|
||||
params.filter = JSON.stringify(filter);
|
||||
params.op = JSON.stringify(op);
|
||||
return params;
|
||||
},
|
||||
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
|
|
@ -28,29 +44,39 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
[
|
||||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id'),operate: false},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{field: 'status', title: __('Status'), searchList: {"50":__('Status 50'),"60":__('Status 60')}, formatter: Table.api.formatter.status},
|
||||
{
|
||||
field: 'status',
|
||||
title: __('Status'),
|
||||
searchList: {"50":__('Status 50'),"60":__('Status 60')},
|
||||
formatter: Table.api.formatter.label,
|
||||
custom: {
|
||||
'50': 'warning', // 待跟进:灰蓝色(默认 Bootstrap info)
|
||||
'60': 'success', // 已跟进:绿色
|
||||
}
|
||||
},
|
||||
|
||||
{field: 'order_no', title: __('Order_no'), operate: '='},
|
||||
{field: 'customer', title: __('Customer'), operate: false},
|
||||
{field: 'tel', title: __('Tel'), operate: '='},
|
||||
//{field: 'area_id', title: __('Area_id')},
|
||||
//{field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'lng', title: __('Lng'), operate:'BETWEEN'},
|
||||
// {field: 'lat', title: __('Lat'), operate:'BETWEEN'},
|
||||
//{field: 'work_tel_id', title: __('Work_tel_id')},
|
||||
{field: 'source_shop', title: __('Source_shop'), operate: 'LIKE'},
|
||||
{field: 'source', title: __('Source')},
|
||||
{field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
||||
{field: 'source_shop', title: __('Source_shop'), operate: '='},
|
||||
{field: 'source', title: __('Source'), operate: false},
|
||||
{field: 'source_uid', title: __('Source_uid'), operate: '='},
|
||||
// {field: 'item_id', title: __('Item_id')},
|
||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
||||
{field: 'detail', title: __('Detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
{field: 'item_title', title: __('Item_title'), operate: false},
|
||||
{field: 'detail', title: __('Detail'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'remark', title: __('Remark'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'admin_id', title: __('Admin_id'), operate: false},
|
||||
{field: 'online_amount', title: __('Online_amount'), operate:false},
|
||||
{field: 'online_amount_last', title: __('Online_amount_last'), operate:false},
|
||||
{field: 'offline_amount', title: __('Offline_amount'), operate:false},
|
||||
{field: 'offline_amount_type_text', title: __('Offline_amount_type'), operate:false},
|
||||
{field: 'amount_images', title: __('收款凭据'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
{field: 'total', title: __('Total'), operate:'BETWEEN'},
|
||||
{field: 'discount_amount', title: __('Discount_amount'), operate:false},
|
||||
{field: 'real_amount', title: __('Real_amount'), operate:false},
|
||||
|
|
@ -61,10 +87,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
//{field: 'cancel_detail', title: __('Cancel_detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'audit_admin_id', title: __('Audit_admin_id')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
//{field: 'auditadmin.username', title: __('Admin.username'), operate: 'LIKE'},
|
||||
{field: 'auditadmin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
|
||||
{field: 'audit_remark', title: __('Audit_remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'auditadmin.nickname', title: __('Admin.nickname'), operate: '='},
|
||||
{field: 'audit_remark', title: __('Audit_remark'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
|
||||
|
|
|
|||
|
|
@ -27,25 +27,29 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
columns: [
|
||||
[
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
{field: 'order_no', title: __('Order_no'), operate: '='},
|
||||
// {field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
//{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
|
||||
//{field: 'dispatch.worker_name', title: __('Dispatch.worker_name'), operate: 'LIKE'},
|
||||
//{field: 'dispatch.worker_tel', title: __('Dispatch.worker_tel'), operate: 'LIKE'},
|
||||
|
||||
{field: 'dispatch.admin_user', title: __('Dispatch.admin_user'), operate: 'LIKE'},
|
||||
{field: 'dispatch.admin_user', title: __('Dispatch.admin_user'), operate: '='},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"40":__('Status 40'),"41":__('Status 41')}, formatter: Table.api.formatter.status},
|
||||
|
||||
{field: 'audit_remark', title: __('审核备注'), operate:false},
|
||||
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"30":__('Status 30'),"40":__('Status 40'),"50":__('Status 50'),"60":__('Status 60'),"-10":__('Status -10')}, formatter: Table.api.formatter.status},
|
||||
|
||||
// {field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'source_shop', title: __('Source_shop'), operate: 'LIKE'},
|
||||
{field: 'source_shop', title: __('Source_shop'), operate: '='},
|
||||
// {field: 'source', title: __('Source')},
|
||||
// {field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
||||
{field: 'item_title', title: __('Item_title'), operate: false},
|
||||
|
||||
{field: 'total', title: __('Total'), operate:'BETWEEN'},
|
||||
{field: 'total', title: __('Total'), operate:false},
|
||||
{field: 'online_amount', title: __('Online_amount'), operate:false},
|
||||
{field: 'online_amount_last', title: __('Online_amount_last'), operate:false},
|
||||
{field: 'offline_amount', title: __('Offline_amount'), operate:false},
|
||||
|
|
@ -59,12 +63,31 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
|
||||
// {field: 'dispatch_type', title: __('Dispatch_type')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
|
||||
|
||||
// {field: 'dispatch.finish_time', title: __('Dispatch.finish_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text:"配置",
|
||||
title:"配置订单",
|
||||
icon: 'fa fa-pencil',
|
||||
//title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-editone',
|
||||
/*visible:function(row){
|
||||
if(row.status == 50){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}*/
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], function ($, undefined, Backend, Table, Form) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'layer', 'cascader'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
|
|
@ -32,50 +32,121 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], f
|
|||
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"25":__('Status 25'),"30":__('Status 30'),"60":__('Status 60'),"-10":__('Status -10'),"-20":__('Status -20'),"-30":__('Status -30')}, formatter: Table.api.formatter.status},
|
||||
{
|
||||
field: 'status',
|
||||
title: __('Status'),
|
||||
searchList: {
|
||||
"0": __('Status 0'),
|
||||
"10": __('Status 10'),
|
||||
"20": __('Status 20'),
|
||||
"25": __('Status 25'),
|
||||
"30": __('Status 30'),
|
||||
"60": __('Status 60'),
|
||||
"-10": __('Status -10'),
|
||||
"-20": __('Status -20'),
|
||||
"-30": __('Status -30')
|
||||
},
|
||||
formatter: Table.api.formatter.status
|
||||
},
|
||||
|
||||
// {field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
|
||||
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
|
||||
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
{
|
||||
field: 'type',
|
||||
title: __('Type'),
|
||||
searchList: {"1": __('Type 1')},
|
||||
formatter: Table.api.formatter.normal
|
||||
},
|
||||
|
||||
|
||||
{field: 'order.source_shop', title: __('Order.source_shop'), operate: 'LIKE'},
|
||||
{field: 'order.source', title: __('Order.source')},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
{field: 'order.address', title: __('Order.address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{
|
||||
field: 'order.address',
|
||||
title: __('Order.address'),
|
||||
operate: 'LIKE',
|
||||
table: table,
|
||||
class: 'autocontent',
|
||||
formatter: Table.api.formatter.content
|
||||
},
|
||||
|
||||
{field: 'order.item_title', title: __('Order.item_title'), operate: 'LIKE'},
|
||||
{field: 'order.detail', title: __('Order.detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{
|
||||
field: 'order.detail',
|
||||
title: __('Order.detail'),
|
||||
operate: 'LIKE',
|
||||
table: table,
|
||||
class: 'autocontent',
|
||||
formatter: Table.api.formatter.content
|
||||
},
|
||||
|
||||
{field: 'order.images', title: __('Order.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
{
|
||||
field: 'order.images',
|
||||
title: __('Order.images'),
|
||||
operate: false,
|
||||
events: Table.api.events.image,
|
||||
formatter: Table.api.formatter.images
|
||||
},
|
||||
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{
|
||||
field: 'remark',
|
||||
title: __('Remark'),
|
||||
operate: 'LIKE',
|
||||
table: table,
|
||||
class: 'autocontent',
|
||||
formatter: Table.api.formatter.content
|
||||
},
|
||||
|
||||
{field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{
|
||||
field: 'plan_time',
|
||||
title: __('Plan_time'),
|
||||
operate: 'RANGE',
|
||||
addclass: 'datetimerange',
|
||||
autocomplete: false
|
||||
},
|
||||
// {field: 'is_notice', title: __('Is_notice'), searchList: {"0":__('Is_notice 0'),"1":__('Is_notice 1')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'finish_time', title: __('Finish_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'admin_id', title: __('Admin_id')},
|
||||
{
|
||||
field: 'finish_time',
|
||||
title: __('Finish_time'),
|
||||
operate: 'RANGE',
|
||||
addclass: 'datetimerange',
|
||||
autocomplete: false
|
||||
},
|
||||
// {field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: 'LIKE'},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: __('Create_time'),
|
||||
operate: 'RANGE',
|
||||
addclass: 'datetimerange',
|
||||
autocomplete: false
|
||||
},
|
||||
{
|
||||
field: 'update_time',
|
||||
title: __('Update_time'),
|
||||
operate: 'RANGE',
|
||||
addclass: 'datetimerange',
|
||||
autocomplete: false
|
||||
},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
{
|
||||
field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text:"修改",
|
||||
title:"修改",
|
||||
text: "修改",
|
||||
title: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
//title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-editone',
|
||||
visible:function(row){
|
||||
if(row.btn_edit){
|
||||
visible: function (row) {
|
||||
if (row.btn_edit) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -83,37 +154,37 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], f
|
|||
},
|
||||
|
||||
{
|
||||
name:"income",
|
||||
text:"新增收款",
|
||||
title:"新增收款",
|
||||
classname:"btn-view btn-dialog",
|
||||
name: "income",
|
||||
text: "新增收款",
|
||||
title: "新增收款",
|
||||
classname: "btn-view btn-dialog",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
icon:'fa fa-money',
|
||||
url: function(row){
|
||||
return 'orders/income/add?order_id='+row.order_id;
|
||||
icon: 'fa fa-money',
|
||||
url: function (row) {
|
||||
return 'orders/income/add?order_id=' + row.order_id;
|
||||
},
|
||||
dropdown:"更多",
|
||||
visible:function(row){
|
||||
if(row.btn_income){
|
||||
dropdown: "更多",
|
||||
visible: function (row) {
|
||||
if (row.btn_income) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
refresh:true,
|
||||
refresh: true,
|
||||
},
|
||||
{
|
||||
name:"abnormal",
|
||||
text:"创建异常",
|
||||
title:"创建异常",
|
||||
classname:"btn-add btn-dialog",
|
||||
name: "abnormal",
|
||||
text: "创建异常",
|
||||
title: "创建异常",
|
||||
classname: "btn-add btn-dialog",
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
icon:'fa fa-question',
|
||||
url:function(row) {
|
||||
return "orders/abnormal/add?order_id="+row.order_id
|
||||
icon: 'fa fa-question',
|
||||
url: function (row) {
|
||||
return "orders/abnormal/add?order_id=" + row.order_id
|
||||
},
|
||||
dropdown:"更多",
|
||||
visible:function(row){
|
||||
if(row.btn_income){
|
||||
dropdown: "更多",
|
||||
visible: function (row) {
|
||||
if (row.btn_income) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -122,38 +193,38 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], f
|
|||
},
|
||||
{
|
||||
name: 'del',
|
||||
text:"取消任务",
|
||||
title:"取消任务",
|
||||
text: "取消任务",
|
||||
title: "取消任务",
|
||||
icon: 'fa fa-trash red',
|
||||
//title: __('Del'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: '',
|
||||
dropdown:"更多",
|
||||
click: function (data, row) {
|
||||
dropdown: "更多",
|
||||
click: function (data, row) {
|
||||
layer.prompt({
|
||||
formType: 1,
|
||||
value: '',
|
||||
title: '请输入备注',
|
||||
maxlength: 140,
|
||||
},function(value, index, elem) {
|
||||
formType: 1,
|
||||
value: '',
|
||||
title: '请输入备注',
|
||||
maxlength: 140,
|
||||
}, function (value, index, elem) {
|
||||
var url = 'orders/dispatch/del' + row.id;
|
||||
var options = {url: url, data: {remark: value}};
|
||||
Fast.api.ajax(options, function (data, ret) {
|
||||
// table.trigger("uncheckbox");
|
||||
table.bootstrapTable('refresh');
|
||||
})
|
||||
},function (data, ret) {
|
||||
var error = $(this).data("error") || $.noop;
|
||||
if (typeof error === 'function') {
|
||||
if (false === error.call(this, data, ret)) {
|
||||
return false;
|
||||
}, function (data, ret) {
|
||||
var error = $(this).data("error") || $.noop;
|
||||
if (typeof error === 'function') {
|
||||
if (false === error.call(this, data, ret)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
},
|
||||
visible:function(row){
|
||||
if(row.btn_cancel){
|
||||
visible: function (row) {
|
||||
if (row.btn_cancel) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -183,94 +254,101 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], f
|
|||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url + '?'+ getQueryData(),
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url + '?' + getQueryData(),
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedColumns: false,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{field: 'finish_order', title: '接单总数'},
|
||||
{field: 'doing_order', title: '当前服务订单数'},
|
||||
{field: 'star', title: '星级'},
|
||||
{field: 'tel', title: '电话', operate: 'LIKE'},
|
||||
// {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
|
||||
//{field: 'area_id', title: __('Area_id')},
|
||||
//{field: 'lng', title: __('Lng'), operate:'BETWEEN'},
|
||||
//{field: 'lat', title: __('Lat'), operate:'BETWEEN'},
|
||||
{field: 'area.short_merge_name', title: __('Area.short_merge_name'), operate: 'LIKE'},
|
||||
{field: 'area.short_merge_name', title: '区域', operate: 'LIKE'},
|
||||
// {field: 'deposit_amount', title: __('Deposit_amount'), operate:'BETWEEN'},
|
||||
{field: 'id', title: '操作',formatter:function (id) {
|
||||
{
|
||||
field: 'id', title: '操作', formatter: function (id) {
|
||||
return `<p class="btn btn-primary tab_chose" data-id="${id}">选择</p>`;
|
||||
}},
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
search:false,
|
||||
commonSearch:false,
|
||||
search: false,
|
||||
commonSearch: false,
|
||||
});
|
||||
function getQueryData(){
|
||||
|
||||
function getQueryData() {
|
||||
const
|
||||
area_id = $('#area_id').val(),
|
||||
item_id = $('#item_id').data('myvalue'),
|
||||
keyword = $('#keyword').val()
|
||||
;
|
||||
let res = '';
|
||||
if (area_id && area_id !== ''){
|
||||
if (area_id && area_id !== '') {
|
||||
res += '&area_id=' + area_id;
|
||||
}
|
||||
if (item_id && item_id !== ''){
|
||||
if (item_id && item_id !== '') {
|
||||
res += '&item_id=' + item_id;
|
||||
}
|
||||
if (keyword && keyword !== ''){
|
||||
if (keyword && keyword !== '') {
|
||||
res += '&keyword=' + keyword;
|
||||
}
|
||||
console.log(res);
|
||||
return res;
|
||||
}
|
||||
$("#c-city-search").on("cp:updated", function() {
|
||||
|
||||
$("#c-city-search").on("cp:updated", function () {
|
||||
var citypicker = $(this).data("citypicker");
|
||||
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
|
||||
// table.bootstrapTable('refresh',{query: {area_code: code}});
|
||||
$('#area_id').val(code);
|
||||
});
|
||||
$("#search_btn").on("click", function() {
|
||||
console.log($.fn.bootstrapTable.defaults.extend.index_url +'?' + getQueryData());
|
||||
table.bootstrapTable('refresh',{
|
||||
url:$.fn.bootstrapTable.defaults.extend.index_url +'?' + getQueryData(),
|
||||
$("#search_btn").on("click", function () {
|
||||
console.log($.fn.bootstrapTable.defaults.extend.index_url + '?' + getQueryData());
|
||||
table.bootstrapTable('refresh', {
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url + '?' + getQueryData(),
|
||||
});
|
||||
});
|
||||
$("#reset_btn").on("click", function() {
|
||||
var _data = items;
|
||||
$("#reset_btn").on("click", function () {
|
||||
$("#c-city-search").citypicker('reset');
|
||||
$("#area_id").val('');
|
||||
$("#test").val('');
|
||||
$("#test").data('myvalue','');
|
||||
$("#test").data('myvalue', '');
|
||||
$("#keyword").val('');
|
||||
table.bootstrapTable('refresh',{
|
||||
url:$.fn.bootstrapTable.defaults.extend.index_url +'?' + getQueryData(),
|
||||
$('#item_id').zdCascader.reload(_data,true);
|
||||
table.bootstrapTable('refresh', {
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url + '?' + getQueryData(),
|
||||
});
|
||||
});
|
||||
Form.events.citypicker($("#select-form"));
|
||||
|
||||
$(document).on('click', '.tab_chose', function() {
|
||||
$(document).on('click', '.tab_chose', function () {
|
||||
var dataId = $(this).data('id'); // 获取 data-id 的值
|
||||
const worker = Table.api.getrowbyid(table ,dataId);
|
||||
const worker = Table.api.getrowbyid(table, dataId);
|
||||
$('#c-worker_name').val(worker.name + '--' + worker.tel).trigger('input').trigger('change');
|
||||
$('#c-worker_id').val(worker.id).trigger('input').trigger('change');
|
||||
});
|
||||
|
||||
|
||||
var _data = items;
|
||||
$(function(){
|
||||
$('#item_id').zdCascader({
|
||||
data:_data,
|
||||
onChange: function ($this,data,allPathData) {
|
||||
// console.log(data,allPathData);
|
||||
$('#item_id').data('myvalue',data.value);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#item_id').zdCascader({
|
||||
data: _data,
|
||||
onChange: function ($this, data, allPathData) {
|
||||
// console.log(data,allPathData);
|
||||
$('#item_id').data('myvalue', data.value);
|
||||
},
|
||||
defaultValue:$('#item_id_name').val()
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
|
||||
|
|
@ -281,7 +359,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer','cascader'], f
|
|||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("#add-form"),null,null,function (data) {
|
||||
Form.api.bindevent($("#add-form"), null, null, function (data) {
|
||||
// Form.api.submit($("#add-form"));
|
||||
// return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
|||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
searchFormVisible:true,
|
||||
columns: [
|
||||
[
|
||||
//{checkbox: true},
|
||||
|
|
@ -38,25 +39,53 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
|||
return '';
|
||||
}},
|
||||
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'id', title: __('Id'), operate: false},
|
||||
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: '='},
|
||||
|
||||
{
|
||||
field: 'follow',
|
||||
title: '跟进状态',
|
||||
searchList: {
|
||||
'0':'待跟进',
|
||||
"1": '已跟进',
|
||||
"2": '已结束',
|
||||
},
|
||||
formatter: Table.api.formatter.label,
|
||||
custom: {
|
||||
'0': 'warning', // 待跟进:灰蓝色(默认 Bootstrap info)
|
||||
'1': 'success', // 已跟进:绿色
|
||||
'2': 'default', // 已结束:红色
|
||||
},
|
||||
defaultValue: '0'
|
||||
//sortable:true,
|
||||
},
|
||||
|
||||
{field: 'record_count', title: '跟进次数',operate: false},
|
||||
|
||||
|
||||
|
||||
|
||||
//{field: 'order_id', title: __('Order_id')},
|
||||
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'},
|
||||
|
||||
|
||||
// {field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
|
||||
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"25":__('Status 25'),"30":__('Status 30'),"60":__('Status 60'),"-10":__('Status -10'),
|
||||
//"-20":__('Status -20'),
|
||||
"-30":__('Status -30')},
|
||||
formatter: Table.api.formatter.status,
|
||||
custom:{25:"red"}
|
||||
},
|
||||
//{field: 'follow', title: __('跟进状态'), searchList: {"0":__('待跟进'),"1":__('已跟进'),"2":__('已结束')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
{field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false,
|
||||
// {field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
|
||||
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('自动')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
|
||||
|
||||
{field: 'plan_time', title: __('Plan_time'), operate:false, addclass:'datetimerange', autocomplete:false,
|
||||
formatter:function(value,row,index){
|
||||
if(row.status == 25){
|
||||
return' <span style="color:red;font-weight: bold">'+value+'</span>';
|
||||
|
|
@ -65,25 +94,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
|||
}
|
||||
}},
|
||||
|
||||
|
||||
{field: 'order.source_shop', title: __('Order.source_shop'), operate: 'LIKE'},
|
||||
//{field: 'order.source_shop', title: __('Order.source_shop'), operate: '='},
|
||||
// {field: 'order.source', title: __('Order.source')},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
{field: 'order.address', title: __('Order.address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: false},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: '='},
|
||||
{field: 'order.address', title: __('Order.address'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'order.item_title', title: __('Order.item_title'), operate: 'LIKE'},
|
||||
{field: 'order.detail', title: __('Order.detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'order.item_title', title: __('Order.item_title'), operate: false},
|
||||
{field: 'order.detail', title: __('Order.detail'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'order.images', title: __('Order.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'arrive_time', title: __('上门时间'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'arrive_image', title: __('上门照片'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
|
||||
// {field: 'is_notice', title: __('Is_notice'), searchList: {"0":__('Is_notice 0'),"1":__('Is_notice 1')}, formatter: Table.api.formatter.normal},
|
||||
// {field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: 'LIKE'},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'finish_time', title: __('Finish_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||
|
|
@ -176,48 +204,66 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
|||
}
|
||||
|
||||
// 弹出确认框并要求输入文本
|
||||
Layer.prompt({
|
||||
title: "请输入操作理由",
|
||||
formType: 2, // 多行文本输入框
|
||||
}, function (inputValue, index) {
|
||||
if (!inputValue) {
|
||||
Layer.alert("输入内容不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 关闭弹出框
|
||||
Layer.close(index);
|
||||
Layer.open({
|
||||
type: 1,
|
||||
title: '请输入操作理由',
|
||||
area: ['520px', '280px'], // 宽高可调
|
||||
btn: ['提交', '取消'],
|
||||
content: '<div style="padding: 20px;">' +
|
||||
'<div style="margin-bottom: 10px; color: #f39c12; font-size: 14px;">' +
|
||||
'提示:取消后该订单会重新进入待派单状态' +
|
||||
'</div>' +
|
||||
//'<input id="input-title" data-field="title" data-params=\'{"custom[type]":"1"}\' data-rule="required" data-source="setting/abnormal/index" class="form-control selectpage" type="text" value="">'+
|
||||
Config.abnormal_select +
|
||||
'<textarea style="margin-top: 10px" id="input-reason" class="form-control" data-rule="required" rows="2" placeholder="请输入操作理由"></textarea>' +
|
||||
'</div>',
|
||||
yes: function(index, layero) {
|
||||
var inputTitle = $("#reason_title").val()+',';
|
||||
var inputValue = $("#input-reason").val().trim();
|
||||
|
||||
//这里可以加入 Ajax 请求处理逻辑
|
||||
$.ajax({
|
||||
url: 'orders/dispatch2/del',
|
||||
type: 'POST',
|
||||
data: {
|
||||
ids: selectedIds,
|
||||
reason: inputValue,
|
||||
},
|
||||
success: function (response,data) {
|
||||
if(response.code == 1){
|
||||
// 成功提示
|
||||
Toastr.success(data.message || "操作成功!");
|
||||
// 刷新表格
|
||||
table.bootstrapTable('refresh');
|
||||
}else{
|
||||
Toastr.error(response.msg || "操作失败!");
|
||||
}
|
||||
return;
|
||||
},
|
||||
error: function () {
|
||||
Toastr.error("操作失败,请重试!");
|
||||
if (!inputValue) {
|
||||
Layer.msg('输入内容不能为空!');
|
||||
return;
|
||||
}
|
||||
});
|
||||
inputValue = inputTitle + inputValue
|
||||
|
||||
|
||||
Layer.close(index);
|
||||
|
||||
var loadingIndex = Layer.load(1, {
|
||||
shade: [0.2, '#ccc']
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: 'orders/dispatch2/del',
|
||||
type: 'POST',
|
||||
data: {
|
||||
ids: selectedIds, // 确保 selectedIds 已定义
|
||||
reason: inputValue
|
||||
},
|
||||
success: function(response) {
|
||||
Layer.close(loadingIndex);
|
||||
if (response.code == 1) {
|
||||
Toastr.success(response.message || "操作成功!");
|
||||
table.bootstrapTable('refresh');
|
||||
} else {
|
||||
Toastr.error(response.msg || "操作失败!");
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
Layer.close(loadingIndex);
|
||||
Toastr.error("操作失败,请重试!");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// 获取选中项
|
||||
$(document).on("click", ".btn-add-normal", function () {
|
||||
// 获取选中项的 ID
|
||||
|
|
|
|||
|
|
@ -62,6 +62,48 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
// 表格1
|
||||
var table1 = $("#table1");
|
||||
table1.bootstrapTable({
|
||||
url: 'orders/dispatchrecord/index' + location.search,
|
||||
/* extend: {
|
||||
index_url: '',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: '',
|
||||
multi_url: '',
|
||||
table: '',
|
||||
},*/
|
||||
toolbar: '#toolbar2',
|
||||
sortName: 'id',
|
||||
search: false,
|
||||
commonSearch:false,
|
||||
visible: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
showExport: false,
|
||||
columns: [
|
||||
[
|
||||
{field: 'id', title: __('Id')},
|
||||
//{field: 'dispatch_id', title: __('Dispatch_id')},
|
||||
//{field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'remark', title: __('跟进内容'), operate: 'LIKE', table: table2, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'images', title: __('跟进依据'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
/* {field: 'need_notice', title: __('需要提醒'), searchList: {"0":__('否'),"1":__('是')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'notice_time', title: __('提醒时间'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},*/
|
||||
{field: 'status', title: __('状态'), searchList: {"0":__('进行中'),"1":__('已完成')}, formatter: Table.api.formatter.status},
|
||||
{field: 'create_time', title: __('创建时间'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
//{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
});
|
||||
|
||||
// 为表格1绑定事件
|
||||
Table.api.bindevent(table1);
|
||||
},
|
||||
second: function () {
|
||||
// 表格2
|
||||
var table2 = $("#table2");
|
||||
table2.bootstrapTable({
|
||||
url: 'orders/dispatchlog/index' + location.search,
|
||||
toolbar: '#toolbar1',
|
||||
sortName: 'id',
|
||||
|
|
@ -85,45 +127,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格1绑定事件
|
||||
Table.api.bindevent(table1);
|
||||
},
|
||||
second: function () {
|
||||
// 表格2
|
||||
var table2 = $("#table2");
|
||||
table2.bootstrapTable({
|
||||
url: 'orders/dispatchrecord/index' + location.search,
|
||||
/* extend: {
|
||||
index_url: '',
|
||||
add_url: '',
|
||||
edit_url: '',
|
||||
del_url: '',
|
||||
multi_url: '',
|
||||
table: '',
|
||||
},*/
|
||||
toolbar: '#toolbar2',
|
||||
sortName: 'id',
|
||||
search: false,
|
||||
commonSearch:false,
|
||||
visible: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
showExport: false,
|
||||
columns: [
|
||||
[
|
||||
{field: 'id', title: __('Id')},
|
||||
//{field: 'dispatch_id', title: __('Dispatch_id')},
|
||||
//{field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'remark', title: __('跟进内容'), operate: 'LIKE', table: table2, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'need_notice', title: __('需要提醒'), searchList: {"0":__('否'),"1":__('是')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'notice_time', title: __('提醒时间'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'status', title: __('状态'), searchList: {"0":__('未完成'),"1":__('已结束')}, formatter: Table.api.formatter.status},
|
||||
{field: 'create_time', title: __('创建时间'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
//{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
]
|
||||
]
|
||||
});
|
||||
// 为表格2绑定事件
|
||||
Table.api.bindevent(table2);
|
||||
}
|
||||
|
|
|
|||
124
public/assets/js/backend/orders/invoice.js
Normal file
124
public/assets/js/backend/orders/invoice.js
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'orders.invoice/index' + location.search,
|
||||
add_url: 'orders.invoice/add',
|
||||
edit_url: 'orders.invoice/edit',
|
||||
del_url: 'orders.invoice/del',
|
||||
multi_url: 'orders.invoice/multi',
|
||||
import_url: 'orders.invoice/import',
|
||||
table: 'order_invoice',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'order_id', title: __('Order_id')},
|
||||
{field: 'invoice_type', title: __('Invoice_type'),formatter: function (val) {
|
||||
return val === 1 ? '公司发票': '个人发票';
|
||||
}},
|
||||
{field: 'status', title: __('Status'),formatter:function (val) {
|
||||
let list = [
|
||||
'代处理',
|
||||
'已开票',
|
||||
'已完成',
|
||||
];
|
||||
return list[val] ?? '';
|
||||
}},
|
||||
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'tax_number', title: __('Tax_number'), operate: 'LIKE'},
|
||||
{field: 'amount', title: __('Amount'), operate:'BETWEEN'},
|
||||
// {field: 'invoice_method', title: __('Invoice_method')},
|
||||
{field: 'recipient_email', title: __('Recipient_email'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'company_address', title: __('Company_address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'company_phone', title: __('Company_phone'), operate: 'LIKE'},
|
||||
{field: 'bank_name', title: __('Bank_name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'bank_account', title: __('Bank_account'), operate: 'LIKE'},
|
||||
{field: 'recipient_address', title: __('Recipient_address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'recipient_name', title: __('Recipient_name'), operate: 'LIKE'},
|
||||
{field: 'recipient_phone', title: __('Recipient_phone'), operate: 'LIKE'},
|
||||
{field: 'issued_at', title: __('Issued_at'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table,
|
||||
events: Table.api.events.operate,
|
||||
buttons:[
|
||||
{
|
||||
name: 'edit',
|
||||
text: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: "删除",
|
||||
icon: 'fa fa-trash',
|
||||
title: __('Delete'),
|
||||
extend: 'data-toggle="tooltip"',
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
},
|
||||
],
|
||||
formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
function toggleInvoiceFields() {
|
||||
const type = $('#c-source').val();
|
||||
if (type === '1') {
|
||||
// 公司发票
|
||||
$('#c-tax_number').closest('.form-group').show();
|
||||
$('#c-company_address').closest('.form-group').show();
|
||||
$('#c-company_phone').closest('.form-group').show();
|
||||
$('#c-bank_name').closest('.form-group').show();
|
||||
$('#c-bank_account').closest('.form-group').show();
|
||||
} else {
|
||||
// 个人发票
|
||||
$('#c-tax_number').closest('.form-group').hide();
|
||||
$('#c-company_address').closest('.form-group').hide();
|
||||
$('#c-company_phone').closest('.form-group').hide();
|
||||
$('#c-bank_name').closest('.form-group').hide();
|
||||
$('#c-bank_account').closest('.form-group').hide();
|
||||
}
|
||||
}
|
||||
// 初始化时执行一次
|
||||
toggleInvoiceFields();
|
||||
|
||||
// 监听 select 改变
|
||||
$('#c-source').on('change',function () {
|
||||
toggleInvoiceFields();
|
||||
});
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -30,19 +30,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
[
|
||||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
{field: 'order_no', title: __('Order_no'), operate: '='},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"60":__('Status 60'),"-10":__('Status -10')}, formatter: Table.api.formatter.status},
|
||||
{field: 'aftersale_id', title: __('是否退款'),operate:false,formatter: function (val) {
|
||||
return val >0 ? '是' : '否';
|
||||
}},
|
||||
|
||||
// {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"30":__('Status 30'),"40":__('Status 40'),"50":__('Status 50'),"60":__('Status 60'),"-10":__('Status -10')}, formatter: Table.api.formatter.status},
|
||||
// {field: 'area_id', title: __('Area_id'), operate: 'LIKE'},
|
||||
{field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'address', title: __('Address'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
// {field: 'source_shop', title: __('Source_shop'), operate: 'LIKE'},
|
||||
// {field: 'source', title: __('Source')},
|
||||
|
||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
||||
{field: 'detail', title: __('Detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{field: 'item_title', title: __('Item_title'), operate: false},
|
||||
{field: 'detail', title: __('Detail'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'customer', title: __('Customer'), operate: false},
|
||||
{field: 'tel', title: __('Tel'), operate: '='},
|
||||
// {field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
// {field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
|
@ -63,13 +67,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
// {field: 'audit_remark', title: __('Audit_remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
// {field: 'audit_admin_id', title: __('Audit_admin_id')},
|
||||
|
||||
{field: 'review.pt_star', title: __('Review.pt_star')},
|
||||
{field: 'review.worker_star', title: __('Review.worker_star')},
|
||||
{field: 'review.remark', title: __('回访备注'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'review.admin_user', title: __('Review.admin_user'), operate: 'LIKE'},
|
||||
{field: 'review.pt_star', title: __('Review.pt_star'),operate: false},
|
||||
{field: 'review.worker_star', title: __('Review.worker_star'),operate: false},
|
||||
{field: 'review.remark', title: __('回访备注'), operate: false, table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'review.admin_user', title: __('Review.admin_user'), operate: false},
|
||||
|
||||
{field: 'review.create_time', title: __('回访时间'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'review.create_time', title: __('回访时间'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'create_time', title: __('Create_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'delete_time', title: __('Delete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
// {field: 'dispatch_type', title: __('Dispatch_type')},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form','editable'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
|
|
@ -29,11 +29,40 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
// {checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'type', title: '种类',formatter: function ($val) {
|
||||
if($val === 1){
|
||||
return '订单报错';
|
||||
}
|
||||
if($val === 2){
|
||||
return '取消订单';
|
||||
}
|
||||
|
||||
if($val === 3){
|
||||
return '取消派单'
|
||||
}
|
||||
return $val === 1 ? '异常类型' : '取消类型';
|
||||
}},
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE',editable:true},
|
||||
{field: 'sort', title: __('Sort'),sortable:true},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'), table: table,
|
||||
buttons:[
|
||||
{
|
||||
name: 'edit',
|
||||
text: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: "删除",
|
||||
icon: 'fa fa-trash',
|
||||
title: __('Delete'),
|
||||
extend: 'data-toggle="tooltip"',
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
},
|
||||
],
|
||||
events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jstree'],
|
|||
[
|
||||
{checkbox: true},
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'admin.username', title:'创建人'},
|
||||
{field: 'name', title: __('Name'), operate: 'LIKE'},
|
||||
{field: 'type', title: '师傅归属', formatter: function (val){
|
||||
return val === 1 ? '自营':'非自营';
|
||||
}},
|
||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
|
||||
//{field: 'area_id', title: __('Area_id')},
|
||||
|
|
@ -54,7 +58,27 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','jstree'],
|
|||
{field: 'star', title: __('Star'), operate:'BETWEEN'},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'),
|
||||
buttons:[
|
||||
{
|
||||
name: 'edit',
|
||||
text: "修改",
|
||||
icon: 'fa fa-pencil',
|
||||
title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: "删除",
|
||||
icon: 'fa fa-trash',
|
||||
title: __('Delete'),
|
||||
extend: 'data-toggle="tooltip"',
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
},
|
||||
],
|
||||
table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@
|
|||
ZdCascader.DEFAULTS = {
|
||||
data: null, //支持格式[{value:"",label:"",children:[{value:"",label:""}]}]
|
||||
range: ' / ', //分割符
|
||||
onChange: function (data) {}
|
||||
onChange: function (data) {},
|
||||
defaultValue: null // 新增 defaultValue 属性
|
||||
}
|
||||
|
||||
ZdCascader.METHODS = ['reload', 'destroy'];
|
||||
|
|
@ -84,6 +85,7 @@
|
|||
</svg>
|
||||
</span>
|
||||
</span>`).insertAfter(this.$el);
|
||||
|
||||
//下拉列表
|
||||
this.$dropdownWrap = $(`<div class="${this.CLASS.dropdownPanel}"></div>`).appendTo(this.$container).wrap(`<div class="${this.CLASS.dropdownWrap}"></div>`);
|
||||
|
||||
|
|
@ -145,6 +147,7 @@
|
|||
$that.prepend($(`<span class="${this.CLASS.checkClass.nodeSelectedIcon}">√</span>`));
|
||||
this.$el.data('bindData', data);
|
||||
this.$el.data('bindPathData', allPathData);
|
||||
console.log(allPathData);
|
||||
if (this.options.onChange && typeof this.options.onChange === "function")
|
||||
this.options.onChange(this, data, allPathData);
|
||||
event.stopPropagation();
|
||||
|
|
@ -212,9 +215,11 @@
|
|||
this.$el.remove();
|
||||
}
|
||||
//重新加载下拉数据
|
||||
ZdCascader.prototype.reload = function (data) {
|
||||
ZdCascader.prototype.reload = function (data,clear = false) {
|
||||
data = data || this.options.data;
|
||||
this.$el.val('').removeData('bindData').removeData('bindPathData');
|
||||
if (clear){
|
||||
this.$el.val('').removeData('bindData').removeData('bindPathData');
|
||||
}
|
||||
this.$dropdownWrap.empty();
|
||||
var selectedData = this.$el.data('bindData');
|
||||
var $firstWrap = $(`<div class="zd-scrollbar ${this.CLASS.menuWrap}">
|
||||
|
|
@ -240,16 +245,16 @@
|
|||
</svg>`);
|
||||
$li.append($label).data('bindData', m);
|
||||
if (m.children && m.children.length > 0) $li.append($icon);
|
||||
else if (selectedData && m.value == selectedData.value) {
|
||||
else if (this.options.defaultValue && m.value == this.options.defaultValue) {
|
||||
this.$dropdownWrap.find('.' + this.CLASS.checkClass.nodeSelectedIcon).remove();
|
||||
$li.prepend($(`<span class="${this.CLASS.checkClass.nodeSelectedIcon}">√</span>`));
|
||||
this.$el.val(m.label);
|
||||
}
|
||||
$ul.append($li);
|
||||
});
|
||||
this.$dropdownWrap.find('li.' + this.CLASS.checkClass.nodeAnchor).removeClass(this.CLASS.checkClass.nodeAnchor);
|
||||
this.$dropdownWrap.append($firstWrap).find(this.CLASS.menuNode).eq(0).focus().addClass(this.CLASS.checkClass
|
||||
.nodeAnchor);
|
||||
this.$dropdownWrap.append($firstWrap);
|
||||
}
|
||||
|
||||
ZdCascader.prototype._keyup = function (event) {
|
||||
var keycode = event.which;
|
||||
switch (keycode) {
|
||||
|
|
@ -359,38 +364,22 @@
|
|||
this.$el.focus();
|
||||
}
|
||||
|
||||
$.fn.zdCascader = function (option) {
|
||||
var value,
|
||||
args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('zdCascader'),
|
||||
options = $.extend({}, ZdCascader.DEFAULTS, $this.data(),
|
||||
typeof option === 'object' && option);
|
||||
|
||||
if (typeof option === 'string') {
|
||||
if ($.inArray(option, ZdCascader.METHODS) < 0) {
|
||||
throw new Error("Unknown method: " + option);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
value = data[option].apply(data, args);
|
||||
|
||||
if (option === 'destroy') {
|
||||
$this.removeData('zdCascader');
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.zdCascader = function (options) {
|
||||
options = $.extend({}, ZdCascader.DEFAULTS, options);
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('zdCascader');
|
||||
if (!data) {
|
||||
$this.data('zdCascader', (data = new ZdCascader(this, options)));
|
||||
data = new ZdCascader(this, options);
|
||||
$this.data('zdCascader', data);
|
||||
}
|
||||
if (typeof options === 'string') {
|
||||
if (ZdCascader.METHODS.indexOf(options) > -1) {
|
||||
data[options]();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return typeof value === 'undefined' ? this : value;
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
BIN
vendor.zip
Normal file
BIN
vendor.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user