| | |
| | | let currentOrder = ref(null); |
| | | let searchInput = ref(null); |
| | | let tableData = ref([]); |
| | | const operationPortList = ref([]) |
| | | const open = ref(false); |
| | | const showWidth = ref("60%") |
| | | const records = ref([]) |
| | |
| | | }) |
| | | |
| | | tmp.push({ |
| | | title: formatMessage('db.man_order_detl.operationPort', '作业口'), |
| | | dataIndex: 'operationPort', |
| | | width: 140, |
| | | ellipsis: true, |
| | | fixed: 'right', |
| | | }) |
| | | |
| | | tmp.push({ |
| | | title: '', |
| | | dataIndex: 'handleStatus', |
| | | width: 100, |
| | |
| | | }) |
| | | } |
| | | |
| | | const handleOrderOutPreview = () => { |
| | | async function getOperationPort() { |
| | | let resp = await post('/api/operationPort/list', {}) |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | let data = result.data; |
| | | let tmp = [] |
| | | data.forEach((item) => { |
| | | tmp.push({ |
| | | label: item.flag, |
| | | value: item.id |
| | | }) |
| | | }) |
| | | operationPortList.value = tmp; |
| | | } else if (result.code === 401) { |
| | | message.error(result.msg); |
| | | logout() |
| | | } else { |
| | | message.error(result.msg); |
| | | } |
| | | } |
| | | |
| | | const handleOrderOutPreview = async () => { |
| | | await getOperationPort(); |
| | | loading.value = true; |
| | | tableData.value = [] |
| | | |
| | | let defaultOperationPort = ""; |
| | | if (operationPortList.value.length > 0) { |
| | | defaultOperationPort = operationPortList.value[0].value; |
| | | } |
| | | |
| | | post('/api/out/orderOut/batch/preview', { |
| | | orderDetlIds: records.value, |
| | | }).then((resp) => { |
| | | let result = resp.data; |
| | | if (result.code == 200) { |
| | | tableData.value = result.data; |
| | | let tmp = result.data; |
| | | tmp.forEach((item) => { |
| | | item.operationPort = defaultOperationPort; |
| | | }) |
| | | tableData.value = tmp; |
| | | loading.value = false; |
| | | } |
| | | }) |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template v-if="column.dataIndex === 'operationPort'"> |
| | | <a-select v-model:value="record.operationPort" :options="operationPortList"></a-select> |
| | | </template> |
| | | </template> |
| | | </a-table> |
| | | </a-modal> |