Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240924
zhaoxuebing 2 months ago
parent
commit
4491acc587
  1. 14
      src/api/wms/productreceiptRecordMain/index.ts
  2. 2
      src/locales/en-US.ts
  3. 2
      src/locales/zh-CN.ts
  4. 4
      src/views/qms/inspectionJob/addForm.vue
  5. 34
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  6. 2
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  7. 20
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  8. 16
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  9. 18
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  10. 119
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  11. 516
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  12. 2
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  13. 1527
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMain.data.ts
  14. 12
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  15. 12
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue
  16. 455
      src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue
  17. 1864
      src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts

14
src/api/wms/productreceiptRecordMain/index.ts

@ -86,14 +86,14 @@ export const deleteProductreceiptRecordMain = async (id: number) => {
// 导出制品收货记录主 Excel // 导出制品收货记录主 Excel
export const exportProductreceiptRecordMain = async (params) => { export const exportProductreceiptRecordMain = async (params) => {
params.type = 'predict' // params.type = 'predict'
if (params.isSearch) { if (params.isSearch) {
const cmd = { // const cmd = {
'column':'type', // 'column':'type',
'action':'==', // 'action':'==',
'value':'predict' // 'value':'predict'
} // }
params.filters.push(cmd) // params.filters.push(cmd)
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data })

2
src/locales/en-US.ts

@ -1148,6 +1148,8 @@ export default {
'确 认':'Confirm', '确 认':'Confirm',
:'Please enter the reason for rejection', :'Please enter the reason for rejection',
:'View details', :'View details',
:'unread',
:'read',
:'All read', :'All read',
'申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped', '申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped',
:'Oversend is not allowed', :'Oversend is not allowed',

2
src/locales/zh-CN.ts

@ -1151,6 +1151,8 @@ export default {
'确 认':'确 认', '确 认':'确 认',
:'请输入拒收原因', :'请输入拒收原因',
:'查看明细', :'查看明细',
:'未读',
:'已读',
:'全部已读', :'全部已读',
'申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量', '申请发货数量不能大于 计划数量 - 已发货数量':'申请发货数量不能大于 计划数量 - 已发货数量',
:'不允许超发', :'不允许超发',

4
src/views/qms/inspectionJob/addForm.vue

@ -184,7 +184,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item <el-form-item
label="每份样品量" label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
@ -199,7 +199,7 @@
/> />
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
label="是否允许修改特征值" label="是否允许修改特征值"

34
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -1122,23 +1122,23 @@ export const CustomerreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable:false, // isTable:false,
tableForm: { // tableForm: {
disabled: false // disabled: false
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

2
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -153,7 +153,7 @@ const butttondata = (row, $index) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-record:delete'}), //
defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-request:abort',hide:(row.revokeFlag=='TRUE'||row.relateRecordNumber != null ) }), // defaultButtons.mainListAbortBtn({hasPermi:'wms:sale-shipment-main-record:abort',hide:(row.revokeFlag=='TRUE') }), //
] ]
} }

20
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -400,14 +400,14 @@ export const ScrapJobMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // }
}, // },
{ {
label: '通知单描述', label: '通知单描述',
field: 'noticeRemark', field: 'noticeRemark',
@ -642,7 +642,7 @@ export const ScrapJobMain = useCrudSchemas(
}, },
{ {
label: '承接人', label: '承接人',
field: 'acceptUserId', field: 'acceptUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -670,7 +670,7 @@ export const ScrapJobMain = useCrudSchemas(
}, },
{ {
label: '完成人', label: '完成人',
field: 'completeUserId', field: 'completeUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

16
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -381,14 +381,14 @@ export const ScrapRecordMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{ // {
label: '部门', // label: '部门',
field: 'departmentCode', // field: 'departmentCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
} // }
}, // },
// { // {
// label: '接口类型', // label: '接口类型',
// field: 'interfaceType', // field: 'interfaceType',

18
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -852,12 +852,18 @@ export const IssueRequestDetail = useCrudSchemas(
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}, },
// ,{ {
// key:'productionLineCode', key:'workshopCode',
// value:'productionLineCode', value:'workshopCode',
// message: '请填写生产线代码!', message: '请填写车间代码!',
// isMainValue: true isMainValue: true
// }, },
{
key:'productionLineCode',
value:'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},
{ {
key: 'businessTypeCode', key: 'businessTypeCode',
value: 'Issue', value: 'Issue',

119
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionreturnRequestMainRules" :rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas" :formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -59,6 +59,7 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@clearSearchInput="clearSearchInput"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -88,7 +89,7 @@
:isShowButton="false" :isShowButton="false"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
/> />
@ -183,9 +184,28 @@ const isItemType = async (itemCode, labelTypeParams) => {
if (!isType) labelType.value = labelTypeOld if (!isType) labelType.value = labelTypeOld
return isType return isType
} }
const clearSearchInput = (formField) => {
if(formField=='workshopCode'){
//
formRef.value.formRef.setValues({
productionLineCode:'',//线
workStationCode:'',//
fromLocationCode:'',//
})
tableData.value = []
}else if(formField=='productionLineCode'){
//线
formRef.value.formRef.setValues({
workStationCode:'',//
fromLocationCode:'',//
})
tableData.value = []
}
}
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccess',formRef.formModel)
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
@ -194,23 +214,37 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
let enableBuy = val[0]['enableBuy']
if(tableData.value.length>0){
enableBuy = tableData.value[0]['enableBuy']
}
//
let noList = val.filter(item=>item['enableBuy']!=enableBuy)
if(noList&&noList.length>0){
let itemCodes = noList.map(item=>item['itemCode'])
console.log(itemCodes)
message.warning(`${itemCodes.join(',')}与其他数据制造类型不一致,被过滤!`)
}
val = val.filter(item=>item['enableBuy']==enableBuy)
const isType = await isItemType(val[0]['itemCode'], labelType.value) val.forEach(item=>{
if(!isType){ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
message.warning('当前物料可制造与其他数据不一致,请重新选择!') newRow['itemCode'] = item['itemCode']
} else { newRow['enableBuy'] = item['enableBuy']
row['itemCode'] = val[0]['itemCode'] newRow['uom'] = item['uom']
row['uom'] = val[0]['uom'] newRow['inventoryStatus'] = item['inventoryStatus']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['qty'] = item['qty']
row['qty'] = val[0]['qty']
// 000000 // 000000
if (val[0]['batch'] !== '') { if (item['batch'] !== '') {
row['batch'] = val[0]['batch'] newRow['batch'] = item['batch']
} else { } else {
row['batch'] = '000000' newRow['batch'] = '000000'
} }
row['packUnit'] = val[0]['packUnit'] newRow['packUnit'] = item['packUnit']
row['packQty'] = val[0]['packQty'] newRow['packQty'] = item['packQty']
tableData.value.push(newRow)
})
// HL-4885 @ @ // HL-4885 @ @
// tableform // tableform
// TODO: tableFormColumns 10 20 20 // TODO: tableFormColumns 10 20 20
@ -219,16 +253,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
// } // }
// }) // })
} // }
} else if(formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
} }
// else if(formField == 'workStationCode') {
// //
// val.forEach(item=>{
// const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
// newRow['workStationCode'] = item['code']
// newRow['fromLocationCode'] = item['rawLocationCode']
// tableData.value.push(newRow)
// })
// }
// else if(formField == 'packUnit') { // else if(formField == 'packUnit') {
// row['packUnit'] = val[0]['packUnit'] // row['packUnit'] = val[0]['packUnit']
// row['packQty'] = val[0]['packQty'] // row['packQty'] = val[0]['packQty']
@ -239,11 +274,43 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField=='workshopCode'){
//
setV['productionLineCode'] = ''//线
setV['workStationCode'] = ''//
setV['fromLocationCode'] = ''//
tableData.value = []
}else if(formField=='productionLineCode'){
//线
setV['workStationCode'] = ''//
setV['fromLocationCode'] = ''//
tableData.value = []
}
if(formField == 'workStationCode') {
//
setV['workStationCode'] = val[0]['code']
setV['fromLocationCode'] = val[0]['rawLocationCode']
}
tableData.value = [] // tableData.value = [] //
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
//
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row ) => {
console.log('searchTableSuccessLabel',formField, searchField, val, formRef, type, row)
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(async () => { nextTick(async () => {
@ -654,6 +721,10 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach((item:any)=>{
item['workStationCode'] = data.workStationCode
item['fromLocationCode'] = data.fromLocationCode
})
data.subList = tableData.value // data.subList = tableData.value //
let isZC = true // let isZC = true //
data.subList.forEach(item => { data.subList.forEach(item => {

516
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -24,7 +24,8 @@ import * as SupplieritemApi from '@/api/wms/supplieritem'
import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data' import { Supplieritem } from '@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { Warehouse } from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -116,7 +117,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}, },
}, },
{ {
label: '生产线代码', label: '生产线',
field: 'productionLineCode', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
@ -171,6 +172,155 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}] }]
}, },
}, },
{
label: '工位',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
isForm: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
isMainValue: true
},{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请选择生产线信息!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{
multiple:true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false
},
{
key: 'workshopCode',
value: 'workshopCode',
message: '请选择车间信息!',
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
},
{
key: 'productionLineCode', // 查询列表中字段
value: 'productionLineCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:false, // 前置添加必有,和isFormModel结合使用
},
],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
isRepeat: true,//是否可以重复添加该条数据
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{
label: '来源库位',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
},
isDetail:false,
isTable:true,
isTableForm: true,
isForm: true,
},
{
label: '到仓库',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
isForm:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择仓库代码',
searchField: 'code',
searchTitle: '仓库信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
@ -524,6 +674,12 @@ export const ProductionreturnRequestMainRules = reactive({
// productionLineCode: [ // productionLineCode: [
// { required: true, message: '请选择生产线代码', trigger: 'change' } // { required: true, message: '请选择生产线代码', trigger: 'change' }
// ], // ],
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
toWarehouseCode: [
{ required: true, message: '请选择到仓库', trigger: 'change' }
],
}) })
/** /**
@ -579,161 +735,161 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}] }]
}, },
}, },
{ // {
label: '工位代码', // label: '工位代码',
field: 'workStationCode', // field: 'workStationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 // searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 // searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{ // searchCondition:[{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
},{ // },{
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请选择车间信息!', // message: '请选择车间信息!',
isMainValue: true // isMainValue: true
},{ // },{
key: 'productionLineCode', // key: 'productionLineCode',
value: 'productionLineCode', // value: 'productionLineCode',
message: '请选择生产线信息!', // message: '请选择生产线信息!',
isMainValue: true // isMainValue: true
}], // }],
} // }
}, // },
tableForm:{ // tableForm:{
multiple:true, // multiple:true,
disabled:true, // disabled:true,
// isInpuFocusShow: true, // // isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 // searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题 // searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法 // searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [ // searchCondition: [
{ // {
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请选择车间信息!', // message: '请选择车间信息!',
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel // isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用 // required:true, // 前置添加必有,和isFormModel结合使用
}, // },
{ // {
key: 'productionLineCode', // 查询列表中字段 // key: 'productionLineCode', // 查询列表中字段
value: 'productionLineCode', // 指查询具体值 // value: 'productionLineCode', // 指查询具体值
action: '==', // 查询拼接条件 // action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 // isSearch: true, // 使用自定义拼接条件
isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // isMainValue: false, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel // isFormModel:true, // filters中添加筛选的数据--取于formModel
required:false, // 前置添加必有,和isFormModel结合使用 // required:false, // 前置添加必有,和isFormModel结合使用
}, // },
], // ],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 // verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true, // isShowTableFormSearch: true,
isRepeat: true,//是否可以重复添加该条数据 // isRepeat: true,//是否可以重复添加该条数据
verificationParams: [{ // verificationParams: [{
key: 'code', // key: 'code',
action: '==', // action: '==',
value: '', // value: '',
isMainValue: false, // isMainValue: false,
isSearch: true, // isSearch: true,
isFormModel: true, // isFormModel: true,
}], // 失去焦点校验参数 // }], // 失去焦点校验参数
}, // },
}, // },
{ // {
label: '来源库位', // label: '来源库位',
field: 'fromLocationCode', // field: 'fromLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true // disabled: true
} // }
}, // },
isDetail:false, // isDetail:false,
isTable:true, // isTable:true,
isTableForm: true, // isTableForm: true,
isForm: false, // isForm: false,
}, // },
{ // {
label: '目标库位', // label: '目标库位',
field: 'toLocationCode', // field: 'toLocationCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
multiple: true,//多选 // multiple: true,//多选
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本 // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题 // searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'ReturnToStore', // 生产退料 // value: 'ReturnToStore', // 生产退料
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
} // }
] // ]
}, // },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
isSearchList: true, // 开启查询弹窗 // isSearchList: true, // 开启查询弹窗
multiple: true,//多选 // multiple: true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本 // searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 // searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题 // searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类 // searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法 // searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{ // searchCondition: [{
key: 'businessType', // key: 'businessType',
value: 'ReturnToStore', // 生产退料 // value: 'ReturnToStore', // 生产退料
isMainValue: false // isMainValue: false
}, // },
{ // {
key: 'isIn', // key: 'isIn',
value: 'in', // value: 'in',
isMainValue: false // isMainValue: false
}] // }]
} // }
} // }
}, // },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -754,9 +910,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{ {
key: 'locationCode', key: 'locationCode',
value: 'fromLocationCode', value: 'fromLocationCode',
message: '请填写原料库位!', message: '请填写来源库位!',
isMainValue: true isMainValue: true
}, },
{
key: 'toWarehouseCode',
value: 'toWarehouseCode',
message: '请填写到仓库!',
isMainValue: true
},//接口不需要,单纯为了校验填写
{ {
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
@ -765,7 +927,9 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
}, },
tableForm:{ tableForm:{
isInpuFocusShow: true, multiple: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题 searchTitle: '库存余额信息', // 查询弹窗标题
@ -775,9 +939,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{ {
key: 'locationCode', key: 'locationCode',
value: 'fromLocationCode', value: 'fromLocationCode',
message: '请填写原料库位!', message: '请填写来源库位!',
isMainValue: true isMainValue: true
}, },
{
key: 'toWarehouseCode',
value: 'toWarehouseCode',
message: '请填写到仓库!',
isMainValue: true
},//接口不需要,单纯为了校验填写
{ {
key: 'inventoryStatus', key: 'inventoryStatus',
value: 'OK', value: 'OK',
@ -978,15 +1148,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
} }
}, },
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
@ -1102,7 +1264,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
} }
} }
}, },
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{ {
label: '包装号', label: '包装号',
field: 'packingNumber', field: 'packingNumber',
@ -1180,12 +1350,10 @@ const validateQty = (rule: any, value: any, callback: any,a,b) => {
//表单校验 //表单校验
export const ProductionreturnRequestDetailRules = reactive({ export const ProductionreturnRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' } // toLocationCode: [
], // { required: true, message: '请选择目标库位', trigger: 'change' }
toLocationCode: [ // ],
{ required: true, message: '请选择目标库位', trigger: 'change' }
],
productionLineCode: [ productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],

2
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -101,7 +101,7 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from './productionreturnRequestMain.data'
import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules,SupplierdeliverRequestPackage } from './productionreturnRequestMainNo.data' import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules,SupplierdeliverRequestPackage } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'

1527
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMain.data.ts

File diff suppressed because it is too large

12
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -339,6 +339,18 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
tableObject.params.type = 'predict'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {

12
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue

@ -278,6 +278,18 @@ const handleExport = async () => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
tableObject.params.type = 'scrap'
if (tableObject.params.isSearch){
const cmd = {
'column':'type',
'action':'==',
'value':'scrap'
}
if (!Array.isArray(tableObject.params.filters)) {
tableObject.params.filters = [];
}
tableObject.params.filters.push(cmd)
}
const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {

455
src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/index.vue

@ -0,0 +1,455 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SupplierinvoiceRecordMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRecordMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table ref="tableRef"
:selection="true"
v-clientTable
: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"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, t('ts.单据号'), row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
</template>
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗发票回转 -->
<!--
:apiUpdate="BasicEamProductionlineApi.updateBasicEamProductionline"
:apiCreate="BasicEamProductionlineApi.createBasicEamProductionline"
@searchTableSuccess="searchTableSuccess" -->
<BasicForm
ref="basicFormRef"
@success="submitForm"
:rules="SupplierinvoiceRecordMainTransferRules"
:formAllSchemas="SupplierinvoiceRecordMainTransfer.allSchemas"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:annexTable="[{
label: t('ts.合同附件'),
prop: 'Annex',
tableName:'contract',
showDownload:true,
showPreview: true,
hiddenDelete:true,
hiddenUpload:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.发票附件'),
prop: 'Annex',
tableName:'invoice',
showDownload:true,
showPreview: true,
hiddenDelete:true,
hiddenUpload:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.货运单附件'),
prop: 'Annex',
tableName:'waybill',
showDownload:true,
hiddenDelete:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
},{
label: t('ts.其他附件'),
prop: 'Annex',
tableName:'invoiceOther',
showDownload:true,
hiddenDelete:true,
queryParams:[{
queryField:'tableId',
rowField:'annexMasterId',
}],
}]"
:annexAlias="{
hidden:true,
label:t('ts.其他附件'),
showDownload:true,
hiddenDelete:true
}"
:otherHeadButttonData="[{
label: t('ts.打印明细'),
name: 'printing',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
},{
label: t('ts.导出明细'),
name: 'export-detail',
hide: false,
type: 'primary',
// icon: 'ep:operation',
color: '',
float:'left',
hasPermi: ''
}]"
:isBasic="false"
direction="horizontal"
:column="3"
:allSchemas="SupplierinvoiceRecordDetailMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"
:detailAllSchemasRules="SupplierinvoiceRecordDetailRules"
:apiPage="SupplierinvoiceRecordDetailApi.getSupplierinvoiceRecordDeatilPage"
@buttonBaseClick="detailButtonBaseClick"
>
<!-- 价税合计尾差 -->
<template #Descriptions_totalTaxDiffAmount="{ row }">
<span>{{row['totalTaxDiffAmount']}}<span class="red-text"> (含返利合计:{{ row['rebateTotal'] }})</span></span>
</template>
<!-- 未税尾差 -->
<template #Descriptions_beforeTaxDiffAmount="{ row }">
<span>{{row['beforeTaxDiffAmount']}}<span class="red-text"> (含返利未税:{{ row['discountAmount1'] }})</span></span>
</template>
<!-- 税额尾差 -->
<template #Descriptions_taxAmountDiff="{ row }">
<span>{{row['taxAmountDiff']}}<span class="red-text"> (含返利税额:{{ row['rebateTax'] }})</span></span>
</template>
<template #differencePrice="{row}">
<span :class="{'red-text':row.differencePrice!=0}">{{ row.differencePrice }}</span>
</template>
</Detail>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SupplierinvoiceRecordMain,SupplierinvoiceRecordDetail,SupplierinvoiceRecordDetailRules,SupplierinvoiceRecordDetailMain,SupplierinvoiceRecordMainTransfer,SupplierinvoiceRecordMainTransferRules } from './purchaseDiscreteOrderMain.data'
import * as SupplierinvoiceRecordMainApi from '@/api/wms/supplierinvoiceRecordMain'
import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecordDeatil'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as PackageApi from "@/api/wms/package";
import {getAccessToken} from "@/utils/auth";
import {getJmreportBaseUrl} from "@/utils/systemParam";
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import dayjs from 'dayjs'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'purchaseDiscreteOrderMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SupplierinvoiceRecordMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: SupplierinvoiceRecordMainApi.getSupplierinvoiceRecordMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
handleExport()
}else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { //
}else { //
console.log('其他按钮', item)
}
}
const BASE_URL = getJmreportBaseUrl()
const srcPoint = ref(BASE_URL + '/jmreport/view/970966724605804544?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
if(rows.length==0){
message.warning('至少选择一条数据!')
return
}
console.log('批量打印',rows.join(','))
window.open(srcPoint.value+'&ids='+rows.join(','))
}
// -
const butttondata = (row,$index) => {
return [
{
label: t('ts.未读'),
name: 'unread',
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
{
label: t('ts.已读'),
name: 'read',
type: 'info',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
{
label: t('ts.查看明细'),
name: 'open_detail',
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}
]
}
/** 添加/修改操作 */
const basicFormRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'open_detail') { //
openDetail(row, '单据号', row.number)
}else if(val == 'unread'){
//
}else if(val == 'read'){
//
}
}
//
const submitForm = async (formType, data) => {
data.reverseInvoiceJournal = 'APINVCOR'
data.adjustmentJournal = 'APADJ'
console.log('发票回转',formType, data)
loadStart()
try{
await SupplierinvoiceRecordMainApi.reverseSupplierinvoiceRecordMain(data)
message.success(t('ts.发票回转成功'))
basicFormRef.value.dialogVisible = false
buttonBaseClick('refresh', null)
} finally {
loadDone()
}
}
//
const { wsCache } = useCache()
/** 详情操作 */
const detailRef = ref()
const clicKRowId = ref();
const openDetail = async (row: any, titleName: any, titleValue: any) => {
console.log('openDetail',row)
clicKRowId.value = row.id
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
//masterId
const { tableObject: requestTableObject, tableMethods:requestTableMethods } = useTable({
getListApi: SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage //
})
const { getList:requestGetList } = requestTableMethods
requestTableObject.params.number = row.requestNumber
await requestGetList()
if(requestTableObject.tableList.length>0){
row.annexMasterId = requestTableObject.tableList[0].masterId
}
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue,"recordSupplierinvoiceMain")
}
const searchList = (model)=>{
if(model.postingDate&&model.postingDate.length>1){
model.postingDate[1] = model.postingDate[1].replace('00:00:00','23:59:59')
}
selectionRows.value = []
let model1 = {
...model,
statuss: model.status.join(',')?model.status.join(','):''
}
delete model1.status
setSearchParams(model1)
}
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
/** 导出按钮操作 */
const handleExport = async () => {
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
if (!tableObject.params.createTime || tableObject.params.createTime && tableObject.params. createTime.length == 0) {
delete tableObject.params.createTime
}
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordMain({...tableObject.params,checkNums:rows})
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
const detailButtonBaseClick = (val, item) => {
console.log("点击的按钮",val)
if(val == 'printing'){
//
handleDocumentPrint(clicKRowId.value)
}else if(val === 'export-detail'){
console.log("导出明细:",clicKRowId.value)
handleDetailExport(clicKRowId.value)
}
}
//
const documentSrc = ref(BASE_URL + '/jmreport/view/972639553789239296?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
/** 导出明细按钮操作 */
const exportLoadingDetail = ref(false) //
const handleDetailExport = async (masterId) => {
try {
//
await message.exportConfirm()
//
exportLoadingDetail.value = true
let params = {
masterId: masterId
}
const excelTitle = ref(route.meta.title)
const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordDetail(params)
download.excel(data, `${excelTitle.value}明细】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoadingDetail.value = false
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
})
</script>
<style lang="scss" scoped>
.is-red{
border-radius:var(--el-border-radius-base);
border:1px solid var(--el-color-danger);
box-shadow: 0 0 0 1px var(--el-color-danger) inset;
}
.red-text{
color:var(--el-color-danger);
font-weight:700;
}
</style>

1864
src/views/wms/supplierManage/purchaseDiscreteOrder/purchaseDiscreteOrderMain/purchaseDiscreteOrderMain.data.ts

File diff suppressed because it is too large
Loading…
Cancel
Save