Accept Merge Request #1: (feature/hant -> develop)
Merge Request: Merge remote-tracking branch 'origin/develop' into feature/hant Created By: @todayswind Accepted By: @todayswind URL: https://g-bcrc3009.coding.net/p/allocatr/d/allocatr/git/merge/1?initial=true
This commit is contained in:
commit
2a2f420de1
40
application/admin/command/AreaPinyinCommand.php
Normal file
40
application/admin/command/AreaPinyinCommand.php
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\command;
|
||||||
|
|
||||||
|
use Overtrue\Pinyin\Converter;
|
||||||
|
use think\console\Command;
|
||||||
|
use think\console\Input;
|
||||||
|
use think\console\Output;
|
||||||
|
use think\Db;
|
||||||
|
use Overtrue\Pinyin\Pinyin;
|
||||||
|
|
||||||
|
class AreaPinyinCommand extends Command
|
||||||
|
{
|
||||||
|
protected function configure()
|
||||||
|
{
|
||||||
|
$this->setName('area:pinyin')
|
||||||
|
->setDescription('批量生成区域名称的拼音');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function execute(Input $input, Output $output)
|
||||||
|
{
|
||||||
|
$pinyin = new Pinyin();
|
||||||
|
|
||||||
|
// 读取 `area` 表所有数据
|
||||||
|
$areas = Db::name('areas')->where('id','>',0)->select();
|
||||||
|
|
||||||
|
foreach ($areas as $area) {
|
||||||
|
$fullPinyin = strtolower(str_replace(' ','',$pinyin->name($area['merge_name'],Converter::TONE_STYLE_NONE))); // 全拼
|
||||||
|
$abbrPinyin = strtolower(str_replace(' ','',$pinyin->abbr($area['merge_name']))); // 首字母
|
||||||
|
// 更新数据库
|
||||||
|
Db::name('areas')
|
||||||
|
->where('id', $area['id'])
|
||||||
|
->update(['pinyin' => $fullPinyin, 'abbr' => $abbrPinyin]);
|
||||||
|
|
||||||
|
$output->writeln("更新: {$area['merge_name']} -> {$fullPinyin} ({$abbrPinyin})");
|
||||||
|
}
|
||||||
|
|
||||||
|
$output->writeln("拼音转换完成!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,9 +19,22 @@ class Area extends Backend
|
||||||
$this->success(data:[]);
|
$this->success(data:[]);
|
||||||
}else{
|
}else{
|
||||||
$data = model('area')
|
$data = model('area')
|
||||||
->where('merge_name','like','%'.$keyword.'%')
|
|
||||||
->where('level','=',3)
|
->where('level','=',3)
|
||||||
|
->where(function ($query)use ($keyword){
|
||||||
|
$query->where('merge_name','like','%'.$keyword.'%')
|
||||||
|
->whereOr('pinyin', 'like', "%{$keyword}%")
|
||||||
|
->whereOr('abbr', 'like', "%{$keyword}%");
|
||||||
|
})
|
||||||
|
|
||||||
->field('area_code, merge_name')
|
->field('area_code, merge_name')
|
||||||
|
->orderRaw(
|
||||||
|
"CASE
|
||||||
|
WHEN name LIKE '{$keyword}%' THEN 1
|
||||||
|
WHEN pinyin LIKE '{$keyword}%' THEN 2
|
||||||
|
WHEN abbr LIKE '{$keyword}%' THEN 3
|
||||||
|
ELSE 4
|
||||||
|
END"
|
||||||
|
)
|
||||||
->limit(0,10)
|
->limit(0,10)
|
||||||
->select();
|
->select();
|
||||||
$this->success(data:$data);
|
$this->success(data:$data);
|
||||||
|
|
|
||||||
123
application/admin/controller/Item.php
Normal file
123
application/admin/controller/Item.php
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller;
|
||||||
|
|
||||||
|
use app\common\controller\Backend;
|
||||||
|
use fast\Tree;
|
||||||
|
use think\Db;
|
||||||
|
use think\exception\PDOException;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目列管理
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Item extends Backend
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Item模型对象
|
||||||
|
* @var \app\admin\model\Item
|
||||||
|
*/
|
||||||
|
protected $model = null;
|
||||||
|
|
||||||
|
public function _initialize()
|
||||||
|
{
|
||||||
|
parent::_initialize();
|
||||||
|
$this->model = new \app\admin\model\Item;
|
||||||
|
|
||||||
|
|
||||||
|
// 必须将结果集转换为数组
|
||||||
|
$ruleList = \think\Db::name("item")->field('id,pid,level,title')->order('sort DESC,id ASC')->select();
|
||||||
|
|
||||||
|
Tree::instance()->init($ruleList)->icon = [' ', ' ', ' '];
|
||||||
|
// dd($ruleList);
|
||||||
|
$this->rulelist = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0), 'title');
|
||||||
|
$itemdata = [0 => __('None')];
|
||||||
|
foreach ($this->rulelist as $k => $v) {
|
||||||
|
$itemdata[$v['id']] = $v['title'];
|
||||||
|
}
|
||||||
|
unset($v);
|
||||||
|
|
||||||
|
$this->view->assign('itemdata', $itemdata);
|
||||||
|
|
||||||
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pid = $params['pid'];
|
||||||
|
if ($pid > 0){
|
||||||
|
$parent = $this->model->where('id',$pid)->find();
|
||||||
|
if ($parent){
|
||||||
|
$params['level'] = $parent->value('level') + 1;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$params['level'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$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();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function search(){
|
||||||
|
|
||||||
|
$keyword = request()->get('keyword');
|
||||||
|
if (!$keyword){
|
||||||
|
$this->success(data:[]);
|
||||||
|
}else{
|
||||||
|
$data = model('item')
|
||||||
|
// ->where('level','=',3)
|
||||||
|
->where(function ($query)use ($keyword){
|
||||||
|
$query->where('title','like','%'.$keyword.'%')
|
||||||
|
->whereOr('key_word', 'like', "%{$keyword}%");
|
||||||
|
})
|
||||||
|
->order('level','desc')
|
||||||
|
->field('title,id')
|
||||||
|
->limit(0,10)
|
||||||
|
->select();
|
||||||
|
$this->success(data:$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -52,6 +52,9 @@ class Order extends Backend
|
||||||
}
|
}
|
||||||
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
[$where, $sort, $order, $offset, $limit] = $this->buildparams();
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
|
->field(['id','order_no','customer','tel','status','area_id','address',
|
||||||
|
'work_tel_id','worker_id','source','source_uid','service_title',
|
||||||
|
'detail','remark','images','create_time','update_time'])
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
->paginate($limit);
|
->paginate($limit);
|
||||||
|
|
@ -86,7 +89,8 @@ class Order extends Backend
|
||||||
$params['enter_admin_id'] = $this->auth->id;
|
$params['enter_admin_id'] = $this->auth->id;
|
||||||
$params['status'] = 10;
|
$params['status'] = 10;
|
||||||
$params['order_no'] = $this->generateOrderNumber();
|
$params['order_no'] = $this->generateOrderNumber();
|
||||||
|
$params['create_time'] = date('Y-m-d H:i:s');
|
||||||
|
$params['update_time'] = date('Y-m-d H:i:s');
|
||||||
|
|
||||||
$result = $this->model->allowField(true)->save($params);
|
$result = $this->model->allowField(true)->save($params);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
|
@ -100,6 +104,73 @@ class Order extends Backend
|
||||||
$this->success();
|
$this->success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function edit($ids = null)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!$ids) {
|
||||||
|
if (request()->isPost()){
|
||||||
|
$ids = input('id');
|
||||||
|
if (!$ids){
|
||||||
|
$this->error('缺少订单ID');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->error('缺少订单ID');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前ID对应的订单信息
|
||||||
|
$order = $this->model->get($ids);
|
||||||
|
if (!$order) {
|
||||||
|
$this->error('订单不存在');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否为POST请求,进行更新操作
|
||||||
|
if (request()->isPost()) {
|
||||||
|
// 获取表单提交的数据
|
||||||
|
$data = input('post.row/a');
|
||||||
|
$data['update_time'] = date('Y-m-d H:i:s');
|
||||||
|
// 更新订单信息
|
||||||
|
$order->save($data);
|
||||||
|
|
||||||
|
// 返回成功信息
|
||||||
|
$this->success('更新成功', 'index');
|
||||||
|
}
|
||||||
|
$area = new \app\admin\model\Area();
|
||||||
|
$area_name = $area->getNameByCode($order->area_id);
|
||||||
|
$order->area_name = $area_name;
|
||||||
|
|
||||||
|
// 将订单数据传递到视图
|
||||||
|
$this->assign('row', $order);
|
||||||
|
|
||||||
|
// 渲染编辑页面
|
||||||
|
return $this->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function copy($ids = null)
|
||||||
|
{
|
||||||
|
if (!$ids) {
|
||||||
|
$this->error('缺少订单ID');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前ID对应的订单信息
|
||||||
|
$order = $this->model->get($ids);
|
||||||
|
if (!$order) {
|
||||||
|
$this->error('订单不存在');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$area = new \app\admin\model\Area();
|
||||||
|
$area_name = $area->getNameByCode($order->area_id);
|
||||||
|
$order->area_name = $area_name;
|
||||||
|
|
||||||
|
// 将订单数据传递到视图
|
||||||
|
$this->assign('row', $order);
|
||||||
|
|
||||||
|
// 渲染编辑页面
|
||||||
|
return $this->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
function generateOrderNumber($prefix = 'ORD') {
|
function generateOrderNumber($prefix = 'ORD') {
|
||||||
// 获取当前时间戳(精确到毫秒)
|
// 获取当前时间戳(精确到毫秒)
|
||||||
$timestamp = microtime(true);
|
$timestamp = microtime(true);
|
||||||
|
|
|
||||||
16
application/admin/lang/zh-cn/item.php
Normal file
16
application/admin/lang/zh-cn/item.php
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'Id' => 'ID',
|
||||||
|
'Pid' => 'PID',
|
||||||
|
'Level' => '层级',
|
||||||
|
'Title' => '服务名称',
|
||||||
|
'Key_word' => '关键字',
|
||||||
|
'Image' => '图标',
|
||||||
|
'Sort' => '排序',
|
||||||
|
'Status' => '状态',
|
||||||
|
'Status 1' => '启用',
|
||||||
|
'Set status to 1'=> '设为启用',
|
||||||
|
'Status 0' => '关闭',
|
||||||
|
'Set status to 0'=> '设为关闭'
|
||||||
|
];
|
||||||
|
|
@ -12,4 +12,9 @@ class Area extends Model
|
||||||
protected $name = 'areas';
|
protected $name = 'areas';
|
||||||
|
|
||||||
|
|
||||||
|
public function getNameByCode($code){
|
||||||
|
return $this->where('area_code',$code)->find()->value('merge_name');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
49
application/admin/model/Item.php
Normal file
49
application/admin/model/Item.php
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\model;
|
||||||
|
|
||||||
|
use think\Model;
|
||||||
|
|
||||||
|
|
||||||
|
class Item extends Model
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 表名
|
||||||
|
protected $name = 'item';
|
||||||
|
|
||||||
|
// 自动写入时间戳字段
|
||||||
|
protected $autoWriteTimestamp = false;
|
||||||
|
|
||||||
|
// 定义时间戳字段名
|
||||||
|
protected $createTime = false;
|
||||||
|
protected $updateTime = false;
|
||||||
|
protected $deleteTime = false;
|
||||||
|
|
||||||
|
// 追加属性
|
||||||
|
protected $append = [
|
||||||
|
'status_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Status 1'), '0' => __('Status 0')];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getStatusTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ?: ($data['status'] ?? '');
|
||||||
|
$list = $this->getStatusList();
|
||||||
|
return $list[$value] ?? '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
27
application/admin/validate/Item.php
Normal file
27
application/admin/validate/Item.php
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\validate;
|
||||||
|
|
||||||
|
use think\Validate;
|
||||||
|
|
||||||
|
class Item extends Validate
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
protected $rule = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 提示消息
|
||||||
|
*/
|
||||||
|
protected $message = [
|
||||||
|
];
|
||||||
|
/**
|
||||||
|
* 验证场景
|
||||||
|
*/
|
||||||
|
protected $scene = [
|
||||||
|
'add' => [],
|
||||||
|
'edit' => [],
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
60
application/admin/view/item/add.html
Normal file
60
application/admin/view/item/add.html
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
<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">{:__('Pid')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
{:build_select('row[pid]', $itemdata, null, ['class'=>'form-control', 'required'=>''])}
|
||||||
|
</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="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Key_word')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-key_word" class="form-control" name="row[key_word]" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="c-image" class="form-control" size="50" name="row[image]" type="text">
|
||||||
|
<div class="input-group-addon no-border no-padding">
|
||||||
|
<span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
|
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
</div>
|
||||||
|
<span class="msg-box n-right" for="c-image"></span>
|
||||||
|
</div>
|
||||||
|
<ul class="row list-inline faupload-preview" id="p-image"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-sort" data-rule="required" class="form-control" name="row[sort]" 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>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
65
application/admin/view/item/edit.html
Normal file
65
application/admin/view/item/edit.html
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<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">{:__('Pid')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-pid" data-rule="required" class="form-control" name="row[pid]" type="number" value="{$row.pid|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Level')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-level" data-rule="required" class="form-control" name="row[level]" type="number" value="{$row.level|htmlentities}">
|
||||||
|
</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">{:__('Key_word')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-key_word" class="form-control" name="row[key_word]" type="text" value="{$row.key_word|htmlentities}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
|
||||||
|
<div class="input-group-addon no-border no-padding">
|
||||||
|
<span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
|
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
</div>
|
||||||
|
<span class="msg-box n-right" for="c-image"></span>
|
||||||
|
</div>
|
||||||
|
<ul class="row list-inline faupload-preview" id="p-image"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="number" value="{$row.sort|htmlentities}">
|
||||||
|
</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="$row.status"}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>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
46
application/admin/view/item/index.html
Normal file
46
application/admin/view/item/index.html
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div class="panel panel-default panel-intro">
|
||||||
|
|
||||||
|
<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}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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('item/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('item/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('item/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="dropdown btn-group {:$auth->check('item/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">
|
||||||
|
{foreach name="statusList" item="vo"}
|
||||||
|
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
|
||||||
|
{/foreach}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||||
|
data-operate-edit="{:$auth->check('item/edit')}"
|
||||||
|
data-operate-del="{:$auth->check('item/del')}"
|
||||||
|
width="100%">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -87,7 +87,8 @@
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<button type="submit" class="btn btn-primary btn-embossed disabled">录入</button>
|
<button type="submit" data-id="submit" class="btn btn-primary btn-embossed disabled">录入</button>
|
||||||
|
<button type="submit" data-id="submit_save" class="btn btn-primary btn-embossed disabled">录入并保留基本信息</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
164
application/admin/view/order/copy.html
Normal file
164
application/admin/view/order/copy.html
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
<div class="full-height">
|
||||||
|
<div class="overlay"></div> <!-- 遮罩层 -->
|
||||||
|
<div class="content">
|
||||||
|
<!-- 表单区域(占2/3) -->
|
||||||
|
<div class="form-area">
|
||||||
|
<div class="w-75">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">复制订单</h5>
|
||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('order/add')}">
|
||||||
|
|
||||||
|
<input type="hidden" name="id" value="{$row.id}"> <!-- 订单ID,用于提交编辑的对象 -->
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-customer" class="form-control" name="row[customer]" type="text" value="{$row.customer}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-tel" class="form-control" name="row[tel]" type="number" value="{$row.tel}">
|
||||||
|
</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" class="form-control" type="text" value="{$row.area_name}" />
|
||||||
|
<!-- 选项下拉框 -->
|
||||||
|
<ul id="address-list" class="dropdown-menu" style="display: none;"></ul>
|
||||||
|
|
||||||
|
<!-- 存储选择的 area_code -->
|
||||||
|
<input type="hidden" id="selected-area-code" name="row[area_id]" value="{$row.area_id}">
|
||||||
|
</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" name="row[address]" type="text" value="{$row.address}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-source" class="form-control" name="row[source]" type="number" value="{$row.source}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Service_title')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-service_title" class="form-control" name="row[service_title]" type="text" value="{$row.service_title}">
|
||||||
|
|
||||||
|
<!-- 选项下拉框 -->
|
||||||
|
<ul id="service-list" class="dropdown-menu" style="display: none;"></ul>
|
||||||
|
|
||||||
|
<!-- 存储选择的 service_id -->
|
||||||
|
<input type="hidden" id="selected-service_id" name="row[service_id]" value="{$row.service_id}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<textarea id="c-detail" rows="4" style="width: 100%;resize: vertical" class="form-control" name="row[detail]">{$row.detail}</textarea>
|
||||||
|
</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" rows="4" style="width: 100%;resize: vertical" class="form-control" name="row[remark]">{$row.remark}</textarea>
|
||||||
|
</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">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}">
|
||||||
|
<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 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">保存订单</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 功能区(占1/3) -->
|
||||||
|
<div class="function-area">
|
||||||
|
<h5 class="text-center">快速输入</h5>
|
||||||
|
<div class="form-floating">
|
||||||
|
<textarea rows="8" style="width: 100%;resize: vertical" class="form-control" placeholder="复制内容,快速输入" id="floatingTextarea"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.full-height {
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.3); /* 背景黑色遮罩 */
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.card-body {
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.form-area {
|
||||||
|
flex: 2;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
.function-area {
|
||||||
|
flex: 1;
|
||||||
|
padding: 2rem;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
/*border-left: 1px solid #ddd;*/
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1000;
|
||||||
|
width: 100%;
|
||||||
|
max-height: 300px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
|
||||||
|
margin: 6px 12px;
|
||||||
|
}
|
||||||
|
.dropdown-item {
|
||||||
|
padding: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.suggestion-item:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,245 +1,164 @@
|
||||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<div class="full-height">
|
||||||
|
<div class="overlay"></div> <!-- 遮罩层 -->
|
||||||
|
<div class="content">
|
||||||
|
<!-- 表单区域(占2/3) -->
|
||||||
|
<div class="form-area">
|
||||||
|
<div class="w-75">
|
||||||
|
<div class="card-body">
|
||||||
|
<h5 class="card-title">编辑订单</h5>
|
||||||
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="{:url('order/edit')}">
|
||||||
|
|
||||||
<div class="form-group">
|
<input type="hidden" name="id" value="{$row.id}"> <!-- 订单ID,用于提交编辑的对象 -->
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_no')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-order_no" data-rule="required" class="form-control" name="row[order_no]" type="text" value="{$row.order_no|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-customer" class="form-control" name="row[customer]" type="text" value="{$row.customer|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-tel" data-rule="required" class="form-control" name="row[tel]" type="text" value="{$row.tel|htmlentities}">
|
|
||||||
</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">
|
<div class="form-group">
|
||||||
{foreach name="statusList" item="vo"}
|
<label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
|
||||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
<div class="col-xs-12 col-sm-8">
|
||||||
{/foreach}
|
<input id="c-customer" class="form-control" name="row[customer]" type="text" value="{$row.customer}">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<input id="c-tel" class="form-control" name="row[tel]" type="number" value="{$row.tel}">
|
||||||
|
</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" class="form-control" type="text" value="{$row.area_name}" />
|
||||||
|
<!-- 选项下拉框 -->
|
||||||
|
<ul id="address-list" class="dropdown-menu" style="display: none;"></ul>
|
||||||
|
|
||||||
</div>
|
<!-- 存储选择的 area_code -->
|
||||||
</div>
|
<input type="hidden" id="selected-area-code" name="row[area_id]" value="{$row.area_id}">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_id')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<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}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address}">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<input id="c-source" class="form-control" name="row[source]" type="number" value="{$row.source}">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Work_tel_id')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<input id="c-work_tel_id" data-rule="required" data-source="work/tel/index" class="form-control selectpage" name="row[work_tel_id]" type="text" value="{$row.work_tel_id|htmlentities}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Service_title')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<input id="c-service_title" class="form-control" name="row[service_title]" type="text" value="{$row.service_title}">
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_id')}:</label>
|
<!-- 选项下拉框 -->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<ul id="service-list" class="dropdown-menu" style="display: none;"></ul>
|
||||||
<input id="c-worker_id" data-rule="required" data-source="worker/index" class="form-control selectpage" name="row[worker_id]" type="text" value="{$row.worker_id|htmlentities}">
|
|
||||||
</div>
|
<!-- 存储选择的 service_id -->
|
||||||
</div>
|
<input type="hidden" id="selected-service_id" name="row[service_id]" value="{$row.service_id}">
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<input id="c-source" data-rule="required" class="form-control" name="row[source]" type="number" value="{$row.source|htmlentities}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<textarea id="c-detail" rows="4" style="width: 100%;resize: vertical" class="form-control" name="row[detail]">{$row.detail}</textarea>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source_uid')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<input id="c-source_uid" class="form-control" name="row[source_uid]" type="text" value="{$row.source_uid|htmlentities}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<textarea id="c-remark" rows="4" style="width: 100%;resize: vertical" class="form-control" name="row[remark]">{$row.remark}</textarea>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Service_id')}:</label>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="form-group">
|
||||||
<input id="c-service_id" data-rule="required" data-source="service/index" class="form-control selectpage" name="row[service_id]" type="text" value="{$row.service_id|htmlentities}">
|
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
||||||
</div>
|
<div class="col-xs-12 col-sm-8">
|
||||||
</div>
|
<div class="input-group">
|
||||||
<div class="form-group">
|
<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images}">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Service_title')}:</label>
|
<div class="input-group-addon no-border no-padding">
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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>
|
||||||
<input id="c-service_title" data-rule="required" class="form-control" name="row[service_title]" type="text" value="{$row.service_title|htmlentities}">
|
<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>
|
</div>
|
||||||
</div>
|
<span class="msg-box n-right" for="c-images"></span>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||||
<div class="col-xs-12 col-sm-8">
|
</div>
|
||||||
<input id="c-detail" class="form-control" name="row[detail]" type="text" value="{$row.detail|htmlentities}">
|
</div>
|
||||||
</div>
|
<div class="form-group layer-footer">
|
||||||
</div>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="form-group">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
<button type="submit" class="btn btn-primary btn-embossed">更新订单</button>
|
||||||
<div class="col-xs-12 col-sm-8">
|
</div>
|
||||||
<input id="c-remark" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
|
</div>
|
||||||
</div>
|
</form>
|
||||||
</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">
|
|
||||||
<div class="input-group">
|
|
||||||
<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
|
|
||||||
<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>
|
</div>
|
||||||
<span class="msg-box n-right" for="c-images"></span>
|
|
||||||
</div>
|
</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">{:__('Collect')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
|
|
||||||
<select id="c-collect" class="form-control selectpicker" name="row[collect]">
|
<!-- 功能区(占1/3) -->
|
||||||
{foreach name="collectList" item="vo"}
|
<div class="function-area">
|
||||||
<option value="{$key}" {in name="key" value="$row.collect"}selected{/in}>{$vo}</option>
|
<h5 class="text-center">快速输入</h5>
|
||||||
{/foreach}
|
<div class="form-floating">
|
||||||
</select>
|
<textarea rows="8" style="width: 100%;resize: vertical" class="form-control" placeholder="复制内容,快速输入" id="floatingTextarea"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<style>
|
||||||
</div>
|
.full-height {
|
||||||
<div class="form-group">
|
height: 100vh;
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Collect_remark')}:</label>
|
width: 100vw;
|
||||||
<div class="col-xs-12 col-sm-8">
|
background: #fff;
|
||||||
<input id="c-collect_remark" class="form-control" name="row[collect_remark]" type="text" value="{$row.collect_remark|htmlentities}">
|
}
|
||||||
</div>
|
.overlay {
|
||||||
</div>
|
position: absolute;
|
||||||
<div class="form-group">
|
top: 0;
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Enter_admin_id')}:</label>
|
left: 0;
|
||||||
<div class="col-xs-12 col-sm-8">
|
right: 0;
|
||||||
<input id="c-enter_admin_id" data-rule="required" data-source="enter/admin/index" class="form-control selectpage" name="row[enter_admin_id]" type="text" value="{$row.enter_admin_id|htmlentities}">
|
bottom: 0;
|
||||||
</div>
|
background: rgba(0, 0, 0, 0.3); /* 背景黑色遮罩 */
|
||||||
</div>
|
z-index: -1;
|
||||||
<div class="form-group">
|
}
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Dispatch_admin_id')}:</label>
|
.card {
|
||||||
<div class="col-xs-12 col-sm-8">
|
border-radius: 10px;
|
||||||
<input id="c-dispatch_admin_id" data-rule="required" data-source="dispatch/admin/index" class="form-control selectpage" name="row[dispatch_admin_id]" type="text" value="{$row.dispatch_admin_id|htmlentities}">
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||||
</div>
|
}
|
||||||
</div>
|
.card-body {
|
||||||
<div class="form-group">
|
padding: 2rem;
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Dispatch_type')}:</label>
|
}
|
||||||
<div class="col-xs-12 col-sm-8">
|
.content {
|
||||||
|
display: flex;
|
||||||
<select id="c-dispatch_type" data-rule="required" class="form-control selectpicker" name="row[dispatch_type]">
|
height: 100vh;
|
||||||
{foreach name="dispatchTypeList" item="vo"}
|
}
|
||||||
<option value="{$key}" {in name="key" value="$row.dispatch_type"}selected{/in}>{$vo}</option>
|
.form-area {
|
||||||
{/foreach}
|
flex: 2;
|
||||||
</select>
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
</div>
|
align-items: flex-start;
|
||||||
</div>
|
}
|
||||||
<div class="form-group">
|
.function-area {
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
|
flex: 1;
|
||||||
<div class="col-xs-12 col-sm-8">
|
padding: 2rem;
|
||||||
<input id="c-total" data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
|
background-color: #f8f9fa;
|
||||||
</div>
|
/*border-left: 1px solid #ddd;*/
|
||||||
</div>
|
}
|
||||||
<div class="form-group">
|
.dropdown-menu {
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
position: absolute;
|
||||||
<div class="col-xs-12 col-sm-8">
|
z-index: 1000;
|
||||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
|
width: 100%;
|
||||||
</div>
|
max-height: 300px;
|
||||||
</div>
|
overflow-y: auto;
|
||||||
<div class="form-group">
|
background-color: #fff;
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Performance')}:</label>
|
border: 1px solid #ccc;
|
||||||
<div class="col-xs-12 col-sm-8">
|
border-radius: 4px;
|
||||||
<input id="c-performance" data-rule="required" class="form-control" step="0.01" name="row[performance]" type="number" value="{$row.performance|htmlentities}">
|
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
|
||||||
</div>
|
margin: 6px 12px;
|
||||||
</div>
|
}
|
||||||
<div class="form-group">
|
.dropdown-item {
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Sb_amount')}:</label>
|
padding: 8px;
|
||||||
<div class="col-xs-12 col-sm-8">
|
cursor: pointer;
|
||||||
<input id="c-sb_amount" data-rule="required" class="form-control" step="0.01" name="row[sb_amount]" type="number" value="{$row.sb_amount|htmlentities}">
|
}
|
||||||
</div>
|
.suggestion-item:hover {
|
||||||
</div>
|
background-color: #f0f0f0;
|
||||||
<div class="form-group">
|
}
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Real_amount')}:</label>
|
</style>
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-real_amount" data-rule="required" class="form-control" step="0.01" name="row[real_amount]" type="number" value="{$row.real_amount|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_reason_id')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-cancel_reason_id" data-rule="required" data-source="cancel/reason/index" class="form-control selectpage" name="row[cancel_reason_id]" type="text" value="{$row.cancel_reason_id|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_detail')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-cancel_detail" class="form-control" name="row[cancel_detail]" type="text" value="{$row.cancel_detail|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Abolish_reason_id')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-abolish_reason_id" data-rule="required" data-source="abolish/reason/index" class="form-control selectpage" name="row[abolish_reason_id]" type="text" value="{$row.abolish_reason_id|htmlentities}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Abolish_detail')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-abolish_detail" class="form-control" name="row[abolish_detail]" type="text" value="{$row.abolish_detail|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">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Payment_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-payment_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[payment_time]" type="text" value="{$row.payment_time}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Finishe_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-finishe_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[finishe_time]" type="text" value="{$row.finishe_time}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Dispatch_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-dispatch_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[dispatch_time]" type="text" value="{$row.dispatch_time}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Delete_time')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-delete_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[delete_time]" type="text" value="{$row.delete_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>
|
|
||||||
|
|
@ -1,16 +1,5 @@
|
||||||
<div class="panel panel-default panel-intro">
|
<div class="panel panel-default panel-intro">
|
||||||
|
|
||||||
<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}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="myTabContent" class="tab-content">
|
<div id="myTabContent" class="tab-content">
|
||||||
<div class="tab-pane fade active in" id="one">
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
|
@ -22,14 +11,14 @@
|
||||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
<div class="dropdown btn-group {:$auth->check('order/multi')?'':'hide'}">
|
<!-- <div class="dropdown btn-group {:$auth->check('order/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>
|
<!-- <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">
|
<!-- <ul class="dropdown-menu text-left" role="menu">-->
|
||||||
{foreach name="statusList" item="vo"}
|
<!-- {foreach name="statusList" item="vo"}-->
|
||||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
|
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
|
||||||
{/foreach}
|
<!-- {/foreach}-->
|
||||||
</ul>
|
<!-- </ul>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,5 @@ return [
|
||||||
'app\admin\command\Min',
|
'app\admin\command\Min',
|
||||||
'app\admin\command\Addon',
|
'app\admin\command\Addon',
|
||||||
'app\admin\command\Api',
|
'app\admin\command\Api',
|
||||||
|
'app\admin\command\AreaPinyinCommand',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"topthink/think-queue": "1.1.6",
|
"topthink/think-queue": "1.1.6",
|
||||||
"topthink/think-helper": "^1.0.7",
|
"topthink/think-helper": "^1.0.7",
|
||||||
"karsonzhang/fastadmin-addons": "~1.4.0",
|
"karsonzhang/fastadmin-addons": "~1.4.0",
|
||||||
"overtrue/pinyin": "^3.0",
|
"overtrue/pinyin": "^5.3",
|
||||||
"phpoffice/phpspreadsheet": "^1.29.1",
|
"phpoffice/phpspreadsheet": "^1.29.1",
|
||||||
"overtrue/wechat": "^4.6",
|
"overtrue/wechat": "^4.6",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
|
|
|
||||||
62
composer.lock
generated
62
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "da8316e5b18922be071cdeaf00c4d962",
|
"content-hash": "fe3829381cb87e4cad3751a2d797da6e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/pcre",
|
"name": "composer/pcre",
|
||||||
|
|
@ -790,31 +790,63 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "overtrue/pinyin",
|
"name": "overtrue/pinyin",
|
||||||
"version": "3.0.6",
|
"version": "5.3.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/overtrue/pinyin.git",
|
||||||
|
"reference": "bff15b27cf3e1cc416464b678576f4da9899692e"
|
||||||
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://mirrors.cloud.tencent.com/repository/composer/overtrue/pinyin/3.0.6/overtrue-pinyin-3.0.6.zip",
|
"url": "https://api.github.com/repos/overtrue/pinyin/zipball/bff15b27cf3e1cc416464b678576f4da9899692e",
|
||||||
"reference": "3b781d267197b74752daa32814d3a2cf5d140779",
|
"reference": "bff15b27cf3e1cc416464b678576f4da9899692e",
|
||||||
"shasum": ""
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3"
|
"php": ">=8.0.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.8"
|
"brainmaestro/composer-git-hooks": "^3.0",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.2",
|
||||||
|
"laravel/pint": "^1.10",
|
||||||
|
"nunomaduro/termwind": "^1.0|^2.0",
|
||||||
|
"phpunit/phpunit": "^10.0|^11.2"
|
||||||
},
|
},
|
||||||
|
"bin": [
|
||||||
|
"bin/pinyin"
|
||||||
|
],
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-push": [
|
||||||
|
"composer pint",
|
||||||
|
"composer test"
|
||||||
|
],
|
||||||
|
"pre-commit": [
|
||||||
|
"composer pint",
|
||||||
|
"composer test"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Overtrue\\Pinyin\\": "src/"
|
"Overtrue\\Pinyin\\": "src/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Carlos",
|
"name": "overtrue",
|
||||||
|
"email": "anzhengchao@gmail.com",
|
||||||
"homepage": "http://github.com/overtrue"
|
"homepage": "http://github.com/overtrue"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -827,9 +859,15 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/overtrue/pinyin/issues",
|
"issues": "https://github.com/overtrue/pinyin/issues",
|
||||||
"source": "https://github.com/overtrue/pinyin/tree/master"
|
"source": "https://github.com/overtrue/pinyin/tree/5.3.3"
|
||||||
},
|
},
|
||||||
"time": "2017-07-10T07:20:01+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/overtrue",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-08-01T08:19:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "overtrue/socialite",
|
"name": "overtrue/socialite",
|
||||||
|
|
@ -2592,6 +2630,6 @@
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-bcmath": "*"
|
"ext-bcmath": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": {},
|
||||||
"plugin-api-version": "2.3.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
57
public/assets/js/backend/item.js
Normal file
57
public/assets/js/backend/item.js
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||||
|
|
||||||
|
var Controller = {
|
||||||
|
index: function () {
|
||||||
|
// 初始化表格参数配置
|
||||||
|
Table.api.init({
|
||||||
|
extend: {
|
||||||
|
index_url: 'item/index' + location.search,
|
||||||
|
add_url: 'item/add',
|
||||||
|
edit_url: 'item/edit',
|
||||||
|
del_url: 'item/del',
|
||||||
|
multi_url: 'item/multi',
|
||||||
|
import_url: 'item/import',
|
||||||
|
table: 'item',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var table = $("#table");
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
table.bootstrapTable({
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
pk: 'id',
|
||||||
|
sortName: 'id',
|
||||||
|
columns: [
|
||||||
|
[
|
||||||
|
{checkbox: true},
|
||||||
|
{field: 'id', title: __('Id')},
|
||||||
|
{field: 'pid', title: __('Pid')},
|
||||||
|
{field: 'level', title: __('Level')},
|
||||||
|
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
||||||
|
{field: 'key_word', title: __('Key_word'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||||
|
{field: 'sort', title: __('Sort')},
|
||||||
|
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
|
||||||
|
{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;
|
||||||
|
});
|
||||||
|
|
@ -11,12 +11,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
del_url: 'order/del',
|
del_url: 'order/del',
|
||||||
multi_url: 'order/multi',
|
multi_url: 'order/multi',
|
||||||
import_url: 'order/import',
|
import_url: 'order/import',
|
||||||
|
push_url: 'order/status',
|
||||||
table: 'order',
|
table: 'order',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var table = $("#table");
|
var table = $("#table");
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
table.bootstrapTable({
|
table.bootstrapTable({
|
||||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
|
|
@ -31,41 +31,104 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||||
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
{field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||||
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||||
{field: 'status', title: __('Status'), searchList: {"10":__('Status 10'),"20":__('Status 20'),"30":__('Status 30'),"40":__('Status 40'),"50":__('Status 50'),"-10":__('Status -10'),"-20":__('Status -20'),"-30":__('Status -30')}, formatter: Table.api.formatter.status},
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: __('Status'),
|
||||||
|
searchList: {
|
||||||
|
"10": __('Status 10'),
|
||||||
|
"20": __('Status 20'),
|
||||||
|
"30": __('Status 30'),
|
||||||
|
"40": __('Status 40'),
|
||||||
|
"50": __('Status 50'),
|
||||||
|
"-10": __('Status -10'),
|
||||||
|
"-20": __('Status -20'),
|
||||||
|
"-30": __('Status -30')
|
||||||
|
},
|
||||||
|
formatter: Table.api.formatter.status
|
||||||
|
},
|
||||||
{field: 'area_id', title: __('Area_id')},
|
{field: 'area_id', title: __('Area_id')},
|
||||||
{field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
{
|
||||||
|
field: 'address',
|
||||||
|
title: __('Address'),
|
||||||
|
operate: 'LIKE',
|
||||||
|
table: table,
|
||||||
|
class: 'autocontent',
|
||||||
|
formatter: Table.api.formatter.content
|
||||||
|
},
|
||||||
{field: 'work_tel_id', title: __('Work_tel_id')},
|
{field: 'work_tel_id', title: __('Work_tel_id')},
|
||||||
{field: 'worker_id', title: __('Worker_id')},
|
{field: 'worker_id', title: __('Worker_id')},
|
||||||
{field: 'source', title: __('Source')},
|
{field: 'source', title: __('Source')},
|
||||||
{field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
{field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
||||||
{field: 'item_id', title: __('Item_id')},
|
{field: 'service_title', title: __('Service_title'), operate: 'LIKE'},
|
||||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
{
|
||||||
{field: 'detail', title: __('Detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
field: 'detail',
|
||||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
title: __('Detail'),
|
||||||
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
operate: 'LIKE',
|
||||||
{field: 'collect', title: __('Collect'), searchList: {"0":__('Collect 0'),"1":__('Collect 1')}, formatter: Table.api.formatter.normal},
|
table: table,
|
||||||
{field: 'collect_remark', title: __('Collect_remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
class: 'autocontent',
|
||||||
{field: 'enter_admin_id', title: __('Enter_admin_id')},
|
formatter: Table.api.formatter.content
|
||||||
{field: 'dispatch_admin_id', title: __('Dispatch_admin_id')},
|
},
|
||||||
{field: 'dispatch_type', title: __('Dispatch_type'), searchList: {"10":__('Dispatch_type 10'),"11":__('Dispatch_type 11'),"20":__('Dispatch_type 20')}, formatter: Table.api.formatter.normal},
|
{
|
||||||
{field: 'total', title: __('Total'), operate:'BETWEEN'},
|
field: 'remark',
|
||||||
{field: 'cost', title: __('Cost'), operate:'BETWEEN'},
|
title: __('Remark'),
|
||||||
{field: 'performance', title: __('Performance'), operate:'BETWEEN'},
|
operate: 'LIKE',
|
||||||
{field: 'sb_amount', title: __('Sb_amount'), operate:'BETWEEN'},
|
table: table,
|
||||||
{field: 'real_amount', title: __('Real_amount'), operate:'BETWEEN'},
|
class: 'autocontent',
|
||||||
{field: 'cancel_reason_id', title: __('Cancel_reason_id')},
|
formatter: Table.api.formatter.content
|
||||||
{field: 'cancel_detail', title: __('Cancel_detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
},
|
||||||
{field: 'abolish_reason_id', title: __('Abolish_reason_id')},
|
{
|
||||||
{field: 'abolish_detail', title: __('Abolish_detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
field: 'images',
|
||||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
title: __('Images'),
|
||||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
operate: false,
|
||||||
{field: 'payment_time', title: __('Payment_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
events: Table.api.events.image,
|
||||||
{field: 'finishe_time', title: __('Finishe_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
formatter: Table.api.formatter.images
|
||||||
{field: 'dispatch_time', title: __('Dispatch_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
},
|
||||||
{field: 'delete_time', title: __('Delete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
{
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
field: 'create_time',
|
||||||
|
title: __('Create_time'),
|
||||||
buttons:[
|
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,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
icon: 'fa fa-pencil',
|
||||||
|
title: __('Edit'),
|
||||||
|
extend: 'data-toggle="tooltip" data-container="body"',
|
||||||
|
classname: 'btn btn-xs btn-success btn-editone'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'del',
|
||||||
|
icon: 'fa fa-trash',
|
||||||
|
title: __('Del'),
|
||||||
|
extend: 'data-toggle="tooltip" data-container="body"',
|
||||||
|
classname: 'btn btn-xs btn-danger btn-delone'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'push',
|
||||||
|
icon: 'fa fa-copy',
|
||||||
|
title: '复制',
|
||||||
|
url: 'order/copy',
|
||||||
|
extend: 'data-toggle="tooltip" data-container="body"',
|
||||||
|
classname: 'btn btn-xs btn-info btn-dialog',
|
||||||
|
callback: function ($data){
|
||||||
|
console.log($data);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"income",
|
name:"income",
|
||||||
text:"新增收款",
|
text:"新增收款",
|
||||||
|
|
@ -81,10 +144,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
},
|
},
|
||||||
refresh:true,
|
refresh:true,
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
// 为表格绑定事件
|
// 为表格绑定事件
|
||||||
|
|
@ -96,15 +159,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
edit: function () {
|
edit: function () {
|
||||||
Controller.api.bindevent();
|
Controller.api.bindevent();
|
||||||
},
|
},
|
||||||
|
copy: function () {
|
||||||
|
Controller.api.bindevent();
|
||||||
|
},
|
||||||
api: {
|
api: {
|
||||||
bindevent: function () {
|
bindevent: function () {
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseAndFill() {
|
function parseAndFill() {
|
||||||
// 获取左侧输入框的内容
|
// 获取左侧输入框的内容
|
||||||
}
|
}
|
||||||
|
|
||||||
let $input = $("#c-area_id");
|
let $input = $("#c-area_id");
|
||||||
let $dropdown = $("#address-list");
|
let $dropdown = $("#address-list");
|
||||||
let $hiddenField = $("#selected-area-code");
|
let $hiddenField = $("#selected-area-code");
|
||||||
|
|
@ -124,7 +192,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/admin/area/search", // 你的 API 地址
|
url: "/admin/area/search", // 你的 API 地址
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: { keyword: keyword },
|
data: {keyword: keyword},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
renderDropdown(data.data);
|
renderDropdown(data.data);
|
||||||
|
|
@ -133,17 +201,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
console.error("请求失败");
|
console.error("请求失败");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 200); // 500 毫秒防抖
|
}, 400); // 500 毫秒防抖
|
||||||
});
|
});
|
||||||
|
|
||||||
// 渲染城市下拉选项
|
// 渲染城市下拉选项
|
||||||
function renderDropdown(data) {
|
function renderDropdown(data) {
|
||||||
$dropdown.empty(); // 清空列表
|
$dropdown.empty(); // 清空列表
|
||||||
if (data.length === 0){
|
if (data.length === 0) {
|
||||||
let $option = $("<li class='dropdown-item'></li>")
|
let $option = $("<li class='dropdown-item'></li>")
|
||||||
.text('未搜索到结果')
|
.text('未搜索到结果')
|
||||||
.attr("data-value", 0);
|
.attr("data-value", 0);
|
||||||
$dropdown.append($option);
|
$dropdown.append($option);
|
||||||
}else{
|
} else {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
let $option = $("<li class='dropdown-item'></li>")
|
let $option = $("<li class='dropdown-item'></li>")
|
||||||
.text(item.merge_name)
|
.text(item.merge_name)
|
||||||
|
|
@ -163,10 +232,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let $inputService = $("#c-service_title");
|
let $inputService = $("#c-service_title");
|
||||||
let $dropdownService = $("#service-list");
|
let $dropdownService = $("#service-list");
|
||||||
let $hiddenFieldService = $("#c-service_id");
|
let $hiddenFieldService = $("#selected-service_id");
|
||||||
let timerService = null; // 定义定时器
|
let timerService = null; // 定义定时器
|
||||||
|
|
||||||
$inputService.on("input", function () {
|
$inputService.on("input", function () {
|
||||||
|
|
@ -181,9 +249,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
// 延迟 500 毫秒后执行 AJAX 查询(防止过快触发)
|
// 延迟 500 毫秒后执行 AJAX 查询(防止过快触发)
|
||||||
timerService = setTimeout(() => {
|
timerService = setTimeout(() => {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/admin/area/search", // 你的 API 地址
|
url: "/admin/item/search", // 你的 API 地址
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: { keyword: keyword },
|
data: {keyword: keyword},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
renderDropdownService(data.data);
|
renderDropdownService(data.data);
|
||||||
|
|
@ -192,24 +260,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
console.error("请求失败");
|
console.error("请求失败");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 200); // 500 毫秒防抖
|
}, 400); // 500 毫秒防抖
|
||||||
});
|
});
|
||||||
|
|
||||||
// 渲染城市下拉选项
|
// 渲染城市下拉选项
|
||||||
function renderDropdownService(data) {
|
function renderDropdownService(data) {
|
||||||
$dropdownService.empty(); // 清空列表
|
$dropdownService.empty(); // 清空列表
|
||||||
if (data.length === 0){
|
if (data.length === 0) {
|
||||||
let $option = $("<li class='dropdown-item'></li>")
|
let $option = $("<li class='dropdown-item'></li>")
|
||||||
.text('未搜索到结果')
|
.text('未搜索到结果')
|
||||||
.attr("data-value", 0);
|
.attr("data-value", 0);
|
||||||
$dropdownService.append($option);
|
$dropdownService.append($option);
|
||||||
}else{
|
} else {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
let $option = $("<li class='dropdown-item'></li>")
|
let $option = $("<li class='dropdown-item'></li>")
|
||||||
.text(item.merge_name)
|
.text(item.title)
|
||||||
.attr("data-value", item.area_code) // 绑定 area_code
|
.attr("data-value", item.id) // 绑定 area_code
|
||||||
.on("click", function () {
|
.on("click", function () {
|
||||||
$inputService.val(item.merge_name); // 选中后填充输入框
|
$inputService.val(item.title); // 选中后填充输入框
|
||||||
$hiddenFieldService.val($(this).attr("data-value")); // 存储 area_code
|
$hiddenFieldService.val($(this).attr("data-value")); // 存储 area_code
|
||||||
$dropdownService.hide();
|
$dropdownService.hide();
|
||||||
});
|
});
|
||||||
|
|
@ -222,8 +290,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 点击外部隐藏下拉框
|
// 点击外部隐藏下拉框
|
||||||
$(document).on("click", function (e) {
|
$(document).on("click", function (e) {
|
||||||
if (!$(e.target).closest("#c-address, #address-list").length) {
|
if (!$(e.target).closest("#c-address, #address-list").length) {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
<h1>12312321</h1>
|
<h1>123123ttttt21</h1>
|
||||||
Loading…
Reference in New Issue
Block a user