Browse Source

bug修改

master
陈薪名 11 months ago
parent
commit
068282c67a
  1. 1
      src/views/wms/basicDataManage/factoryModeling/workstation/index.vue
  2. 16
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  3. 36
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  4. 341
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  5. 32
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  6. 7
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  7. 32
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  8. 3
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  9. 5
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  10. 4
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts
  11. 38
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  12. 110
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

1
src/views/wms/basicDataManage/factoryModeling/workstation/index.vue

@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
//
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
const message = useMessage() // const message = useMessage() //

16
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -145,6 +145,14 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'FG',
action: '==',
isSearch: true,
isMainValue: false isMainValue: false
}] }]
} }
@ -285,7 +293,13 @@ export const WorkstationRules = reactive({
productionLineCode: [ productionLineCode: [
{ required: true, message: '请输入生产线代码', trigger: 'change' } { required: true, message: '请输入生产线代码', trigger: 'change' }
], ],
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } { required: true, message: '请选择是否可用', trigger: 'change' }
], ],
rawLocationCode: [
{ required: true, message: '请选择原料库位', trigger: 'change' }
],
fgLocationCode: [
{ required: true, message: '请选择成品库位', trigger: 'change' }
],
}) })

36
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -108,6 +108,10 @@ 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 == 'fromWarehouseCode') {
setV['fromWarehouseCode'] = val[0]['code']
setV['toWarehouseCode'] = val[0]['code']
}
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
@ -314,22 +318,22 @@ const handleDeleteTable = (item, index) => {
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
// 线 // 线
if (tableData.value.length > 0) { // if (tableData.value.length > 0) {
let productionLineCode = tableData.value[0].productionLineCode // let productionLineCode = tableData.value[0].productionLineCode
let workStationCode = tableData.value[0].workStationCode // let workStationCode = tableData.value[0].workStationCode
for(var i=0;i<tableData.value.length;i++) { // for(var i=0;i<tableData.value.length;i++) {
if(productionLineCode !== tableData.value[i].productionLineCode){ // if(productionLineCode !== tableData.value[i].productionLineCode){
message.warning('子表数据:生产线存在不同数据,请修改成统一数据!') // message.warning('线')
formRef.value.formLoading = false // formRef.value.formLoading = false
return; // return;
} // }
if(workStationCode !== tableData.value[i].workStationCode){ // if(workStationCode !== tableData.value[i].workStationCode){
message.warning('子表数据:工位存在不同数据,请修改成统一数据!') // message.warning('')
formRef.value.formLoading = false // formRef.value.formLoading = false
return; // return;
} // }
} // }
} // }
try { try {
if (formType === 'create') { if (formType === 'create') {
await IssueRequestMainApi.createIssueRequestMain(data) await IssueRequestMainApi.createIssueRequestMain(data)

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

@ -17,6 +17,9 @@ import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/produ
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -37,6 +40,17 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array} * @returns {Array}
*/ */
export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isForm: false,
isSearch: true,
},
{ {
label: '车间代码', label: '车间代码',
field: 'workshopCode', field: 'workshopCode',
@ -80,39 +94,54 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
{ {
label: '从仓库代码', label: '申请时间',
field: 'fromWarehouseCode', field: 'requestTime',
sort: 'custom', formatter: dateFormatter,
table: { detail: {
width: 150 dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
isForm: false
},
{
label: '从库位类型范围',
field: 'fromLocationTypes',
// dictType: DICT_TYPE.LOCATION_TYPE,
// dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
}, },
isForm: false form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
}, },
{ {
label: '从库区代码范围', label: '截止时间',
field: 'fromAreaCodes', field: 'dueTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style:{width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}, },
isForm: false
}, },
{ {
label: '到仓库代码', label: '从库位类型范围',
field: 'toWarehouseCode', field: 'fromLocationTypes',
// dictType: DICT_TYPE.LOCATION_TYPE,
// dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -132,8 +161,8 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false isForm: false
}, },
{ {
label: '库区代码范围', label: '库区代码范围',
field: 'toAreaCodes', field: 'fromAreaCodes',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -141,111 +170,65 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false isForm: false
}, },
{ {
label: '单据号', label: '到库区代码范围',
field: 'number', field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isForm: false,
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: {
value: 'Issue',
componentProps: {
disabled: true
}
},
isForm: false isForm: false
}, },
{ {
label: '备注', label: '从仓库代码',
field: 'remark', field: 'fromWarehouseCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable: false,
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: { form: {
component: 'DatePicker', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
type: 'datetime', isSearchList: true, // 开启查询弹窗
dateFormat: 'YYYY-MM-DD HH:mm:ss', searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
valueFormat: 'x', searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
}, }
isForm: false,
}, },
{ {
label: '创建者', label: '到仓库代码',
field: 'creator', field: 'toWarehouseCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isForm: false,
},
{
label: '申请时间',
field: 'requestTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: { form: {
component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', disabled: true
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, }
isForm: false,
}, },
{ {
label: '截止时间', label: '业务类型',
field: 'dueTime', field: 'businessType',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom', sort: 'custom',
table: { table: {
width: 180 width: 150
}, },
form: { form: {
component: 'DatePicker', value: 'Issue',
componentProps: { componentProps: {
style:{width:'100%'}, disabled: true
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '部门', label: '部门',
@ -254,42 +237,22 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
value: userDept.name,
componentProps: {
disabled: true
}
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false, isForm: false,
// form: {
// value: userDept.name,
// componentProps: {
// disabled: true
// }
// }
}, },
{ {
label: '最后更新者', label: '备注',
field: 'updater', field: 'remark',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isForm: false, isTable: false,
}, },
{ {
label: '使用在途库', label: '使用在途库',
@ -391,52 +354,116 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false,
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isDetail: false, isDetail: false,
isForm: false, isForm: false,
table: { table: {
width: 300, width: 200,
fixed: 'right' fixed: 'right'
}, },
} }
])) ]))
export const IssueRequestMainRules = reactive({ export const IssueRequestMainRules = reactive({
// workshopCode: [ workshopCode: [
// { required: true, message: '请选择车间代码', trigger: 'change' } { required: true, message: '请选择车间代码', trigger: 'change' }
// ],
fromWarehouseCode: [
{ required: true, message: '请输入从仓库代码', trigger: 'blur' }
], ],
fromLocationTypes: [ fromWarehouseCode: [
{ required: true, message: '请选择从库位类型范围', trigger: 'change' } { required: true, message: '请选择从仓库代码', trigger: 'change' }
],
toWarehouseCode: [
{ required: true, message: '请输入到仓库代码', trigger: 'blur' }
],
toLocationTypes: [
{ required: true, message: '请选择到库位类型范围', trigger: 'change' }
],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
], ],
businessType: [ dueTime: [
{ required: true, message: '请输入业务类型', trigger: 'blur' } { required: true, message: '请选择截止时间', trigger: 'change' }
], ],
// fromLocationTypes: [
// { required: true, message: '请选择从库位类型范围', trigger: 'change' }
// ],
// toWarehouseCode: [
// { required: true, message: '请输入到仓库代码', trigger: 'blur' }
// ],
// toLocationTypes: [
// { required: true, message: '请选择到库位类型范围', trigger: 'change' }
// ],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
// autoCommit: [
// { required: true, message: '请选择是否自动提交', trigger: 'change' }
// ],
// autoAgree: [
// { required: true, message: '请选择是否自动通过', trigger: 'change' }
// ],
// autoExecute: [
// { required: true, message: '请选择是否自动执行', trigger: 'change' }
// ],
// directCreateRecord: [
// { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
// ],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
}) })
/** /**

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

@ -287,15 +287,23 @@ const buttonTableClick = async (val, row) => {
console.log(err) console.log(err)
}) })
} else if (val == 'cjbq') { // } else if (val == 'cjbq') { //
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
if (detatableData.tableList[0].packingNumber) { let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => {
if (res) {
if (res.list.length > 0) isCreateLabel = true
}
})
if (isCreateLabel) {
message.warning('已创建过标签!!!') message.warning('已创建过标签!!!')
return return
} }
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
// dialogVisible.value = true // dialogVisible.value = true
formLabelRef.value.open('create', row) formLabelRef.value.open('create', row)
@ -349,16 +357,16 @@ const buttonTableClick = async (val, row) => {
}) })
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage({ //
masterId: row.id let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => { }).then(res => {
if (res.list) { if (res) {
if (res.list[0].packingNumber) { if (res.list.length > 0) isCreateLabel = true
isCreateLabel.value = true
}
} }
}) })
if (!isCreateLabel.value) { if (!isCreateLabel) {
message.warning('请先创建标签') message.warning('请先创建标签')
return return
} }

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

@ -31,6 +31,8 @@ const queryParams = {
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData =data?.list[0]||{}
console.log(34, requestsettingData)
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -625,13 +627,13 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 6
} }
}, },
@ -646,6 +648,7 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select',
disabled: true disabled: true
}, },
form: { form: {

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

@ -294,15 +294,23 @@ const buttonTableClick = async (val, row) => {
console.log(err) console.log(err)
}) })
} else if (val == 'cjbq') { // } else if (val == 'cjbq') { //
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
if (detatableData.tableList[0].packingNumber) { let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => {
if (res) {
if (res.list.length > 0) isCreateLabel = true
}
})
if (isCreateLabel) {
message.warning('已创建过标签!!!') message.warning('已创建过标签!!!')
return return
} }
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
// dialogVisible.value = true // dialogVisible.value = true
formLabelRef.value.open('create', row) formLabelRef.value.open('create', row)
@ -356,16 +364,16 @@ const buttonTableClick = async (val, row) => {
}) })
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await ProductionreturnRequestDetailNoApi.getProductionreturnRequestDetailPage({ //
masterId: row.id let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => { }).then(res => {
if (res.list) { if (res) {
if (res.list[0].packingNumber) { if (res.list.length > 0) isCreateLabel = true
isCreateLabel.value = true
}
} }
}) })
if (!isCreateLabel.value) { if (!isCreateLabel) {
message.warning('请先创建标签') message.warning('请先创建标签')
return return
} }

3
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -424,6 +424,9 @@ export const ProductdismantleRequestMainRules = reactive({
// fromAreaCodes: [ // fromAreaCodes: [
// { required: true, message: '请选择从库区代码范围', trigger: 'change' } // { required: true, message: '请选择从库区代码范围', trigger: 'change' }
// ], // ],
dueTime: [
{ required: true, message: '请选择截止时间', trigger: 'change' }
],
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间', trigger: 'change' } { required: true, message: '请选择车间', trigger: 'change' }
], ],

5
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -338,6 +338,11 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
if(tableData.value.find(item => (item.planQty <= 0))) {
message.warning('数量必须大于0')
formRef.value.formLoading = false
return
}
try { try {
if (formType === 'create') { if (formType === 'create') {
data.subList = tableData.value // data.subList = tableData.value //

4
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -665,13 +665,13 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 6
}, },
}, },

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

@ -311,15 +311,24 @@ const buttonTableClick = async (val, row) => {
console.log(err) console.log(err)
}) })
} else if (val == 'cjbq') { // } else if (val == 'cjbq') { //
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
if (detatableData.tableList[0].packingNumber) { let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => {
if (res) {
if (res.list.length > 0) isCreateLabel = true
}
})
if (isCreateLabel) {
message.warning('已创建过标签!!!') message.warning('已创建过标签!!!')
return return
} }
detatableData.params = {
masterId:row.id
}
await getDetailList()
// //
// dialogVisible.value = true // dialogVisible.value = true
formLabelRef.value.open('create', row) formLabelRef.value.open('create', row)
@ -372,16 +381,16 @@ const buttonTableClick = async (val, row) => {
}) })
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage({ //
masterId: row.id let isCreateLabel = false
await PackageApi.getPackagePage({
requestNumber: row.number
}).then(res => { }).then(res => {
if (res.list) { if (res) {
if (res.list[0].packingNumber) { if (res.list.length > 0) isCreateLabel = true
isCreateLabel.value = true
}
} }
}) })
if (!isCreateLabel.value) { if (!isCreateLabel) {
message.warning('请先创建标签') message.warning('请先创建标签')
return return
} }
@ -463,6 +472,11 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0')
formRef.value.formLoading = false
return
}
try { try {
if (formType === 'create') { if (formType === 'create') {
await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data) await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data)

110
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -605,50 +605,6 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -884,13 +840,13 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
}, },
}, },
tableForm: { tableForm: {
type: 'InputNumber', type: 'InputNumber',
min: 1, min: 0,
precision: 6 precision: 6
} }
}, },
@ -908,6 +864,56 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
type: 'Select' type: 'Select'
} }
}, },
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
tableForm: {
type: 'FormDateTime',
valueFormat: 'x',
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
tableForm: {
type: 'FormDateTime',
valueFormat: 'x',
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -1003,12 +1009,12 @@ export const ProductreceiptRequestDetailRules = reactive({
// packingNumber: [ // packingNumber: [
// { required: true, message: '请输入包装号', trigger: 'change' } // { required: true, message: '请输入包装号', trigger: 'change' }
// ], // ],
// produceDate: [ produceDate: [
// { required: true, message: '请选择生产日期', trigger: 'change' } { required: true, message: '请选择生产日期', trigger: 'change' }
// ], ],
// expireDate: [ expireDate: [
// { required: true, message: '请选择过期日期', trigger: 'change' } { required: true, message: '请选择过期日期', trigger: 'change' }
// ], ],
// inventoryStatus: [ // inventoryStatus: [
// { required: true, message: '请选择库存状态', trigger: 'change' } // { required: true, message: '请选择库存状态', trigger: 'change' }
// ], // ],

Loading…
Cancel
Save