|
@@ -21,7 +21,9 @@
|
|
v-if="role.getRole == 1">{{
|
|
v-if="role.getRole == 1">{{
|
|
$t('form.alter')
|
|
$t('form.alter')
|
|
}}</a>
|
|
}}</a>
|
|
- <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="meal(record)">{{
|
|
|
|
|
|
+ <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="EditName(record)"
|
|
|
|
+ v-if="role.getRole == 1">修改资费名称</a>
|
|
|
|
+ <a class="a-link" href="javascript:;" style="margin-right: 1rem" @click="meal(record)" v-if="role.getRole == 1">{{
|
|
$t('tariffManagement.SetMeal') }}</a>
|
|
$t('tariffManagement.SetMeal') }}</a>
|
|
<!-- 删除 -->
|
|
<!-- 删除 -->
|
|
<a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
|
|
<a-popconfirm :content="$t('form.Delete')" :ok-text="$t('form.Confirm')" :cancel-text="$t('form.Cancel')"
|
|
@@ -36,7 +38,7 @@
|
|
|
|
|
|
|
|
|
|
<a-modal width="70%" :visible="planVisible" :title="$t('tariffManagement.SelectiveTrafficPacket')"
|
|
<a-modal width="70%" :visible="planVisible" :title="$t('tariffManagement.SelectiveTrafficPacket')"
|
|
- @ok="handleSubmitPlan" @cancel="handleCancel">
|
|
|
|
|
|
+ @ok="handleSubmitPlan" @cancel="handleCancelTarriName">
|
|
<!-- 搜索条件区 -->
|
|
<!-- 搜索条件区 -->
|
|
<div class="search-section">
|
|
<div class="search-section">
|
|
<a-form :model="formData" layout="inline">
|
|
<a-form :model="formData" layout="inline">
|
|
@@ -54,9 +56,19 @@
|
|
</div>
|
|
</div>
|
|
<a-table row-key="id" :data="planList" :columns="planColumns" :scroll="{ x: 'auto' }"
|
|
<a-table row-key="id" :data="planList" :columns="planColumns" :scroll="{ x: 'auto' }"
|
|
:row-selection="rowSelectionPlan" v-model:selectedKeys="selectedKeysPlan">
|
|
:row-selection="rowSelectionPlan" v-model:selectedKeys="selectedKeysPlan">
|
|
-
|
|
|
|
</a-table>
|
|
</a-table>
|
|
|
|
+ </a-modal>
|
|
|
|
+
|
|
|
|
|
|
|
|
+ <a-modal width="30%" :visible="putLabel" title="修改资费名称" @ok="handleSubmitEditName" @cancel="handleCancel">
|
|
|
|
+ <!-- 搜索条件区 -->
|
|
|
|
+ <div class="search-section">
|
|
|
|
+ <a-form :model="Form" layout="inline">
|
|
|
|
+ <a-form-item field="label" label="资费名称">
|
|
|
|
+ <a-input v-model="Form.name" placeholder="请输入资费名称" allow-clear style="width: 300px;"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
|
|
<Meal v-model:model-value="modealShow" :traffIds="ids" @submit="intData()" />
|
|
<Meal v-model:model-value="modealShow" :traffIds="ids" @submit="intData()" />
|
|
@@ -68,7 +80,7 @@
|
|
import { onMounted, ref, toRefs, getCurrentInstance } from "vue";
|
|
import { onMounted, ref, toRefs, getCurrentInstance } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
import { columns, planColumns, trafficSearchFrom } from "./config";
|
|
import { columns, planColumns, trafficSearchFrom } from "./config";
|
|
-import { deleteTariff, tariffList } from "@/api/path/tariffManagement.api"
|
|
|
|
|
|
+import { deleteTariff, tariffList ,UpdateTariffName} from "@/api/path/tariffManagement.api"
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
import { Getdictionary } from '@/mixins/index.js'
|
|
import { useSystemStore } from '@/store/modules/systemStore'
|
|
import { useSystemStore } from '@/store/modules/systemStore'
|
|
import Meal from './Management/meal.vue'
|
|
import Meal from './Management/meal.vue'
|
|
@@ -104,7 +116,12 @@ const state = ref({
|
|
onlyCurrent: false,
|
|
onlyCurrent: false,
|
|
},
|
|
},
|
|
ids: null,
|
|
ids: null,
|
|
- methodList: []
|
|
|
|
|
|
+ methodList: [],
|
|
|
|
+ putLabel: false,
|
|
|
|
+ Form: {
|
|
|
|
+ id: "",
|
|
|
|
+ name: "",
|
|
|
|
+ }
|
|
})
|
|
})
|
|
const {
|
|
const {
|
|
searchForm,
|
|
searchForm,
|
|
@@ -122,7 +139,9 @@ const {
|
|
selectedKeysPlan,
|
|
selectedKeysPlan,
|
|
rowSelectionPlan,
|
|
rowSelectionPlan,
|
|
ids,
|
|
ids,
|
|
- methodList
|
|
|
|
|
|
+ methodList,
|
|
|
|
+ putLabel,
|
|
|
|
+ Form
|
|
} = toRefs(state.value);
|
|
} = toRefs(state.value);
|
|
|
|
|
|
const addDetaile = ref(null)
|
|
const addDetaile = ref(null)
|
|
@@ -172,6 +191,28 @@ const reset = (item) => {
|
|
intData()
|
|
intData()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const handleCancelTarriName = ()=>{
|
|
|
|
+ putLabel.value = false
|
|
|
|
+ Form.value.id = ''
|
|
|
|
+ Form.value.name = ''
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const EditName = (item) => {
|
|
|
|
+ Form.value.id = item.id
|
|
|
|
+ Form.value.name = item.label
|
|
|
|
+ putLabel.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const handleSubmitEditName = async () => {
|
|
|
|
+ let res = await UpdateTariffName(Form.value)
|
|
|
|
+ if(res.code===200){
|
|
|
|
+ Message.success({
|
|
|
|
+ content: '修改成功',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ })
|
|
|
|
+ handleCancelTarriName()
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
// 删除
|
|
// 删除
|
|
const handleDel = async (id) => {
|
|
const handleDel = async (id) => {
|