Browse Source

feat:元套餐管理里加一个通道(查询,新增,修改)

fix:卡出库,详情、列表显示id,根据id查询
fix:卡出库导出的时候,弹框:根据租户或者客户导出。
confidence 0.9.1
杜贤金 3 years ago
parent
commit
ec2d130c9e
  1. 17
      src/api/communication/outbound.js
  2. 23
      src/views/communicationmanage/basiccard/basiccard.vue
  3. 170
      src/views/communicationmanage/outbound/outbound.vue
  4. 48
      src/views/package/basicpackage/index.vue

17
src/api/communication/outbound.js

@ -46,3 +46,20 @@ export const update = (row) => {
data: row
})
}
//租户下拉
export const tenant = () => {
return request({
url: '/api/iot-system/tenant/fillData',
method: 'get',
})
}
//用户下拉
export const user = () => {
return request({
url: '/api/iot-system/user/fillData',
method: 'get',
})
}

23
src/views/communicationmanage/basiccard/basiccard.vue

@ -232,7 +232,7 @@ export default {
},
excelOption: {
submitBtn: false,
emptyBtn: false,
emptyBtn: true,
column: [
{
label: "通道名称",
@ -889,7 +889,26 @@ export default {
}
});
} else {
//
simCallback(this.distribution).then((res) => {
if (res.data.data == "") {
this.$message.success("操作成功");
this.$refs.distribution.resetFields();
this.dialogVisible = false;
} else {
const h = this.$createElement;
this.$notify.error({
title: "出库失败号码",
message: h(
"i",
{ style: "color: teal; word-break: break-all;" },
res.data.data
),
duration: 0,
});
this.$refs.distribution.resetFields();
this.dialogVisible = false;
}
});
}
} else {
}

170
src/views/communicationmanage/outbound/outbound.vue

@ -38,6 +38,71 @@
</el-button>
</template>
</avue-crud>
<el-dialog
title="导出"
append-to-body
:visible.sync="importBox"
width="30%"
:before-close="handleimportCloses"
>
<el-form
ref="iform"
:model="iform"
:rules="importrules"
label-width="100px"
>
<el-form-item label="租户/客户" prop="type">
<el-select
v-model="iform.type"
placeholder="请选择租户/客户"
size="mini"
style="width: 90%"
@change="handleChange"
>
<el-option
v-for="(item, index) in typelist"
:label="item.label"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="租户" prop="tenantId" v-if="iform.type == 1">
<el-select
v-model="iform.tenantId"
placeholder="请选择租户"
size="mini"
style="width: 90%"
>
<el-option
v-for="(item, index) in tenantlist"
:label="item.tenantName"
:value="item.tenantId"
:key="item.tenantId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="客户" prop="userId" v-if="iform.type == 2">
<el-select
v-model="iform.userId"
placeholder="请选择客户"
size="mini"
style="width: 90%"
>
<el-option
v-for="(item, index) in userlist"
:label="item.account"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="onSubmit" size="mini">导出</el-button>
<el-button @click="handleimportCloses" size="mini">取消</el-button>
</span>
</el-dialog>
</basic-container>
</template>
@ -48,6 +113,8 @@ import {
getDetail,
remove,
update,
tenant,
user,
} from "@/api/communication/outbound";
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
@ -56,8 +123,35 @@ export default {
return {
form: {},
query: {},
iform: {
type: null, ///
tenantId: null, //
userId: null, //
},
selectionList: [],
tenantlist: [], //
userlist: [], //
typelist: [
{
label: "租户",
id: 1,
},
{
label: "客户",
id: 2,
},
],
importBox: false, //
loading: true,
importrules: {
type: [
{ required: true, message: "请选择租户/客户", trigger: "change" },
],
tenantId: [
{ required: true, message: "请选择租户", trigger: "change" },
],
userId: [{ required: true, message: "请选择客户", trigger: "change" }],
},
page: {
pageSize: 10,
currentPage: 1,
@ -78,6 +172,13 @@ export default {
dialogClickModal: false,
dialogWidth: "60%",
column: [
{
label: "id",
prop: "id",
search: true,
addDisplay: false,
editDisplay: false,
},
{
label: "租户名称",
prop: "tenantId",
@ -451,7 +552,8 @@ export default {
},
},
created() {
console.log(this.baseUrl, "baseUrl");
this.tenantlists(); //
this.userlists(); //
},
computed: {
...mapGetters(["permission"]),
@ -583,15 +685,65 @@ export default {
refreshChange() {
this.onLoad(this.page, this.query);
},
//
//
handleExport() {
window.open(
`${this.baseUrl}/${
this.apis
}iot-sim/simcarddeliver/export-simCardDeliver?${
this.website.tokenHeader
}=${getToken()}`
);
this.importBox = true;
},
//
onSubmit() {
this.$refs.iform.validate((valid) => {
if (valid) {
console.log(
`${this.baseUrl}/${
this.apis
}iot-sim/simcarddeliver/export-simCardDeliver?${
this.website.tokenHeader
}=${getToken()}&tenantId=${this.iform.tenantId}&userId=${
this.iform.userId
}`
);
window.open(
`${this.baseUrl}/${
this.apis
}iot-sim/simcarddeliver/export-simCardDeliver?${
this.website.tokenHeader
}=${getToken()}&tenantId=${this.iform.tenantId}&userId=${
this.iform.userId
}`
);
}
});
},
//
handleimportCloses() {
this.importBox = false;
this.$refs.iform.resetFields();
},
//
tenantlists() {
tenant().then((res) => {
if (res.data.code == 200) {
this.tenantlist = res.data.data;
}
});
},
//
userlists() {
user().then((res) => {
if (res.data.code == 200) {
this.userlist = res.data.data;
}
});
},
//
handleChange(e) {
if (e == 1) {
this.iform.type = 1;
this.iform.userId = null;
} else {
this.iform.type = 2;
this.iform.tenantId = null;
}
},
onLoad(page, params = {}) {
this.loading = true;

48
src/views/package/basicpackage/index.vue

@ -19,15 +19,6 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
<!-- <template slot="menuLeft">
<el-button
size="small"
type="primary"
icon="el-icon-download"
@click="handleExport"
>导出
</el-button>
</template> -->
</avue-crud>
</basic-container>
</template>
@ -72,24 +63,27 @@ export default {
dialogClickModal: false,
dialogWidth: "60%",
column: [
// {
// label: "",
// prop: "tenantId",
// type: "select",
// dicUrl: "/api/iot-system/tenant/fillData",
// props: {
// label: "tenantName",
// value: "tenantId",
// },
// dataType: "String",
// span: 12,
// labelWidth: 130,
// width: 140,
// search: true,
// rules: [
// { required: true, message: "", trigger: "change" },
// ],
// },
{
label: "通道名称",
prop: "channelId",
type: "select",
dataType: "String",
span: 12,
dicUrl: "/api/iot-sim/channel/fillData",
search: true,
labelWidth: 130,
props: {
label: "name",
value: "id",
},
rules: [
{
required: true,
message: "请选择通道名称",
trigger: "change",
},
],
},
{
label: "套餐组名称",
prop: "dataPlanGroupId",

Loading…
Cancel
Save