From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 四月 2025 12:18:03 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/module/voucher/options.jsx | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 105 insertions(+), 4 deletions(-) diff --git a/src/menu/components/module/voucher/options.jsx b/src/menu/components/module/voucher/options.jsx index 343594e..2f268e6 100644 --- a/src/menu/components/module/voucher/options.jsx +++ b/src/menu/components/module/voucher/options.jsx @@ -1,3 +1,4 @@ +import React from 'react' import MenuUtils from '@/utils/utils-custom.js' /** @@ -18,6 +19,17 @@ } }) + let menulist = sessionStorage.getItem('fstMenuList') + if (menulist) { + try { + menulist = JSON.parse(menulist) + } catch (e) { + menulist = [] + } + } else { + menulist = [] + } + modules = modules.filter(item => !bookids.includes(item.value)) const wrapForm = [ @@ -29,14 +41,25 @@ // required: false // }, { - type: 'radio', + type: 'select', field: 'type', label: '绫诲瀷', - initval: wrap.type || 'edit', + initval: wrap.type || 'createVoucher', required: true, options: [ - {value: 'edit', label: '缂栬緫'}, - {value: 'check', label: '鏌ョ湅'}, + {value: 'createVoucher', label: '鏂板鍑瘉'}, + {value: 'checkVoucher', label: '鏌ョ湅鍑瘉'}, + {value: 'createTemp', label: '鏂板妯℃澘'}, + {value: 'checkTemp', label: '缂栬緫妯℃澘'}, + ], + controlFields: [ + {field: 'businessType', values: ['createVoucher', 'checkVoucher']}, + {field: 'voucherType', values: ['createVoucher', 'checkVoucher']}, + {field: 'voucherTypeText', values: ['createVoucher', 'checkVoucher']}, + {field: 'voucherSign', values: ['createVoucher', 'checkVoucher']}, + {field: 'printTemp', values: ['createVoucher', 'checkVoucher']}, + {field: 'supModule', values: ['checkTemp', 'checkVoucher']}, + {field: 'attachStatus', values: ['createVoucher', 'checkVoucher']}, ] }, { @@ -68,6 +91,34 @@ allowClear: true }, { + type: 'text', + field: 'businessType', + label: '涓氬姟绫诲瀷', + initval: wrap.businessType || 'fcc01', + required: true + }, + { + type: 'text', + field: 'voucherType', + label: '鍑瘉绫诲瀷', + initval: wrap.voucherType || 'fcc_keeping', + required: true + }, + { + type: 'text', + field: 'voucherTypeText', + label: '鍑瘉绫诲瀷鏂囨湰', + initval: wrap.voucherTypeText || '璁拌处鍑瘉', + required: true + }, + { + type: 'text', + field: 'voucherSign', + label: '鍑瘉绫诲瀷鏍囪瘑', + initval: wrap.voucherSign || 'fcc_keeping', + required: true + }, + { type: 'cascader', field: 'supModule', label: '涓婄骇缁勪欢', @@ -76,6 +127,56 @@ options: modules, allowClear: true, }, + { + type: 'radio', + field: 'attachStatus', + label: '闄勪欢鐘舵��', + initval: wrap.attachStatus || 0, + tooltip: '娣诲姞鎴栦慨鏀瑰嚟璇佹椂锛屼笂浼犻檮浠剁殑鐘舵�併��', + required: true, + options: [ + {value: 0, label: '寰呭鏍�'}, + {value: 10, label: '宸插鏍�'}, + ] + }, + { + type: 'printTemps', + field: 'printTemp', + label: '鎵撳嵃妯℃澘', + initval: wrap.printTemp || '', + help: (record) => { + if (record.printTemp) { + return <span onClick={() => { + sessionStorage.setItem('mk-print-temp', record.printTemp) + window.open('#/hs') + + setTimeout(() => { + sessionStorage.removeItem('mk-print-temp') + }, 50) + }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#鏌ョ湅妯℃澘</span> + } + return '' + }, + required: true + }, + { + type: 'number', + field: 'space', + label: '鐣欑櫧', + initval: wrap.space || 0, + tooltip: '琛ㄦ牸涓讳綋閮ㄥ垎涓ょ鐨勭┖鐧借窛绂伙紝琛ㄦ牸鍦ㄧ紪杈戞椂涓ょ浼氭湁娣诲姞鍜屽垹闄ゅ浘鏍囥��', + required: false + }, + { + type: 'cascader', + field: 'linkmenu', + label: '鍒锋柊鑿滃崟', + initval: wrap.linkmenu || [], + tooltip: '鐐瑰嚮淇濆瓨鏃堕渶瑕佸埛鏂扮殑鑿滃崟銆�', + required: false, + allowClear: true, + options: menulist + } ] return wrapForm -- Gitblit v1.8.0