caojunjie 1 rok pred
rodič
commit
8cc26fdb65
1 zmenil súbory, kde vykonal 33 pridanie a 4 odobranie
  1. 33 4
      src/views/iosBasicData/bports/index.vue

+ 33 - 4
src/views/iosBasicData/bports/index.vue

@@ -25,6 +25,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>
         <template slot="code" slot-scope="scope">
           <avue-text-ellipsis :text="scope.row.code" :height="30" use-tooltip placement="top">
@@ -58,8 +67,6 @@
     </basic-container>
     <ports-terms ref="portsterms" v-if="!isShow" :detailData="detailData" @goBack="goBack"></ports-terms>
 
-
-
     <el-dialog title="导入往来单位" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
       v-dialog-drag>
       <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
@@ -130,7 +137,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
       selectionList: [],
       option: {
@@ -154,6 +162,7 @@ export default {
         viewBtn: true,
         selection: true,
         dialogClickModal: false,
+          menuWidth:260,
         column: [
           {
             label: "编码",
@@ -238,7 +247,7 @@ export default {
             }],
           },
           {
-            label: "扩展数据",
+            label: "EDI CODE",
             prop: "extendedDataArr",
             formslot: true,
             // rules: [{
@@ -358,6 +367,26 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(298), this.optionBack);
   },
   methods: {
+      // 禁用启用按钮
+      statusfun(id,status){
+          this.$confirm("确定将选择数据更改状态?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+          }).then(()=>{
+              bportsDetail(id).then(res=>{
+                  let obj = res.data.data;
+                  obj.status = status
+                  bportsSubmit(obj).then(()=>{
+                      this.onLoad(this.page);
+                      this.$message({
+                          type: "success",
+                          message: "操作成功!"
+                      });
+                  })
+              })
+          })
+      },
     // 导出
     handleExport() {
       var condition = ''