yangfeng
2023-10-16 41caae7f39a404c61d460e608592cf17bca1f332
销售退货单bug修复(5219)
2个文件已修改
75 ■■■■ 已修改文件
src/views/sales/salesReturn/AddSalesReturnDialog.vue 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesReturn/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesReturn/AddSalesReturnDialog.vue
@@ -68,7 +68,7 @@
              </el-col>
              <el-col :span="12">
                <el-form-item label="销售明细单">
                <el-form-item label="销售明细单" prop="salesDetailNumber">
                  <div class="custom-name">
                    <el-autocomplete
                      style="width: 100%"
@@ -85,7 +85,9 @@
                      <i class="el-icon-circle-plus-outline" title="选择"></i>
                    </div>
                    <div
                      v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0"
                      v-if="
                        editConfig.infomation.salesDetailNumber && editConfig.infomation.salesDetailNumber.length > 0
                      "
                      class="common-select-btn"
                      @click="clearupClient('contract')"
                    >
@@ -209,6 +211,7 @@
          </div>
          <div class="product-view">
            <CommonFormTableView
              :detail-enter="true"
              :show-summary="showSummary"
              :product-table-list="productTableList"
              @inputContent="inputContent"
@@ -245,7 +248,7 @@
import { getAllData } from "@/api/client/client"
import { getAddSalesReturn, getUpdateSalesReturn } from "@/api/sales/salesReturn"
import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import { getProductList } from "@/api/common/other"
// import { getProductList } from "@/api/common/other"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
import { getSalesDetailsList } from "@/api/sales/salesDetails"
@@ -280,9 +283,10 @@
      dialogWidth: "50%",
      editConfig: this.editCommonConfig,
      rules: {
        number: [{ required: true, message: "请输入", trigger: "blur" }],
        repository: [{ required: true, message: "请选择", trigger: "change" }],
        memberId: [{ required: true, message: "请选择负责人", trigger: "change" }]
        number: [{ required: true, message: "请输入销售退货单号", trigger: "blur" }],
        repository: [{ required: true, message: "请选择退入仓库", trigger: "change" }],
        memberId: [{ required: true, message: "请选择负责人", trigger: "change" }],
        salesDetailNumber: [{ required: true, message: "请选择销售明细单", trigger: "change" }]
      },
      memberOptions: [],
      selSourceOrderOptions: [], // 选择源单
@@ -317,8 +321,11 @@
    this.$store.dispatch("geSalesDetails")
    this.setTableForm()
    this.getCommonData()
    this.getProductList()
    // this.getProductList()
    this.formInfo()
    if (this.editConfig.title === "编辑") {
      this.productTableList.tableData = this.editConfig.infomation.products
    }
  },
  watch: {
    "editClientManageConfig.visible"(val) {
@@ -352,32 +359,32 @@
        })
    },
    // 获取产品列表
    async getProductList() {
      await getProductList({
        page: 1,
        pageSize: 15,
        productName: "",
        productNumber: "",
        // clientId:"100"
      }).then((res) => {
      })
    },
    // async getProductList() {
    //   await getProductList({
    //     page: 1,
    //     pageSize: 15,
    //     productName: "",
    //     productNumber: ""
    //   }).then((res) => {
    //     console.log(res)
    //   })
    // },
    // 保存
    saveClick(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          console.log(this.editConfig.infomation)
          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 {
          // 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()
            console.log(params)
            if (this.editConfig.title === "新建") {
@@ -400,10 +407,10 @@
              })
            }
          }
        } else {
          console.log("error submit")
          return false
        }
        // } else {
        //   console.log("error submit")
        //   return false
        // }
      })
    },
    saveParams() {
@@ -457,10 +464,10 @@
        }).then((res)=>{
          this.getSalesDetailsFliter(res.data.list)
        })
      } else if (value === "contract") {
        console.log(item,item.number,"选择框66")
        this.productTableList.tableData=item.products
        this.tableData = item.products
        this.SalesDetailsId = item.id
      }
    },
src/views/sales/salesReturn/index.vue
@@ -250,7 +250,7 @@
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.infomation = { ...row, currency: "人民币" }
      this.editConfig.infomation = { ...row, currency: "人民币", salesDetailNumber: row.source.number }
    },
    // 删除
    delClick(rowID) {