loulijun2021
2022-09-01 99a010f21d278498bafd248217c584e101db2d8f
src/views/jcsz/wldw.vue
@@ -2,14 +2,16 @@
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup">
      <div class="bodyTopButtonGroup" style="justify-content: space-between">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button
          icon="el-icon-refresh-right"
          @click="syncSeaveSearchPartner"
        >同步往来单位
        </el-button>
        <el-button icon="el-icon-download" @click="upload">导入</el-button>
        <div style="display: flex">
          <el-button
            icon="el-icon-refresh-right"
            @click="syncSeaveSearchPartner"
          >同步往来单位
          </el-button>
          <el-button icon="el-icon-download" @click="upload">导入</el-button>
        </div>
      </div>
      <div class="bodyTopFormGroup">
@@ -93,53 +95,74 @@
            width="240"
          >
            <!--            sortable="custom"-->
            <el-table-column
              prop="mtype"
              width="80"
            >
              <template slot-scope="{row}">
                <div v-if="row.mtype==='WG'">外购供方</div>
                <div v-else>/</div>
              </template>
            </el-table-column>
            <el-table-column
              prop="btype"
              width="80"
            >
              <template slot-scope="{row}">
                <div v-if="row.btype==='WX'">外协供方</div>
                <div v-else>/</div>
              </template>
            </el-table-column>
            <el-table-column
              prop="htype"
              width="80"
            >
              <template slot-scope="{row}">
            <template slot-scope="{row}">
              <div style="display: flex;justify-content: flex-start">
                <div v-if="row.mtype==='WG'" style="margin-right: 15px">外购供方</div>
                <div v-if="row.btype==='WX'" style="margin-right: 15px;">外协供方</div>
                <div v-if="row.htype==='KH'">客户</div>
                <div v-else>/</div>
              </template>
            </el-table-column>
              </div>
            </template>
            <!--            <el-table-column-->
            <!--              prop="mtype"-->
            <!--              width="80"-->
            <!--            >-->
            <!--              <template slot-scope="{row}">-->
            <!--                <div v-if="row.mtype==='WG'">外购供方</div>-->
            <!--                <div v-else>/</div>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
            <!--            <el-table-column-->
            <!--              prop="btype"-->
            <!--              width="80"-->
            <!--            >-->
            <!--              <template slot-scope="{row}">-->
            <!--                <div v-if="row.btype==='WX'">外协供方</div>-->
            <!--                <div v-else>/</div>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
            <!--            <el-table-column-->
            <!--              prop="htype"-->
            <!--              width="80"-->
            <!--            >-->
            <!--              <template slot-scope="{row}">-->
            <!--                <div v-if="row.htype==='KH'">客户</div>-->
            <!--                <div v-else>/</div>-->
            <!--              </template>-->
            <!--            </el-table-column>-->
          </el-table-column>
          <el-table-column
            prop="conttacts"
            label="联系人"
            width="110"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.conttacts">{{ row.conttacts }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="conttphone"
            label="联系方式"
            width="160"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.conttphone">{{ row.conttphone }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="addr"
            min-width="160"
            label="补充描述"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              <div v-if="row.addr">{{ row.addr }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            label="创建人员"
@@ -172,12 +195,11 @@
      </div>
      <!--分页-->
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getCurrentUnitSearch"
      />
@@ -460,6 +482,9 @@
        DeleteCurrentUnit({ unitcode: row.code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getCurrentUnitSearch()
          }
        })