| | |
| | | .cursor_pointer{ |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .btn-pager { |
| | | display: flex; |
| | | margin-top: 10px; |
| | | // background: #fff; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | |
| | | width: calc(100% - 210px); |
| | | .app-main-content { |
| | | width: 100%; |
| | | overflow-y: auto; |
| | | overflow-y: hidden; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | line-height: 55px; |
| | | background-color: #fff; |
| | | margin-bottom: 10px; |
| | | margin-left: -10px; |
| | | .header-title { |
| | | margin-left: 16px; |
| | | font-size: 16px; |
| | |
| | | <template> |
| | | <div class="page-view"> |
| | | <el-form ref="form" :model="tableList" :show-message="false" label-position="right" |
| | | > |
| | | <el-table :data="tableList.tableData" style="width: 100%" |
| | | <el-form ref="form" :model="tableList" :show-message="false" label-position="right"> |
| | | <el-table |
| | | :data="tableList.tableData" |
| | | style="width: 100%" |
| | | :show-summary="showSummary.show" |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod"> |
| | | <el-table-column type="index" v-if="tableList.tableColumn.length>0" label="编号" width="50" align="center"></el-table-column> |
| | | :span-method="arraySpanMethod" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | v-if="tableList.tableColumn.length > 0" |
| | | label="编号" |
| | | width="50" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | |
| | | v-model="scope.row[item.prop]" |
| | | :fetch-suggestions="querySearchAsync" |
| | | value-key="name" |
| | | style='width:calc(100% - 70px)' |
| | | style="width: calc(100% - 70px)" |
| | | size="mini" |
| | | @select=" |
| | | (val) => { |
| | |
| | | }, |
| | | sign:{ |
| | | type:String, |
| | | default:'' |
| | | default: "" |
| | | }, |
| | | productTableList: { |
| | | type: Object, |
| | |
| | | recalculateShow: { |
| | | type: [Boolean], |
| | | defalut: true |
| | | }, |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | methods: { |
| | | // 产品名称 |
| | | async getProductList() { |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc; |
| | | let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc |
| | | await fn({ |
| | | page: 1, |
| | | pageSize: 100 |
| | |
| | | } |
| | | if (column.property === "total") { |
| | | this.total = sums[index] |
| | | this.$emit('getSummaries',this.total) |
| | | this.$emit("getSummaries", this.total) |
| | | } |
| | | }) |
| | | return sums |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | console.log(this.tableList.tableData,'=====chanp') |
| | | console.log(this.tableList.tableData, "=====chanp") |
| | | } |
| | | }, |
| | | // 清除已选择用户 |
| | |
| | | }, |
| | | deleteClient(row,scope){ |
| | | if(this.tableList.tableData.length==1){ |
| | | this.$message.error('至少保留一条,不能刪除了!') |
| | | return true; |
| | | this.$message.error("至少保留一条,不能刪除了!") |
| | | return true |
| | | } |
| | | this.tableList.tableData.splice(scope.$index,1) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :data="tableList.tableInfomation" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :height="'calc(100% - 0px)'" |
| | | :max-height="tableList.maxHeight" |
| | | :lazy="tableList.lazy" |
| | | :show-summary="showSummary.show" |
| | | :summary-method="getSummaries" |
| | | :span-method="arraySpanMethod" |
| | | @selection-change="handleSelectionChange" |
| | | :header-cell-style="{ background: '#ECF4FF', color: '#666' }" |
| | | :header-cell-style="{ background: '#f1f3f8', color: '#000009' }" |
| | | :highlight-current-row="tableList.highlight" |
| | | :row-class-name="tableRowClassName" |
| | | @row-click="tableRowClick" |
| | | :row-key="tableList.key" |
| | | :default-expand-all="tableList.isDefaultExpandAll" |
| | | :tree-props="{ children: 'child', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column> |
| | | <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"> </el-table-column> |
| | |
| | | totalName: "本页总计" |
| | | } |
| | | } |
| | | }, |
| | | // 选中的样式 |
| | | selectClassRow: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | computed: {}, |
| | | mounted() {}, |
| | | methods: { |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.$emit("tableRowClick", row) |
| | | }, |
| | | handleReserve(row) { |
| | | return row._id ? row._id : row.id |
| | | }, |
| | |
| | | // 公共详情 |
| | | selCommonClick(row) { |
| | | this.$emit("selCommonClick", row) |
| | | }, |
| | | // 单选行相关 |
| | | tableRowClassName({ row }) { |
| | | if (Object.keys(this.selectClassRow).length > 0) { |
| | | if (row.id == this.selectClassRow.id) { |
| | | return "onSelect" |
| | | } |
| | | } |
| | | this.$emit("tableRowClassName", row) |
| | | }, |
| | | tableRowClick(row) { |
| | | this.$emit("tableRowClick", row) |
| | | } |
| | | } |
| | | } |
| | |
| | | // margin-top: 20px; |
| | | margin-right: 10px; |
| | | // margin-bottom: 40px; |
| | | height: 100%; |
| | | .blue { |
| | | width: 70px; |
| | | text-align: center; |
| | |
| | | <template> |
| | | <div class="page-view"> |
| | | <el-pagination |
| | | background |
| | | :current-page="pagerOptions.currPage" |
| | | :page-sizes="pageSizes" |
| | | :page-size="pagerOptions.pageSize" |
| | |
| | | v-on="$listeners" |
| | | > |
| | | </el-pagination> |
| | | <!-- :current-page.sync="searchParam.page" |
| | | :page-size="searchParam.pageSize" |
| | | background |
| | | :page-sizes="[15, 30]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | @current-change="changePage" |
| | | @size-change="handleSizeChange" |
| | | @prev-click="prevPage" |
| | | @next-click="nextPage" --> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | layout: { |
| | | type: String, |
| | | default: "total, sizes, prev, pager, next" |
| | | default: "total, sizes, prev, pager, next, jumper" |
| | | }, |
| | | pagerOptions: { |
| | | type: Object, |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { |
| | | getPurchaseList,getPurchaseInfo,submitPurchase, |
| | | } from "@/api/purchaseManage/purchase"; |
| | | import { getPurchaseList, getPurchaseInfo, submitPurchase } from "@/api/purchaseManage/purchase" |
| | | import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier" |
| | | import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase" |
| | | import { getDataByType } from "@/api/data"; |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | name: "SupplierManage", |
| | | props: {}, |
| | |
| | | visible: false, |
| | | infomation: {} |
| | | }, |
| | | search:'', |
| | | search: "", |
| | | editRow:{}, |
| | | editConfig: { |
| | | visible: false, |
| | | title: "创建", |
| | | infomation: {} |
| | | }, |
| | | purchaseStatusList:getDataByType('purchaseStatus'), |
| | | purchaseStatusList: getDataByType("purchaseStatus") |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | if (val) { |
| | | for (let i in this.purchaseStatusList) { |
| | | if (this.purchaseStatusList[i].id == val) { |
| | | return this.purchaseStatusList[i].name; |
| | | return this.purchaseStatusList[i].name |
| | | } |
| | | } |
| | | } else { |
| | | return "--"; |
| | | return "--" |
| | | } |
| | | }, |
| | | setTable() { |
| | |
| | | { label: "采购数量", prop: "quantity", min: 130 }, |
| | | { label: "收货仓库", prop: "warehouse", min: 130 }, |
| | | { label: "经办人", prop: "handledBy", min: 130 }, |
| | | { label: "制单人", prop: "creator", min: 130 }, |
| | | { label: "制单人", prop: "creator", min: 130 } |
| | | ] |
| | | } |
| | | }, |
| | |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.search = '' |
| | | this.search = "" |
| | | this.getData() |
| | | }, |
| | | // 新建 |
| | |
| | | this.editConfig.title = "创建" |
| | | this.editConfig.infomation = { |
| | | productList:[], |
| | | purchaseTypeId:'', |
| | | supplierId:'', |
| | | supplierName:'', |
| | | orderSource:'手动创建', |
| | | name:'', |
| | | contact:'', |
| | | phone:'', |
| | | signingDate:'', |
| | | deliveryDate:'', |
| | | remark:'', |
| | | purchaseTypeId: "", |
| | | supplierId: "", |
| | | supplierName: "", |
| | | orderSource: "手动创建", |
| | | name: "", |
| | | contact: "", |
| | | phone: "", |
| | | signingDate: "", |
| | | deliveryDate: "", |
| | | remark: "", |
| | | wholeDiscountType:null, |
| | | wholeDiscount:0, |
| | | priceAdjustmentType:null, |
| | | priceAdjustment:0, |
| | | realTotalPrice:0, |
| | | realTotalPrice: 0 |
| | | } |
| | | }, |
| | | |
| | |
| | | this.editConfig.infomation = { |
| | | productList:res.data.productList, |
| | | supplierName:res.data.purchase.supplier.name, |
| | | ...res.data.purchase, |
| | | ...res.data.purchase |
| | | } |
| | | }else{ |
| | | this.$message.error(res.msg?res.msg+',':''+'获取信息失败!') |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | setTimeout(()=>{ |
| | |
| | | },3000) |
| | | // this.editRow = row; |
| | | // this.$refs.add.islook = true; |
| | | |
| | | }, |
| | | // 确认发货 |
| | | submitClick(row) { |
| | |
| | | ...res.data.purchase |
| | | } |
| | | }else{ |
| | | this.$message.error(res.msg?res.msg+',':''+'获取信息失败!') |
| | | this.$message.error(res.msg ? res.msg + "," : "" + "获取信息失败!") |
| | | } |
| | | }) |
| | | setTimeout(()=>{ |
| | |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | // background: #fff; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | |
| | | <div class="basic-info-title">产品信息</div> |
| | | <div class="basic-info-view"> |
| | | <CommonFormTableView |
| | | ref="productTable" |
| | | :product-table-list="productTableList" |
| | | :detail-enter="detailEnter" |
| | | @inputContent="inputContent" |
| | |
| | | }, |
| | | // 保存 |
| | | saveClick() { |
| | | this.$refs.productTable.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.editConfig.infomation) |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].name.length === 0) { |
| | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | saveParams() { |
| | | let data = this.editConfig.infomation |
| | |
| | | </div> |
| | | </div> |
| | | <template> |
| | | <el-table |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableSupplier" |
| | | border |
| | | :data="tableList.tableInfomation" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :lazy="tableList.lazy" |
| | | highlight-current-row |
| | | @row-click="tableRowClick" |
| | | :header-cell-style="{ background: '#ECF4FF', color: '#666' }" |
| | | :table-list="tableList" |
| | | @selCommonClick="selCommonClick" |
| | | @tableRowClick="tableRowClick" |
| | | > |
| | | <el-table-column type="index" label="序号" width="50"> </el-table-column> |
| | | <el-table-column |
| | | v-for="(item, i) in tableList.tableColumn" |
| | | :key="i" |
| | | :prop="item.prop" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | :min-width="item.min" |
| | | show-overflow-tooltip |
| | | :sortable="item.sortable" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <div v-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div> |
| | | <span |
| | | v-else-if="item.isCommonClick && scope.row[item.prop]" |
| | | class="sel-name" |
| | | @click="selCommonClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button v-if="scope.row.status === 0" @click="enableClick(scope.row, '启用')" type="text" size="small" |
| | | <el-button |
| | | v-if="scope.row.status === 0" |
| | | @click="enableClick(scope.row, '启用')" |
| | | type="text" |
| | | size="small" |
| | | >启用</el-button |
| | | > |
| | | <el-button v-else @click="enableClick(scope.row, '停用')" type="text" size="small">停用</el-button> |
| | | <el-button @click="modifyClick(scope.row)" type="text" size="small">修改</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <template> |
| | | <div class="list-view"> |
| | | <TableCommonView |
| | | ref="tableListProduct" |
| | | :table-list="productTableList" |
| | |
| | | </el-table-column> |
| | | </template> |
| | | </TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="productPagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | |
| | | this.tableList = { |
| | | tableInfomation: [], |
| | | selectIndex: true, |
| | | highlight: true, |
| | | ref: "tableListRef", |
| | | tableColumn: [ |
| | | { label: "供应商编号", prop: "number", min: 190, isCommonClick: true }, |
| | |
| | | this.supplierId = 0 |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.tableSupplier.setCurrentRow(this.tableList.tableInfomation[0]) |
| | | this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0]) |
| | | }) |
| | | this.getProductList() |
| | | } |
| | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .rightContent { |
| | | height: 100%; |
| | | background: #f0f2f5; |
| | | padding: 10px; |
| | | .top { |
| | | margin-bottom: 20px; |
| | | height: 55%; |
| | | background: #fff; |
| | | .list-view { |
| | | height: calc(100% - 120px); |
| | | } |
| | | .supplier-search { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | color: $color-primary; |
| | | cursor: pointer; |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | // .btn-pager { |
| | | // display: flex; |
| | | // .page { |
| | | // margin-left: auto; |
| | | // } |
| | | // } |
| | | } |
| | | .bottom { |
| | | margin-top: 20px; |
| | | height: calc(40% - 0px); |
| | | background: #fff; |
| | | .list-view { |
| | | height: calc(100% - 120px); |
| | | } |
| | | .product-search { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .add-view { |
| | | margin-left: 20px; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | .btn-pager { |
| | | display: flex; |
| | | .page { |
| | | margin-left: auto; |
| | | } |
| | | } |
| | | } |