Browse Source

BUG修改

master_hella_20240701
parent
commit
615d0cc4bf
  1. 1
      src/utils/dict.ts
  2. 3
      src/views/qms/qualityNotice/addForm.vue
  3. 12
      src/views/qms/qualityNotice/components/notaicType.vue
  4. 19
      src/views/qms/qualityNotice/components/qualityBatch.vue
  5. 5
      src/views/qms/qualityNotice/components/qualityNotice.vue
  6. 116
      src/views/qms/qualityNotice/qualityNoticeMain.data.ts

1
src/utils/dict.ts

@ -188,6 +188,7 @@ export enum DICT_TYPE {
UOM = 'uom', // 计量单位
ABC_CLASS = 'abc_class', // ABC类
TRUE_FALSE = 'true_false', // 是否
FALSE_OR_TRUE = 'false_or_true', // 是否2
ITEM_GROUP = 'item_group', // 物料分组
ITEM_CATEGORY = 'Item_category', // 物料种类
ITEM_COLOR = 'item_color', // 物料颜色

3
src/views/qms/qualityNotice/addForm.vue

@ -374,10 +374,13 @@ const next = () => {
return;
}
}
console.log(33, data.value)
console.log(66,qualityNoticeFrom.value.form)
data.value = {
...data.value,
...qualityNoticeFrom.value.form
}
console.log( data.value)
active.value++
} else {
console.log('error submit!')

12
src/views/qms/qualityNotice/components/notaicType.vue

@ -23,7 +23,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户编码" prop="customerCode">
<el-input v-model="q1.customerCode" placeholder="请选择客户"/>
<el-input v-model="q1.customerCode" placeholder="请输入客户"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -65,7 +65,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="q2.supplierCode" placeholder="请选择供应商"/>
<el-input v-model="q2.supplierCode" placeholder="请输入供应商"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -107,7 +107,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="部门编码" prop="deptCode">
<el-input v-model="q3.deptCode" placeholder="请选择部门"/>
<el-input v-model="q3.deptCode" placeholder="请输入部门"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -169,12 +169,16 @@ const props = defineProps({
default: false
}
})
nextTick(()=>{
type.vlaue = props.data?.type ? props.data.type : 1
//
type.value = parseInt(props.data.type)
q1.value = props.data?.q1 ? props.data?.q1 :{}
q2.value = props.data?.q2 ? props.data?.q2 :{}
q3.value = props.data?.q3 ? props.data?.q3 :{}
q3.value = props.data?.q3 ? props.data?.q3 :{},
console.log(998,props.data)
})
//
const rules1 =ref({
customerCode: [required],

19
src/views/qms/qualityNotice/components/qualityBatch.vue

@ -338,8 +338,8 @@
</el-row>
</el-form>
<el-form ref="nameRef" :model="nameForm" v-else>
<el-form-item :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]" prop="name">
<el-input v-model="nameForm.name" style="width: 240px" placeholder="请输入名称" />
<el-form-item :rules="[{ required: true, message: '请输入顺序号', trigger: 'blur' }]" prop="name">
<el-input v-model="nameForm.name" type="number" style="width: 240px" placeholder="请输入顺序号" />
</el-form-item>
</el-form>
</div>
@ -493,7 +493,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' |
nameForm.value.name = ''
source.value = ''
dialogVisible.value = true
dialogTitle.value = '添加物料批次名称'
dialogTitle.value = '添加物料批次顺序号'
} else if (action === 'remove') {
const tabs =subList.value
let activeName = editableTabsValue.value
@ -600,14 +600,23 @@ const buttonBaseClick1 = (val) => {
if (!nameRef.value) return
nameRef.value.validate((valid, fields) => {
if (valid) {
console.log(subList.value)
console.log(nameForm.value.name)
const isRepeat = subList.value.some(item=>item.sequenceCode == nameForm.value.name)
if(isRepeat){
message.error('列表中已存在该顺序号')
return;
}
const newTabName = `${++tabIndex}`
itemBatch.value = {
itemCode:'',
batch:'',
inspectionBatch:'',
itemDesc:'',
totalAmount:'',
uom:'',
packageList:[],
taskList:[],
defectList:[],
}
subList.value.push({
sequenceCode: nameForm.value.name,
name: newTabName,

5
src/views/qms/qualityNotice/components/qualityNotice.vue

@ -159,10 +159,9 @@ const props = defineProps({
const statusList = ref()
//
nextTick(()=>{
form.value = props.data ? props.data: {}
form.value.status = 1
if(form.value.number){
if(props.data.number){
statusList.value = getIntDictOptions(DICT_TYPE.QUALITY_NOTICE_STATUS)
form.value = props.data
}else{
statusList.value =getIntDictOptions(DICT_TYPE.QUALITY_NOTICE_STATUS).filter(item=>item.value == 1)
}

116
src/views/qms/qualityNotice/qualityNoticeMain.data.ts

@ -23,6 +23,7 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '类型',
field: 'type',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_TYPE,
sort: 'custom',
isSearch: true,
isForm: false,
@ -98,8 +99,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '报告时间',
field: 'reportTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
}
@ -108,8 +128,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '要求开始时间',
field: 'requestStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
}
@ -118,8 +157,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '要求结束时间',
field: 'requestEndTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
}
@ -127,6 +185,7 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '是否造成停机',
field: 'whetherCausesMachineHalt',
dictType: DICT_TYPE.FALSE_OR_TRUE,
sort: 'custom',
isSearch: false,
isForm: false,
@ -138,8 +197,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '停机开始时间',
field: 'machineHaltStartTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
}
@ -147,12 +225,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '停机结束时间',
field: 'machineHaltEndTime',
dictType: DICT_TYPE.INSPECTION_TYPE,
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'Select'
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
@ -182,8 +275,27 @@ export const QualityNoticeMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '完成时间',
field: 'finishTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
}

Loading…
Cancel
Save