|
|
|
|
@ -279,7 +279,11 @@
|
|
|
|
|
v-model="form.warrantyPeriodDescription"
|
|
|
|
|
placeholder="请完整输入质保期描述(如:验收合格后12个月或发货后18个月等)"
|
|
|
|
|
:disabled="isFormDisabled"
|
|
|
|
|
/>
|
|
|
|
|
>
|
|
|
|
|
<template #append>
|
|
|
|
|
<el-button type="primary" :disabled="isFormDisabled" @click="openWarrantyTemplateDialog">选择模板</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
@ -309,12 +313,13 @@
|
|
|
|
|
<el-form-item label="发货/交货期" prop="deliveryStart">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.deliveryStart"
|
|
|
|
|
placeholder="请完整描述发货/交货条件(如:合同签订生效后XX日且乙方收到甲方合同约定的XX款)"
|
|
|
|
|
type="textarea"
|
|
|
|
|
:rows="2"
|
|
|
|
|
placeholder="请完整输入发货/交货期(如:自合同签订并生效之日起30天发货等)"
|
|
|
|
|
:disabled="isFormDisabled"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
/>
|
|
|
|
|
>
|
|
|
|
|
<template #append>
|
|
|
|
|
<el-button type="primary" :disabled="isFormDisabled" @click="openDeliveryStartTemplateDialog">选择模板</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
@ -755,6 +760,44 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 发货/交货期模板选择对话框 -->
|
|
|
|
|
<el-dialog title="选择发货/交货期模板" v-model="deliveryStartTemplateDialog.visible" width="720px" append-to-body>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="deliveryStartTemplates"
|
|
|
|
|
border
|
|
|
|
|
highlight-current-row
|
|
|
|
|
max-height="360px"
|
|
|
|
|
@row-click="selectDeliveryStartTemplate"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="index" width="55" label="序号" align="center" />
|
|
|
|
|
<el-table-column prop="content" label="模板内容" min-width="520" show-overflow-tooltip />
|
|
|
|
|
</el-table>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="deliveryStartTemplateDialog.visible = false">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 质保期描述模板选择对话框 -->
|
|
|
|
|
<el-dialog title="选择质保期描述模板" v-model="warrantyTemplateDialog.visible" width="720px" append-to-body>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="warrantyPeriodDescriptionTemplates"
|
|
|
|
|
border
|
|
|
|
|
highlight-current-row
|
|
|
|
|
max-height="360px"
|
|
|
|
|
@row-click="selectWarrantyTemplate"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="index" width="55" label="序号" align="center" />
|
|
|
|
|
<el-table-column prop="content" label="模板内容" min-width="520" show-overflow-tooltip />
|
|
|
|
|
</el-table>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="warrantyTemplateDialog.visible = false">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 提交审批组件 -->
|
|
|
|
|
<submitVerify ref="submitVerifyRef" :task-variables="taskVariables" @submit-callback="submitCallback" />
|
|
|
|
|
<!-- 审批记录 -->
|
|
|
|
|
@ -981,6 +1024,52 @@ const materialRules = {
|
|
|
|
|
taxRate: [{ required: true, message: '税率不能为空', trigger: 'blur' }]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 发货/交货期预设模板 */
|
|
|
|
|
const deliveryStartTemplates = [
|
|
|
|
|
{ content: '自合同签订并生效之日起XX天发货' },
|
|
|
|
|
{ content: '自合同签订并生效之日起30天发货' },
|
|
|
|
|
{ content: '自合同签订并生效之日起60天发货' }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const deliveryStartTemplateDialog = reactive({
|
|
|
|
|
visible: false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** 打开发货/交货期模板选择弹窗 */
|
|
|
|
|
const openDeliveryStartTemplateDialog = () => {
|
|
|
|
|
deliveryStartTemplateDialog.visible = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 选择发货/交货期模板 */
|
|
|
|
|
const selectDeliveryStartTemplate = (row: { content: string }) => {
|
|
|
|
|
form.value.deliveryStart = row.content;
|
|
|
|
|
deliveryStartTemplateDialog.visible = false;
|
|
|
|
|
contractInfoFormRef.value?.validateField('deliveryStart');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 质保期描述预设模板 */
|
|
|
|
|
const warrantyPeriodDescriptionTemplates = [
|
|
|
|
|
{ content: '设备自XX之日起提供XX月的质保期服务' },
|
|
|
|
|
{ content: '设备自验收合格之日起提供12个月的质保期服务' },
|
|
|
|
|
{ content: '设备自发货之日起提供18个月的质保期服务' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const warrantyTemplateDialog = reactive({
|
|
|
|
|
visible: false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/** 打开质保期描述模板选择弹窗 */
|
|
|
|
|
const openWarrantyTemplateDialog = () => {
|
|
|
|
|
warrantyTemplateDialog.visible = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 选择质保期描述模板 */
|
|
|
|
|
const selectWarrantyTemplate = (row: { content: string }) => {
|
|
|
|
|
form.value.warrantyPeriodDescription = row.content;
|
|
|
|
|
warrantyTemplateDialog.visible = false;
|
|
|
|
|
contractInfoFormRef.value?.validateField('warrantyPeriodDescription');
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 合同付款方式对话框
|
|
|
|
|
const paymentMethodDialog = reactive({
|
|
|
|
|
visible: false,
|
|
|
|
|
@ -1186,6 +1275,18 @@ const data = reactive<{ form: ContractInfoFormEx; rules: any }>({
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
contractTemplateFlag: [{ required: true, message: '合同模板标识不能为空', trigger: 'blur' }],
|
|
|
|
|
templateId: [
|
|
|
|
|
{
|
|
|
|
|
validator: (_rule: any, _value: any, callback: (err?: Error) => void) => {
|
|
|
|
|
if (form.value.contractTemplateFlag === '2' && !form.value.templateId) {
|
|
|
|
|
callback(new Error('合同模板不能为空'));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
callback();
|
|
|
|
|
},
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
isFrameworkContract: [{ required: true, message: '请选择关联框架合同', trigger: 'change' }],
|
|
|
|
|
frameworkValidPeriod: [
|
|
|
|
|
{
|
|
|
|
|
@ -1279,6 +1380,16 @@ watch(
|
|
|
|
|
{ immediate: true }
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => form.value.contractTemplateFlag,
|
|
|
|
|
(newVal) => {
|
|
|
|
|
if (newVal === '1') {
|
|
|
|
|
form.value.templateId = undefined;
|
|
|
|
|
}
|
|
|
|
|
nextTick(() => contractInfoFormRef.value?.validateField('templateId'));
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
|
() => form.value.settlementCurrency,
|
|
|
|
|
(newVal) => {
|
|
|
|
|
|