| | |
| | | > |
| | | <a-input |
| | | placeholder="请输申请单编码" |
| | | :disabled="true" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-select |
| | | :placeholder="'请选择领用部门'" |
| | | :options="this.departs" |
| | | <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]" |
| | | /> |
| | | <!-- <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-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-spin> |
| | | <a-button |
| | | type="primary" |
| | | :disabled="disableSubmit" |
| | | :style="{ marginRight: '8px',marginBottom:'8px' }" |
| | | :loading="confirmLoading" |
| | | @click="selectSparePartInventory()" |
| | |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | :value="text" |
| | | |
| | | v-if="col.dataIndex == 'outboundMainQuantity'" |
| | | :min="0" |
| | | :disabled="disableSubmit" |
| | | :max="record.mainQuantity" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record, index" |
| | | |
| | | > |
| | | <a-popconfirm |
| | | |
| | | title="确定删除吗?" |
| | | :disabled="disableSubmit" |
| | | @confirm="() => handleDelete(text,record, index)" |
| | | > |
| | | <a>删除</a> |
| | |
| | | |
| | | <a-button |
| | | @click="handleOk()" |
| | | :disabled="disableSubmit" |
| | | type="primary" |
| | | :loading="confirmLoading" |
| | | >确定</a-button> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | disabled:false, |
| | | treeData:[], |
| | | departs: [], |
| | | columns: [ |
| | | { |
| | |
| | | dataIndex: 'warehouseLocationNum' |
| | | }, |
| | | { |
| | | title: '主单位', |
| | | title: '单位', |
| | | align: 'center', |
| | | dataIndex: 'mainUnitName' |
| | | }, |
| | | { |
| | | title: '主数量', |
| | | title: '数量', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity', |
| | | }, |
| | | { |
| | | /* { |
| | | title: '辅单位', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryUnitName' |
| | |
| | | title: '辅数量', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryQuantity' |
| | | }, |
| | | }, */ |
| | | { |
| | | title: '出库主数量', |
| | | title: '出库数量', |
| | | align: 'center', |
| | | dataIndex: 'outboundMainQuantity', |
| | | scopedSlots: { customRender: 'outboundMainQuantity' } |
| | |
| | | }, |
| | | url: { |
| | | add: "/spare/sparePartOutbound/add", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | edit: "/spare/sparePartOutbound/edit", |
| | | }, |
| | | |
| | |
| | | mainQuantity: data[i].mainQuantity, |
| | | mainUnitId: data[i].mainUnitId, |
| | | mainUnitName: data[i].mainUnitName, |
| | | auxiliaryQuantity: data[i].auxiliaryQuantity, |
| | | auxiliaryUnitId: data[i].auxiliaryUnitId, |
| | | auxiliaryUnitName: data[i].auxiliaryUnitName, |
| | | conversionRatio: data[i].conversionRatio, |
| | | /* auxiliaryQuantity: data[i].auxiliaryQuantity, */ |
| | | /* auxiliaryUnitId: data[i].auxiliaryUnitId, |
| | | auxiliaryUnitName: data[i].auxiliaryUnitName, */ |
| | | /* conversionRatio: data[i].conversionRatio, */ |
| | | constructorId: data[i].constructorId, |
| | | constructorName: data[i].constructorName, |
| | | supplierId: data[i].supplierId, |
| | |
| | | }, |
| | | |
| | | created() { |
| | | this.getSysDeparts(); |
| | | }, |
| | | methods: { |
| | | getSysDeparts() { |
| | |
| | | that.form.resetFields(); |
| | | that.model = Object.assign({}, record); |
| | | that.visible = true; |
| | | that.initOptions() |
| | | that.warehouseId = record.warehouseId |
| | | if (record.sparePartOutboundDetailList != undefined) { |
| | | const temp = [...record.sparePartOutboundDetailList]; |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePartOutbound', 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; |
| | |
| | | if (target) { |
| | | if (column.dataIndex == 'outboundMainQuantity') { |
| | | target[column.dataIndex] = value; |
| | | target["outboundAuxiliaryQuantity"] = value * target.conversionRatio |
| | | /* target["outboundAuxiliaryQuantity"] = value * target.conversionRatio */ |
| | | } |
| | | //显示带过来的数据 |
| | | that.dataSource = temp; |