| | |
| | | :edit-common-config="editSelCommonConfig" |
| | | :quotationNumber="quotationNumber" |
| | | @selClient="selClient" |
| | | @getSelectArray="getSelectArray" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | pageName:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | // 列表新增是否多选 |
| | | addTypeIdMultiple:{ |
| | | type:Boolean, |
| | | default:false, |
| | | }, |
| | | // 根据报价单查询产品 |
| | | quotationNumber:{ |
| | |
| | | tableList: [], |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | isSelectBox:false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | |
| | | }, |
| | | // 新增 |
| | | add() { |
| | | this.$emit("addProductClick") |
| | | if(this.addTypeIdMultiple){ |
| | | this.editSelCommonConfig.title = "产品名称" |
| | | this.editSelCommonConfig.isSelectBox=true; |
| | | this.editSelCommonConfig.editVisible = true |
| | | }else{ |
| | | this.$emit("addProductClick") |
| | | } |
| | | }, |
| | | commonInputChange(val, prop, row,scope) { |
| | | if (prop === "amount") { |
| | |
| | | console.log(row, prop) |
| | | this.productIndex = row.productId - 1 |
| | | this.editSelCommonConfig.title = "产品名称" |
| | | this.editSelCommonConfig.isSelectBox=false; |
| | | this.editSelCommonConfig.editVisible = true |
| | | }, |
| | | selClient(item) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getSelectArray(val){ |
| | | this.$emit("getSelectArray",val) |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(row) { |
| | | this.productIndex = row.productId - 1 |
| | |
| | | @row-click="tableRowClick" |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | :select-box="false" |
| | | :select-box="editCommonConfig.isSelectBox" |
| | | @selCommonClick="selNameClick" |
| | | @selTableCol="selTableCol" |
| | | @getSelectArray="getSelectArray" |
| | | > |
| | | </TableCommonView> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div slot="footer" class="dialog-footer" v-if="editCommonConfig.isSelectBox"> |
| | | <el-button type="primary" size="small" @click="saveClick()">确定</el-button> |
| | | <el-button size="small" @click="editConfig.editVisible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | default: () => { |
| | | return { |
| | | editVisible: false, |
| | | isSelectBox:false, |
| | | title: "", |
| | | clientId: 0, |
| | | client_name: "", |
| | |
| | | keyword: "", |
| | | keywordType: "", |
| | | tableColumn: [], |
| | | showCol: [] |
| | | showCol: [], |
| | | selectArray:[], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.searchSel = { value: "serviceNumber", label: "服务单编号" } |
| | | } else if (this.editConfig.title === "产品名称") { |
| | | this.tableColumn = [ |
| | | { label: "产品名称", prop: "name", isClick: true, default: true }, // 产品名称 |
| | | { label: "产品名称", prop: "name", isClick: this.editCommonConfig.isSelectBox?false:true, default: true }, // 产品名称 |
| | | { label: "产品编号", prop: "number" } |
| | | ] |
| | | this.showCol = ["产品名称", "产品编号"] |
| | |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setColumnVisible(val) |
| | | }, |
| | | // 列表多选 |
| | | getSelectArray(val){ |
| | | this.selectArray=val; |
| | | }, |
| | | saveClick(){ |
| | | this.$emit('getSelectArray',this.selectArray) |
| | | this.editConfig.editVisible = false |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | |
| | | this.editConfig.editVisible = false |
| | | }, |
| | | selNameClick(row) { |
| | | if(this.editCommonConfig.isSelectBox){ |
| | | return true; |
| | | } |
| | | this.editConfig.editVisible = false |
| | | if (this.editConfig.title === "销售总单") { |
| | | this.$emit("selClient", row, "master") |
| | |
| | | <CommonFormTableView |
| | | :show-summary="showSummary" |
| | | pageName="quotation" |
| | | :addTypeIdMultiple="false" |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick" |
| | | @getSelectArray="getSelectArray" |
| | | @emptyProductClick="emptyProductClick" |
| | | @recalculateProductClick="recalculateProductClick" |
| | | @clearupProduct="clearupProduct" |
| | |
| | | }, |
| | | // 产品新增 |
| | | addProductClick() { |
| | | this.productId++ |
| | | this.tableData.push({ |
| | | productId: this.productId, |
| | | id: 0, |
| | | amount: 0, |
| | | desc: "", |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | cost:'', |
| | | profit:'', |
| | | margin:'', |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | // this.productId++ |
| | | // this.tableData.push({ |
| | | // productId: this.productId, |
| | | // id: 0, |
| | | // amount: 0, |
| | | // desc: "", |
| | | // name: "", |
| | | // number: "", |
| | | // price: 0, |
| | | // cost:'', |
| | | // profit:'', |
| | | // margin:'', |
| | | // total: 0, |
| | | // unit: "" |
| | | // }) |
| | | // this.showSummary.show = true |
| | | }, |
| | | // 新增方式修改 |
| | | getSelectArray(val){ |
| | | if(val.length>0){ |
| | | val.map((item, index) => { |
| | | item.productId = this.tableData.length + index+1 |
| | | }) |
| | | } |
| | | this.tableData=this.tableData.concat(val); |
| | | this.productTableList.tableData=this.tableData |
| | | this.showSummary.show = true |
| | | }, |
| | | // 产品清空 |
| | |
| | | ref="commonFormTableView" |
| | | :detail-enter="isView?true:false" |
| | | :selectBox="false" |
| | | :addTypeIdMultiple="false" |
| | | :show-summary="showSummary" |
| | | pageName="quotation" |
| | | :isOperate="((autoCodeHeadersObj.Bjd=='yes'&&editConfig.infomation.quotation_number)||autoCodeHeadersObj.Bjd!='yes')?true:false" |
| | |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick" |
| | | @getSelectArray="getSelectArray" |
| | | @emptyProductClick="emptyProductClick" |
| | | @clearupProduct="clearupProduct" |
| | | ></CommonFormTableView> |
| | |
| | | }, |
| | | // 产品新增 |
| | | addProductClick() { |
| | | this.productId++ |
| | | this.tableData.push({ |
| | | productId: this.productId, |
| | | id: 0, |
| | | amount: 0, |
| | | desc: "", |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | cost:'', |
| | | profit:'', |
| | | margin:'', |
| | | total: 0, |
| | | unit: "" |
| | | }) |
| | | // this.productId++ |
| | | // this.tableData.push({ |
| | | // productId: this.productId, |
| | | // id: 0, |
| | | // amount: 0, |
| | | // desc: "", |
| | | // name: "", |
| | | // number: "", |
| | | // price: 0, |
| | | // cost:'', |
| | | // profit:'', |
| | | // margin:'', |
| | | // total: 0, |
| | | // unit: "" |
| | | // }) |
| | | // this.showSummary.show = true |
| | | }, |
| | | // 新增方式修改 |
| | | getSelectArray(val){ |
| | | if(val.length>0){ |
| | | val.map((item, index) => { |
| | | item.productId = this.tableData.length + index+1 |
| | | }) |
| | | } |
| | | this.tableData=this.tableData.concat(val); |
| | | this.productTableList.tableData=this.tableData |
| | | this.showSummary.show = true |
| | | }, |
| | | // 产品清空 |