| | |
| | | v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | | :disabled="editConfig.infomation.id || isIdDisabled" |
| | | :disabled="editConfig.title !== '新建' || isIdDisabled" |
| | | :inputValue="inputValue" |
| | | @codeList="codeList" |
| | | /> |
| | |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | <span v-else>{{ editConfig.title === "新建" ? "自动生成" : editConfig.infomation.number }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="合同名称" prop="contractName"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.contractName"></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | value-key="number" |
| | | @select="handleSelectClient('quotation', $event)" |
| | | style="width: 100%" |
| | | placeholder="请先选择客户名称" |
| | | :disabled="isAddQuatation" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('quotation')"> |
| | | <div v-if="!isAddQuatation" class="common-select-btn" @click="selClientClick('quotation')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | | v-if="editConfig.infomation.quotation_number && editConfig.infomation.quotation_number.length > 0" |
| | | v-if=" |
| | | editConfig.infomation.quotation_number && |
| | | editConfig.infomation.quotation_number.length > 0 && |
| | | !isAddQuatation |
| | | " |
| | | class="common-select-btn" |
| | | @click="clearupClient('quotation')" |
| | | > |
| | |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getQuotationList } from "@/api/sales/quotation" |
| | | export default { |
| | | name: "AddContractManageDialog", |
| | | mixins: [codeMixin], |
| | |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | quotationList() { |
| | | return this.$store.state.getClientName.quotationList |
| | | } |
| | | // quotationList() { |
| | | // return this.$store.state.getClientName.quotationList |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | rules: { |
| | | number: [{ required: true, validator: this.checkCode, trigger: "blur" }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }] |
| | | member_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | contractName: [{ required: true, message: "请输入合同名称", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [], |
| | | statusOptions: [], // 合同状态 |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.clientId, |
| | | quotationId: this.editCommonConfig.infomation.quotationId |
| | | quotationId: this.editCommonConfig.infomation.quotationId, |
| | | isAddQuatation: true, |
| | | quotationList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geQuotation") |
| | | // this.$store.dispatch("geQuotation") |
| | | if (this.editConfig.title !== "新建") { |
| | | this.isAddQuatation = false |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | }, |
| | |
| | | console.log(data) |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | contractName: data.contractName || "", |
| | | client_id: this.clientId || 0, |
| | | file: "", |
| | | member_id: data.memberId || 0, |
| | |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 获取报价单 |
| | | getQuotation(id) { |
| | | getQuotationList({ |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res) |
| | | this.quotationList = res.data.list |
| | | } |
| | | }) |
| | | }, |
| | | // 选择客户相关方法 |
| | | querySearchAsync(queryString, cb, value) { |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = item.name |
| | | this.clientId = item.id |
| | | this.isAddQuatation = false |
| | | this.getQuotation(item.id) |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = item.number |
| | | this.quotationId = item.id |
| | |
| | | } else if (value === "quotation") { |
| | | this.editSelCommonConfig.title = "报价单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.clientId = this.clientId |
| | | this.editSelCommonConfig.tableInfomation = [...this.quotationList] |
| | | } |
| | | }, |
| | |
| | | if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.isAddQuatation = false |
| | | this.getQuotation(row.id) |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = row.number |
| | | this.quotationId = row.id |
| | |
| | | clearupClient(value) { |
| | | console.log(value) |
| | | if (value === "client") { |
| | | console.log("ss88888") |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.isAddQuatation = true |
| | | this.editConfig.infomation.quotation_number = "" |
| | | this.quotationId = 0 |
| | | } else if (value === "quotation") { |
| | | this.editConfig.infomation.quotation_number = "" |
| | | this.quotationId = 0 |