Browse Source

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

master_hella
zhaoxuebing 9 hours 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
export const exportProductreceiptRecordMain = async (params) => {
params.type = 'predict'
// params.type = 'predict'
if (params.isSearch) {
const cmd = {
'column':'type',
'action':'==',
'value':'predict'
}
params.filters.push(cmd)
// const cmd = {
// 'column':'type',
// 'action':'==',
// 'value':'predict'
// }
// params.filters.push(cmd)
delete params.isSearch
const data = {...params}
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',
:'Please enter the reason for rejection',
:'View details',
:'unread',
:'read',
:'All read',
'申请发货数量不能大于 计划数量 - 已发货数量':'The requested quantity cannot be greater than the planned quantity - the quantity shipped',
:'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-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item
label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
@ -199,7 +199,7 @@
/>
</div>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"

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

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

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

@ -153,7 +153,7 @@ const butttondata = (row, $index) => {
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:sale-shipment-main-record:update'}), //
// 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
}
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
}
},
// {
// label: '部门',
// field: 'departmentCode',
// sort: 'custom',
// table: {
// width: 150
// }
// },
{
label: '通知单描述',
field: 'noticeRemark',
@ -642,7 +642,7 @@ export const ScrapJobMain = useCrudSchemas(
},
{
label: '承接人',
field: 'acceptUserId',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 150
@ -670,7 +670,7 @@ export const ScrapJobMain = useCrudSchemas(
},
{
label: '完成人',
field: 'completeUserId',
field: 'completeUserName',
sort: 'custom',
table: {
width: 150

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

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

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

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

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

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -59,6 +59,7 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@clearSearchInput="clearSearchInput"
/>
<!-- 详情 -->
@ -88,7 +89,7 @@
:isShowButton="false"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel"
/>
@ -183,9 +184,28 @@ const isItemType = async (itemCode, labelTypeParams) => {
if (!isType) labelType.value = labelTypeOld
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 ) => {
console.log('searchTableSuccess',formRef.formModel)
nextTick(async () => {
if (type == 'tableForm') {
//
@ -194,23 +214,37 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
message.warning(`物料${val[0]['itemCode']}已经存在`)
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)
if(!isType){
message.warning('当前物料可制造与其他数据不一致,请重新选择!')
} else {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = val[0]['qty']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode']
newRow['enableBuy'] = item['enableBuy']
newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['qty'] = item['qty']
// 000000
if (val[0]['batch'] !== '') {
row['batch'] = val[0]['batch']
if (item['batch'] !== '') {
newRow['batch'] = item['batch']
} else {
row['batch'] = '000000'
newRow['batch'] = '000000'
}
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
newRow['packUnit'] = item['packUnit']
newRow['packQty'] = item['packQty']
tableData.value.push(newRow)
})
// HL-4885 @ @
// tableform
// TODO: tableFormColumns 10 20 20
@ -219,16 +253,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// 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') {
// row['packUnit'] = val[0]['packUnit']
// row['packQty'] = val[0]['packQty']
@ -239,11 +274,43 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
const setV = {}
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 = [] //
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 ) => {
nextTick(async () => {
@ -654,6 +721,10 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
tableData.value.forEach((item:any)=>{
item['workStationCode'] = data.workStationCode
item['fromLocationCode'] = data.fromLocationCode
})
data.subList = tableData.value //
let isZC = true //
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 * as LocationApi from '@/api/wms/location'
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() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -116,7 +117,7 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
},
},
{
label: '生产线代码',
label: '生产线',
field: 'productionLineCode',
sort: 'custom',
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: '申请时间',
field: 'requestTime',
@ -524,6 +674,12 @@ export const ProductionreturnRequestMainRules = reactive({
// productionLineCode: [
// { 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: '工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
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
}],
// {
// label: '工位代码',
// field: 'workStationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// 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
// }],
}
},
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: false,
},
{
label: '目标库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
multiple: true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: 'ReturnToStore', // 生产退料
isMainValue: false
},
{
key: 'isIn',
value: 'in',
isMainValue: false
}
]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple: true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: 'ReturnToStore', // 生产退料
isMainValue: false
},
{
key: 'isIn',
value: 'in',
isMainValue: false
}]
}
}
},
// }
// },
// 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: false,
// },
// {
// label: '目标库位',
// field: 'toLocationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// multiple: true,//多选
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'businessType',
// value: 'ReturnToStore', // 生产退料
// isMainValue: false
// },
// {
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }
// ]
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// multiple: true,//多选
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.selectBusinessTypeOutLocation, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'businessType',
// value: 'ReturnToStore', // 生产退料
// isMainValue: false
// },
// {
// key: 'isIn',
// value: 'in',
// isMainValue: false
// }]
// }
// }
// },
{
label: '物料代码',
field: 'itemCode',
@ -754,9 +910,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{
key: 'locationCode',
value: 'fromLocationCode',
message: '请填写原料库位!',
message: '请填写来源库位!',
isMainValue: true
},
{
key: 'toWarehouseCode',
value: 'toWarehouseCode',
message: '请填写到仓库!',
isMainValue: true
},//接口不需要,单纯为了校验填写
{
key: 'inventoryStatus',
value: 'OK',
@ -765,7 +927,9 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
tableForm:{
isInpuFocusShow: true,
multiple: true,
disabled:true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
@ -775,9 +939,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
{
key: 'locationCode',
value: 'fromLocationCode',
message: '请填写原料库位!',
message: '请填写来源库位!',
isMainValue: true
},
{
key: 'toWarehouseCode',
value: 'toWarehouseCode',
message: '请填写到仓库!',
isMainValue: true
},//接口不需要,单纯为了校验填写
{
key: 'inventoryStatus',
value: 'OK',
@ -978,15 +1148,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{
label: '创建者',
field: 'creator',
@ -1102,7 +1264,15 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
hiddenInMain: true,
},
{
label: '包装号',
field: 'packingNumber',
@ -1180,12 +1350,10 @@ const validateQty = (rule: any, value: any, callback: any,a,b) => {
//表单校验
export const ProductionreturnRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
toLocationCode: [
{ required: true, message: '请选择目标库位', trigger: 'change' }
],
// toLocationCode: [
// { required: true, message: '请选择目标库位', trigger: 'change' }
// ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],

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

@ -101,7 +101,7 @@
<script setup lang="ts">
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 * 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()
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)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {

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

@ -278,6 +278,18 @@ const handleExport = async () => {
//
loadStart()
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)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} 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