Преглед изворни кода

Merge remote-tracking branch 'origin/master'

zyp пре 2 месеци
родитељ
комит
0a2912cc87
2 измењених фајлова са 49 додато и 5 уклоњено
  1. 26 1
      src/views/store/storeProduct/index.vue
  2. 23 4
      src/views/system/config/config.vue

+ 26 - 1
src/views/store/storeProduct/index.vue

@@ -516,6 +516,16 @@
                   />
             </el-select>
         </el-form-item>
+        <el-form-item label="所属公司">
+          <el-select style="width: 240px" v-model="form.companyIds" multiple placeholder="请选择企业" clearable size="small" >
+            <el-option
+                    v-for="item in companyOptions"
+                    :key="item.companyId"
+                    :label="item.companyName"
+                    :value="item.companyId"
+                  />
+            </el-select>
+        </el-form-item>
         <el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">
           <el-input v-model="form.prescribeCode" placeholder="请输入国药准字" />
         </el-form-item>
@@ -577,6 +587,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor/wang';
 import Material from '@/components/Material'
 import singleImg from '@/components/Material/single'
+import { getCompanyList } from "@/api/company/company";
 export default {
   name: "StoreProduct",
   components: {
@@ -652,6 +663,8 @@ export default {
       isHotOptions:[],
       isShowOptions:[],
       categoryOptions:[],
+      // 企业列表
+      companyOptions:[],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -750,6 +763,9 @@ export default {
     getAllStoreProductRule().then(response => {
       this.ruleList =response.data;
     });
+    getCompanyList().then(response => {
+      this.companyOptions = response.data;
+    });
     this.getTreeselect();
     this.getList();
   },
@@ -1003,7 +1019,8 @@ export default {
         prescribeSpec: null,
         prescribeFactory: null,
         prescribeName: null,
-        isDisplay:"1"
+        isDisplay:"1",
+        companyIds:[]
       };
       this.resetForm("form");
       this.oneFormValidate = [
@@ -1078,6 +1095,10 @@ export default {
              that.attrs.push(data);
           });
         }
+        // 组装companyIds
+        if (response.data.companyIds != null) {
+          this.form.companyIds = response.data.companyIds.split(',').map(Number);
+        }
         setTimeout(() => {
           that.generate();
         }, 200);
@@ -1135,6 +1156,10 @@ export default {
           if(this.form.specType === 1 && this.manyFormValidate.length===0){
             return this.$message.warning('请点击生成规格!');
           }
+          // 组装companyIds
+          if (this.form.companyIds.length != 0) {
+            this.form.companyIds = this.form.companyIds.join(',');
+          }
           addOrEdit(this.form).then(response => {
             if (response.code === 200) {
               this.msgSuccess("修改成功");

+ 23 - 4
src/views/system/config/config.vue

@@ -332,6 +332,22 @@
                <el-input-number  v-model="form18.answerIntegral" :min="1"    ></el-input-number>
              </el-tooltip>
            </el-form-item>
+           <el-form-item label="主域名">
+            <el-input  v-model="form18.courseDomainName" label="主域名"></el-input>
+           </el-form-item>
+           <el-form-item label="看课默认线路">
+             <el-radio-group v-model="form18.defaultLine">
+               <el-radio label="0">线路一</el-radio>
+               <el-radio label="1">线路二</el-radio>
+             </el-radio-group>
+           </el-form-item>
+           
+           <el-form-item label="奖励类型">
+             <el-radio-group v-model="form18.rewardType">
+               <el-radio label="1">红包</el-radio>
+               <el-radio label="2">积分</el-radio>
+             </el-radio-group>
+           </el-form-item>
            <div class="line"></div>
            <div style="float:right;margin-right:20px">
              <el-button type="primary" @click="submitForm18">提交</el-button>
@@ -613,14 +629,17 @@ export default {
             }
            if(key=="course.config"){
              this.configId=response.data.configId;
+             this.configKey=response.data.configKey;
              this.form18 =JSON.parse(response.data.configValue);
            }
            if(key=="redPacket.config"){
              this.configId=response.data.configId;
+             this.configKey=response.data.configKey;
              this.form19 =JSON.parse(response.data.configValue);
            }
            if(key=="store.appShow"){
              this.configId=response.data.configId;
+             this.configKey=response.data.configKey;
              this.form10 =JSON.parse(response.data.configValue);
            }
         });
@@ -700,7 +719,7 @@ export default {
       });
     },
     submitForm7(){
-      var param={configId:this.configId,configValue:JSON.stringify(this.form7)}
+      var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form7)}
       updateConfigByKey(param).then(response => {
         if (response.code === 200) {
           this.msgSuccess("修改成功");
@@ -708,7 +727,7 @@ export default {
       });
     },
     submitForm18(){
-      var param={configId:this.configId,configValue:JSON.stringify(this.form18)}
+      var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form18)}
       updateConfigByKey(param).then(response => {
         if (response.code === 200) {
           this.msgSuccess("修改成功");
@@ -716,7 +735,7 @@ export default {
       });
     },
     submitForm19(){
-      var param={configId:this.configId,configValue:JSON.stringify(this.form19)}
+      var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form19)}
       updateConfigByKey(param).then(response => {
         if (response.code === 200) {
           this.msgSuccess("修改成功");
@@ -724,7 +743,7 @@ export default {
       });
     },
     submitForm10(){
-      var param={configId:this.configId,configValue:JSON.stringify(this.form10)}
+      var param={configId:this.configId,configKey:this.configKey,configValue:JSON.stringify(this.form10)}
       updateConfigByKey(param).then(response => {
         if (response.code === 200) {
           this.msgSuccess("修改成功");