Browse Source

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

intex_online20241111
ljlong_2630 3 months ago
parent
commit
3e5f0b9b5a
  1. 8
      src/api/wms/itemSyntheticRelation/index.ts
  2. 47
      src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue
  3. 38
      src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts
  4. 18
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  5. 10
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  6. 13
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

8
src/api/wms/itemSyntheticRelation/index.ts

@ -52,3 +52,11 @@ export const exportItemSyntheticRelation = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/item-synthetic-relation/get-import-template' }) return request.download({ url: '/wms/item-synthetic-relation/get-import-template' })
} }
export async function enableItemSyntheticRelation(id: number) {
return await request.enable({ url: `/wms/item-synthetic-relation/enable?id=` + id })
}
export async function disableItemSyntheticRelation(id: number) {
return await request.disable({ url: `/wms/item-synthetic-relation/disable?id=` + id })
}

47
src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -73,6 +73,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as SamplingProcessApi from "@/api/qms/samplingProcess";
defineOptions({ name: 'ItemSyntheticRelation' }) defineOptions({ name: 'ItemSyntheticRelation' })
@ -144,11 +145,27 @@ const buttonBaseClick = (val, item) => {
} }
} }
// - const isShowMainButton = (row, val) => {
const butttondata = [ if (val.indexOf(row.available) > -1) {
return false
} else {
return true
}
}
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:itemSyntheticRelation:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:itemSyntheticRelation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:itemSyntheticRelation:delete'}), // defaultButtons.mainListEnableBtn({
hide: isShowMainButton(row, ['FALSE']),
hasPermi: 'wms:itemSyntheticRelation:enable'
}),
defaultButtons.mainListDisableBtn({
hide: isShowMainButton(row, ['TRUE']),
hasPermi: 'wms:itemSyntheticRelation:disable'
}),
] ]
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
@ -156,6 +173,10 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
handleDisable(row.id)
} }
} }
@ -208,6 +229,24 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
const handleEnable = async (id: number) => {
try {
await ItemSyntheticRelationApi.enableItemSyntheticRelation(id)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
const handleDisable = async (id: number) => {
try {
await ItemSyntheticRelationApi.disableItemSyntheticRelation(id)
message.success(t('common.updateSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */ /** 导出按钮操作 */
const exportLoading = ref(false) // const exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

38
src/views/wms/basicDataManage/itemManage/itemSyntheticRelation/itemSyntheticRelation.data.ts

@ -5,10 +5,23 @@ import * as ItembasicApi from "@/api/wms/itembasic";
// 表单校验 // 表单校验
export const ItemSyntheticRelationRules = reactive({ export const ItemSyntheticRelationRules = reactive({
name: [required], name: [required],
itemCode: [required], itemCode: [required, { validator: validateItemCodes, message: '应选择多个物料', trigger: 'blur' }],
available: [required], available: [required],
}) })
export function validateItemCodes(rule, value, callback) {
if (value) {
const Reg = /,/
if (Reg.test(value)) {
callback()
} else {
callback(new Error('应选择多个物料'))
}
} else {
callback()
}
}
export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([ export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '组合号', label: '组合号',
@ -63,6 +76,12 @@ export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: false, isSearch: false,
isForm:false, isForm:false,
}, },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -73,14 +92,15 @@ export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 120 width: 120
}, },
form: { isForm:false,
component: 'Switch', // form: {
value: 'TRUE', // component: 'Switch',
componentProps: { // value: 'TRUE',
inactiveValue: 'FALSE', // componentProps: {
activeValue: 'TRUE' // inactiveValue: 'FALSE',
} // activeValue: 'TRUE'
} // }
// }
}, },
{ {
label: '操作', label: '操作',

18
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -293,15 +293,15 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false // isTable: false
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

10
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -838,7 +838,15 @@ const submitForm = async (formType, submitData) => {
tableData.value.forEach((row, index) => { tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
}) })
data.subList = tableData.value // let alalQty = 0
tableData.value.forEach(item => {
alalQty += item.qty ? parseFloat(item.qty) : 0
})
if (alalQty == 0) {
message.error('收货总数量不可以为0')
return
}
data.subList = tableData.value.filter(item => parseFloat(item.qty) > 0) //
formRef.value.formLoading = true formRef.value.formLoading = true
try { try {
if (formType === 'create') { if (formType === 'create') {

13
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -363,7 +363,10 @@ const submitForm = async (formType, submitData) => {
if(item['allowOverShipment']!='TRUE'){ if(item['allowOverShipment']!='TRUE'){
let qtyDefault = item['planQty'] - item['shippedQty'] let qtyDefault = item['planQty'] - item['shippedQty']
if(item['qty']>qtyDefault){ if(item['qty']>qtyDefault){
itemCodes.push(item['itemCode']) itemCodes.push({
itemCode:item['itemCode'],
poLine:item['poLine']
})
} }
if(!itemCodeSum.includes(item['itemCode'])){ if(!itemCodeSum.includes(item['itemCode'])){
@ -379,7 +382,11 @@ const submitForm = async (formType, submitData) => {
} }
}) })
if(itemCodes.length>0){ if(itemCodes.length>0){
message.error(`${itemCodes.join(',')}${t('ts.不允许超发')}`) let str = ''
itemCodes.forEach(cur => {
str += `【物料号${cur.itemCode}-订单行${cur.poLine}`
})
message.error(`${str}${t('ts.不允许超发')}`)
return return
} }
if (itemCodeSum.length > 0) { if (itemCodeSum.length > 0) {
@ -436,7 +443,7 @@ const inputNumberChange = (field, val,row, index) => {
if(row['allowOverShipment']!='TRUE'){ if(row['allowOverShipment']!='TRUE'){
let qtyDefault = row['planQty'] - row['shippedQty'] let qtyDefault = row['planQty'] - row['shippedQty']
if (row['qty'] > qtyDefault) { if (row['qty'] > qtyDefault) {
message.error(`${row['itemCode']}${t('ts.不允许超发')}`) message.error(`【物料号${row['itemCode']}-订单行${row['poLine']}${t('ts.不允许超发')}`)
} }
let planQty = row['planQty'] // let planQty = row['planQty'] //
let sumQty = tableData.value.filter(item1=>item1['itemCode']==row['itemCode'] && item1['poLine']==row['poLine'] ).reduce((prev, item1) => prev + item1['qty'],0) let sumQty = tableData.value.filter(item1=>item1['itemCode']==row['itemCode'] && item1['poLine']==row['poLine'] ).reduce((prev, item1) => prev + item1['qty'],0)

Loading…
Cancel
Save