| | |
| | | style="width: 100%" |
| | | :disabled="isView" |
| | | > |
| | | <el-option v-for="item in projectList" :key="item.projectId" :label="item.projectName" :value="item.projectId"> |
| | | <el-option |
| | | v-for="item in projectList" |
| | | :key="item.projectId" |
| | | :label="item.projectName" |
| | | :value="item.projectId" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <script> |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddSalesDetails, getUpdateSalesDetails,getProjectList,sendSalesDetailsToApsProject } from "@/api/sales/salesDetails" |
| | | import { getAddSalesDetails, getUpdateSalesDetails, getProjectList } from "@/api/sales/salesDetails" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | | import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" |
| | | import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan" |
| | |
| | | // subbill_name: [{ required: true, message: "请选择销售子单", trigger: "change" }], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["blur", "change"] }], |
| | | signTime: [{ required: true, message: "请选择签约日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | memberId: [{ required: true, validator: this.validateMemberId, trigger: "change" }], |
| | | sale_chance_name: [{ required: true, message: "请选择销售机会", trigger: "change" }], |
| | | quotation_number: [{ required: true, message: "请选择销售报价单", trigger: "change" }], |
| | | deliveryDate: [{ required: true, message: "请选择交付日期", trigger: "change" }], |
| | | deliveryDate: [{ required: true, message: "请选择交付日期", trigger: "change" }] |
| | | // approvalOpinion: [{ required: true, message: "请输入", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [], |
| | |
| | | isAddQuatation: true, |
| | | // 交付类型 |
| | | deliveryTypeList: getDataByType("deliveryType"), |
| | | projectList:[], |
| | | projectList: [], |
| | | quotationList: [], |
| | | quotationId: this.editCommonConfig.infomation.quotationId, |
| | | tableData: [], |
| | | selProductData: [], |
| | | isView: this.editCommonConfig.title === "查看", |
| | | selectBox: this.editCommonConfig.title !== "查看", |
| | | thatMember:{} |
| | | thatMember: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | getAllData() |
| | | .then((res) => { |
| | | this.memberOptions = res.data.member |
| | | if (this.editConfig.title === "新建") { |
| | | let username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | this.memberOptions.map((item) => { |
| | | if (item.username == username) { |
| | | this.$set(this.editConfig.infomation, "memberId", item.id) |
| | | } |
| | | }) |
| | | } |
| | | // this.dataProcess() |
| | | }) |
| | | .catch((err) => { |
| | |
| | | quotationId: this.quotationId, |
| | | deliverType: data.deliverType || 0, |
| | | status: 1, |
| | | projectId:data.projectId||'' |
| | | projectId: data.projectId || "" |
| | | } |
| | | let params = {} |
| | | if (this.editConfig.title === "新建") { |
| | |
| | | }, |
| | | handleSelectClient(value, item) { |
| | | if (value === "client") { |
| | | this.thatMember=item.member |
| | | this.thatMember = item.member |
| | | this.editConfig.infomation.subbill_name = "" |
| | | this.editConfig.infomation.sale_chance_name = "" |
| | | this.clientId = item.id |
| | |
| | | this.selProductData = val |
| | | }, |
| | | // 获取项目列表 |
| | | async getProjectList(){ |
| | | async getProjectList() { |
| | | await getProjectList({ |
| | | page: 1, |
| | | pageSize: 100, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | this.projectList=res.data |
| | | this.projectList = res.data |
| | | }) |
| | | }, |
| | | // 销售负责人自定义校验规则 |
| | | validateMemberId(rule, value, callback) { |
| | | if (this.editConfig.infomation?.memberId > 0) { |
| | | callback() |
| | | } else { |
| | | callback(new Error("请选择销售负责人")) |
| | | } |
| | | } |
| | | } |
| | | } |