| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="所属车间" prop="wkshopcode"> |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="getStepSelect" |
| | | > |
| | | |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <br> |
| | | <el-form-item prop="checktype" label="质检类型"> |
| | | <el-radio-group v-model="dialogForm.checktype"> |
| | | <el-radio label="InCheck">入厂检验</el-radio> |
| | | <el-radio label="OutCheck">出厂检验</el-radio> |
| | | <!-- <el-radio label="InCheck">入厂检验</el-radio>--> |
| | | <!-- <el-radio label="OutCheck">出厂检验</el-radio>--> |
| | | <el-radio label="FirstCheck">首检检验</el-radio> |
| | | <el-radio label="PatroCheck">巡检</el-radio> |
| | | <el-radio label="EndCheck">完工检</el-radio> |
| | |
| | | style="width: 200px" |
| | | multiple |
| | | filterable |
| | | |
| | | collapse-tags |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | |
| | | v-for="item in PartSelectArr" |
| | | v-if="dialogForm.suitobject==='P'" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | <el-option |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="检验方案描述"> |
| | | <el-input v-model="dialogForm.descr" type="textarea" :autosize="{ minRows: 2 }" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | <div style="display: flex;align-items: center;margin-bottom: 10px;"> |
| | |
| | | StepCheckItemSelect |
| | | } from '@/api/qualityManager' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | import { WorkShopSelect } from '@/api/deviceManager' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'org_code', |
| | | label: '所属车间编码', |
| | | id: 9, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'org_name', |
| | | label: '所属车间', |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stepcode', |
| | | label: '工序编码', |
| | | id: 9, |
| | | id: 11, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: false, |
| | | prop: 'stepname', |
| | | label: '工序名称', |
| | | id: 10, |
| | | id: 12, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: 110, |
| | | prop: 'username', |
| | | label: '创建人员', |
| | | id: 11, |
| | | id: 13, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: 160, |
| | | prop: 'lm_date', |
| | | label: '创建时间', |
| | | id: 12, |
| | | id: 14, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | suitobject: 'P', // 适用对象 |
| | | suitpart: [], // 适用物料 |
| | | stepcode: '', // 工序 |
| | | wkshopcode: '', // 所属车间 |
| | | descr: '' // /描述 |
| | | }, |
| | | operation: '', |
| | |
| | | ], |
| | | stepcode: [ |
| | | { required: true, message: '请选择工序名称', trigger: ['blur', 'change'] } |
| | | ], |
| | | wkshopcode: [ |
| | | { required: true, message: '请选择所属车间', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | checkitem: [], |
| | |
| | | CheckItemSelectArr: [], // 检验项目 |
| | | StepSelectArr: [], // 工序名称下拉所有 |
| | | |
| | | WorkShopArr: [], // 所属车间数组 |
| | | isCancel: true// 是否可取消 |
| | | |
| | | } |
| | |
| | | this.getQualityInspectionSearch().then(res => { |
| | | if (res.code === '200') { |
| | | // this.getUomSelect() |
| | | this.getStepCheckItemSelect() |
| | | // this.getStepCheckItemSelect() |
| | | this.getPartSelect() |
| | | this.getStockTypeSelect() |
| | | this.getStepSelect() |
| | | |
| | | this.getWorkShopSelect() |
| | | } |
| | | }) |
| | | }, |
| | | async getStepSelect() { |
| | | const { data: res } = await StepSelect() |
| | | // 获取所属车间下拉 |
| | | async getWorkShopSelect() { |
| | | const { data: res } = await WorkShopSelect() |
| | | this.WorkShopArr = res |
| | | }, |
| | | async getStepSelect(val) { |
| | | this.dialogForm.stepcode = '' |
| | | const { data: res } = await StepSelect({ WorkShop: val }) |
| | | this.StepSelectArr = res |
| | | |
| | | await this.getStepCheckItemSelect(val) |
| | | }, |
| | | async getQualityInspectionSearch() { |
| | | const res = await QualityInspectionSearch(this.form) |
| | |
| | | this.dialogForm.suitobject = row.suitobject |
| | | this.dialogForm.suitpart = row.suitpart.split(',') |
| | | this.dialogForm.descr = row.descr |
| | | this.dialogForm.wkshopcode = row.org_code |
| | | this.checkitem = res |
| | | |
| | | this.$refs.tableDataRef2.doLayout() |
| | |
| | | this.dialogForm.suitobject = row.suitobject |
| | | this.dialogForm.suitpart = row.suitpart.split(',') |
| | | this.dialogForm.descr = row.descr |
| | | this.dialogForm.wkshopcode = row.org_code |
| | | this.checkitem = res |
| | | // console.log(this.checkitem, 2) |
| | | this.$refs.tableDataRef2.doLayout() |
| | |
| | | this.dialogForm.suitpart = [] |
| | | }, |
| | | // 获取检验项目下拉接口 |
| | | async getStepCheckItemSelect() { |
| | | const { data: res } = await StepCheckItemSelect() |
| | | |
| | | async getStepCheckItemSelect(val) { |
| | | const { data: res } = await StepCheckItemSelect({ WorkShop: val }) |
| | | this.CheckItemSelectArr = [] |
| | | res.forEach(i => { |
| | | this.CheckItemSelectArr.push({ |
| | | code: i.code, |
| | |
| | | sampscale: '', |
| | | suitobject: 'P', |
| | | suitpart: [], |
| | | descr: '' |
| | | descr: '', |
| | | wkshopcode: '' |
| | | } |
| | | |
| | | this.isCancel = true |
| | |
| | | if (valid) { |
| | | if (this.checkitem.length < 1) { |
| | | return this.$message.info('质检列表不能为空!') |
| | | } |
| | | if (this.checkitem.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请先保存质检列表!') |
| | | } |
| | | if (this.dialogForm.checktype === 'InCheck' || this.dialogForm.checktype === 'OutCheck') { |
| | | this.dialogForm.stepcode = '' |
| | | } |
| | | |
| | | const checkitem = [] |
| | |
| | | suitpart: this.dialogForm.suitpart.join(','), |
| | | type: this.operation === 'add' ? 'Add' : 'Update', |
| | | descr: this.dialogForm.descr, |
| | | wkshopcode: this.dialogForm.wkshopcode, |
| | | checkitem |
| | | } |
| | | |