Browse Source

YT-2797顺引发货记录增加【维护对账日期】功能,导入纳入受领书时,增加调整差异数据的功能

intex_online_narushoulingshu
张立 2 weeks ago
parent
commit
af2aa81cd4
  1. 53
      src/components/ImportForm/src/ImportFormStep.vue
  2. 7
      src/components/TableForm/src/TableForm.vue
  3. 3
      src/locales/en-US.ts
  4. 5
      src/locales/zh-CN.ts
  5. 57
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts
  6. 72
      src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue

53
src/components/ImportForm/src/ImportFormStep.vue

@ -85,7 +85,7 @@
</el-button>
<el-button type="primary" plain @click="downloadDifferenceData" v-if="active == 1 && error">
<Icon icon="ep:download" />
{{ t('ts.下载差异数据') }}
{{ t('ts.差异数据') }}
</el-button>
</div>
<el-button :disabled="formLoading || isShowLoading" type="primary" @click="submitForm" v-if="active == 0 || (active == 1 && !error)">{{ t('ts.下一步') }}</el-button>
@ -113,6 +113,7 @@ import download from '@/utils/download'
import { getBaseUrl } from '@/utils/systemParam'
import { UploadFilled, List, CircleCheckFilled,WarningFilled } from '@element-plus/icons-vue'
import { waitForDebugger } from 'node:inspector/promises'
import { emit } from 'process'
import * as XLSX from 'xlsx';
@ -278,7 +279,8 @@ const emits = defineEmits([
'clearSearchInput',
'clearInput',
'sumFormDataHandle',
'visibleChange'
'visibleChange',
'open-difference-data'
])
/** 打开弹窗 */
@ -689,29 +691,30 @@ const downloadDifferenceData = () => {
return;
}
// 使
const columns = currentColumns.value;
// 簿使
const wb = XLSX.utils.book_new();
const ws = XLSX.utils.json_to_sheet(props.tableObject.tableList);
// ;
columns.forEach((col, index) => {
const cellAddress = XLSX.utils.encode_cell({ r: 0, c: index });
if (ws[cellAddress]) {
ws[cellAddress].v = col.label;
}
});
//
const colWidth = columns.map(() => ({ wch: 20 }));
ws['!cols'] = colWidth;
// 簿
XLSX.utils.book_append_sheet(wb, ws, "差异数据");
const timestamp = new Date().getTime();
XLSX.writeFile(wb, `差异数据_${timestamp}.xlsx`);
// // 使
// const columns = currentColumns.value;
// // 簿使
// const wb = XLSX.utils.book_new();
// const ws = XLSX.utils.json_to_sheet(props.tableObject.tableList);
// // ;
// columns.forEach((col, index) => {
// const cellAddress = XLSX.utils.encode_cell({ r: 0, c: index });
// if (ws[cellAddress]) {
// ws[cellAddress].v = col.label;
// }
// });
// //
// const colWidth = columns.map(() => ({ wch: 20 }));
// ws['!cols'] = colWidth;
// // 簿
// XLSX.utils.book_append_sheet(wb, ws, "");
// const timestamp = new Date().getTime();
// XLSX.writeFile(wb, `_${timestamp}.xlsx`);
emit("open-difference-data")
}
</script>

7
src/components/TableForm/src/TableForm.vue

@ -427,6 +427,13 @@
>
<span>{{ t('ts.批量删除') }}</span>
</el-button>
<el-button
type="primary"
@click.stop="handleSelectionDelete"
:icon="Remove"
>
<span>{{ t('ts.调整差异数量') }}</span>
</el-button>
<div class="p-12px" v-if="isShowTableFormSearch?.isShowTableFormSearch">
<el-input
v-model="keyWord"

3
src/locales/en-US.ts

@ -904,7 +904,7 @@ export default {
'追加:只新增,不修改':'Add:Add,no modify',
'覆盖:只修改不新增':'Cover:Modify,not add',
: 'Download Template',
: 'Download differential data',
: 'Differential data',
:'Update',
:'Add',
:'Cover',
@ -1337,5 +1337,6 @@ export default {
:'Export the statement of account',
:'Update the order forecast',
:'Temporary material replenishment',
: 'Adjust the number of differences',
},
}

5
src/locales/zh-CN.ts

@ -909,7 +909,7 @@ export default {
'追加:只新增,不修改':'追加:只新增,不修改',
'覆盖:只修改不新增':'覆盖:只修改不新增',
: '下载模板',
: '下载差异数据',
: '差异数据',
:'更新',
:'追加',
:'覆盖',
@ -1335,7 +1335,8 @@ export default {
:'全部重试',
:'导出对账单',
:'更新要货预测',
:'临时补料',
: '临时补料',
: '调整差异数量',
},
}

57
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/deliverRecordMain.data.ts

@ -1594,6 +1594,7 @@ export const MaintenanceBillDateDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
]))
// 维护对账日期主校验
@ -1604,4 +1605,58 @@ export const MaintenanceBillDateDetailRules = reactive({
serialNoShow: [
{ required: true, message: '请输入不包含顺序号', trigger: 'blur' }
],
})
})
/**
* @returns {Array}
*/
export const AdjustDiffDataMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '客户订单号',
field: 'billDate',
sort: 'custom',
tableForm: {
type: 'FormDate',
placeholder: '请选择维护对账日期',
valueFormat: 'YYYYMMDD',
},
form: {
component: 'Input',
componentProps: {
placeholder: '请输入客户订单号',
disabled: true
}
},
},
]))
/**
* @returns {Array}
*/
export const AdjustDiffDataTable = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '品番',
field: 'itemCode',
sort: 'custom',
}, {
label: '描述',
field: 'disc1',
sort: 'custom',
}, {
label: '背番',
field: 'backNumber',
sort: 'custom',
}, {
label: '纳入数量',
field: 'itemCode',
sort: 'custom',
}, {
label: '发货数量',
field: 'itemCode',
sort: 'custom',
}, {
label: '差异数量',
field: 'itemCode',
sort: 'custom',
}
]))

72
src/views/wms/deliversettlementManage/inducedProduct/deliverRecordMain/index.vue

@ -86,6 +86,7 @@
:isShowDownloadBtn="false"
:confirmFormSuccess="confirmFormSuccess"
@searchTableSuccess="searchTableSuccess"
@open-difference-data="openDifferenceData"
sourcePage="InducedProduct"
/>
@ -111,6 +112,8 @@
:tableData="tableDataBillDate"
:isShowFooterButtton="false"
:footButttondata="footButttondata"
:isShowReduceButton="false"
:isShowReduceButtonSelection="true"
@handleAddTable="handleAddTableBillDate"
@handleDeleteTable="handleDeleteTableBillDate"
@tableSelectionDelete="tableSelectionDeleteBillDate"
@ -124,12 +127,45 @@
</div>
</template>
</BasicForm>
<!-- 维护对账日期弹窗 -->
<BasicForm
ref="adjustDiffDataRef"
:formAllSchemas="AdjustDiffDataMain.allSchemas"
:tableAllSchemas="MaintenanceBillDateDetail.allSchemas"
:tableFormRules="MaintenanceBillDateDetailRules"
:isBusiness="true"
:apiUpdate="DeliverRecordMainApi.inducedProductUpdate"
:apiCreate="DeliverRecordMainApi.inducedProductCreate"
:tableData="tableDataBillDate"
:isShowFooterButtton="false"
:footButttondata="footButttondataAdjustDiffData"
:isShowReduceButton="false"
:isShowReduceButtonSelection="true"
@handleAddTable="handleAddTableBillDate"
@handleDeleteTable="handleDeleteTableBillDate"
@tableSelectionDelete="tableSelectionDeleteBillDate"
@searchTableSuccess="searchTableAddSuccessBillDate"
@clearSearchInput="clearSearchInputBillDate"
@footButtonClick="footButtonClickAdjustDiffData"
>
<template #table>
<div>
<div class="tips">以下是调整后的数据差异情况</div>
<Table v-clientTable :columns="AdjustDiffDataTable.allSchemas.tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{ total: tableObject.total }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" style="width: calc(100% - 6px);">
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
</Table>
</div>
</template>
</BasicForm>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules,DeliverRecordImport,DeliverRecordImportRules,ImportLeadershipDocErrorData,ImportLeadershipDocTempData,MaintenanceBillDateMain,MaintenanceBillDateMainRules,MaintenanceBillDateDetail,MaintenanceBillDateDetailRules} from './deliverRecordMain.data'
import { DeliverRecordMain,DeliverRecordMainRules,DeliverRecordDetail,DeliverRecordDetailRules,DeliverRecordImport,DeliverRecordImportRules,ImportLeadershipDocErrorData,ImportLeadershipDocTempData,MaintenanceBillDateMain,MaintenanceBillDateMainRules,MaintenanceBillDateDetail,MaintenanceBillDateDetailRules,AdjustDiffDataMain,AdjustDiffDataTable} from './deliverRecordMain.data'
import * as DeliverRecordMainApi from '@/api/wms/deliverRecordMain'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import * as MaintenanceBillDateApi from '@/api/wms/maintenanceBillDate'
@ -161,7 +197,7 @@ mainAndDetaillSchemas.value.tableColumns = [...DeliverRecordMain.allSchemas.tabl
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage //
})
const adjustDiffDataRef = ref()
//
/**
* OktoholdRequestMain 合格转隔离
@ -544,6 +580,19 @@ const footButttondata = ref([
}, // BOM
defaultButtons.formCloseBtn(null) // BOM
])
const footButttondataAdjustDiffData = ref([
{
label: t('ts.下一步'),
name: 'nextStep',
type: 'primary',
hide: false,
icon: '',
color: '',
float: 'right',
hasPermi: ''
}, //
defaultButtons.formCloseBtn(null) // BOM
])
//
const handleMainBillDate = async (type,row) => {
maintenanceBillDateRef.value.open(type,row)
@ -576,6 +625,7 @@ const footButtonClick = async (val) => {
maintenanceBillDateRef.value.dialogVisible = false
}
}
watch(
() => maintenanceBillDateRef.value?.formRef?.formModel,
(val) => {
@ -678,6 +728,16 @@ const searchTableAddSuccessBillDate = (formField, searchField, val, formRef, typ
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
const footButtonClickAdjustDiffData = async (val) => {
if (val == 'nextStep') {
} else if (val == 'close') {
adjustDiffDataRef.value.dialogVisible = false
}
}
//
const openDifferenceData = () => {
adjustDiffDataRef.value.dialogVisible = true
}
/** 初始化 **/
onMounted(async () => {
tableObject.params.businessType = 'InducedProduct'
@ -687,3 +747,9 @@ onMounted(async () => {
}
})
</script>
<style lang="scss" scoped>
.tips{
padding: 10px 0px;
color: #7d7d7d;
}
</style>

Loading…
Cancel
Save