| | |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | align="right" |
| | | align="center" |
| | | > |
| | | <!-- 表头样式 --> |
| | | <template slot="header"> |
| | |
| | | :prop="'tableData.' + scope.$index + '.' + item.prop" |
| | | :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]" |
| | | > |
| | | <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini" disabled></el-input> |
| | | <el-input |
| | | v-model.trim="scope.row[item.prop]" |
| | | maxlength="50" |
| | | size="mini" |
| | | @change=" |
| | | (val) => { |
| | | commonInputChange(val, item.prop, scope.row) |
| | | } |
| | | " |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-else-if="item.date" |
| | |
| | | :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]" |
| | | > |
| | | <!-- <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini"></el-input> --> |
| | | <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px" disabled> |
| | | <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <span v-else>{{ scope.row[item.prop] }}</span> |
| | |
| | | </el-table> |
| | | </el-form> |
| | | <div v-if="!detailEnter" style="margin: 10px"> |
| | | <el-button size="small" type="primary" disabled>新增</el-button> |
| | | <el-button size="small" type="primary" disabled>导入明细</el-button> |
| | | <el-button size="small" type="primary" disabled>清空</el-button> |
| | | <el-button size="small" type="primary" disabled>重算</el-button> |
| | | <el-button size="small" type="primary" @click="add">新增</el-button> |
| | | <!-- <el-button size="small" type="primary" disabled>导入明细</el-button> --> |
| | | <el-button size="small" type="primary">清空</el-button> |
| | | <el-button size="small" type="primary">重算</el-button> |
| | | </div> |
| | | <div v-if="showSummary.total || showSummary.refundable" style="height: 42px; line-height: 42px"> |
| | | <el-row :gutter="10"> |
| | |
| | | data() { |
| | | return {} |
| | | }, |
| | | computed: { |
| | | maxHeight() { |
| | | if (this.productTableList.height) { |
| | | return `calc(100vh - ${this.productTableList.height})` |
| | | } |
| | | return undefined |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |
| | |
| | | s[1] = s[1].substring(0, prec) //小数点位数超出长度时截取前面的位数 |
| | | } |
| | | return s.join(dec) |
| | | }, |
| | | add() { |
| | | this.$emit("addProductClick") |
| | | }, |
| | | commonInputChange(val, prop, row) { |
| | | console.log(val, prop) |
| | | console.log(row) |
| | | this.$emit("inputContent", val, prop, row) |
| | | } |
| | | } |
| | | } |
| | |
| | | <span v-else-if="item.isClick && scope.row[item.prop]" class="sel-name" @click="selNameClick(scope.row)">{{ |
| | | scope.row[item.prop] |
| | | }}</span> |
| | | <span v-else-if="item.isFirst">{{ scope.row[item.prop] ? "是" : "否" }}</span> |
| | | <span |
| | | v-else-if="item.isSalesLeadClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | |
| | | @click="selCommonClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <div v-else-if="item.isProductName" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.name }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <div v-else-if="item.isProductAmount" class="product-view"> |
| | | <ul v-if="scope.row.products && scope.row.products.length > 0"> |
| | | <li v-for="(item, index) in scope.row.products" :key="index"> |
| | | <div :class="scope.row.products.length === 1 ? 'name-view no-bottom' : 'name-view'"> |
| | | {{ item.amount }} |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <div v-else class="no-product">{{ "--" }}</div> |
| | | </div> |
| | | <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .product-view { |
| | | // background: #cc7d7d; |
| | | margin-left: -10px; |
| | | margin-right: -11px; |
| | | li { |
| | | height: 57px; |
| | | line-height: 57px; |
| | | .name-view { |
| | | padding-left: 10px; |
| | | border-bottom: 1px solid #ebeef5; |
| | | } |
| | | .no-bottom { |
| | | border-bottom: 0px; |
| | | } |
| | | } |
| | | .no-product { |
| | | height: 57px; |
| | | line-height: 57px; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table__footer-wrapper tbody td.el-table__cell { |
| | |
| | | import { getSalesDetailsList } from "@/api/sales/salesDetails" |
| | | import { getQuotationList } from "@/api/sales/quotation" |
| | | import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" |
| | | import { getProductList } from "@/api/common/other" |
| | | import { Message } from "element-ui" |
| | | |
| | | export default { |
| | |
| | | getContractList: [], // 合同订单 |
| | | salesDetailsList: [], // 销售明细单 |
| | | quotationList: [], // 报价单 |
| | | serviceOrderList: [] // 客户服务单 |
| | | serviceOrderList: [], // 客户服务单 |
| | | productList: [] // 产品列表 |
| | | }, |
| | | mutations: { |
| | | clientNameList(state, payload) { |
| | |
| | | }, |
| | | serviceOrderList(state, payload) { |
| | | state.serviceOrderList = payload |
| | | }, |
| | | productList(state, payload) { |
| | | state.productList = payload |
| | | } |
| | | }, |
| | | actions: { |
| | |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | geProductList(context) { |
| | | getProductList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res.data.data.data) |
| | | context.commit("productList", res.data.data.data) |
| | | } else { |
| | | Message.error(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item v-if="isUnflod" label="首要联系人" prop="is_first"> |
| | | <el-switch |
| | | v-model="editConfig.infomation.is_first" |
| | | active-color="#2E68DB" |
| | | inactive-color="#AEB9CA" |
| | | active-value="是" |
| | | inactive-value="否" |
| | | > |
| | | <el-switch v-model="editConfig.infomation.is_first" active-color="#2E68DB" inactive-color="#AEB9CA"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | { label: "职务", prop: "position", min: 120 }, // 职务 |
| | | { label: "手机", prop: "phone", min: 100 }, // 手机号码 |
| | | { label: "销售负责人", prop: "member_name", min: 120 }, // 销售负责人 |
| | | { label: "首要联系人", prop: "is_first", min: 90 } // 首要联系人 |
| | | { label: "首要联系人", prop: "is_first", isFirst: true, min: 90 } // 首要联系人 |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | |
| | | return { |
| | | ...item, |
| | | client_name: item.Client.name, |
| | | is_first: item.is_first ? "是" : "否", |
| | | client_id: item.Client.id, |
| | | member_name: item.member.username |
| | | } |
| | |
| | | { label: "联系人姓名", prop: "contact_name", min: 100, isContactClick: true }, // 联系人姓名 |
| | | { label: "客户状态", prop: "client_status", min: 100 }, // 客户状态 |
| | | { label: "联系方式", prop: "contact_information_name", min: 100 }, // 联系方式 |
| | | { label: "联系人日期", prop: "follow_time", isTime: true, min: 130 }, // 联系人日期 |
| | | { label: "下次回访日期", prop: "next_follow_time", isTime: true, min: 130 }, // 下次回访日期 |
| | | { label: "联系人日期", prop: "follow_time", min: 130 }, // 联系人日期 |
| | | { label: "下次回访日期", prop: "next_follow_time", min: 130 }, // 下次回访日期 |
| | | { label: "负责人", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "跟进记录", prop: "record", min: 130 } // 跟进记录 |
| | | ] |
| | |
| | | await getProductList({ |
| | | productName: "", |
| | | productNumber: "", |
| | | page: 0, |
| | | pageSize: 0 |
| | | page: 1, |
| | | pageSize: 5 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | console.log(res.data) |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.data && res.data.data.data.length > 0) { |
| | | const list = res.data.data.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.Client.name, |
| | | serviceType_name: item.ServiceType.name, |
| | | faultType_name: item.FaultType.name, |
| | | serviceContract_Number: item.ServiceContract.number |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list.slice(0, 5) || [] |
New file |
| | |
| | | <template> |
| | | <div class="product"> |
| | | <div v-if="isDetail" class="detail-top"> |
| | | <DetailListCommonBtn :query-class-options="queryClassOptions" /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | <div v-else class="top"> |
| | | <SearchCommonView |
| | | ref="searchCommonView" |
| | | :query-class-options="queryClassOptions" |
| | | :search-options="searchOptions" |
| | | :search-sel="searchSel" |
| | | @searchClick="searchClick" |
| | | @resetClick="resetClick" |
| | | /> |
| | | <div class="btn-pager"> |
| | | <PublicFunctionBtnView :statistics="true" :operates-list="operatesList" @batchDelete="delClick" /> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | v-loading="loading" |
| | | :table-list="tableList" |
| | | :select-box="!isDetail" |
| | | @selContactsClick="selContactsClick" |
| | | @selClientClick="selClientClick" |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | <!-- <template slot="tableButton"> |
| | | <el-table-column label="操作" width="60" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> --> |
| | | </TableCommonView> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getProductList } from "@/api/common/other" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | |
| | | export default { |
| | | name: "FollowupRecords", |
| | | props: { |
| | | isDetail: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | addConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | addIdConfig: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | mixins: [pageMixin], |
| | | components: {}, |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | loading: false, |
| | | activeName: "second", |
| | | queryClassValue: "1", |
| | | queryClassOptions: [ |
| | | { value: "1", label: "全部" }, |
| | | { value: "2", label: "今日联系" }, |
| | | { value: "3", label: "本周联系" }, |
| | | { value: "4", label: "本月联系" } |
| | | ], |
| | | searchOptions: [], |
| | | operatesList: [ |
| | | { id: "1", name: "共享" }, |
| | | { id: "2", name: "批量编辑" }, |
| | | { id: "3", name: "导出" }, |
| | | { id: "4", name: "下载全部附件" }, |
| | | { id: "5", name: "更改创建人" }, |
| | | { id: "6", name: "树结构设置" }, |
| | | { id: "7", name: "审批设置" }, |
| | | { id: "8", name: "回访预设列宽" } |
| | | ], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | saleChanceName: "", |
| | | contactsDeail: { |
| | | visible: false, |
| | | infomation: {} |
| | | }, |
| | | clientDeail: { |
| | | visible: false, |
| | | infomation: {} |
| | | }, |
| | | selValueList: [], |
| | | searchSel: { |
| | | value: "topic", |
| | | label: "" |
| | | }, |
| | | search_map: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | if (!this.isDetail) { |
| | | this.search_map = {} |
| | | } else { |
| | | this.search_map = { |
| | | [this.addConfig.id_name]: this.addConfig.client_name |
| | | } |
| | | } |
| | | this.getData(this.search_map) |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "topic" }, |
| | | { label: "产品编号", prop: "client_name" }, |
| | | { label: "产品类别", prop: "contact_name" }, |
| | | { label: "规格型号", prop: "client_status" }, |
| | | { label: "计量单位", prop: "contact_information_name" }, |
| | | { label: "产品报价", prop: "follow_time" }, |
| | | { label: "参考成本价", prop: "next_follow_time" }, |
| | | { label: "总库存数量", prop: "member_name" }, |
| | | { label: "负责人", prop: "record" } |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < this.tableList.tableColumn.length; i++) { |
| | | const label = this.tableList.tableColumn[i].label |
| | | const value = this.tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getProductList({ |
| | | productName: "", |
| | | productNumber: "", |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | this.loading = false |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | this.tableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search_map = {} |
| | | this.getData() |
| | | }, |
| | | getSelectArray(val) { |
| | | console.log(val) |
| | | this.selValueList = [] |
| | | const list = val.map((item) => { |
| | | return item.id |
| | | }) |
| | | this.selValueList = list |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .product { |
| | | .top { |
| | | margin-bottom: 20px; |
| | | .btn-pager { |
| | | display: flex; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | .detail-top { |
| | | display: flex; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-row> |
| | | </div> --> |
| | | <!-- 产品管理 --> |
| | | <!-- <div class="basic-info-title" style="display: flex"> |
| | | <div class="basic-info-title" style="display: flex"> |
| | | 产品管理 |
| | | <div style="margin-left: 400px"> |
| | | 币种 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView :show-summary="showSummary" :product-table-list="productTableList" /> |
| | | </div> --> |
| | | <CommonFormTableView |
| | | :show-summary="showSummary" |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick" |
| | | /> |
| | | </div> |
| | | <!-- 选择审批流程 --> |
| | | <!-- <div class="basic-info-title">选择审批流程</div> |
| | | <div class="basic-info-view"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | // import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getAddQuotation, getUpdateQuotation } from "@/api/sales/quotation" |
| | | import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { SelectClientDialog, SelectContactDialog, SelectChanceDialog }, |
| | | components: { SelectClientDialog, SelectContactDialog, SelectChanceDialog, CommonFormTableView }, |
| | | computed: { |
| | | searchCommonHeight() { |
| | | return this.$refs.searchCommonView.offsetHeight |
| | |
| | | showSummary: { |
| | | show: true, |
| | | total: true, |
| | | sumProp: ["other1", "other2", "other3", "other4"], |
| | | sumProp: ["Amount", "Unit", "other3"], |
| | | mergeNumber: 3 |
| | | }, |
| | | editSelectClientConfig: { |
| | |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | contactId: this.editCommonConfig.infomation.contact_id, |
| | | saleChanceId: this.editCommonConfig.infomation.sale_chance_id |
| | | saleChanceId: this.editCommonConfig.infomation.sale_chance_id, |
| | | tableData: [], |
| | | productId: 1, |
| | | addProductArr: [], |
| | | isProductName: false |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | productNameValidate() { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].Name === "") { |
| | | this.isProductName = true |
| | | return |
| | | } else { |
| | | this.isProductName = false |
| | | } |
| | | } |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | | this.productNameValidate() |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | console.log(this.isProductName) |
| | | if (this.isProductName) { |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddQuotation(params) |
| | | .then((res) => { |
| | | getAddQuotation(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | } else { |
| | | getUpdateQuotation(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | getUpdateQuotation(params).then((res) => { |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "编辑成功", |
| | | type: "success" |
| | | }) |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | |
| | | number: data.number || "", |
| | | quotation_status_id: data.quotation_status_id || 0, |
| | | sale_chance_id: this.saleChanceId || 0, |
| | | validity_date: data.validity_date || "" |
| | | validity_date: data.validity_date || "", |
| | | products: this.tableData |
| | | } |
| | | return params |
| | | }, |
| | |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {}, |
| | | setTableForm() { |
| | | this.productTableList = { |
| | | tableData: [ |
| | | if (this.editConfig.title === "新建") { |
| | | this.tableData = [ |
| | | { |
| | | id: "1", |
| | | productName: "上海有限公司", |
| | | other0: "ZDYBD03-1", |
| | | other1: "12", |
| | | other2: "5.00", |
| | | other4: "3.00", |
| | | other3: "2.00" |
| | | id: 1, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | } |
| | | ], |
| | | ] |
| | | } else { |
| | | this.tableData = this.editConfig.infomation.products |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: [ |
| | | { label: "#", prop: "id", width: 40 }, |
| | | { label: "含税单价", prop: "other9", input: true }, |
| | | { label: "产品名称", prop: "productName", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "other0" }, |
| | | { label: "数量", prop: "other1", input: true, isRequird: true }, |
| | | { label: "折扣率(%)", prop: "other6", input: true }, |
| | | { label: "不含税单价", prop: "other7", input: true }, |
| | | { label: "折扣额", prop: "other2" }, |
| | | { label: "税(销售)", prop: "other7", input: true }, |
| | | { label: "实际含税单价", prop: "other3" }, |
| | | { label: "不含税金额", prop: "other4" }, |
| | | { label: "产品名称", prop: "Name", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "Number" }, |
| | | { label: "数量", prop: "Amount", input: true, isRequird: true }, |
| | | { label: "销售单价", prop: "Unit", input: true }, |
| | | { label: "价税合计", prop: "other3", input: true }, |
| | | { label: "描述", prop: "other8" }, |
| | | { label: "源单类型", prop: "other5" }, |
| | | { label: "源单", prop: "other6" } |
| | | { label: "描述", prop: "other8" } |
| | | ] |
| | | } |
| | | }, |
| | | // 产品列表输入 |
| | | inputContent(val, prop, row) { |
| | | console.log("aaaaaaaa") |
| | | console.log(val, prop) |
| | | this.productId = row.id |
| | | this.tableData.map((item) => { |
| | | if (item.id === row.id) { |
| | | item[prop] = val |
| | | } |
| | | }) |
| | | console.log(this.tableData) |
| | | }, |
| | | // 产品新增 |
| | | addProductClick() { |
| | | this.productId++ |
| | | this.tableData.push({ |
| | | id: this.productId, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | { label: "联系人姓名", prop: "contact_name", min: 90, isContactClick: true }, // 联系人姓名 |
| | | { label: "销售负责人", prop: "member_name" }, // 销售负责人 |
| | | { label: "有效期", prop: "validity_date", min: 100 }, // 修改时间 |
| | | { label: "小计", prop: "subTotal" }, // 小计 |
| | | { label: "合计", prop: "total" }, // 合计 |
| | | { label: "产品名称", prop: "productName" }, // 产品名称 |
| | | // { label: "小计", prop: "subTotal" }, // 小计 |
| | | // { label: "合计", prop: "total" }, // 合计 |
| | | { label: "产品名称", prop: "productName", isProduct: true }, // 产品名称 |
| | | { label: "数量", prop: "number1" }, // 数量 |
| | | { label: "价税合计", prop: "priceTax" } // 价税合计 |
| | | ] |
| | |
| | | { label: "联系人姓名", prop: "contact_name", min: 100, isContactClick: true }, // 联系人姓名 |
| | | { label: "销售阶段", prop: "sale_stage_name" }, // 销售阶段 |
| | | { label: "可能性(%)", prop: "possibilities" }, // 可能性 |
| | | { label: "预计成交日期", prop: "expected_time", isTime: true, min: 130 }, // 预计成交日期 |
| | | { label: "预计成交日期", prop: "expected_time", min: 130 }, // 预计成交日期 |
| | | { label: "预计合同金额", prop: "projected_amount" }, // 预计合同金额 |
| | | { label: "预算绝对值", prop: "capital_budget" }, // 预算绝对值 |
| | | { label: "销售负责人", prop: "member_name" } // 销售负责人 |
| | |
| | | </div> |
| | | </div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView :product-table-list="productTableList" /> |
| | | <CommonFormTableView |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick" |
| | | /> |
| | | </div> |
| | | <!-- 合计 --> |
| | | <div class="basic-info-view"> |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | masterId: this.editCommonConfig.infomation.masterOrderId |
| | | masterId: this.editCommonConfig.infomation.masterOrderId, |
| | | tableData: [], |
| | | productId: 1, |
| | | addProductArr: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | masterOrderId: this.masterId || 0, |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | | product: [ |
| | | { |
| | | amount: 0, |
| | | desc: "", |
| | | id: 0, |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | } |
| | | ] |
| | | product: this.tableData |
| | | } |
| | | return params |
| | | }, |
| | |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {}, |
| | | setTableForm() { |
| | | this.productTableList = { |
| | | tableData: [ |
| | | if (this.editConfig.title === "新建") { |
| | | this.tableData = [ |
| | | { |
| | | id: "1", |
| | | productName: "上海有限公司", |
| | | other0: "ZDYBD03-1", |
| | | other1: "12", |
| | | other2: "", |
| | | other6: "3.00", |
| | | other7: "2.00" |
| | | id: 1, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | } |
| | | ], |
| | | ] |
| | | } else { |
| | | this.tableData = this.editConfig.infomation.products |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: [ |
| | | { label: "#", prop: "id", width: 40 }, |
| | | { label: "产品名称", prop: "productName", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "other0" }, |
| | | { label: "计量单位", prop: "other2" }, |
| | | { label: "规格编号", prop: "other3" }, |
| | | { label: "源单类型", prop: "other4" }, |
| | | { label: "合同信息", prop: "other5" }, |
| | | { label: "数量", prop: "other1", input: true, isRequird: true }, |
| | | { label: "含税单价", prop: "other6", input: true }, |
| | | { label: "价税合计", prop: "other7", input: true }, |
| | | { label: "产品名称", prop: "Name", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "Number" }, |
| | | { label: "数量", prop: "Amount", input: true, isRequird: true }, |
| | | { label: "销售单价", prop: "Unit", input: true }, |
| | | { label: "价税合计", prop: "other3", input: true }, |
| | | { label: "描述", prop: "other8" } |
| | | ] |
| | | } |
| | | }, |
| | | // 产品列表输入 |
| | | inputContent(val, prop, row) { |
| | | console.log("aaaaaaaa") |
| | | console.log(val, prop) |
| | | this.productId = row.id |
| | | this.tableData.map((item) => { |
| | | if (item.id === row.id) { |
| | | item[prop] = val |
| | | } |
| | | }) |
| | | console.log(this.tableData) |
| | | }, |
| | | // 产品新增 |
| | | addProductClick() { |
| | | this.productId++ |
| | | this.tableData.push({ |
| | | id: this.productId, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | { label: "销售总单", prop: "master_order_number", min: 90, isMasterClick: true }, // 销售总单 |
| | | { label: "负责人", prop: "member_name" }, // 负责人 |
| | | // { label: "审批状态", prop: "approvalStatus" }, // 审批状态 |
| | | { label: "产品名称", prop: "productName" }, // 产品名称 |
| | | { label: "数量", prop: "number1", min: 100 } // 数量 |
| | | { label: "产品名称", prop: "productName", isProductName: true }, // 产品名称 |
| | | { label: "数量", prop: "productAmount", isProductAmount: true } // 数量 |
| | | ] |
| | | } |
| | | this.searchOptions = [] |
| | |
| | | } |
| | | } |
| | | } |
| | | ::v-deep { |
| | | .el-table .el-table__cell { |
| | | padding: 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | querySearchAsync(queryString, callback, 'productName') |
| | | } |
| | | " |
| | | value-key="name" |
| | | value-key="Name" |
| | | @select="handleSelectClient('productName', $event)" |
| | | ></el-autocomplete> |
| | | <div class="common-select-btn" @click="selClientClick('productName')"> |
| | |
| | | }, |
| | | saleChancelist() { |
| | | return this.$store.state.getClientName.saleChancelist |
| | | }, |
| | | productList() { |
| | | return this.$store.state.getClientName.productList |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | serviceNumber: [{ required: true, message: "请输入服务单编号", trigger: "blur" }], |
| | | faultTypeId: [{ required: true, message: "请选择故障类别", trigger: "change" }], |
| | | // faultTypeId: [{ required: true, message: "请选择故障类别", trigger: "change" }], |
| | | subject: [{ required: true, message: "请输入主题", trigger: "blur" }], |
| | | // productCategory: [{ required: true, message: "请选择产品类别", trigger: "change" }], |
| | | serviceManId: [{ required: true, message: "请选择产品类别", trigger: "change" }], |
| | |
| | | this.$store.dispatch("geSalesDetails") |
| | | this.$store.dispatch("geContact") |
| | | this.$store.dispatch("geChance") |
| | | this.$store.dispatch("geProductList") |
| | | this.getFaultTypeList() |
| | | this.getSeverityList() |
| | | this.getPriorityLevelList() |
| | |
| | | } else if (value === "contract") { |
| | | restaurants = this.salesDetailsList |
| | | } else if (value === "productName") { |
| | | restaurants = this.productNameList |
| | | console.log(this.productList) |
| | | restaurants = this.productList |
| | | } else if (value === "contact") { |
| | | restaurants = this.contactNamelist |
| | | } else if (value === "chance") { |
| | |
| | | return (state) => { |
| | | if (value === "serviceContract" || value === "contract") { |
| | | return state.number.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } else if (value === "productName") { |
| | | return state.Name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } else { |
| | | return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 |
| | | } |
| | |
| | | } else if (value === "contract") { |
| | | this.SalesDetailsId = item.id |
| | | } else if (value === "productName") { |
| | | this.productCategoryId = item.id |
| | | this.productNameId = item.Number |
| | | } else if (value === "contact") { |
| | | this.contactId = item.id |
| | | } else if (value === "chance") { |
| | |
| | | } else if (value === "serviceContract") { |
| | | this.editSelCommonConfig.title = "服务合同" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.serviceContractList] |
| | | } else if (value === "contract") { |
| | | this.editSelCommonConfig.title = "销售明细单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.salesDetailsList] |
| | | } else if (value === "productName") { |
| | | this.editSelCommonConfig.title = "产品名称" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.tableInfomation = [...this.productNameList] |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | |
| | | this.editConfig.infomation.number = row.number |
| | | this.SalesDetailsId = row.id |
| | | } else if (value === "productName") { |
| | | this.editConfig.infomation.product_name = row.name |
| | | this.productNameId = row.id |
| | | this.editConfig.infomation.product_name = row.Name |
| | | this.productNameId = row.Number |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | |
| | | </div> |
| | | </div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView :show-summary="showSummary" :product-table-list="productTableList" /> |
| | | <CommonFormTableView |
| | | :show-summary="showSummary" |
| | | :product-table-list="productTableList" |
| | | @addProductClick="addProductClick" |
| | | /> |
| | | </div> |
| | | <!-- 选择审批流程 --> |
| | | <!-- <div class="basic-info-title">选择审批流程</div> |
| | |
| | | contactId: this.editCommonConfig.infomation.contactId, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId, |
| | | contractId: this.editCommonConfig.infomation.salesDetailsId, |
| | | quotationId: this.editCommonConfig.infomation.quotationId |
| | | quotationId: this.editCommonConfig.infomation.quotationId, |
| | | tableData: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {}, |
| | | setTableForm() { |
| | | this.productTableList = { |
| | | tableData: [ |
| | | if (this.editConfig.title === "新建") { |
| | | this.tableData = [ |
| | | { |
| | | id: "1", |
| | | productName: "上海有限公司", |
| | | other0: "ZDYBD03-1", |
| | | other1: "12", |
| | | other2: "5.00", |
| | | other4: "3.00", |
| | | other3: "2.00" |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | } |
| | | ], |
| | | ] |
| | | } else { |
| | | this.tableData = this.editConfig.infomation.products |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: [ |
| | | { label: "#", prop: "id", width: 40 }, |
| | | { label: "产品名称", prop: "productName", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "other0" }, |
| | | { label: "产品名称", prop: "Name", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "Number" }, |
| | | { label: "服务开始日", prop: "other5", date: true, isRequird: true, min: 100 }, |
| | | { label: "服务到期日", prop: "other6", date: true, isRequird: true, min: 100 }, |
| | | { label: "数量", prop: "other1", input: true, isRequird: true }, |
| | | { label: "含税单价", prop: "other9", input: true }, |
| | | { label: "不含税单价", prop: "other7", input: true }, |
| | | { label: "折扣率(%)", prop: "other6", input: true }, |
| | | { label: "折扣额", prop: "other2" }, |
| | | { label: "税(销售)", prop: "other7", input: true }, |
| | | { label: "实际含税单价", prop: "other3" }, |
| | | { label: "不含税金额", prop: "other4" }, |
| | | { label: "数量", prop: "amount", input: true, isRequird: true }, |
| | | { label: "销售单价", prop: "Unit", input: true }, |
| | | { label: "价税合计", prop: "other3", input: true }, |
| | | { label: "描述", prop: "other8" } |
| | | ] |
| | | } |
| | | }, |
| | | addProductClick() { |
| | | this.tableData.push({ |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | { label: "客户编号", prop: "client_id" }, // 客户编号 |
| | | { label: "客户状态", prop: "client_status_id" }, // 客户状态 |
| | | { label: "产品名称", prop: "productName" }, // 产品名称 |
| | | // { label: "服务开始日期", prop: "startDate", isTime: true, width: 150 }, // 服务开始日期 |
| | | { label: "服务到期日", prop: "latest_date", isTime: true, width: 160 } // 服务到期日 |
| | | // { label: "服务开始日期", prop: "startDate", width: 150 }, // 服务开始日期 |
| | | { label: "服务到期日", prop: "latest_date", width: 160 } // 服务到期日 |
| | | ] |
| | | } |
| | | this.searchOptions = [] |