lichao 3 سال پیش
والد
کامیت
a3612a35ec

+ 6 - 3
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -524,9 +524,9 @@
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
-          <el-button type="primary" @click="importChoice" v-if="commodityData === true" :disabled="tableData.length !== 1">导入</el-button>
+          <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+          <el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading" :disabled="tableData.length !== 1">导入</el-button>
         </span>
     </el-dialog>
     <el-dialog
@@ -2360,6 +2360,7 @@ export default {
     },
     //确认导入触发
     async importGoods() {
+      this.saveLoading = true;
       if (this.goodsListSave.length > 0) {
         this.goodsListSaveHandle()
       } else {
@@ -2433,6 +2434,7 @@ export default {
           // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
         })
       }
+      this.saveLoading = false;
       this.dialogVisible = false
     },
     tableDataHandle() {
@@ -2498,6 +2500,7 @@ export default {
           // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
         })
       }
+      this.saveLoading = false;
       this.dialogVisible = false
     },
     closeGoods() {

+ 9 - 1
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -554,6 +554,7 @@ export default {
         .then(res => {
           this.contactsData = res.data.data.records;
           this.contactPage.total = res.data.data.total;
+          this.customerContact.height = window.innerHeight - 240;
         })
         .finally(() => {
           this.contactLoading = false;
@@ -771,7 +772,14 @@ export default {
     //商品编辑
     rowCell(row, index) {
       console.log(row);
-      this.$refs.crudContact.rowCell(row, index);
+      if (row.$cellEdit) {
+        itemSubmit({...row,pid: this.form.id}).then(res => {
+          this.$message.success('保存成功')
+          this.$refs.crudContact.rowCell(row, index);
+        })
+      } else {
+        this.$refs.crudContact.rowCell(row, index);
+      }
     },
     //买赠编辑
     rowCellE(row, index) {