|
|
|
@ -49,6 +49,7 @@ |
|
|
|
<StepFormPackage ref = "stepFormPackageFivthRef" prefixKey="xb_czdwb" :form-config="stepFivthConfig" :formData = "formData" /> |
|
|
|
<CustomTable |
|
|
|
:ref="`tableSecondRef`" |
|
|
|
@clickButton="handleClickButton" |
|
|
|
:columns="tableSecondColumns" |
|
|
|
:formData="{stepTableFormData:formData.stepTableFormData_1,headerSelectFields:{}}" |
|
|
|
:prefixKey = "`tableSecond`" |
|
|
|
@ -96,6 +97,7 @@ import { debounce } from 'lodash-es' |
|
|
|
import TableOpertaionDelete from "@/components/Template/operation/TableOpertaionDelete.vue" |
|
|
|
import StepFormPackage from "@/components/Template/StepFormPackage.vue" |
|
|
|
import { getStepSecond, getStepThird, getStepFourth, getStepFivth, getStepSixth} from "../../formConfig/xb/xb001.js"; |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "XB001", |
|
|
|
@ -256,10 +258,11 @@ export default { |
|
|
|
bodyType: 'input', |
|
|
|
bodySubType: 'button', |
|
|
|
bodySubButtonName: 'template.xb.xb001.ks', |
|
|
|
bodySubKey: 'startTime', |
|
|
|
bodySubKey: 'startTime1', |
|
|
|
bodySubFillType: 'actFill', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
width: 280, |
|
|
|
bodyDisabled: true, |
|
|
|
bodyMaxlength: 50, |
|
|
|
}, |
|
|
|
{ |
|
|
|
@ -268,9 +271,10 @@ export default { |
|
|
|
bodyType: 'input', |
|
|
|
bodySubType: 'button', |
|
|
|
bodySubButtonName: 'template.xb.xb001.js', |
|
|
|
bodySubKey: 'endTime', |
|
|
|
bodySubKey: 'endTime1', |
|
|
|
bodySubFillType: 'actFill', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyDisabled: true, |
|
|
|
width: 280, |
|
|
|
bodyMaxlength: 50, |
|
|
|
}, |
|
|
|
@ -338,6 +342,22 @@ export default { |
|
|
|
tableRef2.deleteRow(rowIndex); |
|
|
|
} |
|
|
|
}, |
|
|
|
//第五步表格按钮点击 |
|
|
|
handleClickButton(e, rowIndex) { |
|
|
|
const arrStr = typeof e === 'string' ? e.slice(0, -1) : ''; |
|
|
|
const updateData = { [arrStr]: moment().format('YYYY/MM/DD HH:mm') }; |
|
|
|
this.$refs.tableSecondRef?.updateDataSourceByRowIndex(rowIndex, updateData); |
|
|
|
let { stepTableFormData_1 = [] } = this.getFilledFormData() |
|
|
|
stepTableFormData_1?.map((item,index)=>{ |
|
|
|
if(item.startTime && item.endTime){ |
|
|
|
const m1 = moment(item.startTime); |
|
|
|
const m2 = moment(item.endTime); |
|
|
|
const diffMinutes = m2.diff(m1, 'minutes'); |
|
|
|
this.$refs.tableSecondRef?.updateDataSourceByRowIndex(index, { fysc: diffMinutes }); |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(this.getFilledFormData()) |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|