yangfeng
2023-08-16 1249ca8ff44f8de7992fdb5866eae19613d606c3
src/views/service/serviceContract/AddServiceContractDialog.vue
@@ -163,7 +163,7 @@
                      <el-option v-for="item in contractTypeOptions" :key="item.id" :label="item.name" :value="item.id">
                      </el-option>
                    </el-select>
                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                  </div>
                </el-form-item>
              </el-col>
@@ -223,7 +223,7 @@
                      >
                      </el-option>
                    </el-select>
                    <div class="common-select-btn"><i class="el-icon-setting"></i></div>
                    <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> -->
                  </div>
                </el-form-item>
              </el-col>
@@ -267,7 +267,7 @@
            </el-row>
          </div>
          <!-- 附件信息 -->
          <div class="basic-info-title">附件信息</div>
          <!-- <div class="basic-info-title">附件信息</div>
          <div class="basic-info-view">
            <el-row>
              <el-col :span="12">
@@ -292,7 +292,7 @@
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          </div> -->
          <!-- 产品管理 -->
          <div class="basic-info-title" style="display: flex">
            产品管理
@@ -305,7 +305,11 @@
            </div>
          </div>
          <div class="product-view">
            <CommonFormTableView :show-summary="showSummary" :product-table-list="productTableList" />
            <CommonFormTableView
              :show-summary="showSummary"
              :product-table-list="productTableList"
              @addProductClick="addProductClick"
            />
          </div>
          <!-- 选择审批流程 -->
          <!-- <div class="basic-info-title">选择审批流程</div>
@@ -475,7 +479,8 @@
      contactId: this.editCommonConfig.infomation.contactId,
      saleChanceId: this.editCommonConfig.infomation.saleChanceId,
      contractId: this.editCommonConfig.infomation.salesDetailsId,
      quotationId: this.editCommonConfig.infomation.quotationId
      quotationId: this.editCommonConfig.infomation.quotationId,
      tableData: []
    }
  },
  created() {
@@ -620,11 +625,9 @@
      } else if (value === "contract") {
        this.editSelCommonConfig.title = "销售明细单"
        this.editSelCommonConfig.editVisible = true
        this.editSelCommonConfig.tableInfomation = [...this.salesDetailsList]
      } else if (value === "quotation") {
        this.editSelCommonConfig.title = "报价单"
        this.editSelCommonConfig.editVisible = true
        this.editSelCommonConfig.tableInfomation = [...this.quotationList]
      }
    },
    selClient(row, value) {
@@ -670,36 +673,50 @@
    // 设置允许上传文件格式
    setFormatClick() {},
    setTableForm() {
      this.productTableList = {
        tableData: [
      if (this.editConfig.title === "新建") {
        this.tableData = [
          {
            id: "1",
            productName: "上海有限公司",
            other0: "ZDYBD03-1",
            other1: "12",
            other2: "5.00",
            other4: "3.00",
            other3: "2.00"
            Amount: 0,
            IsSale: true,
            MaterialMode: "",
            MinInventory: 0,
            Name: "",
            Number: "",
            PurchaseType: "",
            SalePrice: 0,
            Unit: ""
          }
        ],
        ]
      } else {
        this.tableData = this.editConfig.infomation.products
      }
      this.productTableList = {
        tableData: this.tableData,
        tableColumn: [
          { label: "#", prop: "id", width: 40 },
          { label: "产品名称", prop: "productName", input: true, isRequird: true },
          { label: "产品编号", prop: "other0" },
          { label: "产品名称", prop: "Name", input: true, isRequird: true },
          { label: "产品编号", prop: "Number" },
          { label: "服务开始日", prop: "other5", date: true, isRequird: true, min: 100 },
          { label: "服务到期日", prop: "other6", date: true, isRequird: true, min: 100 },
          { label: "数量", prop: "other1", input: true, isRequird: true },
          { label: "含税单价", prop: "other9", input: true },
          { label: "不含税单价", prop: "other7", input: true },
          { label: "折扣率(%)", prop: "other6", input: true },
          { label: "折扣额", prop: "other2" },
          { label: "税(销售)", prop: "other7", input: true },
          { label: "实际含税单价", prop: "other3" },
          { label: "不含税金额", prop: "other4" },
          { label: "数量", prop: "amount", input: true, isRequird: true },
          { label: "销售单价", prop: "Unit", input: true },
          { label: "价税合计", prop: "other3", input: true },
          { label: "描述", prop: "other8" }
        ]
      }
    },
    addProductClick() {
      this.tableData.push({
        Amount: 0,
        IsSale: true,
        MaterialMode: "",
        MinInventory: 0,
        Name: "",
        Number: "",
        PurchaseType: "",
        SalePrice: 0,
        Unit: ""
      })
    }
  }
}