瀏覽代碼

feat(报价管理): 添加复制报价单功能

liujt 6 月之前
父節點
當前提交
a022d79f22
共有 2 個文件被更改,包括 16 次插入3 次删除
  1. 8 3
      src/views/saleManage/quotation/components/addDialog.vue
  2. 8 0
      src/views/saleManage/quotation/index.vue

+ 8 - 3
src/views/saleManage/quotation/components/addDialog.vue

@@ -467,7 +467,8 @@ export default {
       groupTreeData: [],
       // 组织机构平铺数据
       groupData: [],
-      enterprisePage: []
+      enterprisePage: [],
+      editType: ''
     };
   },
   created() {
@@ -627,7 +628,8 @@ export default {
     },
 
     async open(type, row, contactCategoryId) {
-      this.title = type === 'add' ? '新增' : '修改';
+      this.title = type === 'add' ? '新增' : type === 'copy' ? '复制' : '修改';
+      this.editType = type;
       this.row = row;
       this.visible = true;
       if (this.enterprisePage.length == 0) {
@@ -750,7 +752,7 @@ export default {
           quoteProductList: this.$refs.inventoryTable.getTableValue(),
           totalPrice: this.$refs.inventoryTable.getPrice()[0]
         });
-        if (this.isUpdate) {
+        if (this.isUpdate && this.editType == 'edit') {
           UpdateInformation(commitData)
             .then((res) => {
               this.loading = false;
@@ -767,6 +769,9 @@ export default {
               //this.loading = false;
             });
         } else {
+          if (this.editType == 'copy') {
+            delete commitData.id;
+          }
           addInformation(commitData)
             .then((res) => {
               this.loading = false;

+ 8 - 0
src/views/saleManage/quotation/index.vue

@@ -82,6 +82,14 @@
 
           <!-- 操作列 -->
           <template v-slot:action="{ row }">
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-edit"
+              @click="openEdit('copy', row)"
+            >
+              复制
+            </el-link>
             <el-link
               type="primary"
               :underline="false"