Browse Source

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

intex_online20250311
songguoqiang 4 weeks ago
parent
commit
55ceaa74b5
  1. 33
      src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue
  2. 26
      src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/supplierAddressModelDeli.data.ts
  3. 4
      src/views/wms/supplierManage/supplierDeliMain/supplierDeliMain.data.ts

33
src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/index.vue

@ -32,6 +32,10 @@
<span>{{ row.code }}</span>
</el-button>
</template>
<template #shift="{row}">
<el-tag type="primary" v-if="row.isDay == 1">白班</el-tag>
<el-tag type="primary" v-if="row.isNight == 1">夜班</el-tag>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
@ -170,22 +174,27 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if (type == 'update') {
row.shift = []
row.modelShow = row.model?.split(',')
if (row.isDay == 1) {
row.shift.push('day')
}
if (row.isNight == 1) {
row.shift.push('night')
}
}
console.log(row)
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =SupplierAddressModelDeli.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
const formsSuccess = async (formType, dataParams) => {
const data = {...dataParams}
data.isDay = data.shift.some(item=>item === 'day') ? 1 :0
data.isNight = data.shift.some(item => item === 'night') ? 1 :0
data.model = data.modelShow.join(',')
delete data.shift
if (formType === 'create') {
await SupplierAddressModelDeliApi.createSupplierAddressModelDeli(data)
message.success(t('common.createSuccess'))

26
src/views/wms/basicDataManage/supplierManage/supplierAddressModelDeli/supplierAddressModelDeli.data.ts

@ -8,7 +8,8 @@ export const SupplierAddressModelDeliRules = reactive({
yearAndMonth: [required],
shift: [required],
deliNo: [required],
concurrencyStamp: [required]
concurrencyStamp: [required],
modelShow: [required],
})
export const SupplierAddressModelDeli = useCrudSchemas(
@ -69,16 +70,24 @@ export const SupplierAddressModelDeli = useCrudSchemas(
label: '供应商地点',
field: 'supplierAddress',
sort: 'custom',
isSearch: true
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '年月',
field: 'yearAndMonth',
sort: 'custom',
isSearch: true
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
},
{
label: '受入号',
field: 'modelShow',
@ -120,9 +129,10 @@ export const SupplierAddressModelDeli = useCrudSchemas(
width: 150
},
isTableForm: true,
tableForm: {
type: 'Select'
}
form: {
component: 'Checkbox',
value: [],
},
},
{
label: '便次数',

4
src/views/wms/supplierManage/supplierDeliMain/supplierDeliMain.data.ts

@ -53,10 +53,10 @@ export const SupplierDeliMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
search: {
component: 'DatePicker',
value: formatDate(new Date(),'YYYY-MM'),
value: formatDate(new Date(),'YYYYMM'),
componentProps: {
type: 'month',
valueFormat: 'YYYY-MM',
valueFormat: 'YYYYMM',
}
}
},

Loading…
Cancel
Save