| | |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | plain |
| | | icon="el-icon-setting" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="statusChange" |
| | | v-hasPermi="['bs:bomInfo:remove']" |
| | | >状态变更</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | |
| | | <el-form-item label="产品名称" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请输入产品名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="工单状态" prop="status"> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listBomInfo, getBomInfo, delBomInfo, addBomInfo, updateBomInfo } from "@/api/main/bs/bomInfo"; |
| | | import { listBomInfo, getBomInfo, delBomInfo, addBomInfo, updateBomInfo,statusChange } from "@/api/main/bs/bomInfo"; |
| | | |
| | | export default { |
| | | name: "BomInfo", |
| | |
| | | createUser: null, |
| | | updateUser: null, |
| | | dataSource: null, |
| | | |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | this.loading = true; |
| | | listBomInfo(this.queryParams).then(response => { |
| | | this.bomInfoList = response.rows; |
| | | console.log(this.bomInfoList) |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | |
| | |
| | | this.open = true; |
| | | this.title = "修改基础BOM"; |
| | | }); |
| | | console.log(this.from.status) |
| | | }, |
| | | /** 状态变更按钮操作 */ |
| | | statusChange(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getBomInfo(id).then(response => { |
| | | this.form = response.data; |
| | | }); |
| | | console.log(this.from) |
| | | this.$refs["form"].validate(valid => { |
| | | if(valid){ |
| | | if(this.from.status==='1'){ |
| | | this.from.status='0'; |
| | | updateBomInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("停用成功"); |
| | | this.getList(); |
| | | }); |
| | | }else{ |
| | | this.from.status='1'; |
| | | updateBomInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("启用成功"); |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |