From 0ea88889948833b5c1efc8c2896304be04119454 Mon Sep 17 00:00:00 2001
From: yangjun <1173114630@qq.com>
Date: Fri, 20 Mar 2026 15:33:16 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94=E5=95=86?=
=?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=8F=8A=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ConfigMaterial/ConfigMaterialInfo.data.ts | 44 ++-------
.../components/ConfigMaterialInfoForm.vue | 40 ++++----
.../bizSuppliers/NuBizSuppliersInfo.api.ts | 2 +
.../bizSuppliers/NuBizSuppliersInfo.data.ts | 31 ++++--
.../bizSuppliers/NuBizSuppliersInfoList.vue | 96 ++++++++++++++++---
.../NuBizSuppliersMaterialInfo.data.ts | 6 ++
6 files changed, 144 insertions(+), 75 deletions(-)
diff --git a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfo.data.ts b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfo.data.ts
index ddb5f6a..23558db 100644
--- a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfo.data.ts
+++ b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfo.data.ts
@@ -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",
diff --git a/src/views/invoicing/ConfigMaterial/components/ConfigMaterialInfoForm.vue b/src/views/invoicing/ConfigMaterial/components/ConfigMaterialInfoForm.vue
index 06c50db..9153e7a 100644
--- a/src/views/invoicing/ConfigMaterial/components/ConfigMaterialInfoForm.vue
+++ b/src/views/invoicing/ConfigMaterial/components/ConfigMaterialInfoForm.vue
@@ -33,7 +33,7 @@
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
@@ -205,6 +210,7 @@ const defaultPrePic = import.meta.env.VITE_DEFAULT_NULL_PIC//证件照默认图
izJgyh:'',
tagType:'',
brandType:'',
+ manufacturer:'',
});
const { createMessage } = useMessage();
const labelCol = ref({ 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: '请输入物料编码!'},],
});
}
diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts
index 74bd19b..1609060 100644
--- a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts
+++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.api.ts
@@ -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 });
/**
* 删除单个
diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts
index 332fbc5..c25dc10 100644
--- a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts
+++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfo.data.ts
@@ -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',
diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue
index a898f1f..3807cec 100644
--- a/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue
+++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersInfoList.vue
@@ -4,14 +4,14 @@
-
+
@@ -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({});
@@ -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) => {
+ // 返回一个立即解决的Promise,确保confirm可以关闭
+ 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'
+ },
];
}
diff --git a/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts
index 3c6b08c..6771d18 100644
--- a/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts
+++ b/src/views/invoicing/bizSuppliers/NuBizSuppliersMaterialInfo.data.ts
@@ -22,6 +22,12 @@ export const columns: BasicColumn[] = [
dataIndex: 'brandType',
width: 200
},
+ {
+ title: '生产厂家',
+ align: "center",
+ dataIndex: 'manufacturer',
+ width: 200
+ },
{
title: '销售单价',
align: "center",