|  | @@ -1,6 +1,7 @@
 | 
	
		
			
				|  |  |  <!-- 贸易条款 -->
 | 
	
		
			
				|  |  |  <template>
 | 
	
		
			
				|  |  | -    <basic-container>
 | 
	
		
			
				|  |  | +  <div>
 | 
	
		
			
				|  |  | +    <basic-container v-if="isShow">
 | 
	
		
			
				|  |  |        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
 | 
	
		
			
				|  |  |          id="out-table" :header-cell-class-name="headerClassName" :before-open="beforeOpen" :search.sync="search"
 | 
	
		
			
				|  |  |          v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel"
 | 
	
	
		
			
				|  | @@ -20,21 +21,24 @@
 | 
	
		
			
				|  |  |          <template slot-scope="scope" slot="menu">
 | 
	
		
			
				|  |  |            <!--<el-button type="text" icon="el-icon-view" size="small" @click.stop="rowViewfun(scope.row, scope.index)">查看-->
 | 
	
		
			
				|  |  |            <!--</el-button>-->
 | 
	
		
			
				|  |  | -          <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEditfun(scope.row, scope.index)">编辑
 | 
	
		
			
				|  |  | -          </el-button>
 | 
	
		
			
				|  |  | +          <!-- <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowEditfun(scope.row, scope.index)">编辑
 | 
	
		
			
				|  |  | +          </el-button> -->
 | 
	
		
			
				|  |  |            <el-button type="text" icon="el-icon-edit" size="small" @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>
 | 
	
		
			
				|  |  | +          <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="cname" slot-scope="{ row }">
 | 
	
		
			
				|  |  | +          <span style="color: #1e9fff;cursor: pointer" @click="inEdit(row)">{{ row.cname }}</span>
 | 
	
		
			
				|  |  |          </template>
 | 
	
		
			
				|  |  |        </avue-crud>
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |        <!-- <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"
 | 
	
	
		
			
				|  | @@ -49,346 +53,325 @@
 | 
	
		
			
				|  |  |            温馨提示 第一次导入时请先下载模板
 | 
	
		
			
				|  |  |          </p>
 | 
	
		
			
				|  |  |        </el-dialog> -->
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      </basic-container>
 | 
	
		
			
				|  |  | -  </template>
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  <script>
 | 
	
		
			
				|  |  | -  import { getBtrademodesList, getBtrademodesDetail, addBtrademodes, updateBtrademodes, removeBtrademodes } from "@/api/iosBasicData/warehouse";
 | 
	
		
			
				|  |  | -  import { mapGetters } from "vuex";
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  import { getToken } from "@/util/auth";
 | 
	
		
			
				|  |  | +    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
 | 
	
		
			
				|  |  | +  </div>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  | -  export default {
 | 
	
		
			
				|  |  | -    data() {
 | 
	
		
			
				|  |  | -      return {
 | 
	
		
			
				|  |  | -        form: {},
 | 
	
		
			
				|  |  | -        query: {},
 | 
	
		
			
				|  |  | -        loading: true,
 | 
	
		
			
				|  |  | -        excelBox: false,
 | 
	
		
			
				|  |  | -        search: {},
 | 
	
		
			
				|  |  | -        excelForm: {},
 | 
	
		
			
				|  |  | -        excelLoading: false,
 | 
	
		
			
				|  |  | -        excelOption: {
 | 
	
		
			
				|  |  | -          submitBtn: false,
 | 
	
		
			
				|  |  | -          emptyBtn: false,
 | 
	
		
			
				|  |  | -          column: [
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "模板下载",
 | 
	
		
			
				|  |  | -              prop: "excelTemplate",
 | 
	
		
			
				|  |  | -              formslot: true,
 | 
	
		
			
				|  |  | -              span: 24
 | 
	
		
			
				|  |  | -            },
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "模板上传",
 | 
	
		
			
				|  |  | -              prop: "excelFile",
 | 
	
		
			
				|  |  | -              type: "upload",
 | 
	
		
			
				|  |  | -              drag: true,
 | 
	
		
			
				|  |  | -              loadText: "模板上传中,请稍等",
 | 
	
		
			
				|  |  | -              span: 24,
 | 
	
		
			
				|  |  | -              propsHttp: {
 | 
	
		
			
				|  |  | -                res: "data"
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -              tip: "请上传 .xls,.xlsx 标准格式文件",
 | 
	
		
			
				|  |  | -              action: "/api/blade-los/btrademodes/importBTradeModes"
 | 
	
		
			
				|  |  | -            }
 | 
	
		
			
				|  |  | -          ]
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        page: {
 | 
	
		
			
				|  |  | -          pageSize: 10,
 | 
	
		
			
				|  |  | -          currentPage: 1,
 | 
	
		
			
				|  |  | -          total: 0,
 | 
	
		
			
				|  |  | -          pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        selectionList: [],
 | 
	
		
			
				|  |  | -        option: {
 | 
	
		
			
				|  |  | -          dialogDrag: true,
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        optionBack: {
 | 
	
		
			
				|  |  | -          dialogDrag: true,
 | 
	
		
			
				|  |  | -          height: 'auto',
 | 
	
		
			
				|  |  | -          stripe: true,
 | 
	
		
			
				|  |  | -          calcHeight: 30,
 | 
	
		
			
				|  |  | -          searchIcon: true,
 | 
	
		
			
				|  |  | -          searchIndex: 4,
 | 
	
		
			
				|  |  | -          tip: false,
 | 
	
		
			
				|  |  | -          searchShow: true,
 | 
	
		
			
				|  |  | -          searchMenuSpan: 24,
 | 
	
		
			
				|  |  | -          border: true,
 | 
	
		
			
				|  |  | -          index: true,
 | 
	
		
			
				|  |  | -          viewBtn: false,
 | 
	
		
			
				|  |  | -          selection: true,
 | 
	
		
			
				|  |  | -          dialogClickModal: false,
 | 
	
		
			
				|  |  | -            menuWidth:260,
 | 
	
		
			
				|  |  | -          column: [
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "编码",
 | 
	
		
			
				|  |  | -              prop: "code",
 | 
	
		
			
				|  |  | -              width: "180",
 | 
	
		
			
				|  |  | -              search: true,
 | 
	
		
			
				|  |  | -              slot: true,
 | 
	
		
			
				|  |  | -              rules: [{
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | -                message: "请输入编码",
 | 
	
		
			
				|  |  | -                trigger: "blur"
 | 
	
		
			
				|  |  | -              }],
 | 
	
		
			
				|  |  | -                overHidden:true,
 | 
	
		
			
				|  |  | -            },
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "中文名称",
 | 
	
		
			
				|  |  | -              prop: "cname",
 | 
	
		
			
				|  |  | -              width: "180",
 | 
	
		
			
				|  |  | -              search: true,
 | 
	
		
			
				|  |  | -              slot: true,
 | 
	
		
			
				|  |  | -              rules: [{
 | 
	
		
			
				|  |  | -                required: true,
 | 
	
		
			
				|  |  | -                message: "请输入中文名称",
 | 
	
		
			
				|  |  | -                trigger: "blur"
 | 
	
		
			
				|  |  | -              }],
 | 
	
		
			
				|  |  | -                overHidden:true,
 | 
	
		
			
				|  |  | -            },
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "状态",
 | 
	
		
			
				|  |  | -              prop: "status",
 | 
	
		
			
				|  |  | -              type: "select",
 | 
	
		
			
				|  |  | -              search: true,
 | 
	
		
			
				|  |  | -              dicData: [{
 | 
	
		
			
				|  |  | -                label: '启用',
 | 
	
		
			
				|  |  | -                value: 0
 | 
	
		
			
				|  |  | -              }, {
 | 
	
		
			
				|  |  | -                label: '停用',
 | 
	
		
			
				|  |  | -                value: 1
 | 
	
		
			
				|  |  | -              }],
 | 
	
		
			
				|  |  | -              value: 0,
 | 
	
		
			
				|  |  | -                overHidden:true,
 | 
	
		
			
				|  |  | -            },
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                label: "创建人",
 | 
	
		
			
				|  |  | -                prop: "createUserName",
 | 
	
		
			
				|  |  | -                  display: false,
 | 
	
		
			
				|  |  | -                  overHidden:true,
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                label: "创建部门",
 | 
	
		
			
				|  |  | -                prop: "createDeptName",
 | 
	
		
			
				|  |  | -                  display: false,
 | 
	
		
			
				|  |  | -                  overHidden:true,
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                label: "创建时间",
 | 
	
		
			
				|  |  | -                prop: "createTime",
 | 
	
		
			
				|  |  | -                  width: "160",
 | 
	
		
			
				|  |  | -                  display: false,
 | 
	
		
			
				|  |  | -                  overHidden:true,
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                label: "修改人",
 | 
	
		
			
				|  |  | -                prop: "updateUserName",
 | 
	
		
			
				|  |  | -                  display: false,
 | 
	
		
			
				|  |  | -                  overHidden:true,
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -              {
 | 
	
		
			
				|  |  | -                label: "修改时间",
 | 
	
		
			
				|  |  | -                prop: "updateTime",
 | 
	
		
			
				|  |  | -                  width: "160",
 | 
	
		
			
				|  |  | -                  display: false,
 | 
	
		
			
				|  |  | -                  overHidden:true,
 | 
	
		
			
				|  |  | -              },
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "是否已删除(0 否 1是)",
 | 
	
		
			
				|  |  | -              prop: "isDeleted",
 | 
	
		
			
				|  |  | -                hide: true,
 | 
	
		
			
				|  |  | -                display: false,
 | 
	
		
			
				|  |  | -                overHidden:true,
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +import { getBtrademodesList, getBtrademodesDetail, addBtrademodes, updateBtrademodes, removeBtrademodes } from "@/api/iosBasicData/warehouse";
 | 
	
		
			
				|  |  | +import { mapGetters } from "vuex";
 | 
	
		
			
				|  |  | +import detailsPage from "./detailsPage";
 | 
	
		
			
				|  |  | +import { getToken } from "@/util/auth";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +export default {
 | 
	
		
			
				|  |  | +  data() {
 | 
	
		
			
				|  |  | +    return {
 | 
	
		
			
				|  |  | +      detailData: {},
 | 
	
		
			
				|  |  | +      isShow: true,
 | 
	
		
			
				|  |  | +      form: {},
 | 
	
		
			
				|  |  | +      query: {},
 | 
	
		
			
				|  |  | +      loading: true,
 | 
	
		
			
				|  |  | +      excelBox: false,
 | 
	
		
			
				|  |  | +      search: {},
 | 
	
		
			
				|  |  | +      excelForm: {},
 | 
	
		
			
				|  |  | +      excelLoading: false,
 | 
	
		
			
				|  |  | +      excelOption: {
 | 
	
		
			
				|  |  | +        submitBtn: false,
 | 
	
		
			
				|  |  | +        emptyBtn: false,
 | 
	
		
			
				|  |  | +        column: [
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "模板下载",
 | 
	
		
			
				|  |  | +            prop: "excelTemplate",
 | 
	
		
			
				|  |  | +            formslot: true,
 | 
	
		
			
				|  |  | +            span: 24
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "模板上传",
 | 
	
		
			
				|  |  | +            prop: "excelFile",
 | 
	
		
			
				|  |  | +            type: "upload",
 | 
	
		
			
				|  |  | +            drag: true,
 | 
	
		
			
				|  |  | +            loadText: "模板上传中,请稍等",
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  | +            propsHttp: {
 | 
	
		
			
				|  |  | +              res: "data"
 | 
	
		
			
				|  |  |              },
 | 
	
		
			
				|  |  | -            {
 | 
	
		
			
				|  |  | -              label: "备注",
 | 
	
		
			
				|  |  | -              prop: "remarks",
 | 
	
		
			
				|  |  | -              type: 'textarea',
 | 
	
		
			
				|  |  | -              width: "180",
 | 
	
		
			
				|  |  | -              span: 24,
 | 
	
		
			
				|  |  | -              minRows: 3,
 | 
	
		
			
				|  |  | -              slot: true,
 | 
	
		
			
				|  |  | -                overHidden:true,
 | 
	
		
			
				|  |  | -            },
 | 
	
		
			
				|  |  | -          ]
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -        data: []
 | 
	
		
			
				|  |  | -      };
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    async created() {
 | 
	
		
			
				|  |  | -      this.option = await this.getColumnData(this.getColumnName(394), this.optionBack);
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    computed: {
 | 
	
		
			
				|  |  | -      ...mapGetters(["permission"]),
 | 
	
		
			
				|  |  | -      permissionList() {
 | 
	
		
			
				|  |  | -        return {
 | 
	
		
			
				|  |  | -          addBtn: this.vaildData(this.permission.btrademodes_add, false),
 | 
	
		
			
				|  |  | -          viewBtn: this.vaildData(this.permission.btrademodes_view, false),
 | 
	
		
			
				|  |  | -          delBtn: this.vaildData(this.permission.btrademodes_delete, false),
 | 
	
		
			
				|  |  | -          editBtn: this.vaildData(this.permission.btrademodes_edit, false)
 | 
	
		
			
				|  |  | -        };
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      ids() {
 | 
	
		
			
				|  |  | -        let ids = [];
 | 
	
		
			
				|  |  | -        this.selectionList.forEach(ele => {
 | 
	
		
			
				|  |  | -          ids.push(ele.id);
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -        return ids.join(",");
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    methods: {
 | 
	
		
			
				|  |  | -        // 禁用启用按钮
 | 
	
		
			
				|  |  | -        statusfun(id,status){
 | 
	
		
			
				|  |  | -            this.$confirm("确定将选择数据更改状态?", {
 | 
	
		
			
				|  |  | -                confirmButtonText: "确定",
 | 
	
		
			
				|  |  | -                cancelButtonText: "取消",
 | 
	
		
			
				|  |  | -                type: "warning"
 | 
	
		
			
				|  |  | -            }).then(()=>{
 | 
	
		
			
				|  |  | -                getBtrademodesDetail(id).then(res=>{
 | 
	
		
			
				|  |  | -                    let obj = res.data.data;
 | 
	
		
			
				|  |  | -                    obj.status = status
 | 
	
		
			
				|  |  | -                    updateBtrademodes(obj).then(()=>{
 | 
	
		
			
				|  |  | -                        this.onLoad(this.page);
 | 
	
		
			
				|  |  | -                        this.$message({
 | 
	
		
			
				|  |  | -                            type: "success",
 | 
	
		
			
				|  |  | -                            message: "操作成功!"
 | 
	
		
			
				|  |  | -                        });
 | 
	
		
			
				|  |  | -                    })
 | 
	
		
			
				|  |  | -                })
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -        },
 | 
	
		
			
				|  |  | -      // 导出
 | 
	
		
			
				|  |  | -      handleExport() {
 | 
	
		
			
				|  |  | -        var condition = ''
 | 
	
		
			
				|  |  | -        for (const key in this.search) {
 | 
	
		
			
				|  |  | -          var value = this.search[key]
 | 
	
		
			
				|  |  | -          if (value) {
 | 
	
		
			
				|  |  | -            condition += `&${key}=${this.search[key]}`
 | 
	
		
			
				|  |  | +            tip: "请上传 .xls,.xlsx 标准格式文件",
 | 
	
		
			
				|  |  | +            action: "/api/blade-los/btrademodes/importBTradeModes"
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -        this.$confirm('是否导出贸易条款?', '提示', {
 | 
	
		
			
				|  |  | -          confirmButtonText: '确定',
 | 
	
		
			
				|  |  | -          cancelButtonText: '取消',
 | 
	
		
			
				|  |  | -          type: 'warning'
 | 
	
		
			
				|  |  | -        }).then(() => {
 | 
	
		
			
				|  |  | -          window.open(
 | 
	
		
			
				|  |  | -            `/api/blade-los/btrademodes/exportBTradeModes?${this.website.tokenHeader
 | 
	
		
			
				|  |  | -            }=${getToken()}${condition}`
 | 
	
		
			
				|  |  | -          );
 | 
	
		
			
				|  |  | -        }).catch(() => {
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            type: 'info',
 | 
	
		
			
				|  |  | -            message: '已取消' //
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +        ]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      uploadBefore(file, done, loading) {
 | 
	
		
			
				|  |  | -        done();
 | 
	
		
			
				|  |  | -        loading = true;
 | 
	
		
			
				|  |  | +      page: {
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  | +        currentPage: 1,
 | 
	
		
			
				|  |  | +        total: 0,
 | 
	
		
			
				|  |  | +        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      // 上传成功
 | 
	
		
			
				|  |  | -      onSuccess(res, done, loading, column) {
 | 
	
		
			
				|  |  | -        this.excelBox = false;
 | 
	
		
			
				|  |  | -        this.$message.success("导入成功!");
 | 
	
		
			
				|  |  | -        loading = false;
 | 
	
		
			
				|  |  | -        this.onLoad(this.page);
 | 
	
		
			
				|  |  | -        done();
 | 
	
		
			
				|  |  | +      selectionList: [],
 | 
	
		
			
				|  |  | +      option: {
 | 
	
		
			
				|  |  | +        dialogDrag: true,
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      optionBack: {
 | 
	
		
			
				|  |  | +        dialogDrag: true,
 | 
	
		
			
				|  |  | +        height: 'auto',
 | 
	
		
			
				|  |  | +        stripe: true,
 | 
	
		
			
				|  |  | +        calcHeight: 30,
 | 
	
		
			
				|  |  | +        searchIcon: true,
 | 
	
		
			
				|  |  | +        searchIndex: 4,
 | 
	
		
			
				|  |  | +        tip: false,
 | 
	
		
			
				|  |  | +        searchShow: true,
 | 
	
		
			
				|  |  | +        searchMenuSpan: 24,
 | 
	
		
			
				|  |  | +        border: true,
 | 
	
		
			
				|  |  | +        index: true,
 | 
	
		
			
				|  |  | +        viewBtn: false,
 | 
	
		
			
				|  |  | +        selection: true,
 | 
	
		
			
				|  |  | +        dialogClickModal: false,
 | 
	
		
			
				|  |  | +        menuWidth: 140,
 | 
	
		
			
				|  |  | +        column: [
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "编码",
 | 
	
		
			
				|  |  | +            prop: "code",
 | 
	
		
			
				|  |  | +            width: "180",
 | 
	
		
			
				|  |  | +            search: true,
 | 
	
		
			
				|  |  | +            slot: true,
 | 
	
		
			
				|  |  | +            rules: [{
 | 
	
		
			
				|  |  | +              required: true,
 | 
	
		
			
				|  |  | +              message: "请输入编码",
 | 
	
		
			
				|  |  | +              trigger: "blur"
 | 
	
		
			
				|  |  | +            }],
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "中文名称",
 | 
	
		
			
				|  |  | +            prop: "cname",
 | 
	
		
			
				|  |  | +            width: "180",
 | 
	
		
			
				|  |  | +            search: true,
 | 
	
		
			
				|  |  | +            slot: true,
 | 
	
		
			
				|  |  | +            rules: [{
 | 
	
		
			
				|  |  | +              required: true,
 | 
	
		
			
				|  |  | +              message: "请输入中文名称",
 | 
	
		
			
				|  |  | +              trigger: "blur"
 | 
	
		
			
				|  |  | +            }],
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "状态",
 | 
	
		
			
				|  |  | +            prop: "status",
 | 
	
		
			
				|  |  | +            type: "select",
 | 
	
		
			
				|  |  | +            search: true,
 | 
	
		
			
				|  |  | +            dicData: [{
 | 
	
		
			
				|  |  | +              label: '启用',
 | 
	
		
			
				|  |  | +              value: '0'
 | 
	
		
			
				|  |  | +            }, {
 | 
	
		
			
				|  |  | +              label: '停用',
 | 
	
		
			
				|  |  | +              value: '1'
 | 
	
		
			
				|  |  | +            }],
 | 
	
		
			
				|  |  | +            value: '0',
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "创建人",
 | 
	
		
			
				|  |  | +            prop: "createUserName",
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "创建部门",
 | 
	
		
			
				|  |  | +            prop: "createDeptName",
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "创建时间",
 | 
	
		
			
				|  |  | +            prop: "createTime",
 | 
	
		
			
				|  |  | +            width: "160",
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "修改人",
 | 
	
		
			
				|  |  | +            prop: "updateUserName",
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "修改时间",
 | 
	
		
			
				|  |  | +            prop: "updateTime",
 | 
	
		
			
				|  |  | +            width: "160",
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "是否已删除(0 否 1是)",
 | 
	
		
			
				|  |  | +            prop: "isDeleted",
 | 
	
		
			
				|  |  | +            hide: true,
 | 
	
		
			
				|  |  | +            display: false,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +          {
 | 
	
		
			
				|  |  | +            label: "备注",
 | 
	
		
			
				|  |  | +            prop: "remarks",
 | 
	
		
			
				|  |  | +            type: 'textarea',
 | 
	
		
			
				|  |  | +            width: "180",
 | 
	
		
			
				|  |  | +            span: 24,
 | 
	
		
			
				|  |  | +            minRows: 3,
 | 
	
		
			
				|  |  | +            slot: true,
 | 
	
		
			
				|  |  | +            overHidden: true,
 | 
	
		
			
				|  |  | +          },
 | 
	
		
			
				|  |  | +        ]
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  | -      // 下载模板
 | 
	
		
			
				|  |  | -      handleGet() {
 | 
	
		
			
				|  |  | +      data: []
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  async created() {
 | 
	
		
			
				|  |  | +    this.option = await this.getColumnData(this.getColumnName(394), this.optionBack);
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  components: {
 | 
	
		
			
				|  |  | +    detailsPage,
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  computed: {
 | 
	
		
			
				|  |  | +    ...mapGetters(["permission"]),
 | 
	
		
			
				|  |  | +    permissionList() {
 | 
	
		
			
				|  |  | +      return {
 | 
	
		
			
				|  |  | +        addBtn: this.vaildData(this.permission.btrademodes_add, false),
 | 
	
		
			
				|  |  | +        viewBtn: this.vaildData(this.permission.btrademodes_view, false),
 | 
	
		
			
				|  |  | +        delBtn: this.vaildData(this.permission.btrademodes_delete, false),
 | 
	
		
			
				|  |  | +        editBtn: this.vaildData(this.permission.btrademodes_edit, false)
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    ids() {
 | 
	
		
			
				|  |  | +      let ids = [];
 | 
	
		
			
				|  |  | +      this.selectionList.forEach(ele => {
 | 
	
		
			
				|  |  | +        ids.push(ele.id);
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +      return ids.join(",");
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  | +  methods: {
 | 
	
		
			
				|  |  | +    // 禁用启用按钮
 | 
	
		
			
				|  |  | +    statusfun(id, status) {
 | 
	
		
			
				|  |  | +      this.$confirm("确定将选择数据更改状态?", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  | +        getBtrademodesDetail(id).then(res => {
 | 
	
		
			
				|  |  | +          let obj = res.data.data;
 | 
	
		
			
				|  |  | +          obj.status = status
 | 
	
		
			
				|  |  | +          updateBtrademodes(obj).then(() => {
 | 
	
		
			
				|  |  | +            this.onLoad(this.page);
 | 
	
		
			
				|  |  | +            this.$message({
 | 
	
		
			
				|  |  | +              type: "success",
 | 
	
		
			
				|  |  | +              message: "操作成功!"
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 导出
 | 
	
		
			
				|  |  | +    handleExport() {
 | 
	
		
			
				|  |  | +      var condition = ''
 | 
	
		
			
				|  |  | +      for (const key in this.search) {
 | 
	
		
			
				|  |  | +        var value = this.search[key]
 | 
	
		
			
				|  |  | +        if (value) {
 | 
	
		
			
				|  |  | +          condition += `&${key}=${this.search[key]}`
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      this.$confirm('是否导出贸易条款?', '提示', {
 | 
	
		
			
				|  |  | +        confirmButtonText: '确定',
 | 
	
		
			
				|  |  | +        cancelButtonText: '取消',
 | 
	
		
			
				|  |  | +        type: 'warning'
 | 
	
		
			
				|  |  | +      }).then(() => {
 | 
	
		
			
				|  |  |          window.open(
 | 
	
		
			
				|  |  | -          `/api/blade-los/btrademodes/exportBTradeModes/template?${this.website.tokenHeader
 | 
	
		
			
				|  |  | -          }=${getToken()}`
 | 
	
		
			
				|  |  | +          `/api/blade-los/btrademodes/exportBTradeModes?${this.website.tokenHeader
 | 
	
		
			
				|  |  | +          }=${getToken()}${condition}`
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      // 新增
 | 
	
		
			
				|  |  | -      addbtnfun() {
 | 
	
		
			
				|  |  | -        this.form.status = 0
 | 
	
		
			
				|  |  | -        this.$refs.crud.rowAdd()
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      // 查看
 | 
	
		
			
				|  |  | -      rowViewfun(row, index) {
 | 
	
		
			
				|  |  | -        this.extendedDisabled = true
 | 
	
		
			
				|  |  | -        this.$refs.crud.rowView(row, index)
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      // 编辑
 | 
	
		
			
				|  |  | -      rowEditfun(row, index) {
 | 
	
		
			
				|  |  | -        getBtrademodesDetail(row.id).then(res => {
 | 
	
		
			
				|  |  | -          this.form = res.data.data;
 | 
	
		
			
				|  |  | -          this.$refs.crud.rowEdit(row, index)
 | 
	
		
			
				|  |  | +      }).catch(() => {
 | 
	
		
			
				|  |  | +        this.$message({
 | 
	
		
			
				|  |  | +          type: 'info',
 | 
	
		
			
				|  |  | +          message: '已取消' //
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      rowSave(row, done, loading) {
 | 
	
		
			
				|  |  | -        addBtrademodes(row).then(() => {
 | 
	
		
			
				|  |  | -          this.onLoad(this.page);
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            type: "success",
 | 
	
		
			
				|  |  | -            message: "操作成功!"
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -          done();
 | 
	
		
			
				|  |  | -        }, error => {
 | 
	
		
			
				|  |  | -          loading();
 | 
	
		
			
				|  |  | -          window.console.log(error);
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    uploadBefore(file, done, loading) {
 | 
	
		
			
				|  |  | +      done();
 | 
	
		
			
				|  |  | +      loading = true;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 上传成功
 | 
	
		
			
				|  |  | +    onSuccess(res, done, loading, column) {
 | 
	
		
			
				|  |  | +      this.excelBox = false;
 | 
	
		
			
				|  |  | +      this.$message.success("导入成功!");
 | 
	
		
			
				|  |  | +      loading = false;
 | 
	
		
			
				|  |  | +      this.onLoad(this.page);
 | 
	
		
			
				|  |  | +      done();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 下载模板
 | 
	
		
			
				|  |  | +    handleGet() {
 | 
	
		
			
				|  |  | +      window.open(
 | 
	
		
			
				|  |  | +        `/api/blade-los/btrademodes/exportBTradeModes/template?${this.website.tokenHeader
 | 
	
		
			
				|  |  | +        }=${getToken()}`
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 新增
 | 
	
		
			
				|  |  | +    addbtnfun() {
 | 
	
		
			
				|  |  | +      this.form.status = 0
 | 
	
		
			
				|  |  | +      this.$refs.crud.rowAdd()
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 查看
 | 
	
		
			
				|  |  | +    rowViewfun(row, index) {
 | 
	
		
			
				|  |  | +      this.extendedDisabled = true
 | 
	
		
			
				|  |  | +      this.$refs.crud.rowView(row, index)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    inEdit(row) {
 | 
	
		
			
				|  |  | +      this.detailData = {
 | 
	
		
			
				|  |  | +        id: row.id
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +      this.isShow = false
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 编辑
 | 
	
		
			
				|  |  | +    rowEditfun(row, index) {
 | 
	
		
			
				|  |  | +      getBtrademodesDetail(row.id).then(res => {
 | 
	
		
			
				|  |  | +        this.form = res.data.data;
 | 
	
		
			
				|  |  | +        this.$refs.crud.rowEdit(row, index)
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    rowSave(row, done, loading) {
 | 
	
		
			
				|  |  | +      addBtrademodes(row).then(() => {
 | 
	
		
			
				|  |  | +        this.onLoad(this.page);
 | 
	
		
			
				|  |  | +        this.$message({
 | 
	
		
			
				|  |  | +          type: "success",
 | 
	
		
			
				|  |  | +          message: "操作成功!"
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      rowUpdate(row, index, done, loading) {
 | 
	
		
			
				|  |  | -        updateBtrademodes(row).then(() => {
 | 
	
		
			
				|  |  | -          this.onLoad(this.page);
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            type: "success",
 | 
	
		
			
				|  |  | -            message: "操作成功!"
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -          done();
 | 
	
		
			
				|  |  | -        }, error => {
 | 
	
		
			
				|  |  | -          loading();
 | 
	
		
			
				|  |  | -          console.log(error);
 | 
	
		
			
				|  |  | +        done();
 | 
	
		
			
				|  |  | +      }, error => {
 | 
	
		
			
				|  |  | +        loading();
 | 
	
		
			
				|  |  | +        window.console.log(error);
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    rowUpdate(row, index, done, loading) {
 | 
	
		
			
				|  |  | +      updateBtrademodes(row).then(() => {
 | 
	
		
			
				|  |  | +        this.onLoad(this.page);
 | 
	
		
			
				|  |  | +        this.$message({
 | 
	
		
			
				|  |  | +          type: "success",
 | 
	
		
			
				|  |  | +          message: "操作成功!"
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      rowDel(row) {
 | 
	
		
			
				|  |  | -        if (row.status === 1) {
 | 
	
		
			
				|  |  | -          this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  | -            confirmButtonText: "确定",
 | 
	
		
			
				|  |  | -            cancelButtonText: "取消",
 | 
	
		
			
				|  |  | -            type: "warning"
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | -            .then(() => {
 | 
	
		
			
				|  |  | -              return removeBtrademodes(row.id);
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -            .then(() => {
 | 
	
		
			
				|  |  | -              this.onLoad(this.page);
 | 
	
		
			
				|  |  | -              this.$message({
 | 
	
		
			
				|  |  | -                type: "success",
 | 
	
		
			
				|  |  | -                message: "操作成功!"
 | 
	
		
			
				|  |  | -              });
 | 
	
		
			
				|  |  | -            });
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            message: '非禁用状态无法删除',
 | 
	
		
			
				|  |  | -            type: 'warning'
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      handleDelete() {
 | 
	
		
			
				|  |  | -        if (this.selectionList.length === 0) {
 | 
	
		
			
				|  |  | -          this.$message.warning("请选择至少一条数据");
 | 
	
		
			
				|  |  | -          return;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -        for (const selection of this.selectionList) {
 | 
	
		
			
				|  |  | -          if (selection.status == 0) {
 | 
	
		
			
				|  |  | -            this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
 | 
	
		
			
				|  |  | -            return;
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        done();
 | 
	
		
			
				|  |  | +      }, error => {
 | 
	
		
			
				|  |  | +        loading();
 | 
	
		
			
				|  |  | +        console.log(error);
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    rowDel(row) {
 | 
	
		
			
				|  |  | +      if (row.status === 1) {
 | 
	
		
			
				|  |  |          this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  |            confirmButtonText: "确定",
 | 
	
		
			
				|  |  |            cancelButtonText: "取消",
 | 
	
		
			
				|  |  |            type: "warning"
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |            .then(() => {
 | 
	
		
			
				|  |  | -            return removeBtrademodes(this.ids);
 | 
	
		
			
				|  |  | +            return removeBtrademodes(row.id);
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |            .then(() => {
 | 
	
		
			
				|  |  |              this.onLoad(this.page);
 | 
	
	
		
			
				|  | @@ -396,104 +379,143 @@
 | 
	
		
			
				|  |  |                type: "success",
 | 
	
		
			
				|  |  |                message: "操作成功!"
 | 
	
		
			
				|  |  |              });
 | 
	
		
			
				|  |  | -            this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      beforeOpen(done, type) {
 | 
	
		
			
				|  |  | -        if (["edit", "view"].includes(type)) {
 | 
	
		
			
				|  |  | -          getBtrademodesDetail(this.form.id).then(res => {
 | 
	
		
			
				|  |  | -            this.form = res.data.data;
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        done();
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      searchReset() {
 | 
	
		
			
				|  |  | -        this.query = {};
 | 
	
		
			
				|  |  | -        this.onLoad(this.page);
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      searchChange(params, done) {
 | 
	
		
			
				|  |  | -        this.query = params;
 | 
	
		
			
				|  |  | -        this.page.currentPage = 1;
 | 
	
		
			
				|  |  | -        this.onLoad(this.page, params);
 | 
	
		
			
				|  |  | -        done();
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      selectionChange(list) {
 | 
	
		
			
				|  |  | -        this.selectionList = list;
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      selectionClear() {
 | 
	
		
			
				|  |  | -        this.selectionList = [];
 | 
	
		
			
				|  |  | -        this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      currentChange(currentPage) {
 | 
	
		
			
				|  |  | -        this.page.currentPage = currentPage;
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      sizeChange(pageSize) {
 | 
	
		
			
				|  |  | -        this.page.pageSize = pageSize;
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      refreshChange() {
 | 
	
		
			
				|  |  | -        this.onLoad(this.page, this.query);
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      onLoad(page, params = {}) {
 | 
	
		
			
				|  |  | -        this.loading = true;
 | 
	
		
			
				|  |  | -        getBtrademodesList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
 | 
	
		
			
				|  |  | -          const data = res.data.data;
 | 
	
		
			
				|  |  | -          this.page.total = data.total;
 | 
	
		
			
				|  |  | -          this.data = data.records;
 | 
	
		
			
				|  |  | -          this.loading = false;
 | 
	
		
			
				|  |  | -          this.selectionClear();
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        this.$message({
 | 
	
		
			
				|  |  | +          message: '非禁用状态无法删除',
 | 
	
		
			
				|  |  | +          type: 'warning'
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      //自定义列保存
 | 
	
		
			
				|  |  | -      async saveColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | -        /**
 | 
	
		
			
				|  |  | -         * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
 | 
	
		
			
				|  |  | -         * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
 | 
	
		
			
				|  |  | -         * 一定要执行异步操作,要等接口成功返回,才能执行下一行编码
 | 
	
		
			
				|  |  | -         */
 | 
	
		
			
				|  |  | -        const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
 | 
	
		
			
				|  |  | -        if (inSave) {
 | 
	
		
			
				|  |  | -          this.$message.success("保存成功");
 | 
	
		
			
				|  |  | -          //关闭窗口
 | 
	
		
			
				|  |  | -          this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      //自定义列重置
 | 
	
		
			
				|  |  | -      async resetColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | -        this[option] = this[optionBack];
 | 
	
		
			
				|  |  | -        const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
 | 
	
		
			
				|  |  | -        if (inSave) {
 | 
	
		
			
				|  |  | -          this.$message.success("重置成功");
 | 
	
		
			
				|  |  | -          this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    handleDelete() {
 | 
	
		
			
				|  |  | +      if (this.selectionList.length === 0) {
 | 
	
		
			
				|  |  | +        this.$message.warning("请选择至少一条数据");
 | 
	
		
			
				|  |  | +        return;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      for (const selection of this.selectionList) {
 | 
	
		
			
				|  |  | +        if (selection.status == 0) {
 | 
	
		
			
				|  |  | +          this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      // 更改表格颜色
 | 
	
		
			
				|  |  | -      headerClassName(tab) {
 | 
	
		
			
				|  |  | -        //颜色间隔
 | 
	
		
			
				|  |  | -        let back = ""
 | 
	
		
			
				|  |  | -        if (tab.columnIndex >= 0 && tab.column.level === 1) {
 | 
	
		
			
				|  |  | -          if (tab.columnIndex % 2 === 0) {
 | 
	
		
			
				|  |  | -            back = "back-one"
 | 
	
		
			
				|  |  | -          } else if (tab.columnIndex % 2 === 1) {
 | 
	
		
			
				|  |  | -            back = "back-two"
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  | +        confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +        cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          return removeBtrademodes(this.ids);
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +        .then(() => {
 | 
	
		
			
				|  |  | +          this.onLoad(this.page);
 | 
	
		
			
				|  |  | +          this.$message({
 | 
	
		
			
				|  |  | +            type: "success",
 | 
	
		
			
				|  |  | +            message: "操作成功!"
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    beforeOpen(done, type) {
 | 
	
		
			
				|  |  | +      if (["edit", "view"].includes(type)) {
 | 
	
		
			
				|  |  | +        getBtrademodesDetail(this.form.id).then(res => {
 | 
	
		
			
				|  |  | +          this.form = res.data.data;
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      done();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    searchReset() {
 | 
	
		
			
				|  |  | +      this.query = {};
 | 
	
		
			
				|  |  | +      this.onLoad(this.page);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    searchChange(params, done) {
 | 
	
		
			
				|  |  | +      this.query = params;
 | 
	
		
			
				|  |  | +      this.page.currentPage = 1;
 | 
	
		
			
				|  |  | +      this.onLoad(this.page, params);
 | 
	
		
			
				|  |  | +      done();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    selectionChange(list) {
 | 
	
		
			
				|  |  | +      this.selectionList = list;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    selectionClear() {
 | 
	
		
			
				|  |  | +      this.selectionList = [];
 | 
	
		
			
				|  |  | +      this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    currentChange(currentPage) {
 | 
	
		
			
				|  |  | +      this.page.currentPage = currentPage;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    sizeChange(pageSize) {
 | 
	
		
			
				|  |  | +      this.page.pageSize = pageSize;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    refreshChange() {
 | 
	
		
			
				|  |  | +      this.onLoad(this.page, this.query);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    onLoad(page, params = {}) {
 | 
	
		
			
				|  |  | +      this.loading = true;
 | 
	
		
			
				|  |  | +      getBtrademodesList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
 | 
	
		
			
				|  |  | +        const data = res.data.data;
 | 
	
		
			
				|  |  | +        this.page.total = data.total;
 | 
	
		
			
				|  |  | +        this.data = data.records;
 | 
	
		
			
				|  |  | +        this.loading = false;
 | 
	
		
			
				|  |  | +        this.selectionClear();
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    goBack() {
 | 
	
		
			
				|  |  | +      this.detailData = {}
 | 
	
		
			
				|  |  | +      this.isShow = true;
 | 
	
		
			
				|  |  | +      this.onLoad(this.page, this.search);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //自定义列保存
 | 
	
		
			
				|  |  | +    async saveColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | +      /**
 | 
	
		
			
				|  |  | +       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
 | 
	
		
			
				|  |  | +       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
 | 
	
		
			
				|  |  | +       * 一定要执行异步操作,要等接口成功返回,才能执行下一行编码
 | 
	
		
			
				|  |  | +       */
 | 
	
		
			
				|  |  | +      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
 | 
	
		
			
				|  |  | +      if (inSave) {
 | 
	
		
			
				|  |  | +        this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +        //关闭窗口
 | 
	
		
			
				|  |  | +        this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //自定义列重置
 | 
	
		
			
				|  |  | +    async resetColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | +      this[option] = this[optionBack];
 | 
	
		
			
				|  |  | +      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
 | 
	
		
			
				|  |  | +      if (inSave) {
 | 
	
		
			
				|  |  | +        this.$message.success("重置成功");
 | 
	
		
			
				|  |  | +        this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 更改表格颜色
 | 
	
		
			
				|  |  | +    headerClassName(tab) {
 | 
	
		
			
				|  |  | +      //颜色间隔
 | 
	
		
			
				|  |  | +      let back = ""
 | 
	
		
			
				|  |  | +      if (tab.columnIndex >= 0 && tab.column.level === 1) {
 | 
	
		
			
				|  |  | +        if (tab.columnIndex % 2 === 0) {
 | 
	
		
			
				|  |  | +          back = "back-one"
 | 
	
		
			
				|  |  | +        } else if (tab.columnIndex % 2 === 1) {
 | 
	
		
			
				|  |  | +          back = "back-two"
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        return back;
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -  };
 | 
	
		
			
				|  |  | -  </script>
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  <style lang="scss" scoped>
 | 
	
		
			
				|  |  | -  ::v-deep#out-table .back-one {
 | 
	
		
			
				|  |  | -    background: #ecf5ff !important;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -  ::v-deep#out-table .back-two {
 | 
	
		
			
				|  |  | -    background: #ecf5ff !important;
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      return back;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  |    
 | 
	
		
			
				|  |  | -  /deep/ .el-col-md-8 {
 | 
	
		
			
				|  |  | -    width: 24.33333%;
 | 
	
		
			
				|  |  | -  }
 | 
	
		
			
				|  |  | -  </style>
 | 
	
		
			
				|  |  | +<style lang="scss" scoped>
 | 
	
		
			
				|  |  | +::v-deep#out-table .back-one {
 | 
	
		
			
				|  |  | +  background: #ecf5ff !important;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +::v-deep#out-table .back-two {
 | 
	
		
			
				|  |  | +  background: #ecf5ff !important;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/deep/ .el-col-md-8 {
 | 
	
		
			
				|  |  | +  width: 24.33333%;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +</style>
 | 
	
		
			
				|  |  |    
 |