| | |
| | | this.getContactList() |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "client_name", |
| | | id_name: "client_id", |
| | | keywordType: "客户名称", |
| | | keyword: this.detailConfig.infomation.name, |
| | | id: this.detailConfig.infomation.id, |
| | |
| | | editVisible: false, |
| | | title: "", |
| | | clientId: 0, |
| | | tableInfomation: [], |
| | | client_name: "", |
| | | tableInfomation: [] |
| | | } |
| | | } |
| | | } |
| | |
| | | this.search_map = { |
| | | client_id: this.editConfig.clientId |
| | | } |
| | | this.keyword = this.editConfig.client_name |
| | | this.keywordType = "客户名称" |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-else :span="12"> |
| | | <el-form-item label="合同订单"> |
| | | <el-form-item label="销售明细单" prop="saleDetailNumber"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.number" |
| | | v-model="editConfig.infomation.saleDetailNumber" |
| | | :fetch-suggestions=" |
| | | (queryString, callback) => { |
| | | querySearchAsync(queryString, callback, 'contract') |
| | |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.number && editConfig.infomation.number.length > 0" |
| | | v-if="editConfig.infomation.saleDetailNumber && editConfig.infomation.saleDetailNumber.length > 0" |
| | | class="common-select-btn" |
| | | @click="clearupClient('contract')" |
| | | > |
| | |
| | | rules: { |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | signTime: [{ required: true, message: "请选择收款日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }] |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | saleDetailNumber: [{ required: true, message: "请选择销售明细单", trigger: "change" }] |
| | | // approvalOpinion: [{ required: true, message: "请输入", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [], |
| | |
| | | } |
| | | this.getData() |
| | | }, |
| | | mounted() { |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | |
| | | sourceType: sourceTyle, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | client_id:this.addConfig.client_id, |
| | | client_id: this.addConfig.client_id |
| | | } |
| | | } else { |
| | | params = { |
| | |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | client_id:this.addConfig.client_id, |
| | | client_id: this.addConfig.client_id |
| | | } |
| | | } |
| | | await getReceiptList(params) |
| | | .then((res) => { |
| | | if (res.data.code === 200) { |
| | | const resList = res?.data?.data?.data ?? [] |
| | | if (res.code === 200) { |
| | | const resList = res?.data?.data ?? [] |
| | | if (resList.length > 0) { |
| | | const list = resList.map((item) => { |
| | | return { |
| | |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.count |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | number: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotationName: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "blur" }], |
| | | sale_chance_name: [{ required: true, validator: this.checkChance, trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | | }, |
| | | memberOptions: [], |
| | |
| | | validity_date: data.validity_date || "", |
| | | products: this.tableData, |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | codeRule: this.codeRule, |
| | | client_id: this.clientId || 0, |
| | | } |
| | | return params |
| | | }, |
| | |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = { ...this.addConfig, currency: "人民币" } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | |
| | | let params = {} |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | saleChanceId: this.addConfig.id, |
| | | clientId: this.addConfig.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | |
| | | } else if (value === "contract") { |
| | | this.editSelCommonConfig.title = "销售明细单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = row.number |
| | | this.SalesDetailsId = row.id |
| | | this.productTableList.tableData = row.products |
| | | this.tableData = row.products |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | |
| | | this.clientId = 0 |
| | | } else if (value === "contract") { |
| | | this.editConfig.infomation.salesDetailNumber = "" |
| | | this.productTableList.tableData = [] |
| | | this.tableData = [] |
| | | this.SalesDetailsId = 0 |
| | | } |
| | | }, |