init(projects): 整体修改

master
xushilin 12 months ago
parent 56b17e1451
commit 130832bb21

@ -69,8 +69,12 @@ import {
useEditBtn useEditBtn
} from '@/hooks/common/useBtn'; } from '@/hooks/common/useBtn';
// import { download } from '@/service/request/helpers'; // import { download } from '@/service/request/helpers';
import { useSocketStore } from '@/store/modules/socket/index';
import type { ModalType } from './components/table-action-modal.vue'; import type { ModalType } from './components/table-action-modal.vue';
import TableActionModal from './components/table-action-modal.vue'; import TableActionModal from './components/table-action-modal.vue';
const socketStore = useSocketStore();
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance() as any; const { proxy } = getCurrentInstance() as any;
const { wms_item_recpt_status } = proxy.useDict('wms_item_recpt_status', 'wms_item_recpt_type'); const { wms_item_recpt_status } = proxy.useDict('wms_item_recpt_status', 'wms_item_recpt_type');
@ -265,6 +269,13 @@ const columns: Ref<DataTableColumns<wms.recptRawType.columns>> = ref([
align: 'center', align: 'center',
render: row => { render: row => {
console.log(wms_item_recpt_status.value, row.status, '----'); console.log(wms_item_recpt_status.value, row.status, '----');
if (row.status === 'FINISHED') {
return (
<n-button size="small" type="info" onClick={() => print(row)}>
补打标签
</n-button>
);
}
const Btn: JSX.Element[] = []; const Btn: JSX.Element[] = [];
if (row.status !== 'FINISHED') { if (row.status !== 'FINISHED') {
Btn.push( Btn.push(
@ -280,29 +291,6 @@ const columns: Ref<DataTableColumns<wms.recptRawType.columns>> = ref([
) )
); );
} }
// Btn.push(
// useInfoBtn(
// () => {
// router.push({
// name: 'storage_auxiliaryProduceinfo',
// query: { id: row.recptId, warehouseId: row.warehouseId, info: 'true' }
// });
// },
// 'tiny',
// ''
// )
// );
// Btn.push(
// useDelBtn(() => {
// delWmsItemRecpt(row.recptId as number).then(res => {
// if (res.code === 200) {
// window.$message?.success('');
// init();
// }
// });
// }, 'tiny')
// );
return Btn; return Btn;
} }
} }
@ -328,6 +316,15 @@ function reset() {
getWmsItemRecptData(); getWmsItemRecptData();
} }
function print(row: wms.recptRawType.columns) {
socketStore.setMsg(
JSON.stringify({
templateType: 'YL-MB',
printValue: row.lineList
})
);
window.$message?.success('已发送打印命令');
}
// async function handleEditTable(issueId: number) { // async function handleEditTable(issueId: number) {
// console.log('', issueId); // console.log('', issueId);
// } // }

Loading…
Cancel
Save