fix:供应商管理添加产品,产品列表展示修改及采购管理bug修改
| | |
| | | :prop="'tableData.' + scope.$index + '.' + item.prop" |
| | | :rules="[{ required: item.isRequird ? true : false, message: '输入不能为空' }]" |
| | | > |
| | | <!-- 采购管理 --> |
| | | <template v-if="item.multiply"> |
| | | <el-input-number |
| | | :disabled="item.disabled" |
| | |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | productIndex: 0 |
| | | productIndex: 0, |
| | | tableProductLists:[], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | if (res.data.code === 200) { |
| | | if (res.data.data.list && res.data.data.list.length > 0) { |
| | | this.productList = res.data.data.list |
| | | this.tableProductLists = res.data.data.list |
| | | } |
| | | } |
| | | }) |
| | |
| | | this.$emit("addProductClick") |
| | | }, |
| | | commonInputChange(val, prop, row) { |
| | | console.log(val, prop) |
| | | console.log(row) |
| | | this.$emit("inputContent", val, prop, row) |
| | | }, |
| | | // 清空 |
| | |
| | | }, |
| | | // 选择产品名称相关方法 |
| | | querySearchAsync(queryString, cb) { |
| | | var restaurants = this.productTableList.tableProductList |
| | | var restaurants = this.tableProductLists |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | | }, |
| | |
| | | }, |
| | | handleSelectClient(item, prop, row) { |
| | | // this.clientId = item.id |
| | | console.log(item, prop, row) |
| | | this.tableList.tableData.map((ite) => { |
| | | if (ite.name === item.name) { |
| | | ite.ID = row.ID |
| | |
| | | ref="tableListRef" |
| | | :showSummary="showSummary" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | <div class="table-bottom"> |
| | |
| | | mergeNumber: 5, |
| | | totalName:'小计' |
| | | }, |
| | | showCol: ['产品名称', '产品编码', '计量单位', '规格型号', '数量', '销售单价','价税合计','描述'], |
| | | purchaseStatusList:getDataByType('purchaseStatus'), |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "name", min: 160, }, |
| | | { label: "产品编码", prop: "number", min: 130, }, |
| | | { label: "计量单位", prop: "unit", min: 130 }, |
| | | { label: "规格型号", prop: "specifications", min: 130 }, |
| | | { label: "数量", prop: "amount", min: 130 }, |
| | | { label: "销售单价", prop: "price", min: 130 }, |
| | | { label: "价税合计", prop: "total", min: 130 }, |
| | | { label: "描述", prop: "remark", min: 130 }, |
| | | ], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.tableList = { |
| | | tableInfomation: item.productList?item.productList:[], |
| | | selectIndex: true, |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "name", min: 160, }, |
| | | { label: "产品编码", prop: "number", min: 130, }, |
| | | { label: "计量单位", prop: "unit", min: 130 }, |
| | | { label: "规格型号", prop: "specifications", min: 130 }, |
| | | { label: "数量", prop: "amount", min: 130 }, |
| | | { label: "销售单价", prop: "price", min: 130 }, |
| | | { label: "价税合计", prop: "total", min: 130 }, |
| | | { label: "描述", prop: "remark", min: 130 }, |
| | | ], |
| | | showcol: this.showCol, |
| | | allcol:[], |
| | | tableColumn:this.setColumnVisible(this.showCol) |
| | | }; |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.detailConfig.visible = false; |
| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="220" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="btnConfirm(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnConfirm(scope.row)" style="margin-right: 5px" |
| | | >确认</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnEdit(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnEdit(scope.row)" style="margin-right: 5px" |
| | | >编辑</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnLook(scope.row)" style="margin-right: 5px" |
| | | >查看</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnCancel(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnCancel(scope.row)" style="margin-right: 5px" |
| | | >取消</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px" |
| | | >删除</el-button |
| | | > |
| | | <!-- <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">提交</el-button> --> |
| | |
| | | } |
| | | }, |
| | | tableColumn: [ |
| | | { label: "单据类型", prop: "orderType", min: 130 }, |
| | | { label: "采购单号", prop: "number", min: 150, isCommonClick: true ,default:true}, |
| | | { label: "采购单名称", prop: "name", min: 130, isCommonClick: true }, |
| | | { label: "单据类型", prop: "orderType", min: 130 }, |
| | | { label: "供应商名称", prop: "supplierName", min: 130 }, |
| | | { label: "采购数量", prop: "quantity", min: 130 }, |
| | | { label: "收货仓库", prop: "warehouse", min: 130 }, |
| | | { label: "经办人", prop: "handledBy", min: 130 }, |
| | | { label: "制单人", prop: "creator", min: 130 } |
| | | ], |
| | | showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库'] |
| | | showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库','经办人','制单人'] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | this.tableLoading = true |
| | | getPurchaseInfo({ id: row.ID }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res,"产品详情") |
| | | this.tableLoading = false |
| | | this.commonDetail.visible = true |
| | | this.commonDetail.infomation = { |
| | |
| | | name: data.name || "", |
| | | number: data.number || "", |
| | | phone: data.phone || "", |
| | | responsiblePersonName: data.responsiblePersonName || "", |
| | | responsiblePersonName: data.responsiblePersonName || "admin", |
| | | status: data.status || 0, |
| | | supplierType: data.supplierType || "", |
| | | url: data.url || "" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="activeName === 'second'" class="second"> |
| | | <!-- <FollowupRecords |
| | | :isDetail="true" |
| | | :follow-record="detailConfig.infomation.FollowRecord" |
| | | :add-config="addConfig" |
| | | /> --> |
| | | <div v-if="activeName === 'second'" class="detail"> |
| | | <!-- 采购订单-基本信息 --> |
| | | <!-- 产品信息 --> |
| | | <div class="basic-info"> |
| | | <div class="basic-info-label" @click="expandClick('basic')"> |
| | | <i v-if="isBasicExpand" class="el-icon-arrow-down"></i> |
| | | <i v-else class="el-icon-arrow-up"></i> |
| | | <span style="margin-left: 10px">产品信息</span> |
| | | </div> |
| | | <div v-show="isBasicExpand" class="basic-info-content"> |
| | | <TableCommonView |
| | | style="margin-top: 2px" |
| | | class="content-table" |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | > |
| | | </TableCommonView> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | |
| | | default: () => { |
| | | return { |
| | | visible: false, |
| | | infomation: {} |
| | | infomation: {}, |
| | | productListInfo:[] |
| | | } |
| | | } |
| | | } |
| | |
| | | addConfig: {}, |
| | | record: "", // 最新进展 |
| | | noContactDays: 0, |
| | | newContactDays: "" |
| | | newContactDays: "", |
| | | tableList:{}, |
| | | showCol: ['产品名称', '产品编码', '计量单位', '规格型号', '数量', '销售单价','价税合计','描述'], |
| | | tableColumn: [ |
| | | { label: "产品名称", prop: "name", min: 160, }, |
| | | { label: "产品编码", prop: "number", min: 130, }, |
| | | { label: "计量单位", prop: "unit", min: 130 }, |
| | | { label: "规格型号", prop: "specifications", min: 130 }, |
| | | { label: "数量", prop: "amount", min: 130 }, |
| | | { label: "销售单价", prop: "price", min: 130 }, |
| | | { label: "价税合计", prop: "total", min: 130 }, |
| | | { label: "描述", prop: "remark", min: 130 }, |
| | | ], |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.detailConfig,"抽屉组件") |
| | | this.setData(this.detailConfig.infomation) |
| | | this.addConfig = { |
| | | id_name: "sales_leads_id", |
| | |
| | | rightValue: "" |
| | | } |
| | | ] |
| | | this.purchaseList = [ |
| | | { |
| | | leftStr: "采购单号", |
| | | leftValue: item.number, |
| | | rightStr: "采购单名称", |
| | | rightValue: item.name |
| | | }, |
| | | { |
| | | leftStr: "供应商类型", |
| | | leftValue: item.supplierType, |
| | | rightStr: "所属行业", |
| | | rightValue: item.industry |
| | | }, |
| | | { |
| | | leftStr: "单据类型", |
| | | leftValue: item.contact, |
| | | rightStr: "供应商名称", |
| | | rightValue: item.phone |
| | | }, |
| | | { |
| | | leftStr: "采购数量", |
| | | leftValue: item.responsiblePersonName, |
| | | rightStr: "收货仓库", |
| | | rightValue: item.url |
| | | }, |
| | | { |
| | | leftStr: "经办人", |
| | | leftValue: item.email, |
| | | rightStr: "制单人", |
| | | rightValue: "" |
| | | }, |
| | | { |
| | | leftStr: "状态", |
| | | leftValue: item.email, |
| | | rightStr: "", |
| | | rightValue: "" |
| | | }, |
| | | ] |
| | | this.dynamicInfoList = [ |
| | | { |
| | | leftStr: "户名", |
| | |
| | | rightValue: "" |
| | | } |
| | | ] |
| | | this.tableList = { |
| | | tableInfomation: this.detailConfig.productListInfo?this.detailConfig.productListInfo:[], |
| | | selectIndex: true, |
| | | showcol: this.showCol, |
| | | allcol:[], |
| | | tableColumn:this.setColumnVisible(this.showCol), |
| | | }; |
| | | this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label); |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val; |
| | | this.tableList.tableColumn = this.setColumnVisible(val); |
| | | }, |
| | | setColumnVisible(showCol){ |
| | | return this.tableColumn.map(ele=>{ |
| | | return { |
| | | ...ele, |
| | | isShowColumn:showCol.includes(ele.label) |
| | | } |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.detailConfig.visible = false |
| | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getSupplierList, changeSupplierStatus } from "@/api/supplierManage/supplier" |
| | | import {getPurchaseList} from "@/api/purchaseManage/purchase" |
| | | import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier" |
| | | import AddSupplier from "@/views/supplierManage/supplier/AddSupplier" |
| | | import RaleteSupplierList from "@/views/supplierManage/supplier/RaleteSupplierList" |
| | |
| | | searchProductOptions: [], // 产品查询 |
| | | commonDetail: { |
| | | visible: false, |
| | | infomation: {} |
| | | infomation: {}, |
| | | productListInfo:[] |
| | | }, |
| | | editConfig: { |
| | | visible: false, |
| | |
| | | }, |
| | | // 详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | getPurchaseList({pageSize:10,page:1,supplierId:row.ID}).then((res)=>{ |
| | | this.commonDetail.productListInfo=res.data.data.list |
| | | }) |
| | | this.commonDetail.visible = true |
| | | this.commonDetail.infomation = { ...row } |
| | | }, |