Browse Source

Merge remote-tracking branch 'origin/master_hella' into master_hella

master_hella_20240701
gaojs 6 months ago
parent
commit
63f10c5835
  1. 5
      src/api/mes/processroute/index.ts
  2. 11
      src/api/wms/customeritem/index.ts
  3. 13
      src/api/wms/deliverPlanMain/index.ts
  4. 13
      src/api/wms/deliverRequestMain/index.ts
  5. 339
      src/components/ImportForm/src/ImportDetailForm.vue
  6. 18
      src/locales/en-US.ts
  7. 15
      src/locales/zh-CN.ts
  8. 12
      src/views/login/forgetPassword.vue
  9. 20
      src/views/mes/holiday/holiday.data.ts
  10. 6
      src/views/mes/processroute/components/configDialog.vue
  11. 7
      src/views/mes/processroute/processroute.data.ts
  12. 48
      src/views/mes/workcalendar/index.vue
  13. 36
      src/views/wms/countManage/count/countJobMain/index.vue
  14. 29
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  15. 28
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue
  16. 22
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  17. 113
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue
  18. 22
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  19. 60
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  20. 2
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  21. 2
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  22. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  23. 2
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  24. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

5
src/api/mes/processroute/index.ts

@ -87,6 +87,11 @@ export const getProcessBomList = async (params) => {
return await request.get({ url: `/mes/common/getBomListByProductAndProcess`,params})
}
// 查询产品bom的工序物料列表
export const getBomListByProductBomAndProcess = async (params) => {
return await request.get({ url: `/mes/common/getBomListByProductBomAndProcess`,params})
}
export const getWorkstationPage = async (code:String) => {
return await request.get({ url: `/mes/workstation/page?pageSize=25&processCode=`+code})
}

11
src/api/wms/customeritem/index.ts

@ -61,4 +61,15 @@ export const exportCustomeritem = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customeritem/get-import-template' })
}
// 获得业务类型筛选出的物料分页
export const getPageBusinessTypeToItemCode = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/customeritem/pageBusinessTypeToLocationSenior', data })
} else {
return await request.get({ url: `/wms/customeritem/pageBusinessTypeToItemCode`, params })
}
}

13
src/api/wms/deliverPlanMain/index.ts

@ -49,6 +49,19 @@ export const deleteDeliverPlanMain = async (id: number) => {
// 导出发货计划主 Excel
export const exportDeliverPlanMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-plan-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-plan-main/export-excel`, params })
}
}
// 导出发货计划主 Excela
export const exportZZBJDeliverPlanMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

13
src/api/wms/deliverRequestMain/index.ts

@ -65,6 +65,19 @@ export const deleteDeliverRequestMain = async (id: number) => {
// 导出发货申请主 Excel
export const exportDeliverRequestMain = async (params) => {
params.businessType = 'Deliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/deliver-request-main/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/deliver-request-main/export-excel`, params })
}
}
// 导出发货申请主 Excel
export const exportZZBJDeliverRequestMain = async (params) => {
params.businessType = 'ZZBJDeliver'
if (params.isSearch) {
delete params.isSearch
const data = {...params}

339
src/components/ImportForm/src/ImportDetailForm.vue

@ -0,0 +1,339 @@
<!-- 导入组件 -->
<template>
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false">
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
:action="
importUrl +
'?mode=' +
mode +
'&file=' +
file +
'&updatePart=' +
updatePart +
'&outFile=' +
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
"
:auto-upload="false"
:disabled="formLoading"
:headers="uploadHeaders"
:limit="1"
:on-error="submitFormError"
:on-exceed="handleExceed"
:on-success="submitFormSuccess"
:accept="accept"
drag
style="width: 300px; margin: 0 auto"
v-loading="formLoading"
>
<Icon icon="ep:upload-filled" color="#c0c4cc" :size="60" />
<div class="el-upload__text">{{t('ts.将文件拖到此处,或')}}<em>{{t('ts.点击上传')}}</em></div>
<template #tip>
<div class="el-upload__tip ml--126px mr--80px">
<div class="flex">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{t('ts.导入模式')}}</div
>
<div class="">
<div class="radio">
<el-radio-group v-model="mode">
<el-radio :label="1" :disabled="updateIsDisable">{{ t('ts.更新')}}</el-radio>
<!-- <el-radio :label="2" :disabled="appendIsDisable">{{ t('ts.追加') }}</el-radio>
<el-radio :label="3" :disabled="coverIsDisable">{{ t('ts.覆盖') }}</el-radio> -->
</el-radio-group>
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{t('ts.更新:新增并修改')}}</div>
<!-- <div class="mt-2">{{ t('ts.追加:只新增,不修改') }}</div>
<div class="mt-2">{{ t('ts.覆盖:只修改不新增') }}</div> -->
</div>
</div>
</div>
<div class="flex mt-16px">
<!-- <div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>{{ t('ts.部分保存') }}</div
>
<div class="">
<div class="switch">
<el-switch v-model="updatePart" />
</div>
<div class="tips color-#acaeb3 font-size-14px">
<div class="mt-2">{{ t('ts.部分保存:如存在错误数据,正确数据正常导入') }}</div>
<div class="mt-2">{{ t('ts.全部保存:全部数据正确,才能导入') }}</div>
</div>
</div> -->
</div>
<div class="flex mt-16px" v-if="isShowOut">
<div
class="label h-32px mr-26px color-#acaeb3 font-size-14px w-100px text-right"
style="line-height: 32px"
>是否外部资源</div
>
<div class="">
<div class="switch">
<el-switch v-model="outFile" />
</div>
</div>
</div>
</div>
</template>
</el-upload>
<template #footer>
<div class="flex items-center">
<div class="flex-1 text-left">
<!-- <el-button type="primary" plain @click="importTemplate">
<Icon icon="ep:download" />
{{ t('ts.下载模板') }}
</el-button> -->
</div>
<el-button :disabled="formLoading" type="primary" @click="submitForm">{{ t('ts.确 ') }}</el-button>
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button>
</div>
</template>
</Dialog>
</template>
<script lang="ts" setup>
import { getAccessToken, getTenantId } from '@/utils/auth'
import download from '@/utils/download'
defineOptions({ name: 'ImportDetailForm' })
const { t } = useI18n()
const message = useMessage() //
const dialogVisible = ref(false) //
const formLoading = ref(false) //
const uploadRef = ref()
const uploadHeaders = ref() // Header
const fileList = ref([]) //
const file = ref('')
const props = defineProps({
importTemplateData: {
type: Object,
required: true
},
//
accept: {
type: String,
required: false,
default: '.xlsx,.xls'
},
// .1
mode: {
type: Number,
required: false,
default: 1
},
// ,
updateIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
appendIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
coverIsDisable: {
type: Boolean,
required: false,
default: false
},
// ,
updatePart: {
type: Boolean,
required: false,
default: false
},
url: {
type: String,
required: false
},
//
isShowOut: {
type: Boolean,
required: false,
default: false
},
outFile: {
type: Boolean,
required: false,
default: false
},
//
extend: {
type: String,
required: false,
default: ''
},
// TODO: cxm
fromInventoryStatus: {
type: String,
required: false,
default: ''
},
// TODO: cxm
toInventoryStatus: {
type: String,
required: false,
default: ''
}
})
const importTemplateData = ref(props.importTemplateData)
const accept = ref(props.accept)
const mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //,
const appendIsDisable = ref(props.appendIsDisable) //,
const coverIsDisable = ref(props.coverIsDisable) //,
const updatePart = ref(props.updatePart) //
const outFile = ref(props.outFile) //
const importUrl = import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
resetForm()
}
defineExpose({ open }) // open
/** 提交表单 */
const submitForm = async () => {
if (fileList.value.length == 0) {
message.error('请上传文件')
return
}
file.value = fileList.value[0].name
//
uploadHeaders.value = {
Authorization: 'Bearer ' + getAccessToken(),
'tenant-id': getTenantId()
}
formLoading.value = true
uploadRef.value!.submit()
}
/** 文件上传成功 */
const emits = defineEmits(['success'])
const submitFormSuccess = (response: any) => {
formLoading.value = true
console.log(response)
if (response) {
if (response.code == 500) {
uploadRef.value!.clearFiles()
message.error('导入失败')
formLoading.value = false
return
} else if (response.code == 0) {
if (response.data.errorCount > 0) {
message.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(() => {
// download.excel(file, 'file_' + new Date().getTime())
// url
// const downloadElement = document.createElement('a')
// console.log(172, import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + '/' + response.data.errorFile)
// console.log(172, import.meta.env.VITE_BASE_URL + '/admin-api/opt/profile/' + response.data.errorFile)
window.open(
import.meta.env.VITE_BASE_URL + '/admin-api' + response.data.errorFile,
'222'
)
// downloadElement.setAttribute('href', import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + response.data.errorFile )
//
// downloadElement.click()
})
} else {
message.success('导入成功')
}
}else if(response.data == null){
message.error(response.msg)
}
}
// if (response.code !== 0) {
// message.error(response.msg)
// formLoading.value = false
// return
// }
// //
// const data = response.data
// const create = response.data.importResult[0]
// const update = response.data.importResult[1]
// const failure = response.data.importResult[2]
// let text = '' + data[create].length + ';'
// for (let name of data[create]) {
// text += '< ' + name + ' >'
// }
// text += '' + data[update].length + ';'
// for (const name of data[update]) {
// text += '< ' + name + ' >'
// }
// text += '' + Object.keys(data[failure]).length + ';'
// for (const name in data[failure]) {
// text += '< ' + name + ': ' + data[failure][name] + ' >'
// }
// message.alert(text)
//
formLoading.value = false
emits('success')
dialogVisible.value = false
}
/** 上传错误提示 */
const submitFormError = (): void => {
message.error('上传失败,请您重新上传!')
formLoading.value = false
}
/** 重置表单 */
const resetForm = () => {
//
formLoading.value = false
uploadRef.value?.clearFiles()
fileList.value = []
}
/** 文件数超出提示 */
const handleExceed = (): void => {
message.error('最多只能上传一个文件!')
}
/** 下载模板操作 */
const importTemplate = () => {
const res = importTemplateData.value.templateUrl
download.excel(res, importTemplateData.value.templateTitle)
}
</script>
<style scoped lang="scss">
.tips {
div {
position: relative;
padding-left: 22px;
&::before {
width: 4px;
height: 4px;
border-radius: 50%;
content: '';
background: #c2c2c2;
position: absolute;
top: 50%;
margin-top: -2px;
left: 4px;
}
}
}
</style>

18
src/locales/en-US.ts

@ -1097,17 +1097,21 @@ export default {
:'Please input the supplier batch',
:'Option Date',
:'Please input comment',
// 格式为…的文件:The format is... File of
1:'Please input package specification1',
1:'Please input package quantity1',
2:'Please input package specification2',
2:'Please input package quantity2',
:'submit for approval'
:'submit for approval',
// 系统管理:'system management',
// 基础设施:'infrastructure',
// 报表管理:'report manager',
// 报表:'statement',
// 富维海拉供应商管理系统:'vendor management system',
:'Please enter your username',
:'Please enter email',
:'Forget Password',
:'User Name',
:'Mail',
},

15
src/locales/zh-CN.ts

@ -1097,14 +1097,21 @@ export default {
:'请输入供应商批次',
:'选择日期',
:'请输入备注',
// 格式为…的文件:The format is... File of
1:'请输入包装规格1',
1:'请输入包装数量1',
2:'请输入包装规格2',
2:'请输入包装数量2',
:'提交审批'
:'提交审批',
:'系统管理',
:'基础设施',
:'报表管理',
:'报表',
:'富维海拉供应商管理系统',
:'请输入用户名',
:'请输入邮箱',
:'忘记密码',
:'用户名',
:'邮箱',

12
src/views/login/forgetPassword.vue

@ -1,22 +1,22 @@
<template>
<div v-loading="loading" class="box">
<el-form ref="formSmsLogin" :model="loginData" :rules="rules" label-width="130px" label-position="top" size="large">
<div class="title">忘记密码</div>
<div class="title">{{ t('ts.忘记密码') }}</div>
<el-row type="flex" justify="center" align="middle">
<el-col>
<el-form-item label="用户名" prop="username" align="center">
<el-input v-model="loginData.username" placeholder="请输入用户名" />
<el-form-item :label="t('ts.用户名')" prop="username" align="center">
<el-input v-model="loginData.username" :placeholder="t('ts.请输入用户名')" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="邮箱" prop="email">
<el-input v-model="loginData.email" placeholder="请输入邮箱" />
<el-form-item :label="t('ts.邮箱')" prop="email">
<el-input v-model="loginData.email" :placeholder="t('ts.请输入邮箱')" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;"> </el-button>
<el-button type="primary" @click="submitForm" style="width: 100%;height: 40px;line-height: 40px;">{{t('ts.确 定')}}</el-button>
</div>
</div>
</template>

20
src/views/mes/holiday/holiday.data.ts

@ -1,8 +1,17 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
// 表单校验
export const HolidayRules = reactive({
holidayName: [
{ required: true, message: '请输入节日名称', trigger: 'blur' }
],
holidayType: [
{ required: true, message: '请输入节日类型', trigger: 'blur' }
],
holidayDate: [
{ required: true, message: '请输入节日日期', trigger: 'blur' }
],
})
export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
@ -10,7 +19,9 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
label: '主键',
field: 'id',
sort: 'custom',
isForm: false,
isSearch: false,
isTable:false,
isForm:false
},
@ -56,13 +67,13 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
label: '节日日期',
field: 'holidayDate',
sort: 'custom',
formatter: dateFormatter,
formatter: dateFormatter2,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
type: 'date',
valueFormat: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD 00:00:00',
}
},
form: {
@ -72,6 +83,7 @@ export const Holiday = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x'
}
},
},
{
label: '状态',

6
src/views/mes/processroute/components/configDialog.vue

@ -189,6 +189,7 @@ const tableProcess = ref()
const productData = ref({ name: '', code: '', desc1: '--' }) //
const materialData=ref()
const mouldData = ref()
//const bomVersion=ref()
const page=ref({
total:0,
current:1,
@ -327,6 +328,7 @@ const getProcessBomList = async (pcode,processCode) => {
processCode:processCode
}
return await ProcessrouteApi.getProcessBomList(params);
//return await ProcessrouteApi.getBomListByProductBomAndProcess(params);
}
/** 查询模具基本信息列表 */
const getPatternPage = async (code) => {
@ -363,10 +365,10 @@ const nodeClick = (e, x, y, node, view) => {
currentNode.value.name=node.attrs.title.text
Promise.all([
getProcessInfo(node.id),
getProcessBomList(productCode.value,node.id),
getProcessBomList(productCode.value,node.id),// rowData.value
getPatternPage(node.id),
getWorkstationPage(node.id)
]).then(([processInfoList,basicBom, patternPage,workstationInfoList]) => {
]).then(([processInfo,basicBom, patternPage,workstationInfoList]) => {
//
//message.info(JSON.stringify(processIndoList))
//console.log('basicBom',basicBom)

7
src/views/mes/processroute/processroute.data.ts

@ -97,6 +97,13 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
// {
// label: 'BOM版本号',
// field: 'BOMVersion',
// sort: 'custom',
// value: '1',
// isSearch: false,
// },
// {
// label: '版本号',
// field: 'routeVersion',

48
src/views/mes/workcalendar/index.vue

@ -59,7 +59,7 @@
</el-aside>
<el-main>
<div class="calender-class">
<el-calendar ref="calendarMain">
<el-calendar ref="calendarMain" :key="calendarCount">
<template #header="{ date }">
<span>排班日历</span>
<span>{{ date }}</span>
@ -151,7 +151,7 @@
<el-drawer :title="batchTitle" v-model="batchAddDrawer" size="40%">
<div class="demo-drawer_content">
<el-form v-model="batchAddForm">
<el-form-item label="排班日期:" label-width="120px">
<el-form-item label="排班日期:" >
<el-date-picker
v-model="batchAddForm.batchDate"
value-format="YYYY-MM-DD"
@ -162,7 +162,7 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="规则类型:" label-width="120px">
<el-form-item label="规则类型:" >
<!-- <el-button type="primary" @click="addDomain" link> <Icon icon="ep:plus" /> </el-button> -->
<el-radio-group v-model="ruleType" @change="handleRuleType">
<el-radio label="一班倒">一班倒</el-radio>
@ -170,7 +170,7 @@
<el-radio label="三班倒">三班倒</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="排除非法定休息日:" label-width="120px">
<el-form-item label="排除非法定休息日:">
<el-switch v-model="batchAddForm.excludeRestDay" />
</el-form-item>
@ -329,7 +329,7 @@ interface Team {
name: string
class: string
}
const calendarCount=ref(0)
const currentRow = ref() //
const handleTableCurrentChange = (val: Team) => {
currentRow.value = val
@ -414,6 +414,12 @@ watch(
}
}
)
// watch(
// () => viewDate.value,
// (newVal) => {
// console.log('🚀 ~ file: workcalendar:420 ~ watch ~ viewDate:', newVal)
// }
// )
onMounted(
async function () {
let res=await workCalendarApi.getHolidays(dayjs(currentDate.value).year())
@ -573,9 +579,15 @@ const addWork = () => {
saveList.push(info)
})
//console.log('🚀 ~ file: App.vue:571 ~ addWork ~ saveList:', saveList)
savePlan(saveList)
getViewData(currentRow.value.code, hanleDay.value.day, hanleDay.value.day)
savePlan(saveList,currentRow.value.code, hanleDay.value.day.slice(0, 8) + '01', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
//nextTick(() => {
//getViewData(currentRow.value.code, hanleDay.value.day.slice(0, 8) + '01', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
///})
//getViewData(currentRow.value.code, hanleDay.value.day, hanleDay.value.day)
//console.log('🚀 ~ file: App.vue:571 ~ addWork ~ saveList:', dayjs(hanleDay.value.day).endOf('month').format('YYYY-MM-DD'))
drawer.value = false
}
@ -650,8 +662,8 @@ const batchAddWork = () => {
}
})
savePlan(saveList)
getViewData(currentRow.value.code, dateList[0], dateList[1])
savePlan(saveList,currentRow.value.code, dateList[0], dateList[1])
//getViewData(currentRow.value.code, dateList[0], dateList[1])
batchAddDrawer.value = false
batchAddForm.value = {
batchDate: [],
@ -665,8 +677,11 @@ const handleAddClose = () => {
drawer.value = false
}
const savePlan = async (workList) => {
const savePlan = async (workList, code,startTime,endTime) => {
await workCalendarApi.createBatch(workList)
nextTick(() => {
getViewData( code,startTime,endTime)
})
//await workCalendarApi.createObj(workList);
}
const getViewData = async (teamCode: any, startDate: any, endDate: any) => {
@ -676,8 +691,12 @@ const getViewData = async (teamCode: any, startDate: any, endDate: any) => {
endTime: endDate
}
let res = await workCalendarApi.getWorkPlan(params)
//onsole.log('🚀 ~ file: App.vue:689 ~ getViewData ~ getViewData:',res)
viewDate.value = res
calendarCount.value++
// })
//if(res)
viewDate.value = res
//workInfoList.value =viewDate.value
//console.log('🚀 ~ file: App.vue:672 ~ getViewData ~ getViewData:', viewDate.value)
}
@ -726,7 +745,7 @@ const getTeamList = async () => {
//
const handleDelete=(row:any)=>{
message.delConfirm('确认要删除['+row.name+']班组当月排班数据吗?', 'Warning').then(() => {
message.delConfirm('确认要删除['+row.name+']班组当月排班数据吗?', '警告').then(() => {
//console.log('🚀 ~ file: App.vue:720 ~ handleDelete ~ :', dayjs(currentDate.value).endOf('month').format('YYYY-MM-DD'))
deleteWorkPlan(row.code,currentDate.value.slice(0, 8) + '01', dayjs(currentDate.value).endOf('month').format('YYYY-MM-DD'))
@ -742,10 +761,11 @@ const deleteWorkPlan=async (code:any,startTime:any,endTime:any)=>{
startTime:startTime,
endTime: endTime
}
console.log('🚀 ~ file: App.vue:720 ~ deleteWorkPlan ~ :', data)
//console.log('🚀 ~ file: App.vue:720 ~ deleteWorkPlan ~ :', data)
workCalendarApi.deleteWorkPlan(data)
getViewData(code, startTime,endTime)
}
</script>
<style>

36
src/views/wms/countManage/count/countJobMain/index.vue

@ -64,6 +64,19 @@
:searchTableParams="searchTableParams"
:apiPage="CountJobDetailApi.getCountJobDetailPage"
/>
<!-- 导入 -->
<ImportDetailForm
ref="importFormRef"
url="/wms/count-job-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="1"
:extend="rowMasterIdRef"
/>
</template>
<script setup lang="ts">
@ -191,7 +204,7 @@ const butttondata = (row,$index) => {
label: '导出',
name: 'exportCountJob',
hide: isShowMainButton(row,['1','2']),
type: 'success',
type: 'primary',
color: '',
link: true, //
hasPermi: '' // wms:count-job-main:exportCountJob
@ -222,6 +235,8 @@ const buttonTableClick = async (val, row) => {
console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number)
} else if( val == 'importCountJob'){ //
handleImport(row.masterId)
}
}
@ -273,6 +288,25 @@ const handleExportCountJob = async (id: number,number: string) => {
}
}
/** 导入 */
const importFormRef = ref()
const rowMasterIdRef = ref('')
const handleImport = (id: string) => {
rowMasterIdRef.value = id;
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '盘点任务导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

29
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -82,8 +82,33 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const tableColumns = ref([...DeliverJobMain.allSchemas.tableColumns,...DeliverJobDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverJobDetailApi.getDeliverJobDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverJobMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货任务'
} else if ( routeName.value == 'ZZBJDeliverJobMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货任务'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -128,10 +153,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: DeliverJobDetailApi.getDeliverJobDetailPage //
})
//
const { getList, setSearchParams } = tableMethods

28
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue

@ -78,16 +78,38 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const tableColumns = ref([...DeliverRecordMain.allSchemas.tableColumns,...DeliverRecordDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverRecordMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货记录'
} else if ( routeName.value == 'ZZBJDeliverRecordMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货记录'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRecordDetailApi.getDeliverRecordDetailPage //
})
//
const { getList, setSearchParams } = tableMethods

22
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -698,16 +698,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
},
form: {
componentProps: {
@ -716,16 +707,7 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
}
}
},

113
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -84,7 +84,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/deliver-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend= "businessType"/>
</template>
<script setup lang="ts">
@ -107,10 +107,34 @@ routeName.value = route.name
const tableColumns = ref([...DeliverRequestMain.allSchemas.tableColumns,...DeliverRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
// //
const trueFalse = ref(false)
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRequestDetailApi.getDeliverRequestDetailPage //
})
//
/**
* DeliverRequestMain 成品发货申请
*/
if ( routeName.value == 'DeliverRequestMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货申请'
} else if ( routeName.value == 'ZZBJDeliverRequestMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货申请'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -139,54 +163,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV[formField] = val[0][searchField]
if(formField == 'deliverPlanNumber') {
setV['deliverPlanNumber'] = val[0]['number']
// if(setV['deliverPlanNumber'] != null){
// isShowButton.value = false
// }
setV['customerCode'] = val[0]['customerCode']
// getBomDisassemble
// DeliverPlanDetailApi.selectDetailByMasterID(val[0]['id'])
// .then(res => {
// res.forEach(item => {
// item.qty = item.planQty
// })
// if (res) tableData.value = res
// // tableform
// DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'itemCode') {
// item.isInpuFocusShow = false
// item.tableForm.isInpuFocusShow = false
// item.tableForm.disabled = true
// }
// if(item.field == 'uom') {
// item.tableForm.disabled = true
// }
// })
// // tableform
// if(formField == 'customerCode'){
// console.log(1111,val);
// customerCode.value = val[0]['code']
// console.log(11112,customerCode.value);
// }
// DeliverRequestMain.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'customerDockCode') {
// item.tableForm.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]
// item.form.componentProps.searchCondition = [
// {
// key: 'customerCode',
// value: customerCode.value ,
// isMainValue: true
// }]}
// else {
// delete item.tableForm.searchCondition
// delete item.form.componentProps.searchCondition
// }
// })
// })
if(formField == 'itemCode'){
console.log( val[0]);
row['uom'] = val[0]['customerUom']
@ -212,10 +189,23 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
const { tableObject, tableMethods } = useTable({
getListApi: DeliverRequestDetailApi.getDeliverRequestDetailPage //
})
// tableform
DeliverRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType.value ,
isMainValue: false
},]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType.value,
isMainValue: false
}]
}
})
//
const { getList, setSearchParams } = tableMethods
@ -457,8 +447,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await DeliverRequestMainApi.exportDeliverRequestMain(tableObject.params)
download.excel(data, '发货申请主.xlsx')
if(routeName.value == 'DeliverRequestMain'){
const data = await DeliverRequestMainApi.exportDeliverRequestMain(tableObject.params)
download.excel(data, '发货申请主.xlsx')
}else{
const data = await DeliverRequestMainApi.exportZZBJDeliverRequestMain(tableObject.params)
download.excel(data, '自制备件发货申请主.xlsx')
}
} catch {
} finally {
exportLoading.value = false
@ -496,11 +491,13 @@ const submitForm = async (formType, data) => {
let rs = tableData.value.filter(filterItem => (filterItem.itemCode == item.itemCode))
if(rs.length > 1) isExist = true
})
data.businessType = businessType.value
console.log(data);
if (isExist) {
formRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach(obj => {
data.subList.forEach(obj => {
if(obj.qty == 0){
message.warning(`数量不能为0!`)
flag.value = true
@ -542,7 +539,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '发货申请主导入模版.xlsx'
templateTitle: importFileName.value + '.xlsx'
})
//

22
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -555,16 +555,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
},
form: {
componentProps: {
@ -573,16 +564,7 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'itemCode',
searchTitle: '客户物料基础信息',
searchAllSchemas: Customeritem.allSchemas,
searchPage: CustomerItemApi.getCustomeritemPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'customerCode',
value: 'customerCode',
isMainValue: true
}]
searchPage: CustomerItemApi.getPageBusinessTypeToItemCode,
}
}
},

60
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -77,7 +77,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/deliver-plan-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend= "businessType"/>
</template>
<script setup lang="ts">
@ -96,9 +96,35 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const importFileName = ref()
console.log(99 , routeName.value)
const customerCode = ref()
const tableColumns = ref([...DeliverPlanMain.allSchemas.tableColumns,...DeliverPlanDetail.allSchemas.tableMainColumns])
const { tableObject, tableMethods } = useTable({
getListApi: DeliverPlanDetailApi.getDeliverPlanDetailPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'DeliverPlanMain') {
tableObject.params = {
businessType: 'Deliver'
}
businessType.value = 'Deliver'
importFileName.value = '成品发货计划'
} else if ( routeName.value == 'ZZBJDeliverPlanMain') {
tableObject.params = {
businessType: 'ZZBJDeliver'
}
businessType.value = 'ZZBJDeliver'
importFileName.value = '自制备件发货计划'
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -161,14 +187,28 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
// tableform
DeliverPlanDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'itemCode') {
item.tableForm.searchCondition = [
{
key: 'businessType',
value: businessType.value ,
isMainValue: false
},]
item.form.componentProps.searchCondition = [
{
key: 'businessType',
value: businessType.value,
isMainValue: false
}]
}
})
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: DeliverPlanDetailApi.getDeliverPlanDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
@ -360,8 +400,13 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await DeliverPlanMainApi.exportDeliverPlanMain(tableObject.params)
download.excel(data, '发货计划主.xlsx')
if(routeName.value == 'DeliverRequestMain'){
const data = await DeliverPlanMainApi.exportDeliverPlanMain(tableObject.params)
download.excel(data, '发货计划主.xlsx')
}else{
const data = await DeliverRequestMainApi.exportZZBJDeliverPlanMain(tableObject.params)
download.excel(data, '自制备件发货计划主.xlsx')
}
} catch {
} finally {
exportLoading.value = false
@ -394,6 +439,7 @@ const flag = ref(false)
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.businessType = businessType.value
//
let isExist = false
tableData.value.forEach(item => {

2
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -63,7 +63,7 @@
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>

2
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -63,7 +63,7 @@
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -66,7 +66,7 @@
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>
<!-- 详情 -->

2
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -67,7 +67,7 @@
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -29,7 +29,7 @@
:clearable="true"
style="width: 100%"
:disabled="true"
placeholder="选择日期"/>
:placeholder="t('ts.选择日期')"/>
</template>
</BasicForm>
</template>

Loading…
Cancel
Save