wjj před 1 měsícem
rodič
revize
749c018e7c

+ 8 - 0
src/api/course/coursePlaySourceConfig.js

@@ -45,3 +45,11 @@ export function updateIsTownOn(query) {
     params: query
   })
 }
+
+
+export function options() {
+  return request({
+    url: '/course/playSourceConfig/options',
+    method: 'get',
+  })
+}

+ 2 - 2
src/api/hisStore/collection.js

@@ -62,9 +62,9 @@ export function exportCollection(query) {
 }
 
 
-export function getWxaCodeCollectionUnLimit(collectionId) {
+export function getWxaCodeCollectionUnLimit(collectionId,appId) {
   return request({
-    url: '/hisStore/collection/getWxaCodeCollectionUnLimit/'+collectionId,
+    url: '/hisStore/collection/getWxaCodeCollectionUnLimit/'+collectionId+"/"+appId,
     method: 'get',
   })
 }

+ 18 - 5
src/views/qw/externalContact/collection.vue

@@ -1,6 +1,11 @@
 <template>
   <div class="app-container">
     <el-form validate-on-rule-change :rules="rules" ref="form" :model="form" label-width="140px">
+      <el-form-item label="小程序" prop="appId">
+        <el-select v-model="form.appId" placeholder="小程序" clearable>
+          <el-option v-for="dict in sourceList" :key="dict.dictValue1" :label="dict.dictLabel" :value="dict.dictValue1" />
+        </el-select>
+      </el-form-item>
       <el-form-item label="信息模板" prop="questionId">
         <el-select @change="selectQuestion" v-model="form.questionId" placeholder="请选择问答">
           <el-option v-for="dict in questionOptions" :key="dict.dictValue" :label="dict.dictLabel"
@@ -87,6 +92,7 @@
 <script>
 import { questionOptions, getAnswer } from "@/api/hisStore/answer";
 import { allPrivatePackage } from "@/api/store/package";
+import { options } from "@/api/course/coursePlaySourceConfig";
 import { getInfo, addCollection, updateCollection, getWxaCodeCollectionUnLimit } from "@/api/hisStore/collection";
 
 export default {
@@ -114,6 +120,7 @@ export default {
       callback();
     };
     return {
+      sourceList:[],
       extraParams: {
         companyId: null,
         companyUserId: null
@@ -143,6 +150,9 @@ export default {
       codeImage: null,
 
       rules: {
+        appId: [
+          { required: true, message: '请选择分享的小程序', trigger: 'change' }
+        ],
         questionId: [
           { required: true, message: '请选择信息模板', trigger: 'change' }
         ],
@@ -184,6 +194,9 @@ export default {
   created() {
     this.getQuestionOptions();
     this.getAllPrivatePackge();
+    options().then(res => {
+      this.sourceList = res.data;
+    })
   },
   methods: {
     // 新增:用于接收主页面传来的公司id和销售id
@@ -209,7 +222,7 @@ export default {
       link.click();
       document.body.removeChild(link);
     },
-    handleShare(id) {
+    handleShare(id,appId) {
       let loadingRock = this.$loading({
         lock: true,
         text: '生成二维码中~~请不要刷新页面!!',
@@ -217,7 +230,7 @@ export default {
         background: 'rgba(0, 0, 0, 0.7)'
       });
 
-      getWxaCodeCollectionUnLimit(id).then(response => {
+      getWxaCodeCollectionUnLimit(id,appId).then(response => {
         this.codeImage = response.url
         this.collectionForm.open = true;
         this.collectionForm.name = id;
@@ -363,14 +376,14 @@ export default {
           }
 
           console.log('实际提交数据:', submitData); // 调试用
-
+          const appId = this.form.appId;
           if (submitData.id != null) {
             updateCollection(submitData).then(res => {
               this.msgSuccess("修改成功");
               this.open = false;
               this.$parent.$parent.closeCollection();
               this.$refs['form'].resetFields();
-              this.handleShare(res.data);
+              this.handleShare(res.data,appId);
             });
           } else {
             addCollection(submitData).then(res => {
@@ -378,7 +391,7 @@ export default {
               this.open = false;
               this.$parent.$parent.closeCollection();
               this.$refs['form'].resetFields();
-              this.handleShare(res.data);
+              this.handleShare(res.data,appId);
             });
           }
         }

+ 2 - 0
src/views/qw/sopTemp/updateSopTemp.vue

@@ -151,6 +151,8 @@
                                              style=" margin-right: 10px;" >
                                     <el-option label="未购" :value="1"></el-option>
                                     <el-option label="已购" :value="2"></el-option>
+                                    <el-option label="升单未购" :value="3"></el-option>
+                                    <el-option label="升单已购" :value="4"></el-option>
                                   </el-select>
                                 </el-form-item>
                                 <el-form-item label="推送类别"  v-if="content.type == 6 ">