修改启用停用赋值
This commit is contained in:
parent
04a4b2322f
commit
63e26ddd76
|
|
@ -17,7 +17,7 @@
|
|||
<a-form-item name="categoryId">
|
||||
<template #label><span title="一级分类">一级分类</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.categoryId"
|
||||
:dictCode="`nu_config_material_category,category_name,id,del_flag = 0 and iz_enabled = 0 order by sort asc`"
|
||||
:dictCode="`nu_config_material_category,category_name,id,del_flag = 0 and iz_enabled = 'Y' order by sort asc`"
|
||||
placeholder="请选择一级分类" allowClear :ignoreDisabled="true"
|
||||
@select="handleSearch({ 'levle': 1, 'key': queryParam.categoryId }, false)" />
|
||||
<!-- <span v-else>请选择源平台</span> -->
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<a-form-item name="typeId">
|
||||
<template #label><span title="二级分类">二级分类</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.typeId"
|
||||
:dictCode="`nu_config_material_type,type_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || ''}' `"
|
||||
:dictCode="`nu_config_material_type,type_name,id,del_flag = 0 and iz_enabled = 'Y' and category_id = '${queryParam.categoryId || ''}' `"
|
||||
placeholder="请选择二级分类" allowClear :ignoreDisabled="true"
|
||||
@select="handleSearch({ 'levle': 2, 'categoryId': queryParam.categoryId, 'key': queryParam.typeId }, false)" />
|
||||
</a-form-item>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<a-form-item name="medicationId">
|
||||
<template #label><span title="三级分类">三级分类</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.medicationId"
|
||||
:dictCode="`nu_config_material_medication,medication_name,id,del_flag = 0 and iz_enabled = 0 and category_id = '${queryParam.categoryId || ''}' and type_id = '${queryParam.typeId || ''}' `"
|
||||
:dictCode="`nu_config_material_medication,medication_name,id,del_flag = 0 and iz_enabled ='Y' and category_id = '${queryParam.categoryId || ''}' and type_id = '${queryParam.typeId || ''}' `"
|
||||
placeholder="请选择三级分类" allowClear :ignoreDisabled="true"
|
||||
@select="handleSearch({ 'levle': 3, 'categoryId': queryParam.categoryId, 'typeId': queryParam.typeId, 'key': queryParam.medicationId }, false)" />
|
||||
</a-form-item>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<div style="text-align: right;float: right;">
|
||||
<a-radio-group v-model:value="treeParam.izEnabled" @change="getTreeData">
|
||||
<a-radio-button value="">全部</a-radio-button>
|
||||
<a-radio-button value="0">启用</a-radio-button>
|
||||
<a-radio-button value="y">启用</a-radio-button>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div style="text-align: right;float: left;" v-if="treeData.length == 0">
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
</template>
|
||||
<template #title>
|
||||
<span>{{ item?.title }}
|
||||
<span v-if="item?.izEnabled == '1'" style="color:red;">(已停用)</span>
|
||||
<span v-if="item?.izEnabled == 'N'" style="color:red;">(已停用)</span>
|
||||
<span v-show="item.showContent">
|
||||
<!-- 下拉菜单 -->
|
||||
<a-dropdown>
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
</template>
|
||||
<template #title>
|
||||
<span>{{ child?.title }}
|
||||
<span v-if="child?.izEnabled == '1'" style="color:red;">(已停用)</span>
|
||||
<span v-if="child?.izEnabled == 'N'" style="color:red;">(已停用)</span>
|
||||
<span v-show="child.showContent">
|
||||
<!-- 下拉菜单 -->
|
||||
<a-dropdown>
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
<Icon icon="ant-design:appstore-add-outlined" :size="20" v-else />
|
||||
</template>
|
||||
<span>{{ childThree?.title }}
|
||||
<span v-if="childThree?.izEnabled == '1'" style="color:red;">(已停用)</span>
|
||||
<span v-if="childThree?.izEnabled == 'N'" style="color:red;">(已停用)</span>
|
||||
<span v-show="childThree.showContent">
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
|
|
@ -188,7 +188,7 @@
|
|||
<Icon icon="ant-design:appstore-add-outlined" :size="20" v-else />
|
||||
</template>
|
||||
<span>{{ child?.title }}
|
||||
<span v-if="child?.izEnabled == '1'" style="color:red;">(已停用)</span>
|
||||
<span v-if="child?.izEnabled == 'N'" style="color:red;">(已停用)</span>
|
||||
<span v-show="child.showContent">
|
||||
<!-- 下拉菜单 -->
|
||||
<a-dropdown>
|
||||
|
|
@ -214,7 +214,7 @@
|
|||
<Icon icon="ant-design:appstore-add-outlined" :size="20" v-else />
|
||||
</template>
|
||||
<span>{{ item?.title }}
|
||||
<span v-if="item?.izEnabled == '1'" style="color:red;">(已停用)</span>
|
||||
<span v-if="item?.izEnabled == 'N'" style="color:red;">(已停用)</span>
|
||||
<span v-show="item.showContent">
|
||||
<!-- 下拉菜单 -->
|
||||
<a-dropdown>
|
||||
|
|
@ -371,7 +371,7 @@ const scrollY = computed(() => {
|
|||
});
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const treeParam = reactive<any>({ izEnabled: '0' });
|
||||
const treeParam = reactive<any>({ izEnabled: 'Y' });
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
|
|
@ -582,12 +582,12 @@ function getTableAction(record) {
|
|||
{
|
||||
label: '启用',
|
||||
onClick: handleWlQyty.bind(null, record),
|
||||
ifShow: record.izEnabled == 1
|
||||
ifShow: record.izEnabled == 'N'
|
||||
},
|
||||
{
|
||||
label: '停用',
|
||||
onClick: handleWlQyty.bind(null, record),
|
||||
ifShow: record.izEnabled == 0
|
||||
ifShow: record.izEnabled == 'Y'
|
||||
},
|
||||
{
|
||||
label: '迁移',
|
||||
|
|
@ -604,7 +604,7 @@ function handleWlqianyi(record: Recordable) {
|
|||
//物料的启用停用
|
||||
function handleWlQyty(record) {
|
||||
console.log("🚀 ~ handleWlQyty ~ record:", record)
|
||||
const izEnabled = record.izEnabled == '1' ? '0' : "1"
|
||||
const izEnabled = record.izEnabled == 'Y' ? 'N' : "Y"
|
||||
var params = { id: record.id, izEnabled }
|
||||
defHttp.post({ url: '/invoicing/configMaterialInfo/edit', params }).then((res) => {
|
||||
searchQuery()
|
||||
|
|
|
|||
|
|
@ -5,36 +5,36 @@
|
|||
<a href="javascript:;" class="abuttoncss" @click="handleAddbj(data)">添加本级</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="(data.levle == '1' || data.levle == '2') && data.tjxj == 0 && data.parentIzEnabled == 0 && data.izEnabled == '0'">
|
||||
v-if="(data.levle == '1' || data.levle == '2') && data.tjxj == 0 && data.parentIzEnabled == 'Y' && data.izEnabled == 'Y'">
|
||||
<Icon icon="ant-design:plus-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleAddxj(data)">添加下级</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="data?.children?.length == 0 && data.parentIzEnabled == 0 && data.izEnabled == '0'">
|
||||
v-if="data?.children?.length == 0 && data.parentIzEnabled == 'Y' && data.izEnabled == 'Y'">
|
||||
<Icon icon="ant-design:plus-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleAdd(data)">添加物料</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="data.parentIzEnabled == 0 && data.izEnabled == '0'">
|
||||
<a-menu-item v-if="data.parentIzEnabled == 'N' && data.izEnabled == 'Y'">
|
||||
<Icon icon="ant-design:edit-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleFenleiEdit(data)">编辑</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="(data.izEnabled == '1' && data.parentIzEnabled == 0) || (data.parentIzEnabled == 1 && data.levle == '1')">
|
||||
v-if="(data.izEnabled == 'N' && data.parentIzEnabled == 'Y') || (data.parentIzEnabled == 'N' && data.levle == '1')">
|
||||
<Icon icon="ant-design:check-circle-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleQyty(data, '0')">启用</a>
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleQyty(data, 'Y')">启用</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="data.izEnabled == '0'">
|
||||
<a-menu-item v-if="data.izEnabled == 'Y'">
|
||||
<Icon icon="ant-design:stop-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleQyty(data, '1')">停用</a>
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleQyty(data, 'N')">停用</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item
|
||||
v-if="(data.levle == '2' || data.levle == '3') && data.parentIzEnabled == 0 && data.izEnabled == '0'">
|
||||
v-if="(data.levle == '2' || data.levle == '3') && data.parentIzEnabled == 'Y' && data.izEnabled == 'Y'">
|
||||
<Icon icon="ant-design:copy-outlined" class="abuttoncss" />
|
||||
<a href="javascript:;" class="abuttoncss" @click="handleQianyi(data)">迁移</a>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item
|
||||
v-if="(data.levle == '2' || data.levle == '3') && data.parentIzEnabled == 1 && data.izEnabled == '1'">
|
||||
v-if="(data.levle == '2' || data.levle == '3') && data.parentIzEnabled == 'N' && data.izEnabled == 'N'">
|
||||
<span disabled>
|
||||
<Icon icon="ant-design:file-excel-outlined" />
|
||||
暂无操作
|
||||
|
|
|
|||
|
|
@ -54,33 +54,33 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1'">
|
||||
<a-form-item label="一级单位" v-bind="validateInfos.twoUnit" id="ConfigMaterialInfoForm-twoUnit" name="twoUnit">
|
||||
<a-input v-model:value="formData.twoUnit" placeholder="请输入一级单位" maxlength="10" ></a-input>
|
||||
<a-form-item label="一级单位" v-bind="validateInfos.oneUnit" id="ConfigMaterialInfoForm-oneUnit" name="oneUnit">
|
||||
<a-input v-model:value="formData.oneUnit" placeholder="请输入一级单位" maxlength="10" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1'">
|
||||
<a-form-item label="一级单位兑换比例" v-bind="validateInfos.twoUnitProportion" id="ConfigMaterialInfoForm-twoUnitProportion" name="twoUnitProportion">
|
||||
<a-input-number v-model:value="formData.twoUnitProportion" maxlength="10" placeholder="请输入一级单位兑换比例" style="width: 100%" />
|
||||
<a-form-item label="一级单位兑换比例" v-bind="validateInfos.oneUnitProportion" id="ConfigMaterialInfoForm-oneUnitProportion" name="oneUnitProportion">
|
||||
<a-input-number v-model:value="formData.oneUnitProportion" maxlength="10" placeholder="请输入一级单位兑换比例" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1'">
|
||||
<a-form-item label="一级单位价格" v-bind="validateInfos.twoUnitPrice" id="ConfigMaterialInfoForm-twoUnitPrice" name="twoUnitPrice">
|
||||
<a-input-number v-model:value="formData.twoUnitPrice" maxlength="10" placeholder="请输入一级单位价格" style="width: 100%" />
|
||||
<a-form-item label="一级单位价格" v-bind="validateInfos.oneUnitPrice" id="ConfigMaterialInfoForm-oneUnitPrice" name="oneUnitPrice">
|
||||
<a-input-number v-model:value="formData.oneUnitPrice" maxlength="10" placeholder="请输入一级单位价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
|
||||
<a-form-item label="二级单位" v-bind="validateInfos.oneUnit" id="ConfigMaterialInfoForm-oneUnit" name="oneUnit">
|
||||
<a-input v-model:value="formData.oneUnit" placeholder="请输入二级单位" maxlength="10" ></a-input>
|
||||
<a-form-item label="二级单位" v-bind="validateInfos.twoUnit" id="ConfigMaterialInfoForm-twoUnit" name="twoUnit">
|
||||
<a-input v-model:value="formData.twoUnit" placeholder="请输入二级单位" maxlength="10" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
|
||||
<a-form-item label="二级单位兑换比例" v-bind="validateInfos.oneUnitProportion" id="ConfigMaterialInfoForm-oneUnitProportion" name="oneUnitProportion">
|
||||
<a-input-number v-model:value="formData.oneUnitProportion" maxlength="10" placeholder="请输入二级单位兑换比例" style="width: 100%" />
|
||||
<a-form-item label="二级单位兑换比例" v-bind="validateInfos.twoUnitProportion" id="ConfigMaterialInfoForm-twoUnitProportion" name="twoUnitProportion">
|
||||
<a-input-number v-model:value="formData.twoUnitProportion" maxlength="10" placeholder="请输入二级单位兑换比例" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8" v-if="formData.multiUnitType == '1' || formData.multiUnitType == '2'">
|
||||
<a-form-item label="二级单位价格" v-bind="validateInfos.oneUnitPrice" id="ConfigMaterialInfoForm-oneUnitPrice" name="oneUnitPrice">
|
||||
<a-input-number v-model:value="formData.oneUnitPrice" maxlength="10" placeholder="请输入二级单位价格" style="width: 100%" />
|
||||
<a-form-item label="二级单位价格" v-bind="validateInfos.twoUnitPrice" id="ConfigMaterialInfoForm-twoUnitPrice" name="twoUnitPrice">
|
||||
<a-input-number v-model:value="formData.twoUnitPrice" maxlength="10" placeholder="请输入二级单位价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
|
|
|
|||
|
|
@ -245,15 +245,15 @@ function getTableAction(record) {
|
|||
// },
|
||||
{
|
||||
label: '启用',
|
||||
onClick: handleQyty.bind(null, record, '0'),
|
||||
onClick: handleQyty.bind(null, record, 'Y'),
|
||||
auth: 'warehouseMaterialInfo:bl_warehouse_material_info:edit',
|
||||
ifShow: record.izEnabled == '1'
|
||||
ifShow: record.izEnabled == 'N'
|
||||
},
|
||||
{
|
||||
label: '停用',
|
||||
onClick: handleQyty.bind(null, record, '1'),
|
||||
onClick: handleQyty.bind(null, record, 'N'),
|
||||
auth: 'warehouseMaterialInfo:bl_warehouse_material_info:edit',
|
||||
ifShow: record.izEnabled == '0'
|
||||
ifShow: record.izEnabled == 'Y'
|
||||
},
|
||||
{
|
||||
label: '记录',
|
||||
|
|
|
|||
Loading…
Reference in New Issue