yangfeng
2023-08-30 5bcbd90662d19331a4dde9047d2aa52e8ab5666c
bug修复(4825 4830)
2个文件已修改
60 ■■■■■ 已修改文件
src/views/supplierManage/supplier/AddNewProduct.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/DetailSupplier.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/supplierManage/supplier/AddNewProduct.vue
@@ -76,27 +76,39 @@
    // 保存
    saveClick() {
      console.log(this.editConfig.infomation)
      if (this.editConfig.title === "添加") {
        createProduct({
          list: this.tableData
        }).then((res) => {
          console.log(res)
          this.editConfig.visible = false
          if (res.code === 200) {
            this.$message.success("添加成功")
            this.$parent.getProductList()
          }
        })
      for (let i = 0; i < this.tableData.length; i++) {
        if (this.tableData[i].name.length === 0) {
          this.isNoProduct = true
          break
        } else {
          this.isNoProduct = false
        }
      }
      if (this.isNoProduct) {
        this.$message.error("产品名称不能为空")
      } else {
        const params = this.saveParams()
        updateProduct(params).then((res) => {
          console.log(res)
          this.editConfig.visible = false
          if (res.code === 200) {
            this.$message.success("编辑成功")
            this.$parent.getProductList()
          }
        })
        if (this.editConfig.title === "添加") {
          createProduct({
            list: this.tableData
          }).then((res) => {
            console.log(res)
            this.editConfig.visible = false
            if (res.code === 200) {
              this.$message.success("添加成功")
              this.$parent.getProductList()
            }
          })
        } else {
          const params = this.saveParams()
          updateProduct(params).then((res) => {
            console.log(res)
            this.editConfig.visible = false
            if (res.code === 200) {
              this.$message.success("编辑成功")
              this.$parent.getProductList()
            }
          })
        }
      }
    },
    saveParams() {
src/views/supplierManage/supplier/DetailSupplier.vue
@@ -43,7 +43,9 @@
              </ul>
              <div class="business_scope">
                <div class="content-title">{{ "详细地址" }}</div>
                <div class="content-data">{{ record ? record : "--" }}</div>
                <div class="content-data">
                  {{ detailConfig.infomation.detailAddress ? detailConfig.infomation.detailAddress : "--" }}
                </div>
              </div>
            </div>
          </div>
@@ -173,9 +175,9 @@
      this.dynamicInfoList = [
        {
          leftStr: "户名",
          leftValue: this.accountName,
          leftValue: item.accountName,
          rightStr: "开户行",
          rightValue: this.bank
          rightValue: item.bank
        },
        {
          leftStr: "账号",