1.0.50 报价单显示优化编号后端生成

dev
yinq 7 days ago
parent 0293f185b4
commit 5ad10ddfb4

@ -19,10 +19,10 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="报价单编号" prop="quoteCode">
<el-input v-model="form.quoteCode" placeholder="自动生成">
<template #append>
<el-button type="primary" @click="generateQuoteCode" :disabled="isView || isCodeGenerated">生成报价单编号</el-button>
</template>
<el-input v-model="form.quoteCode" placeholder="自动生成" disabled>
<!-- <template #append>-->
<!-- <el-button type="primary" @click="generateQuoteCode" :disabled="isView || isCodeGenerated">生成报价单编号</el-button>-->
<!-- </template>-->
</el-input>
</el-form-item>
</el-col>
@ -766,18 +766,18 @@ const onSupplierChanged = (supplierId: any) => {
}
};
// codeRuleCode=1004
const generateQuoteCode = async () => {
if (isCodeGenerated.value) return;
try {
const params = { codeRuleCode: '1004' } as any;
const res = await getRuleGenerateCode(params);
form.quoteCode = res.msg;
isCodeGenerated.value = true;
proxy?.$modal.msgSuccess('报价单编号生成成功');
} catch (error) {
proxy?.$modal.msgError('报价单编号生成失败');
}
};
// const generateQuoteCode = async () => {
// if (isCodeGenerated.value) return;
// try {
// const params = { codeRuleCode: '1004' } as any;
// const res = await getRuleGenerateCode(params);
// form.quoteCode = res.msg;
// isCodeGenerated.value = true;
// proxy?.$modal.msgSuccess('');
// } catch (error) {
// proxy?.$modal.msgError('');
// }
// };
// IDFileUpload
const ossIdString = computed({

@ -180,83 +180,83 @@
<el-table v-loading="loading" border :data="crmQuoteInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="50" v-if="columns[0].visible" />
<el-table-column label="报价单号" align="center" prop="quoteCode" v-if="columns[1].visible" />
<el-table-column label="报价单名称" align="center" prop="quoteName" v-if="columns[2].visible" />
<el-table-column label="报价轮次" align="center" prop="quoteRound" v-if="columns[3].visible" />
<el-table-column label="报价大类" align="center" prop="quoteCategory" v-if="columns[4].visible">
<el-table-column label="序号" align="center" type="index" width="60" v-if="columns[0].visible" />
<el-table-column label="报价单号" align="center" prop="quoteCode" width="160" v-if="columns[1].visible" show-overflow-tooltip />
<el-table-column label="报价单名称" align="center" prop="quoteName" width="200" v-if="columns[2].visible" show-overflow-tooltip />
<el-table-column label="报价轮次" align="center" prop="quoteRound" width="100" v-if="columns[3].visible" />
<el-table-column label="报价大类" align="center" prop="quoteCategory" width="120" v-if="columns[4].visible">
<template #default="scope">
<dict-tag :options="quote_category" :value="scope.row.quoteCategory" />
</template>
</el-table-column>
<el-table-column label="报价类型" align="center" prop="quoteType" v-if="columns[5].visible">
<el-table-column label="报价类型" align="center" prop="quoteType" width="120" v-if="columns[5].visible">
<template #default="scope">
<dict-tag :options="contract_type" :value="scope.row.quoteType" />
</template>
</el-table-column>
<el-table-column label="业务方向" align="center" prop="businessDirection" v-if="columns[6].visible">
<el-table-column label="业务方向" align="center" prop="businessDirection" width="120" v-if="columns[6].visible">
<template #default="scope">
<dict-tag :options="business_direction" :value="scope.row.businessDirection" />
</template>
</el-table-column>
<el-table-column label="部门" align="center" prop="deptName" v-if="columns[7].visible" />
<el-table-column label="部门" align="center" prop="deptName" width="120" v-if="columns[7].visible" show-overflow-tooltip />
<el-table-column label="报价日期" align="center" prop="quoteDate" width="180" v-if="columns[8].visible">
<template #default="scope">
<span>{{ parseTime(scope.row.quoteDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" prop="customerName" width="180" v-if="columns[22].visible" show-overflow-tooltip />
<el-table-column label="报价有效期起" align="center" prop="validFrom" width="180" v-if="columns[9].visible">
<template #default="scope">
<span>{{ parseTime(scope.row.validFrom, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="报价有效期" align="center" prop="validDays" v-if="columns[10].visible" />
<el-table-column label="报价有效期" align="center" prop="validDays" width="100" v-if="columns[10].visible" />
<el-table-column label="报价有效期止" align="center" prop="validTo" width="180" v-if="columns[11].visible">
<template #default="scope">
<span>{{ parseTime(scope.row.validTo, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="交货期" align="center" prop="deliveryPeriod" v-if="columns[12].visible" />
<el-table-column label="交付/交货方式" align="center" prop="deliveryMethod" v-if="columns[13].visible" />
<el-table-column label="付款方式" align="center" prop="paymentMethod" v-if="columns[14].visible">
<el-table-column label="交货期" align="center" prop="deliveryPeriod" width="100" v-if="columns[12].visible" />
<el-table-column label="交付/交货方式" align="center" prop="deliveryMethod" width="140" v-if="columns[13].visible" show-overflow-tooltip />
<el-table-column label="付款方式" align="center" prop="paymentMethod" width="120" v-if="columns[14].visible">
<template #default="scope">
<dict-tag :options="payment_method" :value="scope.row.paymentMethod" />
</template>
</el-table-column>
<el-table-column label="币种" align="center" prop="currencyType" v-if="columns[15].visible">
<el-table-column label="币种" align="center" prop="currencyType" width="80" v-if="columns[15].visible">
<template #default="scope">
<dict-tag :options="currency_type" :value="scope.row.currencyType" />
</template>
</el-table-column>
<el-table-column label="含税信息" align="center" prop="taxIncludedInfo" v-if="columns[16].visible" />
<el-table-column label="税率(默认按明细可覆盖)" align="center" prop="taxRate" v-if="columns[17].visible" />
<el-table-column label="总报价" align="center" prop="totalPrice" v-if="columns[18].visible" />
<el-table-column label="未税总价" align="center" prop="totalBeforeTax" v-if="columns[19].visible" />
<el-table-column label="税额" align="center" prop="totalTax" v-if="columns[20].visible" />
<el-table-column label="含税总价" align="center" prop="totalIncludingTax" v-if="columns[21].visible" />
<el-table-column label="客户名称" align="center" prop="customerName" v-if="columns[22].visible" />
<el-table-column label="客户方联系人" align="center" prop="customerContactName" v-if="columns[23].visible" />
<el-table-column label="客户方联系电话" align="center" prop="customerContactPhone" v-if="columns[24].visible" />
<el-table-column label="客户方电子邮箱" align="center" prop="customerContactEmail" v-if="columns[25].visible" />
<el-table-column label="供应商名称" align="center" prop="supplierName" v-if="columns[26].visible" />
<el-table-column label="供货方联系人" align="center" prop="supplierContactName" v-if="columns[27].visible" />
<el-table-column label="供货方联系电话" align="center" prop="supplierContactPhone" v-if="columns[28].visible" />
<el-table-column label="供货方电子邮箱" align="center" prop="supplierContactEmail" v-if="columns[29].visible" />
<el-table-column label="项目ID(可选)" align="center" prop="projectId" v-if="columns[30].visible" />
<el-table-column label="打印模板ID(可选)" align="center" prop="templateId" v-if="columns[31].visible" />
<el-table-column label="附件ID" align="center" prop="ossId" v-if="columns[32].visible" />
<el-table-column label="报价单状态" align="center" prop="quoteStatus" v-if="columns[33].visible">
<el-table-column label="含税信息" align="center" prop="taxIncludedInfo" width="100" v-if="columns[16].visible" show-overflow-tooltip />
<el-table-column label="税率(默认按明细可覆盖)" align="center" prop="taxRate" width="180" v-if="columns[17].visible" />
<el-table-column label="总报价" align="center" prop="totalPrice" width="130" v-if="columns[18].visible" />
<el-table-column label="未税总价" align="center" prop="totalBeforeTax" width="130" v-if="columns[19].visible" />
<el-table-column label="税额" align="center" prop="totalTax" width="130" v-if="columns[20].visible" />
<el-table-column label="含税总价" align="center" prop="totalIncludingTax" width="130" v-if="columns[21].visible" />
<el-table-column label="客户方联系人" align="center" prop="customerContactName" width="130" v-if="columns[23].visible" show-overflow-tooltip />
<el-table-column label="客户方联系电话" align="center" prop="customerContactPhone" width="140" v-if="columns[24].visible" />
<el-table-column label="客户方电子邮箱" align="center" prop="customerContactEmail" width="180" v-if="columns[25].visible" show-overflow-tooltip />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="180" v-if="columns[26].visible" show-overflow-tooltip />
<el-table-column label="供货方联系人" align="center" prop="supplierContactName" width="130" v-if="columns[27].visible" show-overflow-tooltip />
<el-table-column label="供货方联系电话" align="center" prop="supplierContactPhone" width="140" v-if="columns[28].visible" />
<el-table-column label="供货方电子邮箱" align="center" prop="supplierContactEmail" width="180" v-if="columns[29].visible" show-overflow-tooltip />
<el-table-column label="项目ID(可选)" align="center" prop="projectId" width="120" v-if="columns[30].visible" />
<el-table-column label="打印模板ID(可选)" align="center" prop="templateId" width="140" v-if="columns[31].visible" />
<el-table-column label="附件ID" align="center" prop="ossId" width="120" v-if="columns[32].visible" />
<el-table-column label="报价单状态" align="center" prop="quoteStatus" width="120" v-if="columns[33].visible">
<template #default="scope">
<dict-tag :options="quote_status" :value="scope.row.quoteStatus" />
</template>
</el-table-column>
<el-table-column label="流程状态" align="center" prop="flowStatus" v-if="columns[34].visible">
<el-table-column label="流程状态" align="center" prop="flowStatus" width="120" v-if="columns[34].visible">
<template #default="scope">
<dict-tag :options="wf_business_status" :value="scope.row.flowStatus" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[35].visible" />
<el-table-column label="创建人" align="center" prop="createName" v-if="columns[36].visible" />
<el-table-column label="备注" align="center" prop="remark" width="200" v-if="columns[35].visible" show-overflow-tooltip />
<el-table-column label="创建人" align="center" prop="createName" width="100" v-if="columns[36].visible" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[37].visible">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -272,10 +272,10 @@
<el-tooltip content="查看详情" placement="top" v-if="scope.row.flowStatus && scope.row.flowStatus !== 'draft'">
<el-button link type="info" icon="DocumentChecked" @click="handleView(scope.row)"></el-button>
</el-tooltip>
<!-- 审批记录非草稿状态可查看 -->
<el-tooltip content="审批记录" placement="top" v-if="scope.row.flowStatus && scope.row.flowStatus !== 'draft'">
<el-button link type="warning" icon="Tickets" @click="handleApprovalRecord(scope.row)"></el-button>
</el-tooltip>
<!-- &lt;!&ndash; 审批记录非草稿状态可查看 &ndash;&gt;-->
<!-- <el-tooltip content="审批记录" placement="top" v-if="scope.row.flowStatus && scope.row.flowStatus !== 'draft'">-->
<!-- <el-button link type="warning" icon="Tickets" @click="handleApprovalRecord(scope.row)"></el-button>-->
<!-- </el-tooltip>-->
<!-- 删除仅草稿状态可删除 -->
<el-tooltip content="删除" placement="top" v-if="!scope.row.flowStatus || scope.row.flowStatus === 'draft'">
<el-button link type="danger" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['oa/crm:crmQuoteInfo:remove']"></el-button>
@ -516,7 +516,7 @@ const dialog = reactive<DialogOption>({
//
const columns = ref<FieldOption[]>([
{ key: 0, label: `序号`, visible: true },
{ key: 0, label: `序号`, visible: false },
{ key: 1, label: `报价单号`, visible: true },
{ key: 2, label: `报价单名称`, visible: true },
{ key: 3, label: `报价轮次`, visible: false },
@ -689,7 +689,7 @@ const handleSelectionChange = (selection: CrmQuoteInfoVO[]) => {
const handleAdd = () => {
proxy.$tab.closePage(route);
router.push({
path: '/oa/crm/crmQuoteInfo/edit',
path: '/quote/crmQuoteInfo/edit',
query: { type: 'add' }
});
};
@ -699,7 +699,7 @@ const handleUpdate = (row?: CrmQuoteInfoVO) => {
const _quoteId = row?.quoteId || ids.value[0];
proxy.$tab.closePage(route);
router.push({
path: '/oa/crm/crmQuoteInfo/edit',
path: '/quote/crmQuoteInfo/edit',
query: { id: _quoteId, type: 'update' }
});
};
@ -709,7 +709,7 @@ const handleView = (row?: CrmQuoteInfoVO) => {
const _quoteId = row?.quoteId;
proxy.$tab.closePage(route);
router.push({
path: '/oa/crm/crmQuoteInfo/edit',
path: '/quote/crmQuoteInfo/edit',
query: { id: _quoteId, type: 'view' }
});
};

Loading…
Cancel
Save