| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="customName"> |
| | | <el-form-item label="客户名称" prop="client_id"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.customName"></el-input> |
| | | <el-input v-model="editConfig.infomation.client_id"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报价编号" prop="quotationNo"> |
| | | <el-input v-model="editConfig.infomation.quotationNo"></el-input> |
| | | <el-form-item label="报价编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="报价单状态" prop="quotationStatus"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.quotationStatus" |
| | | :common-options="quotationStatusOptions" |
| | | /> |
| | | <el-form-item label="报价单状态" prop="quotation_status_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.quotation_status_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="item in quotationStatusOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <!-- @click="editDropdownBox" --> |
| | | <div class="common-select-btn"><i class="el-icon-setting"></i></div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="有效期至" prop="validTo"> |
| | | <el-date-picker v-model="editConfig.infomation.validTo" type="date" placeholder="选择日期"> |
| | | <el-form-item label="有效期至" prop="validity_date"> |
| | | <el-date-picker v-model="editConfig.infomation.validity_date" type="date" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contactName"> |
| | | <el-form-item label="联系人姓名" prop="contact_id"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.contactName"></el-input> |
| | | <el-input v-model="editConfig.infomation.contact_id"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售负责人" prop="salesHead"> |
| | | <el-form-item label="销售负责人" prop="member_id"> |
| | | <el-select |
| | | v-model="editConfig.infomation.salesHead" |
| | | v-model="editConfig.infomation.member_id" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | > |
| | | <el-option |
| | | v-for="item in salesHeadOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会" prop="salesOpportunity"> |
| | | <el-form-item label="销售机会" prop="sale_chance_id"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.salesOpportunity"></el-input> |
| | | <el-input v-model="editConfig.infomation.sale_chance_id"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-circle-plus-outline" title="选择"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-edit" title="编辑"></i></div> |
| | | </div> |
| | |
| | | </div> |
| | | <!-- 条款与条件 --> |
| | | <div class="basic-info-title">条款与条件</div> |
| | | <div class="address-view"> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="条款与条件" prop="termsTreaty"> |
| | | <el-form-item label="条款与条件" prop="conditions"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 4 }" |
| | | v-model="editConfig.infomation.termsTreaty" |
| | | v-model="editConfig.infomation.conditions" |
| | | ></el-input> |
| | | </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"> |
| | | <!-- <div class="basic-info-title" style="display: flex"> |
| | | 产品管理 |
| | | <div style="margin-left: 400px"> |
| | | 币种 |
| | |
| | | </div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView :show-summary="showSummary" :product-table-list="productTableList" /> |
| | | </div> |
| | | </div> --> |
| | | <!-- 选择审批流程 --> |
| | | <div class="basic-info-title">选择审批流程</div> |
| | | <!-- <div class="basic-info-title">选择审批流程</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="20"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" size="small" @click="editConfig.visible = false">保并提交审批</el-button> |
| | | <el-button type="primary" size="small" @click="editConfig.visible = false">保存</el-button> |
| | | <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">保并提交审批</el-button> --> |
| | | <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button> |
| | | <el-button size="small" @click="editConfig.visible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import CommonSelectView from "@/components/makepager/CommonSelectView" |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | // import CommonSelectView from "@/components/makepager/CommonSelectView" |
| | | // import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddQuotation, getUpdateQuotation } from "@/api/sales/quotation" |
| | | export default { |
| | | name: "QuotationDialog", |
| | | props: { |
| | |
| | | return { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: { |
| | | customName: "", |
| | | quotationNo: "AC6521", |
| | | quotationStatus: "", |
| | | validTo: "", |
| | | contactName: "", |
| | | salesHead: "", |
| | | salesOpportunity: "", |
| | | termsTreaty: "", |
| | | approvalWorkflow: "", |
| | | approvalSteps: "", |
| | | approvalPerson: "", |
| | | approvalOpinion: "" |
| | | } |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | components: { CommonSelectView, CommonFormTableView }, |
| | | // components: { CommonSelectView, CommonFormTableView }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | |
| | | dialogWidth: "80%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | customName: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotationNo: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotationStatus: [{ required: true, message: "请选择", trigger: "change" }], |
| | | salesHead: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | | client_id: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | number: [{ required: true, message: "请输入", trigger: "blur" }], |
| | | quotation_status_id: [{ required: true, message: "请选择", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择负责人", trigger: "change" }] |
| | | }, |
| | | salesHeadOptions: [ |
| | | // 销售负责人 |
| | | { value: "1", label: "BOSS" }, |
| | | { value: "2", label: "Mia" }, |
| | | { value: "3", label: "财务" }, |
| | | { value: "4", label: "市场" }, |
| | | { value: "5", label: "系统管理员" }, |
| | | { value: "6", label: "销售" }, |
| | | { value: "7", label: "销售总监" } |
| | | ], |
| | | quotationStatusOptions: [], // 报价单状态 |
| | | memberOptions: [], |
| | | quotationStatusOptions: [{ id: 1, name: "不知道" }], // 报价单状态 |
| | | currencyOptions: [ |
| | | { value: "1", label: "人民币(¥)" }, |
| | | { value: "2", label: "英镑(£)" }, |
| | |
| | | }, |
| | | created() { |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | }, |
| | | methods: { |
| | | getCommonData() { |
| | | getAllData() |
| | | .then((res) => { |
| | | // 缺 币种 报价单状态 |
| | | this.memberOptions = res.data.member |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddQuotation(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) |
| | | }) |
| | | } else { |
| | | getUpdateQuotation(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) |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let data = this.editConfig.infomation |
| | | let params = { |
| | | id: this.editConfig.title === "新建" ? 0 : data.id, |
| | | client_id: parseInt(data.client_id) || 0, |
| | | conditions: data.conditions || "", |
| | | contact_id: data.contact_id || 0, |
| | | file: data.file || "", |
| | | member_id: data.member_id || 0, |
| | | number: data.number || "", |
| | | quotation_status_id: data.quotation_status_id || 0, |
| | | sale_chance_id: data.sale_chance_id || 0, |
| | | validity_date: data.validity_date || "" |
| | | } |
| | | return params |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | |
| | | font-size: 18px; |
| | | } |
| | | } |
| | | } |
| | | .address-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-sel { |
| | | width: 270px; |
| | | } |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | .annex-view { |
| | | display: flex; |