修改供应商流程及页面

This commit is contained in:
yangjun 2026-03-20 15:33:16 +08:00
parent 173b328bc9
commit 0ea8888994
6 changed files with 144 additions and 75 deletions

View File

@ -15,7 +15,7 @@ export const columns: BasicColumn[] = [
title: '物料编码',
align: "center",
dataIndex: 'materialNo',
width:'100px',
width:'140px',
search: true,
},
{
@ -24,30 +24,6 @@ export const columns: BasicColumn[] = [
dataIndex: 'specificationModel',
search: true,
},
{
title: '销售单价',
align: "center",
dataIndex: 'salesUnitPrice',
width:'100px'
},
{
title: '参考单价',
align: "center",
dataIndex: 'referenceUnitPrice',
width:'100px'
},
{
title: '物料单位',
align: "center",
dataIndex: 'materialUnits',
width:'100px'
},
{
title: '供应商',
align: "center",
dataIndex: 'suppliers_dictText',
width:'200px'
},
{
title: '一级分类',
align: "center",
@ -66,24 +42,18 @@ export const columns: BasicColumn[] = [
dataIndex: 'medicationId_dictText',
width:'100px'
},
{
title: '物料上限',
align: "center",
dataIndex: 'upperLimit',
width:'100px'
},
{
title: '物料下限',
align: "center",
dataIndex: 'lowerLimit',
width:'100px'
},
{
title: '品牌型号',
align: "center",
dataIndex: 'brandType',
width:'100px'
},
{
title: '生产厂家',
align: "center",
dataIndex: 'manufacturer',
width:'100px'
},
// {
// title: '物料标签',
// align: "center",

View File

@ -33,7 +33,7 @@
<a-input v-model:value="formData.specificationModel" placeholder="请输入规格型号" maxlength="20" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<!-- <a-col :span="8">
<a-form-item label="销售单价" v-bind="validateInfos.salesUnitPrice" id="ConfigMaterialInfoForm-salesUnitPrice" name="salesUnitPrice">
<a-input v-model:value="formData.salesUnitPrice" placeholder="请输入销售单价" maxlength="10" style="width: 100%" />
</a-form-item>
@ -47,13 +47,23 @@
<a-form-item label="采购单位" v-bind="validateInfos.multiUnitType" id="ConfigMaterialInfoForm-multiUnitType" name="multiUnitType">
<j-dict-select-tag type='radio' v-model:value="formData.multiUnitType" dictCode="multiUnitType" placeholder="请选择多单位默认采购" />
</a-form-item>
</a-col> -->
<a-col :span="8" >
<a-form-item label="品牌型号" v-bind="validateInfos.brandType" id="ConfigMaterialInfoForm-brandType" name="brandType">
<a-input v-model:value="formData.brandType" maxlength="100" placeholder="请输入品牌型号" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="生产厂家" v-bind="validateInfos.manufacturer" id="ConfigMaterialInfoForm-manufacturer" name="manufacturer">
<a-input v-model:value="formData.manufacturer" maxlength="100" placeholder="请输入生产厂家" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigMaterialInfoForm-izEnabled" name="izEnabled">
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled" placeholder="请选择是否启用" />
</a-form-item>
</a-col>
<a-col :span="8">
<!-- <a-col :span="8">
<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>
@ -110,13 +120,13 @@
<a-form-item label="物料下限" v-bind="validateInfos.lowerLimit" id="ConfigMaterialInfoForm-lowerLimit" name="lowerLimit">
<a-input v-model:value="formData.lowerLimit" maxlength="10" placeholder="请输入物料下限" style="width: 100%" />
</a-form-item>
</a-col>
</a-col> -->
<!-- <a-col :span="8">
<a-form-item label="物料标签" v-bind="validateInfos.tagType" id="ConfigMaterialInfoForm-tagType" name="izEnabled">
<j-dict-select-tag type='list' v-model:value="formData.tagType" dictCode="wl_tag_type" placeholder="请选择物料标签" />
</a-form-item>
</a-col> -->
<a-col :span="8">
<!-- <a-col :span="8">
<a-form-item label="是否医保报销" v-bind="validateInfos.izYbbx" id="ConfigMaterialInfoForm-izYbbx" name="izYbbx">
<j-dict-select-tag type='list' v-model:value="formData.izYbbx" dictCode="yn" placeholder="请选择医保报销" />
</a-form-item>
@ -125,17 +135,12 @@
<a-form-item label="是否机构优惠" v-bind="validateInfos.izJgyh" id="ConfigMaterialInfoForm-izJgyh" name="izEnabled">
<j-dict-select-tag type='list' v-model:value="formData.izJgyh" dictCode="yn" placeholder="请选择机构优惠" />
</a-form-item>
</a-col>
<a-col :span="8" >
<a-form-item label="品牌型号" v-bind="validateInfos.brandType" id="ConfigMaterialInfoForm-brandType" name="brandType">
<a-input v-model:value="formData.brandType" maxlength="101" placeholder="请输入品牌型号" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
</a-col> -->
<!-- <a-col :span="24">
<a-form-item label="供应商" v-bind="validateInfos.suppliers" id="ConfigMaterialInfoForm-suppliers" name="suppliers" :labelCol="labelCol3" :wrapperCol="wrapperCol3">
<j-select-multiple placeholder="请选择供应商" v-model:value="formData.suppliers" dictCode="nu_config_suppliers_info,suppliers_name,id,del_flag = 0" />
</a-form-item>
</a-col>
</a-col> -->
<a-col :span="8">
<a-form-item label="物料图片" v-bind="validateInfos.materialImg" id="ConfigMaterialInfoForm-materialImg" name="materialImg">
<j-image-upload :fileMax="1" bizPath="wlpicPath" :value="formData.materialImg?formData.materialImg:(opeMediaAddress + defaultPrePic)" ></j-image-upload>
@ -205,6 +210,7 @@ const defaultPrePic = import.meta.env.VITE_DEFAULT_NULL_PIC//证件照默认图
izJgyh:'',
tagType:'',
brandType:'',
manufacturer:'',
});
const { createMessage } = useMessage();
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
@ -263,14 +269,8 @@ function getRemark(){
console.log("🚀 ~ edit ~ validatorRules:", validatorRules)
}else{
Object.assign(validatorRules, {materialName: [{ required: true, message: '请输入物料名称!'},],
salesUnitPrice: [{ required: true, message: '请输入销售单价!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
referenceUnitPrice: [{ required: true, message: '请输入参考单价!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
materialUnits: [{ required: true, message: '请输入物料单位!'}],
// suppliers: [{ required: true, message: '!'},],
izYbbx: [{ required: true, message: '请选择是否医保报销!'},],
izJgyh: [{ required: true, message: '请选择是否机构优惠!'},],
upperLimit: [{ required: true, message: '请输入物料上限!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
lowerLimit: [{ required: true, message: '请输入物料下限!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
specificationModel: [{ required: true, message: '请输入规格型号!'},],
materialNo: [{ required: true, message: '请输入物料编码!'},],
});
}

View File

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api {
list = '/bizSuppliers/nuBizSuppliersInfo/list',
syncList = '/bizSuppliers/nuBizSuppliersInfo/syncList',
save='/bizSuppliers/nuBizSuppliersInfo/add',
edit='/bizSuppliers/nuBizSuppliersInfo/edit',
deleteOne = '/bizSuppliers/nuBizSuppliersInfo/delete',
@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel;
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const syncList = (params) => defHttp.get({ url: Api.syncList, params });
/**
*

View File

@ -51,17 +51,34 @@ export const columns: BasicColumn[] = [
dataIndex: 'openingBankNo'
},
{
title: '资质照片',
title: '状态',
align: "center",
dataIndex: 'imgPath',
// customRender: render.renderImage,
dataIndex: 'izEnabled',
width: 100,
customRender: ({ text }) => {
const imageUrl = text ? opeMediaAddress + text : opeMediaAddress + import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC;
return render.renderImage({ text: imageUrl });
},
width: 100
let ret = "";
if(text == 'Y') {
ret = "启用";
} else if(text == 'N') {
ret = "禁用";
} else {
ret = "未合作";
}
return ret;
}
},
// {
// title: '资质照片',
// align: "center",
// dataIndex: 'imgPath',
// // customRender: render.renderImage,
// customRender: ({ text }) => {
// const imageUrl = text ? opeMediaAddress + text : opeMediaAddress + import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC;
// return render.renderImage({ text: imageUrl });
// },
// width: 100
// },
// {
// title: '入驻日期',
// align: "center",
// dataIndex: 'createTime',

View File

@ -4,14 +4,14 @@
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="6">
<a-form-item name="suppliersName">
<template #label><span title="供应商名称">供应商名称</span></template>
<JInput v-model:value="queryParam.suppliersName" placeholder="请输入供应商名称"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-form-item name="suppliersName">
<template #label><span title="供应商名称">供应商名称</span></template>
<JInput v-model:value="queryParam.suppliersName" placeholder="请输入供应商名称"/>
</a-form-item>
</a-col>
<a-col :xl="18" :lg="18" :md="18" :sm="24">
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
@ -22,7 +22,7 @@
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<BasicTable @register="registerTable">
<!--插槽:table标题-->
<template #tableTitle>
</template>
@ -43,13 +43,17 @@
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './NuBizSuppliersInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuBizSuppliersInfo.api';
import { syncList, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuBizSuppliersInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import NuBizSuppliersMateriallInfoModal from './NuBizSuppliersMateriallInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage, createConfirm } = useMessage();
const formRef = ref();
const emit = defineEmits(['register', 'ok']);
const queryParam = reactive<any>({});
@ -60,10 +64,11 @@ import { defHttp } from '/@/utils/http/axios';
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '供应商信息',
api: list,
api: syncList,
columns,
canResize:false,
useSearchForm: false,
showIndexColumn: true,
actionColumn: {
width: 120,
fixed: 'right',
@ -110,6 +115,60 @@ import { defHttp } from '/@/utils/http/axios';
function handleSuccess() {
(selectedRowKeys.value = []) && reload();
}
/**
* 合作
*/
async function handleWlType(record) {
var params = { id: record.id }
await createConfirm({
iconType: 'warning',
title: '确认合作',
content: '是否与此供应商进行合作',
okText: '确认',
cancelText: '取消',
onOk: () => {
console.log("🚀 ~ handleWlType ~ record:", record)
//
setTimeout(() => {
createMessage.success("更新成功!")
searchQuery();
}, 1000);
return defHttp.post({
url: '/invoicing/configSuppliersInfo/updateWlType',
params,
timeout: 100000
}).then((res) => {
// Promiseconfirm
return Promise.resolve();
}).catch(error => {
//
return Promise.resolve();
});
}
});
}
//
function handleWlQyty(record){
var labelTitle = record.izEnabled == 'N' ? '确认启用' : '确认停用'
var labelContent = record.izEnabled == 'N' ? '是否启用此供应商' : '是否停用此供应商'
createConfirm({
iconType: 'warning',
title: labelTitle,
content: labelContent,
okText: '确认',
cancelText: '取消',
onOk: () => {
const izEnabled = record.izEnabled == 'N' ? 'Y' : "N"
var params = {id:record.id,izEnabled}
return defHttp.post({ url: '/invoicing/configSuppliersInfo/edit', params }).then((res) => {
searchQuery()
});
}
});
}
/**
* 操作栏
@ -120,6 +179,21 @@ import { defHttp } from '/@/utils/http/axios';
label: '物料详情',
onClick: handleWlEdit.bind(null, record),
},
{
label: '合作',
onClick: handleWlType.bind(null, record),
ifShow: !record.izEnabled
},
{
label: '启用',
onClick: handleWlQyty.bind(null, record),
ifShow: record.izEnabled == 'N'
},
{
label: '停用',
onClick: handleWlQyty.bind(null, record),
ifShow: record.izEnabled == 'Y'
},
];
}

View File

@ -22,6 +22,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'brandType',
width: 200
},
{
title: '生产厂家',
align: "center",
dataIndex: 'manufacturer',
width: 200
},
{
title: '销售单价',
align: "center",