Răsfoiți Sursa

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

xieyong 1 săptămână în urmă
părinte
comite
1b9009c6ea

+ 1 - 0
.gitignore

@@ -23,3 +23,4 @@ yarn-error.log*
 *.sw?
 vue.config.js
 package-lock.json
+AGENTS.md

+ 1 - 0
AGENTS.md

@@ -5,3 +5,4 @@
 - 库存台账返回的 `provenance` 是展示字符串;向 EOM 发货接口提交产地时,使用 `purchaseOrigins` 产地编码数组转换为字符串数组。替代料与普通发货物品均需遵守此契约,不能把库存记录中的 `"[]"` 原样提交给 `JSONArray` 字段。
 - 客户抽屉内打开客户历史版本详情时,详情 `ele-modal` 必须设置 `append-to-body`,避免弹窗遮罩受抽屉层叠上下文影响而覆盖弹窗内容。
 - 客户与供应商共用 `saleManage/contact/components/addContactDialog.vue` 的新建并提交入口;保存主档后必须等待新建证照的 `saveOrEdit` 请求全部成功,再开启 `contact_approve` 提交弹窗。证照保存失败须提示并停止提交,避免服务端按已持久化证照校验时误判。
+- `saleManage/contact` 的“我的”、员工公海、管理员公海三个列表都有独立的单行删除入口;删除链接需要权限与状态控制,点击时直接调用确认框并在确认后请求 `/eom/contact/delete`,避免表格行刷新后 `el-popconfirm` 的引用节点失效。若服务端返回“数据已被其他业务关联”,先核对该客户实际 `if_relation` 与关联业务记录;客户修改本身不调用 `updateRelationStatus`,不得直接清除关联标记或放宽后端删除保护。

+ 18 - 18
src/views/saleManage/contact/contactList.vue

@@ -118,24 +118,19 @@
               @click="sub(row)"
             >提交</el-link>
 
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除此信息吗?"
-              @confirm="remove(row)"
+            <el-link
+              v-if="
+                row.assignStatus !== 1 &&
+                [0, 3].includes(row.approvalStatus) &&
+                $hasPermission('eom:contact:delete')
+              "
+              type="danger"
+              :underline="false"
+              icon="el-icon-delete"
+              @click="remove(row)"
             >
-              <template v-slot:reference>
-                <el-link
-                  v-if="
-                    row.assignStatus !== 1 && [0, 3].includes(row.approvalStatus)
-                  "
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                >
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
+              删除
+            </el-link>
           </template>
         </ele-pro-table>
       </div>
@@ -511,7 +506,12 @@
           this.reload();
         });
       },
-      remove(row) {
+      async remove(row) {
+        try {
+          await this.$confirm('确定要删除此信息吗?', '提示', { type: 'warning' });
+        } catch (e) {
+          return;
+        }
         contactDelete([row.id]).then((res) => {
           this.$message.success('删除成功!');
           this.reload();

+ 13 - 11
src/views/saleManage/contact/contactListAdmin.vue

@@ -180,22 +180,19 @@
               禁用
             </el-link>
 
-            <el-popconfirm
-              class="ele-action"
-              title="确定要删除此信息吗?"
+            <el-link
               v-if="
                 row.assignStatus !== 1 &&
                 $hasPermission('eom:contact:delete') &&
                 [0, 3].includes(row.approvalStatus)
               "
-              @confirm="remove(row)"
+              type="danger"
+              :underline="false"
+              icon="el-icon-delete"
+              @click="remove(row)"
             >
-              <template v-slot:reference>
-                <el-link type="danger" :underline="false" icon="el-icon-delete">
-                  删除
-                </el-link>
-              </template>
-            </el-popconfirm>
+              删除
+            </el-link>
           </template>
         </ele-pro-table>
       </div>
@@ -587,7 +584,12 @@
           this.reload();
         });
       },
-      remove(row) {
+      async remove(row) {
+        try {
+          await this.$confirm('确定要删除此信息吗?', '提示', { type: 'warning' });
+        } catch (e) {
+          return;
+        }
         contactDelete([row.id]).then((res) => {
           this.$message.success('删除成功!');
           this.reload();

+ 14 - 15
src/views/saleManage/contact/index.vue

@@ -167,21 +167,15 @@
                   禁用
                 </el-link>
 
-                <el-popconfirm
-                  class="ele-action"
-                  title="确定要删除此信息吗?"
-                  @confirm="remove(row)"
+                <el-link
+                  v-if="$hasPermission('eom:contact:delete')"
+                  type="danger"
+                  :underline="false"
+                  icon="el-icon-delete"
+                  @click="remove(row)"
                 >
-                  <template v-slot:reference>
-                    <el-link
-                      type="danger"
-                      :underline="false"
-                      icon="el-icon-delete"
-                    >
-                      删除
-                    </el-link>
-                  </template>
-                </el-popconfirm>
+                  删除
+                </el-link>
               </template>
             </ele-pro-table>
           </div>
@@ -606,7 +600,12 @@
           this.reload();
         });
       },
-      remove(row) {
+      async remove(row) {
+        try {
+          await this.$confirm('确定要删除此信息吗?', '提示', { type: 'warning' });
+        } catch (e) {
+          return;
+        }
         contactDelete([row.id]).then((res) => {
           this.$message.success('删除成功!');
           this.reload();