🐛 放开本账号运单复制,并避免总单选地址时提前校验

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-29 22:44:01 +08:00
parent 185a0f9aec
commit 083d954765
3 changed files with 8 additions and 18 deletions
@@ -1229,25 +1229,11 @@ export default {
// 展示模式由已选数据决定:有站点编码则显示站点名,否则省市区;暂不按运输方式强制站点限制。
return Boolean(siteCode && siteCode !== '/');
},
hasAddressValue(target) {
const field = this.addressModel(target);
if (!field) return false;
return Boolean(
String(field.model[field.address] || '').trim() || String(field.model[field.name] || '').trim()
);
},
tipEmptyAddressDetail(target) {
// 替代原「请先选择运输方式」placeholder:空地址点击时 toast,已有值不再提示。
if (!this.hasAddressValue(target)) {
this.$message.warning('请输入详细地址');
}
},
resolveAddressRegionCode(row = {}) {
return row.regionCode || row.districtCode || row.areaCode || row.adcode || '';
},
openCommonAddress(target) {
if (this.isBasicRouteReadonly) return;
this.tipEmptyAddressDetail(target);
this.addressTarget = target;
// 暂不按运输方式限制站点:统一走常用地址选择。
this.addressQuery = {};
@@ -1356,7 +1342,6 @@ export default {
},
handleAddressDetailClick(target) {
if (this.isBasicRouteReadonly) return;
this.tipEmptyAddressDetail(target);
this.openAddressMap(target);
},
openAddressMap(target) {
@@ -5116,11 +5116,16 @@ export default {
);
},
canCopy(row) {
if (!row) return false;
// 归属本账号可见范围的运单允许复制。跨组织但项目归属本账号的记录会被标成只读,
// 只读仅拦截编辑/删除,不拦截复制。具备查看、新增、编辑或复制权限即可使用。
return (
this.hasAction('copy') &&
this.hasPermission(`${this.config.permission}_copy`) &&
!this.readonlyScope &&
!row.readonly
(this.hasPermission(`${this.config.permission}_copy`) ||
this.hasPermission(`${this.config.permission}_add`) ||
this.hasPermission(`${this.config.permission}_edit`) ||
this.hasPermission(`${this.config.permission}_view`))
);
},
canEnable(row) {
+1 -1
View File
@@ -6,7 +6,7 @@
:config="config"
:crud-option="option"
:detail-id="detailId"
:menu-width="250"
:menu-width="320"
standalone-form-page
/>
</template>