cloud-web-corejs 1.0.54-dev.715 → 1.0.54-dev.716
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
CHANGED
|
@@ -4226,6 +4226,52 @@ export const businessFields = [
|
|
|
4226
4226
|
|
|
4227
4227
|
// ============== 对比组件模块(业务组件标签页下的独立分组)==============
|
|
4228
4228
|
export const compareFields = [
|
|
4229
|
+
{
|
|
4230
|
+
type: "compare-change-button",
|
|
4231
|
+
targetType: "button",
|
|
4232
|
+
icon: "button",
|
|
4233
|
+
commonFlag: !0,
|
|
4234
|
+
formItemFlag: !1,
|
|
4235
|
+
columnFlag: true,
|
|
4236
|
+
options: {
|
|
4237
|
+
name: "",
|
|
4238
|
+
label: "变更",
|
|
4239
|
+
wfHideFlag: 1,
|
|
4240
|
+
columnWidth: "200px",
|
|
4241
|
+
size: "",
|
|
4242
|
+
displayStyle: "block",
|
|
4243
|
+
disabled: !1,
|
|
4244
|
+
hidden: !1,
|
|
4245
|
+
type: "default",
|
|
4246
|
+
plain: !1,
|
|
4247
|
+
round: !1,
|
|
4248
|
+
circle: !1,
|
|
4249
|
+
icon: null,
|
|
4250
|
+
customClass: "",
|
|
4251
|
+
onCreated: "if(!dataId){\n this.setHidden(true)\n}",
|
|
4252
|
+
onMounted: "",
|
|
4253
|
+
// 放在「原单」详情页:跳转变更单列表并携带 sourceId 打开新增。把 '变更单formCode' 改成实际编号
|
|
4254
|
+
// dataId 为按钮 onClick 注入参数,可直接使用
|
|
4255
|
+
onClick: "this.getFormRef().goChangeBill(dataId, '变更单formCode')",
|
|
4256
|
+
accessType: "1",
|
|
4257
|
+
clickBindEvent: null,
|
|
4258
|
+
onBeforeClickButton: null,
|
|
4259
|
+
searchDialogConfig: {
|
|
4260
|
+
...defaultSearchDialogConfig,
|
|
4261
|
+
},
|
|
4262
|
+
addTableDataConfig: {
|
|
4263
|
+
tableRef: null,
|
|
4264
|
+
tableData: {},
|
|
4265
|
+
},
|
|
4266
|
+
...defaultWfConfig,
|
|
4267
|
+
hiddenByWf: true,
|
|
4268
|
+
...defaultWidgetShowRuleConfig,
|
|
4269
|
+
|
|
4270
|
+
showRuleFlag: 1,
|
|
4271
|
+
showRuleEnabled: 1,
|
|
4272
|
+
showRules: [],
|
|
4273
|
+
},
|
|
4274
|
+
},
|
|
4229
4275
|
{
|
|
4230
4276
|
type: "compare-button",
|
|
4231
4277
|
targetType: "button",
|
|
@@ -2361,6 +2361,47 @@ modules = {
|
|
|
2361
2361
|
walk(tableColumns);
|
|
2362
2362
|
return result;
|
|
2363
2363
|
},
|
|
2364
|
+
/**
|
|
2365
|
+
* 「变更」跳转:从原单跳到变更单列表并携带 sourceId 打开新增。
|
|
2366
|
+
* 列表宿主(list.vue)按「路由最后一段=formCode、query.param(JSON)=打开参数」解析,
|
|
2367
|
+
* 因此默认复用当前路由基路径、把最后一段替换为变更单 formCode(同基兄弟列表约定)。
|
|
2368
|
+
* @param {String|Number} sourceId 原单 id(不传取当前 dataId)
|
|
2369
|
+
* @param {String} formCode 变更单表单编号(作为目标列表路由最后一段)
|
|
2370
|
+
* @param {Object} [options]
|
|
2371
|
+
* listPath 显式目标列表路由(覆盖默认的“替换最后一段”推导)
|
|
2372
|
+
* param 额外打开参数(与 { sourceId, autoAdd:1 } 合并,走 query.param)
|
|
2373
|
+
* query 额外 query 合并
|
|
2374
|
+
*/
|
|
2375
|
+
goChangeBill: function (sourceId, formCode, options) {
|
|
2376
|
+
let a = 1;
|
|
2377
|
+
debugger;
|
|
2378
|
+
options = options || {};
|
|
2379
|
+
let router = this.$router || (window.$vueRoot && window.$vueRoot.$router);
|
|
2380
|
+
let store = this.$store || (window.$vueRoot && window.$vueRoot.$store);
|
|
2381
|
+
if (!router) return;
|
|
2382
|
+
let sid = sourceId != null ? sourceId : this.dataId;
|
|
2383
|
+
// 目标列表路径:优先 options.listPath;否则复用当前路径、替换最后一段为 formCode
|
|
2384
|
+
let path = options.listPath;
|
|
2385
|
+
if (!path) {
|
|
2386
|
+
let curPath = (this.$route && this.$route.path) || "";
|
|
2387
|
+
let segs = curPath.split("/");
|
|
2388
|
+
if (segs.length) segs[segs.length - 1] = formCode;
|
|
2389
|
+
path = segs.join("/");
|
|
2390
|
+
}
|
|
2391
|
+
let param = Object.assign({}, options.param, {
|
|
2392
|
+
sourceId: sid,
|
|
2393
|
+
autoAdd: 1,
|
|
2394
|
+
});
|
|
2395
|
+
let query = Object.assign({}, options.query, param);
|
|
2396
|
+
let view = { path: path, query: query };
|
|
2397
|
+
// 先清掉目标列表的缓存视图,再 replace,确保列表按新参数重新加载
|
|
2398
|
+
let doNav = () => router.replace(view);
|
|
2399
|
+
if (store) {
|
|
2400
|
+
store.dispatch("tagsView/delCachedView", view).then(doNav, doNav);
|
|
2401
|
+
} else {
|
|
2402
|
+
doNav();
|
|
2403
|
+
}
|
|
2404
|
+
},
|
|
2364
2405
|
/** 打开"查看删除数据"弹窗。columns 不传时默认取当前数据表格的列。 */
|
|
2365
2406
|
openCompareDelList: function (subFormName, columns) {
|
|
2366
2407
|
this.compareDelListOption = {
|