Commit b24d09df by 谢明辉

a

1 parent 3039eb77
...@@ -2,302 +2,300 @@ ...@@ -2,302 +2,300 @@
<div> <div>
<!-- 合同基本信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 合同基本信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="contract_show =!contract_show">销售合同信息</h1> <span style="font-size:24px" @click="contract_show =!contract_show">检索结果</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('form')">提交</el-button>
<el-col :span="2"> </div>
<h1 class="h-button" @click="form_submit('form')">提交</h1>
</el-col> <transition name="el-fade-in-linear">
</el-row> <el-form id="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" :rules="add_rules" v-show="contract_show">
<transition name="el-fade-in-linear"> <el-row>
<el-form id="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" :rules="add_rules" v-show="contract_show"> <el-col :span="8">
<el-row> <el-form-item label="合同编号">
<el-col :span="8"> <el-select class="width-220" v-model="form.contract_unid" filterable remote reserve-keyword placeholder="合同编号" :remote-method="contractIdRemoteMethod">
<el-form-item label="合同编号"> <el-option v-for="(item,index) in contract_unid_selected_data" :key="index" :label="item.name" :value="item.country_unid">
<el-select class="width-220" v-model="form.contract_unid" filterable remote reserve-keyword placeholder="合同编号" :remote-method="contractIdRemoteMethod"> </el-option>
<el-option v-for="(item,index) in contract_unid_selected_data" :key="index" :label="item.name" :value="item.country_unid"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="销售员">
<el-col :span="8"> <el-select class="width-220" v-model="form.salesperson_unid" filterable remote placeholder="销售人员" :remote-method="salespersonIdRemoteMethod">
<el-form-item label="销售员"> <el-option v-for="(item,index) in salesperson_unid_selected_data" :key="index" :label="item.name" :value="item.code_unid">
<el-select class="width-220" v-model="form.salesperson_unid" filterable remote placeholder="销售人员" :remote-method="salespersonIdRemoteMethod"> </el-option>
<el-option v-for="(item,index) in salesperson_unid_selected_data" :key="index" :label="item.name" :value="item.code_unid"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="项目名称">
<el-col :span="8"> <el-select class="width-220" v-model="form.project_unid" filterable remote placeholder="项目名称" :remote-method="projectIdRemoteMethod">
<el-form-item label="项目名称"> <el-option v-for="(item,index) in project_unid_selected_data" :key="index" :label="item.name" :value="index">
<el-select class="width-220" v-model="form.project_unid" filterable remote placeholder="项目名称" :remote-method="projectIdRemoteMethod"> </el-option>
<el-option v-for="(item,index) in project_unid_selected_data" :key="index" :label="item.name" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="客户名称">
<el-col :span="8"> <el-select class="width-220" v-model="form.customer_unid" filterable remote placeholder="客户名称" :remote-method="customerIdRemoteMethod">
<el-form-item label="客户名称"> <el-option v-for="(item,index) in customer_unid_selected_data" :key="index" :label="item.name" :value="index">
<el-select class="width-220" v-model="form.customer_unid" filterable remote placeholder="客户名称" :remote-method="customerIdRemoteMethod"> </el-option>
<el-option v-for="(item,index) in customer_unid_selected_data" :key="index" :label="item.name" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="项目所在地">
<el-col :span="8"> <el-select style="width:100px" v-model="form.province" placeholder="省" @change="get_cities()">
<el-form-item label="项目所在地"> <el-option v-for="(item,index) in provinces" :key="index" :label="item.name" :value="item.province_unid">
<el-select style="width:100px" v-model="form.province" placeholder="省" @change="get_cities()"> </el-option>
<el-option v-for="(item,index) in provinces" :key="index" :label="item.name" :value="item.province_unid"> </el-select>
</el-option> <el-select style="width:100px" v-model="form.city" placeholder="市" @change="get_counties()">
</el-select> <el-option v-for="(item,index) in cities" :key="index" :label="item.name" :value="item.city_unid">
<el-select style="width:100px" v-model="form.city" placeholder="市" @change="get_counties()"> </el-option>
<el-option v-for="(item,index) in cities" :key="index" :label="item.name" :value="item.city_unid"> </el-select>
</el-option> <el-select style="width:100px" v-model="form.county" placeholder="区县">
</el-select> <el-option v-for="(item,index) in counties" :key="index" :label="item.name" :value="item.county_unid">
<el-select style="width:100px" v-model="form.county" placeholder="区县"> </el-option>
<el-option v-for="(item,index) in counties" :key="index" :label="item.name" :value="item.county_unid"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="质保周期(月)">
<el-col :span="8"> <el-input-number class="width-220" v-model="form.guarantee_period" :step="6" :min="6" :max="60" size="medium"></el-input-number>
<el-form-item label="质保周期(月)"> </el-form-item>
<el-input-number class="width-220" v-model="form.guarantee_period" :step="6" :min="6" :max="60" size="medium"></el-input-number> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="签订日期">
<el-col :span="8"> <el-date-picker class="width-220" v-model="form.sign_date" type="date" placeholder="日期" value-format="yyyy-MM-dd" @change="signDataChanged">
<el-form-item label="签订日期"> </el-date-picker>
<el-date-picker class="width-220" v-model="form.sign_date" type="date" placeholder="日期" value-format="yyyy-MM-dd" @change="signDataChanged"> </el-form-item>
</el-date-picker> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="所属年份">
<el-col :span="8"> <el-input class="width-220" v-model="form.year" :disabled="true"></el-input>
<el-form-item label="所属年份"> </el-form-item>
<el-input class="width-220" v-model="form.year" :disabled="true"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="所属月份">
<el-col :span="8"> <el-input class="width-220" v-model="form.month" :disabled="true"></el-input>
<el-form-item label="所属月份"> </el-form-item>
<el-input class="width-220" v-model="form.month" :disabled="true"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="产品线类型">
<el-col :span="8"> <el-select class="width-220" v-model="form.product_line_type" placeholder="产品线类型">
<el-form-item label="产品线类型"> <el-option v-for="(value,index) in product_line_type_data" :key="index" :label="value" :value="index">
<el-select class="width-220" v-model="form.product_line_type" placeholder="产品线类型"> </el-option>
<el-option v-for="(value,index) in projectline_type_data" :key="index" :label="value" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="合同状态">
<el-col :span="8"> <el-select class="width-220" v-model="form.contract_state" placeholder="合同状态">
<el-form-item label="合同状态"> <el-option v-for="(value,index) in contract_state_data" :key="index" :label="value" :value="index">
<el-select class="width-220" v-model="form.contract_state" placeholder="合同状态"> </el-option>
<el-option v-for="(value,index) in contract_state_data" :key="index" :label="value" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="合同性质">
<el-col :span="8"> <el-select class="width-220" v-model="form.contract_type" placeholder="合同性质">
<el-form-item label="合同性质"> <el-option v-for="(value,index) in contract_type_data" :key="index" :label="value" :value="index">
<el-select class="width-220" v-model="form.contract_type" placeholder="合同性质"> </el-option>
<el-option v-for="(value,index) in contract_type_data" :key="index" :label="value" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="合同金额" prop="contract_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.contract_amount"></el-input>
<el-form-item label="合同金额" prop="contract_amount"> </el-form-item>
<el-input class="width-220" v-model="form.contract_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="抵扣金额" prop="deduct_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.deduct_amount"></el-input>
<el-form-item label="抵扣金额" prop="deduct_amount"> </el-form-item>
<el-input class="width-220" v-model="form.deduct_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="备注">
<el-col :span="8"> <el-input class="width-220" v-model="form.contract_amount_note"></el-input>
<el-form-item label="备注"> </el-form-item>
<el-input class="width-220" v-model="form.contract_amount_note"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="累计回款额">
<el-col :span="8"> <el-input class="width-220" v-model="total_reback_amount" :disabled="true"></el-input>
<el-form-item label="累计回款额"> </el-form-item>
<el-input class="width-220" v-model="total_reback_amount" :disabled="true"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="暂停金额" prop="stop_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.stop_amount"></el-input>
<el-form-item label="暂停金额" prop="stop_amount"> </el-form-item>
<el-input class="width-220" v-model="form.stop_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="备注">
<el-col :span="8"> <el-input class="width-220" v-model="form.reback_note"></el-input>
<el-form-item label="备注"> </el-form-item>
<el-input class="width-220" v-model="form.reback_note"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="合同余额">
<el-col :span="8"> <el-input class="width-220" v-model="contract_remaining" :disabled="true"></el-input>
<el-form-item label="合同余额"> </el-form-item>
<el-input class="width-220" v-model="contract_remaining" :disabled="true"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="豁免金额" prop="exemptions_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.exemptions_amount"></el-input>
<el-form-item label="豁免金额" prop="exemptions_amount"> </el-form-item>
<el-input class="width-220" v-model="form.exemptions_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="备注">
<el-col :span="8"> <el-input class="width-220" v-model="form.contract_remain_note"></el-input>
<el-form-item label="备注"> </el-form-item>
<el-input class="width-220" v-model="form.contract_remain_note"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="合同是否归档">
<el-col :span="8"> <el-select class="width-220" v-model="form.is_archive" placeholder="请选择">
<el-form-item label="合同是否归档"> <el-option label="是" value=true></el-option>
<el-select class="width-220" v-model="form.is_archive" placeholder="请选择"> <el-option label="否" value=false></el-option>
<el-option label="是" value=true></el-option> </el-select>
<el-option label="否" value=false></el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="坏账金额" prop="bad_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.bad_amount"></el-input>
<el-form-item label="坏账金额" prop="bad_amount"> </el-form-item>
<el-input class="width-220" v-model="form.bad_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="备注">
<el-col :span="8"> <el-input class="width-220" v-model="form.bad_amount_note"></el-input>
<el-form-item label="备注"> </el-form-item>
<el-input class="width-220" v-model="form.bad_amount_note"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="累计应收款">
<el-col :span="8"> <el-input class="width-220" v-model="total_receive_amount" :disabled="true"></el-input>
<el-form-item label="累计应收款"> </el-form-item>
<el-input class="width-220" v-model="total_receive_amount" :disabled="true"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="应收账款余额">
<el-col :span="8"> <el-input class="width-220" v-model="total_leave_amount" :disabled="true"></el-input>
<el-form-item label="应收账款余额"> </el-form-item>
<el-input class="width-220" v-model="total_leave_amount" :disabled="true"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="逾期天数">
<el-col :span="8"> <el-input class="width-220" v-model="over_days_unid" :disabled="true"></el-input>
<el-form-item label="逾期天数"> </el-form-item>
<el-input class="width-220" v-model="over_days_unid" :disabled="true"></el-input> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="8">
<el-row> <el-form-item label="确认收入金额" prop="confirm_income_amount">
<el-col :span="8"> <el-input class="width-220" v-model="form.confirm_income_amount"></el-input>
<el-form-item label="确认收入金额" prop="confirm_income_amount"> </el-form-item>
<el-input class="width-220" v-model="form.confirm_income_amount"></el-input> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="账款状态">
<el-col :span="8"> <el-select class="width-220" v-model="form.amount_state_unid" placeholder="账款状态">
<el-form-item label="账款状态"> <el-option v-for="(value,index) in amount_state_unid_data" :key="index" :label="value" :value="index">
<el-select class="width-220" v-model="form.amount_state_unid" placeholder="账款状态"> </el-option>
<el-option v-for="(value,index) in amount_state_unid_data" :key="index" :label="value" :value="index"> </el-select>
</el-option> </el-form-item>
</el-select> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="9">
<el-row> <el-form-item label="维保服务期">
<el-col :span="9"> <el-date-picker v-model="guarantee_date" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :unlink-panels="true">
<el-form-item label="维保服务期"> </el-date-picker>
<el-date-picker v-model="guarantee_date" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :unlink-panels="true"> </el-form-item>
</el-date-picker> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="19">
<el-row> <el-form-item label="质保期">
<el-col :span="19"> <el-select class="width-220" v-model="form.mainten_start_point" placeholder="开始节点">
<el-form-item label="质保期"> <el-option v-for="(value,index) in mainten_start_point_data" :key="index" :label="value" :value="index">
<el-select class="width-220" v-model="form.mainten_start_point" placeholder="开始节点"> </el-option>
<el-option v-for="(value,index) in mainten_start_point_data" :key="index" :label="value" :value="index"> </el-select>
</el-option> <el-date-picker class="width-220" v-model="this.mainten_start_date" type="date" placeholder="开始日期" value-format="yyyy-MM-dd" :readonly="true">
</el-select> </el-date-picker>
<el-date-picker class="width-220" v-model="this.mainten_start_date" type="date" placeholder="开始日期" value-format="yyyy-MM-dd" :readonly="true"> <el-date-picker class="width-220" v-model="this.mainten_end_date" type="date" placeholder="结束日期" value-format="yyyy-MM-dd" :readonly="true">
</el-date-picker> </el-date-picker>
<el-date-picker class="width-220" v-model="this.mainten_end_date" type="date" placeholder="结束日期" value-format="yyyy-MM-dd" :readonly="true"> </el-form-item>
</el-date-picker> </el-col>
</el-form-item> </el-row>
</el-col> <el-row>
</el-row> <el-col :span="12">
<el-row> <el-form-item label="备注">
<el-col :span="12"> <el-input v-model="form.contract_note" type="textarea" :rows="8" style="width:500px"></el-input>
<el-form-item label="备注"> </el-form-item>
<el-input v-model="form.contract_note" type="textarea" :rows="8" style="width:500px"></el-input> </el-col>
</el-form-item> <el-col :span="12">
</el-col> <el-upload class="upload-demo" drag :action="upload_url" multiple :file-list="contract_appendix_list" :before-upload="test">
<el-col :span="12"> <i class="el-icon-upload"></i>
<el-upload class="upload-demo" drag :action="upload_url" multiple :file-list="contract_appendix_list" :before-upload="test"> <div class="el-upload__text">将文件拖到此处,或点击上传</div>
<i class="el-icon-upload"></i> </el-upload>
<div class="el-upload__text">将文件拖到此处,或点击上传</div> </el-col>
</el-upload> </el-row>
</el-col> </el-form>
</el-row> </transition>
</el-form> </el-card>
</transition>
<!-- 基本信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 基本信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- 付款约定开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 付款约定开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="payments_show = !payments_show">付款约定</h1> <span style="font-size:24px" @click="payments_show = !payments_show">付款约定</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('payment')">提交</el-button>
<el-col :span="2">
<h1 class="h-button" @click="form_submit('payment')">提交</h1>
</el-col>
</el-row>
<transition name="el-fade-in-linear">
<div id="payments_data_table" v-show="payments_show">
<el-table :data="payments_data" style="width: 100%">
<el-table-column prop="payment_progress" label="付款进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="payment_type" label="付款类型" min-width="100" align="center">
</el-table-column>
<el-table-column prop="days" label="天数" min-width="100" align="center">
</el-table-column>
<el-table-column prop="payment_propority" label="付款比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="pay_date" label="本期应付款日期" min-width="200" align="center">
</el-table-column>
<el-table-column prop="amount" label="本期应付款金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="payment_requirement" label="本期付款条件" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="payment_data_modify(scope.$index, payments_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, payments_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="payments_dialog_show = true">添加付款约定</el-button>
</el-row>
</div> </div>
</transition>
<transition name="el-fade-in-linear">
<div id="payments_data_table" v-show="payments_show">
<el-table :data="payments_data" style="width: 100%">
<el-table-column prop="payment_progress" label="付款进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="payment_type" label="付款类型" min-width="100" align="center">
</el-table-column>
<el-table-column prop="days" label="天数" min-width="100" align="center">
</el-table-column>
<el-table-column prop="payment_propority" label="付款比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="pay_date" label="本期应付款日期" min-width="200" align="center">
</el-table-column>
<el-table-column prop="amount" label="本期应付款金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="payment_requirement" label="本期付款条件" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="payment_data_modify(scope.$index, payments_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, payments_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="payments_dialog_show = true">添加付款约定</el-button>
</el-row>
</div>
</transition>
</el-card>
<!-- 付款约定弹出框 --> <!-- 付款约定弹出框 -->
...@@ -338,44 +336,42 @@ ...@@ -338,44 +336,42 @@
<!-- 付款约定结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 付款约定结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- 合同回款信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 合同回款信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="rebacks_show = !rebacks_show">合同回款信息(财务部)</h1> <span style="font-size:24px" @click="rebacks_show = !rebacks_show">合同回款信息(财务部)</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('reback')">提交</el-button>
<el-col :span="2">
<h1 class="h-button" @click="form_submit('reback')">提交</h1>
</el-col>
</el-row>
<transition name="el-fade-in-linear">
<div id="rebacks_data_table" v-show="rebacks_show">
<el-table :data="rebacks_data" style="width:100%">
<el-table-column prop="reback_progress" label="回款进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="actual_reback_amount" label="实际回款金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="reback_propority" label="回款比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="reback_date" label="回款日期" min-width="200" align="center">
</el-table-column>
<el-table-column prop="reback_note" label="回款备注" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="reback_data_modify(scope.$index, rebacks_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, rebacks_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="rebacks_dialog_show = true">添加合同回款信息</el-button>
</el-row>
</div> </div>
</transition>
<transition name="el-fade-in-linear">
<div id="rebacks_data_table" v-show="rebacks_show">
<el-table :data="rebacks_data" style="width:100%">
<el-table-column prop="reback_progress" label="回款进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="actual_reback_amount" label="实际回款金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="reback_propority" label="回款比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="reback_date" label="回款日期" min-width="200" align="center">
</el-table-column>
<el-table-column prop="reback_note" label="回款备注" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="reback_data_modify(scope.$index, rebacks_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, rebacks_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="rebacks_dialog_show = true">添加合同回款信息</el-button>
</el-row>
</div>
</transition>
</el-card>
<!-- 合同回款信息弹出框 --> <!-- 合同回款信息弹出框 -->
<el-dialog id="rebacks_dialog" title="回款信息" :visible.sync="rebacks_dialog_show" width="30%"> <el-dialog id="rebacks_dialog" title="回款信息" :visible.sync="rebacks_dialog_show" width="30%">
...@@ -400,48 +396,46 @@ ...@@ -400,48 +396,46 @@
<!-- 合同回款信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 合同回款信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- 合同开票信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 合同开票信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="receipts_show = !receipts_show">合同开票信息(财务部)</h1> <span style="font-size:24px" @click="receipts_show = !receipts_show">合同开票信息(财务部)</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('receipt')">提交</el-button>
<el-col :span="2">
<h1 class="h-button" @click="form_submit('receipt')">提交</h1>
</el-col>
</el-row>
<transition name="el-fade-in-linear">
<div id="receipts_data_table" v-show="receipts_show">
<el-table :data="receipts_data" style="width: 100%">
<el-table-column prop="receipt_progress" label="开票进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="receipt_amount" label="开票金额" min-width="150" align="center">
</el-table-column>
<el-table-column prop="oa_flow_id" label="OA流水号" min-width="150" align="center">
</el-table-column>
<el-table-column prop="receipt_propority" label="开票比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="total_receipt_amount" label="累计开票金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="is_reback" label="是否回款" min-width="100" align="center">
</el-table-column>
<el-table-column prop="receipt_note" label="备注" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="receipt_data_modify(scope.$index, receipts_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, receipts_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="receipts_dialog_show = true">添加开票信息</el-button>
</el-row>
</div> </div>
</transition>
<transition name="el-fade-in-linear">
<div id="receipts_data_table" v-show="receipts_show">
<el-table :data="receipts_data" style="width: 100%">
<el-table-column prop="receipt_progress" label="开票进度" min-width="100" align="center">
</el-table-column>
<el-table-column prop="receipt_amount" label="开票金额" min-width="150" align="center">
</el-table-column>
<el-table-column prop="oa_flow_id" label="OA流水号" min-width="150" align="center">
</el-table-column>
<el-table-column prop="receipt_propority" label="开票比例(%)" min-width="100" align="center">
</el-table-column>
<el-table-column prop="total_receipt_amount" label="累计开票金额" min-width="200" align="center">
</el-table-column>
<el-table-column prop="is_reback" label="是否回款" min-width="100" align="center">
</el-table-column>
<el-table-column prop="receipt_note" label="备注" min-width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="receipt_data_modify(scope.$index, receipts_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, receipts_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="receipts_dialog_show = true">添加开票信息</el-button>
</el-row>
</div>
</transition>
</el-card>
<!-- 开票信息弹出框 --> <!-- 开票信息弹出框 -->
<el-dialog id="receipts_dialog" title="开票合同" :visible.sync="receipts_dialog_show" width="30%"> <el-dialog id="receipts_dialog" title="开票合同" :visible.sync="receipts_dialog_show" width="30%">
...@@ -465,38 +459,36 @@ ...@@ -465,38 +459,36 @@
<!-- 合同开票信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 合同开票信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- 发货信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 发货信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="delivers_show = !delivers_show">发货信息(生产部)</h1> <span style="font-size:24px" @click="delivers_show = !delivers_show">发货信息(生产部)</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('deliver')">提交</el-button>
<el-col :span="2">
<h1 class="h-button" @click="form_submit('deliver')">提交</h1>
</el-col>
</el-row>
<transition name="el-fade-in-linear">
<div id="delivers_data_table" v-show="delivers_show">
<el-table :data="delivers_data" style="width: 100%">
<el-table-column prop="deliver_goods_date" label="发货日期" width="300" align="center">
</el-table-column>
<el-table-column prop="goods_acceptanc_date" label="到货验收日期" width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="100" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="deliver_data_modify(scope.$index, delivers_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, delivers_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="delivers_dialog_show = true">添加发货信息</el-button>
</el-row>
</div> </div>
</transition>
<transition name="el-fade-in-linear">
<div id="delivers_data_table" v-show="delivers_show">
<el-table :data="delivers_data" style="width: 100%">
<el-table-column prop="deliver_goods_date" label="发货日期" width="300" align="center">
</el-table-column>
<el-table-column prop="goods_acceptanc_date" label="到货验收日期" width="300" align="center">
</el-table-column>
<el-table-column label="操作" min-width="100" align="center" fixed="right">
<template slot-scope="scope">
<el-button @click.native.prevent="deliver_data_modify(scope.$index, delivers_data)" type="primary" round>
修改
</el-button>
<el-button @click.native.prevent="data_delete(scope.$index, delivers_data)" type="danger" round>
移除
</el-button>
</template>
</el-table-column>
</el-table>
<el-row>
<el-button class="add_button" type="text" @click="delivers_dialog_show = true">添加发货信息</el-button>
</el-row>
</div>
</transition>
</el-card>
<!-- 发货信息信息弹出框 --> <!-- 发货信息信息弹出框 -->
<el-dialog id="delivers_dialog" title="发货信息" :visible.sync="delivers_dialog_show" width="30%"> <el-dialog id="delivers_dialog" title="发货信息" :visible.sync="delivers_dialog_show" width="30%">
...@@ -522,80 +514,77 @@ ...@@ -522,80 +514,77 @@
<!-- 发货信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 发货信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- 工程验收信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 工程验收信息开始~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<el-row> <el-card class="box-card">
<el-col :span="22"> <div slot="header" class="clearfix">
<h1 @click="acceptance_show = !acceptance_show">工程验收信息(工程部)</h1> <span style="font-size:24px" @click="acceptance_show = !acceptance_show">工程验收信息(工程部)</span>
</el-col> <el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('project')">提交</el-button>
<el-col :span="2"> </div>
<h1 class="h-button" @click="form_submit('project')">提交</h1>
</el-col>
</el-row>
<transition name="el-fade-in-linear"> <transition name="el-fade-in-linear">
<div id="acceptance_form" v-show="acceptance_show"> <div id="acceptance_form" v-show="acceptance_show">
<el-form :inline="true" :model="first_acceptances_form" class="demo-form-inline" label-width="100px" :rules="acceptance_form_rules" ref="first_acceptances_form"> <el-form :inline="true" :model="first_acceptances_form" class="demo-form-inline" label-width="100px" :rules="acceptance_form_rules" ref="first_acceptances_form">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-tooltip class="item" effect="dark" content="填写初验必须填写终验" placement="top"> <el-tooltip class="item" effect="dark" content="填写初验必须填写终验" placement="top">
<el-form-item label="是否初验" prop="acceptance_type"> <el-form-item label="是否初验" prop="acceptance_type">
<el-select class="width-220" v-model="first_acceptances_form.acceptance_type"> <el-select class="width-220" v-model="first_acceptances_form.acceptance_type">
<el-option label="是" value="1"> <el-option label="是" value="1">
</el-option> </el-option>
<el-option label="否" value=""> <el-option label="否" value="">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-tooltip>
</el-col>
<el-col :span="8">
<el-form-item label="项目验收日期" prop="acceptance_date">
<el-date-picker class="width-220" v-model="first_acceptances_form.acceptance_date" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item> </el-form-item>
</el-tooltip> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8"> <el-form-item label="备注">
<el-form-item label="项目验收日期" prop="acceptance_date"> <el-input class="width-220" v-model="first_acceptances_form.acceptance_note" placeholder="备注"></el-input>
<el-date-picker class="width-220" v-model="first_acceptances_form.acceptance_date" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input class="width-220" v-model="first_acceptances_form.acceptance_note" placeholder="备注"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
此处需要上传附件
</el-row>
</el-form>
<el-form :inline="true" :model="final_acceptances_form" class="demo-form-inline" label-width="100px" :rules="acceptance_form_rules2" ref="final_acceptances_form">
<el-row>
<el-col :span="8">
<el-tooltip class="item" effect="dark" content="填写初验必须填写终验" placement="top">
<el-form-item label="是否终验" prop="acceptance_type">
<el-select class="width-220" v-model="final_acceptances_form.acceptance_type">
<el-option label="是" value="2">
</el-option>
<el-option label="否" value="">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-tooltip> </el-col>
</el-col> </el-row>
<el-col :span="8"> <el-row>
<el-form-item label="项目验收日期" prop="acceptance_date"> 此处需要上传附件
<el-date-picker class="width-220" v-model="final_acceptances_form.acceptance_date" type="date" value-format="yyyy-MM-dd"> </el-row>
</el-date-picker> </el-form>
</el-form-item> <el-form :inline="true" :model="final_acceptances_form" class="demo-form-inline" label-width="100px" :rules="acceptance_form_rules2" ref="final_acceptances_form">
</el-col> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="备注"> <el-tooltip class="item" effect="dark" content="填写初验必须填写终验" placement="top">
<el-input class="width-220" v-model="final_acceptances_form.acceptance_note" placeholder="备注"></el-input> <el-form-item label="是否终验" prop="acceptance_type">
</el-form-item> <el-select class="width-220" v-model="final_acceptances_form.acceptance_type">
</el-col> <el-option label="是" value="2">
</el-row> </el-option>
<el-row> <el-option label="否" value="">
此处需要上传附件 </el-option>
</el-row> </el-select>
</el-form> </el-form-item>
</div> </el-tooltip>
</transition> </el-col>
<el-col :span="8">
<el-form-item label="项目验收日期" prop="acceptance_date">
<el-date-picker class="width-220" v-model="final_acceptances_form.acceptance_date" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input class="width-220" v-model="final_acceptances_form.acceptance_note" placeholder="备注"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
此处需要上传附件
</el-row>
</el-form>
</div>
</transition>
</el-card>
<!-- 工程验收信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <!-- 工程验收信息结束~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div> </div>
</template> </template>
...@@ -606,6 +595,7 @@ const twodecimalrule = { ...@@ -606,6 +595,7 @@ const twodecimalrule = {
trigger: "blur" trigger: "blur"
}; };
export default { export default {
name: "contract_information",
data() { data() {
return { return {
contract_appendix_list: [], contract_appendix_list: [],
...@@ -621,7 +611,7 @@ export default { ...@@ -621,7 +611,7 @@ export default {
counties: [], counties: [],
modify_data: false, //用来标志dialog用来修改数据 modify_data: false, //用来标志dialog用来修改数据
modify_index: -1, //用来标志修改数据的索引 modify_index: -1, //用来标志修改数据的索引
projectline_type_data: ["安防", "交通", "客流", "维保"], product_line_type_data: ["安防", "交通", "客流", "维保"],
contract_state_data: ["已完成", "代发货", "施工中", "项目暂停"], contract_state_data: ["已完成", "代发货", "施工中", "项目暂停"],
contract_type_data: ["供货", "施工", "集成", "维保"], contract_type_data: ["供货", "施工", "集成", "维保"],
amount_state_unid_data: ["正常验收款", "正常维保"], amount_state_unid_data: ["正常验收款", "正常维保"],
...@@ -697,7 +687,9 @@ export default { ...@@ -697,7 +687,9 @@ export default {
// 合同备注 // 合同备注
contract_note: "", contract_note: "",
// 合同附件 // 合同附件
contract_appendix: {} contract_appendix: {},
start_guarantee_date: "",
end_guarantee_date: ""
}, },
// 工程验收表单 // 工程验收表单
...@@ -1109,9 +1101,6 @@ export default { ...@@ -1109,9 +1101,6 @@ export default {
this.$Axios({ this.$Axios({
method: "get", method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes" url: this.code_base_url + "simple/cates/09BB973F92/codes"
// params:{
// wd:this.form.contract_unid
// }
}) })
.then(response => { .then(response => {
this.project_unid_selected_data = response.data.list_data; this.project_unid_selected_data = response.data.list_data;
...@@ -1124,9 +1113,6 @@ export default { ...@@ -1124,9 +1113,6 @@ export default {
this.$Axios({ this.$Axios({
method: "get", method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes" url: this.code_base_url + "simple/cates/09BB973F92/codes"
// params:{
// wd:this.form.contract_unid
// }
}) })
.then(response => { .then(response => {
this.customer_unid_selected_data = response.data.list_data; this.customer_unid_selected_data = response.data.list_data;
...@@ -1419,52 +1405,127 @@ export default { ...@@ -1419,52 +1405,127 @@ export default {
// !!!!!!~~~~~~~~~~~~~submit~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // !!!!!!~~~~~~~~~~~~~submit~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
form_submit(name) { form_submit(name) {
if (name == "form") { switch (name) {
if (this.operate_type[0] == 0) { case "form":
this.operate_type[0] = 1; var method;
this.form.start_guarantee_date = this.start_guarantee_date;
this.form.end_guarantee_date = this.end_guarantee_date;
if (this.operate_type[0] == 0) {
method = "post";
} else if (this.operate_type[0] == 1) {
method = "put";
}
this.$Axios({ this.$Axios({
method: "post", method: method,
url: this.contract_base_url, url: this.contract_base_url,
data: this.form data: this.form
}).then(response => { })
if (response.data.encode == 200) { .then(response => {
this.$alert("提交成功"); if (response.data.encode == 200) {
} this.$alert("提交成功");
}); this.operate_type[0] = 1;
} else if (this.operate_type[0] == 1) { }
// this.$alert("我提交 基本信息 修改的数据"); })
console.log(this.form.contract_unid); .catch(err => {
} console.log(err.message);
} else if (name == "payment") { });
if (this.operate_type[1] == 0) { break;
this.operate_type[1] = 1; case "payment":
this.$alert("我提交 付款约定 新的数据"); var method;
} else if (this.operate_type[1] == 1) { if (this.operate_type[1] == 0) {
this.$alert("我提交 付款约定 修改的数据"); method = "post";
} } else if (this.operate_type[1] == 1) {
} else if (name == "reback") { method = "put";
if (this.operate_type[2] == 0) { }
this.operate_type[2] = 1; this.$Axios({
this.$alert("我提交 回款信息 新的数据"); method: method,
} else if (this.operate_type[2] == 1) { url: "/api/v1/financial/contracts/contract/payments",
this.$alert("我提交 回款信息 修改的数据"); data: this.payments_data
} })
} else if (name == "receipt") { .then(response => {
if (this.operate_type[3] == 0) { if (response.data.encode == 200) {
this.operate_type[3] = 1; this.$alert("提交成功");
this.$alert("我提交 开票信息 新的数据"); this.operate_type[1] = 1;
} else if (this.operate_type[3] == 1) { }
this.$alert("我提交 开票信息 修改的数据"); })
} .catch(err => {
} else if (name == "deliver") { console.log(err.message);
if (this.operate_type[4] == 0) { });
this.operate_type[4] = 1;
this.$alert("我提交 发货信息 新的数据"); break;
} else if (this.operate_type[4] == 1) { case "reback":
this.$alert("我提交 发货信息 修改的数据"); var method;
} if (this.operate_type[2] == 0) {
} else if (name == "project") { method = "post";
if (this.operate_type[5] == 0) { } else if (this.operate_type[2] == 1) {
method = "put";
}
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/rebacks",
data: this.rebacks_data
})
.then(response => {
if (response.data.encode == 200) {
this.$alert("提交成功");
this.operate_type[2] = 1;
}
})
.catch(err => {
console.log(err.message);
});
break;
case "receipt":
var method;
if (this.operate_type[3] == 0) {
method = "post";
} else if (this.operate_type[3] == 1) {
method = "put";
}
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/receipts",
data: this.receipts_data
})
.then(response => {
if (response.data.encode == 200) {
this.$alert("提交成功");
this.operate_type[3] = 1;
}
})
.catch(err => {
console.log(err.message);
});
break;
case "deliver":
var method;
if (this.operate_type[4] == 0) {
method = "post";
} else if (this.operate_type[4] == 1) {
method = "put";
}
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/delivers",
data: this.delivers_data
})
.then(response => {
if (response.data.encode == 200) {
this.$alert("提交成功");
this.operate_type[4] = 1;
}
})
.catch(err => {
console.log(err.message);
});
break;
case "project":
var method;
if (this.operate_type[5] == 0) {
method = "post";
} else if (this.operate_type[5] == 1) {
method = "put";
}
var _this = this; var _this = this;
var p1 = new Promise(function(resolve, reject) { var p1 = new Promise(function(resolve, reject) {
_this.$refs.first_acceptances_form.validate(valid => { _this.$refs.first_acceptances_form.validate(valid => {
...@@ -1480,11 +1541,10 @@ export default { ...@@ -1480,11 +1541,10 @@ export default {
} }
}); });
}); });
Promise.all([p1, p2]).then(function() { Promise.all([p1, p2]).then(function() {
_this _this
.$Axios({ .$Axios({
method: "post", method: method,
url: "/api/v1/financial/contracts/contract/project/acceptancs", url: "/api/v1/financial/contracts/contract/project/acceptancs",
data: { data: {
list_data: [ list_data: [
...@@ -1500,22 +1560,59 @@ export default { ...@@ -1500,22 +1560,59 @@ export default {
} }
}); });
}); });
} else if (this.operate_type[5] == 1) { break;
this.$refs["first_acceptances_form"].validate(valid => { default:
if (valid) { break;
console.log("非初次提交");
}
});
}
} }
} }
}, },
created() { created() {
var loading;
this.$Axios.interceptors.request.use(
config => {
loading = this.$loading({
lock: true,
text: "加载中,请稍等",
background: "rgba(0, 0, 0, 0.7)"
});
return config;
},
error => {
return Promise.reject(error);
}
);
this.$Axios.interceptors.response.use(
response => {
loading.close();
return response;
},
error => {
return Promise.reject(error);
}
);
this.get_provinces(); this.get_provinces();
var id = this.$route.params.contract_unid; var id = this.$route.params.contract_unid;
if (id != "0") { if (id != "0") {
this.operate_type = [1, 1, 1, 1, 1, 1]; this.operate_type = [1, 1, 1, 1, 1, 1];
this.form.contract_unid = id; this.form.contract_unid = id;
this.$Axios({
method: "get",
url: this.contract_base_url + id
})
.then(response => {
this.form = response.data;
if (this.form.start_guarantee_date) {
this.$delete(this.form, "start_guarantee_date");
}
if (this.form.end_guarantee_date) {
this.$delete(this.form, "end_guarantee_date");
}
this.guarantee_date.push(response.data.start_guarantee_date);
this.guarantee_date.push(response.data.end_guarantee_date);
})
.catch(err => {
console.log(err.message);
});
} }
} }
}; };
...@@ -1529,19 +1626,6 @@ export default { ...@@ -1529,19 +1626,6 @@ export default {
.add_button:hover { .add_button:hover {
color: black; color: black;
} }
h1 {
text-align: left;
background-color: rgba(138, 200, 255, 0.5);
padding-top: 20px;
padding-bottom: 20px;
padding-left: 30px;
font-size: 26px;
margin-bottom: 0px;
}
h1.h-button:hover {
background-color: rgba(138, 200, 255, 0.8);
cursor: pointer;
}
#payments_dialog { #payments_dialog {
text-align: left; text-align: left;
...@@ -1549,15 +1633,8 @@ h1.h-button:hover { ...@@ -1549,15 +1633,8 @@ h1.h-button:hover {
.width-220 { .width-220 {
width: 300px; width: 300px;
} }
#form, span:hover {
#payments_data_table, cursor: pointer;
#rebacks_data_table, text-shadow: lightgray 0.1em 0.1em 0.2em;
#receipts_data_table,
#delivers_data_table,
#acceptance_form {
border-left: 5px solid rgba(138, 200, 255, 0.5);
border-bottom: 5px solid rgba(138, 200, 255, 0.5);
border-right: 5px solid rgba(138, 200, 255, 0.5);
padding-top: 20px;
} }
</style> </style>
<template> <template>
<div> <div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-size:24px;padding-left:72px">检索条件</span>
<el-button style="float: right; padding: 8px 0" type="text" @click="reset()">重置搜索条件</el-button>
</div>
<el-form id="form" :inline="true" :model="search_form" class="demo-form-inline" label-width="100px" ref="search_form">
<el-row>
<el-col :span="6">
<el-form-item label="销售员" prop="salesperson_unid">
<el-select v-model="search_form.salesperson_unid" filterable remote placeholder="销售人员" :remote-method="salespersonIdRemoteMethod">
<el-option v-for="(item,index) in salesperson_unid_selected_data" :key="index" :label="item.name" :value="item.code_unid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="项目名称" prop="project_unid">
<el-select v-model="search_form.project_unid" filterable remote placeholder="项目名称" :remote-method="projectIdRemoteMethod">
<el-option v-for="(item,index) in project_unid_selected_data" :key="index" :label="item.name" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称" prop="customer_unid">
<el-select v-model="search_form.customer_unid" filterable remote placeholder="客户名称" :remote-method="customerIdRemoteMethod">
<el-option v-for="(item,index) in customer_unid_selected_data" :key="index" :label="item.name" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="质保周期(月)" prop="guarantee_period">
<el-input-number v-model="search_form.guarantee_period" :step="6" :min="6" :max="60" size="medium"></el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="所属年份" prop="year">
<el-select v-model="search_form.year">
<el-option v-for="n in year_list" :key="n" :label="n" :value="n">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="所属月份" prop="month">
<el-select v-model="search_form.month">
<el-option v-for="n in 12" :key="n" :label="n" :value="n">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同状态" prop="contract_state">
<el-select v-model="search_form.contract_state">
<el-option v-for="(value,index) in contract_state_data" :key="index" :label="value" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同性质" prop="contract_type">
<el-select v-model="search_form.contract_type">
<el-option v-for="(value,index) in contract_type_data" :key="index" :label="value" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="产品线类型" prop="product_line_type">
<el-select v-model="search_form.product_line_type">
<el-option v-for="(value,index) in product_line_type_data" :key="index" :label="value" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否终验" prop="acceptance_type">
<el-select v-model="search_form.acceptance_type">
<el-option label="是" :value="1">
</el-option>
<el-option label="否" :value="0">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否归档" prop="is_archive">
<el-select v-model="search_form.is_archive">
<el-option label="是" value=true></el-option>
<el-option label="否" value=false></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="账款状态" prop="amount_state_unid">
<el-select v-model="search_form.amount_state_unid">
<el-option v-for="(value,index) in amount_state_unid_data" :key="index" :label="value" :value="index">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="确认收入金额" prop="confirm_income_amount">
<el-input v-model="search_form.confirm_income_amount"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-size:24px">检索结果</span>
</div>
<el-row>
<el-col :span="20">
<el-pagination style="float:left" background layout="prev, pager, next" :total="total_page" :page-size="10" prev-text="上一页" next-text="下一页" :current-page="current_page" @current-change="current_change">
</el-pagination>
</el-col>
<el-col :span="4">
<el-button-group style="float:right">
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" size="small">导入</el-button>
</el-button-group>
</el-col>
</el-row>
</el-card>
</div> </div>
</template> </template>
...@@ -7,14 +144,97 @@ ...@@ -7,14 +144,97 @@
export default { export default {
data() { data() {
return { return {
code_base_url: disparch_data.code_base_url,
contract_base_url: disparch_data.contract_base_url,
project_unid_selected_data: [], //项目名称数据数组
customer_unid_selected_data: [], //客户名称数据数组
salesperson_unid_selected_data: [],
contract_state_data: ["已完成", "代发货", "施工中", "项目暂停"],
contract_type_data: ["供货", "施工", "集成", "维保"],
product_line_type_data: ["安防", "交通", "客流", "维保"],
amount_state_unid_data: ["正常验收款", "正常维保"],
search_form: {
salesperson_unid: null,
project_unid: null,
customer_unid: null,
guarantee_period: 6,
year: null,
month: null,
contract_state: null,
contract_type: null,
product_line_type: null,
acceptance_type: null,
is_archive: null,
amount_state_unid: null,
confirm_income_amount: null
},
total_page: 20,
current_page: 1,
result_data: []
}; };
}, },
computed: {
year_list: function() {
var arr = [];
for (let i = 2000; i < 2041; i++) {
arr.push(i);
}
return arr;
}
},
methods: { methods: {
// remote---------------------------------------------------------------------------------
salespersonIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes"
})
.then(response => {
this.salesperson_unid_selected_data = response.data.list_data;
})
.catch(err => {
console.log(err.message);
});
},
projectIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes"
})
.then(response => {
this.project_unid_selected_data = response.data.list_data;
})
.catch(err => {
console.log(err.message);
});
},
customerIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes"
})
.then(response => {
this.customer_unid_selected_data = response.data.list_data;
})
.catch(err => {
console.log(err.message);
});
},
// remote---------------------------------------------------------------------------------
reset() {
this.$refs["search_form"].resetFields();
// Object.keys(this.search_form).forEach(key => {
// console.log(this.search_form[key]);
// })
},
current_change(val) {
this.current_page = val;
console.log(this.current_page);
} }
}
}; };
</script> </script>
<style scoped> <style scoped>
</style> </style>
const Mock = require('mockjs'); const Mock = require('mockjs');
Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'post', res => { Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'post', res => {
console.log("project add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'put', res => {
console.log("project modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'post', res => {
console.log("contract add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'put', res => {
console.log("contract modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/payments", 'post', res => {
console.log("payment add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/payments", 'put', res => {
console.log("payment modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/delivers", 'post', res => {
console.log("delivers add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/delivers", 'put', res => {
console.log("delivers modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/receipts", 'post', res => {
console.log("receipts add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/receipts", 'put', res => {
console.log("receipts modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'post', res => {
console.log("rebacks add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'put', res => {
console.log("rebacks modify successful");
console.log(res.body); console.log(res.body);
return { return {
encode: 200 encode: 200
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!