Merge remote-tracking branch 'origin/master'
| | |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å¤ä»¶ç¼ç "> |
| | | <j-input placeholder="请è¾å
¥å¤ä»¶ç¼ç " v-model="queryParam.partCode"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å¤ä»¶åç§°"> |
| | | <j-input placeholder="请è¾å
¥å¤ä»¶åç§°" v-model="queryParam.partName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å¤ä»¶åç±»"> |
| | | <j-input placeholder="请è¾å
¥å¤ä»¶åç±»" v-model="queryParam.partCategory"></j-input> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="false" |
| | | placeholder="è¯·éæ©å¤ä»¶åç±»" |
| | | :triggerChange="true" |
| | | dictCode="spare_part_category" |
| | | v-model="queryParam.partCategory" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å¤ä»¶ç¼ç "> |
| | | <j-input |
| | | placeholder="请è¾å
¥å¤ä»¶ç¼ç " |
| | | v-model="queryParam.partCode" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å¤ä»¶åç§°"> |
| | | <j-input |
| | | placeholder="请è¾å
¥å¤ä»¶åç§°" |
| | | v-model="queryParam.partName" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <a-form-item label="å¤ä»¶åå·"> |
| | | <j-input placeholder="请è¾å
¥å¤ä»¶åå·" v-model="queryParam.partModel"></j-input> |
| | | <j-input |
| | | placeholder="请è¾å
¥å¤ä»¶åå·" |
| | | v-model="queryParam.partModel" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a-col |
| | | :xl="4" |
| | | :lg="7" |
| | | :md="8" |
| | | :sm="24" |
| | | > |
| | | <span |
| | | style="float: left;overflow: hidden;" |
| | | class="table-page-search-submitButtons" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | type="primary" |
| | | @click="searchReset" |
| | | icon="reload" |
| | | style="margin-left: 8px" |
| | | >éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | |
| | |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('å¤åå¤ä»¶ç®¡ç')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >æ°å¢</a-button> |
| | | <!-- <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('å¤åå¤ä»¶ç®¡ç')" |
| | | >导åº</a-button> |
| | | <a-upload |
| | | name="file" |
| | | :showUploadList="false" |
| | | :multiple="false" |
| | | :headers="tokenHeader" |
| | | :action="importExcelUrl" |
| | | @change="handleImportExcel" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | icon="import" |
| | | >导å
¥</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | <a-menu-item |
| | | key="1" |
| | | @click="batchDel" |
| | | ><a-icon type="delete" />å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </a-dropdown> --> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <div |
| | | class="ant-alert ant-alert-info" |
| | | style="margin-bottom: 16px;" |
| | | > |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | <a |
| | | style="margin-left: 24px" |
| | | @click="onClearSelected" |
| | | >æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' |
| | | :customRow='clickThenSelect' |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | |
| | | </span> |
| | | |
| | | </a-table> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane |
| | | tab='åºåæç»' |
| | | key="1" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <eamSpare-part-inventory-list :sparePartId='sparePartId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamSpareParts-modal ref="modalForm" @ok="modalFormOk"></eamSpareParts-modal> |
| | | <eamSpareParts-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></eamSpareParts-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/less/TableExpand.less' |
| | | import EamSparePartsModal from './modules/EamSparePartsModal.vue' |
| | | import EamSparePartsModal from './modules/EamSpareParts/EamSparePartsModal.vue' |
| | | import EamSparePartInventoryList from './modules/EamSpareParts/EamSparePartInventoryList.vue' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: "EamSparePartsList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | EamSparePartsModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å¤åå¤ä»¶ç®¡ç管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'å¤ä»¶ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'partCode' |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | align:"center", |
| | | dataIndex: 'partName' |
| | | }, |
| | | { |
| | | title: 'åç±»', |
| | | align:"center", |
| | | dataIndex: 'partCategory' |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align:"center", |
| | | dataIndex: 'partModel' |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | align:"center", |
| | | dataIndex: 'partSpecification' |
| | | }, |
| | | { |
| | | title: 'åæ¾ä»åº', |
| | | align:"center", |
| | | dataIndex: 'storehouse' |
| | | }, |
| | | { |
| | | title: 'å¶é å', |
| | | align:"center", |
| | | dataIndex: 'manufacturingEnterprise' |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | align:"center", |
| | | dataIndex: 'unit' |
| | | }, |
| | | { |
| | | title: 'æææï¼å¤©ï¼', |
| | | align:"center", |
| | | dataIndex: 'periodOfValidity' |
| | | }, |
| | | { |
| | | title: 'åºåä¸éå¼', |
| | | align:"center", |
| | | dataIndex: 'inventoryMax' |
| | | }, |
| | | { |
| | | title: 'åºåä¸éå¼', |
| | | align:"center", |
| | | dataIndex: 'inventoryMin' |
| | | }, |
| | | { |
| | | title: 'åºåé¢è¦å¼', |
| | | align:"center", |
| | | dataIndex: 'inventoryWarning' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSpareParts/list", |
| | | delete: "/eam/eamSpareParts/delete", |
| | | deleteBatch: "/eam/eamSpareParts/deleteBatch", |
| | | exportXlsUrl: "eam/eamSpareParts/exportXls", |
| | | importExcelUrl: "eam/eamSpareParts/importExcel", |
| | | }, |
| | | export default { |
| | | name: "EamSparePartsList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSparePartsModal, |
| | | EamSparePartInventoryList |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å¤åå¤ä»¶ç®¡ç页é¢', |
| | | sparePartId: '-1', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: 'å¤ä»¶ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'partCode' |
| | | }, |
| | | { |
| | | title: 'åç±»', |
| | | align: "center", |
| | | dataIndex: 'partCategory_dictText' |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | align: "center", |
| | | dataIndex: 'partName' |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: "center", |
| | | dataIndex: 'partModel' |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'partSpecification' |
| | | }, |
| | | { |
| | | title: 'åæ¾ä»åº', |
| | | align: "center", |
| | | dataIndex: 'storehouse' |
| | | }, |
| | | { |
| | | title: 'å¶é å', |
| | | align: "center", |
| | | dataIndex: 'manufacturingEnterprise' |
| | | }, |
| | | { |
| | | title: 'åä½', |
| | | align: "center", |
| | | dataIndex: 'unit' |
| | | }, |
| | | { |
| | | title: 'æææï¼å¤©ï¼', |
| | | align: "center", |
| | | dataIndex: 'periodOfValidity' |
| | | }, |
| | | { |
| | | title: 'åºåä¸éå¼', |
| | | align: "center", |
| | | dataIndex: 'inventoryMax' |
| | | }, |
| | | { |
| | | title: 'åºåä¸éå¼', |
| | | align: "center", |
| | | dataIndex: 'inventoryMin' |
| | | }, |
| | | { |
| | | title: 'åºåé¢è¦å¼', |
| | | align: "center", |
| | | dataIndex: 'inventoryWarning' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSpareParts/list", |
| | | delete: "/eam/eamSpareParts/delete", |
| | | deleteBatch: "/eam/eamSpareParts/deleteBatch", |
| | | exportXlsUrl: "eam/eamSpareParts/exportXls", |
| | | importExcelUrl: "eam/eamSpareParts/importExcel", |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | importExcelUrl: function () { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.onClearSelected() |
| | | this.loadData(1); |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.sparePartId = '-1' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.sparePartId = selectionRows[0]['id'] |
| | | } else { |
| | | this.sparePartId = '-1' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import Vue from 'vue' |
| | | import { getFileAccessHttpUrl } from '@/api/manage'; |
| | | |
| | | export default { |
| | | name: "EamSparePartInventoryList", |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | props: { |
| | | sparePartId: { |
| | | type: String, |
| | | default: '-1', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | sparePartId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.sparePartId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['sparePartId'] = val; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | // { |
| | | // title: 'å¤åå¤ä»¶ID', |
| | | // align: "center", |
| | | // dataIndex: 'sparePartId' |
| | | // }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | align: "center", |
| | | dataIndex: 'batchNum' |
| | | }, |
| | | { |
| | | title: 'åºåæ°é', |
| | | align: "center", |
| | | dataIndex: 'inventory' |
| | | }, |
| | | { |
| | | title: 'åºåæ¥æ(çäº§æ¥æ)', |
| | | align: "center", |
| | | dataIndex: 'manufactureDate' |
| | | }, |
| | | { |
| | | title: 'ä¾åºå', |
| | | align: "center", |
| | | dataIndex: 'supplier' |
| | | }, |
| | | { |
| | | title: 'æªæ¢æææ', |
| | | align: "center", |
| | | dataIndex: 'expirationOfValidity' |
| | | }, |
| | | { |
| | | title: 'åæ¾ä½ç½®', |
| | | align: "center", |
| | | dataIndex: 'location' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: "center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamSparePartInventory/list", |
| | | delete: "/eam/eamSparePartInventory/delete", |
| | | deleteBatch: "/eam/eamSparePartInventory/deleteBatch", |
| | | exportXlsUrl: "eam/eamSparePartInventory/exportXls", |
| | | importExcelUrl: "eam/eamSparePartInventory/importExcel", |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | pageSizeOptions: ['5', '10', '20', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | // this.originTargetKeys = []; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | // for (let i = 0; i < res.result.records.length; i++) { |
| | | // let r = res.result.records[i].upload; |
| | | // r.src = this.getSrc(res.result.records[i].upload); |
| | | // } |
| | | this.dataSource = res.result.records || res.result; |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total; |
| | | } else { |
| | | this.ipagination.total = 0; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | > |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model |
| | | ref="form" |
| | | :model="model" |
| | | :rules="validatorRules" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="partCode" |
| | | label="å¤ä»¶ç¼ç " |
| | | > |
| | | <a-input |
| | | placeholder="å¤ä»¶ç¼ç èªå¨çæ" |
| | | v-model="model.partCode" |
| | | :disabled="true" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="partCategory" |
| | | label="å¤ä»¶åç±»" |
| | | > |
| | | <!-- <a-input |
| | | placeholder="请è¾å
¥å¤ä»¶åç±»" |
| | | v-model="model.partCategory" |
| | | /> --> |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="false" |
| | | placeholder="è¯·éæ©å¤ä»¶åç±»" |
| | | :triggerChange="true" |
| | | dictCode="spare_part_category" |
| | | v-model="model.partCategory" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="partName" |
| | | label="å¤ä»¶åç§°" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥å¤ä»¶åç§°" |
| | | v-model="model.partName" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="partModel" |
| | | label="å¤ä»¶åå·" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥å¤ä»¶åå·" |
| | | v-model="model.partModel" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="partSpecification" |
| | | label="å¤ä»¶è§æ ¼" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥å¤ä»¶è§æ ¼" |
| | | v-model="model.partSpecification" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="storehouse" |
| | | label="åæ¾ä»åº" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥åæ¾ä»åº" |
| | | v-model="model.storehouse" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="unit" |
| | | label="计éåä½" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¡éåä½" |
| | | v-model="model.unit" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="manufacturingEnterprise" |
| | | label="å¶é ä¼ä¸" |
| | | > |
| | | <a-input |
| | | placeholder="请è¾å
¥å¶é ä¼ä¸" |
| | | v-model="model.manufacturingEnterprise" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="periodOfValidity" |
| | | label="æææ(天)" |
| | | > |
| | | <a-input-number |
| | | style="width: 100%" |
| | | :min="0" |
| | | :precision="0" |
| | | v-model="model.periodOfValidity" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="inventoryWarning" |
| | | label="åºåé¢è¦å¼" |
| | | > |
| | | <a-input-number |
| | | style="width: 100%" |
| | | :min="0" |
| | | v-model="model.inventoryWarning" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="inventoryMax" |
| | | label="æå¤§å¤è´§åºå" |
| | | > |
| | | <a-input-number |
| | | style="width: 100%" |
| | | :min="0" |
| | | v-model="model.inventoryMax" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | prop="inventoryMin" |
| | | label="æå°å¤è´§åºå" |
| | | > |
| | | <a-input-number |
| | | style="width: 100%" |
| | | :min="0" |
| | | v-model="model.inventoryMin" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item |
| | | :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" |
| | | :wrapperCol="{xs: { span: 24 },sm: { span: 21 }}" |
| | | prop="remark" |
| | | label="夿³¨" |
| | | > |
| | | <a-textarea |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="model.remark" |
| | | /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction, httpAction } from '@api/manage' |
| | | import moment from "moment" |
| | | |
| | | export default { |
| | | name: "EamSparePartsModal", |
| | | data() { |
| | | return { |
| | | title: "æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 6 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 18 } |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | partName: [ |
| | | { required: true, message: '请è¾å
¥å¤ä»¶åç§°' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: "/eam/eamSpareParts/add", |
| | | edit: "/eam/eamSpareParts/edit", |
| | | generateRequisitionCode: "sys/sysBusinessCodeRule/generateBusinessCodeSeq" |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | const that = this |
| | | let params = { |
| | | businessCode: "SparePartCodeRule" |
| | | } |
| | | getAction(that.url.generateRequisitionCode, params).then((res) => { |
| | | if (res.success) { |
| | | this.model = { |
| | | partCode: res.result |
| | | } |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }) |
| | | //åå§åé»è®¤å¼ |
| | | that.edit(this.model); |
| | | }, |
| | | edit(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk() { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if (!this.model.id) { |
| | | httpurl += this.url.add; |
| | | method = 'post'; |
| | | } else { |
| | | httpurl += this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | httpAction(httpurl, this.model, method).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false" :class="'cust-erp-sub-tab'"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <!-- <div class="table-page-search-wrapper">--> |
| | | <!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
| | | <!-- <a-row :gutter="24">--> |
| | | <!-- </a-row>--> |
| | | <!-- </a-form>--> |
| | | <!-- </div>--> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator" v-if="mainId"> |
| | | <!-- <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button>--> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('åºåºç³è¯·åæç»')">导åº</a-button>--> |
| | | <!-- <a-upload--> |
| | | <!-- name="file"--> |
| | | <!-- :showUploadList="false"--> |
| | | <!-- :multiple="false"--> |
| | | <!-- :headers="tokenHeader"--> |
| | | <!-- :action="importExcelUrl"--> |
| | | <!-- @change="handleImportExcel">--> |
| | | <!-- <a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!-- </a-upload>--> |
| | | <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
| | | <!-- <a-menu slot="overlay">--> |
| | | <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item>--> |
| | | <!-- </a-menu>--> |
| | | <!-- <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button>--> |
| | | <!-- </a-dropdown>--> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
| | | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> |
| | | <!-- <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a>--> |
| | | <!-- </div>--> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- <template slot="htmlSlot" slot-scope="text">--> |
| | | <!-- <div v-html="text"></div>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="imgSlot" slot-scope="text,record">--> |
| | | <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span>--> |
| | | <!-- <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="fileSlot" slot-scope="text">--> |
| | | <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span>--> |
| | | <!-- <a-button--> |
| | | <!-- v-else--> |
| | | <!-- :ghost="true"--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="download"--> |
| | | <!-- size="small"--> |
| | | <!-- @click="downloadFile(text)">--> |
| | | <!-- ä¸è½½--> |
| | | <!-- </a-button>--> |
| | | <!-- </template>--> |
| | | |
| | | <!-- <span slot="action" slot-scope="text, record">--> |
| | | <!-- <a @click="handleEdit(record)">ç¼è¾</a>--> |
| | | <!-- <a-divider type="vertical" />--> |
| | | <!-- <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)">--> |
| | | <!-- <a>å é¤</a>--> |
| | | <!-- </a-popconfirm>--> |
| | | <!-- </span>--> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <outboundDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></outboundDetail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OutboundDetailModal from './modules/outBound/OutboundDetailModal' |
| | | |
| | | export default { |
| | | name: "OutboundDetailList", |
| | | mixins:[JeecgListMixin], |
| | | components: { OutboundDetailModal }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | default:'', |
| | | required:false |
| | | } |
| | | }, |
| | | watch:{ |
| | | mainId:{ |
| | | immediate: true, |
| | | handler(val) { |
| | | if(!this.mainId){ |
| | | this.clearList() |
| | | }else{ |
| | | this.queryParam['outStorehouseId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'tms_outbound_order管ç页é¢', |
| | | disableMixinCreated:true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'åå
·ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolNum' |
| | | }, |
| | | { |
| | | title:'å·¥å
፱Ȍ', |
| | | align:"center", |
| | | dataIndex: 'applicationType_dictText' |
| | | }, |
| | | { |
| | | title:'䏿åç§°', |
| | | align:"center", |
| | | dataIndex: 'chineseName' |
| | | }, |
| | | { |
| | | title:'åå·/å¾å·', |
| | | align:"center", |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title:'åå
·ææ', |
| | | align:"center", |
| | | dataIndex: 'toolMaterial' |
| | | }, |
| | | { |
| | | title:'é¶ä»¶ææ', |
| | | align:"center", |
| | | dataIndex: 'partMaterial' |
| | | }, |
| | | { |
| | | title:'åå®¶', |
| | | align:"center", |
| | | dataIndex: 'supplierId' |
| | | }, |
| | | { |
| | | title:'ä»åº', |
| | | align:"center", |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | | title:'åºåºåºä½', |
| | | align:"center", |
| | | dataIndex: 'outboundLocation' |
| | | }, |
| | | { |
| | | title:'ç³è¯·åºåºæ°é', |
| | | align:"center", |
| | | dataIndex: 'outboundQuantity' |
| | | }, |
| | | { |
| | | title:'å®é
åºåºæ°é', |
| | | align:"center", |
| | | dataIndex: 'outActualCount' |
| | | }, |
| | | { |
| | | title:'åºåºç¶æ', |
| | | align:"center", |
| | | dataIndex: 'status_dictText' |
| | | }, |
| | | { |
| | | title:'å建æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/tms/outboundOrder/listOutboundDetailByMainId", |
| | | delete: "/tms/outboundOrder/deleteOutboundDetail", |
| | | deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", |
| | | exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", |
| | | importUrl: "/tms/outboundOrder/importOutboundDetail", |
| | | }, |
| | | dictOptions:{ |
| | | outStorehouseType:[], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList(){ |
| | | this.dataSource=[] |
| | | this.selectedRowKeys=[] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åºåºåç¼å·"> |
| | | <a-input placeholder="请è¾å
¥åºåºåç¼å·" v-model="queryParam.outNum"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åºåºç±»å"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©åºåºç±»å" v-model="queryParam.outStorehouseType" dictCode="out_storehouse_type"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å®¡æ ¸ç¶æ"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©å®¡æ ¸ç¶æ" v-model="queryParam.orderStatus" dictCode="out_bill_status"/> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <!-- <a-button type="primary" icon="download" @click="handleExportXls('tms_outbound_order')">导åº</a-button>--> |
| | | <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
| | | <!-- <a-button type="primary" icon="import">导å
¥</a-button>--> |
| | | <!-- </a-upload>--> |
| | | <!-- é«çº§æ¥è¯¢åºå --> |
| | | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
| | | <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> |
| | | <!-- <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a>--> |
| | | <!-- </div>--> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}" |
| | | :customRow="clickThenSelect" |
| | | @change="handleTableChange"> |
| | | |
| | | <!-- <template slot="htmlSlot" slot-scope="text">--> |
| | | <!-- <div v-html="text"></div>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="imgSlot" slot-scope="text,record">--> |
| | | <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">æ å¾ç</span>--> |
| | | <!-- <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="fileSlot" slot-scope="text">--> |
| | | <!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">æ æä»¶</span>--> |
| | | <!-- <a-button--> |
| | | <!-- v-else--> |
| | | <!-- :ghost="true"--> |
| | | <!-- type="primary"--> |
| | | <!-- icon="download"--> |
| | | <!-- size="small"--> |
| | | <!-- @click="downloadFile(text)">--> |
| | | <!-- ä¸è½½--> |
| | | <!-- </a-button>--> |
| | | <!-- </template>--> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | <span v-if="record.orderStatus === '1'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record)"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤<a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="åºåºç³è¯·åæç»" key="1" > |
| | | <OutboundDetailList ref="outboundDetailList" :mainId="outboundDetailMainId" /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <outboundOrder-modal ref="modalForm" @ok="modalFormOk"></outboundOrder-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import OutboundOrderModal from './modules/outBound/OutboundOrderModal' |
| | | import { getAction, deleteAction } from '@/api/manage' |
| | | import OutboundDetailList from './OutboundDetailList' |
| | | import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
| | | import '@/assets/less/TableExpand.less' |
| | | |
| | | export default { |
| | | name: "OutboundOrderList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | OutboundDetailList, |
| | | OutboundOrderModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'tms_outbound_order管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title:'åºåºç±»å', |
| | | align:"center", |
| | | dataIndex: 'outStorehouseType_dictText', |
| | | }, |
| | | { |
| | | title:'åºåºåç¼å·', |
| | | align:"center", |
| | | dataIndex: 'outNum' |
| | | }, |
| | | { |
| | | title:'åæ®ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'orderStatus_dictText' |
| | | }, |
| | | { |
| | | title:'ç»æäºº', |
| | | align:"center", |
| | | dataIndex: 'handler_dictText' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸äºº', |
| | | align:"center", |
| | | dataIndex: 'reviewer_dictText' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'auditDate' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸æè§', |
| | | align:"center", |
| | | dataIndex: 'approvalOpinion' |
| | | }, |
| | | { |
| | | title:'ç³è¯·åºåºæ¶é´', |
| | | align:"center", |
| | | dataIndex: 'outboundTime' |
| | | }, |
| | | { |
| | | title:'åºåºç¶æ', |
| | | align:"center", |
| | | dataIndex: 'outStatus_dictText' |
| | | }, |
| | | { |
| | | title:'é¢ç¨äºç±', |
| | | align:"center", |
| | | dataIndex: 'subjectMatter' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title:'æä½å', |
| | | align:"center", |
| | | dataIndex: 'createBy' |
| | | }, |
| | | { |
| | | title:'å建æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/outboundOrder/list", |
| | | delete: "/tms/outboundOrder/delete", |
| | | submit: "/tms/outboundOrder/submit", |
| | | deleteBatch: "/tms/outboundOrder/deleteBatch", |
| | | exportXlsUrl: "/tms/outboundOrder/exportXls", |
| | | importExcelUrl: "tms/outboundOrder/importExcel", |
| | | }, |
| | | dictOptions:{ |
| | | outStorehouseType:[], |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedMainId:'', |
| | | superFieldList:[], |
| | | outboundDetailMainId: '', |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | modalFormOk() { |
| | | this.$refs.outboundDetailList.clearList() |
| | | this.loadData(); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.onClearSelected() |
| | | this.$refs.outboundDetailList.clearList() |
| | | this.loadData(1); |
| | | }, |
| | | initDictConfig(){ |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.selectedMainId = '' |
| | | this.outboundDetailMainId = '' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedMainId=selectedRowKeys[0] |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.outboundDetailMainId = selectionRows[0]['id'] |
| | | }, |
| | | handleSubmit(record) { |
| | | getAction(this.url.submit,{ id: record.id }).then((res)=>{ |
| | | if (res.success) { |
| | | this.$message.success(res.message); |
| | | this.loadData(); |
| | | this.$refs.outboundDetailList.clearList() |
| | | } else { |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | handleDelete: function (id) { |
| | | if(!this.url.delete){ |
| | | this.$message.error("请设置url.delete屿§!") |
| | | return |
| | | } |
| | | var that = this; |
| | | deleteAction(that.url.delete, {id: id}).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | this.$refs.outboundDetailList.clearList() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'outNum',text:'åºåºåç¼å·',dictCode:''}) |
| | | fieldList.push({type:'string',value:'outStorehouseType',text:'åºåºç±»å',dictCode:'out_storehouse_type'}) |
| | | fieldList.push({type:'string',value:'handler',text:'ç»æäºº',dictCode:''}) |
| | | fieldList.push({type:'sel_user',value:'reviewer',text:'å®¡æ ¸äºº'}) |
| | | fieldList.push({type:'string',value:'orderStatus',text:'ååç¶æ',dictCode:''}) |
| | | fieldList.push({type:'date',value:'auditDate',text:'å®¡æ ¸æ¶é´'}) |
| | | fieldList.push({type:'string',value:'approvalOpinion',text:'å®¡æ ¸æè§',dictCode:''}) |
| | | fieldList.push({type:'string',value:'subjectMatter',text:'é¢ç¨äºç±',dictCode:''}) |
| | | fieldList.push({type:'date',value:'outboundTime',text:'åºåºæ¶é´'}) |
| | | fieldList.push({type:'string',value:'remark',text:'夿³¨',dictCode:''}) |
| | | fieldList.push({type:'string',value:'createBy',text:'æä½å',dictCode:''}) |
| | | fieldList.push({type:'date',value:'createTime',text:'å建æ¶é´'}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less' |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æ¯æå
¨å±ç¼©æ¾--> |
| | | <j-modal |
| | | :visible="visible" |
| | | :width="1200" |
| | | :title="title" |
| | | switchFullscreen |
| | | @ok="handleSubmit" |
| | | @cancel="close" |
| | | style="top: 50px" |
| | | cancelText="å
³é" |
| | | > |
| | | <a-card :bordered="false"> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å·¥å
·ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥å·¥å
·ç¼ç ,æ¯ææ¨¡ç³æ¥è¯¢" v-model="queryParam.toolCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!--åºåºåå表--> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :rowSelection="rowSelection" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { filterObj } from '@/utils/util' |
| | | import { getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'JSelectOutboundToolModal', |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | title: 'éæ©åºåºå·¥å
·', |
| | | queryParam: {}, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolNum' |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'toolId' |
| | | }, |
| | | { |
| | | title:'å¯ç¨åºåæ°é', |
| | | align:"center", |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'æå¨ä»åº', |
| | | align:"center", |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | | title:'æå¨åºä½å·', |
| | | align:"center", |
| | | dataIndex: 'positionCode' |
| | | }, |
| | | // { |
| | | // title:'åºåºç¶æ;1.æªåºåºï¼2.é¨ååºåºï¼3.åºåºå®æ', |
| | | // align:"center", |
| | | // dataIndex: 'status' |
| | | // }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | selectedRowKeys: [], |
| | | oldSelectRow: [], |
| | | scrollTrigger: { x: 1500, y: 500 }, |
| | | dataSource: [], |
| | | selectionRows: [], |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0, |
| | | }, |
| | | isorter: { |
| | | column: 'toolCode', |
| | | order: 'asc', |
| | | }, |
| | | departTree: [], |
| | | visible: false, |
| | | loading: false, |
| | | prepareKnifeDetailList:[], |
| | | url: { |
| | | list: '/tms/toolLedgerDetail/list' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.disabled, |
| | | }, |
| | | }), |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | async loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1 |
| | | } |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | console.log(params) |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | showModal(oldSelectRow) { |
| | | this.oldSelectRow = oldSelectRow |
| | | this.visible = true |
| | | this.queryParam.status = '1' |
| | | this.queryParam.excludeIds = oldSelectRow |
| | | this.loadData(1) |
| | | }, |
| | | getQueryParams() { |
| | | let param = Object.assign({}, this.queryParam, this.isorter) |
| | | param.field = this.getQueryField() |
| | | param.pageNo = this.ipagination.current |
| | | param.pageSize = this.ipagination.pageSize |
| | | return filterObj(param) |
| | | }, |
| | | //æ¥è¯¢æ¡ä»¶å¤ç |
| | | getQueryField() { |
| | | let fields = ['id']; |
| | | for (let a = 0; a < this.columns.length; a++) { |
| | | fields.push(this.columns[a].dataIndex); |
| | | } |
| | | return fields.join(','); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.loadData(1) |
| | | }, |
| | | close() { |
| | | this.queryParam = {} |
| | | // this.searchReset(0) |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.visible = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | handleSubmit() { |
| | | if (this.selectionRows.length > 0) { |
| | | this.$bus.$emit('selectionRows', this.selectionRows) |
| | | // this.searchReset(0) |
| | | this.close() |
| | | } else { |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®') |
| | | } |
| | | }, |
| | | onSelectChange(selectionRows) { |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | searchQuery() { |
| | | this.loadData(1) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ant-table-tbody .ant-table-row td { |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | |
| | | #components-layout-demo-custom-trigger .trigger { |
| | | font-size: 18px; |
| | | line-height: 64px; |
| | | padding: 0 24px; |
| | | cursor: pointer; |
| | | transition: color 0.3s; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åå
·ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolCode"> |
| | | <a-input v-model="model.toolCode"placeholder="请è¾å
¥åå
·ç¼ç " ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ç³è¯·åºåºæ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundQuantity"> |
| | | <a-input-number v-model="model.outboundQuantity"placeholder="请è¾å
¥ç³è¯·åºåºæ°é" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="ä»åº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storageLocation"> |
| | | <a-input v-model="model.storageLocation"placeholder="请è¾å
¥ä»åº" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åºåºåºä½" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundLocation"> |
| | | <a-input v-model="model.outboundLocation"placeholder="请è¾å
¥åºåºåºä½" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label="åºåºç¶æ;1.æªåºåºï¼2.é¨ååºåºï¼3.åºåºå®æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> |
| | | <a-input-number v-model="model.status"placeholder="请è¾å
¥åºåºç¶æ;1.æªåºåºï¼2.é¨ååºåºï¼3.åºåºå®æ" style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | |
| | | export default { |
| | | name: "OutboundDetailModal", |
| | | components: { |
| | | }, |
| | | props:{ |
| | | mainId:{ |
| | | type:String, |
| | | required:false, |
| | | default:'' |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | width:800, |
| | | visible: false, |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | }, |
| | | url: { |
| | | add: "/tms/outboundOrder/addOutboundDetail", |
| | | edit: "/tms/outboundOrder/editOutboundDetail", |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | add () { |
| | | this.edit(this.modelDefault); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | this.model['outStorehouseId'] = this.mainId |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | }else{ |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="width" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåºåç¼å·" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outNum"> |
| | | <a-input :disabled="true" v-model="model.outNum" placeholder="ç³»ç»èªå¨çæ"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåºç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outStorehouseType"> |
| | | <j-dict-select-tag :disabled="disableSubmit" @change="handleTypeChange" type="list" v-model="model.outStorehouseType" dictCode="out_storehouse_type" placeholder="è¯·éæ©åºåºç±»å" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="åºåºæ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outboundTime"> |
| | | <j-date :disabled="disableSubmit" :show-time="true" dateFormat="YYYY-MM-DD HH:mm" placeholder="è¯·éæ©åºåºæ¶é´" v-model="model.outboundTime" style="width: 100%"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="é¢ç¨äºç±" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="subjectMatter"> |
| | | <a-input :disabled="disableSubmit" v-model="model.subjectMatter" placeholder="请è¾å
¥é¢ç¨äºç±" ></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="å®¡æ ¸äºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reviewer"> |
| | | <j-select-user-by-dep :disabled="disableSubmit" v-model="model.reviewer" :store="'id'" :text="'realname'" :multi="false" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="addShow" label="ç»æäºº" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="handler"> |
| | | <j-select-user-by-dep v-model="model.handler" :store="'id'" :text="'realname'" :multi="false" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="addShow" label="ååç¶æ" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus"> |
| | | <j-dict-select-tag type="list" v-model="model.orderStatus" dictCode="out_bill_status" placeholder="è¯·éæ©ååç¶æ" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="addShow" label="å®¡æ ¸æ¶é´" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditDate"> |
| | | <j-date placeholder="è¯·éæ©å®¡æ ¸æ¶é´" v-model="model.auditDate" style="width: 100%" disabled/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="addShow" label="å®¡æ ¸æè§" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinion"> |
| | | <a-input v-model="model.approvalOpinion" placeholder="请è¾å
¥å®¡æ ¸æè§" disabled></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="夿³¨" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
| | | <a-textarea :disabled="disableSubmit" v-model="model.remark" rows="4" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">éæ©åºåºå·¥å
·</a-button> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="null" |
| | | @change="handleTableChange"> |
| | | |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | v-if="col.dataIndex === 'outboundQuantity'" |
| | | :disabled="record.quantity <= 1" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | | /> |
| | | </div> |
| | | </template> |
| | | <span slot="action" v-if="disableSubmit === false" slot-scope="text, record, index"> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record, index)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | <template slot="footer" v-if="disableSubmit === false"> |
| | | <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å
³é</a-button> |
| | | <a-button @click="handleOk" :disabled="isDisabled" type="primary">ç¡®å®</a-button> |
| | | </template> |
| | | |
| | | <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal> |
| | | </j-modal> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { httpAction } from '@/api/manage' |
| | | import { validateDuplicateValue } from '@/utils/util' |
| | | import OutboundDetailList from '../../OutboundDetailList.vue' |
| | | import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue' |
| | | import { getAction } from '../../../../api/manage' |
| | | import title from 'ant-design-vue/lib/skeleton/Title' |
| | | |
| | | export default { |
| | | name: "OutboundOrderModal", |
| | | components: { |
| | | OutboundDetailList, |
| | | JSelectOutboundToolModal |
| | | }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | width:1200, |
| | | visible: false, |
| | | disableSubmit: false, |
| | | isDisabled: false, |
| | | addShow: true, |
| | | selectBorrowTool: false, |
| | | model:{ |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | //è¡¨æ ¼åæ° |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }, |
| | | dataSource: [], |
| | | loading: false, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'toolNum' |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'toolId' |
| | | }, |
| | | { |
| | | title:'å¯ç¨åºå', |
| | | align:"center", |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'ç³è¯·åºåºæ°é', |
| | | align:"center", |
| | | dataIndex: 'outboundQuantity', |
| | | scopedSlots: { customRender: 'outboundQuantity' }, |
| | | }, |
| | | { |
| | | title:'åºåºä»åº', |
| | | align:"center", |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | | title:'åºåºåºä½', |
| | | align:"center", |
| | | dataIndex: 'outboundLocation' |
| | | }, |
| | | // { |
| | | // title:'åºåºç¶æ;1.æªåºåºï¼2.é¨ååºåºï¼3.åºåºå®æ', |
| | | // align:"center", |
| | | // dataIndex: 'status' |
| | | // }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | outStorehouseType: [ |
| | | { required: true, message: '请è¾å
¥åºåºç±»å!'}, |
| | | ], |
| | | subjectMatter: [ |
| | | { required: true, message: '请è¾å
¥é¢ç¨äºç±!'}, |
| | | ], |
| | | }, |
| | | url: { |
| | | list: "/tms/outboundOrder/listOutboundDetailByMainId", |
| | | add: "/tms/outboundOrder/addTotal", |
| | | edit: "/tms/outboundOrder/editTotal", |
| | | } |
| | | |
| | | } |
| | | }, |
| | | created () { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | id: data[i].id, |
| | | toolCode:data[i].toolCode, |
| | | toolNum:data[i].toolNum, |
| | | toolId: data[i].toolId, |
| | | quantity: data[i].quantity, |
| | | outboundQuantity: data[i].quantity, |
| | | storageLocation: data[i].warehouseId, |
| | | warehouseName: data[i].warehouseName, |
| | | outboundLocation: data[i].positionCode |
| | | }) |
| | | } |
| | | this.ipagination.total = this.dataSource.length |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleTypeChange(value) { |
| | | if (value === '1') { |
| | | this.selectBorrowTool = true |
| | | } |
| | | if (value === '2') { |
| | | this.selectBorrowTool = false |
| | | } |
| | | if (value === '3') { |
| | | this.selectBorrowTool = false |
| | | } |
| | | if (value === '4') { |
| | | this.selectBorrowTool = false |
| | | } |
| | | }, |
| | | handleDelete(record, index) { |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | console.log(value, key, column, index) |
| | | const temp = [...this.dataSource] |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value |
| | | this.dataSource = temp |
| | | if(column.dataIndex === 'outboundQuantity'){ |
| | | if(target['quantity']<value){ |
| | | this.$message.error('ç³è¯·åºåºæ°éä¸è½å¤§äºå¯ç¨åºå!') |
| | | this.isDisabled = true |
| | | }else{ |
| | | this.isDisabled = false |
| | | } |
| | | } |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | selectOutBoundTool() { |
| | | console.log(this.dataSource) |
| | | let ids = '' |
| | | if (this.title === 'æ°å¢') { |
| | | ids = this.dataSource.map(item => item.id).join(',') |
| | | } |
| | | if (this.title === 'ç¼è¾') { |
| | | ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',') |
| | | } |
| | | this.$refs.selectOutBoundToolModal.showModal(ids) |
| | | }, |
| | | add () { |
| | | this.addShow = false |
| | | this.edit(this.modelDefault); |
| | | this.dataSource = [] |
| | | }, |
| | | edit (record) { |
| | | if (record.id) { |
| | | getAction(this.url.list,{ outStorehouseId : record.id }).then(res => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | } |
| | | if (this.title === 'ç¼è¾') { |
| | | const type = record.outStorehouseType |
| | | switch (type) { |
| | | case '1': |
| | | this.handleTypeChange('1') |
| | | break |
| | | case '2': |
| | | this.handleTypeChange('2') |
| | | break |
| | | case '3': |
| | | this.handleTypeChange('3') |
| | | break |
| | | case '4': |
| | | this.handleTypeChange('4') |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.addShow = true |
| | | this.selectBorrowTool = false |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | this.ipagination = pagination |
| | | }, |
| | | handleOk () { |
| | | const that = this; |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | this.model.outboundDetailList = this.dataSource |
| | | that.confirmLoading = true; |
| | | let httpurl = ''; |
| | | let method = ''; |
| | | if(!this.model.id){ |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |
| | | that.$message.success(res.message); |
| | | that.$emit('ok'); |
| | | }else{ |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | }) |
| | | }else{ |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |