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 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: { excelOption: {
submitBtn: false, submitBtn: false,
emptyBtn: false, emptyBtn: true,
column: [ column: [
{ {
label: "通道名称", label: "通道名称",
@ -889,7 +889,26 @@ export default {
} }
}); });
} else { } 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 { } else {
} }

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

@ -38,6 +38,71 @@
</el-button> </el-button>
</template> </template>
</avue-crud> </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> </basic-container>
</template> </template>
@ -48,6 +113,8 @@ import {
getDetail, getDetail,
remove, remove,
update, update,
tenant,
user,
} from "@/api/communication/outbound"; } from "@/api/communication/outbound";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getToken } from "@/util/auth"; import { getToken } from "@/util/auth";
@ -56,8 +123,35 @@ export default {
return { return {
form: {}, form: {},
query: {}, query: {},
iform: {
type: null, ///
tenantId: null, //
userId: null, //
},
selectionList: [], selectionList: [],
tenantlist: [], //
userlist: [], //
typelist: [
{
label: "租户",
id: 1,
},
{
label: "客户",
id: 2,
},
],
importBox: false, //
loading: true, loading: true,
importrules: {
type: [
{ required: true, message: "请选择租户/客户", trigger: "change" },
],
tenantId: [
{ required: true, message: "请选择租户", trigger: "change" },
],
userId: [{ required: true, message: "请选择客户", trigger: "change" }],
},
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -78,6 +172,13 @@ export default {
dialogClickModal: false, dialogClickModal: false,
dialogWidth: "60%", dialogWidth: "60%",
column: [ column: [
{
label: "id",
prop: "id",
search: true,
addDisplay: false,
editDisplay: false,
},
{ {
label: "租户名称", label: "租户名称",
prop: "tenantId", prop: "tenantId",
@ -451,7 +552,8 @@ export default {
}, },
}, },
created() { created() {
console.log(this.baseUrl, "baseUrl"); this.tenantlists(); //
this.userlists(); //
}, },
computed: { computed: {
...mapGetters(["permission"]), ...mapGetters(["permission"]),
@ -583,15 +685,65 @@ export default {
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}, },
// //
handleExport() { handleExport() {
window.open( this.importBox = true;
`${this.baseUrl}/${ },
this.apis //
}iot-sim/simcarddeliver/export-simCardDeliver?${ onSubmit() {
this.website.tokenHeader this.$refs.iform.validate((valid) => {
}=${getToken()}` 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 = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;

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

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

Loading…
Cancel
Save