修改页面路径

main
GaoF 2024-08-02 09:25:37 +08:00
parent 8eff8f1952
commit facfa8b2fa
36 changed files with 262 additions and 504 deletions

View File

@ -4,12 +4,14 @@
<a-col :span="item.span || 6" v-for="(item, index) in formItems" :key="index">
<a-form-item :label="item.label" :name="item.name" :rules="item.rules">
<component
v-if="!item.isUseSlot"
style="width: 100%"
:is="item.type"
v-model:value="model[item.name]"
:disabled="allDisabled"
v-bind="item.attrs"
/>
<slot :name="item.slotName" :item="item" :model="model" v-else></slot>
</a-form-item>
</a-col>
</a-row>

View File

@ -25,7 +25,7 @@
class="s-tool-item"
v-if="item.name === 'refresh' && props.toolConfig.refresh"
>
<component class="icons" :is="item.icon" @click="loadTreeData()"></component>
<component class="icons" :is="item.icon" @click="handleRefresh"></component>
</a-tooltip>
</span>
</div>
@ -91,7 +91,7 @@
}
})
const emit = defineEmits(['selectTree', 'delTree'])
const emit = defineEmits(['selectTree', 'delTree', 'treeRefresh'])
const tool = [
{
@ -124,7 +124,7 @@
{
id: 0,
parentId: '-1',
name: '顶级',
name: '所有',
children: ''
}
])
@ -154,11 +154,15 @@
})
}
const handleRefresh = () => {
loadTreeData()
emit('treeRefresh')
}
const loadTreeData = async () => {
try {
localLoading.value = true
const treeRes = await props.apiModel.getTree()
console.log(treeRes, 'treeRes')
if (Array.isArray(treeRes)) {
treeData.value[0].children = treeRes
} else {
@ -168,7 +172,7 @@
if (selectedKeys.value.length > 0) {
selectedKeys.value = []
props.tableRef.refresh()
// props.tableRef.refresh()
}
if (treeRow.id) {

View File

@ -143,7 +143,6 @@
emit('expand', expanded, record)
}
"
tableLayout="fixed"
@resizeColumn="handleResizeColumn"
:rowClassName="
(record, index) => (data.localSettings.rowClassNameSwitch ? ((index + 1) % 2 == 0 ? 'odd' : '') : null)

View File

@ -110,7 +110,7 @@
activeKey.value = to.path
if (to.name) {
vStore.pushViewTags(to)
kStore.pushKeepLive(to.name)
// kStore.pushKeepLive(to.name)
}
if (tagList.value.length - 1 > maxTabs.value) {
const firstTag = tagList.value[1]

View File

@ -42,7 +42,7 @@
</a-menu>
</template>
</a-dropdown>
<div v-if="setDrawer === 'true'" class="setting panel-item" @click="openSetting">
<div class="setting panel-item" @click="openSetting">
<layout-outlined />
</div>
</div>

View File

@ -18,7 +18,7 @@ export const viewTagsStore = defineStore('viewTags', () => {
const pushViewTags = (route) => {
const target = viewTags.value.find((item) => item.path === route.path)
const isName = route.name
if (!target && isName) {
if (!target) {
viewTags.value.push(route)
}
if (target) {

View File

@ -371,13 +371,13 @@ body,
.admin-ui-main{
&::-webkit-scrollbar {
/*滚动条整体样式*/
width : 0; /*高宽分别对应横竖滚动条的尺寸*/
height: 0;
width : 5px; /*高宽分别对应横竖滚动条的尺寸*/
height: 5px;
}
&::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius : 10px;
background-color: @component-background; // skyblue
background-color: #CCCCCC; // skyblue
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,

View File

@ -1,175 +1,59 @@
const cityOptions = [
{
"code": "110000",
"value": "北京市",
"label": "北京市",
"children": [
{
"code": "110101",
"value": "东城区",
"label": "东城区"
},
{
"code": "110102",
"value": "西城区",
"label": "西城区"
},
{
"code": "110105",
"value": "朝阳区",
"label": "朝阳区"
},
{
"code": "110106",
"value": "丰台区",
"label": "丰台区"
},
{
"code": "110107",
"value": "石景山区",
"label": "石景山区"
},
{
"code": "110108",
"value": "海淀区",
"label": "海淀区"
},
{
"code": "110109",
"value": "门头沟区",
"label": "门头沟区"
},
{
"code": "110111",
"value": "房山区",
"label": "房山区"
},
{
"code": "110112",
"value": "通州区",
"label": "通州区"
},
{
"code": "110113",
"value": "顺义区",
"label": "顺义区"
},
{
"code": "110114",
"value": "昌平区",
"label": "昌平区"
},
{
"code": "110115",
"value": "大兴区",
"label": "大兴区"
},
{
"code": "110116",
"value": "怀柔区",
"label": "怀柔区"
},
{
"code": "110117",
"value": "平谷区",
"label": "平谷区"
},
{
"code": "110118",
"value": "密云区",
"label": "密云区"
},
{
"code": "110119",
"value": "延庆区",
"label": "延庆区"
}
]
},
const cityOptions = [{
"code": "110000",
"label": "北京市",
"value": "北京市",
"children": [
{
"code": "110100",
"label": "北京市",
"value": "北京市",
"children": [
{ "code": "110101", "label": "东城区", "value": "东城区" },
{ "code": "110102", "label": "西城区", "value": "西城区" },
{ "code": "110105", "label": "朝阳区", "value": "朝阳区" },
{ "code": "110106", "label": "丰台区", "value": "丰台区" },
{ "code": "110107", "label": "石景山区", "value": "石景山区" },
{ "code": "110108", "label": "海淀区", "value": "海淀区" },
{ "code": "110109", "label": "门头沟区", "value": "门头沟区" },
{ "code": "110111", "label": "房山区", "value": "房山区" },
{ "code": "110112", "label": "通州区", "value": "通州区" },
{ "code": "110113", "label": "顺义区", "value": "顺义区" },
{ "code": "110114", "label": "昌平区", "value": "昌平区" },
{ "code": "110115", "label": "大兴区", "value": "大兴区" },
{ "code": "110116", "label": "怀柔区", "value": "怀柔区" },
{ "code": "110117", "label": "平谷区", "value": "平谷区" },
{ "code": "110228", "label": "密云区", "value": "密云区" },
{ "code": "110229", "label": "延庆区", "value": "延庆区" }
]
}
]
},
{
"code": "120000",
"value": "天津市",
"label": "天津市",
"value": "天津市",
"children": [
{
"code": "120101",
"value": "和平区",
"label": "和平区"
},
{
"code": "120102",
"value": "河东区",
"label": "河东区"
},
{
"code": "120103",
"value": "河西区",
"label": "河西区"
},
{
"code": "120104",
"value": "南开区",
"label": "南开区"
},
{
"code": "120105",
"value": "河北区",
"label": "河北区"
},
{
"code": "120106",
"value": "红桥区",
"label": "红桥区"
},
{
"code": "120110",
"value": "东丽区",
"label": "东丽区"
},
{
"code": "120111",
"value": "西青区",
"label": "西青区"
},
{
"code": "120112",
"value": "津南区",
"label": "津南区"
},
{
"code": "120113",
"value": "北辰区",
"label": "北辰区"
},
{
"code": "120114",
"value": "武清区",
"label": "武清区"
},
{
"code": "120115",
"value": "宝坻区",
"label": "宝坻区"
},
{
"code": "120116",
"value": "滨海新区",
"label": "滨海新区"
},
{
"code": "120117",
"value": "宁河区",
"label": "宁河区"
},
{
"code": "120118",
"value": "静海区",
"label": "静海区"
},
{
"code": "120119",
"value": "蓟州区",
"label": "蓟州区"
"code": "120100",
"label": "天津市",
"value": "天津市",
"children": [
{ "code": "120101", "label": "和平区", "value": "和平区" },
{ "code": "120102", "label": "河东区", "value": "河东区" },
{ "code": "120103", "label": "河西区", "value": "河西区" },
{ "code": "120104", "label": "南开区", "value": "南开区" },
{ "code": "120105", "label": "河北区", "value": "河北区" },
{ "code": "120106", "label": "红桥区", "value": "红桥区" },
{ "code": "120110", "label": "东丽区", "value": "东丽区" },
{ "code": "120111", "label": "西青区", "value": "西青区" },
{ "code": "120112", "label": "津南区", "value": "津南区" },
{ "code": "120113", "label": "北辰区", "value": "北辰区" },
{ "code": "120114", "label": "武清区", "value": "武清区" },
{ "code": "120115", "label": "宝坻区", "value": "宝坻区" },
{ "code": "120116", "label": "滨海新区", "value": "滨海新区" },
{ "code": "120117", "label": "静海区", "value": "静海区" },
{ "code": "120118", "label": "蓟州区", "value": "蓟州区" }
]
}
]
},
@ -4047,91 +3931,34 @@ const cityOptions = [
},
{
"code": "310000",
"value": "上海市",
"label": "上海市",
"value": "上海市",
"children": [
{
"code": "310101",
"value": "黄浦区",
"label": "黄浦区"
},
{
"code": "310104",
"value": "徐汇区",
"label": "徐汇区"
},
{
"code": "310105",
"value": "长宁区",
"label": "长宁区"
},
{
"code": "310106",
"value": "静安区",
"label": "静安区"
},
{
"code": "310107",
"value": "普陀区",
"label": "普陀区"
},
{
"code": "310109",
"value": "虹口区",
"label": "虹口区"
},
{
"code": "310110",
"value": "杨浦区",
"label": "杨浦区"
},
{
"code": "310112",
"value": "闵行区",
"label": "闵行区"
},
{
"code": "310113",
"value": "宝山区",
"label": "宝山区"
},
{
"code": "310114",
"value": "嘉定区",
"label": "嘉定区"
},
{
"code": "310115",
"value": "浦东新区",
"label": "浦东新区"
},
{
"code": "310116",
"value": "金山区",
"label": "金山区"
},
{
"code": "310117",
"value": "松江区",
"label": "松江区"
},
{
"code": "310118",
"value": "青浦区",
"label": "青浦区"
},
{
"code": "310120",
"value": "奉贤区",
"label": "奉贤区"
},
{
"code": "310151",
"value": "崇明区",
"label": "崇明区"
"code": "310100",
"label": "上海市",
"value": "上海市",
"children": [
{ "code": "310101", "label": "黄浦区", "value": "黄浦区" },
{ "code": "310104", "label": "徐汇区", "value": "徐汇区" },
{ "code": "310105", "label": "长宁区", "value": "长宁区" },
{ "code": "310106", "label": "静安区", "value": "静安区" },
{ "code": "310107", "label": "普陀区", "value": "普陀区" },
{ "code": "310109", "label": "虹口区", "value": "虹口区" },
{ "code": "310110", "label": "杨浦区", "value": "杨浦区" },
{ "code": "310112", "label": "浦东新区", "value": "浦东新区" },
{ "code": "310113", "label": "闵行区", "value": "闵行区" },
{ "code": "310114", "label": "宝山区", "value": "宝山区" },
{ "code": "310115", "label": "嘉定区", "value": "嘉定区" },
{ "code": "310116", "label": "南汇区", "value": "南汇区" },
{ "code": "310117", "label": "奉贤区", "value": "奉贤区" },
{ "code": "310118", "label": "青浦区", "value": "青浦区" },
{ "code": "310120", "label": "崇明区", "value": "崇明区" }
]
}
]
},
{
"code": "320000",
"value": "江苏省",
@ -11482,198 +11309,43 @@ const cityOptions = [
},
{
"code": "500000",
"value": "重庆市",
"label": "重庆市",
"value": "重庆市",
"children": [
{
"code": "500101",
"value": "万州区",
"label": "万州区"
},
{
"code": "500102",
"value": "涪陵区",
"label": "涪陵区"
},
{
"code": "500103",
"value": "渝中区",
"label": "渝中区"
},
{
"code": "500104",
"value": "大渡口区",
"label": "大渡口区"
},
{
"code": "500105",
"value": "江北区",
"label": "江北区"
},
{
"code": "500106",
"value": "沙坪坝区",
"label": "沙坪坝区"
},
{
"code": "500107",
"value": "九龙坡区",
"label": "九龙坡区"
},
{
"code": "500108",
"value": "南岸区",
"label": "南岸区"
},
{
"code": "500109",
"value": "北碚区",
"label": "北碚区"
},
{
"code": "500110",
"value": "綦江区",
"label": "綦江区"
},
{
"code": "500111",
"value": "大足区",
"label": "大足区"
},
{
"code": "500112",
"value": "渝北区",
"label": "渝北区"
},
{
"code": "500113",
"value": "巴南区",
"label": "巴南区"
},
{
"code": "500114",
"value": "黔江区",
"label": "黔江区"
},
{
"code": "500115",
"value": "长寿区",
"label": "长寿区"
},
{
"code": "500116",
"value": "江津区",
"label": "江津区"
},
{
"code": "500117",
"value": "合川区",
"label": "合川区"
},
{
"code": "500118",
"value": "永川区",
"label": "永川区"
},
{
"code": "500119",
"value": "南川区",
"label": "南川区"
},
{
"code": "500120",
"value": "璧山区",
"label": "璧山区"
},
{
"code": "500151",
"value": "铜梁区",
"label": "铜梁区"
},
{
"code": "500152",
"value": "潼南区",
"label": "潼南区"
},
{
"code": "500153",
"value": "荣昌区",
"label": "荣昌区"
},
{
"code": "500154",
"value": "开州区",
"label": "开州区"
},
{
"code": "500155",
"value": "梁平区",
"label": "梁平区"
},
{
"code": "500156",
"value": "武隆区",
"label": "武隆区"
},
{
"code": "500229",
"value": "城口县",
"label": "城口县"
},
{
"code": "500230",
"value": "丰都县",
"label": "丰都县"
},
{
"code": "500231",
"value": "垫江县",
"label": "垫江县"
},
{
"code": "500233",
"value": "忠县",
"label": "忠县"
},
{
"code": "500235",
"value": "云阳县",
"label": "云阳县"
},
{
"code": "500236",
"value": "奉节县",
"label": "奉节县"
},
{
"code": "500237",
"value": "巫山县",
"label": "巫山县"
},
{
"code": "500238",
"value": "巫溪县",
"label": "巫溪县"
},
{
"code": "500240",
"value": "石柱土家族自治县",
"label": "石柱土家族自治县"
},
{
"code": "500241",
"value": "秀山土家族苗族自治县",
"label": "秀山土家族苗族自治县"
},
{
"code": "500242",
"value": "酉阳土家族苗族自治县",
"label": "酉阳土家族苗族自治县"
},
{
"code": "500243",
"value": "彭水苗族土家族自治县",
"label": "彭水苗族土家族自治县"
"code": "500100",
"label": "重庆市",
"value": "重庆市",
"children": [
{ "code": "500101", "label": "渝中区", "value": "渝中区" },
{ "code": "500102", "label": "江北区", "value": "江北区" },
{ "code": "500103", "label": "南岸区", "value": "南岸区" },
{ "code": "500104", "label": "北碚区", "value": "北碚区" },
{ "code": "500105", "label": "渝北区", "value": "渝北区" },
{ "code": "500106", "label": "巴南区", "value": "巴南区" },
{ "code": "500107", "label": "合川区", "value": "合川区" },
{ "code": "500108", "label": "永川区", "value": "永川区" },
{ "code": "500109", "label": "江津区", "value": "江津区" },
{ "code": "500110", "label": "沙坪坝区", "value": "沙坪坝区" },
{ "code": "500111", "label": "九龙坡区", "value": "九龙坡区" },
{ "code": "500112", "label": "大渡口区", "value": "大渡口区" },
{ "code": "500113", "label": "铜梁区", "value": "铜梁区" },
{ "code": "500114", "label": "潼南区", "value": "潼南区" },
{ "code": "500115", "label": "荣昌区", "value": "荣昌区" },
{ "code": "500116", "label": "梁平区", "value": "梁平区" },
{ "code": "500117", "label": "武隆区", "value": "武隆区" },
{ "code": "500118", "label": "丰都县", "value": "丰都县" },
{ "code": "500119", "label": "忠县", "value": "忠县" },
{ "code": "500120", "label": "开县", "value": "开县" },
{ "code": "500121", "label": "云阳县", "value": "云阳县" },
{ "code": "500122", "label": "奉节县", "value": "奉节县" },
{ "code": "500123", "label": "巫山县", "value": "巫山县" },
{ "code": "500124", "label": "巫溪县", "value": "巫溪县" },
{ "code": "500125", "label": "石柱土家族自治县", "value": "石柱土家族自治县" },
{ "code": "500126", "label": "秀山土家族苗族自治县", "value": "秀山土家族苗族自治县" },
{ "code": "500127", "label": "酉阳土家族苗族自治县", "value": "酉阳土家族苗族自治县" },
{ "code": "500128", "label": "彭水苗族土家族自治县", "value": "彭水苗族土家族自治县" }
]
}
]
},
@ -16633,3 +16305,5 @@ const cityOptions = [
]
export default cityOptions

View File

@ -23,11 +23,6 @@
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="字段类型:" name="fieldType">
<a-input v-model:value="formData.fieldType" placeholder="请输入字段名" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="展示形式:" name="showType">
<a-select
@ -54,7 +49,7 @@
<a-col
:span="24"
v-if="formData.showType && formData.showType !== 'input' && formData.showType !== 'inputNumber'"
v-if="formData.showType && formData.showType !== 'a-input' && formData.showType !== 'a-input-number'"
>
<h3>扩展数据</h3>
<div v-for="(item, index) in selectableData" :key="index" class="mb-2">
@ -139,15 +134,14 @@
//
const formRules = {
name: [required('请输入名称')],
fieldType: [required('请输入类型')],
model: [required('请输入模块')]
}
//
const onSubmit = () => {
if (
formData.value.showType === 'select' &&
formData.value.showType === 'radio' &&
formData.value.showType === 'checkbox' &&
formData.value.showType === 'a-select' &&
formData.value.showType === 'a-radio-group' &&
formData.value.showType === 'a-checkbox-group' &&
selectableData.value.length === 0
) {
return message.error('请添加选项要展示的数据')
@ -156,7 +150,7 @@
formRef.value.validate().then(() => {
submitLoading.value = true
const formDataParam = cloneDeep(formData.value)
if (formDataParam.showType === 'input' || formDataParam.showType === 'inputNumber') {
if (formDataParam.showType === 'a-input' || formDataParam.showType === 'a-input-number') {
formDataParam.showValues = ''
} else {
formDataParam.showValues = JSON.stringify(selectableData.value)

View File

@ -62,10 +62,10 @@
<template v-if="column.dataIndex === 'action'">
<a-space>
<a @click="formRef.onOpen(record)" v-if="hasPerm('extendFieldEdit')"></a>
<a-divider type="vertical" v-if="hasPerm(['extendFieldEdit', 'extendFieldDelete'], 'and')" />
<!-- <a-divider type="vertical" v-if="hasPerm(['extendFieldEdit', 'extendFieldDelete'], 'and')" />
<a-popconfirm title="确定要删除吗?" @confirm="deleteExtendField(record)">
<a-button type="link" danger size="small" v-if="hasPerm('extendFieldDelete')"></a-button>
</a-popconfirm>
</a-popconfirm>-->
</a-space>
</template>
</template>

View File

@ -85,7 +85,7 @@
{
id: 0,
parentId: '0',
name: '顶级',
name: '所有',
children: res ? res : []
}
]

View File

@ -12,7 +12,40 @@
:model="formData"
:rules="formRules"
ref="formRef1"
/>
>
<template #provinceSlot="{ model, item }">
<a-select
:filter-option="filterOption"
show-search
placeholder="请选择省"
:options="cityOptions"
v-model:value="model[item.name]"
@change="onChangeProvince"
>
</a-select>
</template>
<template #citySlot="{ model, item }">
<a-select
:filter-option="filterOption"
show-search
placeholder="请选择市"
:options="cityOptionsCity"
v-model:value="model[item.name]"
@change="onChangeCity"
>
</a-select>
</template>
<template #countySlot="{ model, item }">
<a-select
:filter-option="filterOption"
show-search
placeholder="请选择区"
:options="cityOptionsCounty"
v-model:value="model[item.name]"
>
</a-select>
</template>
</DynamicForm>
</a-card>
<a-card :bordered="false" class="mt-4">
@ -47,6 +80,7 @@
provinceChange(value, options, record)
}
"
:filter-option="filterOption"
></a-select>
</template>
<template v-if="column.dataIndex === 'city'">
@ -59,10 +93,16 @@
cityChange(value, options, record)
}
"
:filter-option="filterOption"
></a-select>
</template>
<template v-if="column.dataIndex === 'county'">
<a-select style="width: 100%" :options="record.countyOptions" v-model:value="record.county"></a-select>
<a-select
:filter-option="filterOption"
style="width: 100%"
:options="record.countyOptions"
v-model:value="record.county"
></a-select>
</template>
<template v-if="column.dataIndex === 'remarks'">
<a-textarea style="width: 100%" v-model:value="record.remarks"></a-textarea>
@ -98,10 +138,20 @@
let detailData = reactive({})
//
const onCascaderChange = (value) => {
formData.province = value[0] && value[0]
formData.city = value[1] && value[1]
formData.county = value[2] && value[2]
let cityOptionsCity = ref([])
let cityOptionsCounty = ref([])
const onChangeProvince = (value, options) => {
console.log(options)
cityOptionsCity.value = options.children
}
const onChangeCity = (value, options) => {
cityOptionsCounty.value = options.children
}
const filterOption = (input, option) => {
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
const clientFormItems = reactive([
@ -179,17 +229,32 @@
}
},
{
label: '详细地址:',
name: 'provinceName',
type: 'a-cascader',
label: '省:',
name: 'province',
span: 8,
rules: [required('请选择详细地址')],
rules: [required('请选择省')],
isUseSlot: true,
slotName: 'provinceSlot',
attrs: {
placeholder: '请选择详细地址',
options: cityOptions,
onChange: onCascaderChange
placeholder: '请选择省'
}
},
{
label: '市:',
name: 'city',
span: 8,
rules: [required('请选择市')],
isUseSlot: true,
slotName: 'citySlot'
},
{
label: '区:',
name: 'county',
isUseSlot: true,
slotName: 'countySlot',
span: 8,
rules: [required('请选择区')],
},
{
name: 'address',
type: 'a-textarea',
@ -331,8 +396,6 @@
if (res) {
detailData = res
formData.provinceName = [res.province, res.city, res.county]
customerApi
.customerSaleAreaList({
customerId: res.id
@ -364,7 +427,14 @@
.then((res) => {
clientFormItems.forEach((item) => {
if (item.name === 'categoryId') {
item.attrs.treeData = res
item.attrs.treeData = [
{
id: 0,
parentId: '-1',
name: '所有',
children: res || []
}
]
}
})
})

View File

@ -43,6 +43,7 @@
}"
@selectTree="selectTree"
@delTree="delTree"
@treeRefresh="treeRefresh"
></dynamic-tree>
</a-col>
<a-col :span="18">
@ -145,7 +146,7 @@
import customerApi from '@/api/base/customer/customerApi'
import customerCategoryApi from '@/api/base/customer/customerCategoryApi'
import { useTableManagement } from '@/hook/useTableManagement'
import CustomerCategoryForm from '@/views/basicData/client/detail/CustomerCategoryForm.vue'
import CustomerCategoryForm from '@/views/productionBusiness/basicData/client/detail/CustomerCategoryForm.vue'
const clientColumn = [
{
@ -228,6 +229,11 @@
tableRef.value.refresh()
}
const treeRefresh = () => {
searchFormState.value.categoryId = null
tableRef.value.refresh()
}
const successful = () => {
searchFormState.value.categoryId = null
tableRef.value.refresh()

View File

@ -93,7 +93,7 @@
{
id: 0,
parentId: '0',
name: '顶级',
name: '所有',
children: res ? res : []
}
]

View File

@ -43,6 +43,7 @@
}"
@selectTree="selectTree"
@delTree="delTree"
@treeRefresh="treeRefresh"
></dynamic-tree>
</a-col>
<a-col :span="18">
@ -145,9 +146,9 @@
<script setup name="materiel">
import materialApi from '@/api/base/material/materialApi'
import materialCategoryApi from '@/api/base/material/materialCategoryApi'
import MaterialCategoryForm from '@/views/basicData/materiel/detail/materialCategoryForm.vue'
import MaterialCategoryForm from '@/views/productionBusiness/basicData/materiel/detail/materialCategoryForm.vue'
import { useTableManagement } from '@/hook/useTableManagement'
import { materielColumn } from '@/views/basicData/materiel/column/materiel-column'
import { materielColumn } from '@/views/productionBusiness/basicData/materiel/column/materiel-column'
const materialCategoryFormRef = ref(null)
const dynamicTreeRef = ref(null)
@ -178,6 +179,11 @@
tableRef.value.refresh()
}
const treeRefresh = () => {
searchFormState.value.categoryId = null
tableRef.value.refresh()
}
const delTree = () => {
searchFormState.value.categoryId = null
tableRef.value.refresh()

View File

@ -263,7 +263,7 @@
{
id: 0,
parentId: '-1',
name: '顶级',
name: '所有',
children: sysStoreTreeList || []
}
]

View File

@ -41,6 +41,7 @@
delTree: sysStoreApi.productionOrganizationDelete
}"
@selectTree="onSelectTree"
@treeRefresh="treeRefresh"
:toolConfig="{
plus: false,
edit: false,
@ -222,6 +223,11 @@
tableRef.value.refresh()
}
const treeRefresh = () => {
searchFormState.value.parentId = null
tableRef.value.refresh()
}
onMounted(() => {
dynamicTreeRef.value.loadTreeData()
})

View File

@ -74,8 +74,8 @@
</a-tree-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="厂家名称:" name="manufacturer" v-if="formData.type === 'FACTORY'">
<a-col :span="12" v-if="formData.type === 'FACTORY'">
<a-form-item label="厂家名称:" name="manufacturer">
<a-input
:disabled="pageType === 'SEARCH'"
v-model:value="formData.manufacturer"

View File

@ -56,6 +56,7 @@
}"
@selectTree="onSelectTree"
@delTree="delTree"
@treeRefresh="treeRefresh"
:toolConfig="{
plus: false,
edit: false,
@ -83,7 +84,7 @@
<a-space>
<a-button type="primary" @click="TissueFormRef.onOpen()" v-if="hasPerm('officialAccountAdd')">
<template #icon><plus-outlined /></template>
新增工厂
新增
</a-button>
<xn-batch-delete
v-if="hasPerm('officialAccountBatchDelete')"
@ -138,7 +139,7 @@
<script setup name="basicDataPublicAccount">
import productionOrganizationApi from '@/api/base/production-organization/productionOrganizationApi'
import { useTableManagement } from '@/hook/useTableManagement'
import TissueForm from '@/views/basicData/tissue/detail/TissueForm.vue'
import TissueForm from '@/views/productionBusiness/basicData/tissue/detail/TissueForm.vue'
import tool from '@/utils/tool'
const publicAccountColumn = [
@ -222,6 +223,11 @@
tableRef.value.refresh()
}
const treeRefresh = () => {
searchFormState.value.parentId = null
tableRef.value.refresh()
}
const successful = () => {
searchFormState.value.parentId = null
tableRef.value.refresh()

View File

@ -48,16 +48,6 @@ export const unitColumns = [
resizable: true,
align: 'center',
ellipsis: true
},
{
title: '换算率',
dataIndex: 'rate',
width: 200,
resizable: true,
align: 'center',
sorter: true,
sortDirections: ['descend', 'ascend'],
ellipsis: true
}
]
@ -65,7 +55,7 @@ export const unitGroupColumns = [
{
title: '名称',
dataIndex: 'name',
width: 180,
width: 100,
resizable: true,
align: 'center'
},

View File

@ -121,7 +121,7 @@
},
{
label: '换算率:',
name: 'number',
name: 'rate',
type: 'a-input-number',
span: 6,
attrs: {

View File

@ -90,11 +90,11 @@
:tool-config="options.toolConfig"
:row-selection="options.rowSelection"
:scroll="{
x: 100,
x: 1500,
y: 'calc(100vh - 300px)'
}"
>
<template #operator class="table-operator">
<template #operator>
<a-space>
<a-button
type="primary"
@ -160,7 +160,7 @@
</a-tooltip>
<a-divider type="vertical" v-if="hasPerm(['customerEdit', 'customerDelete'], 'and')" />
<a-popconfirm title="确定要删除吗?" @confirm="deleteSysUnit(record)">
<a-popconfirm title="确定要删除吗?" @confirm="deleteRecord(record)">
<a-button type="link" danger size="small" v-if="hasPerm('customerDelete')">
<DeleteOutlined />
<!-- 删除-->
@ -182,8 +182,8 @@
import sysUnitGroupsApi from '@/api/base/unit/unitGroupsApi'
import { message } from 'ant-design-vue'
import { unitColumns, unitGroupColumns } from '@/views/basicData/unit/columns/unitColumns'
import UnitGroupForm from '@/views/basicData/unit/detail/UnitGroupForm.vue'
import { unitColumns, unitGroupColumns } from '@/views/productionBusiness/basicData/unit/columns/unitColumns'
import UnitGroupForm from '@/views/productionBusiness/basicData/unit/detail/UnitGroupForm.vue'
import { useTableManagement } from '@/hook/useTableManagement'
import tool from '@/utils/tool'
@ -200,7 +200,8 @@
searchFormRef,
navigateTo,
toggleAdvanced,
advanced
advanced,
deleteRecord
} = useTableManagement(
{
page: sysUnitApi.sysUnitPage,