diff --git a/app/admin/controller/Ceshi.php b/app/admin/controller/Ceshi.php new file mode 100644 index 0000000..2635957 --- /dev/null +++ b/app/admin/controller/Ceshi.php @@ -0,0 +1,52 @@ + + * Class Ceshi + * @package app\admin\controller + */ +class Ceshi extends AdminController +{ + /** + * Ceshi模型对象 + * @var \app\admin\model\Ceshi + */ + + public function __construct() + { + parent::__construct(); + $this->model = new CeshiModel; + } + + /** + * 默认生成的方法为index/add/edit/del/status 五个方法 + * 当创建CURD的时候,DIY的函数体和模板为空,请自行编写代码 + */ + + /** + * zdy 函数 + */ + public function zdy() + { + return $this->view(); + } + + /** + * xiaoMing 函数 + */ + public function xiaoMing() + { + return $this->view(); + } + + + +} diff --git a/app/admin/controller/PdmPartitem.php b/app/admin/controller/PdmPartitem.php new file mode 100644 index 0000000..53ca232 --- /dev/null +++ b/app/admin/controller/PdmPartitem.php @@ -0,0 +1,36 @@ + + * Class PdmPartitem + * @package app\admin\controller + */ +class PdmPartitem extends AdminController +{ + /** + * PdmPartitem模型对象 + * @var \app\admin\model\PdmPartitem + */ + + public function __construct() + { + parent::__construct(); + $this->model = new PdmPartitemModel; + } + + /** + * 默认生成的方法为index/add/edit/del/status 五个方法 + * 当创建CURD的时候,DIY的函数体和模板为空,请自行编写代码 + */ + + + +} diff --git a/app/admin/controller/PdmPurchasecode.php b/app/admin/controller/PdmPurchasecode.php new file mode 100644 index 0000000..9c5198a --- /dev/null +++ b/app/admin/controller/PdmPurchasecode.php @@ -0,0 +1,36 @@ + + * Class PdmPurchasecode + * @package app\admin\controller + */ +class PdmPurchasecode extends AdminController +{ + /** + * PdmPurchasecode模型对象 + * @var \app\common\model\PdmPurchasecode + */ + + public function __construct() + { + parent::__construct(); + $this->model = new PdmPurchasecodeModel; + } + + /** + * 默认生成的方法为index/add/edit/del/status 五个方法 + * 当创建CURD的时候,DIY的函数体和模板为空,请自行编写代码 + */ + + + +} diff --git a/app/admin/model/Ceshi.php b/app/admin/model/Ceshi.php new file mode 100644 index 0000000..fb60fc1 --- /dev/null +++ b/app/admin/model/Ceshi.php @@ -0,0 +1,95 @@ + + * 测试代码 + * Class Ceshi + * @package app\admin\model + */ +class Ceshi extends Model +{ + + use SoftDelete; + + // 定义时间戳字段名 + protected $createTime = 'create_time'; + protected $updateTime = 'update_time'; + protected $deleteTime = 'delete_time'; + + + /** + * 定义 sa_user 关联模型 + * @localKey id + * @bind nickname + */ + public function user() + { + return $this->hasOne(\app\common\model\system\User::Class,'group_id','id')->bind(['nickname']); + } + + public function setHobbyAttr($value) + { + if (!empty($value) && is_array($value)) { + $value = implode(',',$value); + } + + return $value; + } + + public function getHobbyAttr($value) + { + if (!empty($value) && is_string($value)) { + $value = explode(',',$value); + } + + return $value; + } + + public function setAlbumAttr($value) + { + if (!empty($value)) { + $value = serialize($value); + } + + return $value; + } + + public function getAlbumAttr($value) + { + if (!empty($value)) { + $value = unserialize($value); + } + + return $value; + } + + public function setJsonAttr($value) + { + if (!empty($value) && is_array($value)) { + $arr = []; + foreach ($value['key'] as $key => $elem) { + $arr[$elem] = $value['value'][$key]; + } + + $value = json_encode($arr,JSON_UNESCAPED_UNICODE); + } + + return $value ?: json_encode([]); + } + + public function getJsonAttr($value) + { + if (!empty($value) && is_string($value)) { + $value = json_decode($value, true); + } + + return $value; + } + +} \ No newline at end of file diff --git a/app/admin/model/PdmPartitem.php b/app/admin/model/PdmPartitem.php new file mode 100644 index 0000000..23df366 --- /dev/null +++ b/app/admin/model/PdmPartitem.php @@ -0,0 +1,59 @@ + + * 部件 + * Class PdmPartitem + * @package app\admin\model + */ +class PdmPartitem extends Model +{ + + use SoftDelete; + + // 定义时间戳字段名 + protected $createTime = 'create_time'; + protected $updateTime = 'update_time'; + protected $deleteTime = 'delete_time'; + + + /** + * 定义 sa_user 关联模型 + * @localKey createrid + * @bind nickname,name + */ + public function user() + { + return $this->hasOne(\app\common\model\system\User::Class,'id','createrid')->bind(['nickname','name']); + } + + public function setPartattributeAttr($value) + { + if (!empty($value) && is_array($value)) { + $arr = []; + foreach ($value['key'] as $key => $elem) { + $arr[$elem] = $value['value'][$key]; + } + + $value = json_encode($arr,JSON_UNESCAPED_UNICODE); + } + + return $value ?: json_encode([]); + } + + public function getPartattributeAttr($value) + { + if (!empty($value) && is_string($value)) { + $value = json_decode($value, true); + } + + return $value; + } + +} \ No newline at end of file diff --git a/app/admin/model/PdmParttype.php b/app/admin/model/PdmParttype.php index 96df81c..59dcedd 100644 --- a/app/admin/model/PdmParttype.php +++ b/app/admin/model/PdmParttype.php @@ -39,7 +39,28 @@ class PdmParttype extends Model return \app\common\model\system\Admin::select()->toArray(); } + public function setPartattributeAttr($value) + { + if (!empty($value) && is_array($value)) { + $arr = []; + foreach ($value['key'] as $key => $elem) { + $arr[$elem] = $value['value'][$key]; + } + $value = json_encode($arr,JSON_UNESCAPED_UNICODE); + } + + return $value ?: json_encode([]); + } + + public function getPartattributeAttr($value) + { + if (!empty($value) && is_string($value)) { + $value = json_decode($value, true); + } + + return $value; + } diff --git a/app/admin/validate/Ceshi.php b/app/admin/validate/Ceshi.php new file mode 100644 index 0000000..035de33 --- /dev/null +++ b/app/admin/validate/Ceshi.php @@ -0,0 +1,36 @@ + + * Ceshi 验证器 + * Class Ceshi + * @package app\admin\validate + */ +class Ceshi extends Validate +{ + /** + * 验证规则 + */ + protected $rule = [ + ]; + + + /** + * 提示消息 + */ + protected $message = [ + ]; + + + /** + * 验证场景 + */ + protected $scene = [ + 'add' => [], + 'edit' => [], + ]; + +} diff --git a/app/admin/validate/PdmPartitem.php b/app/admin/validate/PdmPartitem.php new file mode 100644 index 0000000..c33869f --- /dev/null +++ b/app/admin/validate/PdmPartitem.php @@ -0,0 +1,36 @@ + + * PdmPartitem 验证器 + * Class PdmPartitem + * @package app\admin\validate + */ +class PdmPartitem extends Validate +{ + /** + * 验证规则 + */ + protected $rule = [ + ]; + + + /** + * 提示消息 + */ + protected $message = [ + ]; + + + /** + * 验证场景 + */ + protected $scene = [ + 'add' => [], + 'edit' => [], + ]; + +} diff --git a/app/admin/view/ceshi/add.html b/app/admin/view/ceshi/add.html new file mode 100644 index 0000000..739339d --- /dev/null +++ b/app/admin/view/ceshi/add.html @@ -0,0 +1,155 @@ + + + + +
+
+ +
+ + + + + +
+ +
+
+ +
+ +
+$Sex_LIST = [0=>['title'=>'男','value'=>'1','checked'=>true,],1=>['title'=>'女','value'=>'0','checked'=>false,],]; + + + checked + + checked + + > +
+
+ +
+ +
+ +
+ +
+ +

点击上传,或将文件拖拽到此处

+
+
上传成功后渲染 + 删除 +
+
+ +
+ +

点击上传,或将文件拖拽到此处

+
+
上传成功后渲染 + 删除 +
+
+
+
+
+ +
+ +
+
+ + + + +
+ + + + 删除 +
+
+
+
+
+ +

点击上传,或将文件拖拽到此处

+
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+$Hobby_LIST = [0=>['title'=>'写作','value'=>'write','checked'=>true,],1=>['title'=>'阅读','value'=>'read','checked'=>true,],2=>['title'=>'游戏','value'=>'game','checked'=>false,],]; + + + checked + + checked + + > +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + +
名称变量值操作
+
+
+ +
+ +
+
+ + + +
+ + \ No newline at end of file diff --git a/app/admin/view/ceshi/index.html b/app/admin/view/ceshi/index.html new file mode 100644 index 0000000..36df26c --- /dev/null +++ b/app/admin/view/ceshi/index.html @@ -0,0 +1,269 @@ + + +
+
+ +
+
+ + +
+
+ +
+ +
+
{:__('姓名')}
+
+ +
+
+
+ + + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + diff --git a/app/admin/view/ceshi/xiao_ming.html b/app/admin/view/ceshi/xiao_ming.html new file mode 100644 index 0000000..841c903 --- /dev/null +++ b/app/admin/view/ceshi/xiao_ming.html @@ -0,0 +1,9 @@ + + + + +
+ 示例模板,可自行开发 +
+ + \ No newline at end of file diff --git a/app/admin/view/ceshi/zdy.html b/app/admin/view/ceshi/zdy.html new file mode 100644 index 0000000..841c903 --- /dev/null +++ b/app/admin/view/ceshi/zdy.html @@ -0,0 +1,9 @@ + + + + +
+ 示例模板,可自行开发 +
+ + \ No newline at end of file diff --git a/app/admin/view/pdm_partitem/add.html b/app/admin/view/pdm_partitem/add.html new file mode 100644 index 0000000..57f4fae --- /dev/null +++ b/app/admin/view/pdm_partitem/add.html @@ -0,0 +1,67 @@ + + + + +
+
+ +
+ + + + + +
+ +
+
+ +
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
名称变量值操作
+ +
+
+ +
+
便签信息
+
+ +
+ +
+
+ + + +
+ + \ No newline at end of file diff --git a/app/admin/view/pdm_partitem/index.html b/app/admin/view/pdm_partitem/index.html new file mode 100644 index 0000000..8c644e8 --- /dev/null +++ b/app/admin/view/pdm_partitem/index.html @@ -0,0 +1,172 @@ + + +
+
+ +
+
+ + +
+
+ +
+ +
+
{:__('PartNumber')}
+
+ +
+
+
+ + + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + diff --git a/app/admin/view/pdm_parttype/add.html b/app/admin/view/pdm_parttype/add.html index d0167ed..7ea009f 100644 --- a/app/admin/view/pdm_parttype/add.html +++ b/app/admin/view/pdm_parttype/add.html @@ -32,6 +32,33 @@
+
+ +
+ + + + + + + + + + + + + + + + + + + +
名称变量值操作
+ +
+
+
diff --git a/app/admin/view/pdm_purchasecode/add.html b/app/admin/view/pdm_purchasecode/add.html new file mode 100644 index 0000000..8470191 --- /dev/null +++ b/app/admin/view/pdm_purchasecode/add.html @@ -0,0 +1,62 @@ + + + + +
+
+ +
+ + + + + +
+ +
+
+
+ +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
名称变量值操作
+ +
+
+ +
+ +
+
+ + + +
+ + \ No newline at end of file diff --git a/app/admin/view/pdm_purchasecode/index.html b/app/admin/view/pdm_purchasecode/index.html new file mode 100644 index 0000000..ec80bd0 --- /dev/null +++ b/app/admin/view/pdm_purchasecode/index.html @@ -0,0 +1,161 @@ + + +
+
+ +
+
+ + +
+
+ +
+ +
+
{:__('物料编码')}
+
+ +
+
+
+ + + + + +
+
+
+
+ +
+
+
+ + + + + + + + + + + + + diff --git a/app/common/model/PdmPurchasecode.php b/app/common/model/PdmPurchasecode.php new file mode 100644 index 0000000..93b987d --- /dev/null +++ b/app/common/model/PdmPurchasecode.php @@ -0,0 +1,59 @@ + + * 采购编码 + * Class PdmPurchasecode + * @package app\common\model + */ +class PdmPurchasecode extends Model +{ + + use SoftDelete; + + // 定义时间戳字段名 + protected $createTime = 'create_time'; + protected $updateTime = 'update_time'; + protected $deleteTime = 'delete_time'; + + + /** + * 定义 sa_user 关联模型 + * @localKey user_id + * @bind nickname,name + */ + public function user() + { + return $this->hasOne(\app\common\model\system\User::Class,'id','user_id')->bind(['nickname','name']); + } + + public function setAttributeAttr($value) + { + if (!empty($value) && is_array($value)) { + $arr = []; + foreach ($value['key'] as $key => $elem) { + $arr[$elem] = $value['value'][$key]; + } + + $value = json_encode($arr,JSON_UNESCAPED_UNICODE); + } + + return $value ?: json_encode([]); + } + + public function getAttributeAttr($value) + { + if (!empty($value) && is_string($value)) { + $value = json_decode($value, true); + } + + return $value; + } + +} \ No newline at end of file diff --git a/app/common/validate/PdmPurchasecode.php b/app/common/validate/PdmPurchasecode.php new file mode 100644 index 0000000..7f29fad --- /dev/null +++ b/app/common/validate/PdmPurchasecode.php @@ -0,0 +1,36 @@ + + * PdmPurchasecode 验证器 + * Class PdmPurchasecode + * @package app\common\validate + */ +class PdmPurchasecode extends Validate +{ + /** + * 验证规则 + */ + protected $rule = [ + ]; + + + /** + * 提示消息 + */ + protected $message = [ + ]; + + + /** + * 验证场景 + */ + protected $scene = [ + 'add' => [], + 'edit' => [], + ]; + +}