diff --git a/vue/src/views/iot/product/product-authorize.vue b/vue/src/views/iot/product/product-authorize.vue
index 6c5100ef..1f6c233d 100644
--- a/vue/src/views/iot/product/product-authorize.vue
+++ b/vue/src/views/iot/product/product-authorize.vue
@@ -18,11 +18,7 @@
-
-
-
-
- 新增
+ 新增授权码
修改
@@ -37,11 +33,17 @@
-
-
+
+
+
+
+ 已使用
+ 未使用
+
+
-
+
@@ -88,8 +90,11 @@
@@ -143,7 +148,7 @@ export default {
// 是否显示弹出层
open: false,
// 新增个数
- createNum: 0,
+ createNum: 1,
// 查询参数
queryParams: {
pageNum: 1,
@@ -218,17 +223,33 @@ export default {
},
/** 批量新增按钮操作 */
handleAdd() {
- if (this.queryParams.productId != null) {
- let _addData = {
- productId: this.queryParams.productId,
- createNum: this.createNum
+ this.$prompt('输入新增授权码数量', '提示', {
+ customClass: 'createNum',
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ inputPattern: /[0-9\-]/,
+ inputErrorMessage: '数量内容不正确',
+ inputType: 'number',
+ inputValue: this.createNum
+ }).then(({ value }) => {
+ this.createNum = value
+ if (this.queryParams.productId != null) {
+ let _addData = {
+ productId : this.queryParams.productId,
+ createNum : this.createNum
+ }
+ addProductAuthorizeByNum(_addData).then(response => {
+ this.$modal.msgSuccess("新增授权码成功");
+ this.getList();
+ this.createNum = 1;
+ });
}
- addProductAuthorizeByNum(_addData).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.getList();
- this.createNum = 1;
- });
- }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '取消新增'
+ });
+ });
},
/** 修改按钮操作 */
handleUpdate(row) {