修改供应商流程及页面
This commit is contained in:
parent
173b328bc9
commit
0ea8888994
|
|
@ -15,7 +15,7 @@ export const columns: BasicColumn[] = [
|
||||||
title: '物料编码',
|
title: '物料编码',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'materialNo',
|
dataIndex: 'materialNo',
|
||||||
width:'100px',
|
width:'140px',
|
||||||
search: true,
|
search: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -24,30 +24,6 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'specificationModel',
|
dataIndex: 'specificationModel',
|
||||||
search: true,
|
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: '一级分类',
|
title: '一级分类',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
@ -66,24 +42,18 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'medicationId_dictText',
|
dataIndex: 'medicationId_dictText',
|
||||||
width:'100px'
|
width:'100px'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '物料上限',
|
|
||||||
align: "center",
|
|
||||||
dataIndex: 'upperLimit',
|
|
||||||
width:'100px'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '物料下限',
|
|
||||||
align: "center",
|
|
||||||
dataIndex: 'lowerLimit',
|
|
||||||
width:'100px'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '品牌型号',
|
title: '品牌型号',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'brandType',
|
dataIndex: 'brandType',
|
||||||
width:'100px'
|
width:'100px'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '生产厂家',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'manufacturer',
|
||||||
|
width:'100px'
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// title: '物料标签',
|
// title: '物料标签',
|
||||||
// align: "center",
|
// align: "center",
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
<a-input v-model:value="formData.specificationModel" placeholder="请输入规格型号" maxlength="20" ></a-input>
|
<a-input v-model:value="formData.specificationModel" placeholder="请输入规格型号" maxlength="20" ></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-item label="销售单价" v-bind="validateInfos.salesUnitPrice" id="ConfigMaterialInfoForm-salesUnitPrice" name="salesUnitPrice">
|
<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-input v-model:value="formData.salesUnitPrice" placeholder="请输入销售单价" maxlength="10" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -47,13 +47,23 @@
|
||||||
<a-form-item label="采购单位" v-bind="validateInfos.multiUnitType" id="ConfigMaterialInfoForm-multiUnitType" name="multiUnitType">
|
<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="请选择多单位默认采购" />
|
<j-dict-select-tag type='radio' v-model:value="formData.multiUnitType" dictCode="multiUnitType" placeholder="请选择多单位默认采购" />
|
||||||
</a-form-item>
|
</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>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ConfigMaterialInfoForm-izEnabled" name="izEnabled">
|
<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="请选择是否启用" />
|
<j-dict-select-tag type='radio' v-model:value="formData.izEnabled" dictCode="iz_enabled" placeholder="请选择是否启用" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-item label="一级单位" v-bind="validateInfos.oneUnit" id="ConfigMaterialInfoForm-oneUnit" name="oneUnit">
|
<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-input v-model:value="formData.oneUnit" placeholder="请输入一级单位" maxlength="10" ></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -110,13 +120,13 @@
|
||||||
<a-form-item label="物料下限" v-bind="validateInfos.lowerLimit" id="ConfigMaterialInfoForm-lowerLimit" name="lowerLimit">
|
<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-input v-model:value="formData.lowerLimit" maxlength="10" placeholder="请输入物料下限" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
<!-- <a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-item label="物料标签" v-bind="validateInfos.tagType" id="ConfigMaterialInfoForm-tagType" name="izEnabled">
|
<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="请选择物料标签" />
|
<j-dict-select-tag type='list' v-model:value="formData.tagType" dictCode="wl_tag_type" placeholder="请选择物料标签" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col> -->
|
</a-col> -->
|
||||||
<a-col :span="8">
|
<!-- <a-col :span="8">
|
||||||
<a-form-item label="是否医保报销" v-bind="validateInfos.izYbbx" id="ConfigMaterialInfoForm-izYbbx" name="izYbbx">
|
<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="请选择医保报销" />
|
<j-dict-select-tag type='list' v-model:value="formData.izYbbx" dictCode="yn" placeholder="请选择医保报销" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -125,17 +135,12 @@
|
||||||
<a-form-item label="是否机构优惠" v-bind="validateInfos.izJgyh" id="ConfigMaterialInfoForm-izJgyh" name="izEnabled">
|
<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="请选择机构优惠" />
|
<j-dict-select-tag type='list' v-model:value="formData.izJgyh" dictCode="yn" placeholder="请选择机构优惠" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
<a-col :span="8" >
|
<!-- <a-col :span="24">
|
||||||
<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-form-item label="供应商" v-bind="validateInfos.suppliers" id="ConfigMaterialInfoForm-suppliers" name="suppliers" :labelCol="labelCol3" :wrapperCol="wrapperCol3">
|
<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" />
|
<j-select-multiple placeholder="请选择供应商" v-model:value="formData.suppliers" dictCode="nu_config_suppliers_info,suppliers_name,id,del_flag = 0" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col> -->
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="物料图片" v-bind="validateInfos.materialImg" id="ConfigMaterialInfoForm-materialImg" name="materialImg">
|
<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>
|
<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:'',
|
izJgyh:'',
|
||||||
tagType:'',
|
tagType:'',
|
||||||
brandType:'',
|
brandType:'',
|
||||||
|
manufacturer:'',
|
||||||
});
|
});
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
|
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
|
||||||
|
|
@ -263,14 +269,8 @@ function getRemark(){
|
||||||
console.log("🚀 ~ edit ~ validatorRules:", validatorRules)
|
console.log("🚀 ~ edit ~ validatorRules:", validatorRules)
|
||||||
}else{
|
}else{
|
||||||
Object.assign(validatorRules, {materialName: [{ required: true, message: '请输入物料名称!'},],
|
Object.assign(validatorRules, {materialName: [{ required: true, message: '请输入物料名称!'},],
|
||||||
salesUnitPrice: [{ required: true, message: '请输入销售单价!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
|
specificationModel: [{ required: true, message: '请输入规格型号!'},],
|
||||||
referenceUnitPrice: [{ required: true, message: '请输入参考单价!'},{ pattern: /^\d+(\.\d+)?$/, message: '只能输入数字(可包含小数点)!' }],
|
materialNo: [{ required: true, 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: '只能输入数字(可包含小数点)!' }],
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
list = '/bizSuppliers/nuBizSuppliersInfo/list',
|
list = '/bizSuppliers/nuBizSuppliersInfo/list',
|
||||||
|
syncList = '/bizSuppliers/nuBizSuppliersInfo/syncList',
|
||||||
save='/bizSuppliers/nuBizSuppliersInfo/add',
|
save='/bizSuppliers/nuBizSuppliersInfo/add',
|
||||||
edit='/bizSuppliers/nuBizSuppliersInfo/edit',
|
edit='/bizSuppliers/nuBizSuppliersInfo/edit',
|
||||||
deleteOne = '/bizSuppliers/nuBizSuppliersInfo/delete',
|
deleteOne = '/bizSuppliers/nuBizSuppliersInfo/delete',
|
||||||
|
|
@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel;
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||||
|
export const syncList = (params) => defHttp.get({ url: Api.syncList, params });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除单个
|
* 删除单个
|
||||||
|
|
|
||||||
|
|
@ -51,17 +51,34 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'openingBankNo'
|
dataIndex: 'openingBankNo'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '资质照片',
|
title: '状态',
|
||||||
align: "center",
|
align: "center",
|
||||||
dataIndex: 'imgPath',
|
dataIndex: 'izEnabled',
|
||||||
// customRender: render.renderImage,
|
width: 100,
|
||||||
customRender: ({ text }) => {
|
customRender: ({ text }) => {
|
||||||
const imageUrl = text ? opeMediaAddress + text : opeMediaAddress + import.meta.env.VITE_DEFAULT_DIRECTIVE_PRE_PIC;
|
let ret = "";
|
||||||
return render.renderImage({ text: imageUrl });
|
if(text == 'Y') {
|
||||||
},
|
ret = "启用";
|
||||||
width: 100
|
} 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: '入驻日期',
|
// title: '入驻日期',
|
||||||
// align: "center",
|
// align: "center",
|
||||||
// dataIndex: 'createTime',
|
// dataIndex: 'createTime',
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@
|
||||||
<div class="jeecg-basic-table-form-container">
|
<div class="jeecg-basic-table-form-container">
|
||||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-form-item name="suppliersName">
|
<a-form-item name="suppliersName">
|
||||||
<template #label><span title="供应商名称">供应商名称</span></template>
|
<template #label><span title="供应商名称">供应商名称</span></template>
|
||||||
<JInput v-model:value="queryParam.suppliersName" placeholder="请输入供应商名称"/>
|
<JInput v-model:value="queryParam.suppliersName" placeholder="请输入供应商名称"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="18" :lg="18" :md="18" :sm="24">
|
||||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
|
||||||
<a-col :lg="6">
|
<a-col :lg="6">
|
||||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
<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>
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
<BasicTable @register="registerTable">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -43,13 +43,17 @@
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { columns, superQuerySchema } from './NuBizSuppliersInfo.data';
|
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 { downloadFile } from '/@/utils/common/renderUtils';
|
||||||
import NuBizSuppliersMateriallInfoModal from './NuBizSuppliersMateriallInfoModal.vue'
|
import NuBizSuppliersMateriallInfoModal from './NuBizSuppliersMateriallInfoModal.vue'
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const { createMessage, createConfirm } = useMessage();
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const emit = defineEmits(['register', 'ok']);
|
const emit = defineEmits(['register', 'ok']);
|
||||||
const queryParam = reactive<any>({});
|
const queryParam = reactive<any>({});
|
||||||
|
|
@ -60,10 +64,11 @@ import { defHttp } from '/@/utils/http/axios';
|
||||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||||
tableProps: {
|
tableProps: {
|
||||||
title: '供应商信息',
|
title: '供应商信息',
|
||||||
api: list,
|
api: syncList,
|
||||||
columns,
|
columns,
|
||||||
canResize:false,
|
canResize:false,
|
||||||
useSearchForm: false,
|
useSearchForm: false,
|
||||||
|
showIndexColumn: true,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 120,
|
width: 120,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
|
@ -110,6 +115,60 @@ import { defHttp } from '/@/utils/http/axios';
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
(selectedRowKeys.value = []) && reload();
|
(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: '物料详情',
|
label: '物料详情',
|
||||||
onClick: handleWlEdit.bind(null, record),
|
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'
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,12 @@ export const columns: BasicColumn[] = [
|
||||||
dataIndex: 'brandType',
|
dataIndex: 'brandType',
|
||||||
width: 200
|
width: 200
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '生产厂家',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'manufacturer',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '销售单价',
|
title: '销售单价',
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue