<template>
  <!-- 销售订单详细页面 -->
  <div class="salePlan">
    <div class="main">
      <span class="text">销售订单物资信息</span>
    </div>

    <dilTable v-bind.sync="option">
      <el-table-column fixed="right" label="操作" width="100">
        <template slot-scope="scope">
          <el-button
            @click="editaddressclick(scope.row.saleOrderMaterialId)"
            type="text"
            size="small"
            >修改地址</el-button
          >
        </template>
      </el-table-column>
    </dilTable>
    <div class="button-box">
      <el-button @click="onClickCancel">返回</el-button>
    </div>
  </div>
</template>
<script>
export default {
  name: "salePlan",
  data() {
    return {
      option: {
        // 表格请求数据的地址
        requestUrl:
          "/api/v1/ams/getSaleOrderDetail?apiId=100&saleOrderId=" +
          this.$route.params.saleOrderId,
      },
    };
  },
  methods: {
    //修改收货地址
    editaddressclick(saleOrderMaterialId) {
      this.$router.push("/editaddress/" + saleOrderMaterialId);
    },
    // 返回
    onClickCancel() {
      this.$router.go(-1);
    },
  },
};
</script>
<style lang='scss' scoped>
.button-box{
  display: flex;
  text-align: center;
  align-items: center;
  justify-content: center;
  margin-top: 0.3125rem;
  margin-bottom: 1.25rem;
}
</style>