Browse Source

资费拼接上客户名称

wxy 5 months ago
parent
commit
7d49ba3de1

+ 4 - 2
src/views/flowPool/components/add.vue

@@ -106,7 +106,8 @@ const handleTariff = async () => {
     tariffIdList.value = (data.records || []).map(item => {
       return {
         ...item,
-        value: item.id
+        value: item.id,
+        label:item.label +'---'+item.userName
       }
     })
   }
@@ -144,12 +145,13 @@ const selectChange = (val)=>{
   })
 }
 
-watch(() => props.record, val => {
+watch(() => record.value, val => {
   if(props.typeCurrent==2){
     formState.value = val
   }
 }, {deep: true})
 
+
 onMounted(()=>{
   handleDictValue()
   handleTariff()

+ 0 - 1
src/views/tariffManagement/Management/add.vue

@@ -120,7 +120,6 @@ import { getSTSInfoList } from '@/api/path/system.api'
 import { updateTariff, addTariff } from "@/api/path/tariffManagement.api"
 import { Getdictionary } from '@/mixins/index.js'
 import { Message } from '@arco-design/web-vue'
-
 const props = defineProps({
     modelValue: {
         type: Boolean,

+ 21 - 12
src/views/tariffManagement/Management/meal.vue

@@ -15,11 +15,10 @@
                             <a-form-item field="PackagePrice" label="套餐价格">
                                 <a-input v-model="item.PackagePrice" placeholder="请输入" />
                             </a-form-item>
-                            <a-form-item field="SetSize" label="套餐大小">
-                                <a-input v-model="item.SetSize" placeholder="请输入" />
-                            </a-form-item>
-                            <a-form-item field="SetSize" label="币种">
-                                <a-input v-model="item.SetSize" placeholder="请输入" />
+                            <a-form-item field="Pricing" label="币种">
+                                <a-select v-model="item.pricing" :style="{ width: '320px' }" placeholder="请选择币种">
+                                    <a-option v-for="res of Pricing" :value="res.value" :label="res.label" />
+                                </a-select>
                             </a-form-item>
                         </a-form>
                     </div>
@@ -31,6 +30,7 @@
 
 <script setup>
 import { ref, onMounted, toRefs, toRef, watch } from 'vue';
+import { Getdictionary } from '@/mixins/index.js'
 const props = defineProps({
     modelValue: {
         type: Boolean,
@@ -43,29 +43,38 @@ const emit = defineEmits(['update:modelValue', 'submit'])
 const rules = {
     PackageTerm: [{ required: true, trigger: 'change', }],
     PackagePrice: [{ required: true, trigger: 'change', }],
-    SetSize: [{ required: true, trigger: 'change', }],
+    pricing: [{ required: true, trigger: 'change', }],
 }
 const state = ref({
     wanberFloter: [
-        {  PackageTerm: '', PackagePrice: '', SetSize: '' }
+        { PackageTerm: '', PackagePrice: '', pricing: '' }
     ],
-    formRef:null
+    formRef: null,
+    Pricing: []
 })
-const { wanberFloter ,formRef} = toRefs(state.value)
+const { wanberFloter, formRef, Pricing } = toRefs(state.value)
 const handleOk = () => {
     emit('update:modelValue', false)
 }
 const handleCancel = () => {
     emit('update:modelValue', false)
 }
-const addMeal = ()=>{
+const addMeal = () => {
     wanberFloter.value.push({ PackageTerm: '', PackagePrice: '', SetSize: '' })
 }
-const deletaMeal = (index)=>{
-    if(wanberFloter.value.length!==1){
+const deletaMeal = (index) => {
+    if (wanberFloter.value.length !== 1) {
         wanberFloter.value.splice(index, 1)
     }
 }
+
+const handeDict = async () => {
+    Pricing.value = await Getdictionary('currencyType')
+}
+
+onMounted(() => {
+    handeDict()
+})
 </script>
 <style scoped lang="less">
 .add {