版本修改
This commit is contained in:
parent
54f1af048d
commit
0fcc8c5cbb
@ -18,6 +18,7 @@
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script src="https://cdn.staticfile.net/Sortable/1.10.0-rc2/Sortable.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=wsijQt8sLXrCW71YesmispvYHitfG9gv&s=1"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
15
package-lock.json
generated
15
package-lock.json
generated
@ -34,7 +34,7 @@
|
||||
"qrcodejs2-fixes": "^0.0.2",
|
||||
"qs": "^6.12.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"splitpanes": "^3.1.5",
|
||||
"vue": "^3.4.21",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
@ -4128,9 +4128,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sortablejs": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.2.tgz",
|
||||
"integrity": "sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA=="
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.6.tgz",
|
||||
"integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
@ -7521,9 +7522,9 @@
|
||||
"integrity": "sha512-wHMNIOjkm/YNE5EM3RCbr/+DVgPg6AqQAX1eOxO46zYNvCXjKP5Y865tqQj3EXnaMBjkxmQA5jFuDpDK/dbfiA=="
|
||||
},
|
||||
"sortablejs": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.2.tgz",
|
||||
"integrity": "sha512-FJF5jgdfvoKn1MAKSdGs33bIqLi3LmsgVTliuX6iITj834F+JRQZN90Z93yql8h0K2t0RwDPBmxwlbZfDcxNZA=="
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.6.tgz",
|
||||
"integrity": "sha512-aNfiuwMEpfBM/CN6LY0ibyhxPfPbyFeBTYJKCvzkJ2GkUpazIt3H+QIPAMHwqQ7tMKaHz1Qj+rJJCqljnf4p3A=="
|
||||
},
|
||||
"source-map-js": {
|
||||
"version": "1.0.2",
|
||||
|
@ -35,7 +35,7 @@
|
||||
"qrcodejs2-fixes": "^0.0.2",
|
||||
"qs": "^6.12.0",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.2",
|
||||
"sortablejs": "^1.15.6",
|
||||
"splitpanes": "^3.1.5",
|
||||
"vue": "^3.4.21",
|
||||
"vue-clipboard3": "^2.0.0",
|
||||
|
@ -1,11 +1,312 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<el-dialog :model-value="state.show" @close="closeFun" width="90%">
|
||||
<avue-crud ref="crudRef" :data="state.data" :option="state.option">
|
||||
<template #packagingQuantity="{ row }">
|
||||
<div style="display: flex; align-items: center; justify-content: center; width: 100%">
|
||||
<el-input-number v-model="row.packagingQuantity" style="width: 100%" :min="1" size="small" @change="inputNumberFun($event, row)" />
|
||||
</div>
|
||||
</template>
|
||||
<template #printBtn="{ row }">
|
||||
<el-button type="text">
|
||||
<div style="display: flex; align-items: center">{{ row.printBtn }}</div>
|
||||
</el-button>
|
||||
<el-button type="text">打印样例</el-button>
|
||||
</template>
|
||||
<template #expand="{ row }">
|
||||
<div class="expandListBox">
|
||||
<div class="expandItem" v-for="(item, index) of row.children" :key="index">
|
||||
<div class="expandItemCol" v-for="(itemCol,indexCol) in item" :key="indexCol">
|
||||
<div v-if="itemCol != '打印此包装'">{{ itemCol }}</div>
|
||||
<el-button v-else type="text">
|
||||
<div style="display: flex; align-items: center">{{ itemCol }}</div>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #menu-left>
|
||||
<div class="selectBoxes">
|
||||
<div class="selectItem">
|
||||
<el-input v-model="state.indexRow.deliveryDate" style="width: 280px" size="default" disabled>
|
||||
<template #prepend>{{ t('message.index.deliveryDate') }}</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="selectItem">
|
||||
<el-input v-model="state.formData.sheet" style="width: 280px" size="default" disabled>
|
||||
<template #prepend>{{ t('message.index.deliveryNote') }}</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="selectItem">
|
||||
<el-select v-model="state.printSelection" clearable placeholder="请选择打印模板" size="default" style="width: 280px" >
|
||||
<el-option label="珠海" value="0" />
|
||||
<el-option label="泰国" value="1" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-button type="primary" size="default">整单打印</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive, computed, defineExpose } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { listApi } from '/@/api/list';
|
||||
import barCode from './barCode.vue';
|
||||
const { t } = useI18n();
|
||||
const state: any = reactive({
|
||||
data: [],
|
||||
show: false,
|
||||
printSelection: '',
|
||||
option: {
|
||||
expand: true,
|
||||
expandRowKeys: [1],
|
||||
rowKey: 'id',
|
||||
tip: false,
|
||||
selection: false,
|
||||
index: false,
|
||||
menu: false,
|
||||
menuWidth: 150,
|
||||
border: true,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
align: 'center',
|
||||
searchLabelWidth: 140,
|
||||
searchMenuSpan: 6,
|
||||
addBtn: false,
|
||||
column: [
|
||||
{ label: computed(() => t('message.index.PO1')), prop: 'purchaseOrderFBillNo' },
|
||||
{ label: computed(() => t('message.index.maxcessLot')), prop: 'mssSupplierLot' },
|
||||
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
|
||||
{ label: computed(() => t('message.index.partNumber')), prop: 'materialCode' },
|
||||
{ label: computed(() => t('message.index.materialName')), prop: 'materialName' },
|
||||
{ label: computed(() => t('message.index.supplierCode')), prop: 'supplierId' },
|
||||
{ label: computed(() => t('message.index.supplierName')), prop: 'supplierName' },
|
||||
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'qty' },
|
||||
{ label: '每包数', prop: 'packagingQuantity' },
|
||||
{ label: '包装数 / 序号', prop: 'quantityPerPackage' },
|
||||
{ label: computed(() => t('message.index.print')), prop: 'printBtn' },
|
||||
],
|
||||
},
|
||||
formData: {
|
||||
sheet: '',
|
||||
fDateBegin: '',
|
||||
fDateEmd: '',
|
||||
fmrpCloseStatus: '',
|
||||
},
|
||||
indexRow: {},
|
||||
});
|
||||
|
||||
const printCheckFun = () => {
|
||||
state.printSelectionShow = false;
|
||||
};
|
||||
|
||||
const inputNumberFun = (e: any, row: any) => {
|
||||
if (e <= 1 || e > row.packagingQuantity) {
|
||||
state.data = state.data.map((item: any) =>
|
||||
item.id === row.id
|
||||
? {
|
||||
...item,
|
||||
children: [],
|
||||
quantityPerPackage: item.qty,
|
||||
}
|
||||
: item
|
||||
);
|
||||
return;
|
||||
}
|
||||
state.data = state.data.map((item: any) => {
|
||||
if (item.id !== row.id) return item;
|
||||
const packages = Math.ceil(item.qty / e);
|
||||
item.quantityPerPackage = packages;
|
||||
const children = Array.from({ length: packages }, (_, i) => {
|
||||
const child = state.option.column.reduce(
|
||||
(acc: any, col: any) => {
|
||||
acc[col.prop] = row[col.prop];
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, any>
|
||||
);
|
||||
child.quantityPerPackage = i + 1;
|
||||
child.printBtn = '打印此包装';
|
||||
if (i === packages - 1 && item.qty % e !== 0) {
|
||||
child.packagingQuantity = item.qty % e;
|
||||
} else {
|
||||
child.packagingQuantity = e;
|
||||
}
|
||||
return child;
|
||||
});
|
||||
return { ...item, children };
|
||||
});
|
||||
};
|
||||
|
||||
const openShowDataFun = (row: any) => {
|
||||
state.indexRow = row;
|
||||
state.formData.sheet = row.sheet;
|
||||
listApi()
|
||||
.invoiceOrderGetPageList({ condition: state.formData, pageSize: 100000, page: 1 })
|
||||
.then((res: any) => {
|
||||
if (res.resultCode === 0) {
|
||||
state.data = res.data.dataList;
|
||||
state.data.forEach((item: any) => {
|
||||
item.packagingQuantity = 1;
|
||||
item.quantityPerPackage = item.qty;
|
||||
item.children = [];
|
||||
item.printBtn = '打印此条';
|
||||
});
|
||||
state.show = true;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const closeFun = () => {
|
||||
state.show = false;
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
openShowDataFun,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.expandListBox {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 0 0 60px;
|
||||
|
||||
</style>
|
||||
.expandItem {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
//background-color: #3eaadc;
|
||||
border-top: 1px solid #ebeef5;
|
||||
border-right: 8px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
|
||||
.expandItemCol {
|
||||
width: calc(100% / 11);
|
||||
box-sizing: border-box;
|
||||
border-left: 1px solid #ebeef5;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-card) {
|
||||
padding: 0 !important;
|
||||
//height: 56px !important;
|
||||
}
|
||||
|
||||
.btnList {
|
||||
margin-top: 26px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.avue-crud__left) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.avue-crud__refreshBtn) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep(.avue-crud__gridBtn) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.piliang {
|
||||
margin-left: 12px;
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 8px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.system-user-container {
|
||||
//padding: 0 !important;
|
||||
}
|
||||
|
||||
.multi-line-omit {
|
||||
word-break: break-all; // 允许单词内自动换行,如果一个单词很长的话
|
||||
text-overflow: ellipsis; // 溢出用省略号显示
|
||||
overflow: hidden; // 超出的文本隐藏
|
||||
display: -webkit-box; // 作为弹性伸缩盒子模型显示
|
||||
-webkit-line-clamp: 1; // 显示的行
|
||||
-webkit-box-orient: vertical; // 设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
||||
}
|
||||
|
||||
.selectBoxes {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
.selectItem {
|
||||
margin-right: 16px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.avue-crud) {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.avue-crud--card) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.avue-crud__body) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
:deep(.el-card__body) {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__cell) {
|
||||
//padding: 0 !important;
|
||||
//height: 56px !important;
|
||||
}
|
||||
|
||||
:deep(.el-card) {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
:deep(.el-form) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.system-user-container {
|
||||
:deep(.el-card__body) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
|
||||
.el-table {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.el-col) {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
:deep(.cell) {
|
||||
padding: 0 !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #deliveryDate="{ row }">{{ row.ifHidden === 0 ? row.deliveryDate : '' }}</template>
|
||||
<template #purchaseOrderFBillNo="{ row }">{{ row.ifHidden === 0 ? row.purchaseOrderFBillNo : '' }}</template>
|
||||
<!-- <template #purchaseOrderFBillNo="{ row }">{{ row.ifHidden === 0 ? row.purchaseOrderFBillNo : '' }}</template>-->
|
||||
<template #sheet="{ row }">{{ row.ifHidden === 0 ? row.sheet : '' }}</template>
|
||||
<template #materialName="{ row }">
|
||||
<el-tooltip :content="row.materialName" placement="top">
|
||||
@ -55,7 +55,7 @@
|
||||
</template>
|
||||
<template #print="{ row }">
|
||||
<div class="btnList">
|
||||
<el-button v-if="row.ifHidden === 0" type="text" @click="barCodeFunDataRow(row)">{{ t('message.index.print') }}</el-button>
|
||||
<el-button v-if="row.ifHidden === 0" type="text" @click="componentPrintingFunDataRow(row)">{{ t('message.index.print') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template #deleteText="{ row }">
|
||||
@ -63,12 +63,6 @@
|
||||
<el-button v-if="row.ifHidden === 0" type="text" @click="invoiceOrderDeleteOrderFun(row)">{{ t('message.index.deleteText') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template #menu="{ row }">
|
||||
<div class="btnList">
|
||||
<el-button type="text" @click="barCodeFunDataRow(row)">{{ t('message.index.print') }}</el-button >
|
||||
<el-button v-if="row.ifHidden === 0" type="text" @click="invoiceOrderDeleteOrderFun(row)">{{ t('message.index.deleteText') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-card>
|
||||
<selectedData
|
||||
@ -76,28 +70,30 @@
|
||||
:showes="state.selectedDataShow"
|
||||
@close="() => { state.selectedDataShow = false; }"
|
||||
/>
|
||||
<barCode :showes="state.barCodeShow" :data="state.barCodeItem" @close="() => { state.barCodeShow = false }"/>
|
||||
<componentPrinting ref="componentPrintingRef"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted, computed, ref } from 'vue';
|
||||
import { listApi } from '../../api/list/index';
|
||||
import { listApi } from '/@/api/list';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import SelectedData from '/@/views/materialReceiptNotice/selectedData.vue';
|
||||
import barCode from './barCode.vue'
|
||||
import componentPrinting from './componentPrinting.vue'
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
const { t } = useI18n();
|
||||
const crudRef = ref();
|
||||
// 定义变量内容
|
||||
const componentPrintingRef = ref()
|
||||
const state = reactive({
|
||||
page: {
|
||||
total: 1000,
|
||||
total: 0,
|
||||
currentPage: 1,
|
||||
pageSize: 30,
|
||||
},
|
||||
option: {
|
||||
height: computed(() => window.innerHeight - window.innerHeight * 0.25 + ''),
|
||||
sortable: true,
|
||||
tip: false,
|
||||
index: false,
|
||||
menuWidth: 120,
|
||||
@ -137,12 +133,8 @@ const state = reactive({
|
||||
fmrpCloseStatus: '',
|
||||
},
|
||||
selectedData: [],
|
||||
chengNuoJiaoQiP: '',
|
||||
newChengNuoJiaoQiP: '',
|
||||
selectedDataShow: false,
|
||||
loading: false,
|
||||
barCodeShow:false,
|
||||
barCodeItem: {}
|
||||
});
|
||||
const elDatePickerFun = (val: any) => {
|
||||
state.formData.fDateBegin = val[0];
|
||||
@ -203,9 +195,8 @@ const selectionChange = (row: any) => {
|
||||
state.selectedData = [];
|
||||
}
|
||||
};
|
||||
const barCodeFunDataRow = (row:any) => {
|
||||
state.barCodeItem = row
|
||||
state.barCodeShow = true
|
||||
const componentPrintingFunDataRow = (row:any) => {
|
||||
componentPrintingRef.value.openShowDataFun(row)
|
||||
}
|
||||
//接口数据处理
|
||||
const selectFun = () => {
|
||||
@ -257,11 +248,12 @@ onMounted(() => {});
|
||||
:deep(.el-checkbox--default):nth-child(0) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-checkbox) {
|
||||
height: 15px !important;
|
||||
}
|
||||
:deep(.cell) {
|
||||
padding: 0 8px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
:deep(.avue-crud__left) {
|
||||
flex: 1;
|
||||
|
@ -139,6 +139,7 @@ const state = reactive({
|
||||
pageSize: 30,
|
||||
},
|
||||
option: {
|
||||
sortable: true,
|
||||
height: computed(() => window.innerHeight - window.innerHeight * 0.23 + ''),
|
||||
tip: false,
|
||||
index: false,
|
||||
|
@ -78,8 +78,6 @@ const state = reactive({
|
||||
{ label: computed(() => t('message.index.unreceivedQTY')), prop: 'notSendQtyText' },
|
||||
{ label: computed(() => t('message.index.supplierLot')), prop: 'fSupplierLot' },
|
||||
{ label: computed(() => t('message.index.shipmentQTY')), prop: 'notSendQty', width: '180' },
|
||||
{ label: '包装数量', prop: '123'},
|
||||
{ label: '条码张数', prop: '1233'},
|
||||
{ label: computed(() => t('message.index.earliestDeliveryDate')), prop: 'chengNuoJiaoQi', width: '180' },
|
||||
{ label: computed(() => t('message.index.latestDeliveryDate')), prop: 'newChengNuoJiaoQi', width: '180' },
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user