瀏覽代碼

Merge remote-tracking branch 'origin/金牛明医' into 金牛明医

yh 2 周之前
父節點
當前提交
a55864ef3d

+ 3 - 2
src/api/his/storePayment.js

@@ -25,10 +25,11 @@ export function getStorePayment(paymentId) {
     method: 'get'
   })
 }
-export function getStatus(paymentId) {
+export function getStatus(paymentId,refundDate) {
   return request({
     url: '/his/storePayment/getStatus/' + paymentId,
-    method: 'get'
+    method: 'get',
+    params: { refundDate: refundDate }
   })
 }
 export function refund(paymentId) {

+ 97 - 19
src/views/components/his/storePayDetails.vue

@@ -9,7 +9,7 @@
       </div>
 
         <div class=""  style="float: right;margin: 5px;">
-           <el-button size="mini" @click="getPayStatus()" >同步支付状态</el-button>
+           <el-button size="mini" @click="openSyncDialog" >同步支付状态</el-button>
         </div>
         <div class="" v-if="item.status>=0" style="float: right; margin: 5px;" v-hasPermi="['his:storePayment:refund']" >
            <el-button size="mini" @click="payRefund()" >退款</el-button>
@@ -71,7 +71,34 @@
             </el-descriptions-item>
         </el-descriptions>
     </div>
+  <!-- 同步支付状态弹窗 -->
+  <el-dialog
+    title="同步支付状态"
+    :visible.sync="syncDialogVisible"
+    width="450px"
+    :close-on-click-modal="false"
+    append-to-body>
+
+    <el-form :model="syncForm" :rules="syncRules" ref="syncForm" label-width="100px">
+      <el-form-item label="退款日期" prop="refundDate">
+        <el-date-picker
+          v-model="syncForm.refundDate"
+          type="date"
+          placeholder="请选择退款日期"
+          value-format="yyyy-MM-dd"
+          style="width: 100%">
+        </el-date-picker>
+      </el-form-item>
+    </el-form>
+
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="syncDialogVisible = false" size="small">取 消</el-button>
+      <el-button type="primary" :loading="syncLoading"  @click="getPayStatus()" size="small">
+        开始同步
+      </el-button>
     </div>
+  </el-dialog>
+</div>
 </template>
 
 <script>
@@ -81,6 +108,18 @@ import { refund,listStorePayment,getStatus, getStorePayment, delStorePayment, ad
     props:["data"],
     data() {
       return {
+        // 弹窗显示控制
+        syncDialogVisible: false,
+        // 加载状态
+        syncLoading: false,
+        syncForm: {
+          refundDate: '',
+        },
+        syncRules: {
+          refundDate: [
+            { required: true, message: '请选择退款日期', trigger: 'change' }
+          ]
+        },
         statusOptions: [],
         busineOptions: [],
         item:null,
@@ -88,16 +127,29 @@ import { refund,listStorePayment,getStatus, getStorePayment, delStorePayment, ad
       }
     },
     created() {
-     this.getDicts("sys_store_payment_status").then(response => {
-       this.statusOptions = response.data;
-     });
-  this.getDicts("sys_store_payment_business_type").then(response => {
-    this.busineOptions = response.data;
-  });
+       this.getDicts("sys_store_payment_status").then(response => {
+        this.statusOptions = response.data;
+      });
+      this.getDicts("sys_store_payment_business_type").then(response => {
+        this.busineOptions = response.data;
+      });
 
 
     },
     methods: {
+      // 打开同步弹窗
+      openSyncDialog() {
+        if (this.item.status==0){
+          return this.getPayStatus();
+        } else {
+          this.syncDialogVisible = true;
+          // 重置表单
+          this.$nextTick(() => {
+            this.$refs.syncForm && this.$refs.syncForm.resetFields();
+          });
+        }
+
+      },
       getDetails(orderId) {
         this.item=null;
         getStorePayment(orderId).then(response => {
@@ -105,19 +157,45 @@ import { refund,listStorePayment,getStatus, getStorePayment, delStorePayment, ad
         });
       },
       getPayStatus(){
-          var that=this;
-          this.$confirm('是否确认同步支付状态?', "警告", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(function() {
-            return getStatus(that.item.paymentId);
-          }).then(() => {
-            getStorePayment(that.item.paymentId).then(response => {
-                  that.item = response.data;
+        this.$confirm('是否确认同步支付状态?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          console.log("this.item.status", this.item.status);
+          console.log("this.item.status",  this.syncForm.refundDate);
+
+          if (this.item.status === 1) {
+            // 先验证表单
+            this.$refs.syncForm.validate(valid => {
+              if (valid) {
+                this.syncLoading = true;
+                getStatus(this.item.paymentId, this.syncForm.refundDate)
+                  .then(() => {
+                    this.$message.success('同步成功');
+                    this.syncDialogVisible = false;
+                    getStorePayment(that.item.paymentId).then(response => {
+                      that.item = response.data;
+                    });
+                  })
+                  .catch(err => {
+                    this.$message.error(err.msg || '同步失败');
+                  })
+                  .finally(() => {
+                    this.syncLoading = false;
+                  });
+              }
             });
-             this.msgSuccess("操作成功");
-          }).catch(function() {});
+          } else {
+            // status 不为 1 时直接调用,不传日期
+            getStatus(this.item.paymentId, null)
+              .then(() => {
+                getStorePayment(that.item.paymentId).then(response => {
+                  that.item = response.data;
+                });
+              });
+          }
+        }).catch(() => {});
       },
 
 

+ 1 - 1
src/views/course/userCourse/index.vue

@@ -517,7 +517,7 @@
     <el-dialog :title="updateCourse.title" :visible.sync="updateCourse.open" width="1200px" append-to-body>
       <el-form ref="updateCourseForm" :model="updateCourseForm"  label-width="110px">
 
-        <el-form-item label="关联公司" prop="tags">
+        <el-form-item label="新增关联公司" prop="tags">
           <el-select v-model="updateCourseForm.companyIds" multiple placeholder="请选择公司" filterable clearable style="width: 90%;">
             <el-option
               v-for="dict in companyOptions"

+ 24 - 2
src/views/his/appVersion/index.vue

@@ -62,6 +62,11 @@
           <dict-tag :options="isForceOptions" :value="scope.row.isForce"/>
         </template>
       </el-table-column>
+      <el-table-column label="热更新强制更新" align="center" prop="isHotForce">
+        <template slot-scope="scope">
+          <dict-tag :options="isHotForceOptions" :value="scope.row.isHotForce"/>
+        </template>
+      </el-table-column>
       <el-table-column label="APP类型" align="center" prop="appType" >
         <template slot-scope="scope">
           <dict-tag :options="appTypeOptions" :value="scope.row.appType"/>
@@ -172,7 +177,7 @@
         <el-form-item label="下载地址" prop="url" v-if="form.url!==null">
           <el-input v-model="form.url" readonly />
         </el-form-item>
-        <el-form-item label="wgt下载地址" prop="url" v-if="form.wgtUrl!==null">
+        <el-form-item label="wgt下载地址" prop="wgtUrl" v-if="form.wgtUrl!==null">
           <el-input v-model="form.wgtUrl" readonly />
         </el-form-item>
 
@@ -218,6 +223,16 @@
           </el-radio-group>
         </el-form-item>
 
+        <el-form-item label="是否强制更新"  prop="isHotForce">
+          <el-radio-group v-model="form.isHotForce">
+            <el-radio
+              v-for="dict in isHotForceOptions"
+              :key="dict.dictValue"
+              :label="parseInt(dict.dictValue)"
+            >{{dict.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
         <el-form-item label="强制更新渠道" prop="uploadConfig" v-if="form.appType===3">
           <el-checkbox v-model="updateConfig.appstore" >应用宝</el-checkbox>
           <el-checkbox v-model="updateConfig.xiaomi" >小米</el-checkbox>
@@ -267,6 +282,7 @@ export default {
       typeOptions: [],
       // 是否强制更新字典
       isForceOptions: [],
+      isHotForceOptions: [],
       // APP 类型 1医生端 2药师端字典
       appTypeOptions: [],
        fileList:[],
@@ -282,7 +298,8 @@ export default {
         url: null,
         type: null,
         isForce: null,
-        appType: null
+        appType: null,
+        isHotForce:null,
       },
       // 表单参数
       form: {},
@@ -303,6 +320,9 @@ export default {
       isForce: [
         { required: true, message: "是否强制更新不能为空", trigger: "blur" }
       ],
+      isHotForce: [
+        { required: true, message: "是否强制更新不能为空", trigger: "blur" }
+      ],
       note: [
         { required: true, message: "描述不能为空", trigger: "blur" }
       ],
@@ -320,6 +340,7 @@ export default {
     });
     this.getDicts("sys_company_or").then(response => {
       this.isForceOptions = response.data;
+      this.isHotForceOptions = response.data;
     });
     this.getDicts("sys_app_type").then(response => {
       this.appTypeOptions = response.data;
@@ -438,6 +459,7 @@ export default {
         baiduUrl: null,
         type: 1,
         isForce: 1,
+        isHotForce: 1,
         createTime: null,
         appType: 1,
         appStoreUpdate:false,

+ 253 - 20
src/views/system/config/config.vue

@@ -1892,27 +1892,83 @@
       <el-tab-pane label="公司销售角色默认生成配置" name="companymenu.config">
         <companyMenuConfig></companyMenuConfig>
       </el-tab-pane>
-      <el-tab-pane label="APP推广" name="app.config">
-        <el-form ref="form25" :model="form25" :rules="rules25" label-width="160px">
-          <el-form-item label="APP推广图片" prop="images">
-            <Material v-model="appImages" type="image" :num="10" :width="150" :height="150"/>
-          </el-form-item>
-          <el-form-item label="APP推广视频" prop="videoUrl">
-            <div>
-              <el-upload
-                ref="upload"
-                class="upload-demo"
-                :action="uploadUrl"
-                :on-success="appHandleSuccess"
-                :before-upload="beforeUpload"
-                :limit="1"
-                :accept="videoAccept"
-              >
-                <el-button size="small" type="primary">点击上传视频</el-button>
-              </el-upload>
-              <video :src="form25.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
+      <el-tab-pane label="APP设置" name="app.config">
+        <el-form ref="form25" :model="form25" :rules="rules25" label-width="160px" class="app-config-form">
+
+          <!-- 客服配置卡片 -->
+          <el-card class="config-card" shadow="hover">
+            <!-- 标题区域移到body内 -->
+            <div class="section-title">
+              <div class="title-icon">
+                <i class="el-icon-service"></i>
+              </div>
+              <div class="title-text">
+                <h3>APP客服配置</h3>
+                <p class="subtitle">配置企业微信客服相关参数</p>
+              </div>
             </div>
-          </el-form-item>
+
+            <el-divider></el-divider>
+
+            <el-form-item label="企微主体" prop="corpId">
+              <el-select
+                v-model="form25.corpId"
+                clearable filterable
+                placeholder="请选择企微主体"
+                style="width: 320px;">
+                <el-option
+                  v-for="item in corpOptions"
+                  :key="item.corpId"
+                  :label="item.corpName"
+                  :value="item.corpId"
+                >
+                </el-option>
+              </el-select>
+              <el-tooltip content="选择企业微信的主体" placement="right">
+                <i class="el-icon-question help-icon"></i>
+              </el-tooltip>
+            </el-form-item>
+            <el-form-item label="客服链接" prop="corpUrl">
+              <el-input v-model="form25.corpUrl" label="请输入" style="width: 500px;"></el-input>
+            </el-form-item>
+          </el-card>
+
+          <!-- APP推广卡片 -->
+          <el-card class="config-card" shadow="hover">
+            <div class="section-title">
+              <div class="title-icon icon-promotion">
+                <i class="el-icon-mobile-phone"></i>
+              </div>
+              <div class="title-text">
+                <h3>APP推广</h3>
+                <p class="subtitle">配置APP推广素材,支持图片和视频</p>
+              </div>
+            </div>
+
+            <el-divider></el-divider>
+
+            <el-form-item label="APP推广图片" prop="images">
+              <Material v-model="appImages" type="image" :num="10" :width="150" :height="150"/>
+            </el-form-item>
+            <el-form-item label="APP推广视频" prop="videoUrl">
+              <div>
+                <el-upload
+                  ref="upload"
+                  class="upload-demo"
+                  :action="uploadUrl"
+                  :on-success="appHandleSuccess"
+                  :before-upload="beforeUpload"
+                  :limit="1"
+                  :accept="videoAccept"
+                >
+                  <el-button size="small" type="primary">点击上传视频</el-button>
+                </el-upload>
+                <video :src="form25.videoUrl" controls style="max-width: 400px; max-height: 400px;"></video>
+              </div>
+            </el-form-item>
+          </el-card>
+
+          <!-- 操作按钮 -->
           <div class="footer">
             <el-button type="primary" @click="submitForm25">提 交</el-button>
           </div>
@@ -2537,6 +2593,7 @@ import { getCitys } from '@/api/store/city'
 import { listCompany } from '@/api/company/company'
 import { getStoreProductColumns } from '@/api/hisStore/storeProduct'
 import { getStoreColumns } from '@/api/hisStore/store'
+import {listQwCompany} from "@/api/qw/qwCompany";
 
 export default {
   name: 'Config',
@@ -2547,6 +2604,7 @@ export default {
   },
   data() {
     return {
+      corpOptions:[],
       citys: [],
       images: [],
       appImages: [],
@@ -3072,6 +3130,9 @@ export default {
           this.form24 = JSON.parse(response.data.configValue)
           console.log(this.form24.sign)
         } else if (key == 'app.config') {
+          listQwCompany().then(response => {
+            this.corpOptions = response.rows;
+          });
           this.configId = response.data.configId
           this.configKey = response.data.configKey
           this.form25 = JSON.parse(response.data.configValue)
@@ -3706,4 +3767,176 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+
+.app-config-form {
+  padding: 10px;
+}
+
+.config-card {
+  margin-bottom: 24px;
+  border-radius: 12px;
+  border: none;
+  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
+}
+
+.config-card ::v-deep .el-card__body {
+  padding: 24px;
+}
+
+/* 章节标题样式 - 图标和文字在一起 */
+.section-title {
+  display: flex;
+  align-items: center;
+  margin-bottom: 8px;
+}
+
+.title-icon {
+  width: 40px;
+  height: 40px;
+  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
+  border-radius: 10px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 12px;
+  flex-shrink: 0;
+}
+
+.title-icon i {
+  color: #fff;
+  font-size: 20px;
+}
+
+.icon-promotion {
+  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
+}
+
+.title-text h3 {
+  margin: 0;
+  font-size: 18px;
+  color: #303133;
+  font-weight: 600;
+  line-height: 1.4;
+}
+
+.subtitle {
+  margin: 4px 0 0 0;
+  font-size: 13px;
+  color: #909399;
+  line-height: 1.4;
+}
+
+/* 分割线 */
+.el-divider {
+  margin: 20px 0;
+  background-color: #ebeef5;
+}
+
+/* 表单项 */
+.app-config-form ::v-deep .el-form-item {
+  margin-bottom: 24px;
+}
+
+.app-config-form ::v-deep .el-form-item:last-child {
+  margin-bottom: 0;
+}
+
+.help-icon {
+  margin-left: 8px;
+  color: #c0c4cc;
+  cursor: help;
+  font-size: 16px;
+  transition: color 0.3s;
+}
+
+.help-icon:hover {
+  color: #409EFF;
+}
+
+/* 上传区域 */
+.upload-wrapper {
+  display: flex;
+  flex-direction: column;
+}
+
+.upload-tip {
+  margin-top: 8px;
+  color: #909399;
+  font-size: 12px;
+}
+
+/* 视频上传 */
+.video-upload-wrapper {
+  width: 100%;
+  max-width: 400px;
+}
+
+.video-uploader ::v-deep .el-upload {
+  width: 100%;
+}
+
+.video-uploader ::v-deep .el-upload-dragger {
+  width: 100%;
+  height: 160px;
+  background: #fafafa;
+  border: 2px dashed #dcdfe6;
+  border-radius: 8px;
+}
+
+.video-uploader ::v-deep .el-upload-dragger:hover {
+  border-color: #409EFF;
+}
+
+.preview-video {
+  width: 100%;
+  max-width: 400px;
+  max-height: 250px;
+  border-radius: 8px;
+  background: #000;
+}
+
+.video-preview {
+  position: relative;
+  display: inline-block;
+}
+
+.video-actions {
+  position: absolute;
+  top: 10px;
+  right: 10px;
+  opacity: 0;
+  transition: opacity 0.3s;
+}
+
+.video-preview:hover .video-actions {
+  opacity: 1;
+}
+
+/* 底部按钮 */
+.form-footer {
+  margin-top: 32px;
+  padding-left: 160px;
+}
+
+.form-footer .el-button {
+  min-width: 100px;
+  padding: 12px 24px;
+  border-radius: 6px;
+}
+
+/* 响应式 */
+@media screen and (max-width: 768px) {
+  .section-title {
+    margin-bottom: 16px;
+  }
+
+  .form-footer {
+    padding-left: 0;
+    text-align: center;
+  }
+
+  .config-card ::v-deep .el-card__body {
+    padding: 16px;
+  }
+}
 </style>