| | |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 产品到达位置 --> |
| | | <el-form-item v-else-if="item.toLocation" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit || scope.row.editable">{{ |
| | | scope.row[item.prop]?.label ?? scope.row[item.prop] |
| | | }}</span> |
| | | <el-select |
| | | v-else |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | filterable |
| | | style="width: 80%" |
| | | @change=" |
| | | (val) => { |
| | | selLocationClick(val, item.prop) |
| | | } |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in selToLocationOptions" |
| | | :key="index" |
| | | :label="item.jointName" |
| | | :value="{ value: item.id, label: item.jointName }" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 子位置 --> |
| | | <el-form-item v-else-if="item.sonLocation" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <el-form-item |
| | | v-else-if="item.sonLocation" |
| | | label=" " |
| | | :prop="'tableData.' + scope.$index + '.' + item.prop" |
| | | > |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit || scope.row.editable">{{ |
| | | scope.row[item.prop]?.label ?? scope.row[item.prop] |
| | |
| | | ], |
| | | selLocationOptions: [], // 位置 |
| | | selSonLocationOptions:[], //子位置 |
| | | selToLocationOptions: [], // 产品到达位置 |
| | | companyOptions: [], // 公司 |
| | | selRouteOptions: [{ id: 1, name: "制造" }], // 路线 |
| | | locacionName: "", |
| | |
| | | this.getProductCategoryList() |
| | | } |
| | | if (this.islistingrules) { |
| | | this.getLocationList() |
| | | this.getToLocationList() |
| | | // this.getCompanyList() |
| | | } |
| | | this.tableList = this.productTableList |
| | |
| | | if (value === "product") { |
| | | if(item.categoryId===0||item.categoryName===""){ |
| | | this.productTypeNameOptions =[] |
| | | this.tableList.tableData[this.tableList.rowClickIndex].productCategory='' |
| | | this.tableList.tableData[this.tableList.rowClickIndex].productCategory = "" |
| | | }else{ |
| | | await getProductCategoryList({ |
| | | categoryId: item.categoryId, |
| | |
| | | } |
| | | }, |
| | | querySearchAsync(queryString, cb, value) { |
| | | let restaurants='' |
| | | let restaurants = "" |
| | | if(value==="product"){ |
| | | restaurants = this.productNameOptions |
| | | }else if(value==="productType"){ |
| | |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.selLocationOptions = list |
| | | this.selSonLocationOptions = list |
| | | console.log(list, "999") |
| | | if (this.isReorder) { |
| | | this.locacionName = list[0]?.name |
| | | this.locacionId = list[0]?.id |
| | | this.$emit("selLocationClick", list[0], "locacionName") |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 产品到达位置 |
| | | async getToLocationList() { |
| | | await getLocationList({ |
| | | // keyword: "", |
| | | type: 3, |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | console.log(res, "newlocal") |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.selToLocationOptions = list |
| | | this.selSonLocationOptions=list |
| | | console.log(list,"999") |
| | | if (this.isReorder) { |
| | |
| | | font-size: 13px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |