修改采购流程代码
This commit is contained in:
parent
2f5a87de02
commit
e8396f269c
|
|
@ -39,7 +39,7 @@
|
|||
<a-row>
|
||||
<a-col v-for="(item, index) in dataList" :key="index"
|
||||
:style="{ 'padding-right': (index + 1) % 4 === 0 ? '0px' : '14px', 'margin-bottom': '14px' }" :xs="24" :sm="24"
|
||||
:md="12" :lg="12" :xl="8" :xxl="6">
|
||||
:md="12" :lg="12" :xl="8" :xxl="8">
|
||||
<a-row style="padding: 14px;background-color: white;border-radius: 10px;height: 180px;">
|
||||
<a-col :span="4" style="padding-left: 8px;">
|
||||
<img :src="item.headPath ? (opeMediaAddress +item.headPath) : (opeMediaAddress + mrtxPic)" style="width: 48px;height:48px;border-radius: 45px;" />
|
||||
|
|
|
|||
|
|
@ -16,12 +16,6 @@
|
|||
<a-input v-model:value="formData.nuName" placeholder="请输入区域名称" maxLength="15" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="区域属性" v-bind="validateInfos.areaFlag" id="NuBaseInfoForm-areaFlag" name="areaFlag">
|
||||
<j-dict-select-tag v-model:value="formData.areaFlag" dictCode="nu_type" :disabled="true"
|
||||
placeholder="请选择区域属性ID" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="二维码" v-bind="validateInfos.ewm" id="NuBaseInfoForm-ewm" name="ewm">
|
||||
<QRCodeWithLogo
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ export const refundTableSchema: BasicColumn[] = [
|
|||
dataIndex: 't3',
|
||||
},
|
||||
{
|
||||
title: '单价 ',
|
||||
title: '价格 ',
|
||||
width: 150,
|
||||
dataIndex: 't4',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ export const superQuerySchema = {
|
|||
materialName: {title: '物料名称',order: 3,view: 'text', type: 'string',},
|
||||
materialNo: {title: '物料编码',order: 4,view: 'text', type: 'string',},
|
||||
specificationModel: {title: '规格型号',order: 5,view: 'text', type: 'string',},
|
||||
salesUnitPrice: {title: '销售单价',order: 6,view: 'number', type: 'number',},
|
||||
referenceUnitPrice: {title: '参考单价',order: 7,view: 'number', type: 'number',},
|
||||
salesUnitPrice: {title: '销售价格',order: 6,view: 'number', type: 'number',},
|
||||
referenceUnitPrice: {title: '参考价格',order: 7,view: 'number', type: 'number',},
|
||||
materialUnits: {title: '物料单位',order: 8,view: 'text', type: 'string',},
|
||||
multiUnitSwitch: {title: '多单位开关',order: 9,view: 'switch', type: 'string',},
|
||||
oneUnit: {title: '父级单位',order: 10,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export const columns: BasicColumn[] = [
|
|||
width: 200
|
||||
},
|
||||
{
|
||||
title: '采购单价',
|
||||
title: '采购价格',
|
||||
align: "center",
|
||||
dataIndex: 'salesUnitPrice',
|
||||
width: 100
|
||||
|
|
@ -108,6 +108,6 @@ export const superQuerySchema = {
|
|||
materialName: {title: '物料名称',order: 1,view: 'text', type: 'string',},
|
||||
specificationModel: {title: '规格型号',order: 2,view: 'text', type: 'string',},
|
||||
brandType: {title: '品牌型号',order: 3,view: 'text', type: 'string',},
|
||||
salesUnitPrice: {title: '销售单价',order: 4,view: 'number', type: 'number',},
|
||||
salesUnitPrice: {title: '销售价格',order: 4,view: 'number', type: 'number',},
|
||||
salesUnit: {title: '销售单位',order: 5,view: 'text', type: 'string',},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="销售单价" v-bind="validateInfos.salesUnitPrice" id="NuBizSuppliersMaterialInfoForm-salesUnitPrice" name="salesUnitPrice">
|
||||
<a-input-number v-model:value="formData.salesUnitPrice" placeholder="请输入销售单价" style="width: 100%" />
|
||||
<a-form-item label="销售价格" v-bind="validateInfos.salesUnitPrice" id="NuBizSuppliersMaterialInfoForm-salesUnitPrice" name="salesUnitPrice">
|
||||
<a-input-number v-model:value="formData.salesUnitPrice" placeholder="请输入销售价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { getWeekMonthQuarterYear } from '/@/utils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
// {
|
||||
// title: '请购单id',
|
||||
// title: '采购单id',
|
||||
// align: "center",
|
||||
// dataIndex: 'mainId'
|
||||
// },
|
||||
|
|
@ -51,7 +51,7 @@ export const columns: BasicColumn[] = [
|
|||
// dataIndex: 'suppliersName'
|
||||
// },
|
||||
{
|
||||
title: '请购数量',
|
||||
title: '采购数量',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity'
|
||||
},
|
||||
|
|
@ -76,7 +76,7 @@ export const columns: BasicColumn[] = [
|
|||
// dataIndex: 'wrksl'
|
||||
// },
|
||||
// {
|
||||
// title: '采购单价',
|
||||
// title: '采购价格',
|
||||
// align: "center",
|
||||
// dataIndex: 'procurementPrice'
|
||||
// },
|
||||
|
|
@ -93,17 +93,97 @@ export const rkcolumns: BasicColumn[] = [
|
|||
{
|
||||
title: '物料编码',
|
||||
align: "center",
|
||||
dataIndex: 'wlMaterialNo'
|
||||
dataIndex: 'wlMaterialNo',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
align: "center",
|
||||
dataIndex: 'wlName'
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
align: "center",
|
||||
dataIndex: 'wlSpecificationModel'
|
||||
},
|
||||
{
|
||||
title: '品牌型号',
|
||||
align: "center",
|
||||
dataIndex: 'brandType'
|
||||
},
|
||||
{
|
||||
title: '生产厂家',
|
||||
align: "center",
|
||||
dataIndex: 'manufacturer'
|
||||
},
|
||||
// {
|
||||
// title: '库房',
|
||||
// align: "center",
|
||||
// dataIndex: 'nuId'
|
||||
// },
|
||||
{
|
||||
title: '采购单位',
|
||||
align: "center",
|
||||
dataIndex: 'wlUnits'
|
||||
dataIndex: 'wlUnits',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '采购价格',
|
||||
align: "center",
|
||||
dataIndex: 'procurementPrice',
|
||||
width: 90
|
||||
},
|
||||
// {
|
||||
// title: '到货价格',
|
||||
// align: "center",
|
||||
// dataIndex: 'arrivalPrice',
|
||||
// width: 100
|
||||
// },
|
||||
{
|
||||
title: '采购数量',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '入库数量',
|
||||
align: "center",
|
||||
dataIndex: 'rksl',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '未入库数量',
|
||||
align: "center",
|
||||
dataIndex: 'wrksl',
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: '销账数量',
|
||||
align: "center",
|
||||
dataIndex: 'xzsl',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
dataIndex: 'action',
|
||||
width: 80
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const rkDetailColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '物料编码',
|
||||
align: "center",
|
||||
dataIndex: 'wlMaterialNo',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
align: "center",
|
||||
dataIndex: 'wlName'
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
|
|
@ -111,50 +191,62 @@ export const rkcolumns: BasicColumn[] = [
|
|||
dataIndex: 'wlSpecificationModel'
|
||||
},
|
||||
{
|
||||
title: '上限',
|
||||
title: '品牌型号',
|
||||
align: "center",
|
||||
dataIndex: 'wlUpperLimit'
|
||||
dataIndex: 'brandType'
|
||||
},
|
||||
{
|
||||
title: '下限',
|
||||
title: '生产厂家',
|
||||
align: "center",
|
||||
dataIndex: 'wlLowerLimit'
|
||||
dataIndex: 'manufacturer'
|
||||
},
|
||||
{
|
||||
title: '库房',
|
||||
title: '采购单位',
|
||||
align: "center",
|
||||
dataIndex: 'nuId'
|
||||
dataIndex: 'wlUnits',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '采购单价',
|
||||
title: '采购价格',
|
||||
align: "center",
|
||||
dataIndex: 'procurementPrice'
|
||||
dataIndex: 'procurementPrice',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '到货单价',
|
||||
title: '到货价格',
|
||||
align: "center",
|
||||
dataIndex: 'arrivalPrice'
|
||||
dataIndex: 'arrivalPrice',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '请购数量',
|
||||
title: '采购数量',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity'
|
||||
dataIndex: 'purchaseQuantity',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '入库数量',
|
||||
align: "center",
|
||||
dataIndex: 'rksl'
|
||||
dataIndex: 'rksl',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '未入库数量',
|
||||
align: "center",
|
||||
dataIndex: 'wrksl'
|
||||
dataIndex: 'wrksl',
|
||||
width: 110
|
||||
},
|
||||
{
|
||||
title: '销账数量',
|
||||
align: "center",
|
||||
dataIndex: 'xzsl',
|
||||
width: 90
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
mainId: {title: '请购单id',order: 0,view: 'text', type: 'string',},
|
||||
mainId: {title: '采购单id',order: 0,view: 'text', type: 'string',},
|
||||
cgdId: {title: '采购单id',order: 1,view: 'text', type: 'string',},
|
||||
wlMaterialNo: {title: '物料编码',order: 2,view: 'text', type: 'string',},
|
||||
wlName: {title: '物料名称',order: 3,view: 'text', type: 'string',},
|
||||
|
|
@ -163,11 +255,11 @@ export const superQuerySchema = {
|
|||
wlUpperLimit: {title: '上限',order: 6,view: 'text', type: 'string',},
|
||||
wlLowerLimit: {title: '下限',order: 7,view: 'text', type: 'string',},
|
||||
suppliersName: {title: '供应商名称',order: 8,view: 'text', type: 'string',},
|
||||
purchaseQuantity: {title: '请购数量',order: 9,view: 'number', type: 'number',},
|
||||
purchaseQuantity: {title: '采购数量',order: 9,view: 'number', type: 'number',},
|
||||
brand: {title: '银行',order: 10,view: 'text', type: 'string',},
|
||||
nuId: {title: '库房',order: 11,view: 'text', type: 'string',},
|
||||
rksl: {title: '入库数量',order: 12,view: 'text', type: 'string',},
|
||||
wrksl: {title: '未入库数量',order: 13,view: 'text', type: 'string',},
|
||||
procurementPrice: {title: '采购单价',order: 14,view: 'text', type: 'string',},
|
||||
procurementPrice: {title: '采购价格',order: 14,view: 'text', type: 'string',},
|
||||
arrivalPrice: {title: '到货单间',order: 15,view: 'text', type: 'string',},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ enum Api {
|
|||
exportXls = '/cgd/nuInvoicingCgdMain/exportXls',
|
||||
auditInfo='/cgd/nuInvoicingCgdMain/auditInfo',
|
||||
rukuInfo='/cgd/nuInvoicingCgdMain/rukuInfo',
|
||||
queryCgdList='/api/pad/invoicing/queryCgdList',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -38,6 +39,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
|
|||
* @param params
|
||||
*/
|
||||
export const calcList = (params) => defHttp.get({ url: Api.calcList, params });
|
||||
export const queryCgdList = (params) => defHttp.get({ url: Api.queryCgdList, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'gysId_dictText'
|
||||
},
|
||||
{
|
||||
title: '请购时间',
|
||||
title: '采购时间',
|
||||
align: "center",
|
||||
dataIndex: 'qgDate',
|
||||
customRender:({text}) =>{
|
||||
|
|
@ -25,7 +25,7 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: '请购人',
|
||||
title: '采购人',
|
||||
align: "center",
|
||||
dataIndex: 'qgBy'
|
||||
},
|
||||
|
|
@ -47,13 +47,33 @@ export const columns: BasicColumn[] = [
|
|||
{
|
||||
title: '状态',
|
||||
align: "center",
|
||||
dataIndex: 'status_dictText'
|
||||
dataIndex: 'status_dictText',
|
||||
width: 90
|
||||
},
|
||||
{
|
||||
title: '采购单类型',
|
||||
title: '供应商是否确认',
|
||||
align: "center",
|
||||
dataIndex: 'cgdType_dictText'
|
||||
dataIndex: 'izGysConfirmed',
|
||||
width: 140,
|
||||
customRender:({text}) =>{
|
||||
return text == 'N' ? '否' : '是';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '机构是否确认',
|
||||
align: "center",
|
||||
dataIndex: 'izOrgConfirmed',
|
||||
width: 140,
|
||||
customRender:({text}) =>{
|
||||
return text == 'N' ? '否' : '是';
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '采购单类型',
|
||||
// align: "center",
|
||||
// dataIndex: 'cgdType_dictText',
|
||||
// width: 120
|
||||
// },
|
||||
// {
|
||||
// title: '审核人',
|
||||
// align: "center",
|
||||
|
|
@ -68,11 +88,11 @@ export const columns: BasicColumn[] = [
|
|||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
qgdId: {title: '请购单id',order: 0,view: 'text', type: 'string',},
|
||||
qgdId: {title: '采购单id',order: 0,view: 'text', type: 'string',},
|
||||
cgdNo: {title: '采购单单号',order: 1,view: 'text', type: 'string',},
|
||||
gysId: {title: '供应商id',order: 2,view: 'text', type: 'string',},
|
||||
qgDate: {title: '请购时间',order: 3,view: 'date', type: 'string',},
|
||||
qgBy: {title: '请购人',order: 4,view: 'text', type: 'string',},
|
||||
qgDate: {title: '采购时间',order: 3,view: 'date', type: 'string',},
|
||||
qgBy: {title: '采购人',order: 4,view: 'text', type: 'string',},
|
||||
gysLxr: {title: '供应商联系人',order: 5,view: 'text', type: 'string',},
|
||||
gysLxrdh: {title: '供应商联系电话',order: 6,view: 'text', type: 'string',},
|
||||
gysFkfs: {title: '付款方式',order: 7,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<a-row :gutter="24">
|
||||
<!-- <a-col :lg="6">
|
||||
<a-form-item name="qgdId">
|
||||
<template #label><span title="请购单单号">请购单单号</span></template>
|
||||
<j-input placeholder="请输入请购单单号" v-model:value="queryParam.qgdNo" allow-clear ></j-input>
|
||||
<template #label><span title="采购单单号">采购单单号</span></template>
|
||||
<j-input placeholder="请输入采购单单号" v-model:value="queryParam.qgdNo" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :lg="6">
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="qgDate">
|
||||
<template #label><span title="请购时间">请购时间</span></template>
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择请购时间" v-model:value="queryParam.qgDate" allow-clear />
|
||||
<template #label><span title="采购时间">采购时间</span></template>
|
||||
<a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择采购时间" v-model:value="queryParam.qgDate" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<!-- <a-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<a-button type="primary" @click="handleGwc" preIcon="ant-design:plus-outlined"> 购物车</a-button>
|
||||
<!-- <a-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'cgd:nu_invoicing_cgd_main:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
|
|
@ -67,6 +67,10 @@
|
|||
<NuInvoicingCgdRkdModal ref="rkdModal" @success="handleSuccess"></NuInvoicingCgdRkdModal>
|
||||
<!-- 详情 -->
|
||||
<NuInvoicingCgdDetailModal ref="detailModal" @success="handleSuccess"></NuInvoicingCgdDetailModal>
|
||||
<!-- 购物车数据 -->
|
||||
<GwcInfoListModal ref="gwcModal" @success="handleSuccess"></GwcInfoListModal>
|
||||
<!-- 作废、确认 -->
|
||||
<NuInvoicingCgdQuerenModal ref="querenModal" @success="handleSuccess"></NuInvoicingCgdQuerenModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -75,14 +79,16 @@
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './NuInvoicingCgdMain.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuInvoicingCgdMain.api';
|
||||
import { queryCgdList } from './NuInvoicingCgdMain.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuInvoicingCgdMainModal from './components/NuInvoicingCgdMainModal.vue'
|
||||
import NuInvoicingCgdRkdModal from './components/NuInvoicingCgdRkdModal.vue'
|
||||
import NuInvoicingCgdDetailModal from './components/NuInvoicingCgdDetailModal.vue'
|
||||
import NuInvoicingCgdQuerenModal from './components/NuInvoicingCgdQuerenModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import GwcInfoListModal from '/@/views/invoicing/qgdInfo/GwcInfoListModal.vue';
|
||||
import { JInput } from '/@/components/Form';
|
||||
|
||||
const formRef = ref();
|
||||
|
|
@ -91,12 +97,14 @@
|
|||
const registerModal = ref();
|
||||
const rkdModal = ref();
|
||||
const detailModal = ref();
|
||||
const gwcModal = ref();
|
||||
const querenModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'nu_invoicing_cgd_main',
|
||||
api: list,
|
||||
api: queryCgdList,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
|
|
@ -108,15 +116,6 @@
|
|||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "nu_invoicing_cgd_main",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
|
|
@ -130,34 +129,11 @@
|
|||
sm: 18,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
//购物车
|
||||
function handleGwc(){
|
||||
gwcModal.value.disableSubmit = false;
|
||||
gwcModal.value.init();
|
||||
}
|
||||
/**
|
||||
* 入库单
|
||||
*/
|
||||
|
|
@ -165,6 +141,13 @@
|
|||
rkdModal.value.disableSubmit = false;
|
||||
rkdModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 确认
|
||||
*/
|
||||
function handleQueren(record: Recordable) {
|
||||
querenModal.value.disableSubmit = false;
|
||||
querenModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
|
|
@ -174,20 +157,6 @@
|
|||
detailModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
|
@ -206,12 +175,16 @@
|
|||
// auth: 'cgd:nu_invoicing_cgd_main:edit',
|
||||
// ifShow: record.status == '0'
|
||||
// },
|
||||
// {
|
||||
// label: '入库',
|
||||
// onClick: handleRkd.bind(null, record),
|
||||
// auth: 'cgd:nu_invoicing_cgd_main:edit',
|
||||
// ifShow: record.status == '1'
|
||||
// },
|
||||
{
|
||||
label: '确认',
|
||||
onClick: handleQueren.bind(null, record),
|
||||
ifShow: record.izGysConfirmed == 'Y' && record.status == '0'
|
||||
},
|
||||
{
|
||||
label: '入库',
|
||||
onClick: handleRkd.bind(null, record),
|
||||
ifShow: record.status == '1'
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
|
|
@ -219,22 +192,6 @@
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'cgd:nu_invoicing_cgd_main:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<a-form-item label="采购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<span>{{formData.qgDate}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<a-form-item label="采购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<span>{{formData.qgBy}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
</a-form-item>
|
||||
</a-col> -->
|
||||
|
||||
<a-col :span="8">
|
||||
<!-- <a-col :span="8">
|
||||
<a-form-item label="审核人" v-bind="validateInfos.reviewedBy" id="NuInvoicingCgdMainForm-reviewedBy" name="reviewedBy">
|
||||
<span>{{formData.reviewedBy}}</span>
|
||||
</a-form-item>
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<a-form-item label="审核备注" v-bind="validateInfos.content" id="NuInvoicingCgdMainForm-content" name="content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<span>{{formData.content}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<a-col :span="8">
|
||||
<a-form-item label="随行单" v-bind="validateInfos.sxdPath" id="NuInvoicingCgdMainForm-sxdPath" name="sxdPath">
|
||||
<j-image-upload :fileMax="1" v-model:value="formData.sxdPath" ></j-image-upload>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingCgdInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购单id" v-bind="validateInfos.mainId" id="NuInvoicingCgdInfoForm-mainId" name="mainId">
|
||||
<a-input v-model:value="formData.mainId" placeholder="请输入请购单id" allow-clear ></a-input>
|
||||
<a-form-item label="采购单id" v-bind="validateInfos.mainId" id="NuInvoicingCgdInfoForm-mainId" name="mainId">
|
||||
<a-input v-model:value="formData.mainId" placeholder="请输入采购单id" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
@ -50,8 +50,8 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingCgdInfoForm-purchaseQuantity" name="purchaseQuantity">
|
||||
<a-input-number v-model:value="formData.purchaseQuantity" placeholder="请输入请购数量" style="width: 100%" />
|
||||
<a-form-item label="采购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingCgdInfoForm-purchaseQuantity" name="purchaseQuantity">
|
||||
<a-input-number v-model:value="formData.purchaseQuantity" placeholder="请输入采购数量" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
@ -75,8 +75,8 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="采购单价" v-bind="validateInfos.procurementPrice" id="NuInvoicingCgdInfoForm-procurementPrice" name="procurementPrice">
|
||||
<a-input v-model:value="formData.procurementPrice" placeholder="请输入采购单价" allow-clear ></a-input>
|
||||
<a-form-item label="采购价格" v-bind="validateInfos.procurementPrice" id="NuInvoicingCgdInfoForm-procurementPrice" name="procurementPrice">
|
||||
<a-input v-model:value="formData.procurementPrice" placeholder="请输入采购价格" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,214 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingCgdMainForm">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="物料名称" v-bind="validateInfos.wlName" id="NuInvoicingCgdMainForm-wlName" name="wlName">
|
||||
<span>{{formData.wlName}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="物料编码" v-bind="validateInfos.wlMaterialNo" id="NuInvoicingCgdMainForm-wlMaterialNo" name="wlMaterialNo">
|
||||
<span>{{formData.wlMaterialNo}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="规格型号" v-bind="validateInfos.wlSpecificationModel" id="NuInvoicingCgdMainForm-wlSpecificationModel" name="wlSpecificationModel">
|
||||
<span>{{formData.wlSpecificationModel}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="品牌型号" v-bind="validateInfos.brandType" id="NuInvoicingCgdMainForm-brandType" name="brandType">
|
||||
<span>{{formData.brandType}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="生产厂家" v-bind="validateInfos.manufacturer" id="NuInvoicingCgdMainForm-manufacturer" name="manufacturer">
|
||||
<span>{{formData.manufacturer}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="采购价格" v-bind="validateInfos.procurementPrice" id="NuInvoicingCgdMainForm-procurementPrice" name="procurementPrice">
|
||||
<span>{{formData.procurementPrice}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="采购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingCgdMainForm-purchaseQuantity" name="purchaseQuantity">
|
||||
<span>{{formData.purchaseQuantity}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="未入库数量" v-bind="validateInfos.wrksl" id="NuInvoicingCgdMainForm-wrksl" name="wrksl">
|
||||
<span>{{formData.wrksl}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="销账数量" v-bind="validateInfos.xzsl" id="NuInvoicingCgdMainForm-xzsl" name="xzsl">
|
||||
<span>{{formData.xzsl}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="入库类型" v-bind="validateInfos.jhType" id="NuInvoicingCgdMainForm-rksl" name="jhType">
|
||||
<a-radio-group v-model:value="formData.jhType">
|
||||
<a-radio :value="0">入库</a-radio>
|
||||
<a-radio :value="1">销账</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="入库数量" v-bind="validateInfos.rksl" id="NuInvoicingCgdMainForm-rksl" name="rksl">
|
||||
<a-input-number :value="formData.rksl" placeholder="入库数量" min="0" max="999" @change="handleChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { rukuInfo } from '../NuInvoicingCgdMain.api';
|
||||
import { rkcolumns } from '../NuInvoicingCgdInfo.data';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const dataSource = ref([]);
|
||||
const userStore = useUserStore();
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
nuId:'',
|
||||
cgdId:'',
|
||||
wlId:'',
|
||||
wlName:'',
|
||||
wlMaterialNo:'',
|
||||
wlSpecificationModel:'',
|
||||
wlUnits:'',
|
||||
procurementPrice:undefined,
|
||||
purchaseQuantity:undefined,
|
||||
manufacturer:'',
|
||||
brandType:'',
|
||||
arrivalPrice: undefined,
|
||||
wrksl: undefined,
|
||||
xzsl: undefined,
|
||||
rksl: '',
|
||||
jhId:'',
|
||||
jhNum:'',
|
||||
jhType: 0,
|
||||
yrksl: 0,
|
||||
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 15 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 19 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
function handleChange(value){
|
||||
var rksl = value;
|
||||
var purchaseQuantity = formData.purchaseQuantity;
|
||||
var xzsl = formData.xzsl;
|
||||
var wrksl = parseInt(purchaseQuantity) - parseInt(rksl) - parseInt(xzsl);
|
||||
if(wrksl<0){
|
||||
wrksl = 0;
|
||||
rksl = purchaseQuantity - xzsl;
|
||||
}
|
||||
formData.rksl = rksl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record)
|
||||
var purchaseQuantity = record.purchaseQuantity;
|
||||
record.yrksl = record.rksl;
|
||||
var xzsl = record.xzsl;
|
||||
var rksl = record.wrksl == 0 ? purchaseQuantity - xzsl : record.wrksl;
|
||||
record.rksl = rksl;
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
var params = {jhId:formData.id,jhNum:formData.rksl,jhType:formData.jhType,cgdId:formData.cgdId,wlId:formData.wlId};
|
||||
defHttp.post({
|
||||
url:'/api/pad/invoicing/pickingInfo',
|
||||
params
|
||||
}).then((res) => {
|
||||
console.log("🚀 ~ submitForm ~ res:", res)
|
||||
if (res.status == '1') {
|
||||
createMessage.success("操作成功");
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<NuInvoicingCgdJhForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingCgdJhForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">入库</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuInvoicingCgdJhForm from './NuInvoicingCgdJhForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('90%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
console.log("🚀 ~ submitCallback ~ submitCallback:")
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -10,12 +10,12 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<a-form-item label="采购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<span>{{formData.qgDate}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<a-form-item label="采购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<span>{{formData.qgBy}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
<template #bodyCell="{ column, text, record }">
|
||||
|
||||
<template v-if="column.dataIndex === 'purchaseQuantity'">
|
||||
<a-input-number :value="text" placeholder="请购数量" min="0" max="999" @change="(value) => handleQgslChange(record, 'purchaseQuantity', value)" />
|
||||
<a-input-number :value="text" placeholder="采购数量" min="0" max="999" @change="(value) => handleQgslChange(record, 'purchaseQuantity', value)" />
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,226 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingCgdMainForm">
|
||||
<a-row>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="采购单单号" v-bind="validateInfos.cgdNo" id="NuInvoicingCgdMainForm-cgdNo" name="cgdNo">
|
||||
<span>{{formData.cgdNo}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="采购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<span>{{formData.qgDate}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="采购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<span>{{formData.qgBy}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="供应商" v-bind="validateInfos.gysId" id="NuInvoicingCgdMainForm-gysId" name="gysId">
|
||||
<span>{{formData.gysId_dictText}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="联系人" v-bind="validateInfos.gysLxr" id="NuInvoicingCgdMainForm-gysLxr" name="gysLxr">
|
||||
<span>{{formData.gysLxr}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.gysLxrdh" id="NuInvoicingCgdMainForm-gysLxrdh" name="gysLxrdh">
|
||||
<span>{{formData.gysLxrdh}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.sxdPath">
|
||||
<a-form-item label="随行单" v-bind="validateInfos.sxdPath" id="NuInvoicingCgdMainForm-sxdPath" name="sxdPath" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.sxdPath" ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
<a-table
|
||||
:columns="rkDetailColumns"
|
||||
row-key="id"
|
||||
:data-source="dataSource"
|
||||
:pagination="false"
|
||||
>
|
||||
<!-- :loading="loading"
|
||||
@change="handleTableChange" -->
|
||||
<template #bodyCell="{ column, text ,record }">
|
||||
<!-- <template v-if="column.dataIndex === 'arrivalPrice'">
|
||||
<a-input-number :value="text" placeholder="到货价格" min="0" max="999" @change="(value) => handleRkslChange(record, 'arrivalPrice', value)" />
|
||||
</template> -->
|
||||
<!-- <template v-if="column.dataIndex === 'rksl'">
|
||||
<a-input-number :value="text" placeholder="入库数量" min="0" max="999" @blur="(value) => handleInputChange(record, 'rksl', value)" />
|
||||
</template> -->
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a @click="handleJianhuo(record)" v-if="record.purchaseQuantity - record.rksl - record.xzsl != 0">拣货</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<NuInvoicingCgdJhModal ref="jhModal" @success="handleJhOk"></NuInvoicingCgdJhModal>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { rukuInfo } from '../NuInvoicingCgdMain.api';
|
||||
import { rkDetailColumns } from '../NuInvoicingCgdInfo.data';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import NuInvoicingCgdJhModal from '/@/views/invoicing/cgd/components/NuInvoicingCgdJhModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const jhModal = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const dataSource = ref([]);
|
||||
const userStore = useUserStore();
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
qgdId: '',
|
||||
cgdNo: '',
|
||||
gysId: '',
|
||||
qgDate: '',
|
||||
qgBy: '',
|
||||
gysLxr: '',
|
||||
gysLxrdh: '',
|
||||
gysFkfs: '',
|
||||
status: '',
|
||||
cgdType: '',
|
||||
sxdPath: '',
|
||||
xzdPath: '',
|
||||
jzdPath: '',
|
||||
reviewedBy: '',
|
||||
reviewedTime: '',
|
||||
content: '',
|
||||
gysId_dictText:'',
|
||||
status_dictText:'',
|
||||
cgdType_dictText:'',
|
||||
gysFkfs_dictText:'',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 9 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 15 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 3 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 19 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
||||
function handleJhOk(){
|
||||
getCgdInfoList();
|
||||
}
|
||||
function handleJianhuo(record){
|
||||
console.log("🚀 ~ handleJianhuo ~ record:", record)
|
||||
jhModal.value.disableSubmit = false;
|
||||
jhModal.value.edit(record);
|
||||
}
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
|
||||
getCgdInfoList();
|
||||
});
|
||||
}
|
||||
|
||||
function getCgdInfoList() {
|
||||
defHttp.get({ url: '/api/pad/invoicing/queryCgdInfoList', params: { cgdId: formData.id,pageSize:-1 } }).then((res) => {
|
||||
console.log("🚀 ~ getCgdInfoList ~ res:", res)
|
||||
dataSource.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废
|
||||
*/
|
||||
async function handleZuofei() {
|
||||
var status = '9';
|
||||
defHttp.post({ url: '/api/pad/invoicing/querenOrZuofei', params: { id: formData.id,status } }).then((res) => {
|
||||
emit('ok');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认
|
||||
*/
|
||||
async function handleQueren() {
|
||||
var status = '1';
|
||||
defHttp.post({ url: '/api/pad/invoicing/querenOrZuofei', params: { id: formData.id,status } }).then((res) => {
|
||||
emit('ok');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
handleZuofei,
|
||||
handleQueren,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<NuInvoicingCgdQuerenForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingCgdQuerenForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleQueren" v-if="!disableSubmit">确认</a-button>
|
||||
<a-button type="primary" @click="handleZuofei" v-if="!disableSubmit">作废</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuInvoicingCgdQuerenForm from './NuInvoicingCgdQuerenForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('90%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
}
|
||||
|
||||
function handleQueren() {
|
||||
registerForm.value.handleQueren();
|
||||
}
|
||||
|
||||
function handleZuofei() {
|
||||
registerForm.value.handleZuofei();
|
||||
}
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
emit('success');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -10,12 +10,12 @@
|
|||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<a-form-item label="采购时间" v-bind="validateInfos.qgDate" id="NuInvoicingCgdMainForm-qgDate" name="qgDate">
|
||||
<span>{{formData.qgDate}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="请购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<a-form-item label="采购人" v-bind="validateInfos.qgBy" id="NuInvoicingCgdMainForm-qgBy" name="qgBy">
|
||||
<span>{{formData.qgBy}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
</a-form-item>
|
||||
</a-col> -->
|
||||
|
||||
<a-col :span="8">
|
||||
<!-- <a-col :span="8">
|
||||
<a-form-item label="审核人" v-bind="validateInfos.reviewedBy" id="NuInvoicingCgdMainForm-reviewedBy" name="reviewedBy">
|
||||
<span>{{formData.reviewedBy}}</span>
|
||||
</a-form-item>
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
<a-form-item label="审核备注" v-bind="validateInfos.content" id="NuInvoicingCgdMainForm-content" name="content" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<span>{{formData.content}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="随行单" v-bind="validateInfos.sxdPath" id="NuInvoicingCgdMainForm-sxdPath" name="sxdPath" :labelCol="labelCol2" :wrapperCol="wrapperCol2">
|
||||
<j-image-upload :fileMax="0" v-model:value="formData.sxdPath" ></j-image-upload>
|
||||
|
|
@ -92,21 +92,26 @@
|
|||
</JFormContainer>
|
||||
<a-table
|
||||
:columns="rkcolumns"
|
||||
:row-key="id"
|
||||
row-key="id"
|
||||
:data-source="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<!-- :loading="loading"
|
||||
@change="handleTableChange" -->
|
||||
<template #bodyCell="{ column, text ,record }">
|
||||
<template v-if="column.dataIndex === 'arrivalPrice'">
|
||||
<a-input-number :value="text" placeholder="到货单价" min="0" max="999" @change="(value) => handleRkslChange(record, 'arrivalPrice', value)" />
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'rksl'">
|
||||
<a-input-number :value="text" placeholder="入库数量" min="0" max="999" @change="(value) => handleInputChange(record, 'rksl', value)" />
|
||||
<!-- <template v-if="column.dataIndex === 'arrivalPrice'">
|
||||
<a-input-number :value="text" placeholder="到货价格" min="0" max="999" @change="(value) => handleRkslChange(record, 'arrivalPrice', value)" />
|
||||
</template> -->
|
||||
<!-- <template v-if="column.dataIndex === 'rksl'">
|
||||
<a-input-number :value="text" placeholder="入库数量" min="0" max="999" @blur="(value) => handleInputChange(record, 'rksl', value)" />
|
||||
</template> -->
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a @click="handleJianhuo(record)" v-if="record.purchaseQuantity - record.rksl - record.xzsl != 0">拣货</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<NuInvoicingCgdJhModal ref="jhModal" @success="handleJhOk"></NuInvoicingCgdJhModal>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
|
|
@ -121,6 +126,7 @@
|
|||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import NuInvoicingCgdJhModal from '/@/views/invoicing/cgd/components/NuInvoicingCgdJhModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
|
|
@ -129,6 +135,7 @@
|
|||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const jhModal = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const dataSource = ref([]);
|
||||
|
|
@ -166,41 +173,16 @@
|
|||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
const handleInputChange = (record, field, value) => {
|
||||
// 更新当前行的数据
|
||||
record[field] = value;
|
||||
|
||||
var b = record.purchaseQuantity - value;
|
||||
if(b<0){
|
||||
record.wrksl = 0;
|
||||
record.rksl = record.purchaseQuantity;
|
||||
return;
|
||||
|
||||
|
||||
function handleJhOk(){
|
||||
getCgdInfoList();
|
||||
}
|
||||
record.wrksl = b;
|
||||
// 如果是修改了 rksl,则 wrksl 会自动更新,因为它是计算属性
|
||||
// 如果需要强制更新视图,可以使用以下方法:
|
||||
|
||||
// 方法1:使用 Vue 的强制更新(不推荐常规使用)
|
||||
// this.$forceUpdate();
|
||||
|
||||
// 方法2:更好的方式是更新整个 dataSource(推荐)
|
||||
const index = dataSource.value.findIndex(item => item.id === record.id);
|
||||
if (index !== -1) {
|
||||
dataSource.value[index] = { ...record };
|
||||
dataSource.value = [...dataSource.value]; // 创建新数组触发响应式更新
|
||||
}
|
||||
};
|
||||
const handleRkslChange = (record, field, value) => {
|
||||
// 更新当前行的数据
|
||||
record[field] = value;
|
||||
|
||||
// // 方法2:更好的方式是更新整个 dataSource(推荐)
|
||||
// const index = dataSource.value.findIndex(item => item.id === record.id);
|
||||
// if (index !== -1) {
|
||||
// dataSource.value[index] = { ...record };
|
||||
// dataSource.value = [...dataSource.value]; // 创建新数组触发响应式更新
|
||||
// }
|
||||
};
|
||||
function handleJianhuo(record){
|
||||
console.log("🚀 ~ handleJianhuo ~ record:", record)
|
||||
jhModal.value.disableSubmit = false;
|
||||
jhModal.value.edit(record);
|
||||
}
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
|
|
@ -241,15 +223,10 @@ const handleRkslChange = (record, field, value) => {
|
|||
}
|
||||
|
||||
function getCgdInfoList() {
|
||||
defHttp.get({ url: '/cgd/nuInvoicingCgdInfo/list', params: { cgdId: formData.id,pageSize:-1 } }).then((res) => {
|
||||
dataSource.value = [];
|
||||
defHttp.get({ url: '/api/pad/invoicing/queryCgdInfoList', params: { cgdId: formData.id,pageSize:-1 } }).then((res) => {
|
||||
console.log("🚀 ~ getCgdInfoList ~ res:", res)
|
||||
dataSource.value = res.records;
|
||||
for (let i = 0; i < dataSource.value.length; i++) {
|
||||
const element = dataSource.value[i];
|
||||
element.rksl = element.purchaseQuantity;
|
||||
element.wrksl = 0;
|
||||
element.arrivalPrice = element.procurementPrice;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<NuInvoicingCgdRkdForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingCgdRkdForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">入库</a-button>
|
||||
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">入库</a-button> -->
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
|
@ -56,7 +56,6 @@
|
|||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -64,6 +63,7 @@
|
|||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
emit('success');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
<div class="divider-content">
|
||||
<!-- 总金额:{{ zongJinE }} 元 -->
|
||||
<!-- <j-dict-select-tag type='radio' v-model:value="ddNo" :dictCode="`nu_invoicing_fkd_info,`" /> -->
|
||||
<a-radio-group v-model:value="ddNo" >
|
||||
<a-radio v-for="item of ddList" :value="item.id" @click="(e) => handleRadioClick(item, e)"
|
||||
>{{ item.cgdNo }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
<a-radio-group v-model:value="ddNo" >
|
||||
<a-radio v-for="item of ddList" :value="item.id" @click="(e) => handleRadioClick(item, e)"
|
||||
>{{ item.cgdNo }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<span style="color: red;font-size: 16px; font-weight: bold;">
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export const wlColumns: BasicColumn[] = [
|
|||
{
|
||||
title: '到货价格',
|
||||
align: 'center',
|
||||
dataIndex: 'crkje',
|
||||
dataIndex: 'arrivalPrice',
|
||||
customRender: ({ text }) => {
|
||||
const num = parseFloat(text);
|
||||
// 处理无效值
|
||||
|
|
@ -123,7 +123,7 @@ export const wlColumns: BasicColumn[] = [
|
|||
{
|
||||
title: '入库数量',
|
||||
align: 'center',
|
||||
dataIndex: 'crksl',
|
||||
dataIndex: 'rksl',
|
||||
},
|
||||
{
|
||||
title: '销账数量',
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const formRef = ref();
|
|||
const useForm = Form.useForm;
|
||||
const formData = reactive<Record<string, any>>({
|
||||
wlName: '',//物料名称
|
||||
arrivalPrice: '',//到货单价
|
||||
arrivalPrice: '',//到货价格
|
||||
wlUnits: '',//采购单位
|
||||
rksl: '',//入库数量
|
||||
gysName: '',
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ enum Api {
|
|||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
/**
|
||||
* 通过登录用户查询请购车列表
|
||||
* 通过登录用户查询采购车列表
|
||||
* @param params
|
||||
*/
|
||||
export const queryListByUser = (params) => defHttp.get({ url: Api.queryListByUser, params });
|
||||
|
|
@ -70,7 +70,7 @@ export const saveOrUpdate = (params, isUpdate) => {
|
|||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
||||
//添加请购信息
|
||||
//添加采购信息
|
||||
export const addList = (params) => {
|
||||
return defHttp.post({ url: Api.addList, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ export const superQuerySchema = {
|
|||
materialName: {title: '物料名称',order: 3,view: 'text', type: 'string',},
|
||||
materialNo: {title: '物料编码',order: 4,view: 'text', type: 'string',},
|
||||
specificationModel: {title: '规格型号',order: 5,view: 'text', type: 'string',},
|
||||
salesUnitPrice: {title: '销售单价',order: 6,view: 'number', type: 'number',},
|
||||
referenceUnitPrice: {title: '参考单价',order: 7,view: 'number', type: 'number',},
|
||||
salesUnitPrice: {title: '销售价格',order: 6,view: 'number', type: 'number',},
|
||||
referenceUnitPrice: {title: '参考价格',order: 7,view: 'number', type: 'number',},
|
||||
materialUnits: {title: '物料单位',order: 8,view: 'text', type: 'string',},
|
||||
multiUnitSwitch: {title: '多单位开关',order: 9,view: 'switch', type: 'string',},
|
||||
oneUnit: {title: '父级单位',order: 10,view: 'text', type: 'string',},
|
||||
|
|
@ -120,7 +120,7 @@ export const columnsQgcList: BasicColumn[] = [
|
|||
width:'140px'
|
||||
},
|
||||
{
|
||||
title: '请购数量',
|
||||
title: '采购数量',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity',
|
||||
width:'140px'
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<template #tableTitle>
|
||||
<div style="padding:10px 0 0 0;">
|
||||
<a-badge :count="count" style="z-index: 9;" offset="-1">
|
||||
<a-button type="primary" @click="handleQgc"> 请购车</a-button>
|
||||
<a-button type="primary" @click="handleQgc"> 采购车</a-button>
|
||||
</a-badge>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<!-- 表单区域 -->
|
||||
<QgdInfoModal ref="registerModal" @success="handleSuccess"></QgdInfoModal>
|
||||
|
||||
<a-drawer title="请购车" width="80vw" :open="qgcOpen" @close="onQgcClose" bodyStyle="padding: 14px;">
|
||||
<a-drawer title="采购车" width="80vw" :open="qgcOpen" @close="onQgcClose" bodyStyle="padding: 14px;">
|
||||
<template #footer>
|
||||
<a-button type="primary" @click="onQgcCaigou" style="float: right;margin-left:10px;">提交采购</a-button>
|
||||
<a-button type="primary" @click="onQgcClose" style="float: right;">关闭</a-button>
|
||||
|
|
@ -78,7 +78,7 @@ import type { CollapseProps } from 'ant-design-vue';
|
|||
const queryParam = reactive<any>({izEnabled:'Y'});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const qgcOpen = ref(false)//请购车抽屉
|
||||
const qgcOpen = ref(false)//采购车抽屉
|
||||
const userStore = useUserStore();
|
||||
const count = ref<number>(5);
|
||||
//注册table数据
|
||||
|
|
@ -127,7 +127,7 @@ function onQgcClose() {
|
|||
}
|
||||
|
||||
/**
|
||||
* 请购事件
|
||||
* 采购事件
|
||||
*/
|
||||
function handleAddQg(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
|
|
@ -154,7 +154,7 @@ function onQgcClose() {
|
|||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '请购',
|
||||
label: '采购',
|
||||
onClick: handleAddQg.bind(null, record),
|
||||
},
|
||||
];
|
||||
|
|
@ -179,7 +179,7 @@ function onQgcClose() {
|
|||
reload();
|
||||
}
|
||||
|
||||
//获取请购车有多少条数据
|
||||
//获取采购车有多少条数据
|
||||
function getQgcSize(){
|
||||
var params = {}
|
||||
count.value = 0;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex === 'purchaseQuantity'">
|
||||
<!-- <a-input :value="text" placeholder="请输入请购数量" min="1" max="999" @change="(value) => handleInputChange(record, 'purchaseQuantity', value)"/> -->
|
||||
<a-input-number :value="text" placeholder="请输入请购数量" min="1" max="999" @change="(value) => handleInputChange(record, 'purchaseQuantity', value)" />
|
||||
<!-- <a-input :value="text" placeholder="请输入采购数量" min="1" max="999" @change="(value) => handleInputChange(record, 'purchaseQuantity', value)"/> -->
|
||||
<a-input-number :value="text" placeholder="请输入采购数量" min="1" max="999" @change="(value) => handleInputChange(record, 'purchaseQuantity', value)" />
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
@ -62,7 +62,7 @@ import { defHttp } from '/@/utils/http/axios';
|
|||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const qgcOpen = ref(false)//请购车抽屉
|
||||
const qgcOpen = ref(false)//采购车抽屉
|
||||
const count = ref<number>(5);
|
||||
const { createMessage } = useMessage();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@
|
|||
categoryId: [{ required: true, message: '请选择一级分类!'},],
|
||||
typeId: [{ required: true, message: '请选择二级分类!'},],
|
||||
materialName: [{ required: true, message: '请输入物料名称!'},],
|
||||
salesUnitPrice: [{ required: true, message: '请输入销售单价!'},],
|
||||
referenceUnitPrice: [{ required: true, message: '请输入参考单价!'},],
|
||||
salesUnitPrice: [{ required: true, message: '请输入销售价格!'},],
|
||||
referenceUnitPrice: [{ required: true, message: '请输入参考价格!'},],
|
||||
materialUnits: [{ required: true, message: '请输入物料单位!'},],
|
||||
suppliers: [{ required: true, message: '请选择供应商!'},],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = '请购';
|
||||
title.value = '采购';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,120 @@
|
|||
<template>
|
||||
<div >
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'护理单元'" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="padding-left: 100px;">
|
||||
<span style="color:red;">*</span>请选择护理单元:
|
||||
<j-dict-select-tag v-model:value="nuId" style="width: 200px;"
|
||||
:dictCode="`nu_base_info,nu_name,nu_id,del_flag = 0 order by area_flag asc`" placeholder="请选择区域名称" @change="checkHldy"/>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'物料信息'" />
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<!-- 查询条件-物料信息-对应的nuid(必选) -->
|
||||
<wlList ref="wlModal" @ok="addShopSuccess"></wlList>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'购物车'" />
|
||||
</a-col>
|
||||
<a-col>
|
||||
<!-- 购物车数据 -->
|
||||
<gwcList ref="gwcModal" @success="handleSuccess"></gwcList>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuInvoicingQgdInfo-nuInvoicingQgdInfo" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import wlList from '/@/views/invoicing/qgdInfo/WlnfoList.vue';
|
||||
import gwcList from '/@/views/invoicing/qgdInfo/QgdInfoList.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const nuId = ref<any>('');
|
||||
const wlModal = ref();
|
||||
const gwcModal = ref();
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
/**
|
||||
* 选择护理单元
|
||||
* @param value
|
||||
*/
|
||||
function checkHldy(value) {
|
||||
wlModal.value.initHldy(value);
|
||||
gwcModal.value.initHldy(value);
|
||||
}
|
||||
function handleSuccess(){
|
||||
|
||||
}
|
||||
|
||||
function addShopSuccess(){
|
||||
gwcModal.value.initHldy(nuId.value);
|
||||
}
|
||||
|
||||
function submitForm(){
|
||||
console.log('submitForm');
|
||||
const qgdListComponent = gwcModal.value;
|
||||
if (qgdListComponent) {
|
||||
const selectedKeys = qgdListComponent.selectedRowKeys;
|
||||
console.log('当前选中的行Keys:', selectedKeys);
|
||||
if(selectedKeys.length == 0){
|
||||
createMessage.error('暂未选中数据不能生成采购单');
|
||||
}else{
|
||||
defHttp.post({
|
||||
url: '/api/pad/invoicing/saveCgdInfo',
|
||||
params: {
|
||||
qgdIds: selectedKeys,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log('res:', res);
|
||||
emit('ok');
|
||||
});
|
||||
// createMessage.success('生成采购单成功');
|
||||
}
|
||||
} else {
|
||||
console.error('未能获取到购物车列表组件实例');
|
||||
createMessage.error('暂未选中数据不能生成采购单');
|
||||
}
|
||||
}
|
||||
|
||||
function init(){
|
||||
nuId.value = '';
|
||||
wlModal.value.initHldy('');
|
||||
}
|
||||
defineExpose({
|
||||
init,
|
||||
submitForm
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<GwcInfoList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></GwcInfoList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">生成采购单</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import GwcInfoList from './GwcInfoList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('100%');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function init() {
|
||||
title.value = '购物车';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.init();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -11,6 +11,9 @@ enum Api {
|
|||
deleteBatch = '/invoicing/qgdInfo/deleteBatch',
|
||||
importExcel = '/invoicing/qgdInfo/importExcel',
|
||||
exportXls = '/invoicing/qgdInfo/exportXls',
|
||||
wlShoppingList = '/api/pad/invoicing/wlShoppingList',
|
||||
queryShoppingCartList = '/api/pad/invoicing/queryShoppingCartList',
|
||||
eddShoppingCartList='/api/pad/invoicing/eddShoppingCartList',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -29,6 +32,8 @@ export const getImportUrl = Api.importExcel;
|
|||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
export const wlShoppingList = (params) => defHttp.get({ url: Api.wlShoppingList, params });
|
||||
export const queryShoppingCartList = (params) => defHttp.get({ url: Api.queryShoppingCartList, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
|
|
@ -70,3 +75,7 @@ export const saveOrUpdate = (params, isUpdate) => {
|
|||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
export const eddShoppingCartList = (params, isUpdate) => {
|
||||
let url = Api.eddShoppingCartList;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,55 +6,132 @@ import { getWeekMonthQuarterYear } from '/@/utils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '请购单编号',
|
||||
title: '供应商',
|
||||
align: "center",
|
||||
dataIndex: 'mainNo'
|
||||
dataIndex: 'suppliersName',
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
align: "center",
|
||||
dataIndex: 'wlMaterialNo'
|
||||
dataIndex: 'wlMaterialNo',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
align: "center",
|
||||
dataIndex: 'wlName'
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
align: "center",
|
||||
dataIndex: 'wlSpecificationModel',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '品牌型号',
|
||||
align: "center",
|
||||
dataIndex: 'brandType',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '生产厂家',
|
||||
align: "center",
|
||||
dataIndex: 'manufacturer',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '采购价格',
|
||||
align: "center",
|
||||
dataIndex: 'referenceUnitPrice',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '采购单位',
|
||||
align: "center",
|
||||
dataIndex: 'wlUnits'
|
||||
dataIndex: 'wlUnits',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '采购数量',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity',
|
||||
width:'100px'
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const wlColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '供应商',
|
||||
align: "center",
|
||||
dataIndex: 'suppliers_dictText',
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
align: "center",
|
||||
dataIndex: 'materialName',
|
||||
width:'180px'
|
||||
},
|
||||
{
|
||||
title: '采购价格',
|
||||
align: "center",
|
||||
dataIndex: 'salesUnitPrice',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '采购单位',
|
||||
align: "center",
|
||||
dataIndex: 'salesUnit',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
align: "center",
|
||||
dataIndex: 'materialNo',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '规格型号',
|
||||
align: "center",
|
||||
dataIndex: 'wlSpecificationModel'
|
||||
dataIndex: 'specificationModel',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '上限',
|
||||
title: '品牌型号',
|
||||
align: "center",
|
||||
dataIndex: 'wlUpperLimit'
|
||||
dataIndex: 'brandType',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '下限',
|
||||
title: '生产厂家',
|
||||
align: "center",
|
||||
dataIndex: 'wlLowerLimit'
|
||||
dataIndex: 'manufacturer',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '供应商名称',
|
||||
title: '一级分类',
|
||||
align: "center",
|
||||
dataIndex: 'suppliersName'
|
||||
dataIndex: 'categoryId_dictText',
|
||||
width:'100px'
|
||||
},
|
||||
{
|
||||
title: '请购数量',
|
||||
title: '二级分类',
|
||||
align: "center",
|
||||
dataIndex: 'purchaseQuantity'
|
||||
dataIndex: 'typeId_dictText',
|
||||
width:'100px'
|
||||
},
|
||||
// {
|
||||
// title: '三级分类',
|
||||
// align: "center",
|
||||
// dataIndex: 'medicationId_dictText',
|
||||
// width:'100px'
|
||||
// },
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
mainNo: {title: '请购单编号',order: 0,view: 'text', type: 'string',},
|
||||
mainNo: {title: '采购单编号',order: 0,view: 'text', type: 'string',},
|
||||
wlMaterialNo: {title: '物料编码',order: 1,view: 'text', type: 'string',},
|
||||
wlName: {title: '物料名称',order: 2,view: 'text', type: 'string',},
|
||||
wlUnits: {title: '采购单位',order: 3,view: 'text', type: 'string',},
|
||||
|
|
@ -62,5 +139,5 @@ export const superQuerySchema = {
|
|||
wlUpperLimit: {title: '上限',order: 5,view: 'text', type: 'string',},
|
||||
wlLowerLimit: {title: '下限',order: 6,view: 'text', type: 'string',},
|
||||
suppliersName: {title: '供应商名称',order: 7,view: 'text', type: 'string',},
|
||||
purchaseQuantity: {title: '请购数量',order: 8,view: 'number', type: 'number',},
|
||||
purchaseQuantity: {title: '采购数量',order: 8,view: 'number', type: 'number',},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,38 +1,10 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<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-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div >
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'nuInvoicingQgdInfo:nu_invoicing_qgd_info:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" >
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
|
|
@ -47,24 +19,27 @@
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './QgdInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './QgdInfo.api';
|
||||
import { queryShoppingCartList, deleteOne } from './QgdInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuInvoicingQgdInfoModal from './components/QgdInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { getData } from '../../report/chartdemo/chartdemo.data';
|
||||
|
||||
const nuId = ref<any>('');
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
const { prefixCls, tableContext} = useListPage({
|
||||
tableProps: {
|
||||
title: '请购单-请购信息',
|
||||
api: list,
|
||||
api: queryShoppingCartList,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showTableSetting: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
|
|
@ -73,17 +48,8 @@
|
|||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "请购单-请购信息",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const [registerTable, { reload,getDataSource }, {rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
|
|
@ -95,43 +61,16 @@
|
|||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
console.log("🚀 ~ handleEdit ~ record:", record)
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
|
|
@ -139,18 +78,11 @@
|
|||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -161,19 +93,6 @@
|
|||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'nuInvoicingQgdInfo:nu_invoicing_qgd_info:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
|
|
@ -181,31 +100,31 @@
|
|||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'nuInvoicingQgdInfo:nu_invoicing_qgd_info:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
|
||||
|
||||
|
||||
function initHldy(record) {
|
||||
nuId.value = record;
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
if(record){
|
||||
queryParam.nuId = record;
|
||||
reload();
|
||||
}else{
|
||||
queryParam.nuId = -1;
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
initHldy,
|
||||
rowSelection, // 新增:暴露rowSelection响应式对象本身
|
||||
selectedRowKeys, // 或者暴露具体的选中行key数组
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<div><!--查询区域-->
|
||||
<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="wlParamInfo">
|
||||
<template #label><span title="物料信息">物料信息</span></template>
|
||||
<a-input placeholder="请输入物料信息" v-model:value="queryParam.wlParamInfo" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="suppliers">
|
||||
<template #label><span title="供应商">供应商</span></template>
|
||||
<a-select v-model:value="queryParam.suppliers" style="width: 100%" placeholder="请选择供应商" allow-clear >
|
||||
<a-select-option v-for="item in suppliersList" :key="item.suppliers">{{ item.suppliersName }}</a-select-option>
|
||||
</a-select>
|
||||
</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-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-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<NuInvoicingQgdInfoModal ref="registerModal" @success="handleSuccess"></NuInvoicingQgdInfoModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuInvoicingQgdInfo-nuInvoicingQgdInfo" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { wlColumns } from './QgdInfo.data';
|
||||
import { wlShoppingList } from './QgdInfo.api';
|
||||
import NuInvoicingQgdInfoModal from './components/QgdInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const suppliersList = ref<any>([]);
|
||||
const registerModal = ref();
|
||||
const nuId = ref<any>('');
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext} = useListPage({
|
||||
tableProps: {
|
||||
api: wlShoppingList,
|
||||
columns: wlColumns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showTableSetting: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
function handleAddShoping(record: Recordable) {
|
||||
if(nuId.value){
|
||||
record.nuId = nuId.value;
|
||||
record.suppliersName = record.suppliers_dictText;
|
||||
record.referenceUnitPrice = record.salesUnitPrice;
|
||||
record.wlUnits = record.salesUnit;
|
||||
var addList = [record];
|
||||
defHttp.post({ url: '/api/pad/invoicing/addShoppingCartList', params: addList }).then((res) => {
|
||||
emit('ok');
|
||||
});
|
||||
}else{
|
||||
createMessage.error('请选择护理单元');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '添加购物车',
|
||||
onClick: handleAddShoping.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 查询供应商
|
||||
*/
|
||||
function wlSuppliersList() {
|
||||
defHttp.get({ url: '/api/pad/invoicing/getGysList' }).then((res) => {
|
||||
suppliersList.value = res;
|
||||
});
|
||||
}
|
||||
|
||||
function initHldy(record) {
|
||||
//查询供应商
|
||||
wlSuppliersList();
|
||||
nuId.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initHldy,
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -4,65 +4,77 @@
|
|||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingQgdInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购单编号" v-bind="validateInfos.mainNo" id="NuInvoicingQgdInfoForm-mainNo" name="mainNo">
|
||||
<a-input v-model:value="formData.mainNo" placeholder="请输入请购单编号" allow-clear ></a-input>
|
||||
<!-- <a-col :span="24">
|
||||
<a-form-item label="采购单编号" v-bind="validateInfos.mainNo" id="NuInvoicingQgdInfoForm-mainNo" name="mainNo">
|
||||
<a-input v-model:value="formData.mainNo" placeholder="请输入采购单编号" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="物料编码" v-bind="validateInfos.wlMaterialNo" id="NuInvoicingQgdInfoForm-wlMaterialNo" name="wlMaterialNo">
|
||||
<a-input v-model:value="formData.wlMaterialNo" placeholder="请输入物料编码" allow-clear ></a-input>
|
||||
<a-input v-model:value="formData.wlMaterialNo" placeholder="请输入物料编码" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="物料名称" v-bind="validateInfos.wlName" id="NuInvoicingQgdInfoForm-wlName" name="wlName">
|
||||
<a-input v-model:value="formData.wlName" placeholder="请输入物料名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="采购单位" v-bind="validateInfos.wlUnits" id="NuInvoicingQgdInfoForm-wlUnits" name="wlUnits">
|
||||
<a-input v-model:value="formData.wlUnits" placeholder="请输入采购单位" allow-clear ></a-input>
|
||||
<a-input v-model:value="formData.wlName" placeholder="请输入物料名称" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="规格型号" v-bind="validateInfos.wlSpecificationModel" id="NuInvoicingQgdInfoForm-wlSpecificationModel" name="wlSpecificationModel">
|
||||
<a-input v-model:value="formData.wlSpecificationModel" placeholder="请输入规格型号" allow-clear ></a-input>
|
||||
<a-input v-model:value="formData.wlSpecificationModel" placeholder="请输入规格型号" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="上限" v-bind="validateInfos.wlUpperLimit" id="NuInvoicingQgdInfoForm-wlUpperLimit" name="wlUpperLimit">
|
||||
<a-input v-model:value="formData.wlUpperLimit" placeholder="请输入上限" allow-clear ></a-input>
|
||||
<a-form-item label="品牌型号" v-bind="validateInfos.brandType" id="NuInvoicingQgdInfoForm-brandType" name="brandType">
|
||||
<a-input v-model:value="formData.brandType" placeholder="请输入品牌型号" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="下限" v-bind="validateInfos.wlLowerLimit" id="NuInvoicingQgdInfoForm-wlLowerLimit" name="wlLowerLimit">
|
||||
<a-input v-model:value="formData.wlLowerLimit" placeholder="请输入下限" allow-clear ></a-input>
|
||||
<a-form-item label="生产厂家" v-bind="validateInfos.manufacturer" id="NuInvoicingQgdInfoForm-manufacturer" name="manufacturer">
|
||||
<a-input v-model:value="formData.manufacturer" placeholder="请输入生产厂家" disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="采购价格" v-bind="validateInfos.referenceUnitPrice" id="NuInvoicingQgdInfoForm-referenceUnitPrice" name="referenceUnitPrice">
|
||||
<a-input v-model:value="formData.referenceUnitPrice" placeholder="请输入采购价格" readonly ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="采购单位" v-bind="validateInfos.wlUnits" id="NuInvoicingQgdInfoForm-wlUnits" name="wlUnits">
|
||||
<a-input v-model:value="formData.wlUnits" placeholder="请输入采购单位" readonly ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="供应商名称" v-bind="validateInfos.suppliersName" id="NuInvoicingQgdInfoForm-suppliersName" name="suppliersName">
|
||||
<a-input v-model:value="formData.suppliersName" placeholder="请输入供应商名称" allow-clear ></a-input>
|
||||
<a-input-search
|
||||
v-model:value="formData.suppliersName"
|
||||
enter-button="找相似"
|
||||
readonly
|
||||
@search="handleZxs"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingQgdInfoForm-purchaseQuantity" name="purchaseQuantity">
|
||||
<a-input-number v-model:value="formData.purchaseQuantity" placeholder="请输入请购数量" style="width: 100%" />
|
||||
<a-form-item label="采购数量" v-bind="validateInfos.purchaseQuantity" id="NuInvoicingQgdInfoForm-purchaseQuantity" name="purchaseQuantity">
|
||||
<a-input-number v-model:value="formData.purchaseQuantity" placeholder="请输入采购数量" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
<QgdZxsModal ref="zxsModal" @success="handleZxsCheck" />
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { ref, reactive, nextTick, computed } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../QgdInfo.api';
|
||||
import { eddShoppingCartList } from '../QgdInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import QgdZxsModal from './QgdZxsModal.vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
|
|
@ -70,18 +82,22 @@
|
|||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const zxsModal = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
wlId: '',
|
||||
mainNo: '',
|
||||
wlMaterialNo: '',
|
||||
wlName: '',
|
||||
wlUnits: '',
|
||||
referenceUnitPrice: '',
|
||||
wlSpecificationModel: '',
|
||||
wlUpperLimit: '',
|
||||
wlLowerLimit: '',
|
||||
suppliersName: '',
|
||||
suppliersId: '',
|
||||
manufacturer: '',
|
||||
brandType: '',
|
||||
purchaseQuantity: undefined,
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
|
|
@ -90,6 +106,7 @@
|
|||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
purchaseQuantity: [{ required: true, message: '请输入采购数量' }],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
|
@ -105,6 +122,20 @@
|
|||
return props.formDisabled;
|
||||
});
|
||||
|
||||
function handleZxsCheck(record) {
|
||||
console.log("🚀 ~ handleZxsCheck ~ record", record)
|
||||
formData.suppliersName = record.suppliers_dictText;
|
||||
formData.suppliersId = record.suppliersId;
|
||||
formData.wlUnits = record.salesUnit;
|
||||
formData.referenceUnitPrice = record.salesUnitPrice;
|
||||
}
|
||||
|
||||
function handleZxs(){
|
||||
console.log("🚀 ~ handleZxs ~ handleZxs")
|
||||
zxsModal.value.disableSubmit = true;
|
||||
zxsModal.value.initHldy(formData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
@ -164,7 +195,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
await eddShoppingCartList(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<NuInvoicingQgdInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuInvoicingQgdInfoForm>
|
||||
</j-modal>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,104 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuInvoicingQgdInfo-nuInvoicingQgdInfo" setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { wlColumns } from '../QgdInfo.data';
|
||||
import { wlShoppingList } from '../QgdInfo.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const suppliersList = ref<any>([]);
|
||||
const registerModal = ref();
|
||||
const nuId = ref<any>('');
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext} = useListPage({
|
||||
tableProps: {
|
||||
api: wlShoppingList,
|
||||
columns: wlColumns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showTableSetting: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
|
||||
|
||||
function handleQueren(record: Recordable) {
|
||||
emit('ok', record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '确认',
|
||||
onClick: handleQueren.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function initHldy(record) {
|
||||
console.log("🚀 ~ initHldy ~ record:", record)
|
||||
queryParam.wlId = record.wlId;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initHldy,
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<QgdZxsForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></QgdZxsForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import QgdZxsForm from './QgdZxsForm.vue'
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function initHldy(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.initHldy(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(record) {
|
||||
handleCancel();
|
||||
emit('success',record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initHldy,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -6,12 +6,12 @@ import { getWeekMonthQuarterYear } from '/@/utils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '请购单号',
|
||||
title: '采购单号',
|
||||
align: "center",
|
||||
dataIndex: 'qgdNo'
|
||||
},
|
||||
{
|
||||
title: '请购状态 0未下单 1已下单',
|
||||
title: '采购状态 0未下单 1已下单',
|
||||
align: "center",
|
||||
dataIndex: 'status'
|
||||
},
|
||||
|
|
@ -19,6 +19,6 @@ export const columns: BasicColumn[] = [
|
|||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
qgdNo: {title: '请购单号',order: 0,view: 'number', type: 'number',},
|
||||
status: {title: '请购状态 0未下单 1已下单',order: 1,view: 'number', type: 'number',},
|
||||
qgdNo: {title: '采购单号',order: 0,view: 'number', type: 'number',},
|
||||
status: {title: '采购状态 0未下单 1已下单',order: 1,view: 'number', type: 'number',},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '请购单',
|
||||
title: '采购单',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "请购单",
|
||||
name: "采购单",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@
|
|||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuInvoicingQgdMainForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购单号" v-bind="validateInfos.qgdNo" id="NuInvoicingQgdMainForm-qgdNo" name="qgdNo">
|
||||
<a-input-number v-model:value="formData.qgdNo" placeholder="请输入请购单号" style="width: 100%" />
|
||||
<a-form-item label="采购单号" v-bind="validateInfos.qgdNo" id="NuInvoicingQgdMainForm-qgdNo" name="qgdNo">
|
||||
<a-input-number v-model:value="formData.qgdNo" placeholder="请输入采购单号" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请购状态 0未下单 1已下单" v-bind="validateInfos.status" id="NuInvoicingQgdMainForm-status" name="status">
|
||||
<a-input-number v-model:value="formData.status" placeholder="请输入请购状态 0未下单 1已下单" style="width: 100%" />
|
||||
<a-form-item label="采购状态 0未下单 1已下单" v-bind="validateInfos.status" id="NuInvoicingQgdMainForm-status" name="status">
|
||||
<a-input-number v-model:value="formData.status" placeholder="请输入采购状态 0未下单 1已下单" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
|
|||
|
|
@ -6,12 +6,17 @@ import { getWeekMonthQuarterYear } from '/@/utils';
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '库房',
|
||||
title: '护理单元',
|
||||
align: "center",
|
||||
dataIndex: 'nuName'
|
||||
},
|
||||
{
|
||||
title: '物料',
|
||||
title: '单号',
|
||||
align: "center",
|
||||
dataIndex: 'ddNo'
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
align: "center",
|
||||
dataIndex: 'wlId_dictText'
|
||||
},
|
||||
|
|
@ -26,16 +31,14 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'specificationModel'
|
||||
},
|
||||
{
|
||||
title: '物料上限',
|
||||
title: '生产厂家',
|
||||
align: "center",
|
||||
dataIndex: 'upperLimit',
|
||||
width: 100
|
||||
dataIndex: 'manufacturer',
|
||||
},
|
||||
{
|
||||
title: '物料下限',
|
||||
title: '品牌型号',
|
||||
align: "center",
|
||||
dataIndex: 'lowerLimit',
|
||||
width: 100
|
||||
dataIndex: 'brandType',
|
||||
},
|
||||
{
|
||||
title: '库存数量',
|
||||
|
|
@ -43,12 +46,6 @@ export const columns: BasicColumn[] = [
|
|||
dataIndex: 'kcsl',
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: "center",
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
width: 100
|
||||
},
|
||||
];
|
||||
|
||||
export const columns2: BasicColumn[] = [
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
// immediate: false,
|
||||
actionColumn: {
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
|
|
|
|||
Loading…
Reference in New Issue