songshankun
2023-10-17 cdf783f0924c07b3555a90c36c140f902247c2b3
src/views/sales/refundForm/AddRefundFormDialog.vue
@@ -122,7 +122,7 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="付款方式" prop="paymentTypeId">
                <el-form-item label="退款方式" prop="paymentTypeId">
                  <div class="common-select">
                    <el-select
                      style="width: 100%"
@@ -315,7 +315,7 @@
import { getPaymentTypeList } from "@/api/common/payment"
import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"
import { getSalesReturnList } from "@/api/sales/salesReturn"
import { mapActions } from 'vuex';
import { mapActions } from "vuex"
export default {
  name: "AddRefundFormDialog",
@@ -374,7 +374,8 @@
      editSelCommonConfig: {
        editVisible: false,
        title: "",
        infomation: {}
        infomation: {},
        clientId: ""
      },
      clientId: this.editCommonConfig.infomation.client_id,
      sourceId: this.editCommonConfig.infomation.sourceId,
@@ -400,8 +401,8 @@
      this.formInfo()
    }
  },
  methods: {
    ...mapActions(["getReturnListFliter"]),
  methods: {
    ...mapActions(["getReturnListFliter"]),
    formInfo() {
      this.objCode.type = "销售退款编码"
      this.objCode.codeStandID = ""
@@ -419,14 +420,15 @@
    },
    async getPaymentTypeList() {
      await getPaymentTypeList().then((res) => {
        if (res.data.code === 200) {
          this.paymentTypeListOptions = res.data.data.data
        if (res.code === 200) {
          this.paymentTypeListOptions = res.data.data ?? []
        }
      })
    },
    // 保存
    saveClick(formName) {
      this.$refs[formName].validate((valid) => {
        this.validateFormNumber()
        if (valid) {
          console.log(this.editConfig.infomation)
          for (let i = 0; i < this.tableData.length; i++) {
@@ -483,9 +485,9 @@
          reason: data.reason || "",
          refundDate: data.refundDate || "",
          sourceId: this.sourceId || 0,
          sourceType: 1
        },
        codeRule: this.codeRule
          sourceType: 1,
          codeRule: this.codeRule
        }
      }
      return params
    },
@@ -515,13 +517,13 @@
    async handleSelectClient(value, item) {
      if (value === "client") {
        this.clientId = item.id
        console.log("客户名称",this.clientId,value,item)
        this.editSelCommonConfig.clientId = item.id
        console.log("客户名称", this.clientId, value, item)
        await getSalesReturnList({
          clientId:this.clientId
        }).then((res)=>{
          clientId: this.clientId
        }).then((res) => {
          this.getReturnListFliter(res.data.list)
        })
      } else if (value === "salesReturn") {
        console.log(item)
        this.editConfig.infomation.sale_return_nunber = item.number