yangfeng
2023-10-13 3d04f62e6c9124e2d37b5d09191a02fc6390d16f
src/views/sales/subOrder/DetailSubOrder.vue
@@ -9,7 +9,7 @@
    >
      <template slot="title">
        <div class="header">
          <span class="header-label">单据编号</span>
          <span class="header-label">销售子单</span>
          <span class="header-title">{{ detailConfig.infomation.number }}</span>
        </div>
      </template>
@@ -37,18 +37,18 @@
                <li v-for="(item, i) in basicInfoList" :key="i">
                  <div class="left">
                    <div class="content-title">{{ item.leftStr + ":" }}</div>
                    <div class="content-data">{{ item.leftValue }}</div>
                    <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
                  </div>
                  <div class="right">
                    <div class="content-title">{{ item.rightStr }}</div>
                    <div class="content-data">{{ item.rightValue }}</div>
                  <div v-if="item.rightStr" class="right">
                    <div class="content-title">{{ item.rightStr + ":" }}</div>
                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                  </div>
                </li>
              </ul>
            </div>
          </div>
          <!-- 附件信息 -->
          <div class="basic-info">
          <!-- <div class="basic-info">
            <div class="basic-info-label" @click="expandClick('annex')">
              <i v-if="isAnnexExpand" class="el-icon-arrow-down"></i>
              <i v-else class="el-icon-arrow-up"></i>
@@ -64,7 +64,7 @@
                </li>
              </ul>
            </div>
          </div>
          </div> -->
          <!-- 产品管理 -->
          <div class="basic-info">
            <div class="basic-info-label" @click="expandClick('product')">
@@ -83,7 +83,7 @@
          </div>
        </div>
        <div v-if="activeName === 'detail'" class="second">
          <SalesDetails :isDetail="true" />
          <SalesDetails :isDetail="true" :add-config="addConfig" />
        </div>
      </div>
    </el-drawer>
@@ -93,6 +93,7 @@
<script>
import SalesDetails from "@/views/sales/salesDetails"
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
export default {
  name: "DetailSubOrder",
  props: {
@@ -119,31 +120,41 @@
      showSummary: {
        show: true,
        total: true,
        sumProp: ["other1", "other2", "other3", "other4"],
        mergeNumber: 3
        sumProp: ["amount", "price", "total"],
        mergeNumber: 1
      },
      productTableList: {}
      productTableList: {},
      addConfig: {}
    }
  },
  created() {
    this.setData()
    this.setData(this.detailConfig.infomation)
    this.addConfig = {
      keywordType: "销售子单",
      keyword: this.detailConfig.infomation.number,
      id: this.detailConfig.infomation.id,
      client_name: this.detailConfig.infomation.client.name,
      contact_name: this.detailConfig.infomation.contact_name,
      client_id: this.detailConfig.infomation.client_id,
      contact_id: this.detailConfig.infomation.contact_id
    }
    this.setTableForm()
  },
  mounted() {},
  methods: {
    setData() {
    setData(item) {
      this.basicInfoList = [
        {
          leftStr: "客户名称",
          leftValue: "",
          leftValue: item.client.name,
          rightStr: "单据编号",
          rightValue: ""
          rightValue: item.number
        },
        {
          leftStr: "销售总单",
          leftValue: "",
          leftValue: item.masterOrder.number,
          rightStr: "负责人",
          rightValue: ""
          rightValue: item.member.username
        },
        {
          leftStr: "创建人",
@@ -156,19 +167,19 @@
          leftValue: "",
          rightStr: "更新时间",
          rightValue: ""
        },
        {
          leftStr: "审批状态",
          leftValue: "",
          rightStr: "最新审批时间",
          rightValue: ""
        },
        {
          leftStr: "上一步审批人",
          leftValue: "",
          rightStr: "当前审批人",
          rightValue: ""
        }
        // {
        //   leftStr: "审批状态",
        //   leftValue: "",
        //   rightStr: "最新审批时间",
        //   rightValue: ""
        // },
        // {
        //   leftStr: "上一步审批人",
        //   leftValue: "",
        //   rightStr: "当前审批人",
        //   rightValue: ""
        // }
      ]
    },
    handleClose() {
@@ -191,33 +202,13 @@
    },
    setTableForm() {
      this.productTableList = {
        tableData: [
          {
            id: "1",
            productName: "上海有限公司",
            other0: "ZDYBD03-1",
            other1: "12",
            other2: "5.00",
            other4: "3.00",
            other3: "2.00"
          }
        ],
        tableData: this.detailConfig.infomation.products,
        tableColumn: [
          { label: "#", prop: "id", width: 40 },
          { label: "含税单价", prop: "other9", input: true },
          { label: "产品名称", prop: "productName", input: true, isRequird: true },
          { label: "产品编号", prop: "other0" },
          { label: "数量", prop: "other1", input: true, isRequird: true },
          { label: "折扣率(%)", prop: "other6", input: true },
          { label: "不含税单价", prop: "other7", input: true },
          { label: "折扣额", prop: "other2" },
          { label: "税(销售)", prop: "other7", input: true },
          { label: "实际含税单价", prop: "other3" },
          { label: "不含税金额", prop: "other4" },
          { label: "价税合计", prop: "other3", input: true },
          { label: "描述", prop: "other8" },
          { label: "源单类型", prop: "other5" },
          { label: "源单", prop: "other6" }
          { label: "产品名称", prop: "name", productName: true, isRequird: true },
          { label: "产品编号", prop: "number" },
          { label: "数量", prop: "amount", inputNumber: true, isRequird: true },
          { label: "销售单价", prop: "price", inputFloat: true },
          { label: "价税合计", prop: "total", inputFloat: true }
        ]
      }
    }