| | |
| | | :page="testObjectPage" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | <!--产品维护弹框--> |
| | | <el-dialog title="产品维护" :visible.sync="diaProduct" width="600px"> |
| | | <div class="body" v-if="diaProduct" style="height: 350px;overflow-y: auto;padding: 5px 0;"> |
| | | <lims-table :tableData="productData" :column="productColumn" |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="diaProduct = false">取 消</el-button> |
| | | <el-button type="primary" @click="openAdd2" :loading="productLoad">新 增</el-button> |
| | | <el-button type="primary" @click="editProduct('add')" :loading="productLoad">新 增</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!--产品维护编辑--> |
| | | <el-dialog title="编辑产品维护" :visible.sync="productEditDia" width="400px"> |
| | | <el-form :model="productEditForm" ref="productEditForm" :rules="productRules"> |
| | | <el-form-item label="产品名称" prop="name"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="productEditForm.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产品名称EN" prop="nameEn"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="productEditForm.nameEn"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeProduct">取 消</el-button> |
| | | <el-button :loading="uploading" type="primary" @click="submitProduct">确 认</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="uploadDia" title="数据导入" width="500px"> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <!--检验项目参数-编辑弹框--> |
| | | <EditForm ref="editForm"></EditForm> |
| | | <EditForm ref="editForm" @refreshTable="refreshTable"></EditForm> |
| | | <testObjectEditForm ref="testObjectEditForm"></testObjectEditForm> |
| | | <BindPartDialog v-if="bindPartDialog" :bindPartDialog="bindPartDialog" |
| | | :currentRow="currentRow" |
| | |
| | | name: '编辑', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editProduct(row); |
| | | this.editProduct('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | current:0 |
| | | }, |
| | | productableLoading: false, |
| | | inPower: true, |
| | | productEditDia: false, |
| | | productEditForm: { |
| | | name: '', |
| | | nameEn: '' |
| | | }, |
| | | productRules: { |
| | | name: [{ required: true, message: '请填写产品名称', trigger: 'blur' }], |
| | | nameEn: [{ required: true, message: '请填写产品名称EN', trigger: 'blur' }] |
| | | }, |
| | | uploadDia: false, |
| | | fileList: [], |
| | | token: {Authorization: "Bearer " + getToken()}, |
| | |
| | | type: null, // 零件绑定的类型--0:检验对象,1:产品维护 |
| | | } |
| | | }, |
| | | created() { |
| | | this.refreshTable() |
| | | }, |
| | | mounted() { |
| | | this.token = { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | computed: { |
| | |
| | | selectItemParameterList({...this.page, ...this.itemParameterForm}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data |
| | | this.page.total = res.total |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | |
| | | selectTestObjectList({...this.testObjectPage, ...this.itemParameterForm}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.testObjectTableData = res.data |
| | | this.testObjectPage.total = res.total |
| | | this.testObjectTableData = res.data.records |
| | | this.testObjectPage.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | |
| | | selectProductListByObjectId({...params, ...this.productPage}).then(res => { |
| | | this.productableLoading = false |
| | | if (res.code === 200) return |
| | | this.productData = res.data |
| | | this.productData = res.data.records |
| | | this.productPage.total = res.data.total |
| | | }).catch(err => { |
| | | this.productableLoading = false |
| | | }) |
| | | }, |
| | | // 产品维护-新增 |
| | | openAdd2(){ |
| | | |
| | | // 产品维护-新增-编辑 |
| | | editProduct (type, row) { |
| | | this.productEditDia = true |
| | | if (type === 'edit') { |
| | | this.productEditForm = row |
| | | } |
| | | }, |
| | | // 产品维护-编辑 |
| | | editProduct () { |
| | | // 提交产品维护修改 |
| | | submitProduct () { |
| | | this.$refs['productEditForm'].validate((valid) => { |
| | | if (valid) { |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | closeProduct() { |
| | | this.productEditDia = false |
| | | this.resetForm('productEditForm') |
| | | }, |
| | | // 产品维护-删除 |
| | | deleteProduct (row) { |