| | |
| | | style="width: 63%" |
| | | @change="selCommonClick" |
| | | > |
| | | <el-option v-for="item in selOptions" :key="item.id" :label="item.name" :value="item"> </el-option> |
| | | <el-option v-for="(item, index) in selOptions" :key="index" :label="item.name" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 位置 --> |
| | | <el-form-item v-else-if="item.location" 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-if="!scope.row.isEdit && scope.row.isOrder" |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <span v-else-if="scope.row.isEdit || scope.row.editable">{{ |
| | | scope.row[item.prop]?.label ?? scope.row[item.prop] |
| | | }}</span> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 产品 --> |
| | |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="item in productNameOptions" |
| | | :key="item.id" |
| | | v-for="(item, index) in productNameOptions" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="{ |
| | | value: item.id, |
| | |
| | | </el-select> --> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 路线 --> |
| | | <el-form-item v-else-if="item.route" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit">{{ scope.row[item.prop]?.label ?? scope.row[item.prop] }}</span> |
| | | <el-select |
| | | v-else |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 80%" |
| | | @change=" |
| | | (val) => { |
| | | selRoteClick(val, item.prop) |
| | | } |
| | | " |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in selRouteOptions" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="{ value: item.id, label: item.name }" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- 公司 --> |
| | | <el-form-item v-else-if="item.company" label=" " :prop="'tableData.' + scope.$index + '.' + item.prop"> |
| | | <div class="custom-name"> |
| | | <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span> |
| | | <el-select v-else v-model="scope.row[item.prop]" placeholder="请选择" size="mini" style="width: 80%"> |
| | | <el-option v-for="item in companyOptions" :key="item.id" :label="item.name" :value="item"> |
| | | <el-option v-for="(item, index) in companyOptions" :key="index" :label="item.name" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | |
| | | { id: 2, name: "打" } |
| | | ], |
| | | selLocationOptions: [], // 位置 |
| | | companyOptions: [] // 公司 |
| | | companyOptions: [], // 公司 |
| | | selRouteOptions: [] // 路线 |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | this.$emit("selLocationClick", item, prop) |
| | | }, |
| | | // 选择路线 |
| | | selRoteClick(item, prop) { |
| | | console.log(item, prop) |
| | | console.log(this.tableList.tableData) |
| | | // if (this.isinventory) { |
| | | // getRuleList({ |
| | | // locationId: item.value, |
| | | // productId: "" |
| | | // }).then((res) => { |
| | | // console.log(res) |
| | | // if (res.code === 200) { |
| | | // const list = res.data ? res.data : [] |
| | | // // this.selLocationOptions = list.locationList |
| | | // this.productNameOptions = list.productList |
| | | // } |
| | | // }) |
| | | // } |
| | | // this.$emit("selLocationClick", item, prop) |
| | | }, |
| | | // 选择单位/用户 |
| | | selCommonClick(item) { |
| | | console.log(item) |