| | |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | <a-menu slot="overlay" > |
| | | <a-menu-item @click="batchDel" v-has="'sparePartList:delete'"> |
| | | <a-menu-item @click="batchDel"> |
| | | <a-icon type="delete" />删除 |
| | | </a-menu-item> |
| | | </a-menu> |
| | |
| | | 更多 |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu slot="overlay" v-has="'sparePartList:delete'"> |
| | | <!-- <a-menu-item> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | </a-menu-item> --> |
| | | <a-menu-item> |
| | | <a-menu-item > |
| | | <a-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | |
| | | :wrapperCol='wrapperCol' |
| | | > |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | placeholder='请输单据号' |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | |
| | | url: { |
| | | add: '/spare/sparePartCancellingStocks/add', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | edit: '/spare/sparePartCancellingStocks/edit' |
| | | }, |
| | |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | > |
| | | <a-input |
| | | placeholder="请输申请单编码" |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | add: "/spare/sparePartOutbound/add", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | edit: "/spare/sparePartOutbound/edit", |
| | | }, |
| | | |
| | |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | initOptions() { |
| | |
| | | > |
| | | <a-input |
| | | placeholder='请输入库单编号' |
| | | :disabled="disableSubmit" |
| | | :disabled="true" |
| | | v-decorator="['num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | 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: [] |
| | |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | initOptions() { |
| | |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='单据号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请输入单据号'></a-input> |
| | | <a-input v-model='model.num' placeholder='请输入单据号' :disabled="true"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | edit: '/spare/sparePartReceive/edit', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | sparesReceiveDetail: { |
| | | list: '/spare/sparePartReceive/querySparePartReceiveDeatilByMainId' |
| | | } |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions(); |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | |
| | | /* this.model.setFieldsValue({ num: res.message }); */ |
| | | } |
| | | }) |
| | | }, |
| | | getSysDeparts() { |
| | | getAction(this.url.getSysDeparts).then((res) => { |
| | | if (res.success) { |
| | |
| | | { |
| | | title: '备件编码', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | dataIndex: 'spareNum', |
| | | width: 150, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: '备件名称', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | dataIndex: 'spareName', |
| | | width: 150, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: '型号', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | fixed: 'left', |
| | | width: 150 |
| | | |
| | | }, |
| | | { |
| | | title: '规格', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | width: 150, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: '批次号', |
| | | align: 'center', |
| | | dataIndex: 'batchNum', |
| | | width: 150, |
| | | |
| | | |
| | | }, |
| | | { |
| | | title: '制造商', |
| | | align: 'center', |
| | | dataIndex: 'constructorName', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '出厂日期', |
| | | align: 'center', |
| | | dataIndex: 'manufactureDate', |
| | | width: 150, |
| | | |
| | | }, |
| | | { title: '有效期', |
| | | align: 'center', |
| | | dataIndex: 'validityPeriod', |
| | | width: 150, |
| | | |
| | | |
| | | }, |
| | | { title: '单位', |
| | | align: 'center', |
| | | dataIndex: 'mainUnitId_dictText', |
| | | width: 150, |
| | | |
| | | }, |
| | | /* { title: '辅单位', |
| | | align: 'center', |
| | |
| | | { title: '数量', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity', |
| | | width: 150 |
| | | |
| | | |
| | | }, |
| | | /* { title: '辅数量', |
| | |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='单据号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请输入单据号'></a-input> |
| | | <a-input v-model='model.num' placeholder='请输入单据号' :disabled="true"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | queryById: '/spare/sparePartScrap/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | sparesScrapDetail: { |
| | | list: '/spare/sparePartScrap/querySparesScrapDetailByMainId' |
| | | } |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions() |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | |
| | | /* this.model.setFieldsValue({ num: res.message }); */ |
| | | } |
| | | }) |
| | | }, |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | |
| | | <template> |
| | | <!--支持全屏缩放--> |
| | | <a-modal :visible='visible' :title='title' switchFullscreen @ok='handleSubmit' @cancel='close' style='top:50px' |
| | | cancelText='关闭' :width='1800'> |
| | | <a-card :bordered='false'> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form layout='inline' @keyup.enter.native='searchQuery'> |
| | | <a-row :gutter='24'> |
| | | <a-col :md='6' :sm='4'> |
| | | <a-form-item label='备件编码'> |
| | | <a-input placeholder='请输入备件编码' v-model='queryParam.num'/> |
| | | <a-modal :visible="visible" :title="title" switchFullscreen @ok="handleSubmit" @cancel="close" style="top:50px" |
| | | cancelText="关闭" :width="1800"> |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="4"> |
| | | <a-form-item label="备件编码"> |
| | | <a-input placeholder="请输入备件编码" v-model="queryParam.num" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md='6' :sm='4'> |
| | | <a-form-item label='备件名称'> |
| | | <a-input placeholder='请输入备件名称' v-model='queryParam.name'/> |
| | | <a-col :md="6" :sm="4"> |
| | | <a-form-item label="备件名称"> |
| | | <a-input placeholder="请输入备件名称" v-model="queryParam.name" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :md='6' :sm='4'> |
| | |
| | | dictCode='tooling_category_flag' placeholder='请选择存货分类' /> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <a-col :md='3'> |
| | | <span style='float: left;overflow: hidden;' class='table-page-search-submitButtons'> |
| | | <a-button type='primary' @click='searchQuery' icon='search'>查询</a-button> |
| | | <a-button @click='searchReset' icon='reload' style='margin-left: 10px'>重置</a-button> |
| | | <a-col :md="3"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button @click="searchReset" icon="reload" style="margin-left: 10px">重置</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <a-row :gutter='24'> |
| | | <a-col :md='24' :sm='12'> |
| | | <a-table ref='table' |
| | | :scroll='{ x: true }' |
| | | size='middle' rowKey='id' |
| | | <a-row :gutter="24"> |
| | | <a-col :md="24" :sm="12"> |
| | | <a-table ref="table" |
| | | :scroll="{ x: true }" |
| | | size="middle" rowKey="id" |
| | | bordered |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :rowSelection='rowSelection' |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | |
| | | :loading='loading' |
| | | @change='handleTableChange'> |
| | | :loading="loading" |
| | | @change="handleTableChange"> |
| | | </a-table> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | align: 'center', |
| | | fixed: 'left', |
| | | dataIndex: 'spareNum', |
| | | width: 150, |
| | | ellipsis: true |
| | | }, |
| | | { |
| | | title: '备件名称', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | dataIndex: 'spareName', |
| | | width: 150, |
| | | dataIndex: 'spareName' |
| | | |
| | | }, |
| | | { |
| | | title: '规格', |
| | | align: 'center', |
| | | dataIndex: 'specification', |
| | | width: 150, |
| | | dataIndex: 'specification' |
| | | |
| | | }, |
| | | { |
| | | title: '型号', |
| | | align: 'center', |
| | | dataIndex: 'model', |
| | | width: 150 |
| | | dataIndex: 'model' |
| | | |
| | | }, |
| | | { |
| | | title: '批次号', |
| | | align: 'center', |
| | | |
| | | dataIndex: 'batchNum', |
| | | width: 150, |
| | | dataIndex: 'batchNum' |
| | | |
| | | }, |
| | | { |
| | | title: '制造商', |
| | | align: 'center', |
| | | dataIndex: 'constructorName', |
| | | width: 150, |
| | | dataIndex: 'constructorName' |
| | | |
| | | }, |
| | | |
| | | { |
| | | title: '出厂日期', |
| | | align: 'center', |
| | | dataIndex: 'manufactureDate', |
| | | width: 150, |
| | | }, |
| | | { title: '有效期', |
| | | align: 'center', |
| | | dataIndex: 'validityPeriod', |
| | | width: 150, |
| | | dataIndex: 'manufactureDate' |
| | | |
| | | }, |
| | | { title: '单位', |
| | | { |
| | | title: '有效期', |
| | | align: 'center', |
| | | dataIndex: 'mainUnitId_dictText', |
| | | width: 150, |
| | | dataIndex: 'validityPeriod' |
| | | |
| | | }, |
| | | /* { title: '辅单位', |
| | | { |
| | | title: '单位', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryUnitId_dictText', |
| | | width: 150 |
| | | |
| | | }, */ |
| | | { title: '库存数量', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity', |
| | | width: 150 |
| | | dataIndex: 'mainUnitId_dictText' |
| | | |
| | | }, |
| | | /* { title: '库存辅数量', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryQuantity', |
| | | width: 150 |
| | | /* { title: '辅单位', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryUnitId_dictText', |
| | | width: 150 |
| | | |
| | | }, */ |
| | | /* { |
| | | title: '换算比例', |
| | | }, */ |
| | | { |
| | | title: '库存数量', |
| | | align: 'center', |
| | | dataIndex: 'conversionRatio' |
| | | } */ |
| | | dataIndex: 'mainQuantity' |
| | | |
| | | } |
| | | /* { title: '库存辅数量', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryQuantity', |
| | | width: 150 |
| | | |
| | | }, */ |
| | | /* { |
| | | title: '换算比例', |
| | | align: 'center', |
| | | dataIndex: 'conversionRatio' |
| | | } */ |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSelectRows: [], |
| | |
| | | loading: false, |
| | | url: { |
| | | list: '/spare/sparePartScrap/getSpareList' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | }, |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <a-spin :spinning='confirmLoading'> |
| | | <j-form-container :disabled='formDisabled'> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <j-form-container :disabled="formDisabled"> |
| | | <!-- 主表单区域 --> |
| | | <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='单据号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder='请输入单据号'></a-input> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="单据号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> |
| | | <a-input v-model="model.num" placeholder="请输入单据号" :disabled="true"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='申请部门' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='departId'> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="申请部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId"> |
| | | <!-- <a-input v-model="model.departId" placeholder="请输入领用部门ID" ></a-input>--> |
| | | <!-- <j-dict-select-tag |
| | | allow-clear |
| | | :placeholder="'请选择申请部门'" |
| | | v-model='model.departId' |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | />--> |
| | | <!-- <j-dict-select-tag |
| | | allow-clear |
| | | :placeholder="'请选择申请部门'" |
| | | v-model='model.departId' |
| | | dictCode="sys_depart,depart_name,id,del_flag!='1'" |
| | | />--> |
| | | <a-tree-select |
| | | style="width: 100%" |
| | | :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" |
| | | :tree-data="treeData" |
| | | placeholder="请选择申请部门" |
| | | tree-default-expand-all |
| | | v-model='model.departId' |
| | | v-model="model.departId" |
| | | /> |
| | | <!-- <a-select |
| | | :placeholder="'请选择申请部门'" |
| | | :options="this.departs" |
| | | style="width: 100%" |
| | | v-model='model.departId' |
| | | />--> |
| | | <!-- <a-select |
| | | :placeholder="'请选择申请部门'" |
| | | :options="this.departs" |
| | | style="width: 100%" |
| | | v-model='model.departId' |
| | | />--> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='备注' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <!-- <a-input v-model="model.userId" placeholder="请输入领用人员ID" ></a-input>--> |
| | | <a-textarea |
| | | allow-clear |
| | | :placeholder="'请输入备注'" |
| | | v-model='model.remark' |
| | | v-model="model.remark" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-form-model> |
| | | </j-form-container> |
| | | <!-- 子表单区域 --> |
| | | <a-tabs v-model='activeKey' @change='handleChangeTabs'> |
| | | <a-tab-pane tab='备件报废明细表' :key='refKeys[0]' :forceRender='true'> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="备件报废明细表" :key="refKeys[0]" :forceRender="true"> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref='refKeys[0]' |
| | | :loading='sparesScrapRequirementDetailTable.loading' |
| | | :columns='sparesScrapRequirementDetailTable.columns' |
| | | :dataSource='sparesScrapRequirementDetailTable.dataSource' |
| | | :maxHeight='300' |
| | | :disabled='formDisabled' |
| | | :alwaysEdit='true' |
| | | :rowNumber='true' |
| | | :bordered='bordered' |
| | | :rowSelection='true' |
| | | :toolbar='true' |
| | | :toolbarConfig='toolbarConfig' |
| | | :ref="refKeys[0]" |
| | | :loading="sparesScrapRequirementDetailTable.loading" |
| | | :columns="sparesScrapRequirementDetailTable.columns" |
| | | :dataSource="sparesScrapRequirementDetailTable.dataSource" |
| | | :maxHeight="300" |
| | | :disabled="formDisabled" |
| | | :alwaysEdit="true" |
| | | :rowNumber="true" |
| | | :bordered="bordered" |
| | | :rowSelection="true" |
| | | :toolbar="true" |
| | | :toolbarConfig="toolbarConfig" |
| | | > |
| | | |
| | | <template slot='toolbarPrefix'> |
| | | <a-button type='primary' @click='selectEquipmentList' :disabled='formDisabled'>选择备件 |
| | | <template slot="toolbarPrefix"> |
| | | <a-button type="primary" @click="selectEquipmentList" :disabled="formDisabled">选择备件 |
| | | </a-button> |
| | | </template> |
| | | <!-- <template slot='toolbarPrefix'> |
| | |
| | | </j-vxe-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <spare-select-list ref='SparesSelectModal'></spare-select-list> |
| | | <!-- <spare-requirement-select-modal ref='SpareRequirementSelecModal'></spare-requirement-select-modal>--> |
| | | <spare-select-list ref="SparesSelectModal"></spare-select-list> |
| | | </a-spin> |
| | | </template> |
| | | |
| | |
| | | import JFormContainer from '@comp/jeecg/JFormContainer' |
| | | import SpareSelectList from './SpareSelectList' |
| | | import { getAction } from '@api/manage' |
| | | /*import SpareRequirementSelectModal from './SpareRequirementSelectModal'*/ |
| | | export default { |
| | | name: 'SparePartScrapRequirementForm', |
| | | mixins: [JVxeTableModelMixin], |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | treeData:[], |
| | | bordered:true, |
| | | treeData: [], |
| | | bordered: true, |
| | | departs: [], |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | title: '备件编码', |
| | | key: 'spareNum', |
| | | fixed: 'left', |
| | | align:'center', |
| | | align: 'center', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | |
| | | { |
| | | title: '备件名称', |
| | | key: 'spareName', |
| | | align:'center', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | |
| | | title: '型号', |
| | | key: 'model', |
| | | type: JVXETypes.normal, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | |
| | | title: '规格', |
| | | key: 'specification', |
| | | type: JVXETypes.normal, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | |
| | | title: '单位', |
| | | key: 'mainUnitIdName', |
| | | type: JVXETypes.normal, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | |
| | | title: '单位', |
| | | key: 'mainUnitId', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | /* { |
| | | title: '辅单位', |
| | | key: 'auxiliaryUnitIdName', |
| | | align:'center', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '辅单位', |
| | | key: 'auxiliaryUnitId', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, */ |
| | | /* { |
| | | title: '辅单位', |
| | | key: 'auxiliaryUnitIdName', |
| | | align:'center', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '辅单位', |
| | | key: 'auxiliaryUnitId', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, */ |
| | | { |
| | | title: '主数量', |
| | | key: 'mainQuantity', |
| | | type: JVXETypes.inputNumber, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0, |
| | | /* Function({cellValue, row, column}){ |
| | | console.log(cellValue) |
| | | console.log(row) |
| | | console.log(column) |
| | | if (cellValue != null) { |
| | | let conversionRatio = row.conversionRatio |
| | | console.log(conversionRatio) |
| | | row.auxiliaryQuantity = Math.abs(cellValue * conversionRatio) |
| | | /* Function({cellValue, row, column}){ |
| | | console.log(cellValue) |
| | | console.log(row) |
| | | console.log(column) |
| | | if (cellValue != null) { |
| | | let conversionRatio = row.conversionRatio |
| | | console.log(conversionRatio) |
| | | row.auxiliaryQuantity = Math.abs(cellValue * conversionRatio) |
| | | |
| | | } |
| | | console.log(cellValue) |
| | | return cellValue |
| | | }, */ |
| | | } |
| | | console.log(cellValue) |
| | | return cellValue |
| | | }, */ |
| | | validateRules: [ |
| | | { |
| | | required: true, |
| | |
| | | ] |
| | | }, |
| | | |
| | | /* { |
| | | title: '辅数量', |
| | | key: 'auxiliaryQuantity', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | | align:'center', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0 |
| | | }, */ |
| | | /* { |
| | | title: '辅数量', |
| | | key: 'auxiliaryQuantity', |
| | | type: JVXETypes.normal, |
| | | width: '200px', |
| | | align:'center', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: 0 |
| | | }, */ |
| | | { |
| | | title: '备件id', |
| | | key: 'sparePartId', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | |
| | | title: '换算比例', |
| | | key: 'conversionRatio', |
| | | type: JVXETypes.hidden, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | |
| | | title: '需求日期', |
| | | key: 'requirementTime', |
| | | type: JVXETypes.date, |
| | | align:'center', |
| | | align: 'center', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '', |
| | |
| | | edit: '/spare/sparePartRequirement/edit', |
| | | queryById: '/spare/sparePartRequirement/queryById', |
| | | loadOptions: '/sys/sysDepart/loadDepartTreeOptions', |
| | | getSysDeparts: "/eam/equipment/getSysDeparts", |
| | | getSysDeparts: '/eam/equipment/getSysDeparts', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | sparesScrapRequirementDetail: { |
| | | list: '/spare/sparePartRequirement/querySparesScrapRequirementDetailByMainId' |
| | | } |
| | |
| | | }, |
| | | created() { |
| | | this.initOptions() |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | | /* edit(record) { |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | this.auxiliaryUnits = record.auxiliaryUnits |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, |
| | | 'num', |
| | | 'name', |
| | | 'specification', |
| | | 'model', |
| | | 'constructorId', |
| | | 'mainUnitId', |
| | | 'auxiliaryUnitId', |
| | | 'conversionRatio', |
| | | 'validityPeriod', |
| | | 'validityPeriodUnitId', |
| | | 'inventoryUpperLimit', |
| | | 'inventoryLowerLimit', |
| | | 'economicOrderQuantity', |
| | | 'purchaseLeadTime', |
| | | 'inventoryWarnLimit', |
| | | 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | } else { |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, */ |
| | | |
| | | initNum() { |
| | | getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | |
| | | /* this.model.setFieldsValue({ num: res.message }); */ |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | initOptions() { |
| | | getAction(this.url.loadOptions).then(res => { |
| | | if (res.success) { |
| | |
| | | //校验所有一对一子表表单 |
| | | validateSubForm(allValues) { |
| | | let tableData = this.$refs.sparesScrapRequirementDetail.getTableData() |
| | | if(tableData.length == 0){ |
| | | this.$message.warning("请添加加报废明细!"); |
| | | if (tableData.length == 0) { |
| | | this.$message.warning('请添加加报废明细!') |
| | | return |
| | | } |
| | | return new Promise((resolve, reject) => { |
| | |
| | | this.visible = false |
| | | this.$emit('close') |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | /* changeAuxiliaryQuantity(target){ |
| | | console.log(target.columnIndex) |
| | | let num=target.columnIndex |
| | | if (target.columnIndex ===num){ |
| | | target.row.auxiliaryQuantity=Math.abs(target.row.conversionRatio*target.row.mainQuantity) |
| | | } |
| | | } */ |
| | | } |
| | | /* changeAuxiliaryQuantity(target){ |
| | | console.log(target.columnIndex) |
| | | let num=target.columnIndex |
| | | if (target.columnIndex ===num){ |
| | | target.row.auxiliaryQuantity=Math.abs(target.row.conversionRatio*target.row.mainQuantity) |
| | | } |
| | | } */ |
| | | } |
| | | } |
| | | </script> |