| | |
| | | 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", |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | clientId:"" |
| | | clientId: "" |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | sourceId: this.editCommonConfig.infomation.sourceId, |
| | |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(["getReturnListFliter"]), |
| | | methods: { |
| | | ...mapActions(["getReturnListFliter"]), |
| | | formInfo() { |
| | | this.objCode.type = "销售退款编码" |
| | | this.objCode.codeStandID = "" |
| | |
| | | reason: data.reason || "", |
| | | refundDate: data.refundDate || "", |
| | | sourceId: this.sourceId || 0, |
| | | sourceType: 1 |
| | | }, |
| | | codeRule: this.codeRule |
| | | sourceType: 1, |
| | | codeRule: this.codeRule |
| | | } |
| | | } |
| | | return params |
| | | }, |
| | |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editSelCommonConfig.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 |
| | |
| | | editVisible: false, |
| | | title: "销售明细单", |
| | | infomation: {}, |
| | | clientId:"" |
| | | clientId: "" |
| | | }, |
| | | productId: 1, |
| | | isNoProduct: true, |
| | |
| | | returnDate: data.returnDate || "", |
| | | salesReturnStatusId: data.salesReturnStatusId || 0, |
| | | sourceId: this.SalesDetailsId, |
| | | sourceType: 1 |
| | | }, |
| | | codeRule: this.codeRule |
| | | sourceType: 1, |
| | | codeRule: this.codeRule |
| | | } |
| | | } |
| | | return params |
| | | }, |
| | |
| | | async handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editSelCommonConfig.clientId=item.id |
| | | this.editSelCommonConfig.clientId = item.id |
| | | await getSalesDetailsList({ |
| | | clientId: this.clientId |
| | | }).then((res) => { |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.editSelCommonConfig.clientId=row.id |
| | | this.editSelCommonConfig.clientId = row.id |
| | | await getSalesDetailsList({ |
| | | clientId: row.id |
| | | }).then((res) => { |
| | |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation={} |
| | | this.editConfig.infomation = {} |
| | | // this.editConfig.infomation.client_name = "" |
| | | // this.clientId = 0 |
| | | |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber="" |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.productTableList.tableData = [] |
| | | this.tableData = [] |
| | | this.SalesDetailsId = 0 |