yangfeng
2023-08-24 b7968858014ab02aa91e52e63c2a266963d3a8f9
src/views/service/serviceContract/DetailServiceContract.vue
@@ -25,7 +25,6 @@
            <el-tab-pane label="收款单" name="receipt"></el-tab-pane>
            <el-tab-pane label="客户服务单" name="clientService"> </el-tab-pane>
            <el-tab-pane label="销售发票" name="invoice"></el-tab-pane>
            <el-tab-pane label="销售子单" name="sub"></el-tab-pane>
          </el-tabs>
        </div>
        <div v-if="activeName === 'first'" class="detail">
@@ -41,11 +40,11 @@
                <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>
@@ -63,11 +62,11 @@
                <li v-for="(item, i) in dynamicInfoList" :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>
@@ -84,9 +83,10 @@
              <div class="termsConditions">
                <div class="content-title">{{ "条款与条约" + ":" }}</div>
                <div class="content-termsConditions">
                  <ul>
                  {{ "\n" + detailConfig.infomation.terms }}
                  <!-- <ul>
                    <li v-for="(item, index) in Status.serviceContract" :key="index">{{ item }}</li>
                  </ul>
                  </ul> -->
                </div>
              </div>
            </div>
@@ -103,14 +103,14 @@
                <li>
                  <div class="left remark">
                    <div class="content-title">{{ "备注:" }}</div>
                    <div class="content-data">{{ "" }}</div>
                    <div class="content-data">{{ detailConfig.infomation.remark }}</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>
@@ -126,7 +126,7 @@
                </li>
              </ul>
            </div>
          </div>
          </div> -->
          <!-- 产品管理 -->
          <div class="basic-info">
            <div class="basic-info-label" @click="expandClick('product')">
@@ -145,19 +145,16 @@
          </div>
        </div>
        <div v-if="activeName === 'collection'" class="second">
          <!-- <FollowupRecords :isDetail="true" /> -->
          <CollectionPlan :isDetail="true" :add-config="addConfig" :source-type="2" />
        </div>
        <div v-if="activeName === 'receipt'" class="second">
          <!-- <FollowupRecords :isDetail="true" /> -->
          <Receipt :isDetail="true" :add-config="addConfig" :source-type="2" />
        </div>
        <div v-if="activeName === 'clientService'" class="second">
          <ClientServiceOrder :isDetail="true" />
          <ClientServiceOrder :isDetail="true" :add-config="addConfig" />
        </div>
        <div v-if="activeName === 'invoice'" class="second">
          <!-- <FollowupRecords :isDetail="true" /> -->
        </div>
        <div v-if="activeName === 'sub'" class="second">
          <SubOrder :isDetail="true" />
          <SaleInvoice :isDetail="true" :add-config="addConfig" :source-type="2" />
        </div>
      </div>
    </el-drawer>
@@ -166,9 +163,11 @@
<script>
import ClientServiceOrder from "@/views/service/clientServiceOrder"
import SubOrder from "@/views/sales/subOrder"
import Status from "@/common/const/salesFixedStatus"
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import CollectionPlan from "@/views/other/payment/collectionPlan"
import Receipt from "@/views/other/payment/receipt"
import SaleInvoice from "@/views/other/payment/saleInvoice"
export default {
  name: "DetailSpecification",
  props: {
@@ -182,7 +181,7 @@
      }
    }
  },
  components: { ClientServiceOrder, SubOrder, CommonFormTableView },
  components: { ClientServiceOrder, CommonFormTableView, CollectionPlan, Receipt, SaleInvoice },
  computed: {},
  data() {
    return {
@@ -201,43 +200,54 @@
      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,
      amountTotal: this.detailConfig.infomation.amountTotal
    }
    this.setTableForm()
  },
  mounted() {},
  methods: {
    setData() {
    setData(item) {
      this.basicInfoList = [
        {
          leftStr: "客户名称",
          leftValue: "",
          leftValue: item.client_name,
          rightStr: "服务合同编号",
          rightValue: ""
          rightValue: item.number
        },
        {
          leftStr: "负责人",
          leftValue: "",
          leftValue: item.member.username,
          rightStr: "联系人姓名",
          rightValue: ""
          rightValue: item.contact.name
        },
        {
          leftStr: "销售机会",
          leftValue: "",
          leftValue: item.SaleChance.name,
          rightStr: "合同订单",
          rightValue: ""
          rightValue: item.salesDetails.number
        },
        {
          leftStr: "报价单",
          leftValue: "",
          leftValue: item.quotation.number,
          rightStr: "合同类型",
          rightValue: ""
          rightValue: item.serviceContractType
        },
        {
          leftStr: "合同发起人",
@@ -247,19 +257,19 @@
        },
        {
          leftStr: "签约日期",
          leftValue: "",
          leftValue: item.signTime,
          rightStr: "服务开始日期",
          rightValue: ""
          rightValue: item.startTime
        },
        {
          leftStr: "创建人",
          leftValue: "",
          rightStr: "服务到期日",
          rightValue: ""
          rightValue: item.endTime
        },
        {
          leftStr: "创建时间",
          leftValue: "",
          leftValue: item.createTime,
          rightStr: "数量合计",
          rightValue: ""
        }
@@ -269,25 +279,25 @@
          leftStr: "审批状态",
          leftValue: "",
          rightStr: "合同状态",
          rightValue: ""
          rightValue: item.serviceContractStatus
        },
        {
          leftStr: "已服务次数",
          leftValue: "",
          leftValue: item.serviceTimes,
          rightStr: "应服务次数",
          rightValue: ""
        },
        {
          leftStr: "已收总额",
          leftValue: "",
          leftValue: item.amountReceived,
          rightStr: "应收余额",
          rightValue: ""
          rightValue: item.amountReceivable
        },
        {
          leftStr: "已开票金额",
          leftValue: "",
          leftValue: item.amountInvoiced,
          rightStr: "未开票金额",
          rightValue: ""
          rightValue: item.amountUnInvoiced
        }
      ]
    },
@@ -304,7 +314,7 @@
      if (value === "basic") {
        this.isBasicExpand = !this.isBasicExpand
      } else if (value === "dynamic") {
        this.isDynamicExpand = !this.isLabelExpand
        this.isDynamicExpand = !this.isDynamicExpand
      } else if (value === "delivery") {
        this.isDeliveryExpand = !this.isDeliveryExpand
      } else if (value === "termsConditions") {
@@ -319,33 +329,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 }
        ]
      }
    }
@@ -499,6 +489,7 @@
              align-items: center;
              font-size: 14px;
              font-family: PingFangSC;
              min-height: 40px;
              // padding: 5px 0;
              .content-title {
                width: 320px;
@@ -506,13 +497,14 @@
                color: #555;
              }
              .content-termsConditions {
                margin-left: 25px;
                margin: 0px 25px 15px;
                font-size: 13px;
                color: #333;
                li {
                  margin: 5px 0;
                  border-bottom: 0px solid #f9f9fb;
                }
                white-space: pre-wrap;
                // li {
                //   margin: 5px 0;
                //   border-bottom: 0px solid #f9f9fb;
                // }
              }
            }
          }