afa 5 сар өмнө
parent
commit
c7df9a6dba

+ 29 - 59
app/admin/controller/Dashboard.php

@@ -14,8 +14,8 @@ namespace app\admin\controller;
 use app\common\model\Admin;
 use app\common\model\delivery\Text;
 use app\common\model\User;
-use app\common\model\Category;
-use app\common\model\Attachment;
+use app\common\model\StockDetail;
+use app\common\model\StockConfig;
 use app\common\library\Date;
 use app\common\controller\Backend;
 use think\annotation\route\Route;
@@ -34,7 +34,7 @@ class Dashboard extends Backend
      * 查看
      */
     #[Route('GET','dashboard/index')]
-    public function index()
+    public function index(StockConfig $stockConfig, StockDetail $stockDetail)
     {
         if($this->request->isAjax()){
             //模拟数据面板
@@ -44,63 +44,33 @@ class Dashboard extends Backend
                 rand(100,1000),
                 rand(100,1000),
             ];
-            //模拟折线图
-            $line=[
-                'date'=>[],
-                'data'=>[]
-            ];
-            $time=time();
-            for($i=0;$i<7;$i++){
-                $line['date'][]=date('Y-m-d',$time-(7-$i)*24*3600);
-                $line['data'][]=rand(100,1000);
-            }
-            //模拟表格
-            $names=['张三','李四','老王','老成','黑娃'];
-            $table=[];
-            $total=rand(100,999);
-            foreach ($names as $key=>$name){
-                $table[]=[
-                    'sort'=>$key+1,'name'=>$name,'total'=>$total,'money'=>$total*rand(10,20)
-                ];
-                $total-=rand(10,99);
-            }
-            //模拟柱状图
-            $bar=[
-                'date'=>['周一','周二','周三','周四','周五','周六','周日'],
-                'name'=>['张三','李四','老王'],
-                'data'=>[
-                    [],
-                    [],
-                    []
-                ]
-            ];
-            for($i=0;$i<3;$i++){
-                foreach ($bar['date'] as $name){
-                    $bar['data'][$i][]=rand(100,999);
-                }
+            $variety = [];
+            $box = [];
+            $material = [];
+            $list = $stockConfig->where('status', $stockConfig::StatusNormal)->field('id,type_id,title')->orderRaw("field('variety_name','packing_box','material')")->select();
+            foreach ($list as $item) {
+                  switch ($item['type_id']) {
+                        case $stockConfig::VarietyName:
+                              $variety[] = [
+                                    'name' => $item->title,
+                                    'num'  => $stockDetail->where('key', $item['id'])->value('num')
+                              ];
+                              break;
+                        case $stockConfig::PackingBox:
+                             $box[] = [
+                              'name' => $item->title,
+                              'num'  => $stockDetail->where('key', $item['id'])->value('num')
+                             ];
+                             break;
+                        case $stockConfig::Material:
+                             $material[] = [
+                              'name' => $item->title,
+                              'num'  => $stockDetail->where('key', $item['id'])->value('num')
+                             ];
+                             break;
+                  }
             }
-            //模拟饼状图
-            $pie=[
-                ['name'=>'张三','value'=>rand(100,999)],
-                ['name'=>'李四','value'=>rand(100,999)],
-                ['name'=>'老王','value'=>rand(100,999)],
-                ['name'=>'黑娃','value'=>rand(100,999)],
-            ];
-            //模拟订单
-            $count=rand(100,999);
-            $today=rand(1000,9999);
-            $yestoday=rand(1000,9999);
-            $order=[
-                'count'=>$count,
-                'total'=>1000,
-                'today'=>$today.'.'.rand(10,99),
-                'yestoday'=>$yestoday.'.'.rand(10,99),
-                'percentage'=>[
-                    round($count/10),
-                    $yestoday>$today?round($today/$yestoday*100):100,
-                ]
-            ];
-            $this->success('',compact('panel','line','table','bar','pie','order'));
+            $this->success('',compact('panel','variety','box','material'));
         }
         return $this->fetch();
     }

+ 90 - 268
app/admin/view/dashboard/index.html

@@ -1,7 +1,7 @@
 <template>
-    <div style="overflow: hidden;max-width: 100%;">
+    <div style="max-width: 100%;">
         <el-row :gutter="10">
-            <el-col :md="18" :xs="24" :sm="24">
+            <el-col :md="24" :xs="24" :sm="24">
                 <div class="card-container">
                     <el-card shadow="always" body-style="padding-bottom:10px;">
                         <el-row>
@@ -44,131 +44,82 @@
                         </el-row>
                     </el-card>
                 </div>
-                <div class="card-container">
-                    <el-card shadow="always">
-                        <template #header>
-                            <div class="header">
-                                <div class="title"><i class="fa fa-caret-right"></i>折线图</div>
-                            </div>
-                        </template>
-                        <div class="chart1" id="chart1"></div>
-                    </el-card>
-                </div>
-                <div class="card-container">
-                    <el-card shadow="always">
-                        <template #header>
-                            <div class="header">
-                                <div class="title"><i class="fa fa-caret-right"></i>表格</div>
-                                <div class="right-filter">
-                                    <el-button-group>
-                                        <el-button @click="changeForm('all')" size="small" :type="(filterForm.table=='all')?'primary':''">全部</el-button>
-                                        <el-button @click="changeForm('today')" size="small" :type="(filterForm.table=='today')?'primary':''">今日</el-button>
-                                        <el-button @click="changeForm('week')" size="small" :type="(filterForm.table=='week')?'primary':''">本周</el-button>
-                                        <el-button @click="changeForm('month')" size="small" :type="(filterForm.table=='month')?'primary':''">当月</el-button>
-                                    </el-button-group>
-                                </div>
-                            </div>
-                        </template>
-                        <el-table :data="table">
-                            <el-table-column label="排名" prop="sort"></el-table-column>
-                            <el-table-column label="会员" prop="name"></el-table-column>
-                            <el-table-column label="下单">
-                                <template #default="{row}">{{row.total}}笔</template>
-                            </el-table-column>
-                            <el-table-column label="金额">
-                                <template #default="{row}">¥{{row.money}}</template>
-                            </el-table-column>
-                        </el-table>
-                    </el-card>
-                </div>
-                <div class="card-container">
-                    <el-card shadow="always">
-                        <template #header>
-                            <div class="header">
-                                <div class="title"><i class="fa fa-caret-right"></i>柱状图</div>
-                                <div class="right-filter">
-                                    <el-form :model="filterForm">
-                                        <el-form-item label="统计时间" style="margin-bottom: 0;">
-                                            <el-select v-model="filterForm.select" style="margin-right: 10px;width: 150px;" @change="changeForm(0)">
-                                                <el-option label="第一项" value="one"></el-option>
-                                                <el-option label="第二项" value="two"></el-option>
-                                                <el-option label="第三项" value="three"></el-option>
-                                            </el-select>
-                                            <el-date-picker @change="changeForm(0)" v-model="filterForm.datepicker" style="width: 250px;" type="daterange" range-separator="到"></el-date-picker>
-                                        </el-form-item>
-                                    </el-form>
-                                </div>
-                            </div>
-                        </template>
-                        <div class="chart3" id="chart3"></div>
-                    </el-card>
-                </div>
-            </el-col>
-            <el-col :md="6" :xs="24" :sm="24">
-                <div class="card-container left">
-                    <el-card shadow="always">
-                        <div style="font-weight: bold;margin-bottom: 10px;">😀欢迎您,{:$auth->nickname}!</div>
-                        <el-alert type="success" :closable="false">行到水穷处,坐看云起时。在线乞讨公司,贵阳云起信息科技,跪求打赏😭</el-alert>
-                        <div class="pay">
-                            <img src="{:request()->domain()}/assets/img/pay.png">
-                        </div>
-                    </el-card>
-                </div>
-                <div class="card-container left">
-                    <el-card shadow="always">
-                        <template #header>
-                            <div class="header">
-                                <div class="title"><i class="fa fa-caret-right"></i>进度框样式</div>
-                            </div>
-                        </template>
-                        <el-row>
-                            <el-col :span="24">
-                                <div class="style-2">
-                                    <div class="box">
-                                        <el-progress type="circle" :percentage="order.percentage[0]"></el-progress>
-                                        <div class="box-title">销售目标</div>
-                                        <div class="box-number">{{order.count}}单/{{order.total}}单</div>
+              
+              
+                           <div class="card-container left">
+                            <el-card shadow="always">
+                                <template #header>
+                                    <div class="header">
+                                        <div class="title"><i class="fa fa-caret-right"></i>红薯品种</div>
                                     </div>
-                                </div>
-                            </el-col>
-                            <el-col :span="24">
-                                <div class="style-3">
-                                    <div class="box">
-                                        <div class="box-title">今日销售额</div>
-                                        <div class="box-content">
-                                            <div class="box-content-left">
-                                                <div class="box-number-top">¥{{order.today}}</div>
-                                                <div class="box-number-bottom">昨日销售额:¥{{order.yestoday}}</div>
+                                </template>
+                                <el-row>
+                                    <el-col :span="24">
+                                        <div class="style-3">
+                                            <div class="box">
+                                    
+                                                <div class="box-content">
+                                                    <div class="box-content-right" v-for="item in list">
+                                                        <div class="box-number-top">{{item.name}}</div>
+                                                        <div class="box-number-bottom">{{item.num}}</div>
+                                                    </div>
+                                                </div>
+                                
                                             </div>
-                                            <div class="icon bkcolor3" v-if="order.percentage[1]<50">
-                                                <i class="fa fa-arrow-down"></i>
-                                            </div>
-                                            <div class="icon bkcolor2" v-if="order.percentage[1]>=50 && order.percentage[1]<100">
-                                                <i class="fa fa-arrow-down"></i>
-                                            </div>
-                                            <div class="icon bkcolor4" v-if="order.percentage[1]>=100">
-                                                <i class="fa fa-arrow-up"></i>
+                                        </div>
+                                    </el-col>
+                                </el-row>
+                            </el-card>
+                        </div>
+                           <div class="card-container left">
+                            <el-card shadow="always">
+                                <template #header>
+                                    <div class="header">
+                                        <div class="title"><i class="fa fa-caret-right"></i>包装箱</div>
+                                    </div>
+                                </template>
+                                <el-row>
+                                    <el-col :span="24">
+                                        <div class="style-3">
+                                            <div class="box">
+                                                <div class="box-content">
+                                                    <div class="box-content-right" v-for="item in box">
+                                                        <div class="box-number-top">{{item.name}}</div>
+                                                        <div class="box-number-bottom">{{item.num}}</div>
+                                                    </div>
+                                                 
+                                                </div>
                                             </div>
                                         </div>
-                                        <el-progress v-if="order.percentage[1]<50" :percentage="order.percentage[1]" color="#F56C6C"></el-progress>
-                                        <el-progress v-if="order.percentage[1]>=50 && order.percentage[1]<100" :percentage="order.percentage[1]" color="#E6A23C"></el-progress>
-                                        <el-progress v-if="order.percentage[1]>=100" :percentage="order.percentage[1]" color="#45991b"></el-progress>
+                                    </el-col>
+                                </el-row>
+                            </el-card>
+                        </div>
+          
+                        <div class="card-container left">
+                            <el-card shadow="always">
+                                <template #header>
+                                    <div class="header">
+                                        <div class="title"><i class="fa fa-caret-right"></i>耗材</div>
                                     </div>
-                                </div>
-                            </el-col>
-                        </el-row>
-                    </el-card>
-                </div>
-                <div class="card-container left">
-                    <el-card shadow="always">
-                        <template #header>
-                            <div class="header">
-                                <div class="title"><i class="fa fa-caret-right"></i>饼状图</div>
-                            </div>
-                        </template>
-                        <div class="chart2" id="chart2"></div>
-                    </el-card>
-                </div>
+                                </template>
+                                <el-row>
+                                    <el-col :span="24">
+                                        <div class="style-3">
+                                            <div class="box">
+                                                <div class="box-content">
+                                                    <div class="box-content-right" v-for="item in material">
+                                                        <div class="box-number-top">{{item.name}}</div>
+                                                        <div class="box-number-bottom">{{item.num}}</div>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </el-col>
+                                </el-row>
+                            </el-card>
+                        </div>
+              
             </el-col>
         </el-row>
     </div>
@@ -178,25 +129,10 @@
         data:{
             echarts:'',
             panel:[],
-            line:{
-                date:[],
-                data:[]
-            },
-            table:[],
-            bar:{
-                date:[],
-                name:[],
-                data:[]
-            },
-            pie:[],
-            order:{
-                percentage:[0,0]
-            },
-            filterForm:{
-                table:'all',
-                select:'one',
-                datepicker:['2023-01-01','2023-02-01'],
-            }
+            list:[],
+            box:[],
+            material:[]
+          
         },
         onLoad:function (){
             Yunqi.use('/assets/js/echarts.min.js').then(res=>{
@@ -208,130 +144,11 @@
             parseData:function (){
                 Yunqi.ajax.get('dashboard/index',{}).then(res=>{
                     this.panel=res.panel;
-                    this.line=res.line;
-                    this.table=res.table;
-                    this.bar=res.bar;
-                    this.pie=res.pie;
-                    this.order=res.order;
-                    this.chart1();
-                    this.chart2();
-                    this.chart3();
+                    this.list=res.variety;
+                    this.box=res.box;
+                    this.material=res.material;
                 });
             },
-            chart1:function () {
-                let mychart = this.echarts.init(document.getElementById('chart1'), 'walden');
-                mychart.setOption({
-                    title: {text: '每日新增用户数',left: 'center'},
-                    tooltip: {
-                        trigger: 'axis'
-                    },
-                    toolbox: {
-                        show: false,
-                        feature: {
-                            magicType: {show: true, type: ['stack', 'tiled']},
-                            saveAsImage: {show: true}
-                        }
-                    },
-                    xAxis: {
-                        type: 'category',
-                        boundaryGap: false,
-                        data: this.line.date
-                    },
-                    yAxis: {},
-                    grid: [{
-                        left: 40,
-                        top: 40,
-                        right: 0,
-                        bottom:30
-                    }],
-                    series: [{
-                        name: '注册用户',
-                        type: 'line',
-                        smooth: true,
-                        areaStyle: {
-                            normal: {}
-                        },
-                        lineStyle: {
-                            normal: {
-                                width: 1.5
-                            }
-                        },
-                        data: this.line.data
-                    }]
-                });
-                window.addEventListener('resize',()=>{
-                    mychart.resize();
-                });
-            },
-            chart2:function (){
-                let mychart = this.echarts.init(document.getElementById('chart2'))
-                mychart.setOption({
-                    title: {text: '消费比例图',left: 'center'},
-                    legend: {
-                        orient: 'horizontal',
-                        bottom: 0,
-                    },
-                    series: [{
-                        type: 'pie',
-                        data:this.pie,
-                        label: {
-                            normal: {
-                                show: true,
-                                formatter: "¥{c}",
-                            }
-                        }
-                    }]
-                });
-                window.addEventListener('resize',()=>{
-                    mychart.resize();
-                });
-            },
-            chart3:function (){
-                let mychart = this.echarts.init(document.getElementById('chart3'))
-                mychart.setOption({
-                    title: {text: '消费日历图',left: 'center'},
-                    legend: {
-                        orient: 'vertical',
-                        left: 'left',
-                    },
-                    yAxis: {},
-                    xAxis: {
-                        data: this.bar.date
-                    },
-                    grid: [{
-                        left: 100,
-                        top: 40,
-                        right: 40,
-                        bottom:20
-                    }],
-                    series: [
-                        {
-                            type: 'bar',
-                            name:this.bar.name[0],
-                            data: this.bar.data[0]
-                        },
-                        {
-                            type: 'bar',
-                            name:this.bar.name[1],
-                            data: this.bar.data[1]
-                        },
-                        {
-                            type: 'bar',
-                            name:this.bar.name[2],
-                            data: this.bar.data[2]
-                        }
-                    ]
-                });
-                window.addEventListener('resize',()=>{
-                    mychart.resize();
-                });
-            },
-            changeForm:function (type){
-                if(type){
-                    this.filterForm.table=type;
-                }
-                this.parseData();
-            }
         }
     }
 </script>
@@ -396,7 +213,6 @@
 }
 .style-3{
     padding: 10px;
-    width: 87%;
     margin:0 auto;
     text-align: center;
 }
@@ -404,7 +220,6 @@
     text-align: left;
 }
 .style-3 .box{
-    height: 190px;
     display: flex;
     flex-direction: column;
     justify-content: space-around;
@@ -413,15 +228,22 @@
     text-align: left;
 }
 .style-3 .box-number-top{
-    font-size: 26px;
+    font-size: 20px;
 }
 .style-3 .box-number-bottom{
-    color: darkgrey;
+     font-size: 24px;
+     color: blueviolet;
 }
 .style-3 .box-content{
     display: flex;
-    justify-content: space-between;
+    /* justify-content: space-between; */
     align-items: center;
+    flex-wrap: wrap;
+}
+
+.box-content .box-content-right{
+    min-width: 150px;
+    padding-bottom: 16px;
 }
 .style-3 .icon{
     color: #fff;

+ 259 - 2
app/admin/view/general/attachment/select.html

@@ -29,7 +29,7 @@
                         :multiple="true"
                         accept="image/*"
                         action="{$config.baseUrl}{$config.upload.uploadurl}"
-                        :data="{category:category,disks:'{$config.upload.disks}'}"
+                        :data="{category:category,disks:'{$config.upload.disks}'}" 
                         :headers="{'x-requested-with': 'XMLHttpRequest'}"
                         list-type="picture-card"
                         :on-success="beforeUploadSuccess"
@@ -126,4 +126,261 @@
                 if(res.code===0){
                     Yunqi.message.error(__(res.msg));
                 }
-                th
+                this.list=[];
+                setTimeout(()=>{
+                    this.refresh();
+                },500);
+            },
+            checkCategory:function (key) {
+                this.category=key;
+                this.refresh();
+            },
+            addCate:function () {
+                this.editCateForm.type='add';
+                this.editCateForm.title='添加分类';
+                this.editCateForm.key='fold-'+(this.catelist.length+1);
+                this.editCateForm.show=true;
+            },
+            editCate:function (key,value) {
+                this.editCateForm.type='edit';
+                this.editCateForm.title='编辑分类';
+                this.editCateForm.key=key;
+                this.editCateForm.value=value;
+                this.editCateForm.show=true;
+            },
+            delCate:function (key,value) {
+                this.editCateForm.type='del';
+                this.editCateForm.key=key;
+                this.editCateForm.value=value;
+                Yunqi.confirm('确定删除分类【'+value+'】吗?').then(res=>{
+                    Yunqi.ajax.post('general/attachment/setcate',this.editCateForm).then(res=>{
+                        this.catelist=res;
+                        this.category='all';
+                        this.refresh();
+                    });
+                });
+            },
+            confirm:function () {
+                if(this.editCateForm.type=='set'){
+                    let ids=[];
+                    this.checked.forEach(item=>{
+                        ids.push(item.id);
+                    });
+                    if (ids.length==0){
+                        Yunqi.message.error('请选择要删除的图片!');
+                        return;
+                    }
+                    Yunqi.ajax.post('general/attachment/classify', {
+                        ids:ids.join(','),
+                        category:this.editCateForm.key
+                    }).then(res=>{
+                        this.editCateForm.show=false;
+                        this.category=this.editCateForm.key;
+                        this.checked=[];
+                        this.refresh();
+                    });
+                }else{
+                    Yunqi.ajax.post('general/attachment/setcate',this.editCateForm).then(res=>{
+                        this.catelist=res;
+                        this.editCateForm.show=false;
+                        this.category=this.editCateForm.key;
+                        this.refresh();
+                    });
+                }
+            },
+            delPic:function () {
+                let ids=[];
+                this.checked.forEach(item=>{
+                    ids.push(item.id);
+                });
+                if (ids.length==0){
+                    Yunqi.message.error('请选择要删除的图片!');
+                    return;
+                }
+                Yunqi.confirm('确定删除这'+ids.length+'张图片吗?').then(res=>{
+                    Yunqi.ajax.post('general/attachment/del',{ids:ids.join(',')}).then(res=>{
+                        this.getImglist();
+                        this.checked=[];
+                    });
+                });
+            },
+            setCategory:function () {
+                if (this.checked.length===0){
+                    Yunqi.message.error('请选择要归类的图片!');
+                    return;
+                }
+                this.editCateForm.type='set';
+                this.editCateForm.title='图片归类';
+                this.editCateForm.show=true;
+            },
+            refresh:function () {
+                this.page=1;
+                this.getImglist();
+            },
+            pageChange:function (page) {
+                this.page=page;
+                this.getImglist();
+            },
+            getImglist:function () {
+                this.loading=true;
+                Yunqi.ajax.get('general/attachment/select',{
+                    page:this.page,
+                    category:this.category,
+                    keywords:this.keywords,
+                }).then(res=>{
+                    this.total=res.total;
+                    this.list=res.rows;
+                    this.loading=false;
+                    Vue.nextTick(()=>{
+                        this.parseImg();
+                    });
+                });
+            },
+            parseImg:function(){
+                if(this.loading){
+                    return;
+                }
+                let imgs=document.querySelectorAll('img[class="upload-file-img"]');
+                if(imgs.length==0){
+                    return;
+                }
+                let url=imgs[0].dataset.url;
+                imgs[0].setAttribute('src',url);
+                imgs[0].removeAttribute('class');
+            },
+            confirmImg:function () {
+                let imgs=[];
+                this.checked.forEach(res=>{
+                    imgs.push(res.fullurl);
+                });
+                Yunqi.api.closelayer(Yunqi.app.window.id,imgs);
+            },
+            checkImg:function (file) {
+                let xi=this.inArray(file.fullurl);
+                if(xi!==false){
+                    this.checked.splice(xi,1);
+                }else{
+                    if(this.checked.length==this.limit){
+                        this.checked.shift();
+                    }
+                    this.checked.push(file);
+                }
+            }
+        }
+    }
+</script>
+<style>
+    .filebox{
+        padding: 10px;
+    }
+    .el-card__body{
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        padding:0;
+    }
+    .el-card__body>.left{
+        width: 20%;
+        height: 470px;
+        padding:10px;
+    }
+    .el-card__body>.left .li{
+        height: 40px;
+        line-height: 40px;
+        cursor: pointer;
+        padding: 0 10px;
+    }
+    .el-card__body>.left .li:hover{
+        background-color: var(--el-color-primary-light-8);
+    }
+    .el-card__body>.left .li.active{
+        background-color: var(--el-color-primary-light-8);
+    }
+    .el-card__body>.left .li .fr{
+        float:right;
+        display: flex;
+        width: 60px;
+        justify-content: space-between;
+        font-size:12px;
+        color: var(--el-color-primary);
+    }
+    .el-card__body>.left .li .fr span:hover{
+        color: var(--el-color-primary-light-3);
+    }
+    .el-card__body>.right{
+        width: 80%;
+        border-left:1px solid var(--el-border-color-light);
+        padding:12px;
+        position: relative;
+    }
+    .el-upload{
+        width: 110px;
+        height: 110px;
+        margin: 15px 13px 0 0;
+        border-radius: 5px;
+        position:relative;
+        border: 1px dashed #ccc;
+    }
+    .el-upload-list .is-ready,.el-upload-list .is-uploading{
+        display: none;
+    }
+    .el-upload-list .el-upload-list__item{
+        width: 110px;
+        height: 110px;
+        margin: 15px 13px 0 0;
+        border-radius: 5px;
+        position:relative;
+        border: 1px dashed #ccc;
+    }
+    .el-upload-list .el-upload-list__item .img{
+        width: 90px;
+        height: 90px;
+        position: absolute;
+        left:10px;
+        top:10px;
+        overflow: hidden;
+        cursor: pointer;
+        background-repeat: no-repeat;
+        background-size: contain;
+        background-position: center;
+    }
+    .el-upload-list .el-upload-list__item span{
+        display: inline-block;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 98%;
+        font-size: 12px;
+        text-align: center;
+        color: #000;
+        position:absolute;
+        border-radius:3px;
+        bottom:1px;
+        left:1%;
+        background-color: rgb(110,110,110,0.5);
+    }
+    .el-upload-list .el-upload-list__item .checked span{
+        background-color: var(--el-color-primary);
+        color:#fff;
+    }
+    .el-upload-list .fa-check{
+        display: none;
+    }
+    .el-upload-list .checked .fa-check{
+        color:var(--el-color-primary);
+        position: absolute;
+        right:10px;
+        top:10px;
+        font-size:24px;
+        display:inline;
+    }
+    .footer{
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+    }
+    .footer .el-button{
+        position: relative;
+        top:7px;
+    }
+</style>

+ 1 - 0
app/admin/view/shop/shop_delivery/index.html

@@ -34,6 +34,7 @@
                 {field: 'specs.title', title: __('规格'),operate: false},
                 {field: 'num', title: __('数量'),operate: false},
                 {field: 'weigh', title: __('重量'),operate: false},
+                {field: 'price', title: __('当前发货价'),operate: false},
                 {field: 'total_price', title: __('总价'),operate: false},
                 {field: 'status', title: __('状态'),width:120,searchList: {1: __('待结算'),2: __('已结算'), 3: __('驳回')},formatter:Yunqi.formatter.switch},
                 {field: 'settlement_data', title: __('结算时间'), width:160,formatter: Yunqi.formatter.datetime,operate:false,sortable: true},

+ 1 - 0
app/admin/view/user/index/add.html

@@ -16,6 +16,7 @@
                 {field: 'nickname', title: __('姓名'), edit: 'text',rules:"required",searchList: Yunqi.data.varietyList},
                 {field: 'username',title: __('账户'),edit:'text',rules:'required'},
                 {field: 'password',title: __('密码'),edit:'text',rules:'required;length(6~30)'},
+                {field: 'avatar', title: __('头像'),edit:'image'},
                 {field: 'role',title: __('角色'),edit:'checkbox',searchList: {1:'录入员', 2:'库管'}},
                 {field: 'remark',title: __('备注'),edit:'textarea'},
                 {field: 'status', title: __('状态'), edit:'switch',searchList: {'normal': __('正常'),'hidden': __('隐藏')}},

+ 2 - 1
app/admin/view/user/index/edit.html

@@ -20,8 +20,9 @@
                     type:'password',
                     value:'',
                     rules:'required;length(6~30)',
-                    placeholder:'不填写则不修改',
+                    placeholder:'不填写则不修改'
                 }},
+                {field: 'avatar', title: __('头像'),edit:'image'},
                 {field: 'sex', title: __('性别'), edit: 'radio',rules:"required",searchList: {1: __('男'), 2: __('女')}},
                 {field: 'email',title: __('邮箱'),rules:'email',edit:'text'},
                 {field: 'mobile',title: __('手机'),edit:'text',rules:'mobile'},

+ 1 - 0
app/api/service/SpecService.php

@@ -59,6 +59,7 @@ class SpecService{
                         'spec_id'         => $item['spec_id'],
                         'num'             => $item['num'],
                         'weigh'           => $weight,
+                        'price'           => $item['price'],
                         'total_price'     => bcmul($item['price'], $item['num'], 2)
                   ];