kz-ui-base 1.0.154 → 1.0.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -241,9 +241,6 @@ export default {
241
241
  console.log("editDialog");
242
242
  },
243
243
  methods: {
244
- t(key) {
245
- return this.$t(key) || key
246
- },
247
244
  //当前绑定实体字段值变更事件
248
245
  onChangeEvent(args) {
249
246
  this.$emit("change", args);
@@ -175,7 +175,12 @@ export default {
175
175
  created() {
176
176
  this.$store.dispatch("LogOut").then(() => {
177
177
  this.$store.dispatch("tagsView/delAllViews");
178
+ // 清空localStorage但保留语言设置
179
+ const locale = localStorage.getItem("locale");
178
180
  localStorage.clear();
181
+ if (locale) {
182
+ localStorage.setItem("locale", locale);
183
+ }
179
184
  localforage.clear();
180
185
  removeToken();
181
186
  let enterpriseName = Cookies.get("enterpriseName");
@@ -174,7 +174,12 @@ export default {
174
174
  created() {
175
175
  this.$store.dispatch("LogOut").then(() => {
176
176
  this.$store.dispatch("tagsView/delAllViews");
177
+ // 清空localStorage但保留语言设置
178
+ const locale = localStorage.getItem("locale");
177
179
  localStorage.clear();
180
+ if (locale) {
181
+ localStorage.setItem("locale", locale);
182
+ }
178
183
  localforage.clear();
179
184
  removeToken();
180
185
  this.axios.get("/config.json").then((res) => {
@@ -77,9 +77,6 @@ export default {
77
77
  }
78
78
  },
79
79
  methods: {
80
- t(key) {
81
- return this.$t(key) || key
82
- },
83
80
  getLabelByKey(key) {
84
81
  const labelMap = {
85
82
  configName: this.t('config.config_name'),
@@ -8,7 +8,7 @@
8
8
  opMenu.permission,
9
9
  `${moduleName}:${serviceName}:${opMenu.permission}`,
10
10
  ]">
11
- {{ opMenu.text }}
11
+ {{ opMenu.text || t(opMenu.i18nKey) }}
12
12
  </el-button>
13
13
  </el-col>
14
14
  </template>
@@ -20,7 +20,7 @@
20
20
  opMenu.permission,
21
21
  `${moduleName}:${serviceName}:${opMenu.permission}`,
22
22
  ]">
23
- {{ opMenu.text }}
23
+ {{ opMenu.text || t(opMenu.i18nKey) }}
24
24
  </el-button>
25
25
  </el-col>
26
26
  </template>
@@ -69,7 +69,7 @@ export default {
69
69
  default:()=>[
70
70
  {
71
71
  visible: true,
72
- text: "添加",
72
+ i18nKey: "opMenus.add",
73
73
  icon: "el-icon-plus",
74
74
  permission: "add",
75
75
  name: "add",
@@ -79,7 +79,7 @@ export default {
79
79
  },
80
80
  {
81
81
  visible: true,
82
- text: "修改",
82
+ i18nKey: "opMenus.update",
83
83
  icon: "el-icon-edit",
84
84
  permission: "edit",
85
85
  name: "update",
@@ -89,7 +89,7 @@ export default {
89
89
  },
90
90
  {
91
91
  visible: true,
92
- text: "删除",
92
+ i18nKey: "opMenus.delete",
93
93
  icon: "el-icon-delete",
94
94
  permission: "remove",
95
95
  name: "delete",
@@ -1294,7 +1294,7 @@ import { getToken } from "@utils/auth";
1294
1294
  import _ from "lodash";
1295
1295
  import KZ_DropDownList from "@srcComponents/customForm/dropDownList.vue";
1296
1296
  import KZ_TextBox from "@srcComponents/customForm/textBox.vue";
1297
- import EditDialog from "@components/base/dialog/editDialog.vue";
1297
+ import EditDialog from "./common/src/components/base/dialog/editDialog.vue";
1298
1298
  import KZ_CheckBox from "@srcComponents/customForm/checkBox.vue";
1299
1299
  import KZ_DatePicker from "@srcComponents/customForm/datePicker.vue";
1300
1300
  import KZ_Switch from "@srcComponents/customForm/switch.vue";
@@ -1305,7 +1305,7 @@ import KZ_Radio from "@srcComponents/customForm/radio.vue";
1305
1305
  import UploadDialog from "@srcComponents/customForm/uploadDialog.vue";
1306
1306
  import PrintDialog from "@srcComponents/customForm/printDialog.vue";
1307
1307
  import KZ_Lookup from "@srcComponents/customForm/lookup.vue";
1308
- import MultiLanguageDialog from "@srcComponents/base/dialog/MultiLanguageDialog.vue";
1308
+ import MultiLanguageDialog from ".components/base/dialog/MultiLanguageDialog.vue";
1309
1309
  import { batchGetTranslation } from "@srcComponents/base/dialog/config.js";
1310
1310
  @Component({
1311
1311
  components: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.154",
3
+ "version": "1.0.156",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,46 +13,9 @@ export default class CustomerList extends ListBasePage {
13
13
  //表格是否自动加载数据
14
14
  isAutoLoad = false;
15
15
  // 列表列信息
16
- listColumns = [
17
- //{key: 0, label: "序号", visible: true},
18
- { text: "客户编号", property: "customerNo", width: 100 },
19
- { text: "客户名称", property: "customerName", width: 260 },
20
- { text: "客户简称", property: "customerAbbr", width: 200 },
21
- { text: "国家", property: "countryCode" },
22
- { text: "地区", property: "areaCode" },
23
- { text: "省份", property: "provinceCode" },
24
- { text: "城市", property: "cityCode" },
25
- { text: "电话", property: "telNo", width: 120 },
26
- { text: "传真", property: "faxNo", width: 120 },
27
- { text: "邮编", property: "postalNo" },
28
- { text: "地址", property: "address", width: 220 },
29
- { text: "纳税登记号", property: "taxRegistrationNo", width: 160 },
30
- { text: "注册资本", property: "registeredCapital", width: 100 },
31
- { text: "公司类别", property: "companyCategoryCode" },
32
- { text: "公司性质", property: "companyNatureCode" },
33
- { text: "公司规模", property: "companySizeCode" },
34
- { text: "客户行业ID", property: "customerIndustryId" },
35
- { text: "客户区域ID", property: "customerAreaId" },
36
- { text: "经营状况", property: "businessStatus" },
37
- { text: "客户等级", property: "customerGradeCode" },
38
- { text: "销售类型", property: "salesTypeCode" },
39
- { text: "纳税分类", property: "taxClassCode" },
40
- { text: "发票类型", property: "invoiceTypeCode" },
41
- { text: "税率类型", property: "taxrateTypeCode" },
42
- ];
16
+ listColumns = [];
43
17
  // 查询条件
44
- searchRules = [
45
- { text: "客户编号", op: "LI", property: "customerNo", displayType: "TextBox" },
46
- { text: "客户名称", op: "LI", property: "customerName", displayType: "TextBox",principal:true, },
47
- { text: "负责销售组织", op: "EQ", property: "salesSiteId", displayType: "DropDownList", disabled: false, setting: {
48
- url: "/fd/fd/getUserSitesByParam",
49
- //指定显示字段和取值字段
50
- displayField: "componentName",
51
- valueField: "id",
52
- parameter: { isSales: 1 },
53
- }
54
- },
55
- ];
18
+ searchRules = [];
56
19
  isMultiple = true;
57
20
  listSetting = {
58
21
  //获取列表数据的api方法名
@@ -64,18 +27,57 @@ export default class CustomerList extends ListBasePage {
64
27
  isShowIndexColumn: true, // 显示行号
65
28
  multipleChoice: false,
66
29
  };
67
- opMenus = [
68
- ];
30
+ opMenus = [];
69
31
  // 表单校验
70
- editRules = {
71
- customerNo: [
72
- { required: true, message: "客户编号不能为空", trigger: "blur" }
73
- ],
74
- customerName: [
75
- { required: true, message: "客户名称不能为空", trigger: "blur" }
76
- ]
77
- };
32
+ editRules = {};
78
33
  created(){
34
+ this.listColumns = [
35
+ //{key: 0, label: "序号", visible: true},
36
+ { text: this.t('customerModal.customerNo'), property: "customerNo", width: 100 },
37
+ { text: this.t('customerModal.customerName'), property: "customerName", width: 260 },
38
+ { text: this.t('customerModal.customerAbbr'), property: "customerAbbr", width: 200 },
39
+ { text: this.t('customerModal.countryCode'), property: "countryCode" },
40
+ { text: this.t('customerModal.areaCode'), property: "areaCode" },
41
+ { text: this.t('customerModal.provinceCode'), property: "provinceCode" },
42
+ { text: this.t('customerModal.cityCode'), property: "cityCode" },
43
+ { text: this.t('customerModal.telNo'), property: "telNo", width: 120 },
44
+ { text: this.t('customerModal.faxNo'), property: "faxNo", width: 120 },
45
+ { text: this.t('customerModal.postalNo'), property: "postalNo" },
46
+ { text: this.t('customerModal.address'), property: "address", width: 220 },
47
+ { text: this.t('customerModal.taxRegistrationNo'), property: "taxRegistrationNo", width: 160 },
48
+ { text: this.t('customerModal.registeredCapital'), property: "registeredCapital", width: 100 },
49
+ { text: this.t('customerModal.companyCategoryCode'), property: "companyCategoryCode" },
50
+ { text: this.t('customerModal.companyNatureCode'), property: "companyNatureCode" },
51
+ { text: this.t('customerModal.companySizeCode'), property: "companySizeCode" },
52
+ { text: this.t('customerModal.customerIndustryId'), property: "customerIndustryId" },
53
+ { text: this.t('customerModal.customerAreaId'), property: "customerAreaId" },
54
+ { text: this.t('customerModal.businessStatus'), property: "businessStatus" },
55
+ { text: this.t('customerModal.customerGradeCode'), property: "customerGradeCode" },
56
+ { text: this.t('customerModal.salesTypeCode'), property: "salesTypeCode" },
57
+ { text: this.t('customerModal.taxClassCode'), property: "taxClassCode" },
58
+ { text: this.t('customerModal.invoiceTypeCode'), property: "invoiceTypeCode" },
59
+ { text: this.t('customerModal.taxrateTypeCode'), property: "taxrateTypeCode" },
60
+ ];
61
+ this.searchRules = [
62
+ { text: this.t('customerModal.customerNo'), op: "LI", property: "customerNo", displayType: "TextBox" },
63
+ { text: this.t('customerModal.customerName'), op: "LI", property: "customerName", displayType: "TextBox",principal:true, },
64
+ { text: this.t('customerModal.salesSiteId'), op: "EQ", property: "salesSiteId", displayType: "DropDownList", disabled: false, setting: {
65
+ url: "/fd/fd/getUserSitesByParam",
66
+ //指定显示字段和取值字段
67
+ displayField: "componentName",
68
+ valueField: "id",
69
+ parameter: { isSales: 1 },
70
+ }
71
+ },
72
+ ];
73
+ this.editRules = {
74
+ customerNo: [
75
+ { required: true, message: this.t('customerModal.required.customerNo'), trigger: "blur" }
76
+ ],
77
+ customerName: [
78
+ { required: true, message: this.t('customerModal.required.customerName'), trigger: "blur" }
79
+ ]
80
+ };
79
81
  if(this.setting?.data?.isMultipleStatus!=undefined){
80
82
  this.isMultiple = this.setting.data.isMultipleStatus
81
83
  }