Commit 97aca691 by 潘建波

Merge branch 'develop' of http://192.168.9.26/platform/finance_serv into develop

# Conflicts:
#	code/finance_web/src/components/contract.vue
2 parents 9bd9dffe 35ee1332
......@@ -143,18 +143,18 @@ public class ContractServiceImpl implements ContractService {
private static Map<String,String> num_key = new HashMap<String,String>();
{
num_key.put("contract_amount","###############.00");
head_title_key.put("stop_amount","###############.00");
head_title_key.put("bad_amount","###############.00");
head_title_key.put("exemptions_amount","###############.00");
head_title_key.put("deduct_amount","###############.00");
head_title_key.put("total_reback_amount","###############.00");
head_title_key.put("contract_remain","###############.00");
head_title_key.put("total_receive_amount","###############.00");
head_title_key.put("total_amount_remain","###############.00");
head_title_key.put("advance_pay","###############.00");
head_title_key.put("arrive_pay","###############.00");
head_title_key.put("acceptanc_pay","###############.00");
head_title_key.put("mainten_pay","###############.00");
num_key.put("stop_amount","###############.00");
num_key.put("bad_amount","###############.00");
num_key.put("exemptions_amount","###############.00");
num_key.put("deduct_amount","###############.00");
num_key.put("total_reback_amount","###############.00");
num_key.put("contract_remain","###############.00");
num_key.put("total_receive_amount","###############.00");
num_key.put("total_amount_remain","###############.00");
num_key.put("advance_pay","###############.00");
num_key.put("arrive_pay","###############.00");
num_key.put("acceptanc_pay","###############.00");
num_key.put("mainten_pay","###############.00");
}
@Autowired
......
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
......
......@@ -18,7 +18,6 @@
<body style="height: 100%;margin: 0">
<div id="app"></div>
<audio src="./static/" autoplay="autoplay"></audio>
<!-- built files will be auto injected -->
</body>
......
......@@ -948,30 +948,44 @@
};
},
computed: {
// 账款状态
get_amount_state() {
var weibao_code = "";
this.contract_type_data.forEach(e => {
e.name == "维保" ? (weibao_code = e.code) : null;
});
var now_date =
new Date().getFullYear() +
"-" +
(new Date().getMonth() + 1) +
"-" +
new Date().getDate();
// 定义状态和权重 over 定义逾期,normal定义正常
var over = {
amount_state: null,
weight: -1
};
var normal = {
amount_state: null
amount_state: null,
weight: -1
};
var amount = 0;
var contract_amount = this.form.contract_amount;
var total_reback_amount = this.total_reback_amount;
/**
* 这里有个问题,就是必须得按照预付款、到货款、验收款、质保款的
* 顺序插入,不然计算会出问题。解决方案是先定义金额的对象循环一遍
* 把金额取出来,然后根据不同类型来加金额比如说预付款就只取预付款,
* 到货款就取到货款和预付款。
*/
this.payments_data.forEach(e => {
var _this = this;
amount += e.payment_propority * parseFloat(contract_amount);
switch (e.payment_type) {
//预付款和维保款的判断
case "100001":
if (_this.form.sign_date) {
amount += e.payment_propority * parseFloat(contract_amount);
//小于说明逾期了,然后再判断钱
if (
_this.date_diff(
......@@ -981,13 +995,14 @@
amount > total_reback_amount
) {
over.weight = 8;
if (_this.form.contract_type != "40003") {
if (_this.form.contract_type != weibao_code) {
over.amount_state = "50006"; //逾期预付款
} else {
over.amount_state = "50012"; //逾期维保款
}
} else {
if (_this.form.contract_type != "40003") {
} else if (normal.weight < 1) {
normal.weight = 1;
if (_this.form.contract_type != weibao_code) {
normal.amount_state = "50003"; //正常预付款
} else {
normal.amount_state = "50002"; //正常维保款
......@@ -1002,7 +1017,6 @@
_this.delivers_data[0] &&
_this.delivers_data[0].goods_acceptanc_date
) {
amount += e.payment_propority * parseFloat(contract_amount);
if (
_this.date_diff(
now_date,
......@@ -1022,9 +1036,11 @@
over.amount_state = "50009"; //逾期质保款
}
} else {
if (e.payment_type == "100002") {
if (e.payment_type == "100002" && normal.weight < 2) {
normal.weight = 2;
normal.amount_state = "50004"; //正常到货款
} else {
normal.weight = 4;
normal.amount_state = "50005"; //正常质保款
}
}
......@@ -1033,7 +1049,6 @@
case "100003":
case "100005":
if (_this.final_acceptancs_form.acceptanc_date) {
amount += e.payment_propority * parseFloat(contract_amount);
if (
_this.date_diff(
now_date,
......@@ -1052,9 +1067,11 @@
over.amount_state = "50009"; //逾期质保款
}
} else {
if (e.payment_type == "100003") {
if (e.payment_type == "100003" && normal.weight < 3) {
normal.weight = 3;
normal.amount_state = "50001"; //正常验收款
} else {
normal.weight = 4;
normal.amount_state = "50005"; //正常质保款
}
}
......@@ -1070,6 +1087,10 @@
return normal.amount_state;
}
},
/**
* 省、市的格式为‘unid#name’,所以要分割后取出
*/
get_province_unid() {
if (this.form.province_value) {
return this.form.province_value.split("#")[0];
......@@ -1121,17 +1142,13 @@
// 合同余额
contract_remaining: function() {
var a =
this.form.contract_amount -
this.form.deduct_amount -
this.total_reback_amount -
this.form.stop_amount -
this.form.exemptions_amount -
this.form.bad_amount;
if (isNaN(a)) {
return null;
} else {
return a.toFixed(2);
}
(this.form.contract_amount ? this.form.contract_amount : 0) -
(this.form.deduct_amount ? this.form.deduct_amount : 0) -
(this.total_reback_amount ? this.total_reback_amount : 0) -
(this.form.stop_amount ? this.form.stop_amount : 0) -
(this.form.exemptions_amount ? this.form.exemptions_amount : 0) -
(this.form.bad_amount ? this.form.bad_amount : 0);
return a.toFixed(2);
},
// 累计回款额
total_reback_amount: function() {
......@@ -1161,17 +1178,17 @@
// 应收账款余额
total_leave_amount: function() {
var a =
this.total_receive_amount -
this.total_reback_amount -
this.form.deduct_amount -
this.form.stop_amount -
this.form.exemptions_amount -
this.form.bad_amount;
if (isNaN(a)) {
return null;
} else {
return a.toFixed(2);
}
(this.total_receive_amount ? this.total_receive_amount : 0) -
(this.total_reback_amount ? this.total_reback_amount : 0) -
(this.form.deduct_amount ? this.form.deduct_amount : 0) -
(this.form.stop_amount ? this.form.stop_amount : 0) -
(this.form.exemptions_amount ? this.form.exemptions_amount : 0) -
(this.form.bad_amount ? this.form.bad_amount : 0);
// if (isNaN(a)) {
// return null;
// } else {
return a.toFixed(2);
// }
},
// 逾期天数
over_days_unid: function() {
......@@ -1194,6 +1211,10 @@
return days;
},
// 维保服务期开始时间
/**
* 因为维保服务期用了选时间段的控件,需要绑定一个数组,所以在这里
* 拆分,或者可以定义这两个时间点,拼成一个数组交给控件。
*/
start_guarantee_date: function() {
if (this.guarantee_date && this.guarantee_date[0]) {
return this.guarantee_date[0];
......@@ -1205,6 +1226,9 @@
return this.guarantee_date[1];
}
},
/**
* 同一默认为一个时间点所以注释掉其他的
*/
mainten_start_date: function() {
// if (
// this.form.mainten_start_point == "60001" &&
......@@ -1227,6 +1251,9 @@
return this.final_acceptancs_form.acceptanc_date;
}
},
/**
* 同一默认为一个时间点所以注释掉其他的
*/
mainten_end_date: function() {
// if (
// this.form.mainten_start_point == "60001" &&
......@@ -1261,13 +1288,10 @@
}
},
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
methods: {
/**
* 合同信息中显示显示更多按钮的点击
*/
show_more() {
this.hide_contract_info = !this.hide_contract_info;
this.hide_contract_info == true
......@@ -1277,10 +1301,16 @@
? (this.hide_icon = "icon i-arrowdown-copy")
: (this.hide_icon = "icon i-arrowup");
},
/**
*下载附件
*/
download_file(f) {
window.open(f.url);
},
// upload+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/**
* 上传附件
*/
contract_upload(f) {
let param = new FormData(); //创建form对象
param.append("appendix_files", f.file); //通过append向form对象添加数据
......@@ -1313,6 +1343,9 @@
};
xhr.send(param);
},
/**
* 上传附件
*/
delivers_upload(f) {
let param = new FormData(); //创建form对象
param.append("appendix_files", f.file); //通过append向form对象添加数据
......@@ -1345,6 +1378,9 @@
};
xhr.send(param);
},
/**
* 上传附件
*/
acceptances_upload(f) {
let param = new FormData(); //创建form对象
param.append("appendix_files", f.file); //通过append向form对象添加数据
......@@ -1409,10 +1445,16 @@
};
xhr.send(param);
},
/**
* 没做删除功能
*/
on_remove(file, fileList) {
this.$alert("暂时不能删除");
},
// upload+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/**
* 累计开票金额需要从第一条加到最后一条
*/
total_receipt_amount_cal(index) {
var total_receipt_amount = 0;
for (let i = index; i >= 0; i--) {
......@@ -1422,6 +1464,9 @@
}
return parseFloat(total_receipt_amount).toFixed(2);
},
/**
* 判断是否回款
*/
is_reback_cal(index) {
var total_receipt_amount = 0;
for (let i = index; i >= 0; i--) {
......@@ -1482,6 +1527,9 @@
// dialog_cancel~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// date_methods~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* date1 - date2 所得天数
*/
date_diff(date1, date2) {
if (date1 && date2) {
var date1s = date1.split("-");
......@@ -1497,6 +1545,9 @@
return days;
}
},
/**
* 一个日期加上天数
*/
date_add_days(datestr, daynum) {
if (datestr && daynum != null) {
var date_str = datestr;
......@@ -1511,6 +1562,9 @@
return result_date;
}
},
/**
* 日期加月数
*/
date_add_month(datestr, month) {
if (datestr && month) {
var dates = datestr.split("-");
......@@ -1522,8 +1576,9 @@
}
},
// date_methods~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// remoteMethod~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 获得所有的合同编号
*/
get_contract_unid() {
this.$Axios({
method: "get",
......@@ -1536,6 +1591,9 @@
console.log(err.message);
});
},
/**
* 得到销售人员列表
*/
get_salesperson() {
this.$Axios({
method: "get",
......@@ -1551,8 +1609,6 @@
console.log(err.message);
});
},
// remoteMethod~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// dialog_confirm_start~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
payments_dialog_confirm() {
this.$refs["payments_form"].validate(valid => {
......@@ -1566,14 +1622,16 @@
var type_value = this.payments_form.payment_type;
// 总比例为1,用1减去每个已存的比例,剩下的如果小于本次比例,那么添加不成功
var total_propority = 1;
debugger;
var total_propority = 100;
for (let i = 0; i < this.payments_data.length; i++) {
const e = this.payments_data[i];
if (! this.modify_data) {
total_propority -= e.payment_propority;
}else if (i != this.modify_index) {
total_propority -= e.payment_propority;
}{
if (!this.modify_data) {
total_propority -= e.payment_propority * 100;
} else if (i != this.modify_index) {
total_propority -= e.payment_propority * 100;
}
{
}
if (
((type_value == "100004" || type_value == "100005") &&
......@@ -1589,11 +1647,10 @@
}
}
}
if (total_propority < propority) {
if (total_propority < propority * 100) {
this.$message.error("请检查付款比例是否正确");
return;
}
var a = {
payment_unid: payment_unid,
payment_type: type_value,
......@@ -1722,7 +1779,9 @@
});
},
// dialog_confirm_end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 删除某条数据,可以换成switch
*/
data_delete(index, data, appendUrl) {
var a;
var id;
......@@ -1797,7 +1856,7 @@
});
},
// modif ystart~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// modify start~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
payment_data_modify(index, data) {
this.$set(this.payments_form, "payment_unid", data[index].payment_unid);
this.$set(this.payments_form, "payment_type", data[index].payment_type);
......@@ -1872,7 +1931,9 @@
// modifyend~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// getlocation start~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 根据code匹配付款类型的名字
*/
get_payment_type(index) {
for (let i = 0; i < this.payment_type_data.length; i++) {
const e = this.payment_type_data[i];
......@@ -1882,6 +1943,9 @@
}
return "无";
},
/**
* 获取付款类型列表
*/
get_payment_type_data() {
this.$Axios({
method: "get",
......@@ -1892,6 +1956,9 @@
})
.catch(err => {});
},
/**
* 获取产品线类型列表
*/
get_product_line_type_data() {
this.$Axios({
method: "get",
......@@ -1902,6 +1969,9 @@
})
.catch(err => {});
},
/**
* 获取合同状态列表
*/
get_contract_state_data() {
this.$Axios({
method: "get",
......@@ -1912,6 +1982,9 @@
})
.catch(err => {});
},
/**
* 获取合同性质列表
*/
get_contract_type_data() {
this.$Axios({
method: "get",
......@@ -1944,6 +2017,9 @@
console.log(err.message);
});
},
/**
* 根据省来获取市的列表
*/
get_cities() {
this.form.city_value = "";
// this.form.county_value = "";
......@@ -1985,6 +2061,9 @@
// });
// }
// },
/**
* 根据不同的付款类型计算他们的付款日期
*/
get_pay_date(index) {
var date = "";
var type = this.payments_data[index].payment_type;
......@@ -2011,6 +2090,9 @@
}
return date;
},
/**
* 根据付款比例计算应付金额
*/
get_pay_amount(index) {
var amount = 0;
if (this.form.contract_amount > 0) {
......@@ -2020,6 +2102,9 @@
}
return amount;
},
/**
* 获取客户名称列表
*/
get_customers() {
this.$Axios({
method: "get",
......@@ -2033,6 +2118,9 @@
console.log(err.message);
});
},
/**
* 获取项目名称列表
*/
get_projects() {
this.$Axios({
method: "get",
......@@ -2046,6 +2134,10 @@
console.log(err.message);
});
},
/**
* 下面几个方法用于得到各自部分信息
* 在初始化和提交操作后进行调用
*/
get_project_info(id) {
if (id != "0") {
this.$Axios({
......@@ -2478,16 +2570,12 @@
if (this.form.end_guarantee_date) {
this.$delete(this.form, "end_guarantee_date");
}
this.guarantee_date = [];
this.guarantee_date = [,];
if (response.data.start_guarantee_date) {
this.guarantee_date.push(response.data.start_guarantee_date);
} else {
this.guarantee_date.push("");
this.guarantee_date[0] = response.data.start_guarantee_date;
}
if (response.data.end_guarantee_date) {
this.guarantee_date.push(response.data.end_guarantee_date);
} else {
this.guarantee_date.push("");
this.guarantee_date[1] = response.data.end_guarantee_date;
}
}
})
......@@ -2496,6 +2584,9 @@
});
// }
},
/**
* 调用以上所有方法
*/
get_all(id) {
this.get_contract_info(id);
this.get_deliver_info(id);
......@@ -2507,6 +2598,9 @@
// getlocation end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// !!!!!!~~~~~~~~~~~~~submittttttt~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 提交表单,根据表名提交
*/
form_submit(name) {
var a = this.form;
Object.keys(a).forEach(key => {
......@@ -2935,9 +3029,16 @@
break;
}
},
/**
* 改变合同编号时要刷新数据
* 刷新数据是在watch中监视路由的变化进行的
*/
change_unid(id) {
this.$router.push("" + id);
},
/**
* 用来改变dialog的背景颜色,mounted时进行调用
*/
change_dialog() {
if (localStorage.getItem("style")) {
var style = JSON.parse(localStorage.getItem("style"));
......@@ -2951,6 +3052,9 @@
}
},
created() {
/**
* 获取用户权限
*/
if (
sessionStorage.getItem("user_roles") != "null" &&
sessionStorage.getItem("user_roles")
......@@ -2973,6 +3077,9 @@
if (sessionStorage.getItem("manager")) {
this.disabled_list = [0, 0, 0, 0];
}
/**
* 数据初始化
*/
if (sessionStorage.getItem("provinces")) {
this.provinces = JSON.parse(sessionStorage.getItem("provinces"));
} else {
......@@ -3046,6 +3153,10 @@
if (id != 0) {
this.get_all(id);
}
/**
* 如果是修改状态,则不能改变合同编号
* 将合同编号栏设为disabled
*/
if (sessionStorage.getItem("modify")) {
this.contract_unid_disabled = true;
} else {
......@@ -3067,6 +3178,7 @@
this.rebacks_data = [];
this.receipts_data = [];
this.delivers_data = [];
this.guarantee_date = [,];
this.$refs["first_acceptancs_form"].resetFields();
this.$refs["final_acceptancs_form"].resetFields();
this.$refs["contract_form"].resetFields();
......
......@@ -94,6 +94,9 @@
JSON.stringify(res.data.roles)
);
sessionStorage.setItem("user_name", res.data.user_name);
/**
* 这里应该用axios.all()
*/
this.get_provinces();
this.get_contract_state_data();
this.get_contract_type_data();
......
......@@ -196,6 +196,11 @@
},
methods: {
//search
/**
* 可以在新增前四个选项是弹出提示框,
* 列出已存在的,当键入已存在合同就会出现。
* 没什么用处啊。。。
*/
search_contract_unid(queryString, cb) {
var contract_unid_data = this.contract_unid_data;
var results = queryString
......@@ -342,6 +347,9 @@
})
.catch(() => {});
},
/**
* 更新数据统一调用的方法,add_data是自定义的对象
*/
get_data(url) {
this.$Axios.get(url).then(res => {
if (res.data.list_data) {
......
......@@ -31,15 +31,23 @@
</el-col>
</el-row>
<el-row style="text-align:left">
<el-col :span="12">
<el-form-item label="应收账款余额" prop="leave_amount_start_point">
<el-input v-model="search_form.leave_amount_start_point" placeholder="不填默认为0"></el-input>
<el-col :span="6">
<el-form-item label="所属年份" prop="year">
<el-select v-model="search_form.year" clearable>
<el-option v-for="n in year_list" :key="n" :label="n" :value="n">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="leave_amount_end_point">
<el-input v-model="search_form.leave_amount_end_point" placeholder="不填则无上限"></el-input>
</el-col>
<el-col :span="6">
<el-form-item label="所属月份" prop="month">
<el-select v-model="search_form.month" clearable>
<el-option v-for="n in month_list" :key="n" :label="n" :value="n">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="6">
<el-form-item label="销售员" v-if="sales">
<el-input style="width:217px" :readonly="true" v-model="salesperson_name"></el-input>
</el-form-item>
......@@ -47,6 +55,24 @@
<el-input style="width:217px" v-model="search_form.salesperson_name__like"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同状态" prop="contract_state_list">
<el-select v-model="search_form.contract_state_list" multiple>
<el-option v-for="item in contract_state_data" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row style="text-align:left">
<el-col :span="12">
<el-form-item label="应收账款余额" prop="leave_amount_start_point">
<el-input v-model="search_form.leave_amount_start_point" placeholder="不填默认为0"></el-input>
</el-form-item>
<el-form-item prop="leave_amount_end_point">
<el-input v-model="search_form.leave_amount_end_point" placeholder="不填则无上限"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- hide -->
<el-row style="margin-bottom:10px">
......@@ -57,36 +83,35 @@
<el-collapse-transition>
<div id="hide" v-show="!hide_search_item">
<el-row style="text-align:left">
<el-col :span="6">
<el-form-item label="合同状态" prop="contract_state_list">
<el-select v-model="search_form.contract_state_list" multiple>
<el-option v-for="item in contract_state_data" :key="item.code" :label="item.name" :value="item.code">
<el-form-item label="合同性质" prop="contract_type">
<el-select v-model="search_form.contract_type" clearable>
<el-option v-for="item in contract_type_data" :key="item.code" :label="item.name" :value="item.code">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="所属年份" prop="year">
<el-select v-model="search_form.year" clearable>
<el-option v-for="n in year_list" :key="n" :label="n" :value="n">
<el-col :span="6" style="text-align:left">
<el-form-item label="省" prop="province">
<el-select style="width:217px" v-model="search_form.province" filterable clearable placeholder="省" @change="get_cities()">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.name" :value="item.province_unid">
</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" clearable>
<el-option v-for="n in month_list" :key="n" :label="n" :value="n">
<el-col :span="6" style="text-align:left">
<el-form-item label="市" prop="city">
<el-select style="width:217px" v-model="search_form.city" filterable clearable placeholder="市">
<el-option v-for="(item,index) in cities" :key="index" :label="item.name" :value="item.city_unid">
</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" clearable>
<el-option v-for="item in contract_type_data" :key="item.code" :label="item.name" :value="item.code">
</el-option>
<el-form-item label="质保周期(月)" prop="guarantee_period">
<el-select v-model="search_form.guarantee_period" clearable>
<el-option v-for="n in guarantee_period_list" :key="n" :label="n" :value="n"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -124,31 +149,8 @@
</el-form-item>
</el-col>
</el-row>
<el-row style="text-align:left">
<el-col :span="6">
<el-form-item label="质保周期(月)" prop="guarantee_period">
<el-select v-model="search_form.guarantee_period" clearable>
<el-option v-for="n in guarantee_period_list" :key="n" :label="n" :value="n"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align:left">
<el-form-item label="省" prop="province">
<el-select style="width:217px" v-model="search_form.province" filterable clearable placeholder="省" @change="get_cities()">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.name" :value="item.province_unid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align:left">
<el-form-item label="市" prop="city">
<el-select style="width:217px" v-model="search_form.city" filterable clearable placeholder="市">
<el-option v-for="(item,index) in cities" :key="index" :label="item.name" :value="item.city_unid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row style="text-align:left">
</el-row> -->
<el-row style="text-align:left">
<el-col :span="12">
<el-form-item label="签订日期" prop="start_date">
......@@ -556,6 +558,9 @@
};
},
computed: {
/**
* 年份选择列表
*/
year_list: function() {
var a = new Date().getFullYear();
var arr = [];
......@@ -564,6 +569,9 @@
}
return arr;
},
/**
* 字面意思
*/
offset() {
return (this.current_page - 1) * this.limit;
},
......@@ -628,6 +636,9 @@
});
});
},
/**
* 全选
*/
check_all_item(val) {
if (val) {
this.display_item_list.forEach(e => {
......@@ -644,6 +655,9 @@
this.is_indeterminate =
checkedCount > 0 && checkedCount < this.display_item_list.length;
},
/**
* 自定义排序规则
*/
project_name_sort(a, b) {
if (a.project_name && b.project_name) {
return a.project_name.trim().localeCompare(b.project_name.trim());
......@@ -712,7 +726,11 @@
? (this.hide_icon = "icon i-arrowdown-copy")
: (this.hide_icon = "icon i-arrowup");
},
/**
* 点击导入按钮,弹出文件选择栏,当选择文件后
* type为file的input的文件列表会改变
* 检测到这种改变后,调用import_contract方法
*/
import_click() {
document.getElementById("import_unview").click();
},
......@@ -852,10 +870,15 @@
});
}
},
/**
* 获取检索结果
*/
get_list_data() {
var a = this.search_form;
if (a.contract_state_list.length > 0) {
a.contract_states = a.contract_state_list.join(",");
} else {
a.contract_states = "";
}
Object.keys(a).forEach(key => {
if (a[key] && typeof a[key] == "string") {
......@@ -934,6 +957,9 @@
}
});
},
/**
* page控件的一些操作
*/
handle_size_change(val) {
this.limit = val;
if (this.list_data.length != 0) {
......@@ -946,6 +972,9 @@
console.log(this.current_page);
this.get_list_data();
},
/**
* 导出合同的excel表格
*/
export_contract() {
if (this.checked_item_list.length > 0) {
this.search_form.columns = this.checked_item_list.join(",");
......@@ -983,10 +1012,16 @@
console.log(err.message);
});
},
/**
* 点击详情后进度contract页面
*/
go_to(id) {
sessionStorage.setItem("modify", "1");
this.$router.push("/nav/contract/" + id);
},
/**
* 改变dialog背景颜色
*/
change_dialog() {
if (localStorage.getItem("style")) {
var style = JSON.parse(localStorage.getItem("style"));
......@@ -1038,7 +1073,9 @@
} else {
this.get_product_line_type_data();
}
/**
*Admin具有删除合同的权限
*/
if (sessionStorage.getItem("user_name") === "Admin") {
this.management = true;
}
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta http-equiv=X-UA-Compatible content="IE=edge"><link rel="shortcut icon" type=image/x-icon href=static/favicon.ico><title>合同管理系统</title><style>input:focus,
textarea:focus {
background-color: papayawhip;
}</style><link href=./static/css/app.fd7e325da06916a0ad31eb20843fcee3.css rel=stylesheet></head><body style="height: 100%;margin: 0"><div id=app></div><audio src=./static/ autoplay=autoplay></audio><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.66dfa4658a4c4bdd4d38.js></script><script type=text/javascript src=./static/js/app.9a19c73344049646ad4b.js></script></body></html>
\ No newline at end of file
}</style><link href=./static/css/app.420e499a42ee3f5487771b3dbdd4a04c.css rel=stylesheet></head><body style="height: 100%;margin: 0"><div id=app></div><audio src=./static/ autoplay=autoplay></audio><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.66dfa4658a4c4bdd4d38.js></script><script type=text/javascript src=./static/js/app.e0a8e9506296b6380801.js></script></body></html>
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
{"version":3,"sources":["webpack:///webpack/bootstrap 3d4d2a0ff3d56c717555"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3d4d2a0ff3d56c717555"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap fdc718076cd2c0bd5dd6"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap fdc718076cd2c0bd5dd6"],"sourceRoot":""}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!