| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="退款日期" prop="refundDate"> |
| | | <el-date-picker v-model="editConfig.infomation.refundDate" type="date" placeholder="选择日期"> |
| | | <el-date-picker |
| | | v-model="editConfig.infomation.refundDate" |
| | | value-format="yyyy-MM-dd" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="付款方式" prop="refundMethod"> |
| | | <el-form-item label="付款方式" prop="paymentTypeId"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.refundMethod" |
| | | v-model="editConfig.infomation.paymentTypeId" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | |
| | | <el-option v-for="item in refundMethodOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <div class="common-select-btn"><i class="el-icon-setting"></i></div> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-option v-for="item in accountOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <div class="common-select-btn"><i class="el-icon-setting"></i></div> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option v-for="item in isInvoiceOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | <el-option v-for="item in isInvoiceOptions" :key="item" :label="item" :value="item"> </el-option> |
| | | </el-select> |
| | | <div class="common-select-btn"><i class="el-icon-setting"></i></div> |
| | | <!-- <div class="common-select-btn"><i class="el-icon-setting"></i></div> --> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-row> |
| | | </div> |
| | | <!-- 附件信息 --> |
| | | <div class="basic-info-title">附件信息</div> |
| | | <!-- <div class="basic-info-title">附件信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> --> |
| | | <!-- 产品管理 --> |
| | | <div class="basic-info-title" style="display: flex"> |
| | | 产品管理 |
| | |
| | | // selSourceOrderOptions: [{ value: "1", label: "销售退货单" }], // 选择源单 |
| | | refundMethodOptions: [], // 付款方式 |
| | | accountOptions: [], // 账户 |
| | | isInvoiceOptions: [], // 是否开票 |
| | | isInvoiceOptions: ["是", "否"], // 是否开票 |
| | | currencyOptions: [], // 币种 |
| | | approvalWorkflowOptions: [], // 审批流程 |
| | | productTableList: {}, |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | } |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.memberOptions = res.data.member |
| | | this.refundMethodOptions = res.data.refundMethod |
| | | this.accountOptions = res.data.accountId |
| | | this.isInvoiceOptions = res.data.isInvoice |
| | | // this.isInvoiceOptions = res.data.isInvoice |
| | | this.currencyOptions = res.data.currency |
| | | }) |
| | | .catch((err) => { |
| | |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSalesRefund(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getAddSalesRefund(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } else { |
| | | getUpdateSalesRefund(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "编辑成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | getUpdateSalesRefund(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | salesRefund: { |
| | | accountId: data.accountId || 0, |
| | | clientId: parseInt(data.clientId) || 0, |
| | | isInvoice: data.isInvoice || 0, |
| | | clientId: this.clientId || 0, |
| | | isInvoice: data.isInvoice || "", |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | | products: [ |
| | | { |
| | | amount: 0, |
| | | desc: "", |
| | | id: 0, |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | } |
| | | ], |
| | | products: data.products || [], |
| | | reason: data.reason || "", |
| | | refundDate: data.refundDate || "", |
| | | refundMethod: data.refundMethod || "" |
| | |
| | | } |
| | | }, |
| | | handleSelectClient(item) { |
| | | this.editConfig.infomation.client_id = item.id |
| | | this.clientId = item.id |
| | | }, |
| | | selClientClick() { |
| | | this.editSelectClientConfig.editVisible = true |
| | |
| | | selClient(row) { |
| | | console.log(row) |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.editConfig.infomation.client_id = row.id |
| | | this.clientId = row.id |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.editConfig.infomation.client_id = 0 |
| | | this.clientId = 0 |
| | | }, |
| | | // 添加附件 |
| | | addAnnexClick() {}, |