Commit 9ca545ae by 张珈源

feat(ckgl/cgdh): 添加采购组织字段并调整表单配置

- 在CgdhModel模型中新增cgzz字段替换原有的p4字段
- 在表格配置中添加采购组织列的显示和排序功能
- 在表单配置中添加采购组织输入框组件
- 调整工作流权限配置中的字段映射关系
- 恢复总数量字段的表单配置
- 移除未使用的getToken导入
- 修复代码中的语法错误和格式问题
parent 8fd6c4de
......@@ -31,6 +31,8 @@ export interface MesWarehouseArrivedPageModel {
kczz: string;
cgzz: string;
zsl: string;
zt: string;
......@@ -68,7 +70,7 @@ export interface MesWarehouseArrivedModel {
zt: string;
p4: string;
cgzz: string;
p5: string;
......
......@@ -117,6 +117,19 @@ export const columns: BasicColumn[] = [
{
resizable: true,
dataIndex: 'cgzz',
title: '采购组织',
componentType: 'input',
fixed: false,
sorter: true,
styleConfig: undefined,
listStyle: '',
},
{
resizable: true,
dataIndex: 'zsl',
title: '总数量',
componentType: 'number',
......@@ -497,28 +510,36 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '94f59d97b377411fb1097853bd9479b0',
field: 'fj',
label: '上传附件',
type: 'upload',
component: 'Upload',
key: '8b55245dd1cb473193b7302da6ec35be',
field: 'cgzz',
label: '采购组织',
type: 'input',
component: 'Input',
colProps: { span: 24 },
defaultValue: '',
componentProps: {
api: uploadApi,
width: '100%',
span: 7,
defaultValue: '',
accept: '',
maxNumber: 5,
maxSize: 5,
showLabel: true,
multiple: false,
placeholder: '请输入采购组织',
prefix: '',
suffix: '',
addonBefore: '',
addonAfter: '',
disabled: false,
allowClear: false,
showLabel: true,
required: false,
isShow: true,
rules: [],
events: {},
listType: 'text',
sourceType: 'album,camera',
listStyle: '',
isSave: false,
isShow: true,
scan: false,
bordered: true,
isShowAi: false,
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
......@@ -527,29 +548,28 @@ export const formProps: FormProps = {
span: 8,
list: [
{
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
key: '94f59d97b377411fb1097853bd9479b0',
field: 'fj',
label: '上传附件',
type: 'upload',
component: 'Upload',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
api: uploadApi,
span: 7,
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
defaultValue: '',
accept: '',
maxNumber: 5,
maxSize: 5,
showLabel: true,
controls: true,
multiple: false,
disabled: false,
required: false,
subTotal: false,
isShow: false,
rules: [],
isShow: true,
events: {},
listType: 'text',
sourceType: 'album,camera',
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
......@@ -649,7 +669,6 @@ export const formProps: FormProps = {
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: null,
datasourceType: 'dic',
params: { itemId: '2012042307269611522' },
labelField: 'name',
......@@ -671,6 +690,37 @@ export const formProps: FormProps = {
},
],
},
{
span: 8,
list: [
{
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
field: 'zsl',
label: '总数量',
type: 'number',
component: 'InputNumber',
colProps: { span: 24 },
defaultValue: 0,
componentProps: {
width: '100%',
span: 7,
defaultValue: 0,
min: 0,
step: 1,
disabled: false,
showLabel: true,
controls: true,
required: false,
subTotal: false,
isShow: false,
rules: [],
events: {},
tooltipConfig: { visible: false, title: '提示文本' },
style: { width: '100%' },
},
},
],
},
],
componentProps: {
gutter: 16,
......
......@@ -125,12 +125,12 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '上传附件',
fieldId: 'fj',
fieldName: '采购组织',
fieldId: 'cgzz',
isSubTable: false,
showChildren: true,
type: 'upload',
key: '94f59d97b377411fb1097853bd9479b0',
type: 'input',
key: '8b55245dd1cb473193b7302da6ec35be',
children: [],
options: {},
defaultValue: '',
......@@ -142,15 +142,15 @@ export const permissionList = [
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '总数量',
fieldId: 'zsl',
fieldName: '上传附件',
fieldId: 'fj',
isSubTable: false,
showChildren: true,
type: 'number',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
type: 'upload',
key: '94f59d97b377411fb1097853bd9479b0',
children: [],
options: {},
defaultValue: 0,
defaultValue: '',
},
{
required: false,
......@@ -203,6 +203,23 @@ export const permissionList = [
options: {},
},
{
required: false,
view: true,
edit: true,
disabled: false,
isSaveTable: false,
tableName: '',
fieldName: '总数量',
fieldId: 'zsl',
isSubTable: false,
showChildren: true,
type: 'number',
key: '4ca80a2d3a8244bc8d3380b6b0457c25',
children: [],
options: {},
defaultValue: 0,
},
{
required: true,
view: true,
edit: true,
......
......@@ -65,7 +65,6 @@
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
import { getMesWarehouseArrivedPage, deleteMesWarehouseArrived} from '/@/api/ckgl/cgdh';
import { getToken } from '/@/utils/auth';
import { ResizePageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
......@@ -78,6 +77,7 @@
import { useModal } from '/@/components/Modal';
......@@ -134,7 +134,7 @@
const buttonConfigs = computed(()=>{
const list = [{"buttonId":"2009445983314264064","name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"buttonId":"2009445983314264066","name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true,"isEnableLock":true},{"buttonId":"2009478676487966720","name":"同步","code":"get","icon":"ant-design:arrow-down-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"top","buttonType":"primary"},{"buttonId":"2012037219988561920","name":"生成入库单","code":"create","icon":"ant-design:download-outlined","isDefault":false,"isUse":true,"setting":[],"showType":"inline","buttonType":"primary"}]
return filterButtonAuth(list);
});
})
const tableButtonConfig = computed(() => {
return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
......@@ -144,7 +144,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
const btnEvent = {view : handleView,edit : handleEdit,create: handleCreate,}
const btnEvent = {view : handleView,edit : handleEdit,create : handleCreate}
const { currentRoute } = useRouter();
......@@ -311,6 +311,7 @@
openModal(true, info);
}
async function handleCreate(record: Recordable) {
try {
// 获取token\
......@@ -350,9 +351,6 @@
}
}
function getLessActions(record: Recordable) {
let list = getActions(record);
return list.slice(0, listSpliceNum.value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment