Browse Source

feat: [模板管理] 模板表格修改

lkf
memorylkf 3 months ago
parent
commit
19898cef89
2 changed files with 26 additions and 10 deletions
  1. +24
    -8
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue
  2. +2
    -2
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js

+ 24
- 8
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue View File

@ -253,8 +253,8 @@ export default {
formData: { formData: {
immediate: true, immediate: true,
handler(v) { handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
this.getCode();
if(this.fillType === "actFill"){
this.getCode(v);
} }
} }
} }
@ -291,12 +291,28 @@ export default {
} }
}, },
// //
async getCode(){
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data)
async getCode(v){
debugger
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData.length,
})
if(result.code == 200){
debugger
if(stepTableFormData.length===0){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
[bhCode]: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
debugger
}
}
}
} }
}, },
// //

+ 2
- 2
src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js View File

@ -6,8 +6,8 @@ export const getSWYPFXFFXYPZBBTableConfig = ($this) => {
prop: 'bh', prop: 'bh',
bodyType: 'select', bodyType: 'select',
bodyOptions: $this.getDictOptions('business_jmdyzqdyp'), bodyOptions: $this.getDictOptions('business_jmdyzqdyp'),
subType: 'span',
subKey: 'bhCode',
bodySubType: 'span',
bodySubKey: 'bhCode',
bodyFillType: 'preFill', bodyFillType: 'preFill',
width: 280 width: 280
}, },

Loading…
Cancel
Save