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