ljlong_2630 6 days ago
parent
commit
8d7933589b
  1. 11
      src/api/wms/customerStatementDetail/index.ts
  2. 2
      src/api/wms/customerStatementMain/index.ts
  3. 31
      src/api/wms/customerStatementShareRecordDetail/index.ts
  4. 29
      src/api/wms/customerToolApportStatementForecastDetail/index.ts
  5. 15
      src/api/wms/customerToolApportStatementForecastMain/index.ts
  6. 4
      src/api/wms/purchaseClaimRequestDetail/index.ts
  7. 50
      src/components/Detail/src/Detail.vue
  8. 468
      src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue
  9. 1
      src/utils/dict.ts
  10. 9
      src/utils/formatTime.ts
  11. 6
      src/views/wms/basicDataManage/customerManage/customerdock/index.vue
  12. 22
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  13. 7
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue
  14. 46
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts
  15. 39
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  16. 45
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
  17. 71
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
  18. 221
      src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts
  19. 251
      src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/index.vue
  20. 96
      src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts
  21. 173
      src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue
  22. 1
      src/views/wms/inventoryManage/balance/index.vue
  23. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue
  24. 2
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts
  25. 14
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  26. 2
      src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/index.vue
  27. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  28. 4
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts
  29. 13
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts
  30. 24
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue
  31. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  32. 11
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

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

@ -111,6 +111,17 @@ export const exportCustomerStatementCompareDetail = async (params) => {
} }
} }
//导出详情模具分摊对账单列表数据 需要传masterId
export const exportCustomerStatementShareReconciliatioDetail = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-detail/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel`, params })
}
}
// 客户模具分摊对账单修改调整金额 // 客户模具分摊对账单修改调整金额
export const updateAdjustmentAmount = async (id: number, masterId: number, amount: number) => { export const updateAdjustmentAmount = async (id: number, masterId: number, amount: number) => {

2
src/api/wms/customerStatementMain/index.ts

@ -107,7 +107,7 @@ export const getCustomerList = async () => {
export const exportCustomerStatementMain = async (params) => { export const exportCustomerStatementMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = {...params} const data = {...params}
return await request.downloadPost({ url: `/eam/basic-eam-workshop/export-excel-senior`, data }) return await request.downloadPost({ url: `/wms/customer-statement-main/export-excel-senior`, data })
}else{ }else{
return await request.download({ url: `/wms/customer-statement-main/export-excel`, params }) return await request.download({ url: `/wms/customer-statement-main/export-excel`, params })
} }

31
src/api/wms/customerStatementShareRecordDetail/index.ts

@ -0,0 +1,31 @@
import request from '@/config/axios'
export const getCustomerStatementShareRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customer-tool-apport-statement-detail/seniorGroup', data })
} else {
return await request.get({ url: `/wms/customer-tool-apport-statement-detail/pageGroup`, params })
}
}
export const getCustomerStatementShareRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customer-tool-apport-statement-detail/seniorDetail', data })
} else {
return await request.get({ url: `/wms/customer-tool-apport-statement-detail/pageDetail`, params })
}
}
export const exportCustomerStatementShareRecordDetail = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-detail/export-excel-senior-detail`, data })
}else{
return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel-detail`, params })
}
}

29
src/api/wms/customerToolApportStatementForecastDetail/index.ts

@ -25,6 +25,18 @@ export const getCustomerToolApportStatementForecastDetailPage = async (params) =
} }
} }
// 查询预测与对账单差异
export const getCustomerToolApportStatementForecastComparisonPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/tool-apport-statement-forecast-comparison/senior', data })
} else {
return await request.get({ url: `/wms/tool-apport-statement-forecast-comparison/page`, params })
}
}
// 查询客户模具分摊对账单预测子表(WMS)详情 // 查询客户模具分摊对账单预测子表(WMS)详情
export const getCustomerToolApportStatementForecastDetail = async (id: number) => { export const getCustomerToolApportStatementForecastDetail = async (id: number) => {
return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/get?id=` + id }) return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/get?id=` + id })
@ -47,7 +59,24 @@ export const deleteCustomerToolApportStatementForecastDetail = async (id: number
// 导出客户模具分摊对账单预测子表(WMS) Excel // 导出客户模具分摊对账单预测子表(WMS) Excel
export const exportCustomerToolApportStatementForecastDetail = async (params) => { export const exportCustomerToolApportStatementForecastDetail = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params })
}
}
// 导出预测与对账单差异 Excel
export const exportCustomerToolApportStatementForecastComparisonDetail = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板

15
src/api/wms/customerToolApportStatementForecastMain/index.ts

@ -43,10 +43,25 @@ export const deleteCustomerToolApportStatementForecastMain = async (id: number)
// 导出客户模具分摊对账单预测主表(WMS) Excel // 导出客户模具分摊对账单预测主表(WMS) Excel
export const exportCustomerToolApportStatementForecastMain = async (params) => { export const exportCustomerToolApportStatementForecastMain = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel-senior`, data })
}else{
return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params }) return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/customer-tool-apport-statement-forecast-main/get-import-template' }) return request.download({ url: '/wms/customer-tool-apport-statement-forecast-main/get-import-template' })
} }
// 导入客户对账单前校验是否有相同客户代码和年月的数据存在
export const verifyDataExist = async (yearsMonthStr: String,customerCode:String) => {
return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&customerCode='+customerCode })
}
// 客户对账单重新比对
export const recontrast = async (id: number) => {
return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/recontrast?id=` + id})
}

4
src/api/wms/purchaseClaimRequestDetail/index.ts

@ -13,6 +13,10 @@ export const getPurchaseClaimRequestDetailPage = async (params) => {
export const getPurchaseClaimRequestDetailList = async (supplierCode) => { export const getPurchaseClaimRequestDetailList = async (supplierCode) => {
return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaim?supplierCode=` + supplierCode }) return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaim?supplierCode=` + supplierCode })
} }
//获得采购索赔子列表
export const getPurchaseClaimRequestDetailListForUpdate = async (supplierCode, id) => {
return await request.get({ url: `/wms/purchaseClaim-request-detail/getPurchaseclaimForUpdate?supplierCode=${supplierCode}&id=${id}`})
}
// 创建采购索赔子 // 创建采购索赔子
export const createPurchaseClaimRequestDetail = async (data) => { export const createPurchaseClaimRequestDetail = async (data) => {
return await request.post({ url: `/wms/purchaseClaim-request-detail/create`, data }) return await request.post({ url: `/wms/purchaseClaim-request-detail/create`, data })

50
src/components/Detail/src/Detail.vue

@ -385,6 +385,12 @@ const props = defineProps({
required: false, required: false,
default: null default: null
}, },
// tableObject
extendRowKeyValue: {
type: Array,
required: false,
default: null
},
// //
detailButtonIsShowFilter:{ detailButtonIsShowFilter:{
type: Boolean, type: Boolean,
@ -795,6 +801,14 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
tableObjectRef.value.params = { tableObjectRef.value.params = {
masterId: row.masterId||row.id masterId: row.masterId||row.id
} }
if (props.extendRowKeyValue) {
// params
props.extendRowKeyValue.forEach(item => {
tableObject.params[item.key] = row[item.value]
masterParmas.value[item.key] =row[item.value]
})
}
await getList() await getList()
} }
isShowDrawer.value = true isShowDrawer.value = true
@ -946,7 +960,7 @@ const buttonBaseClick = (val, item) => {
}else{ }else{
openForm('create') openForm('create')
} }
} else if (val == 'export') { } else if (val.includes('export')) {
// //
emit('buttonBaseClick',val, item,tableObject) emit('buttonBaseClick',val, item,tableObject)
} else if (val == 'refresh') { } else if (val == 'refresh') {
@ -1139,6 +1153,39 @@ const searchFormClick = async (searchData) => {
? searchData.filters ? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
} }
if (props.extendRowKeyValue) {
// params
props.extendRowKeyValue.forEach(item => {
let findItem = tableObjectRef.value.params.filters.find(item1=>item1.column == [item.key])
if(findItem){
findItem.value = masterParmas.value[item.key]
}else{
tableObjectRef.value.params.filters.push({
column : item.key,
action : "==",
value : masterParmas.value[item.key]
})
}
})
}
if (props.tableObjectExtend) {
props.tableObjectExtend.forEach(item => {
let findItem = tableObjectRef.value.params.filters.find(item1=>item1.column == [item.key])
if(findItem){
findItem.value = item.value
}else{
tableObjectRef.value.params.filters.push({
column : item.key,
action : "==",
value : item.value
})
}
})
}
// const { tableObject, tableMethods } = useTable({ // const { tableObject, tableMethods } = useTable({
// getListApi: props.apiPage // // getListApi: props.apiPage //
// }) // })
@ -1153,6 +1200,7 @@ const searchFormClick = async (searchData) => {
// tableMethodsRef.value = tableMethods // tableMethodsRef.value = tableMethods
// tableObjectRef.value.tableList = [] // tableObjectRef.value.tableList = []
// const { getList } = tableMethods // const { getList } = tableMethods
const { getList } = tableMethodsRef.value
await getList() await getList()
updateKey.value += 1 updateKey.value += 1
// tableObjectRef.value.params = { // tableObjectRef.value.params = {

468
src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue

@ -0,0 +1,468 @@
<!-- 导入客户对账单组件 -->
<template>
<Dialog v-model="dialogVisible" :title="t('ts.导入')" width="600" :close-on-click-modal="false">
<el-form
:inline="true"
:model="queryParams"
class="demo-form-inline"
style="margin-bottom: 10px"
label-width="70px"
>
<el-row>
<el-col :span="12">
<el-form-item label="客户代码">
<el-select
v-model="queryParams.customerCode"
placeholder="请选择客户代码"
clearable
>
<el-option v-for="(item) in customerList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年月">
<el-date-picker
v-model="queryParams.yearsMonthStr"
type="month"
placeholder="选择年月"
format="YYYY-MM"
value-format="YYYY-MM"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-upload
ref="uploadRef"
v-model:file-list="fileList"
:action="
importUrl +
'?yearsMonthStr=' +
queryParams.yearsMonthStr +
'&customerCode=' +
queryParams.customerCode +
'&file=' +
file +
'&updatePart=' +
updatePart +
'&outFile=' +
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus +
dataType
"
: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" v-if="announcements&&announcements.length>0">
<div
class="label h-32px ml-22px mr-26px color-#acaeb3 font-size-14px w-100px text-right mt-2px"
style="line-height: 32px;"
>{{t('ts.注意事项')}}</div
>
<div class="">
<div class="notice color-#acaeb3 font-size-14px text-red">
<div class="mt-2" v-for="item in announcements">{{ item }}</div>
</div>
</div>
</div>
<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" v-show="updateIsShow" :disabled="updateIsDisable">{{ t('ts.更新')}}</el-radio>
<el-radio :label="2" v-show="appendIsShow" :disabled="appendIsDisable">{{ t('ts.追加') }}</el-radio>
<el-radio :label="3" v-show="coverIsShow" :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="verifyData">{{ 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'
import { getBaseUrl } from '@/utils/systemParam'
import * as CustomerApi from '@/api/wms/customer'
import * as CustomerToolApportStatementForecastMainApi from '@/api/wms/customerToolApportStatementForecastMain'
defineOptions({ name: 'ImportForm' })
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
},
//
updateIsShow: {
type: Boolean,
required: false,
default: true
},
// ,
appendIsDisable: {
type: Boolean,
required: false,
default: false
},
//
appendIsShow: {
type: Boolean,
required: false,
default: true
},
// ,
coverIsDisable: {
type: Boolean,
required: false,
default: false
},
//
coverIsShow: {
type: Boolean,
required: false,
default: true
},
// ,
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: ''
},
announcements:{
type: Array,
required: false,
default: []
}
})
const importTemplateData = ref(props.importTemplateData)
const dataType = ref('')
dataType.value = props.importTemplateData.dataType ?'&dataType=' + props.importTemplateData.dataType :''
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 = getBaseUrl() + import.meta.env.VITE_API_URL + props.url
/** 打开弹窗 */
const open = () => {
dialogVisible.value = true
resetForm()
getCustomerList();//
}
defineExpose({ open }) // open
/** 校验数据 */
const verifyData = async () => {
if (queryParams.yearsMonthStr==''||queryParams.yearsMonthStr==null) {
message.error('请选择年月')
return
}
if (queryParams.customerCode==''||queryParams.customerCode==null) {
message.error('请选择客户代码')
return
}
if (fileList.value.length == 0) {
message.error('请上传文件')
return
}
const data = await CustomerToolApportStatementForecastMainApi.verifyDataExist(queryParams.yearsMonthStr,queryParams.customerCode);
console.log('data',data)
if(data.status==0){
submitForm();
}else if(data.status==2){
try {
//
await message.confirm('已存在相同客户编号及年月的对账单,是否确认覆盖?')
//
submitForm();
// await PurchasepriceApi.deletePurchaseprice(id)
// tableObject.loading = false
// message.success(t('common.delSuccess'))
// //
// buttonBaseClick('refresh',null)
} catch {
//
}
}else if(data.status==3){
await message.alertWarning('已存在相同客户编号及年月的对账单,且已提交,无法导入。')
}
}
/** 提交表单 */
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, getBaseUrl() + import.meta.env.VITE_API_URL + '/' + response.data.errorFile)
// console.log(172, getBaseUrl() + '/admin-api/opt/profile/' + response.data.errorFile)
window.open(
getBaseUrl() + '/admin-api' + response.data.errorFile,
'222'
)
// downloadElement.setAttribute('href', getBaseUrl() + 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)
}
const customerList = ref();
const queryParams = reactive({
customerCode: '',
yearsMonthStr: '',
})
const getCustomerList = async () => {//
var param ={}
const list = await CustomerApi.getCustomerListPc(param);
customerList.value = list;
}
</script>
<style scoped lang="scss">
.text-red{
color: var(--el-color-danger);
}
.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>

1
src/utils/dict.ts

@ -411,6 +411,7 @@ export enum DICT_TYPE {
RECEIVE_STATUS = 'receive_status', // 收货确认状态 RECEIVE_STATUS = 'receive_status', // 收货确认状态
LINE_SCRAP_REASON = 'Reason_or_scrapping_of_production_line', // 线边报废原因(现场史力维护的字典) LINE_SCRAP_REASON = 'Reason_or_scrapping_of_production_line', // 线边报废原因(现场史力维护的字典)
CUSTOMER_STATEMENT_TYPE = 'customer_statement_type', // wms客户对账单 模具分摊状态 CUSTOMER_STATEMENT_TYPE = 'customer_statement_type', // wms客户对账单 模具分摊状态
CUSTOMER_TOOL_APPORT_STATEMENT_TYPE = 'customer_tool_apport_statement_type', // wms客户对账单 模具分摊状态
DELIVER_METHOD = 'deliver_method', DELIVER_METHOD = 'deliver_method',
CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type', // 销售开票 CUSTOMER_SALE_INVOICE_TYPE = 'customer_saleInvoice_type', // 销售开票
LEADERSHIP_MATERIAL_TYPE = 'leadership_material_type', LEADERSHIP_MATERIAL_TYPE = 'leadership_material_type',

9
src/utils/formatTime.ts

@ -162,6 +162,15 @@ export const dateFormatter = (row, column, cellValue) => {
} }
return formatDate(cellValue) return formatDate(cellValue)
} }
export const dateFormatterYM = (row, column, cellValue) => {
if (!cellValue) {
return
}
return formatDate(cellValue, 'YYYY-MM')
}
/** /**
* element plus Formatter 使 YYYY-MM-DD HH:mm:ss * element plus Formatter 使 YYYY-MM-DD HH:mm:ss
* *

6
src/views/wms/basicDataManage/customerManage/customerdock/index.vue

@ -214,6 +214,7 @@ const openForm = (type: string, row?: any) => {
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType,data) => {
try {
var isHave =Customerdock.allSchemas.formSchema.some(function (item) { var isHave =Customerdock.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'; return item.field === 'activeTime' || item.field === 'expireTime';
}); });
@ -233,13 +234,16 @@ const formsSuccess = async (formType,data) => {
await CustomerdockApi.updateCustomerdock(data) await CustomerdockApi.updateCustomerdock(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
if (formType === 'create') { if (formType === 'create') {
getList() getList()
}else{ }else{
buttonBaseClick('refresh',null) buttonBaseClick('refresh',null)
} }
} catch {
basicFormRef.value.formLoading = false
}
} }
// //

22
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -37,8 +37,19 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}],
// verificationPage: CustomerApi.getCustomerPage, // tableForm下方输入框校验失去焦点之后是否正确的方法
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true,
}] }]
} },
}, },
isSearch: true isSearch: true
}, },
@ -63,6 +74,15 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}],
// 失去焦点校验参数
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true,
}] }]
} }
}, },

7
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

@ -221,7 +221,8 @@ const openForm = (type: string, row?: any) => {
} }
// form // form
const formsSuccess = async (formType,data) => { const formsSuccess = async (formType, data) => {
try {
var isHave =Customeritem.allSchemas.formSchema.some(function (item) { var isHave =Customeritem.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime'; return item.field === 'activeTime' || item.field === 'expireTime';
}); });
@ -248,6 +249,10 @@ const formsSuccess = async (formType,data) => {
}else{ }else{
buttonBaseClick('refresh',null) buttonBaseClick('refresh',null)
} }
} catch {
basicFormRef.value.formLoading = false
}
} }
const onEnter = async (field,value)=>{ const onEnter = async (field,value)=>{
console.log(field,value) console.log(field,value)

46
src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts

@ -204,29 +204,65 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isDetail:true,
isForm: false,
isTable:false
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isTable:false, search: {
isDetail:true, component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: { detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss' dateFormat : 'YYYY-MM-DD HH:mm:ss'
}, },
isTable:false,
isForm: false,
table:{
width:180
}
},
{
label: '更新者',
field: 'updater',
sort: 'custom',
isDetail:true,
isForm: false, isForm: false,
isTable:false
}, },
{ {
label: '最后更新时间', label: '更新时间',
field: 'updateTime', field: 'updateTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isTable:false, search: {
isDetail:true, component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: { detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss' dateFormat : 'YYYY-MM-DD HH:mm:ss'
}, },
isTable:false,
isForm: false, isForm: false,
table:{
width:180
}
}, },
])) ]))
// 表单校验 // 表单校验

39
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts

@ -38,6 +38,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
fixed: 'left',
table:{ table:{
width:180 width:180
} }
@ -231,6 +232,14 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
width:150 width:150
} }
}, },
{
label: '创建者',
field: 'creator',
sort: 'custom',
isDetail:true,
isForm: false,
isTable:false
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -247,13 +256,37 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss' dateFormat : 'YYYY-MM-DD HH:mm:ss'
}, },
form: { isTable:false,
isForm: false,
table:{
width:180
}
},
{
label: '更新者',
field: 'updater',
sort: 'custom',
isDetail:true,
isForm: false,
isTable:false
},
{
label: '更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', valueFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable:false,
isForm: false, isForm: false,
table:{ table:{
width:180 width:180

45
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts

@ -1,6 +1,22 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum } from '@/utils/validator' import { validateTwoNum } from '@/utils/validator'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
const { t } = useI18n() // 国际化
let custormList = []
try {
custormList = await CustomerSaleInvoiceMainApi.getCustomerList()
if(custormList.length>0){
custormList.unshift({
customerCode:'ALL',
customerName:t('ts.全选'),
})
}
console.log('custormList11',custormList)
} catch (error) {
}
// 表单校验 // 表单校验
export const CustomerStatementMainRules = reactive({ export const CustomerStatementMainRules = reactive({
@ -29,6 +45,22 @@ export const CustomerStatementMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
search:{
component:'Select',
value:custormList.length>1?[custormList[0]['customerCode']]:[],
componentProps: {
showAll:true,// 备用做全选
multiple:true,
// emptyValues:[null, undefined],
valueOnClear:null,
options:custormList.length>0?custormList.map(item=>({
label:item.customerName,
value:item.customerCode
})):[]
}
},
}, },
{ {
label: '客户名称', label: '客户名称',
@ -82,6 +114,11 @@ export const CustomerStatementMain = useCrudSchemas(reactive<CrudSchema[]>([
//value: '',//可以添加默认值 有无都可 //value: '',//可以添加默认值 有无都可
component: 'Select', component: 'Select',
}, },
search:{
componentProps: {
multiple:true
}
},
}, },
{ {
@ -426,6 +463,14 @@ export const CustomerStatementShareReconciliation = useCrudSchemas(reactive<Crud
label: '调整金额', label: '调整金额',
field: 'adjustmentAmount', field: 'adjustmentAmount',
sort: 'custom', sort: 'custom',
form: {
component: 'InputNumber',
value: 0,
componentProps: {
precision: 2
},
}
}, },
])) ]))

71
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

@ -1,11 +1,11 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search ref="seachRef"
:schema="CustomerStatementMain.allSchemas.searchSchema" :schema="CustomerStatementMain.allSchemas.searchSchema"
@search="setSearchParams" @search="searchClick" @reset="searchClick" @onChange="onSearchChange"
@reset="setSearchParams"
/> />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -254,7 +254,7 @@ const butttondata = (row, $index) => {
{ {
label: t('ts.确认对比结果'), label: t('ts.确认对比结果'),
name: 'confirmationContrast', name: 'confirmationContrast',
hide: isShowMainButton(row, ['2']), hide: row.isCompare!='1',
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
@ -273,7 +273,7 @@ const butttondata = (row, $index) => {
{ {
label: t('ts.确认分摊金额'), label: t('ts.确认分摊金额'),
name: 'confirmShareMoney', name: 'confirmShareMoney',
hide: isShowMainButton(row, ['4']), hide: row.isShare!='1',
type: 'primary', type: 'primary',
color: '', color: '',
hasPermi: 'wms:customer-statement-main:confirmationShare', hasPermi: 'wms:customer-statement-main:confirmationShare',
@ -428,7 +428,42 @@ const searchFormClick = (searchData) => {
} }
getList() // getList() //
} }
const seachRef = ref()
const onSearchChange = (field, value)=>{
if(field=='status'){
//
if(value.length>0){
if(value[value.length-1]==''){
//
seachRef.value.setFormValues({
status:['']
})
}else{
seachRef.value.setFormValues({
status:value.filter(item=>item!='')
})
}
}
}
if(field=='customerCode'){
if(value.length>0){
if(value[value.length-1]=='ALL'){
//
seachRef.value.setFormValues({
customerCode:['ALL']
})
}else{
seachRef.value.setFormValues({
customerCode:value.filter(item=>item!='ALL')
})
}
}
}
}
const searchClick = async (data)=>{
console.log('查询',data)
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
@ -592,6 +627,10 @@ const changeTabs = async (item) => {
{ {
key: 'masterId', key: 'masterId',
value: chooseRow.value.id value: chooseRow.value.id
},
{
key: 'status',
value: 0
} }
] ]
apiPage.value = CustomerStatementDetailApi.getCustomerToolApportStatementPage apiPage.value = CustomerStatementDetailApi.getCustomerToolApportStatementPage
@ -636,6 +675,7 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => {
handleExportReconciliation(detailTableObject) handleExportReconciliation(detailTableObject)
} else if (tabCurrent.value.prop == 'ShareReconciliation') { } else if (tabCurrent.value.prop == 'ShareReconciliation') {
// //
handleExportShareReconciliation(detailTableObject)
} }
} else if (val == 'againContrast') { } else if (val == 'againContrast') {
// //
@ -689,7 +729,24 @@ const handleExportDetail = async (detailTableObject) => {
const data = await CustomerStatementDetailApi.exportCustomerStatementDetail( const data = await CustomerStatementDetailApi.exportCustomerStatementDetail(
detailTableObject.params detailTableObject.params
) )
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`) download.excel(data, `客户对账单明细子【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
//
const handleExportShareReconciliation = async (detailTableObject) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerStatementDetailApi.exportCustomerStatementShareReconciliatioDetail(
detailTableObject.params
)
download.excel(data, `模具分摊对账单子${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

221
src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts

@ -0,0 +1,221 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter , dateFormatterYM } from '@/utils/formatTime'
import { validateTwoNum } from '@/utils/validator'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
const { t } = useI18n() // 国际化
let custormList = []
try {
custormList = await CustomerSaleInvoiceMainApi.getCustomerList()
if(custormList.length>0){
custormList.unshift({
customerCode:'ALL',
customerName:t('ts.全选'),
})
}
console.log('custormList11',custormList)
} catch (error) {
}
export const CustomerStatementShareRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
fixed: 'left',
isSearch: true,
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.CUSTOMER_TOOL_APPORT_STATEMENT_TYPE,
dictClass: 'string',
form: {
//value: '',//可以添加默认值 有无都可
component: 'Select',
},
},
{
label: '版本号',
field: 'versionNumber',
sort: 'custom',
isTable: false
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
isSearch: true,
search:{
component:'Select',
value:custormList.length>1?[custormList[0]['customerCode']]:[],
componentProps: {
showAll:true,// 备用做全选
multiple:true,
// emptyValues:[null, undefined],
valueOnClear:null,
options:custormList.length>0?custormList.map(item=>({
label:item.customerName,
value:item.customerCode
})):[]
}
},
},
{
label: '客户名称',
field: 'customerName',
sort: 'custom',
isSearch: false,
},
{
label: '年月',
field: 'yearsMonth',
sort: 'custom',
formatter: dateFormatterYM,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'YYYY-MM'
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
isDetail:true,
isForm: false,
isTable:true
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable:true,
isForm: false,
table:{
width:180
}
},
{
label: '更新者',
field: 'updater',
sort: 'custom',
isDetail:true,
isForm: false,
isTable:false
},
{
label: '更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable:false,
isForm: false,
table:{
width:180
}
},
]))
export const CustomerStatementShareRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '厂家编号',
field: 'factoryCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '厂家名称',
field: 'factoryName',
sort: 'custom',
isForm: false,
},
{
label: '帐票号',
field: 'invoiceNumber',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '品号',
field: 'articleNumber',
sort: 'custom',
isForm: false,
},
{
label: '车型',
field: 'vehicleType',
sort: 'custom',
isForm: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '模具分摊金额',
field: 'amount',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '调整金额',
field: 'adjustmentAmount',
sort: 'custom',
isForm: false,
}
]))

251
src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/index.vue

@ -0,0 +1,251 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search ref="seachRef"
:schema="CustomerStatementShareRecordMain.allSchemas.searchSchema"
@search="searchClick"
@reset="searchClick"
@onChange="onSearchChange"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CustomerStatementShareRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="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"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row, $index }">
<ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="CustomerStatementShareRecordMain.allSchemas"
:detailAllSchemas="CustomerStatementShareRecordDetail.allSchemas"
:extendRowKeyValue = "[{
key:'number',
value:'number'
}]"
:apiPage="CustomerStatementShareRecordDetailApi.getCustomerStatementShareRecordDetailPage"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-record-main:export` })]"
@buttonBaseClick="detailButtonBaseClick"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
CustomerStatementShareRecordMain,
CustomerStatementShareRecordDetail
} from './customerStatementShareRecordMain.data'
import * as CustomerStatementShareRecordDetailApi from '@/api/wms/customerStatementShareRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'CustomerStatementShareRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(CustomerStatementShareRecordMain.allSchemas.tableColumns)
const otherHeadButttonData = ref()
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: CustomerStatementShareRecordDetailApi.getCustomerStatementShareRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
// -
const butttondata = (row, $index) => {
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [
]
}
// -
const buttonTableClick = async (val, row) => {
}
/** 详情操作 */
const detailRef = ref()
const tableObjectExtend = ref([])
const openDetail = (row: any, titleName: any, titleValue: any) => {
tableObjectExtend.value = [{
key: 'number',
value: row.number
}]
detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain')
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importShareTemplateData = reactive({
templateUrl: '',
templateTitle: '模具分摊对账单导入模版.xlsx',
customerId: 0
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
const seachRef = ref()
const onSearchChange = (field, value)=>{
if(field=='customerCode'){
if(value.length>0){
if(value[value.length-1]=='ALL'){
//
seachRef.value.setFormValues({
customerCode:['ALL']
})
}else{
seachRef.value.setFormValues({
customerCode:value.filter(item=>item!='ALL')
})
}
}
}
}
const searchClick = async (data)=>{
console.log('查询',data)
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')})
}
/** 初始化 **/
onMounted(async () => {
getList()
})
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const detailButtonBaseClick = async (val, item, detailTableObject) => {
console.log(val, item, detailTableObject)
if (val == 'export') {
//
handleExportDetail(detailTableObject)
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
//
const handleExportDetail = async (detailTableObject) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerStatementShareRecordDetailApi.exportCustomerStatementShareRecordDetail(
detailTableObject.params
)
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
</script>

96
src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts

@ -1,6 +1,23 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
const { t } = useI18n() // 国际化
let custormList = []
try {
custormList = await CustomerSaleInvoiceMainApi.getCustomerList()
if(custormList.length>0){
custormList.unshift({
customerCode:'ALL',
customerName:t('ts.全选'),
})
}
console.log('custormList11',custormList)
} catch (error) {
}
// 表单校验 // 表单校验
export const CustomerToolApportStatementForecastMainRules = reactive({ export const CustomerToolApportStatementForecastMainRules = reactive({
customerCode: [required], customerCode: [required],
@ -20,6 +37,22 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive<C
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
search:{
component:'Select',
value:custormList.length>1?[custormList[0]['customerCode']]:[],
componentProps: {
showAll:true,// 备用做全选
multiple:true,
// emptyValues:[null, undefined],
valueOnClear:null,
options:custormList.length>0?custormList.map(item=>({
label:item.customerName,
value:item.customerCode
})):[]
}
},
}, },
{ {
label: '客户名称', label: '客户名称',
@ -49,28 +82,61 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive<C
} }
}, },
}, },
// {
// label: '备注',
// field: 'remark',
// sort: 'custom',
// isTable:false
// },
// {
// label: '是否可用默认TRUE',
// field: 'available',
// sort: 'custom',
// isTable:false
// },
{ {
label: '备注', label: '创建者',
field: 'remark', field: 'creator',
sort: 'custom', sort: 'custom',
isDetail:true,
isForm: false,
isTable:true
}, },
{ {
label: '是否可用默认TRUE', label: '创建时间',
field: 'available', field: 'createTime',
sort: 'custom', sort: 'custom',
isTable:false formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable:true,
isForm: false,
table:{
width:180
}
}, },
{ {
label: '创建者', label: '更新者',
field: 'creater', field: 'updater',
sort: 'custom', sort: 'custom',
isDetail:true,
isForm: false,
isTable:false
}, },
{ {
label: '创建时间', label: '更新时间',
field: 'createTime', field: 'updateTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -79,13 +145,21 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive<C
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isTable:false,
isForm: false, isForm: false,
table:{
width:180
}
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable:false, isTable:true,
isDetail:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

173
src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="CustomerToolApportStatementForecastMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search ref="seachRef" :schema="CustomerToolApportStatementForecastMain.allSchemas.searchSchema" @search="searchClick" @reset="searchClick" @onChange="onSearchChange"/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -32,8 +32,8 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row , $index }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -56,7 +56,7 @@
<Detail <Detail
ref="detailRef" ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="CustomerStatementMain.allSchemas" :allSchemas="CustomerToolApportStatementForecastMain.allSchemas"
:detailAllSchemas="DetailAllSchemas" :detailAllSchemas="DetailAllSchemas"
:apiPage="apiPage" :apiPage="apiPage"
:tabsExtend="tabsExtend" :tabsExtend="tabsExtend"
@ -75,15 +75,22 @@
:tableObjectExtend="tableObjectExtend" :tableObjectExtend="tableObjectExtend"
@buttonBaseClick="detailButtonBaseClick" @buttonBaseClick="detailButtonBaseClick"
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/customer-tool-apport-statement-forecast-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportCustomerStatementForecastForm
ref="importFormRef"
url="/wms/customer-tool-apport-statement-forecast-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CustomerToolApportStatementForecastMain,CustomerToolApportStatementForecastMainRules,CustomerToolApportStatementForecastDetail,CustomerToolApportStatementForecastDetailRules,ForecastWithBillDifference } from './customerToolApportStatementForecastMain.data' import { CustomerToolApportStatementForecastMain,CustomerToolApportStatementForecastMainRules,CustomerToolApportStatementForecastDetail,CustomerToolApportStatementForecastDetailRules,ForecastWithBillDifference } from './customerToolApportStatementForecastMain.data'
import * as CustomerToolApportStatementForecastMainApi from '@/api/wms/customerToolApportStatementForecastMain' import * as CustomerToolApportStatementForecastMainApi from '@/api/wms/customerToolApportStatementForecastMain'
import * as CustomerToolApportStatementForecastDetailApi from '@/api/wms/customerToolApportStatementForecastDetail'
import ImportCustomerStatementForecastForm from '@/components/ImportForm/src/ImportCustomerStatementForecastForm.vue'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
@ -92,6 +99,7 @@ import Detail from '@/components/Detail/src/Detail.vue'
import { CustomerStatementMain, CustomerStatementMainRules,CustomerStatementDetail,CustomerStatementDetailRules,CustomerStatementReconciliation,CustomerStatementShareReconciliation} from '../customerStatement/customerStatementMain.data' import { CustomerStatementMain, CustomerStatementMainRules,CustomerStatementDetail,CustomerStatementDetailRules,CustomerStatementReconciliation,CustomerStatementShareReconciliation} from '../customerStatement/customerStatementMain.data'
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerStatementDetailApi from '@/api/wms/customerStatementDetail' import * as CustomerStatementDetailApi from '@/api/wms/customerStatementDetail'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'CustomerToolApportStatementForecastMain' }) defineOptions({ name: 'CustomerToolApportStatementForecastMain' })
@ -125,8 +133,8 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
// getListApi: CustomerToolApportStatementForecastMainApi.getCustomerToolApportStatementForecastMainPage // getListApi: CustomerToolApportStatementForecastMainApi.getCustomerToolApportStatementForecastMainPage //
getListApi: CustomerStatementMainApi.getCustomerStatementMainPage // // getListApi: CustomerStatementMainApi.getCustomerStatementMainPage //
}) })
// //
@ -134,9 +142,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:customerToolApportStatementForecastMain:create'}), // defaultButtons.defaultImportBtn({hasPermi:'wms:customer-tool-apport-statement-forecast-main:import'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:customerToolApportStatementForecastMain:import'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:customer-tool-apport-statement-forecast-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:customerToolApportStatementForecastMain:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -154,7 +161,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
@ -165,12 +173,36 @@ const buttonBaseClick = (val, item) => {
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// - // -
const butttondata = [ const butttondata = (row, $index) => {
defaultButtons.mainListEditBtn({hasPermi:'wms:customerToolApportStatementForecastMain:update'}), // const findIndex = row['masterId']
defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerToolApportStatementForecastMain:delete'}), // ? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
] : -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), //
{
label: t('ts.重新对比'),
name: 'rematch',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:customer-statement-main:recontrast',
link: true //
}]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -178,9 +210,26 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'rematch') {
//
tapRematch(row.id)
}
}
//
const tapRematch = async (id: number) => {
try {
//
await message.confirm(t('ts.是否重新对比'))
await CustomerToolApportStatementForecastMainApi.recontrast(id)
await message.success(t('ts.重新对比成功'))
//
//exportLoading.value = true
} catch {
} finally {
//
await getList()
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
@ -282,17 +331,18 @@ const changeTabs = async (item) => {
key: 'masterId', key: 'masterId',
value: chooseRow.value.id value: chooseRow.value.id
}] }]
apiPage.value = CustomerStatementDetailApi.getCustomerStatementDetailPage apiPage.value = CustomerToolApportStatementForecastDetailApi.getCustomerToolApportStatementForecastDetailPage
DetailAllSchemas.value = CustomerStatementDetail.allSchemas DetailAllSchemas.value = CustomerToolApportStatementForecastDetail.allSchemas
otherHeadButttonData.value = [{ otherHeadButttonData.value = []
label: t(`ts.导出`).replace('ts.', ''), // otherHeadButttonData.value = [{
name: 'exportDetail', // label: t(`ts.`).replace('ts.', ''),
hide: false, // name: 'exportDetail',
type: 'success', // hide: false,
icon: 'ep:download', // type: 'success',
color: '', // icon: 'ep:download',
hasPermi: '' // color: '',
}] // hasPermi: ''
// }]
} else if (item.prop == 'ForecastWithBilltDifference') { } else if (item.prop == 'ForecastWithBilltDifference') {
// //
tabsExtend.value = true tabsExtend.value = true
@ -302,7 +352,7 @@ const changeTabs = async (item) => {
value: chooseRow.value.id value: chooseRow.value.id
}] }]
DetailAllSchemas.value = ForecastWithBillDifference.allSchemas DetailAllSchemas.value = ForecastWithBillDifference.allSchemas
apiPage.value = CustomerStatementMainApi.getCustomerStatementMainPage apiPage.value = CustomerToolApportStatementForecastDetailApi.getCustomerToolApportStatementForecastComparisonPage
otherHeadButttonData.value = [ otherHeadButttonData.value = [
{ {
label: t(`ts.导出`).replace('ts.', ''), label: t(`ts.导出`).replace('ts.', ''),
@ -321,11 +371,72 @@ const changeTabs = async (item) => {
} }
} }
// //
const detailButtonBaseClick = (val, item) => { const detailButtonBaseClick = (val, item, detailTableObject) => {
if (val == 'exportForecastWithBilltDifference') { if (val == 'exportForecastWithBilltDifference') {
// //
handleExportComparisonDetail(detailTableObject)
}else if (val == 'exportDetail') {
//
handleExportDetail(detailTableObject)
}
}
/** 导出按钮操作 */
const handleExportComparisonDetail = async (detailTableObject) => {
console.log('detailTableObject',detailTableObject)
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerToolApportStatementForecastDetailApi.exportCustomerToolApportStatementForecastComparisonDetail(
detailTableObject.params
)
download.excel(data, `预测与对账单差异【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
} }
} }
//
const handleExportDetail = async (detailTableObject) => {
console.log('detailTableObject',detailTableObject)
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerToolApportStatementForecastDetailApi.exportCustomerToolApportStatementForecastDetail(
detailTableObject.params
)
download.excel(data, `客户模具分摊对账单预测明细【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
const seachRef = ref()
const onSearchChange = (field, value)=>{
if(field=='customerCode'){
if(value.length>0){
if(value[value.length-1]=='ALL'){
//
seachRef.value.setFormValues({
customerCode:['ALL']
})
}else{
seachRef.value.setFormValues({
customerCode:value.filter(item=>item!='ALL')
})
}
}
}
}
const searchClick = async (data)=>{
console.log('查询',data)
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

1
src/views/wms/inventoryManage/balance/index.vue

@ -358,6 +358,7 @@ const getLabelDetailPage = async (row, useToPackingNumber) => {
}) })
detatableData1.value = tableObjectPrint.tableList detatableData1.value = tableObjectPrint.tableList
detatableData1.value.forEach(item => { detatableData1.value.forEach(item => {
item.printQty =row.qty
if (!item.batch) { if (!item.batch) {
item.batch = formatDate(new Date(),'YYYYMMDD') item.batch = formatDate(new Date(),'YYYYMMDD')
item['disabled_batch'] = false item['disabled_batch'] = false

2
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue

@ -194,7 +194,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), // defaultButtons.defaultExportBtn({hasPermi:`wms:${routeName.value}:export`}), //
defaultButtons.defaultImportBtn({hide:recordImport.value,hasPermi:`wms:${routeName.value}:import`}), // // defaultButtons.defaultImportBtn({hide:recordImport.value,hasPermi:`wms:${routeName.value}:import`}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

2
src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/inventorymoveRecordMain.data.ts

@ -276,6 +276,7 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
sortTableDefault: 1000,
}, },
{ {
label: '创建者', label: '创建者',
@ -284,6 +285,7 @@ export const InventorymoveRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
sortTableDefault: 1000,
}, },
{ {
label: '最后更新时间', label: '最后更新时间',

14
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -129,6 +129,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isForm: false, isForm: false,
isTable: false,
isDetail: false,
}, },
{ {
label: '申请时间', label: '申请时间',
@ -151,6 +153,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
sortTableDefault: 1001,
}, },
{ {
label: '截止时间', label: '截止时间',
@ -172,6 +175,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x', valueFormat: 'x',
} }
}, },
sortTableDefault: 1001,
}, },
// { // {
// label: '从库区类型范围', // label: '从库区类型范围',
@ -401,6 +405,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
sortTableDefault: 1001,
}, },
{ {
label: '创建者', label: '创建者',
@ -410,7 +415,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isForm: false, isForm: false,
isTable: true isTable: true,
sortTableDefault: 1001,
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -433,7 +439,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
isForm: false, isForm: false,
isTable: false isTable: false,
sortTableDefault: 1001,
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -443,7 +450,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isForm: false, isForm: false,
isTable: false isTable: false,
sortTableDefault: 1001,
}, },
{ {
label: '操作', label: '操作',

2
src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/index.vue

@ -418,7 +418,7 @@ const butttondata = (row,$index) => {
hasPermi: '', hasPermi: '',
link: true // link: true //
}, },
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), // // defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue

@ -217,7 +217,7 @@ const handlerCreatePurchasereceiptRequest = async (number:string) => {
// //
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
//const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken()) //const documentSrc = ref(BASE_URL + '/jmreport/view/884680688168280064?token=' + getAccessToken())
const documentSrc = ref(BASE_URL + '/jmreport/view/932556833517789184?token=' + getAccessToken()) const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + getAccessToken())
const handleDocumentPrint = async (id) => { const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id) window.open(documentSrc.value + '&id=' + id)
} }

4
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts

@ -127,13 +127,13 @@ export const PurchaseClaimRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status', field: 'status',
dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS, dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
isForm:false, isForm:false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true, isSearch: false,
form: { form: {
value: '1', value: '1',
componentProps: { componentProps: {

13
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts

@ -285,9 +285,13 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
}, },
tableForm: { tableForm: {
disabled:true, disabled:true
type: 'Select'
}, },
form: {
componentProps: {
disabled: true,
}
}
}, },
{ {
label: '计量单位', label: '计量单位',
@ -303,6 +307,11 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
disabled:true, disabled:true,
type: 'Select' type: 'Select'
}, },
form: {
componentProps: {
disabled: true,
}
}
}, },
{ {
label: '索赔数量', label: '索赔数量',

24
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

@ -82,6 +82,7 @@
:detailButtonIsShowAdd="false" :detailButtonIsShowAdd="false"
:detailButtonIsShowAddStatusArray="['1','2']" :detailButtonIsShowAddStatusArray="['1','2']"
:isChangeDetailDrawer="['2']" :isChangeDetailDrawer="['2']"
@searchTableSuccessDetail="searchTableSuccessDetail"
@detailOpenForm="detailOpenForm" @detailOpenForm="detailOpenForm"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -190,15 +191,20 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['remark'] = val[0]['remark'] setV['remark'] = val[0]['remark']
setV['uom'] = val[0]['customerUom'] setV['uom'] = val[0]['customerUom']
if (formField == 'itemCode') {
setV['itemName'] = val[0]['itemName']
setV['uom'] = val[0]['supplierUom']
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: `wms:purchaseClaimRequest:create` }), // defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchaseClaimRequest:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: `wms:purchaseClaimRequest:import` }), // defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchaseClaimRequest:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: `wms:purchaseClaimRequest:export` }), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchaseClaimRequest:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -257,23 +263,23 @@ const butttondata = (row, $index) => {
return [ return [
defaultButtons.mainListPlanSubBtn({ defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: `wms:purchaseClaimRequest:sub` hasPermi: 'wms:purchaseClaimRequest:sub'
}), // }), //
defaultButtons.mainListPlanAppBtn({ defaultButtons.mainListPlanAppBtn({
hide: isShowMainButton(row, ['2']), hide: isShowMainButton(row, ['2']),
hasPermi: `wms:purchaseClaimRequest:agree` hasPermi: 'wms:purchaseClaimRequest:agree'
}), // }), //
defaultButtons.mainListPlanTurBtn({ defaultButtons.mainListPlanTurBtn({
hide: isShowMainButton(row, ['2']), hide: isShowMainButton(row, ['2']),
hasPermi: `wms:purchaseClaimRequest:reject` hasPermi: 'wms:purchaseClaimRequest:reject'
}), // }), //
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: `wms:purchaseClaimRequest:update` hasPermi: 'wms:purchaseClaimRequest:update'
}), // }), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3']),hasPhasPermiermi:`wms:purchaseClaimRequest:close`}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3']),hasPermi:'wms:purchaseClaimRequest:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4']),hasPhasPermiermi:`wms:purchaseClaimRequest:reAdd`}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchaseClaimRequest:reAdd'}), //
] ]
} }

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -879,7 +879,6 @@ const openForm = async (type: string, row?: any) => {
if (item.field == 'supplierCode') { if (item.field == 'supplierCode') {
item.componentProps.isSearchList = false item.componentProps.isSearchList = false
item.componentProps.disabled = true item.componentProps.disabled = true
claimDetails(defaultSupplierCode.value)
} }
// //
if (item.field == 'orderType') { if (item.field == 'orderType') {
@ -909,6 +908,7 @@ const openForm = async (type: string, row?: any) => {
} }
} }
}) })
await claimDetailsForUpdate(row.supplierCode,row.id)
} else { } else {
// //
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => { SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
@ -918,7 +918,6 @@ const openForm = async (type: string, row?: any) => {
item.value = defaultSupplierCode.value item.value = defaultSupplierCode.value
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
item.componentProps.disabled = false item.componentProps.disabled = false
claimDetails(defaultSupplierCode.value)
} }
// //
if (item.field == 'orderType') { if (item.field == 'orderType') {
@ -969,6 +968,11 @@ const claimDetailsList = ref([])
const claimDetails = async (supplierCode) => { const claimDetails = async (supplierCode) => {
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode) claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailList(supplierCode)
formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5) formRef.value.formRef.formModel.claimAmount = claimDetailsList.value.map(item => item.claimAmount).reduce((prev, item) => prev + item).toFixed(5)
}
//
const claimDetailsForUpdate = async (supplierCode,id) => {
claimDetailsList.value = await PurchaseClaimRequestDetailApi.getPurchaseClaimRequestDetailListForUpdate(supplierCode,id)
} }
// //
const checkInvoicingCalendar = async () => { const checkInvoicingCalendar = async () => {

11
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -2280,6 +2280,15 @@ export const ClaimDetails = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
{
label: '索赔金额',
field: 'claimQty',
table: {
width: 150
},
tableForm: {
disabled: true
}
},
])) ]))

Loading…
Cancel
Save