| | |
| | | > |
| | | </el-autocomplete> |
| | | </template> |
| | | |
| | | <!-- |
| | | <template #programmer="{}"> |
| | | <el-autocomplete ref="autoProgrammer" :disabled="drawingNoMatch" v-model="attachForm.programmer" |
| | | :fetch-suggestions="queryProgrammerAsync" |
| | |
| | | > |
| | | </el-autocomplete> |
| | | </template> |
| | | |
| | | --> |
| | | </avue-form> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getQueryString, |
| | | } from '@/utils/util'; |
| | | |
| | | export default { |
| | | watch: { |
| | | 'attachForm.drawingNo': function (val) { |
| | |
| | | isLeaf: (data) => !data.hasChildren |
| | | }, |
| | | timeout:0, //零件号加载的timeout |
| | | drawingNoMatch:true,//零件号是否匹配分工表 |
| | | //drawingNoMatch:true,//零件号是否匹配分工表 |
| | | attachOption: { |
| | | labelWidth: 160, |
| | | submitBtn: true, |
| | |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '偏离单号', |
| | | label: '临时更改单号', |
| | | prop: 'deviation', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | class:'input_holder_warn', |
| | | placeholder:'无偏离单任务请留空', |
| | | placeholder:'非临时更改单任务请留空', |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: '主管工艺', |
| | | prop: 'programmer', |
| | | type: 'input',//column 12 |
| | | disabled:true, |
| | | prop: 'producePlanId', |
| | | type: 'select',//column 12 |
| | | clearable:true, |
| | | remote: true, |
| | | placeholder:'无法匹配人员职责表时请选择主管工艺', |
| | | dicUrl: `/blade-mdm/producedivision/select-programmer?programmer={{key}}`, |
| | | dicFormatter:(res)=>{ |
| | | return res.data.map(obj => { |
| | | let item = new Object(); |
| | | item.value = obj.id; |
| | | item.label = obj.programmerName; |
| | | item.desc = `专业组长:${obj.teamLeaderName},校对:${obj.checkerName},审核:${obj.seniorName}` |
| | | return item; |
| | | }); ; |
| | | }, |
| | | span: 12, |
| | | dataType: 'string', |
| | | }, |
| | | /*{ |
| | | label: '主管工艺', |
| | | prop: 'programmer', |
| | | type: 'input',//column 12 |
| | | span: 12, |
| | | dataType: 'string', |
| | | },*/ |
| | | ], |
| | | }, |
| | | attachForm: {planLockDays:7,planStartTime: this.$dayjs().format('YYYY-MM-DD')},//默认7天 |
| | |
| | | handleSelect(item) { |
| | | this.attachForm.productModel = item.cph; |
| | | }, |
| | | |
| | | /* |
| | | queryProgrammerAsync(query, cb) {//主管工艺搜索建议 |
| | | axios({ |
| | | url: '/blade-mdm/producedivision/select-programmer', |
| | |
| | | ); |
| | | |
| | | }, |
| | | */ |
| | | /* |
| | | handleProgrammerSelect(item){ |
| | | this.attachForm.producePlanId = item.id; |
| | | this.attachForm.planDrawingNo = this.attachForm.drawingNo;//记录此时的零组件号 |
| | | console.log('productid',this.attachForm ) |
| | | |
| | | }, |
| | | },*/ |
| | | handleTrim(col){ |
| | | //console.log(col) |
| | | let value = this.attachForm[col.column.prop]; |
| | |
| | | }, |
| | | formSubmit(form, done) { |
| | | var form = { ...form }; |
| | | console.log('submit',form); |
| | | if(this.attachForm.planDrawingNo == this.attachForm.drawingNo && this.attachForm.producePlanId){ |
| | | |
| | | if(this.attachForm.producePlanId){ |
| | | //手动指定了人员职责表id,不用继续从服务端验证 |
| | | this.startDispatch(form,done); |
| | | }else{ |
| | |
| | | res => { |
| | | |
| | | if(res.data.code == 200){ |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | |
| | | this.attachForm.producePlanId = res.data.data.id; |
| | | this.drawingNoMatch = true; |
| | | //this.drawingNoMatch = true; |
| | | console.log('planid',this.attachForm.productPlanId) |
| | | this.startDispatch(form,done); |
| | | }else{ |
| | | this.drawingNoMatch = false; |
| | | //this.drawingNoMatch = false; |
| | | |
| | | this.$alert(res.data.msg+".或者手动选择主管工艺。", '发起任务失败',{type:'error',confirmButtonText:'关闭'}); |
| | | this.$alert(res.data.msg+".重新输入或者手动选择主管工艺。", '发起任务失败',{type:'error',confirmButtonText:'关闭'}); |
| | | } |
| | | done(); |
| | | }, |
| | |
| | | }); |
| | | this.$refs.form.resetForm(); |
| | | this.attachForm = this.defaultForm; |
| | | this.drawingNoMatch = true; |
| | | //this.drawingNoMatch = true; |
| | | }else{ |
| | | this.$alert(res.data.msg, '发起任务失败',{type:'error',confirmButtonText:'关闭'}); |
| | | } |