| | |
| | | </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) |