|
|
|
@ -2,20 +2,20 @@
|
|
|
|
|
<transition name="el-zoom-in-center">
|
|
|
|
|
<div class="JNPF-preview-main">
|
|
|
|
|
<div class="JNPF-common-page-header">
|
|
|
|
|
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" />
|
|
|
|
|
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : isDetail ? '详情' : '编辑'" />
|
|
|
|
|
<div class="options">
|
|
|
|
|
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 保 存</el-button>
|
|
|
|
|
<el-button @click="goBack"> 取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
|
|
|
|
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
|
|
|
|
|
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
|
|
|
|
|
label-position="right">
|
|
|
|
|
<template v-if="!loading">
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="合同类型 " prop="contractType">
|
|
|
|
|
<el-select v-model="dataForm.contractType" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
<el-option v-for="(item, index) in contractTypeOptions" :key="index"
|
|
|
|
|
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
|
|
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="合同编码" prop="contractCode">
|
|
|
|
|
<el-input v-model="dataForm.contractCode" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="合同名称" prop="contractName">
|
|
|
|
|
<el-input v-model="dataForm.contractName" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="合同状态" prop="status">
|
|
|
|
|
<el-input v-model="dataForm.status" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -49,7 +49,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="开标日期" prop="bidOpeningDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.bidOpeningDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="开始日期" prop="startDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.startDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -65,7 +65,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="审核日期" prop="auditDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.auditDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -73,7 +73,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="供货完成日期" prop="completionDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.completionDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="关闭日期" prop="closingDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.closingDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -92,13 +92,14 @@
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input> -->
|
|
|
|
|
<el-input-number v-model="dataForm.collectionCycle" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
|
|
|
|
|
<el-input-number v-model="dataForm.collectionCycle" :min="0" label="请输入"
|
|
|
|
|
:style='{ "width": "100%" }'></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="签订日期" prop="signingDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.signingDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -106,29 +107,58 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="截止日期" prop="endDate">
|
|
|
|
|
<el-date-picker v-model="dataForm.endDate" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="供应商/客户编" prop="code">
|
|
|
|
|
<el-input v-model="dataForm.code" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-form-item label="供应商/客户" prop="code">
|
|
|
|
|
<template v-if="dataForm.contractType === '0'">
|
|
|
|
|
<popupSelect v-model="dataForm.code" propsValue="id" relationField='supplier_name'
|
|
|
|
|
vModel='code' :columnOptions="codeColumnOptions" interfaceId="382494924156735557"
|
|
|
|
|
:pageSize="20" placeholder="请选择供应商" type="popup">
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="dataForm.contractType === '1'">
|
|
|
|
|
<popupSelect v-model="dataForm.code" propsValue="id" relationField='supplier_nm'
|
|
|
|
|
vModel='dataForm.code' :columnOptions="nameColumnOptions"
|
|
|
|
|
interfaceId="395936123471343749" :pageSize="20" placeholder="请选择客户" type="popup">
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
无
|
|
|
|
|
</template>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <u-form-item label="供应商/客户id" prop="code">
|
|
|
|
|
<jnpf-popup-select v-model="dataForm.code" propsValue="id" relationField='fullName'
|
|
|
|
|
vModel='dataForm.code' :columnOptions="codeColumnOptions" interfaceId="382494924156735557"
|
|
|
|
|
:pageSize="20" placeholder="请选择" type="popup">
|
|
|
|
|
</jnpf-popup-select>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- <el-form-item label="供应商/客户编" prop="code">
|
|
|
|
|
<el-input v-model="dataForm.code" placeholder="请输入" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="供应商/客户名" prop="name">
|
|
|
|
|
<el-input v-model="dataForm.name" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<!-- <u-form-item label="供应商/客户id" prop="code">
|
|
|
|
|
<jnpf-popup-select v-model="dataForm.code" propsValue="id" relationField='fullName'
|
|
|
|
|
vModel='dataForm.code' :columnOptions="nameColumnOptions" interfaceId="395936123471343749"
|
|
|
|
|
:pageSize="20" placeholder="请选择" type="popup">
|
|
|
|
|
</jnpf-popup-select>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- <el-form-item label="供应商/客户名" prop="name">
|
|
|
|
|
<el-input v-model="dataForm.name" placeholder="请输入" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form-item> -->
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="对方合同号" prop="contractNo">
|
|
|
|
|
<el-input v-model="dataForm.contractNo" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -136,27 +166,29 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="币种 " prop="currency">
|
|
|
|
|
<el-select v-model="dataForm.currency" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in currencyOptions" :key="index"
|
|
|
|
|
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
|
|
|
|
|
:value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="数量" prop="num">
|
|
|
|
|
<el-input-number v-model="dataForm.num" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
|
|
|
|
|
<el-input-number v-model="dataForm.num" :min="0" label="请输入"
|
|
|
|
|
:style='{ "width": "100%" }'></el-input-number>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="金额" prop="amount">
|
|
|
|
|
<el-input v-model="dataForm.amount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
|
|
|
|
|
<el-input v-model="dataForm.amount" placeholder="请输入" clearable
|
|
|
|
|
:style='{ "width": "100%" }'></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="库存组织" prop="organization">
|
|
|
|
|
<el-input v-model="dataForm.organization" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -164,7 +196,7 @@
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="dataForm.remark" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -215,13 +247,13 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
-->
|
|
|
|
|
<!-- <el-col :span="24">-->
|
|
|
|
|
<!-- <el-form-item label="集团审批" prop="approval">-->
|
|
|
|
|
<!-- <el-switch v-model="dataForm.approval" :active-value="1" :inactive-value="0">-->
|
|
|
|
|
<!-- <el-col :span="24">-->
|
|
|
|
|
<!-- <el-form-item label="集团审批" prop="approval">-->
|
|
|
|
|
<!-- <el-switch v-model="dataForm.approval" :active-value="1" :inactive-value="0">-->
|
|
|
|
|
|
|
|
|
|
<!-- </el-switch>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-switch>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-tabs v-model="activemdfrsi" tab-position="top" class="mb-20">
|
|
|
|
|
<el-tab-pane label="物料明细">
|
|
|
|
@ -235,67 +267,75 @@
|
|
|
|
|
<el-table-column prop="materialCode" label="物料编码" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.materialCode" placeholder="请输入"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="materialName" label="物料名称" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.materialName" placeholder="请输入"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="specification" label="规格型号" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.specification" placeholder="请输入"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="unit" label="单位 " align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.unit" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="num" label="数量" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input-number v-model="scope.row.num" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
|
|
|
|
|
<el-input-number v-model="scope.row.num" :min="0" label="请输入"
|
|
|
|
|
:style='{ "width": "100%" }'></el-input-number>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="price" label="单价" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
|
|
|
|
|
<el-input v-model="scope.row.price" placeholder="请输入" clearable
|
|
|
|
|
:style='{ "width": "100%" }'></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="amount" label="金额" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
|
|
|
|
|
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
|
|
|
|
|
:style='{ "width": "100%" }'></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="rate" label="税率 " align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.rate" :min="0" label="请输入" :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-select v-model="scope.row.rate" :min="0" label="请输入"
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
<el-option v-for="(item, index) in rateOptions" :key="index"
|
|
|
|
|
:label="item.fullName" :value="item.id"
|
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="notPrice" label="不含税单价" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.notPrice" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
|
|
|
|
|
<el-input v-model="scope.row.notPrice" placeholder="请输入" clearable
|
|
|
|
|
:style='{ "width": "100%" }'></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="notAmount" label="不含税金额" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
|
|
|
|
|
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
|
|
|
|
|
:style='{ "width": "100%" }'></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="remark" label="备注" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.remark" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
:style='{ "width": "100%" }'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -349,268 +389,296 @@
|
|
|
|
|
</transition>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {
|
|
|
|
|
getDataInterfaceRes
|
|
|
|
|
} from '@/api/systemData/dataInterface'
|
|
|
|
|
import {
|
|
|
|
|
getDictionaryDataSelector
|
|
|
|
|
} from '@/api/systemData/dictionary'
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
visible: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
isDetail: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
contractType: "",
|
|
|
|
|
contractCode: '',
|
|
|
|
|
contractName: '',
|
|
|
|
|
status: '',
|
|
|
|
|
bidOpeningDate: '',
|
|
|
|
|
startDate: '',
|
|
|
|
|
auditDate: '',
|
|
|
|
|
completionDate: '',
|
|
|
|
|
closingDate: '',
|
|
|
|
|
collectionCycle: '',
|
|
|
|
|
signingDate: '',
|
|
|
|
|
endDate: '',
|
|
|
|
|
code: '',
|
|
|
|
|
name: '',
|
|
|
|
|
contractNo: '',
|
|
|
|
|
currency: '',
|
|
|
|
|
num: '',
|
|
|
|
|
amount: '',
|
|
|
|
|
organization: '',
|
|
|
|
|
remark: '',
|
|
|
|
|
classification: '',
|
|
|
|
|
declarationDate: '',
|
|
|
|
|
deptCode: '',
|
|
|
|
|
creatorusername: '',
|
|
|
|
|
deptName: '',
|
|
|
|
|
approval: 0,
|
|
|
|
|
contract_item0List: [],
|
|
|
|
|
contract_item1List: [],
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {
|
|
|
|
|
getDataInterfaceRes
|
|
|
|
|
} from '@/api/systemData/dataInterface'
|
|
|
|
|
import {
|
|
|
|
|
getDictionaryDataSelector
|
|
|
|
|
} from '@/api/systemData/dictionary'
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
codeColumnOptions: [
|
|
|
|
|
{
|
|
|
|
|
"label": "供应商Code",
|
|
|
|
|
"value": "supplier_code"
|
|
|
|
|
},
|
|
|
|
|
activemdfrsi: '0',
|
|
|
|
|
rules: {
|
|
|
|
|
contractType: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}, ],
|
|
|
|
|
contractCode: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}, ],
|
|
|
|
|
contractName: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}, ],
|
|
|
|
|
bidOpeningDate: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}, ],
|
|
|
|
|
{
|
|
|
|
|
"label": "供应商",
|
|
|
|
|
"value": "supplier_name"
|
|
|
|
|
},
|
|
|
|
|
currencyOptions: [{
|
|
|
|
|
"fullName": "人民币",
|
|
|
|
|
"id": "0"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "美元",
|
|
|
|
|
"id": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "英镑",
|
|
|
|
|
"id": "2"
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
contractTypeOptions: [{
|
|
|
|
|
"fullName": "采购合同",
|
|
|
|
|
"id": "0"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "销售合同",
|
|
|
|
|
"id": "1"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"fullName": "租赁合同",
|
|
|
|
|
"id": "2"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "仓储合同",
|
|
|
|
|
"id": "3"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "运输合同",
|
|
|
|
|
"id": "4"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"fullName": "施工合同",
|
|
|
|
|
"id": "5"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
rateOptions:[
|
|
|
|
|
{"fullName":"13","id":"0"},
|
|
|
|
|
{"fullName":"9","id":"1"},
|
|
|
|
|
{"fullName":"6","id":"2"},
|
|
|
|
|
{"fullName":"5","id":"3"},
|
|
|
|
|
{"fullName":"3","id":"4"},
|
|
|
|
|
{"fullName":"0","id":"5"}],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
watch: {},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
contract_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.contract_item0List.length; i++) {
|
|
|
|
|
const e = this.dataForm.contract_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
contract_item1Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.contract_item1List.length; i++) {
|
|
|
|
|
const e = this.dataForm.contract_item1List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
],
|
|
|
|
|
nameColumnOptions: [
|
|
|
|
|
{
|
|
|
|
|
"label": "ID",
|
|
|
|
|
"value": "id"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "客户编码",
|
|
|
|
|
"value": "supplier_cd"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "客户名称",
|
|
|
|
|
"value": "supplier_nm"
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
visible: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
isDetail: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
contractType: "",
|
|
|
|
|
contractCode: '',
|
|
|
|
|
contractName: '',
|
|
|
|
|
status: '',
|
|
|
|
|
bidOpeningDate: '',
|
|
|
|
|
startDate: '',
|
|
|
|
|
auditDate: '',
|
|
|
|
|
completionDate: '',
|
|
|
|
|
closingDate: '',
|
|
|
|
|
collectionCycle: '',
|
|
|
|
|
signingDate: '',
|
|
|
|
|
endDate: '',
|
|
|
|
|
code: '',
|
|
|
|
|
name: '',
|
|
|
|
|
contractNo: '',
|
|
|
|
|
currency: '',
|
|
|
|
|
num: '',
|
|
|
|
|
amount: '',
|
|
|
|
|
organization: '',
|
|
|
|
|
remark: '',
|
|
|
|
|
classification: '',
|
|
|
|
|
declarationDate: '',
|
|
|
|
|
deptCode: '',
|
|
|
|
|
creatorusername: '',
|
|
|
|
|
deptName: '',
|
|
|
|
|
approval: 0,
|
|
|
|
|
contract_item0List: [],
|
|
|
|
|
contract_item1List: [],
|
|
|
|
|
},
|
|
|
|
|
clearData(data) {
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
|
} else if (data[key] instanceof Object) {
|
|
|
|
|
this.clearData(data[key]);
|
|
|
|
|
} else {
|
|
|
|
|
data[key] = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
activemdfrsi: '0',
|
|
|
|
|
rules: {
|
|
|
|
|
contractType: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
},],
|
|
|
|
|
contractCode: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
},],
|
|
|
|
|
contractName: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
},],
|
|
|
|
|
bidOpeningDate: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
},],
|
|
|
|
|
},
|
|
|
|
|
init(id, isDetail) {
|
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
|
this.visible = true;
|
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/example/ContractFile/' + this.dataForm.id,
|
|
|
|
|
method: 'get'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
|
this.loading = false
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
|
|
|
|
currencyOptions: [{
|
|
|
|
|
"fullName": "人民币",
|
|
|
|
|
"id": "0"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "美元",
|
|
|
|
|
"id": "1"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "英镑",
|
|
|
|
|
"id": "2"
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
contractTypeOptions: [{
|
|
|
|
|
"fullName": "采购合同",
|
|
|
|
|
"id": "0"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "销售合同",
|
|
|
|
|
"id": "1"
|
|
|
|
|
},
|
|
|
|
|
// 表单提交
|
|
|
|
|
dataFormSubmit() {
|
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (!this.contract_item0Exist()) return
|
|
|
|
|
if (!this.contract_item1Exist()) return
|
|
|
|
|
this.request()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
{
|
|
|
|
|
"fullName": "租赁合同",
|
|
|
|
|
"id": "2"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "仓储合同",
|
|
|
|
|
"id": "3"
|
|
|
|
|
}, {
|
|
|
|
|
"fullName": "运输合同",
|
|
|
|
|
"id": "4"
|
|
|
|
|
},
|
|
|
|
|
request() {
|
|
|
|
|
var _data = this.dataList()
|
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/example/ContractFile',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
{
|
|
|
|
|
"fullName": "施工合同",
|
|
|
|
|
"id": "5"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
rateOptions: [
|
|
|
|
|
{ "fullName": "13", "id": "0" },
|
|
|
|
|
{ "fullName": "9", "id": "1" },
|
|
|
|
|
{ "fullName": "6", "id": "2" },
|
|
|
|
|
{ "fullName": "5", "id": "3" },
|
|
|
|
|
{ "fullName": "3", "id": "4" },
|
|
|
|
|
{ "fullName": "0", "id": "5" }],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
watch: {
|
|
|
|
|
'dataForm.contractType': function (newQuestion, oldQuestion) {
|
|
|
|
|
this.dataForm.code = '';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() { },
|
|
|
|
|
mounted() { },
|
|
|
|
|
methods: {
|
|
|
|
|
contract_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.contract_item0List.length; i++) {
|
|
|
|
|
const e = this.dataForm.contract_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
contract_item1Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.contract_item1List.length; i++) {
|
|
|
|
|
const e = this.dataForm.contract_item1List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
},
|
|
|
|
|
clearData(data) {
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
|
} else if (data[key] instanceof Object) {
|
|
|
|
|
this.clearData(data[key]);
|
|
|
|
|
} else {
|
|
|
|
|
data[key] = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init(id, isDetail) {
|
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
|
this.visible = true;
|
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/example/ContractFile/' + this.dataForm.id,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addcontract_item0List() {
|
|
|
|
|
let item = {
|
|
|
|
|
materialCode: undefined,
|
|
|
|
|
materialName: undefined,
|
|
|
|
|
specification: undefined,
|
|
|
|
|
unit: undefined,
|
|
|
|
|
num: undefined,
|
|
|
|
|
price: undefined,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
rate: undefined,
|
|
|
|
|
notPrice: undefined,
|
|
|
|
|
notAmount: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.contract_item0List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcontract_item0List(index) {
|
|
|
|
|
this.dataForm.contract_item0List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
addcontract_item1List() {
|
|
|
|
|
let item = {
|
|
|
|
|
enclosure: undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.contract_item1List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcontract_item1List(index) {
|
|
|
|
|
this.dataForm.contract_item1List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
_data.approval = parseInt(_data.approval)
|
|
|
|
|
for (let i = 0; i < _data.contract_item0List.length; i++) {
|
|
|
|
|
var _list = _data.contract_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.contract_item1List.length; i++) {
|
|
|
|
|
var _list = _data.contract_item1List[i];
|
|
|
|
|
_list.enclosure = JSON.stringify(_list.enclosure)
|
|
|
|
|
}
|
|
|
|
|
return _data;
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
_dataAll.approval = parseInt(_dataAll.approval)
|
|
|
|
|
for (let i = 0; i < _dataAll.contract_item0List.length; i++) {
|
|
|
|
|
var _list = _dataAll.contract_item0List[i];
|
|
|
|
|
method: 'get'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
|
this.loading = false
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.contract_item1List.length; i++) {
|
|
|
|
|
var _list = _dataAll.contract_item1List[i];
|
|
|
|
|
_list.enclosure = JSON.parse(_list.enclosure)
|
|
|
|
|
});
|
|
|
|
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
|
|
|
|
},
|
|
|
|
|
// 表单提交
|
|
|
|
|
dataFormSubmit() {
|
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (!this.contract_item0Exist()) return
|
|
|
|
|
if (!this.contract_item1Exist()) return
|
|
|
|
|
this.request()
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
request() {
|
|
|
|
|
var _data = this.dataList()
|
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/example/ContractFile',
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/example/ContractFile/' + this.dataForm.id,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: 'success',
|
|
|
|
|
duration: 1000,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.visible = false
|
|
|
|
|
this.$emit('refresh', true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addcontract_item0List() {
|
|
|
|
|
let item = {
|
|
|
|
|
materialCode: undefined,
|
|
|
|
|
materialName: undefined,
|
|
|
|
|
specification: undefined,
|
|
|
|
|
unit: undefined,
|
|
|
|
|
num: undefined,
|
|
|
|
|
price: undefined,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
rate: undefined,
|
|
|
|
|
notPrice: undefined,
|
|
|
|
|
notAmount: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.contract_item0List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcontract_item0List(index) {
|
|
|
|
|
this.dataForm.contract_item0List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
addcontract_item1List() {
|
|
|
|
|
let item = {
|
|
|
|
|
enclosure: undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.contract_item1List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcontract_item1List(index) {
|
|
|
|
|
this.dataForm.contract_item1List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
_data.approval = parseInt(_data.approval)
|
|
|
|
|
for (let i = 0; i < _data.contract_item0List.length; i++) {
|
|
|
|
|
var _list = _data.contract_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.contract_item1List.length; i++) {
|
|
|
|
|
var _list = _data.contract_item1List[i];
|
|
|
|
|
_list.enclosure = JSON.stringify(_list.enclosure)
|
|
|
|
|
}
|
|
|
|
|
return _data;
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
_dataAll.approval = parseInt(_dataAll.approval)
|
|
|
|
|
for (let i = 0; i < _dataAll.contract_item0List.length; i++) {
|
|
|
|
|
var _list = _dataAll.contract_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.contract_item1List.length; i++) {
|
|
|
|
|
var _list = _dataAll.contract_item1List[i];
|
|
|
|
|
_list.enclosure = JSON.parse(_list.enclosure)
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|