Browse Source

修改供应商发货申请生产日期

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
291acc374b
  1. 17
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  2. 7
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  3. 4
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

17
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -58,6 +58,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@formFormDateChange="formFormDateChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -73,7 +74,6 @@
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail" :apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@formFormDateChange="formFormDateChange"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -599,7 +599,12 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isHave = data.subList.some((item) => item.produceDate > item.expireDate) let isHave = data.subList.some((item) => {
console.log("CCCCC",item.expireDate)
if(item.expireDate != null){
item.produceDate > item.expireDate
}
})
if (isHave) { if (isHave) {
message.error('生产日期不可以大于过期日期') message.error('生产日期不可以大于过期日期')
formRef.value.formLoading = false formRef.value.formLoading = false
@ -670,10 +675,10 @@ const searchFormClick = (searchData) => {
} }
const formFormDateChange = (field, val,row, index) => { const formFormDateChange = (field, val,row, index) => {
console.log("AAAAA",field) if(field == 'produceDate'){
console.log("BBBBB",row) let produceDateStr = formatDate(val,'YYYYMMDD');
console.log("CCCCC",val) row.batch = produceDateStr
console.log("DDDDD",index) }
} }
/** 初始化 **/ /** 初始化 **/

7
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -25,6 +25,7 @@ const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { tr } from 'element-plus/es/locale'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
@ -579,6 +580,9 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '替代批次', label: '替代批次',
@ -1084,9 +1088,6 @@ export const SupplierdeliverRequestDetailRules = reactive({
produceDate: [ produceDate: [
{ required: true, message: '请输入生产日期', trigger: 'blur' } { required: true, message: '请输入生产日期', trigger: 'blur' }
], ],
expireDate: [
{ required: true, message: '请输入过期日期', trigger: 'blur' }
],
packQty: [ packQty: [
{ required: true, message: '请输入包装数量', trigger: 'blur' } { required: true, message: '请输入包装数量', trigger: 'blur' }
], ],

4
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -481,8 +481,8 @@
getList() // getList() //
} }
const inputStringBlur =(headerItem,index,row) =>{ const inputStringBlur =(headerItem,index,row) =>{
console.log("headerItem:",headerItem) // console.log("headerItem:",headerItem)
console.log("row:",row) //console.log("row:",row)
if(headerItem == 'singlePrice'){ if(headerItem == 'singlePrice'){
// = // =
row.amount = row.qty * row.singlePrice row.amount = row.qty * row.singlePrice

Loading…
Cancel
Save