| | |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <!-- <span slot="action" slot-scope="text, record">--> |
| | | <!-- <a @click="handleEdit(record)">编辑</a>--> |
| | | |
| | | <!-- <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="handleDetail(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 slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)" :disabled="record.orderStatus === '2'">编辑</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
| | |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <!-- <a-menu-item v-if="record.orderStatus != '2'">--> |
| | | <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> |
| | | <!-- <a>删除</a>--> |
| | | <!-- </a-popconfirm>--> |
| | | <!-- </a-menu-item>--> |
| | | <a-menu-item v-if="record.orderStatus !== '2'"> |
| | | <a @click="handleSubmit(record.id)" :disabled="record.orderStatus === '3'">提交</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.orderStatus !== '2'"> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.orderStatus === '2'"> |
| | | <a @click="handleBack(record.id)">归还</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import CuttingReceiveModal from './modules/CuttingReceiveModal' |
| | | import CuttingReceiveDetailList from './CuttingReceiveDetailList' |
| | | import { httpAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'CuttingReceiveList', |
| | |
| | | { |
| | | title: '领用单状态', |
| | | align: 'center', |
| | | dataIndex: 'orderStatus' |
| | | dataIndex: 'orderStatus_dictText' |
| | | }, |
| | | { |
| | | title: '操作', |
| | |
| | | delete: '/cms/cuttingReceive/delete', |
| | | deleteBatch: '/cms/cuttingReceive/deleteBatch', |
| | | exportXlsUrl: '/cms/cuttingReceive/exportXls', |
| | | importExcelUrl: 'cms/cuttingReceive/importExcel' |
| | | |
| | | importExcelUrl: 'cms/cuttingReceive/importExcel', |
| | | submit: '/cms/cuttingReceive/submit' |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 单据提交 |
| | | */ |
| | | handleSubmit: function(id) { |
| | | if (!this.url.submit) { |
| | | this.$message.error('请设置url.submit属性!') |
| | | return |
| | | } |
| | | |
| | | let targetId = id // 从参数获取ID |
| | | // 如果没有通过参数传递ID,则检查选中的记录 |
| | | if (!targetId) { |
| | | if (this.selectedRowKeys.length != 1) { |
| | | this.$message.warning('请选择一条记录!') |
| | | return |
| | | } else { |
| | | targetId = this.selectedRowKeys[0] |
| | | } |
| | | } |
| | | |
| | | // 将参数作为查询参数附加到URL上 |
| | | let httpurl = this.url.submit + '?orderId=' + encodeURIComponent(targetId) |
| | | let method = 'get' |
| | | var params = {} // 清空params,因为参数已经在URL中传递 |
| | | |
| | | const that = this |
| | | |
| | | this.$confirm({ |
| | | title: '确认提交!', |
| | | // content: '正在提交数据,请耐心等待...', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk() { |
| | | // 显示加载提示 |
| | | const hide = that.$message.loading('正在提交数据,请耐心等待...', 0) |
| | | |
| | | // 发送请求 |
| | | return httpAction(httpurl, params, method).then((res) => { |
| | | hide() // 隐藏加载提示 |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).catch(error => { |
| | | hide() // 隐藏加载提示 |
| | | that.$message.error('提交失败: ' + error.message) |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //TODO:刀具归还 handleBack |
| | | } |
| | | } |
| | | </script> |