zuozhengqing
2023-11-06 b39bf36c1c380285582b7daffb5dd656aa1e1389
src/views/sales/refundForm/AddRefundFormDialog.vue
@@ -362,7 +362,7 @@
      editConfig: this.editCommonConfig,
      rules: {
        client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }],
        number: [{ required: true,  validator: this.validateCheckCode, trigger: "blur" }],
        number: [{ required: true,  validator: this.validateCheckCode, trigger: ["blur",'change'] }],
        refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }],
        memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }],
        sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }]
@@ -412,9 +412,6 @@
        this.formInfo()
      }
    },
    "editClientManageConfig.infomation.codeStandID"() {
      this.formInfo()
    }
  },
  methods: {
    ...mapActions(["getReturnListFliter"]),
@@ -427,35 +424,34 @@
      this.getRCodeStandardList()
      this.getBankAccountList()
    },
    getCommonData() {
      getAllData().then((res) => {
        this.memberOptions = res.data.member
        // this.accountOptions = res.data.accountId
      })
    async getCommonData() {
      const res=await getAllData()
      if(res.code==200){
        this.memberOptions = res.data.member? res.data.member:[]
      }
      this.$set(this.editConfig.infomation,'memberId',this.editConfig.infomation.memberId)
      this.getPaymentTypeList()
    },
    async getPaymentTypeList() {
      await getPaymentTypeList().then((res) => {
    getPaymentTypeList() {
       getPaymentTypeList().then(res=>{
        if (res.code === 200) {
          this.paymentTypeListOptions = res.data.data ?? []
        }
        this.$set(this.editConfig.infomation,'paymentTypeId',this.editConfig.infomation.paymentTypeId)
      })
    },
    async getBankAccountList() {
      await getBankAccountList().then((res) => {
        console.log("账户")
        console.log('账户',res)
    getBankAccountList() {
      getBankAccountList().then(res=>{
        if (res.code === 200) {
          this.accountOptions = res.data.data
          this.accountOptions = res.data.data? res.data.data:[]
        }
        this.$set(this.editConfig.infomation,'bankAccountId',this.editConfig.infomation.bankAccountId)
      })
    },
    // 保存
    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++) {
            if (this.tableData[i].name.length === 0) {
              this.isNoProduct = true
@@ -468,7 +464,6 @@
            this.$message.error("产品名称不能为空")
          } else {
            const params = this.saveParams()
            console.log(params)
            if (this.editConfig.title === "新建") {
              getAddSalesRefund(params).then((res) => {
                console.log(res)
@@ -511,7 +506,6 @@
          refundDate: data.refundDate || "",
          sourceId: this.sourceId || 0,
          sourceType: 1,
          codeRule: this.codeRule
        }
      }
      return params