Просмотр исходного кода

Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

liaofei 2 лет назад
Родитель
Сommit
861ec84d29

+ 4 - 1
crmeb/app/api/controller/v2/user/StoreService.php

@@ -40,8 +40,11 @@ class StoreService
     /**
      * 客服聊天记录
      * @param Request $request
-     * @param $toUid
+     * @param StoreServiceServices $services
      * @return array
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function record(Request $request, StoreServiceServices $services)
     {

+ 1 - 1
crmeb/app/dao/service/StoreServiceLogDao.php

@@ -83,7 +83,7 @@ class StoreServiceLogDao extends BaseDao
             $query->where('id', '<', $upperId)->limit($limit)->order('id DESC');
         })->when(!$upperId, function ($query) use ($limit) {
             $query->limit($limit)->order('id DESC');
-        })->with(['user', 'service'])->select()->toArray();
+        })->with(['user'])->select()->toArray();
     }
 
     /**

+ 4 - 1
crmeb/app/kefuapi/controller/Service.php

@@ -261,8 +261,11 @@ class Service extends AuthController
 
     /**
      * 聊天记录
-     * @param $uid
+     * @param Request $request
      * @return mixed
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\DbException
+     * @throws \think\db\exception\ModelNotFoundException
      */
     public function getChatList(Request $request)
     {

+ 1 - 0
crmeb/app/services/order/StoreOrderCreateServices.php

@@ -223,6 +223,7 @@ class StoreOrderCreateServices extends BaseServices
         $deduction = $seckillId || $bargainId || $combinationId;
         if ($deduction) {
             $couponId = 0;
+            $gainIntegral = 0;
             $useIntegral = false;
         }
         //$shipping_type = 1 快递发货 $shipping_type = 2 门店自提

+ 1 - 1
crmeb/app/services/order/StoreOrderRefundServices.php

@@ -145,7 +145,7 @@ class StoreOrderRefundServices extends BaseServices
                 throw new AdminException(400489);
             }
             //退拼团
-            if ($splitOrderInfo['pid'] == 0 && !$splitOrderInfo['pink_id']) {
+            if ($splitOrderInfo['pid'] == 0 && $splitOrderInfo['pink_id'] > 0) {
                 /** @var StorePinkServices $pinkServices */
                 $pinkServices = app()->make(StorePinkServices::class);
                 if (!$pinkServices->setRefundPink($splitOrderInfo)) {

+ 1 - 1
template/admin/src/pages/app/routine/download/index.vue

@@ -86,7 +86,7 @@ export default {
         sm: 24,
         xs: 24,
       },
-      iframeUrl: `${location.origin}/pages/index/index?type=iframeWindow`,
+      iframeUrl: `${location.origin}/pages/index/index?mdType=iframeWindow`,
       is_live: 1,
       pageData: {
         code: '',

+ 1 - 1
template/admin/src/pages/order/invoice/index.vue

@@ -94,7 +94,7 @@
         </template>
         <template slot-scope="{ row, index }" slot="is_invoice">
           <div v-if="row.is_invoice === 1">已开票</div>
-          <div v-else>--</div>
+          <div v-else>未开票</div>
         </template>
         <template slot-scope="{ row, index }" slot="status">
           <div v-if="row.status === 0">未发货</div>

+ 2 - 2
template/admin/src/pages/setting/devise/list.vue

@@ -284,7 +284,7 @@ export default {
   },
   created() {
     this.getList();
-    this.imgUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
+    this.imgUrl = `${location.origin}/pages/index/index?mdType=iframeWindow`;
   },
   mounted: function () {},
   methods: {
@@ -294,7 +294,7 @@ export default {
     refreshFrame() {
       this.imgUrl = '';
       setTimeout((e) => {
-        this.imgUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
+        this.imgUrl = `${location.origin}/pages/index/index?mdType=iframeWindow`;
       }, 200);
     },
     getChildData(e) {

+ 1 - 1
template/admin/src/pages/setting/devise/template.vue

@@ -47,7 +47,7 @@ export default {
     this.setConfig = 'admin/' + names + '/setConfig';
     this.updataConfig = 'admin/' + names + '/updataConfig';
     this.pageId = parseInt(pageId);
-    this.iframeUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
+    this.iframeUrl = `${location.origin}/pages/index/index?mdType=iframeWindow`;
     diyGetInfo(parseInt(pageId)).then((datas) => {
       let data = datas.data.info.value;
       this.upData(data);

+ 2 - 2
template/admin/src/pages/setting/devisePage/index.vue

@@ -53,11 +53,11 @@ export default {
     this.pageId = parseInt(pageId);
     let moveLink = getCookies('moveLink');
     if (Number(this.$route.query.type) === 1) {
-      this.iframeUrl = `${moveLink}/pages/index/index?type=iframeWindow`;
+      this.iframeUrl = `${moveLink}/pages/index/index?mdType=iframeWindow`;
     } else {
       // this.iframeUrl = `https://v4.wuht.net/pages/index/index?type=iframeWindow`;
 
-      this.iframeUrl = `${location.origin}/pages/index/index?type=iframeWindow`;
+      this.iframeUrl = `${location.origin}/pages/index/index?mdType=iframeWindow`;
     }
     diyGetInfo(parseInt(pageId)).then((datas) => {
       let data = datas.data.info.value;

+ 26 - 43
template/admin/src/pages/system/codeGeneration/components/FoundationFor.vue

@@ -3,10 +3,16 @@
     <Alert closable>
       crud生成说明
       <template #desc>
-        <p>1、字段配置中表存在生成的字段为表内列的信息,并且主键、伪删除字段不允许设置为列,主键默认展示在列表中,伪删除字段不允许展示</p>
+        <p>
+          1、字段配置中表存在生成的字段为表内列的信息,并且主键、伪删除字段不允许设置为列,主键默认展示在列表中,伪删除字段不允许展示
+        </p>
         <p>2、在字段配置中新建表时,主键不需要增加列,会在生成的时候默认自带主键id</p>
-        <p>3、在字段配置中新建表时,字段类型为addTimestamps会自动创建create_time、update_time字段,字段类型为:timestamp</p>
-        <p>4、在字段配置中新建表时,字段类型为addSoftDelete会字段创建delete_time字段,字段类型为:timestamp,作用是伪删除</p>
+        <p>
+          3、在字段配置中新建表时,字段类型为addTimestamps会自动创建create_time、update_time字段,字段类型为:timestamp
+        </p>
+        <p>
+          4、在字段配置中新建表时,字段类型为addSoftDelete会字段创建delete_time字段,字段类型为:timestamp,作用是伪删除
+        </p>
         <p>5、在字段配置中,表单类型为frameImageOne时属于图片单选,frameImages时为图片多选</p>
         <p>6、在字段配置中,表单类型为不生成时创建后不会生成对应的表单项</p>
       </template>
@@ -29,11 +35,15 @@
         <div class="tip">选项,选择的菜单成功后会自动写入到此菜单下</div>
       </FormItem>
       <FormItem label="菜单名称">
-        <Input class="form-width" v-model="foundation.menuName" placeholder="请输入表名"></Input>
+        <Input class="form-width" v-model="foundation.menuName" placeholder="请输入菜单名称"></Input>
         <div class="tip">
           生成菜单为可选项,不填写默认生成的菜单名称将为表名;生成后会把自动生成的权限默认加入该菜单下
         </div>
       </FormItem>
+      <FormItem label="模块名" prop="modelName">
+        <Input class="form-width" v-model="foundation.modelName" placeholder="请输入模块名"></Input>
+        <div class="tip">用于生成模块名称</div>
+      </FormItem>
       <FormItem label="表名" prop="tableName">
         <Input class="form-width" v-model="foundation.tableName" placeholder="请输入表名" @on-blur="initfield"></Input>
         <div class="tip">
@@ -65,11 +75,7 @@
           >
             <template slot-scope="{ row, index }" slot="field">
               <span v-if="foundation.isTable">{{ row.field }}</span>
-              <Input
-                v-else
-                :disabled="disabledInput(index)"
-                v-model="tableField[index].field"
-              ></Input>
+              <Input v-else :disabled="disabledInput(index)" v-model="tableField[index].field"></Input>
             </template>
             <template slot-scope="{ row, index }" slot="field_type">
               <span v-if="foundation.isTable">{{ row.field_type }}</span>
@@ -79,51 +85,27 @@
             </template>
             <template slot-scope="{ row, index }" slot="limit">
               <span v-if="foundation.isTable">{{ row.limit }}</span>
-              <Input
-                v-else
-                v-model="tableField[index].limit"
-                :disabled="disabledInput(index)"
-              ></Input>
+              <Input v-else v-model="tableField[index].limit" :disabled="disabledInput(index)"></Input>
             </template>
             <template slot-scope="{ row, index }" slot="default">
               <span v-if="foundation.isTable">{{ row.default }}</span>
-              <Input
-                v-else
-                v-model="tableField[index].default"
-                :disabled="disabledInput(index)"
-              ></Input>
+              <Input v-else v-model="tableField[index].default" :disabled="disabledInput(index)"></Input>
             </template>
             <template slot-scope="{ row, index }" slot="comment">
               <span v-if="foundation.isTable">{{ row.comment }}</span>
-              <Input
-                v-else
-                v-model="tableField[index].comment"
-                :disabled="disabledInput(index)"
-              ></Input>
+              <Input v-else v-model="tableField[index].comment" :disabled="disabledInput(index)"></Input>
             </template>
             <template slot-scope="{ row, index }" slot="required">
-              <Checkbox
-                v-model="tableField[index].required"
-                :disabled="disabledInput(index)"
-              ></Checkbox>
+              <Checkbox v-model="tableField[index].required" :disabled="disabledInput(index)"></Checkbox>
             </template>
             <template slot-scope="{ row, index }" slot="is_table">
-              <Checkbox
-                v-model="tableField[index].is_table"
-                :disabled="disabledInput(index)"
-              ></Checkbox>
+              <Checkbox v-model="tableField[index].is_table" :disabled="disabledInput(index)"></Checkbox>
             </template>
             <template slot-scope="{ row, index }" slot="table_name">
-              <Input
-                v-model="tableField[index].table_name"
-                :disabled="disabledInput(index)"
-              ></Input>
+              <Input v-model="tableField[index].table_name" :disabled="disabledInput(index)"></Input>
             </template>
             <template slot-scope="{ row, index }" slot="from_type">
-              <Select
-                v-model="tableField[index].from_type"
-                :disabled="disabledInput(index)"
-              >
+              <Select v-model="tableField[index].from_type" :disabled="disabledInput(index)">
                 <Option v-for="item in fromTypeList" :value="item.value" :key="item.value">{{ item.label }}</Option>
               </Select>
             </template>
@@ -156,6 +138,7 @@ export default {
       foundationRules: {
         // pid: [{ required: true, message: '请输入菜单', trigger: 'blur' }],
         tableName: [{ required: true, message: '请输入表名', trigger: 'blur' }],
+        modelName: [{ required: true, message: '请输入模块名', trigger: 'blur' }],
       },
       menusList: [],
       columnTypeList: [],
@@ -258,13 +241,13 @@ export default {
   },
   mounted() {},
   methods: {
-    disabledInput(index){
+    disabledInput(index) {
       let fieldInfo = this.tableField[index];
-      let res = ['addTimestamps', 'addSoftDelete'].includes(this.tableField[index].field_type)
+      let res = ['addTimestamps', 'addSoftDelete'].includes(this.tableField[index].field_type);
       if (fieldInfo.primaryKey) {
         res = true;
       }
-      if (fieldInfo.field==='delete_time' && fieldInfo.field_type === 'timestamp') {
+      if (fieldInfo.field === 'delete_time' && fieldInfo.field_type === 'timestamp') {
         res = true;
       }
       return res;

+ 6 - 3
template/admin/src/pages/system/codeGeneration/index.vue

@@ -59,6 +59,7 @@ export default {
         foundation: {
           pid: '',
           tableName: '',
+          modelName: '',
           isTable: 1,
           menuName: '',
         },
@@ -87,6 +88,7 @@ export default {
       if (this.currentTab == 0) {
         // if (!this.formItem.foundation.pid) return this.$Message.warning('请选择菜单');
         if (!this.formItem.foundation.tableName) return this.$Message.warning('请输入表名');
+        if (!this.formItem.foundation.modelName) return this.$Message.warning('请输入模块名');
         if (!this.formItem.foundation.isTable) {
           if (!this.$refs.Foundation.tableField.length) return this.$Message.warning('请先添加表数据');
           if (this.$refs.Foundation.tableField.length)
@@ -109,8 +111,6 @@ export default {
           ...this.formItem.foundation,
           filePath: this.formItem.storage,
           tableField: this.$refs.Foundation.tableField,
-          // columnField: this.$refs.Field.dataList,
-          // fromField: this.$refs.FormItem.dataList,
         };
         this.reqloading = true;
         codeCrud(data)
@@ -168,7 +168,10 @@ export default {
   padding-left: 7px;
 }
 /deep/ .ivu-form-item {
-  margin-bottom: 15px;
+  margin-bottom: 17px;
+}
+/deep/ .ivu-form-item-error-tip {
+  padding-top: 2px;
 }
 /deep/ .tip {
   color: #bbb;

+ 1 - 1
template/uni-app/App.vue

@@ -124,7 +124,7 @@
 			uni.hideTabBar()
 			let that = this;
 			// #ifdef H5
-			if (option.query.hasOwnProperty('type') && option.query.type == "iframeWindow") {
+			if (option.query.hasOwnProperty('mdType') && option.query.mdType == "iframeWindow") {
 				this.globalData.isIframe = true;
 			} else {
 				this.globalData.isIframe = false;