浏览代码

协议管理10.13

caojunjie 1 年之前
父节点
当前提交
49a81bd849
共有 1 个文件被更改,包括 40 次插入8 次删除
  1. 40 8
      src/views/financialManagementF/agreementprice/index.vue

+ 40 - 8
src/views/financialManagementF/agreementprice/index.vue

@@ -65,6 +65,15 @@
                     <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
                                @click.stop="rowDel(scope.row, scope.index)">删除
                     </el-button>
+
+                    <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
+                               @click.stop="statusfun(scope.row.id,0)">
+                        启用
+                    </el-button>
+                    <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
+                               @click.stop="statusfun(scope.row.id,1)">
+                        停用
+                    </el-button>
                 </template>
             </avue-crud>
         </basic-container>
@@ -92,7 +101,8 @@
         page: {
           pageSize: 10,
           currentPage: 1,
-          total: 0
+          total: 0,
+          ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
         },
         selectionList: [],
         option:{},
@@ -108,6 +118,7 @@
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
+            menuWidth:260,
           column: [
             {
               label: "单据编码",
@@ -151,7 +162,7 @@
             {
               label: "客户英文名称",
               prop: "corpEnName",
-                width:180,
+                width:"180",
               rules: [{
                 required: true,
                 message: "请输入客户英文名称",
@@ -170,23 +181,23 @@
             {
               label: "协议生效日期",
               prop: "effectiveDate",
-                width:160,
+                width:"160",
             },
             {
               label: "协议失效日期",
               prop: "expiringDate",
-                width:160,
+                width:"160",
 
             },
             {
               label: "人民币协议金额",
               prop: "amountCny",
-                width:120,
+                width:"120",
             },
             {
               label: "美元协议金额",
               prop: "amountUsd",
-                width:120,
+                width:"120",
             },
             // {
             //   label: "协议签订人 Id",
@@ -196,7 +207,7 @@
             {
               label: "协议签订人姓名",
               prop: "signedName",
-                width:120,
+                width:"120",
             },
             {
               label: "账期备注",
@@ -247,7 +258,7 @@
               {
                   label: "创建时间",
                   prop: "createTime",
-                  width:160,
+                  width:"160",
                   display:false,
               },
               {
@@ -258,6 +269,7 @@
               {
                   label: "修改时间",
                   prop: "updateTime",
+                  width:"160",
                   display:false,
               },
           ]
@@ -287,6 +299,26 @@
           this.option = await this.getColumnData(this.getColumnName(307), this.optionBack);
       },
       methods: {
+          // 禁用启用按钮
+          statusfun(id,status){
+              this.$confirm("确定将选择数据更改状态?", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+              }).then(()=>{
+                  agreementpriceDetail(id).then(res=>{
+                      let obj = res.data.data;
+                      obj.status = status
+                      agreementpriceSubmit(obj).then(()=>{
+                          this.onLoad(this.page);
+                          this.$message({
+                              type: "success",
+                              message: "操作成功!"
+                          });
+                      })
+                  })
+              })
+          },
           // 添加弹窗开启
           addbtnfun(){
               this.detailData.seeDisabled = false