| | |
| | | :data="treeData" :props="defaultProps"> |
| | | </el-tree-select> |
| | | </template> |
| | | <template #drawingNo="{}"> |
| | | <el-autocomplete v-model="attachForm.drawingNo" |
| | | :fetch-suggestions="querySearchAsync" |
| | | :trigger-on-focus="false" @select="handleSelect" |
| | | > |
| | | </el-autocomplete> |
| | | </template> |
| | | </avue-form> |
| | | </basic-container> |
| | | </template> |
| | |
| | | }, |
| | | }, |
| | | data() { |
| | | |
| | | //var isTempFlow = getQueryString("isTempFlow"); |
| | | //isTempFlow = isTempFlow === 'Y'?'Y':'N'; |
| | | |
| | | var that = this; |
| | | return { |
| | | form: {}, |
| | |
| | | disabled: (data) => data.nodeType!=='machine',//仅机床节点可选 |
| | | isLeaf: (data) => !data.hasChildren |
| | | }, |
| | | |
| | | timeout:0, //零件号加载的timeout |
| | | attachOption: { |
| | | labelWidth: 160, |
| | | submitBtn: true, |
| | |
| | | prop: 'machineCode', |
| | | type: 'select', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | |
| | | span: 12 |
| | | }, |
| | | { |
| | |
| | | // 如果既不是machine节点也没有子节点,直接返回原节点 |
| | | return node; |
| | | }, |
| | | |
| | | querySearchAsync(query, cb) {//零组件号搜索建议 |
| | | axios({ |
| | | url: '/blade-mdm/producedivision/select-data', |
| | | method: 'get', |
| | | params: {drawingNo: query}, |
| | | }).then( |
| | | res => { |
| | | if(res.data.code == 200){ |
| | | let list = res.data.data; |
| | | for(let i of list){ |
| | | i.value = i.ljh; |
| | | } |
| | | |
| | | clearTimeout(this.timeout) |
| | | this.timeout = setTimeout(() => { |
| | | cb(list); |
| | | }, 1000) |
| | | |
| | | } |
| | | }, |
| | | error => { |
| | | console.log(error); |
| | | } |
| | | ); |
| | | |
| | | }, |
| | | handleSelect(item) { |
| | | this.attachForm.productModel = item.cph; |
| | | }, |
| | | handleTrim(col){ |
| | | //console.log(col) |
| | | let value = this.attachForm[col.column.prop]; |