Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into wn
| | |
| | | } |
| | | }, |
| | | (error) => { |
| | | if (error.response.status === 401){ |
| | | if (isDev){ |
| | | alert("JWT失效") |
| | | }else { |
| | | // JWT鉴权失效 跳转到登录页 |
| | | window.location = getApsPage()+'/login' |
| | | } |
| | | } |
| | | |
| | | let { message } = error |
| | | if (message === "Network Error") { |
| | | message = "后端接口连接异常" |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | search_map:{}, |
| | | search_map: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | tableList: [], |
| | | searchSelOptions: [], |
| | | loading: false, |
| | | search_map: {}, |
| | | // search_map: {}, |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", isContactClick: true, default: true }, // 联系人姓名 |
| | | { label: "联系人编号", prop: "number" }, // 联系人编号 |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContactList({ |
| | | search_map: this.editCommonConfig.search_map, |
| | | search_map: this.editConfig.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | this.editConfig.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.editConfig.search_map = {} |
| | | this.getData() |
| | | } |
| | | } |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | search_map:{}, |
| | | search_map: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getSalesLeadsList({ |
| | | search_map: this.editCommonConfig.search_map, |
| | | search_map: this.editConfig.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | this.editConfig.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.editConfig.search_map = {} |
| | | this.getData() |
| | | } |
| | | } |
| | |
| | | } else { |
| | | this.serviceContractId = this.addConfig.id |
| | | } |
| | | // this.getData() |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | console.log(this.addConfig) |
| | | await getCollectionPlanList({ |
| | | serviceContractId: this.serviceContractId |
| | | sourceType: this.addConfig.keywordType === "销售明细单" ? 1 : 2, |
| | | sourceId: this.addConfig.id |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.data && res.data.data.data.length > 0) { |
| | | const list = res.data.data.data.map((item) => { |
| | | if (res.code === 200) { |
| | | if (res.data.data && res.data.data.length > 0) { |
| | | const list = res.data.data.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.count |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | 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 |
| | |
| | | }, |
| | | async getCityList(val, value) { |
| | | await getCityList({ province_id: val }).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.cityOptions = res.data.data.list |
| | | if (res.code === 200) { |
| | | this.cityOptions = res.data.list |
| | | if (value === "sel") { |
| | | this.editConfig.infomation.city_id = "" |
| | | } |
| | |
| | | :edit-common-config="editSelectClientConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 选择合同订单 --> |
| | | <!-- 销售明细单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | |
| | | }, |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | 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) => { |
| | | 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 |
| | |
| | | this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | | async selClient(row, value) { |
| | | console.log(row, value) |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.editSelCommonConfig.clientId = row.id |
| | | await getSalesDetailsList({ |
| | | clientId: row.id |
| | | }).then((res) => { |
| | | this.getSalesDetailsFliter(res.data.list) |
| | | }) |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = row.number |
| | | this.SalesDetailsId = row.id |
| | |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.editConfig.infomation = {} |
| | | // this.editConfig.infomation.client_name = "" |
| | | // this.clientId = 0 |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.productTableList.tableData = [] |
| | |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | |
| | | sourceId:this.addConfig.salesDetailsId |
| | | sourceId: this.addConfig.id |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |