| | |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-decorator="['departId', validatorRules.departId]" |
| | | />--> |
| | | <a-select |
| | | <!-- <a-select |
| | | :placeholder="'请选择领用部门'" |
| | | :options="this.departs" |
| | | :disabled="disableSubmit" |
| | | style="width: 100%" |
| | | v-model='model.departId' |
| | | />--> |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="请选择领用部门" |
| | | tree-default-expand-all |
| | | v-model='model.departId' |
| | | /> |
| | | </a-form-item> |
| | |
| | | data() { |
| | | return { |
| | | departId:[], |
| | | treeData:[], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | url: { |
| | | add: '/spare/sparePartCancellingStocks/add', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | edit: '/spare/sparePartCancellingStocks/edit' |
| | | }, |
| | | |
| | |
| | | }) |
| | | }, |
| | | created() { |
| | | this.getSysDeparts() |
| | | }, |
| | | |
| | | methods: { |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | | this.treeData = res.result |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | getSysDeparts() { |
| | | getAction(this.url.getSysDeparts).then((res) => { |
| | | if (res.success) { |
| | |
| | | that.form.resetFields() |
| | | that.model = Object.assign({}, record) |
| | | that.visible = true |
| | | that.initOptions() |
| | | that.warehouseId = record.warehouseId |
| | | if (record.sparePartCancellingStocksDetailList != undefined) { |
| | | const temp = [...record.sparePartCancellingStocksDetailList] |