| | |
| | | <el-menu-item index="/reportForm/inventoryReport">库存报表</el-menu-item> |
| | | <el-menu-item index="/reportForm/locationReport">位置报表</el-menu-item> |
| | | <!-- <el-menu-item index="/warehouseManage/bussinessType">某日库存</el-menu-item> --> |
| | | <!-- <el-menu-item index="/productManage/product">出入库明细报表</el-menu-item> --> |
| | | <el-menu-item index="/reportForm/inboundOutboundDetail">出入库明细报表</el-menu-item> |
| | | </el-submenu> |
| | | </el-menu> |
| | | </div> |
| | |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 产品类型 --> |
| | | <el-form-item v-else-if="item.productType" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit || scope.row.editable">{{ scope.row[item.prop] }}</span> |
| | | <el-select |
| | | v-else |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 80%" |
| | | @change=" |
| | | (val) => { |
| | | selProductTypeClick(val) |
| | | } |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in productTypeNameOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 用户 --> |
| | | <el-form-item v-else-if="item.user" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | |
| | | import { getLocationList } from "@/api/warehouseManage/warehouse" |
| | | import { getCompanyList } from "@/api/common/other" |
| | | import { getRuleList } from "@/api/operate/inventoryAdjustment" |
| | | import { getProductCategoryList } from "@/api/product/productCategory" |
| | | import SimpleSearchInput from "@/components/makepager/SimpleSearchInput" |
| | | // import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | export default { |
| | |
| | | }, |
| | | productIndex: 0, |
| | | productNameOptions: [], |
| | | productTypeNameOptions: [], |
| | | memberOptions: [{ id: 1, name: "管理员" }], |
| | | selOptions: [ |
| | | { id: 1, name: "件" }, |
| | |
| | | this.getRuleList() |
| | | } else { |
| | | this.getProductList() |
| | | this.getProductCategoryList() |
| | | } |
| | | if (this.islistingrules) { |
| | | this.getLocationList() |
| | |
| | | const list = res.data ? res.data : [] |
| | | this.selLocationOptions = list.locationList |
| | | this.productNameOptions = list.productList |
| | | } |
| | | }) |
| | | }, |
| | | // 获取产品类型列表 |
| | | async getProductCategoryList(){ |
| | | await getProductCategoryList({ |
| | | categoryId:0, |
| | | keyWord:"", |
| | | page:1, |
| | | pageSize:15 |
| | | }).then((res) => { |
| | | console.log(res,"看看产品类型列表") |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.productTypeNameOptions = list |
| | | } |
| | | }) |
| | | }, |
| | |
| | | console.log(this.tableList.tableData) |
| | | this.$emit("selProductClick", item) |
| | | }, |
| | | // 选择产品类型 |
| | | selProductTypeClick(item) { |
| | | if (this.isinventory) { |
| | | this.getProductCategoryList() |
| | | } |
| | | console.log(this.tableList.tableData) |
| | | this.$emit("selProductTypeClick", item) |
| | | }, |
| | | // 选择位置 |
| | | selLocationClick(item, prop) { |
| | | console.log(item) |
| | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getHistory } from "@/api/reportForm/inventoryRwport" |
| | | import { getProductOperatonList } from "@/api/product/product" |
| | | // import { getProductOperatonList } from "@/api/product/product" |
| | | |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | await getProductOperatonList({ |
| | | productId: this.params.id, |
| | | // await getProductOperatonList({ |
| | | // productId: this.params.id, |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // const list = res.data.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // fromLocation: item.fromLocation.name, |
| | | // toLocation: item.toLocation.name, |
| | | // productName: this.params.name, |
| | | // amount: item.details[0].product.amount, |
| | | // unit: item.details[0].product.unit |
| | | // } |
| | | // }) |
| | | // this.tableList.tableInfomation = list || [] |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | await getHistory({ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | fromLocation: item.fromLocation.name, |
| | | toLocation: item.toLocation.name, |
| | | productName: this.params.name, |
| | | amount: item.details[0].product.amount, |
| | | unit: item.details[0].product.unit |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | |
| | | @tableRowClick="tableRowClick" |
| | | @selLocationClick="selLocationClick" |
| | | @selProductClick="selProductClick" |
| | | @selProductTypeClick="selProductTypeClick" |
| | | > |
| | | <template slot="tableButton"> |
| | | <el-table-column label="操作" width="90" align="center"> |
| | |
| | | areaId: 0, |
| | | productId: 0, |
| | | subLocationId: 0, |
| | | currentRowId: 0 |
| | | currentRowId: 0, |
| | | rowIndex:0 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | tableColumn: [ |
| | | { label: "当产品到达", prop: "areaName", location: true }, |
| | | { label: "产品", prop: "productName", product: true }, |
| | | { label: "产品类别", prop: "productCategory" }, |
| | | { label: "产品类别", prop: "productCategory",productType: true }, |
| | | { label: "存储到子位置", prop: "subLocation", location: true } |
| | | // { label: "公司", prop: "companyName", company: true } |
| | | ] |
| | |
| | | }, |
| | | // 新增 |
| | | addProductClick() { |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=true |
| | | console.log(this.tableData) |
| | | this.isSel() |
| | | if (this.isNoProduct && this.addTitle === "新建") { |
| | |
| | | }, |
| | | // 取消 |
| | | discardBtnClick() { |
| | | this.tableList.tableColumn[1].product=true |
| | | this.tableList.tableColumn[2].productType=true |
| | | if (this.isRowClick) { |
| | | this.tableData.map((item) => { |
| | | item.isEdit = true |
| | |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row, rowIndex) { |
| | | console.log("11111") |
| | | // this.tableList.tableColumn[1].product=true |
| | | // this.tableList.tableColumn[2].productType=true |
| | | this.rowIndex=rowIndex |
| | | console.log("11111",row,rowIndex) |
| | | this.isSel() |
| | | if (!this.isNoProduct && this.currentRowId === 0) { |
| | | this.$message.error("请完成当前新建或取消新建") |
| | |
| | | }, |
| | | // 选中产品方法 |
| | | selProductClick(item) { |
| | | console.log(item) |
| | | this.tableList.tableColumn[2].productType=false |
| | | this.productId = item.value |
| | | this.productCategoryId = item.categoryId |
| | | }, |
| | | // 选中产品类型方法 |
| | | selProductTypeClick(item) { |
| | | console.log(item,"产品类型",this.tableList.tableData[this.rowIndex]) |
| | | this.tableList.tableColumn[1].product=false |
| | | this.tableList.tableData[this.rowIndex].productName='--' |
| | | }, |
| | | // 删除 |
| | | async delClick(scope) { |
| | | console.log(scope) |