cloud-web-corejs 1.0.54-dev.636 → 1.0.54-dev.638
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.
- package/package.json +1 -1
- package/src/components/errorMsg/index.js +1 -44
- package/src/components/errorMsg/mixins.js +1 -96
- package/src/components/excelExport/mixins.js +1 -969
- package/src/components/table/config.js +1 -74
- package/src/components/table/index.js +1 -1180
- package/src/components/table/tableFormMixin.js +1 -285
- package/src/components/table/vxeFilter/index.js +1 -153
- package/src/components/table/vxeFilter/mixin.js +1 -301
- package/src/lang/locale/en/login.js +26 -19
- package/src/lang/locale/zh/login.js +25 -19
- package/src/router/index.js +4 -7
- package/src/router/modules/customer.js +13 -4
- package/src/utils/vab.js +74 -59
- package/src/views/user/user/edit.vue +61 -8
- package/src/views/user/wf/wf_manage/list2.vue +802 -0
- package/src/components/table/index copy.js +0 -1183
package/src/utils/vab.js
CHANGED
|
@@ -7,11 +7,11 @@ function reqImg(a) {
|
|
|
7
7
|
|
|
8
8
|
import request from "./request";
|
|
9
9
|
import * as lodash from "lodash";
|
|
10
|
-
import {Loading, Message, MessageBox, Notification, Form} from "element-ui";
|
|
10
|
+
import { Loading, Message, MessageBox, Notification, Form } from "element-ui";
|
|
11
11
|
import store from "../store";
|
|
12
12
|
import ElImageViewer from "../components/VabUpload/image-viewer";
|
|
13
13
|
|
|
14
|
-
import {getToken} from "./auth";
|
|
14
|
+
import { getToken } from "./auth";
|
|
15
15
|
import XEUtils from "xe-utils";
|
|
16
16
|
|
|
17
17
|
import prefixConfig from "@/prefixConfig.js";
|
|
@@ -61,10 +61,14 @@ install = (Vue, opts = {}) => {
|
|
|
61
61
|
if (opts.addCreateInfo === null || opts.addCreateInfo === undefined) {
|
|
62
62
|
option.addCreateInfo = defaultOption.addCreateInfo;
|
|
63
63
|
}
|
|
64
|
-
if (
|
|
64
|
+
if (
|
|
65
|
+
opts.queryCreateInfo === null ||
|
|
66
|
+
opts.queryCreateInfo === undefined ||
|
|
67
|
+
opts.queryCreateInfo === true
|
|
68
|
+
) {
|
|
65
69
|
option.queryCreateInfo = defaultOption.queryCreateInfo;
|
|
66
70
|
}
|
|
67
|
-
if(opts.queryCreateInfo === false){
|
|
71
|
+
if (opts.queryCreateInfo === false) {
|
|
68
72
|
option.queryCreateInfo = "0";
|
|
69
73
|
}
|
|
70
74
|
return this.$http(option);
|
|
@@ -142,7 +146,7 @@ install = (Vue, opts = {}) => {
|
|
|
142
146
|
return loading;
|
|
143
147
|
};
|
|
144
148
|
/* 全局Message */
|
|
145
|
-
Vue.prototype.$baseMessage = ({message, type, onClose}) => {
|
|
149
|
+
Vue.prototype.$baseMessage = ({ message, type, onClose }) => {
|
|
146
150
|
imFun.Message({
|
|
147
151
|
offset: 60,
|
|
148
152
|
showClose: true,
|
|
@@ -369,7 +373,7 @@ install = (Vue, opts = {}) => {
|
|
|
369
373
|
gif: true,
|
|
370
374
|
bmp: true,
|
|
371
375
|
mpg: true,
|
|
372
|
-
webp: true
|
|
376
|
+
webp: true,
|
|
373
377
|
};
|
|
374
378
|
|
|
375
379
|
let type = fileTypeMap[suffix];
|
|
@@ -503,12 +507,12 @@ install = (Vue, opts = {}) => {
|
|
|
503
507
|
return true;
|
|
504
508
|
},
|
|
505
509
|
isPictureFile: function (fileName) {
|
|
506
|
-
if(!fileName)return false;
|
|
510
|
+
if (!fileName) return false;
|
|
507
511
|
let typeStr = Object.prototype.toString.call(fileName);
|
|
508
|
-
let suffix = null
|
|
512
|
+
let suffix = null;
|
|
509
513
|
if (typeStr === "[object Object]") {
|
|
510
514
|
suffix = this.getFileSuffix(fileName.name);
|
|
511
|
-
}else{
|
|
515
|
+
} else {
|
|
512
516
|
suffix = this.getFileSuffix(fileName);
|
|
513
517
|
}
|
|
514
518
|
return this.isPicture(suffix);
|
|
@@ -634,17 +638,17 @@ install = (Vue, opts = {}) => {
|
|
|
634
638
|
return iconType;
|
|
635
639
|
},
|
|
636
640
|
getFileExtension(urlString) {
|
|
637
|
-
if(!urlString)return null
|
|
641
|
+
if (!urlString) return null;
|
|
638
642
|
const url = new URL(urlString);
|
|
639
643
|
// 获取路径部分,例如 "/images/photo.jpg"
|
|
640
644
|
const pathname = url.pathname;
|
|
641
645
|
|
|
642
646
|
// 使用 lastIndexOf 找到最后一个点的位置
|
|
643
|
-
const lastDotIndex = pathname.lastIndexOf(
|
|
647
|
+
const lastDotIndex = pathname.lastIndexOf(".");
|
|
644
648
|
|
|
645
649
|
// 如果没有点,或者点在最后一位(即没有后缀),返回空字符串
|
|
646
650
|
if (lastDotIndex === -1 || lastDotIndex === pathname.length - 1) {
|
|
647
|
-
return
|
|
651
|
+
return "";
|
|
648
652
|
}
|
|
649
653
|
|
|
650
654
|
// 截取点之后的部分
|
|
@@ -670,7 +674,7 @@ install = (Vue, opts = {}) => {
|
|
|
670
674
|
}
|
|
671
675
|
if (name) {
|
|
672
676
|
let fileSuffix = this.getFileExtension(filePath);
|
|
673
|
-
if(fileSuffix && !name.endsWith("."+fileSuffix)){
|
|
677
|
+
if (fileSuffix && !name.endsWith("." + fileSuffix)) {
|
|
674
678
|
name = name + "." + fileSuffix;
|
|
675
679
|
}
|
|
676
680
|
|
|
@@ -835,7 +839,12 @@ install = (Vue, opts = {}) => {
|
|
|
835
839
|
let parentTarget = target.$attrs["parent-target"] || target.$parent;
|
|
836
840
|
let originTarget = parentTarget.$refs._viewDialog ? parentTarget : target;
|
|
837
841
|
let updateParam =
|
|
838
|
-
param !== null &&
|
|
842
|
+
param !== null &&
|
|
843
|
+
param !== undefined &&
|
|
844
|
+
param.updateParam !== null &&
|
|
845
|
+
param.updateParam !== undefined
|
|
846
|
+
? param.updateParam
|
|
847
|
+
: {};
|
|
839
848
|
for (let key in updateParam) {
|
|
840
849
|
originTarget.$emit("update:" + key, updateParam[key]);
|
|
841
850
|
}
|
|
@@ -932,7 +941,6 @@ install = (Vue, opts = {}) => {
|
|
|
932
941
|
Vue.prototype.$baseMul = baseMul;
|
|
933
942
|
Vue.prototype.$baseDiv = baseDiv;
|
|
934
943
|
|
|
935
|
-
|
|
936
944
|
/**
|
|
937
945
|
* 格式化数字为带千分位的字符串。
|
|
938
946
|
*
|
|
@@ -957,25 +965,25 @@ install = (Vue, opts = {}) => {
|
|
|
957
965
|
* formatNumber(1000, { fixed: true, digits: 0 }); // "1,000"
|
|
958
966
|
*/
|
|
959
967
|
function formatNumber(value, options = {}) {
|
|
960
|
-
if (value === null || value === undefined || value ===
|
|
961
|
-
return
|
|
968
|
+
if (value === null || value === undefined || value === "") {
|
|
969
|
+
return "";
|
|
962
970
|
}
|
|
963
971
|
|
|
964
972
|
const {
|
|
965
973
|
fixed = false,
|
|
966
974
|
digits = 2,
|
|
967
|
-
thousandsSeparator =
|
|
968
|
-
decimalSeparator =
|
|
975
|
+
thousandsSeparator = ",",
|
|
976
|
+
decimalSeparator = ".",
|
|
969
977
|
} = options;
|
|
970
978
|
|
|
971
|
-
const isNumber = typeof value ===
|
|
979
|
+
const isNumber = typeof value === "number";
|
|
972
980
|
let str = String(value).trim();
|
|
973
981
|
|
|
974
982
|
// Normalize ".123" → "0.123"
|
|
975
983
|
if (str.charCodeAt(0) === 46) {
|
|
976
|
-
str =
|
|
977
|
-
} else if (str.startsWith(
|
|
978
|
-
str =
|
|
984
|
+
str = "0" + str;
|
|
985
|
+
} else if (str.startsWith("-.")) {
|
|
986
|
+
str = "-0." + str.slice(2);
|
|
979
987
|
}
|
|
980
988
|
|
|
981
989
|
let intPart, decPart, isNegative;
|
|
@@ -986,9 +994,9 @@ install = (Vue, opts = {}) => {
|
|
|
986
994
|
if (num !== num) return str;
|
|
987
995
|
|
|
988
996
|
const fixedStr = num.toFixed(digits);
|
|
989
|
-
const dotIndex = fixedStr.indexOf(
|
|
997
|
+
const dotIndex = fixedStr.indexOf(".");
|
|
990
998
|
intPart = dotIndex === -1 ? fixedStr : fixedStr.slice(0, dotIndex);
|
|
991
|
-
decPart = dotIndex === -1 ?
|
|
999
|
+
decPart = dotIndex === -1 ? "" : fixedStr.slice(dotIndex + 1);
|
|
992
1000
|
isNegative = intPart.charCodeAt(0) === 45;
|
|
993
1001
|
if (isNegative) intPart = intPart.slice(1);
|
|
994
1002
|
} else {
|
|
@@ -997,18 +1005,18 @@ install = (Vue, opts = {}) => {
|
|
|
997
1005
|
isNegative = s.charCodeAt(0) === 45;
|
|
998
1006
|
if (isNegative) s = s.slice(1);
|
|
999
1007
|
|
|
1000
|
-
const dotIndex = s.indexOf(
|
|
1008
|
+
const dotIndex = s.indexOf(".");
|
|
1001
1009
|
intPart = dotIndex === -1 ? s : s.slice(0, dotIndex);
|
|
1002
|
-
decPart = dotIndex === -1 ?
|
|
1010
|
+
decPart = dotIndex === -1 ? "" : s.slice(dotIndex + 1);
|
|
1003
1011
|
|
|
1004
|
-
if (intPart ===
|
|
1012
|
+
if (intPart === "") intPart = "0";
|
|
1005
1013
|
if (!/^\d+$/.test(intPart)) return str;
|
|
1006
1014
|
}
|
|
1007
1015
|
|
|
1008
1016
|
// 千分位(始终应用)
|
|
1009
1017
|
let fmtInt = intPart;
|
|
1010
|
-
if (intPart !==
|
|
1011
|
-
let out =
|
|
1018
|
+
if (intPart !== "0") {
|
|
1019
|
+
let out = "";
|
|
1012
1020
|
for (let i = intPart.length - 1, c = 0; i >= 0; i--, c++) {
|
|
1013
1021
|
if (c > 0 && c % 3 === 0) out = thousandsSeparator + out;
|
|
1014
1022
|
out = intPart[i] + out;
|
|
@@ -1017,11 +1025,11 @@ install = (Vue, opts = {}) => {
|
|
|
1017
1025
|
}
|
|
1018
1026
|
|
|
1019
1027
|
// 拼接
|
|
1020
|
-
let result = isNegative ?
|
|
1028
|
+
let result = isNegative ? "-" + fmtInt : fmtInt;
|
|
1021
1029
|
if (decPart) {
|
|
1022
1030
|
result += decimalSeparator + decPart;
|
|
1023
1031
|
} else if (fixed && digits > 0) {
|
|
1024
|
-
result += decimalSeparator +
|
|
1032
|
+
result += decimalSeparator + "0".repeat(digits);
|
|
1025
1033
|
}
|
|
1026
1034
|
|
|
1027
1035
|
return result;
|
|
@@ -1037,18 +1045,23 @@ install = (Vue, opts = {}) => {
|
|
|
1037
1045
|
crypto.getRandomValues(buf);
|
|
1038
1046
|
buf[6] = (buf[6] & 0x0f) | 0x40; // version 4
|
|
1039
1047
|
buf[8] = (buf[8] & 0x3f) | 0x80; // variant RFC4122
|
|
1040
|
-
const hex = Array.from(buf, b => b.toString(16).padStart(2,
|
|
1041
|
-
|
|
1048
|
+
const hex = Array.from(buf, (b) => b.toString(16).padStart(2, "0")).join(
|
|
1049
|
+
""
|
|
1050
|
+
);
|
|
1051
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(
|
|
1052
|
+
12,
|
|
1053
|
+
16
|
|
1054
|
+
)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
1042
1055
|
}
|
|
1043
1056
|
Vue.prototype.$generateUUID = generateUUID;
|
|
1044
1057
|
|
|
1045
1058
|
//数字精确位数
|
|
1046
1059
|
Vue.prototype.$currency = function (value, priceScale, priceRoundType) {
|
|
1047
|
-
if (value !== null
|
|
1048
|
-
if (priceScale === null
|
|
1060
|
+
if (value !== null && value !== undefined) {
|
|
1061
|
+
if (priceScale === null || priceScale === undefined) {
|
|
1049
1062
|
priceScale = 2;
|
|
1050
1063
|
}
|
|
1051
|
-
if (priceRoundType === null
|
|
1064
|
+
if (priceRoundType === null || priceRoundType === undefined) {
|
|
1052
1065
|
priceRoundType = "roundHalfUp";
|
|
1053
1066
|
}
|
|
1054
1067
|
let price;
|
|
@@ -1087,24 +1100,24 @@ install = (Vue, opts = {}) => {
|
|
|
1087
1100
|
success: (res) => {
|
|
1088
1101
|
let dicts = res.objx || [];
|
|
1089
1102
|
let dictMap = {};
|
|
1090
|
-
for(let item of dicts){
|
|
1103
|
+
for (let item of dicts) {
|
|
1091
1104
|
dictMap[item.sn] = item.value;
|
|
1092
1105
|
}
|
|
1093
1106
|
/* dicts.forEach((item) => {
|
|
1094
1107
|
dictMap[item.sn] = item.value;
|
|
1095
1108
|
}); */
|
|
1096
1109
|
option.success &&
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1110
|
+
option.success({
|
|
1111
|
+
dicts,
|
|
1112
|
+
dictMap,
|
|
1113
|
+
});
|
|
1101
1114
|
},
|
|
1102
1115
|
});
|
|
1103
1116
|
};
|
|
1104
1117
|
|
|
1105
1118
|
imFun.Form.methods.$baseValidate = function (callback, opt) {
|
|
1106
1119
|
let that = this;
|
|
1107
|
-
that.validate((valid, obj,c,d) => {
|
|
1120
|
+
that.validate((valid, obj, c, d) => {
|
|
1108
1121
|
if (!valid && (!opt || opt.errorTip !== false)) {
|
|
1109
1122
|
this.$message({
|
|
1110
1123
|
message: this.$t2("必填项不能为空", "system.message.required"),
|
|
@@ -1120,8 +1133,8 @@ install = (Vue, opts = {}) => {
|
|
|
1120
1133
|
function scrollToFirstError(formTarget) {
|
|
1121
1134
|
// 获取第一个验证失败的字段
|
|
1122
1135
|
// let formTarget = this.$refs['renderForm'];
|
|
1123
|
-
const firstErrorField = Object.keys(formTarget.fields).find(key => {
|
|
1124
|
-
return formTarget.fields[key].validateState ===
|
|
1136
|
+
const firstErrorField = Object.keys(formTarget.fields).find((key) => {
|
|
1137
|
+
return formTarget.fields[key].validateState === "error";
|
|
1125
1138
|
});
|
|
1126
1139
|
|
|
1127
1140
|
if (firstErrorField) {
|
|
@@ -1131,19 +1144,18 @@ install = (Vue, opts = {}) => {
|
|
|
1131
1144
|
if (dom) {
|
|
1132
1145
|
// 滚动到该字段位置
|
|
1133
1146
|
dom.scrollIntoView({
|
|
1134
|
-
behavior:
|
|
1135
|
-
block:
|
|
1147
|
+
behavior: "smooth",
|
|
1148
|
+
block: "center",
|
|
1136
1149
|
});
|
|
1137
1150
|
|
|
1138
1151
|
// 添加高亮效果
|
|
1139
|
-
dom.classList.add(
|
|
1152
|
+
dom.classList.add("highlight");
|
|
1140
1153
|
|
|
1141
1154
|
// 3秒后移除高亮效果
|
|
1142
1155
|
setTimeout(() => {
|
|
1143
|
-
dom.classList.remove(
|
|
1156
|
+
dom.classList.remove("highlight");
|
|
1144
1157
|
}, 3000);
|
|
1145
1158
|
}
|
|
1146
|
-
|
|
1147
1159
|
}
|
|
1148
1160
|
}
|
|
1149
1161
|
|
|
@@ -1184,7 +1196,7 @@ install = (Vue, opts = {}) => {
|
|
|
1184
1196
|
});
|
|
1185
1197
|
};
|
|
1186
1198
|
getDownloadDomian((domain) => {
|
|
1187
|
-
if(fileName){
|
|
1199
|
+
if (fileName) {
|
|
1188
1200
|
fileWhole.fileName = fileName;
|
|
1189
1201
|
}
|
|
1190
1202
|
that.$http({
|
|
@@ -1223,13 +1235,16 @@ install = (Vue, opts = {}) => {
|
|
|
1223
1235
|
let lang = that.$i18n.locale;
|
|
1224
1236
|
const i18n = that.$i18n;
|
|
1225
1237
|
if (lang === "zh") {
|
|
1226
|
-
let val = i18n._t(path, lang, {zh: {[path]: path}}, null, values);
|
|
1238
|
+
let val = i18n._t(path, lang, { zh: { [path]: path } }, null, values);
|
|
1227
1239
|
return val;
|
|
1228
1240
|
} else {
|
|
1229
|
-
if(!i18n.te(path)){
|
|
1230
|
-
return i18n._t(path, lang, {zh: {[path]: path}}, null, values);
|
|
1231
|
-
}else{
|
|
1232
|
-
return
|
|
1241
|
+
if (!i18n.te(path)) {
|
|
1242
|
+
return i18n._t(path, lang, { zh: { [path]: path } }, null, values);
|
|
1243
|
+
} else {
|
|
1244
|
+
return (
|
|
1245
|
+
i18n.t(path, values) ||
|
|
1246
|
+
i18n._t(path, lang, { zh: { [path]: path } }, null, values)
|
|
1247
|
+
);
|
|
1233
1248
|
}
|
|
1234
1249
|
}
|
|
1235
1250
|
};
|
|
@@ -1250,9 +1265,9 @@ install = (Vue, opts = {}) => {
|
|
|
1250
1265
|
};
|
|
1251
1266
|
|
|
1252
1267
|
Vue.prototype.$utcToLocal = function (utcTime) {
|
|
1253
|
-
if(!utcTime)return utcTime;
|
|
1254
|
-
let offsetHours = this.$store.getters.utcTransformOffset
|
|
1255
|
-
if(!offsetHours || offsetHours === 0)return utcTime;
|
|
1268
|
+
if (!utcTime) return utcTime;
|
|
1269
|
+
let offsetHours = this.$store.getters.utcTransformOffset; // 时区偏移量,单位:小时
|
|
1270
|
+
if (!offsetHours || offsetHours === 0) return utcTime;
|
|
1256
1271
|
let localTime = moment(utcTime).add(offsetHours, "hours");
|
|
1257
1272
|
return localTime.format("YYYY-MM-DD HH:mm:ss");
|
|
1258
1273
|
};
|
|
@@ -347,6 +347,47 @@
|
|
|
347
347
|
</el-form-item>
|
|
348
348
|
</td>
|
|
349
349
|
</tr>
|
|
350
|
+
<tr>
|
|
351
|
+
<th>{{ $t1("坐席ID") }}</th>
|
|
352
|
+
<td>
|
|
353
|
+
<el-input
|
|
354
|
+
size="small"
|
|
355
|
+
v-model="user.agentId"
|
|
356
|
+
maxlength="200"
|
|
357
|
+
clearable
|
|
358
|
+
/>
|
|
359
|
+
</td>
|
|
360
|
+
<th>{{ $t1("技能组ID") }}</th>
|
|
361
|
+
<td>
|
|
362
|
+
<el-input
|
|
363
|
+
size="small"
|
|
364
|
+
v-model="user.groupId"
|
|
365
|
+
maxlength="200"
|
|
366
|
+
clearable
|
|
367
|
+
/>
|
|
368
|
+
</td>
|
|
369
|
+
<th>{{ $t1("手机/sip号") }}</th>
|
|
370
|
+
<td>
|
|
371
|
+
<el-input
|
|
372
|
+
size="small"
|
|
373
|
+
v-model="user.voipAccount"
|
|
374
|
+
maxlength="200"
|
|
375
|
+
clearable
|
|
376
|
+
/>
|
|
377
|
+
</td>
|
|
378
|
+
<th>{{ $t1("登录方式") }}</th>
|
|
379
|
+
<td>
|
|
380
|
+
<el-select
|
|
381
|
+
size="small"
|
|
382
|
+
v-model="user.callWay"
|
|
383
|
+
maxlength="200"
|
|
384
|
+
clearable
|
|
385
|
+
>
|
|
386
|
+
<el-option label="sip话机" value="2"></el-option>
|
|
387
|
+
<el-option label="手机" value="3"></el-option>
|
|
388
|
+
</el-select>
|
|
389
|
+
</td>
|
|
390
|
+
</tr>
|
|
350
391
|
<tr>
|
|
351
392
|
<th>{{ $t1("头像") }}</th>
|
|
352
393
|
<td colspan="7">
|
|
@@ -464,7 +505,9 @@
|
|
|
464
505
|
<i
|
|
465
506
|
slot="suffix"
|
|
466
507
|
class="el-input__icon el-icon-search"
|
|
467
|
-
@click="
|
|
508
|
+
@click="
|
|
509
|
+
openSelectPositionDialog(row, rowIndex, $table)
|
|
510
|
+
"
|
|
468
511
|
></i>
|
|
469
512
|
</el-input>
|
|
470
513
|
<template v-else>
|
|
@@ -570,7 +613,8 @@ export default {
|
|
|
570
613
|
var validatePass2 = (rule, value, callback) => {
|
|
571
614
|
const isPassRequired = !this.dataId;
|
|
572
615
|
const rePassword = value != undefined ? value : "";
|
|
573
|
-
const password =
|
|
616
|
+
const password =
|
|
617
|
+
this.user.password != undefined ? this.user.password : "";
|
|
574
618
|
|
|
575
619
|
if (isPassRequired && rePassword == "") {
|
|
576
620
|
callback(new Error(this.$t1("确认密码不能为空")));
|
|
@@ -605,8 +649,12 @@ export default {
|
|
|
605
649
|
showSaleOrgDialog: false,
|
|
606
650
|
showPositionDialog: false,
|
|
607
651
|
saleOrgPositionIndex: 0,
|
|
608
|
-
passRules: [
|
|
609
|
-
|
|
652
|
+
passRules: [
|
|
653
|
+
{ validator: validatePass, trigger: "blur", required: false },
|
|
654
|
+
],
|
|
655
|
+
pass2Rules: [
|
|
656
|
+
{ validator: validatePass2, trigger: "blur", required: false },
|
|
657
|
+
],
|
|
610
658
|
activeName: "first",
|
|
611
659
|
userCustomerListDTO: {
|
|
612
660
|
userCustomerDTOs: [],
|
|
@@ -733,7 +781,8 @@ export default {
|
|
|
733
781
|
this.$refs.editForm.$baseValidate((valid) => {
|
|
734
782
|
if (valid) {
|
|
735
783
|
this.$baseConfirm(this.$t1("您确定要保存吗?")).then(() => {
|
|
736
|
-
var url =
|
|
784
|
+
var url =
|
|
785
|
+
USER_PREFIX + (this.isEdit ? "/user/update" : "/user/save");
|
|
737
786
|
let formData = this.getReqFormData();
|
|
738
787
|
this.$http({
|
|
739
788
|
url: url,
|
|
@@ -1169,7 +1218,8 @@ export default {
|
|
|
1169
1218
|
oItems.push(map[item.positionId]);
|
|
1170
1219
|
}
|
|
1171
1220
|
});
|
|
1172
|
-
tableData[saleOrgPositionIndex].userSaleOrgPositionDTOs =
|
|
1221
|
+
tableData[saleOrgPositionIndex].userSaleOrgPositionDTOs =
|
|
1222
|
+
oItems.concat(items);
|
|
1173
1223
|
} else {
|
|
1174
1224
|
tableData[saleOrgPositionIndex].userSaleOrgPositionDTOs = [];
|
|
1175
1225
|
}
|
|
@@ -1248,7 +1298,9 @@ export default {
|
|
|
1248
1298
|
success: (res) => {
|
|
1249
1299
|
let roleList = res.objx || [];
|
|
1250
1300
|
let distributorCode = this.outUserCodes[0];
|
|
1251
|
-
this.distributorRole = roleList.find(
|
|
1301
|
+
this.distributorRole = roleList.find(
|
|
1302
|
+
(item) => item.code == distributorCode
|
|
1303
|
+
);
|
|
1252
1304
|
},
|
|
1253
1305
|
});
|
|
1254
1306
|
}
|
|
@@ -1260,7 +1312,8 @@ export default {
|
|
|
1260
1312
|
method: "post",
|
|
1261
1313
|
data: { code: "outUserRoleCode" },
|
|
1262
1314
|
success: (res) => {
|
|
1263
|
-
let value =
|
|
1315
|
+
let value =
|
|
1316
|
+
!res.objx || !res.objx.value ? "distributor" : res.objx.value;
|
|
1264
1317
|
let codes = value.split(",");
|
|
1265
1318
|
this.outUserCodes = codes; //外部用户编码
|
|
1266
1319
|
this.initRoleDialogParam(); //初始化角色弹框的查询参数
|