Browse Source

青岛鑫动力客户地址修改行编辑 2023-12-4

caojunjie 1 year ago
parent
commit
6029a0526e

+ 15 - 4
src/views/iosBasicData/rateManagement/detailsPage.vue

@@ -97,7 +97,7 @@
 </template>
 
 <script>
-import { typeSave, dataDetail, delItem } from "@/api/iosBasicData/rateManagement";
+import {typeSave, dataDetail, delItem, bcurexrateDetails} from "@/api/iosBasicData/rateManagement";
 import { optionList } from "./js/optionList";
 import reportDialog from "@/components/report-dialog/main";
 export default {
@@ -113,7 +113,6 @@ export default {
       dataList: [],
       drawer: false,
       tableHeight: 0,
-
       option: {
         menuBtn: false,
         labelWidth: 100,
@@ -345,11 +344,20 @@ export default {
     // 编辑明细
     editFun(row){
         console.log(row,'编辑')
+        // dataList
+
     },
     // 删除
     rowDel(row){
-        console.log(row,'删除')
-
+        this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+        }).then(()=>{
+            bcurexrateDetails(row.id).then(res=>{
+                console.log(res,357)
+            })
+        })
     },
     cellStyle() {
       return "padding:0;height:40px;";
@@ -360,6 +368,9 @@ export default {
         .then(res => {
           this.form = res.data.data
           this.form.annual = this.form.annual + ''
+          // for(let item of res.data.data.curExrateList) {
+          //
+          // }
           this.dataList = res.data.data.curExrateList
             ? res.data.data.curExrateList
             : [];

+ 20 - 10
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -68,10 +68,14 @@
               <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addRow">录入明细
               </el-button>
           </template>
-          <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+          <template v-if="!row.$cellEdit" slot-scope="{type,size,row,index,disabled}" slot="menu">
+            <!--<el-button :size="size" :disabled="disabled" :type="type"-->
+            <!--  :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crud.rowEdit(row, index)">{{-->
+            <!--    row.$cellEdit ? '确认' : '修改' }}-->
+            <!--</el-button>-->
             <el-button :size="size" :disabled="disabled" :type="type"
-              :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crud.rowEdit(row, index)">{{
-                row.$cellEdit ? '确认' : '修改' }}
+                         :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crud.rowCell(row, index)">{{
+                      row.$cellEdit ? '确认' : '修改' }}
             </el-button>
             <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type" @click="rowDel(row, index)">删除
             </el-button>
@@ -717,12 +721,16 @@ export default {
     }
     ,
     addRow() {
-      console.log('1234');
-      this.data.push({
-          $cellEdit: true,
-          contacts:this.data[this.data.length - 1].contacts,
-          tel:this.data[this.data.length - 1].tel,
-      })
+      if (this.data.length > 0) {
+          this.data.push({
+              $cellEdit: true,
+              contacts:this.data[this.data.length - 1].contacts,
+              tel:this.data[this.data.length - 1].tel,
+          })
+      }else {
+          this.data.push({ $cellEdit: true })
+      }
+
     }
     ,
     rowCell(row, index) {
@@ -918,7 +926,9 @@ export default {
     ,
     //新增客户联系人保存触发
     rowSave(row, done, loading) {
-        console.log(row,913)
+        if(this.data.length == 1) {
+            this.$set(row,'defaultAddres','1')
+        }
       done(row);
     }
     ,