Bladeren bron

修改字段提示语

774078984@qq.com 2 maanden geleden
bovenliggende
commit
e3707b559a

+ 7 - 7
src/views/admin/tariffManagement/SetMeal/addSetMeal.vue

@@ -5,7 +5,7 @@
         </div>
 
         <div class="addSetMeal">
-            <a-button type="primary" @click="visible = true; Edit = true;Type=true">新增套餐</a-button>
+            <a-button type="primary" @click="visible = true; Edit = true; Type = true">新增套餐</a-button>
             <a-button @click="breakFlos">返回</a-button>
         </div>
 
@@ -56,7 +56,7 @@
                                 }}</a-option>
                         </a-select>
                     </a-form-item>
-                    <a-form-item label="默认绑定资费" field="trafficId" validate-trigger="blur">
+                    <a-form-item :label="Edit ? '充值绑定资费' : '默认绑定资费'" field="trafficId" validate-trigger="blur">
                         <a-select v-model="Form.trafficId">
                             <a-option v-for="item in tariffListData" :value="item.id" :key="item.id">{{ item.label
                                 }}</a-option>
@@ -122,9 +122,9 @@ const state = ref({
     },
     formRef: null,
     Edit: true,
-    Type:true
+    Type: true
 })
-const { pagination, visible, puyType, Currency, cyciy, tariffListData, Form, formRef, billingMethodList, Edit,Type } = toRefs(state.value)
+const { pagination, visible, puyType, Currency, cyciy, tariffListData, Form, formRef, billingMethodList, Edit, Type } = toRefs(state.value)
 
 const rules = {
     label: [{ required: true, message: '套餐名称不能为空' }, {
@@ -172,9 +172,9 @@ const processData = (data) => {
             typeName: item.type == 1 ? '服务时长' : "购买流量",
             profitPrice: item.billingMethod == 1 ? '---' : item.profitPrice + item.currency,
             billingMethod: filterDict(billingMethodList.value, item.billingMethod),
-            costPrice: item.billingMethod == 1? item.flow+item.flowUnit+'/'+ item.price +item.currency  : item.costPrice + item.trafficCurrency,
+            costPrice: item.billingMethod == 1 ? item.flow + item.flowUnit + '/' + item.price + item.currency : item.costPrice + item.trafficCurrency,
             oldPrice: item.billingMethod == 1 ? '---' : item.oldPrice + item.trafficCurrency,
-            
+
         }
     })
 }
@@ -271,7 +271,7 @@ onMounted(async () => {
     Currency.value = dict[2]
     Form.value.currency = Currency.value[0]?.value
     billingMethodList.value = dict[3]
-    let res = await tariffList({ current: 1, size: 99999 ,source:props.list.source ,userId:props.list.userId})
+    let res = await tariffList({ current: 1, size: 99999, source: props.list.source, userId: props.list.userId })
     if (res.code === 200) {
         tariffListData.value = (res.data.records || []).map(item => {
             return {

+ 0 - 3
src/views/admin/tariffManagement/SetMeal/index.vue

@@ -58,9 +58,6 @@
                 }}</a-option>
             </a-select>
           </a-form-item>
-          <div class="title">
-            终端用户充值类该字段必填,非充值类该字段非必填
-          </div>
         </a-form>
       </div>
       <template #footer>