| | |
| | | > |
| | | <a-input |
| | | placeholder='请输入库单编号' |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | :labelCol='labelCol' |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <!-- <j-dict-select-tag |
| | | allow-clear |
| | | :disabled='disableSubmit' |
| | | :placeholder="disableSubmit?'':'请选择采购部门'" |
| | | :triggerChange='true' |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | v-decorator="['departId', validatorRules.departId]" |
| | | />--> |
| | | <a-select |
| | | :placeholder="'请选择采购部门'" |
| | | :options="this.departs" |
| | | |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :disabled="disableSubmit" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="请选择采购部门" |
| | | tree-default-expand-all |
| | | v-decorator="['departId', validatorRules.departId]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | treeData:[], |
| | | departs: [], |
| | | columns: [ |
| | | { |
| | |
| | | scopedSlots: { customRender: 'manufactureDate' } |
| | | }, |
| | | { |
| | | title: '主单位', |
| | | title: '单位', |
| | | align: 'center', |
| | | dataIndex: 'mainUnitName' |
| | | }, |
| | | { |
| | | title: '主数量', |
| | | title: '数量', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity', |
| | | scopedSlots: { customRender: 'mainQuantity' } |
| | | }, |
| | | { |
| | | /* { |
| | | title: '辅单位', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryUnitName' |
| | |
| | | title: '辅数量', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryQuantity' |
| | | }, |
| | | }, */ |
| | | { |
| | | title: '操作', |
| | | align: 'center', |
| | |
| | | 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', |
| | | getWarehouses: '/base/warehouse/queryById' |
| | | getWarehouses: '/base/warehouse/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | |
| | | dataSource: [] |
| | |
| | | model: data[i].model, |
| | | mainUnitId: data[i].mainUnitId, |
| | | mainUnitName: data[i].mainUnitId_dictText, |
| | | auxiliaryUnitId: data[i].auxiliaryUnitId, |
| | | /* auxiliaryUnitId: data[i].auxiliaryUnitId, |
| | | auxiliaryUnitName: data[i].auxiliaryUnitId_dictText, |
| | | conversionRatio: data[i].conversionRatio, |
| | | conversionRatio: data[i].conversionRatio, */ |
| | | constructorId: data[i].constructorId, |
| | | constructorName: data[i].constructorId_dictText, |
| | | suppliers: this.suppliers, |
| | |
| | | }) |
| | | }, |
| | | |
| | | 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 = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePartPurchaseStorage', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | 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 |