浏览代码

乐团问题修改

wolyshaw 4 年之前
父节点
当前提交
c13027ecd4

+ 5 - 1
src/views/auditList/index.vue

@@ -153,7 +153,11 @@
             <template slot-scope="scope">
               <el-button v-permission="'helpCenterContent/modify'"
                          @click="lookDetail(scope.row)"
-                         type="text">查看</el-button>
+                         type="text">
+                            <template slot-scope="scope">
+                              {{(scope.row.auditStatus === 'AUDITING' ? '审核' : '查看')}}
+                            </template>
+                         </el-button>
             </template>
           </el-table-column>
         </el-table>

+ 12 - 8
src/views/resetTeaming/modals/extra-class.vue

@@ -27,11 +27,11 @@
               :disabled="isDisabled"
             >
               <el-option
-                v-for="(item, index) in courseTypeOptions"
-                :key="index"
-                :disabled="isOptionDisabled(item.value)"
-                :label="item.label"
-                :value="item.value"
+                v-for="(item, key) in courseUnitPriceSettingsByType"
+                :key="key"
+                :disabled="isOptionDisabled(key)"
+                :label="courseType[key]"
+                :value="key"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -141,7 +141,7 @@
         </template>
       </el-table-column>
       <el-table-column
-        v-if="!isCommon"
+        v-if="clearable"
         prop="close"
         key="close"
         width="60">
@@ -166,10 +166,11 @@ import { courseType, boolOptions } from '@/constant'
 import { objectToOptions } from '@/utils'
 import numeral from 'numeral'
 export default {
-  props: ['form', 'isCommon', 'isDisabled', 'isUserType'],
+  props: ['form', 'isCommon', 'isDisabled', 'isUserType', 'courseUnitPriceSettingsByType', 'clearable'],
   data() {
     return {
-      courseTypeOptions: objectToOptions(courseType),
+      courseType,
+      courseTypeOptions: this.courseUnitPriceSettingsByType,
       boolOptionsOptions: objectToOptions(boolOptions),
     }
   },
@@ -180,6 +181,9 @@ export default {
       }
     }
   },
+  mounted() {
+    console.log(this.clearable)
+  },
   methods: {
     change(val) {
       this.$listeners.moneyChange()

+ 22 - 12
src/views/resetTeaming/modals/review.vue

@@ -55,19 +55,29 @@ export default {
         return this.$message.error("请输入审核意见");
       }
       if (val) {
-        auditPass({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
-          if (res.code == 200) {
-            this.$message.success('审核通过')
-            this.$emit('close')
-          }
-        });
+        try {
+          await this.$confirm('是否确认审核通过', '提示', {
+            type: 'warning'
+          })
+          await auditPass({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success('审核通过')
+              this.$emit('close')
+            }
+          });
+        } catch (error) {}
       } else {
-        auditRefuse({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
-          if (res.code == 200) {
-            this.$message.success('驳回成功')
-            this.$emit('close')
-          }
-        });
+        try {
+          await this.$confirm('是否确认驳回', '提示', {
+            type: 'warning'
+          })
+          await auditRefuse({ calenderId: this.detail.id, auditMemo: this.remark }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success('驳回成功')
+              this.$emit('close')
+            }
+          });
+        } catch (error) {}
       }
     },
     permission (str) {

+ 6 - 21
src/views/resetTeaming/modals/user-baseinfo.vue

@@ -16,26 +16,6 @@
         <el-radio label="2">临时加课</el-radio>
       </el-radio-group>
     </el-form-item>
-    <!-- <el-form-item
-      label="乐团模式"
-      prop="moshi"
-      v-if="isCommon"
-      :rules="[{required: true, message: '请选择乐团模式', trigger: 'change'}]"
-    >
-      <el-select
-        style="width: 100%!important;"
-        v-model="form.moshi"
-        placeholder="请选择乐团模式"
-        @change="$listeners.getCharges"
-      >
-        <el-option
-          v-for="item in typeList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id">
-        </el-option>
-      </el-select>
-    </el-form-item> -->
     <el-form-item
       label="收费标准"
       prop="musicGroupOrganizationCourseSettingId"
@@ -68,7 +48,12 @@
 export default {
   props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges', 'paymentType', 'chargeTypeName'],
   mounted() {
-    console.log(this.form)
+
+  },
+  watch: {
+    paymentType() {
+      console.log(this.paymentType)
+    }
   },
 }
 </script>

+ 33 - 11
src/views/resetTeaming/modals/user-pay-form.vue

@@ -23,11 +23,12 @@
       </el-alert>
       <extraClass :form.sync="eclass"
                   ref="eclass"
-                  :organizationCourseUnitPriceSettings="organizationCourseUnitPriceSettings"
                   @create="addExtraClass"
                   @remove="removeExtraClass"
                   :isUserType="isUserType"
+                  :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
                   @priceChange="priceChange"
+                  :clearable="true"
                   @moneyChange="syncAllMoney" />
     </template>
     <extraClass v-else-if="(!isCommon && eclass.length) || isCommon"
@@ -37,6 +38,7 @@
                 @create="addExtraClass"
                 @remove="removeExtraClass"
                 @moneyChange="syncAllMoney"
+                :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
                 :isUserType="isUserType"
                 :isDisabled="form.leixing === '1' || paymentType == '0'" />
     <template>
@@ -124,6 +126,7 @@ export default {
       nextVisible: false,
       typeList: [],
       charges: [],
+      organizationCourseUnitPriceSettingsByType: {},
     };
   },
   computed: {
@@ -146,13 +149,6 @@ export default {
       }
       return data;
     },
-    organizationCourseUnitPriceSettingsByType () {
-      const _ = {}
-      for (const item of this.organizationCourseUnitPriceSettings) {
-        _[item.courseType] = item
-      }
-      return _
-    }
   },
   watch: {
     type () {
@@ -163,8 +159,12 @@ export default {
       );
     },
     baseInfo (val) {
+      this.formatCourse()
       this.getCharges();
     },
+    organizationCourseUnitPriceSettings() {
+      this.formatCourse()
+    },
     "form.leixing" (val) {
       this.cycles = [{}];
       this.collapse = [0];
@@ -191,9 +191,22 @@ export default {
     },
   },
   mounted () {
+    if (this.rowDetail) {
+      for (const key in paymentTypeFormat) {
+        if (paymentTypeFormat.hasOwnProperty(key)) {
+          const item = paymentTypeFormat[key];
+          if (item === this.rowDetail.paymentType) {
+            console.log(key)
+            this.paymentType = key
+          }
+        }
+      }
+    }
+    this.formatCourse()
     this.init();
   },
   activated () {
+    this.formatCourse()
     this.init();
   },
   methods: {
@@ -209,8 +222,19 @@ export default {
         this.$set(this.other, "memo", this.rowDetail.memo);
       }
     },
+    formatCourse() {
+      const organId = this.baseInfo?.musicGroup?.organId
+      const chargeTypeId = this.baseInfo?.musicGroup?.chargeTypeId
+      const _ = {}
+      const list = (this.organizationCourseUnitPriceSettings || [])
+        .filter(item => organId && organId == item.organId && chargeTypeId && chargeTypeId == item.chargeTypeId)
+      for (const item of list) {
+        _[item.courseType] = item
+      }
+      this.organizationCourseUnitPriceSettingsByType = _
+      return _
+    },
     priceChange (item, index) {
-      console.log({...item})
       const _ = [...this.eclass]
       const active = this.organizationCourseUnitPriceSettingsByType[item.courseType] || {}
       const price = Math.ceil((item.courseTotalMinuties || 1) * (active.unitPrice || 1))
@@ -346,7 +370,6 @@ export default {
             this.$listeners.submited(res.data);
             // 在这里
             if (this.$route.query.type == "teamDraft") {
-              console.log('来了')
               this.$router.push({
                 query: merge(this.$route.query, { 'type': 'feeAudit' })
               });
@@ -359,7 +382,6 @@ export default {
             this.$listeners.close();
             this.$listeners.submited(res.data);
             if (this.$route.query.type == "teamDraft") {
-              console.log('来了')
               this.$router.push({
                 query: merge(this.$route.query, { 'type': 'feeAudit' })
               });