Browse Source

fix: [模板管理] 填报表单删除的稽查轨迹

luojie
memorylkf 3 weeks ago
parent
commit
d1bd43bfd4
2 changed files with 80 additions and 27 deletions
  1. +79
    -26
      src/views/business/comps/template/comps/dl/DL013.vue
  2. +1
    -1
      src/views/business/comps/template/comps/lba/LBA006.vue

+ 79
- 26
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -18,6 +18,7 @@
<LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable
fieldItemLabel="template.dl.dl007.yqsyxx"
:columns="yqsyColumns"
:ref="refConf.yqsy"
@onRegentSubmit="(e) => onRegentSubmit(e)"
@ -40,7 +41,7 @@
<LineLabel label="template.dl.dl013.xbxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
fieldItemLabel="template.dl.dl013.xbxx"
label=""
:ref="refConf.xbxx"
:formConfig="xbxxConfig"
@ -52,7 +53,7 @@
<LineLabel label="template.dl.dl013.cdxx" />
<div class="template-form-item">
<BaseInfoFormPackage
fieldItemLabel=""
fieldItemLabel="template.dl.dl013.cdxx"
label=""
:ref="refConf.cdxx"
:formConfig="cdxxConfig"
@ -81,12 +82,13 @@
>
</div>
<BaseInfoFormPackage
fieldItemLabel=""
fieldItemLabel="template.dl.dl013.cdxx"
label=""
:ref="`cdxx${index}Ref`"
:formConfig="getCdxxTimeConfig(index)"
:formData="cdxxItem"
@blur="(e) => onBlur(e, index)"
:prefixKey="'paralle' + cdxxItem.id"
/>
</div>
@ -100,10 +102,12 @@
</div>
</div>
</div>
<EditSign ref="editSignDL013Ref" @cancel="signCancel" @callback="signCallback" />
</div>
</template>
<script>
import EditSign from "../../dialog/EditSign.vue";//
import BaseInfoFormPackage from '@/components/Template/BaseInfoFormPackage'
import TableOpertaionDelete from '@/components/Template/operation/TableOpertaionDelete.vue'
import CustomTable from '@/components/Template/CustomTable.vue'
@ -113,6 +117,7 @@ import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin'
import { getuuid } from '@/utils/index.js'
import { EventBus } from '@/utils/eventBus'
import moment from "moment";
const refConf = {
base: 'baseInfoRef',
@ -131,7 +136,8 @@ export default {
TableList,
Step,
CustomTable,
TableOpertaionDelete
TableOpertaionDelete,
EditSign
},
mixins: [templateMixin],
props: {
@ -306,7 +312,8 @@ export default {
data() {
return {
formData: {},
refConf
refConf,
deleteIndex:-1
}
},
mounted() {
@ -427,27 +434,15 @@ export default {
(config) => config.id === cdxxItem.id
)
if (configIndex !== -1) {
//
const newConfigs = [...this.formData.cdxxConfigs]
newConfigs.splice(configIndex, 1)
this.$set(this.formData, 'cdxxConfigs', newConfigs)
//
this.$refs[refConf.cdxx]?.updateFormData('cdcs', newConfigs.length, {
isUpdateRecord: false,
signData: null
})
this.$nextTick(() => {
//
this.updatePjxbmd()
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
})
let content = this.getFilledFormData()
let thisItem = content.cdxxConfigs[configIndex]
if(!thisItem.xsbs && !thisItem.zsg && !thisItem.ysg && !thisItem.zxg && !thisItem.yxg){
this.doDeleteParalleConfig(configIndex,null)
}else{
this.deleteIndex = configIndex
this.$refs.editSignDL013Ref.show();
}
}
},
//
@ -635,7 +630,65 @@ export default {
async onSave() {
const formData = this.getStepResource()
console.log(formData, 'formData')
}
},
checkDelete(index){
let content = this.getFilledFormData()
let thisItem = content.paralleConfigs[index]
if(!thisItem.jcb && !thisItem.jg && !thisItem.sjwjm){
this.doDeleteParalleConfig(index,null)
}else{
this.deleteIndex = index
this.$refs.editSignLAB006Ref.show();
}
},
//
signCancel() {
},
//
signCallback(data) {
let content = this.getFilledFormData()
let record = [
{
"userNameCn": data.qmrMc,
"userNameEn": data.qmrMcEn,
"key": "paralle",
"fieldCn": this.$t('template.dl.dl013.cdxx','zh_CN'),
"fieldEn": this.$t('template.dl.dl013.cdxx','en_US'),
// "oldValue": content.paralleConfigs[this.deleteIndex].jcb+";"+content.paralleConfigs[this.deleteIndex].jg+";"+(content.paralleConfigs[this.deleteIndex].jg===''?''(content.paralleConfigs[this.deleteIndex].jgOther+";"))+content.paralleConfigs[this.deleteIndex].sjwjm,
"oldValue": '稀释倍数:'+content.cdxxConfigs[this.deleteIndex].xsbs+";左上格(个):"+content.cdxxConfigs[this.deleteIndex].zsg+";右上格(个):"+content.cdxxConfigs[this.deleteIndex].ysg+";左下格(个):"+content.cdxxConfigs[this.deleteIndex].zxg+";右下格(个):"+content.cdxxConfigs[this.deleteIndex].yxg,
"value": "",
"title": "修改",
"time": moment().format("YYYY-MM-DD HH:mm:ss"),
"reason": data.remark
}
]
this.doDeleteParalleConfig(this.deleteIndex,record)
},
doDeleteParalleConfig(configIndex,newRecord){
//
const newConfigs = [...this.formData.cdxxConfigs]
newConfigs.splice(configIndex, 1)
this.$set(this.formData, 'cdxxConfigs', newConfigs)
//
this.$refs[refConf.cdxx]?.updateFormData('cdcs', newConfigs.length, {
isUpdateRecord: false,
signData: null
})
this.$nextTick(() => {
//
this.updatePjxbmd()
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: newRecord,
resourceList: null
})
})
},
}
}
</script>

+ 1
- 1
src/views/business/comps/template/comps/lba/LBA006.vue View File

@ -273,7 +273,7 @@ export default {
"fieldCn": this.$t('template.lba.lba006.fxxx','zh_CN'),
"fieldEn": this.$t('template.lba.lba006.fxxx','en_US'),
// "oldValue": content.paralleConfigs[this.deleteIndex].jcb+";"+content.paralleConfigs[this.deleteIndex].jg+";"+(content.paralleConfigs[this.deleteIndex].jg===''?''(content.paralleConfigs[this.deleteIndex].jgOther+";"))+content.paralleConfigs[this.deleteIndex].sjwjm,
"oldValue": content.paralleConfigs[this.deleteIndex].jcb+";"+content.paralleConfigs[this.deleteIndex].jg+";"+content.paralleConfigs[this.deleteIndex].jgOther+";"+content.paralleConfigs[this.deleteIndex].sjwjm,
"oldValue": '检测板:'+content.paralleConfigs[this.deleteIndex].jcb+";结果:"+content.paralleConfigs[this.deleteIndex].jg+(content.paralleConfigs[this.deleteIndex].jg=='接受'?'':('('+content.paralleConfigs[this.deleteIndex].jgOther+')'))+";数据文件名:"+content.paralleConfigs[this.deleteIndex].sjwjm,
"value": "",
"title": "修改",
"time": moment().format("YYYY-MM-DD HH:mm:ss"),

Loading…
Cancel
Save