Commit 9413c051 by 谢明辉

aaa

1 parent b06b5534
......@@ -47,7 +47,8 @@ exports.cssLoaders = function (options) {
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
fallback: 'vue-style-loader',
publicPath:'../../'
})
} else {
return ['vue-style-loader'].concat(loaders)
......
......@@ -43,7 +43,7 @@ module.exports = {
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
assetsPublicPath: './',
/**
* Source Maps
......
......@@ -21,6 +21,6 @@ export default {
}
<style>
html,body,#app{
height:95%
height:98%
}
</style>
......@@ -4,7 +4,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="font-size:24px" @click="contract_show =!contract_show">检索结果</span>
<span style="font-size:24px" @click="contract_show =!contract_show">合同基本信息</span>
<el-button style="float: right; padding: 8px 0" type="text" @click="form_submit('form')">提交</el-button>
</div>
......@@ -14,7 +14,7 @@
<el-col :span="8">
<el-form-item label="合同编号">
<el-select class="width-220" v-model="form.contract_unid" filterable remote reserve-keyword placeholder="合同编号" :remote-method="contractIdRemoteMethod">
<el-option v-for="(item,index) in contract_unid_selected_data" :key="index" :label="item.name" :value="item.country_unid">
<el-option v-for="(item,index) in contract_unid_selected_data" :key="index" :label="item" :value="item">
</el-option>
</el-select>
</el-form-item>
......@@ -30,7 +30,7 @@
<el-col :span="8">
<el-form-item label="项目名称">
<el-select class="width-220" v-model="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 v-for="(item,index) in project_unid_selected_data" :key="index" :label="item.project_name" :value="item.project_unid">
</el-option>
</el-select>
</el-form-item>
......@@ -70,7 +70,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="签订日期">
<el-date-picker class="width-220" v-model="form.sign_date" type="date" placeholder="日期" value-format="yyyy-MM-dd" @change="signDataChanged">
<el-date-picker style="width:300px" v-model="form.sign_date" type="date" placeholder="日期" value-format="yyyy-MM-dd" @change="signDataChanged">
</el-date-picker>
</el-form-item>
</el-col>
......@@ -166,8 +166,8 @@
<el-col :span="8">
<el-form-item label="合同是否归档">
<el-select class="width-220" v-model="form.is_archive" placeholder="请选择">
<el-option label="是" value=true></el-option>
<el-option label="否" value=false></el-option>
<el-option label="是" :value="true"></el-option>
<el-option label="否" :value="false"></el-option>
</el-select>
</el-form-item>
</el-col>
......@@ -241,7 +241,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-upload class="upload-demo" drag :action="upload_url" multiple :file-list="contract_appendix_list" :before-upload="test">
<el-upload class="upload-demo" action="" drag multiple :file-list="contract_appendix_list" :http-request="test">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或点击上传</div>
</el-upload>
......@@ -263,17 +263,29 @@
<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 label="付款进度" min-width="100" align="center">
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column prop="payment_type" label="付款类型" min-width="100" align="center">
<el-table-column label="付款类型" min-width="100" align="center">
<template slot-scope="scope">
{{payment_type_data[payments_data[scope.$index].payment_type]}}
</template>
</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 label="本期应付款日期" min-width="200" align="center">
<template slot-scope="scope">
{{get_pay_date(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="amount" label="本期应付款金额" min-width="200" align="center">
<template slot-scope="scope">
{{get_pay_amount(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="payment_requirement" label="本期付款条件" min-width="300" align="center">
</el-table-column>
......@@ -301,16 +313,7 @@
<el-form :model="payments_form" label-width="150px" label-position="left" :rules="add_rules" ref="payments_form">
<el-form-item label="付款类型" prop="payment_type">
<el-select v-model="payments_form.payment_type" placeholder="付款类型" style="width:100%">
<el-option label="预付款" value="1">
</el-option>
<el-option label="到货款" value="2">
</el-option>
<el-option label="系统验收款" value="3">
</el-option>
<el-option label="质保款(发货节点计算)" value="4">
</el-option>
</el-option>
<el-option label="质保款(验收节点计算)" value="5">
<el-option v-for="(value,index) in payment_type_data" :key="index" :label="value" :value="index">
</el-option>
</el-select>
</el-col>
......@@ -343,11 +346,17 @@
<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 label="回款进度" min-width="100" align="center">
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</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 label="回款比例(%)" min-width="100" align="center">
<template slot-scope="scope">
{{reback_propority_cal(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="reback_date" label="回款日期" min-width="200" align="center">
</el-table-column>
......@@ -409,11 +418,20 @@
</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 label="开票比例(%)" min-width="100" align="center">
<template slot-scope="scope">
{{receipt_propority_cal(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="total_receipt_amount" label="累计开票金额" min-width="200" align="center">
<el-table-column label="累计开票金额" min-width="200" align="center">
<template slot-scope="scope">
{{total_receipt_amount_cal(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="is_reback" label="是否回款" min-width="100" align="center">
<el-table-column label="是否回款" min-width="100" align="center">
<template slot-scope="scope">
{{is_reback_cal(scope.$index)}}
</template>
</el-table-column>
<el-table-column prop="receipt_note" label="备注" min-width="300" align="center">
</el-table-column>
......@@ -587,6 +605,7 @@
</div>
</template>
<script>
import "../function.js";
const twodecimalrule = {
pattern: /((^[1-9]\d*)|^0)(\.\d{2})$/,
message: "请输入数字并保留两位小数",
......@@ -609,6 +628,13 @@ export default {
counties: [],
modify_data: false, //用来标志dialog用来修改数据
modify_index: -1, //用来标志修改数据的索引
payment_type_data: [
"预付款",
"到货款",
"系统验收款",
"质保款(发货节点)",
"质保款(验收节点)"
],
product_line_type_data: ["安防", "交通", "客流", "维保"],
contract_state_data: ["已完成", "代发货", "施工中", "项目暂停"],
contract_type_data: ["供货", "施工", "集成", "维保"],
......@@ -685,26 +711,12 @@ export default {
// 合同备注
contract_note: "",
// 合同附件
contract_appendix: {},
appendix_unids: {},
start_guarantee_date: "",
end_guarantee_date: ""
},
// 工程验收表单
// acceptances_form: [
// {
// acceptance_type: "",
// acceptance_date: null,
// acceptance_note: null,
// appendix_unids: []
// },
// {
// acceptance_type: "",
// acceptance_date: null,
// acceptance_note: null,
// appendix_unids: []
// }
// ],
first_acceptances_form: {
acceptance_type: null,
acceptance_date: null,
......@@ -792,8 +804,13 @@ export default {
rebacks_form_rules: {
actual_reback_amount: {
required: true,
pattern: /(^[1-9](\d*)$)|(^0$)/,
message: "请输入正确金额",
validator: (rule, value, callback) => {
if (this.form.contract_amount < value) {
callback(new Error("实际回款金额不能大于合同金额"));
} else if (!/((^[1-9]\d*)|^0)(\.\d{2})$/.test(value)) {
callback(new Error("请填写正确数字并保留两位小数"));
} else callback();
},
trigger: "blur"
},
reback_date: {
......@@ -805,8 +822,13 @@ export default {
receipts_form_rules: {
receipt_amount: {
required: true,
pattern: /(^[1-9](\d*)$)|(^0$)/,
message: "请输入正确金额",
validator: (rule, value, callback) => {
if (this.form.contract_amount < value) {
callback(new Error("开票金额不能大于合同金额"));
} else if (!/((^[1-9]\d*)|^0)(\.\d{2})$/.test(value)) {
callback(new Error("请填写正确数字并保留两位小数"));
} else callback();
},
trigger: "blur"
},
oa_flow_id: {
......@@ -892,8 +914,8 @@ export default {
now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate();
for (let i = 0; i < this.payments_data.length; i++) {
const e = this.payments_data[i];
if (e.pay_date < now_date) {
total += parseFloat(e.amount);
if (this.date_diff(this.get_pay_date(i), now_date) <= 0) {
total += parseFloat(this.get_pay_amount(i));
}
}
return total.toFixed(2);
......@@ -918,11 +940,12 @@ export default {
var amount = 0;
for (let i = 0; i < this.payments_data.length; i++) {
const element = this.payments_data[i];
pay_date = element.pay_date;
amount += element.amount;
pay_date = this.get_pay_date(i);
amount += this.get_pay_amount(i);
}
if (now_date > pay_date && amount > this.total_reback_amount) {
return this.date_diff(now_date, pay_date);
var a = this.date_diff(now_date, pay_date);
return a > 0 ? a : 0;
} else {
return 0;
}
......@@ -992,13 +1015,58 @@ export default {
url: this.upload_url,
data: {
business_table: "contracts",
appendix_files: file
appendix_files: [file.file],
headers: { "Content-Type": "multipart/form-data" }
}
}).then(res => {
console.log(res.data.appendix_unid);
this.form.appendix_unids.push(res.data.appendix_unid);
});
return false;
},
total_receipt_amount_cal(index) {
var total_receipt_amount = 0;
for (let i = index; i >= 0; i--) {
total_receipt_amount += parseFloat(
this.receipts_data[i].receipt_amount
);
}
return parseFloat(total_receipt_amount).toFixed(2);
},
is_reback_cal(index) {
var total_receipt_amount = 0;
for (let i = index; i >= 0; i--) {
total_receipt_amount += parseFloat(
this.receipts_data[i].receipt_amount
);
}
if (this.total_reback_amount >= total_receipt_amount) {
return "是";
} else {
return "否";
}
},
receipt_propority_cal(index) {
var receipt_propority = 0;
if (this.form.contract_amount) {
receipt_propority = (
this.receipts_data[index].receipt_amount *
100 /
this.form.contract_amount
).toFixed(2);
}
return receipt_propority + "%";
},
reback_propority_cal(index) {
var reback_propority = 0;
if (this.form.contract_amount) {
reback_propority =
this.rebacks_data[index].actual_reback_amount /
this.form.contract_amount *
100;
}
return parseFloat(reback_propority).toFixed(2) + "%";
},
// dialog_cancel~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
payments_dialog_cancel() {
......@@ -1059,7 +1127,8 @@ export default {
add_axios(m, u, arr) {
this.$Axios({
method: m,
url: u
url: u,
headers: { "Content-Type": "application/json" }
}).then(response => {
arr = response.data.list_data;
});
......@@ -1068,13 +1137,13 @@ export default {
contractIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.code_base_url + "countries"
url: this.contract_base_url + "codes"
// params:{
// wd:this.form.contract_unid
// }
})
.then(response => {
this.contract_unid_selected_data = response.data.list_data;
this.contract_unid_selected_data = response.data;
})
.catch(err => {
console.log(err.message);
......@@ -1110,10 +1179,11 @@ export default {
customerIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.code_base_url + "simple/cates/09BB973F92/codes"
url: this.contract_base_url + "customers",
headers: { "Content-Type": "application/json" }
})
.then(response => {
this.customer_unid_selected_data = response.data.list_data;
this.customer_unid_selected_data = response.data.customer_list;
})
.catch(err => {
console.log(err.message);
......@@ -1132,44 +1202,16 @@ export default {
payments_dialog_confirm() {
this.$refs["payments_form"].validate(valid => {
if (valid) {
var progress = this.payments_data.length + 1;
var type_value = this.payments_form.payment_type;
var days = this.payments_form.days;
var propority = this.payments_form.payment_propority;
var requirement = this.payments_form.payment_requirement;
var amount = 0;
var date = "";
if (this.form.contract_amount > 0) {
amount = this.form.contract_amount * propority / 100;
}
if (type_value == "1" && this.form.sign_date) {
date = this.date_add_days(this.form.sign_date, days);
} else if (
(type_value == "2" || type_value == "4") &&
this.delivers_data[0]
) {
var i = this.delivers_data.length - 1;
date = this.date_add_days(
this.delivers_data[i].goods_acceptanc_date,
days
);
} else if (
(type_value == "3" || type_value == "5") &&
this.final_acceptances_form.acceptance_date != null
) {
date = this.date_add_days(
this.final_acceptances_form.acceptance_date,
days
);
}
var a = {
payment_progress: progress,
payment_type: type_value,
days: days,
payment_propority: propority,
payment_requirement: requirement,
amount: amount,
pay_date: date
payment_requirement: requirement
};
if (!this.modify_data) {
this.payments_data.push(a);
......@@ -1189,33 +1231,12 @@ export default {
var receipt_progress = this.receipts_data.length + 1;
var receipt_amount = parseFloat(this.receipts_form.receipt_amount);
var oa_flow_id = this.receipts_form.oa_flow_id;
var receipt_propority = 0;
if (this.form.contract_amount) {
receipt_propority = (
receipt_amount *
100 /
this.form.contract_amount
).toFixed(2);
}
var total_receipt_amount = receipt_amount;
if (receipt_progress > 1) {
total_receipt_amount =
parseFloat(
this.receipts_data[receipt_progress - 2].total_receipt_amount
) + receipt_amount;
}
var is_reback = "";
if (this.total_reback_amount >= total_receipt_amount) {
is_reback = "是";
} else is_reback = "否";
var receipt_note = this.receipts_form.receipt_note;
var a = {
receipt_progress: receipt_progress,
receipt_amount: receipt_amount,
receipt_amount: parseFloat(receipt_amount).toFixed(2),
oa_flow_id: oa_flow_id,
receipt_propority: receipt_propority,
total_receipt_amount: total_receipt_amount,
is_reback: is_reback,
receipt_note: receipt_note
};
if (!this.modify_data) {
......@@ -1233,19 +1254,12 @@ export default {
rebacks_dialog_confirm() {
this.$refs["rebacks_form"].validate(valid => {
if (valid) {
var reback_progress = this.rebacks_data.length + 1;
var actual_reback_amount = this.rebacks_form.actual_reback_amount;
var reback_propority = 0;
if (this.form.contract_amount) {
reback_propority =
actual_reback_amount / this.form.contract_amount * 100;
}
var reback_date = this.rebacks_form.reback_date;
var reback_note = this.rebacks_form.reback_note;
var a = {
reback_progress: reback_progress,
actual_reback_amount: actual_reback_amount,
reback_propority: reback_propority,
reback_date: reback_date,
reback_note: reback_note
};
......@@ -1399,6 +1413,67 @@ export default {
});
}
},
get_pay_date(index) {
var date = "";
var type = this.payments_data[index].payment_type;
var days = this.payments_data[index].days;
if (type == "0" && this.form.sign_date) {
date = this.date_add_days(this.form.sign_date, days);
} else if ((type == "1" || type == "3") && this.delivers_data[0]) {
var i = this.delivers_data.length - 1;
date = this.date_add_days(
this.delivers_data[i].goods_acceptanc_date,
days
);
} else if (
(type == "2" || type == "4") &&
this.final_acceptances_form.acceptance_date != null
) {
date = this.date_add_days(
this.final_acceptances_form.acceptance_date,
days
);
}
return date;
},
get_pay_amount(index) {
var amount = 0;
if (this.form.contract_amount > 0) {
amount =
this.form.contract_amount *
this.payments_data[index].payment_propority /
100;
}
return amount;
},
get_customers() {
this.$Axios({
method: "get",
url: this.contract_base_url + "customers",
headers: { "Content-Type": "application/json" }
})
.then(response => {
// this.customer_unid_selected_data = response.data
console.log(response.data);
})
.catch(err => {
console.log(err.message);
});
},
get_projects(){
this.$Axios({
method: "get",
url: this.contract_base_url + "projects",
headers: { "Content-Type": "application/json" }
})
.then(response => {
this.project_unid_selected_data = response.data
// console.log(response.data);
})
.catch(err => {
console.log(err.message);
});
},
// getlocation end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// !!!!!!~~~~~~~~~~~~~submit~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -1416,7 +1491,8 @@ export default {
this.$Axios({
method: method,
url: this.contract_base_url,
data: this.form
data: this.form,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.encode == 200) {
......@@ -1461,7 +1537,8 @@ export default {
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/rebacks",
data: this.rebacks_data
data: this.rebacks_data,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.encode == 200) {
......@@ -1483,7 +1560,8 @@ export default {
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/receipts",
data: this.receipts_data
data: this.receipts_data,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.encode == 200) {
......@@ -1505,7 +1583,8 @@ export default {
this.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/delivers",
data: this.delivers_data
data: this.delivers_data,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.encode == 200) {
......@@ -1543,13 +1622,17 @@ export default {
_this
.$Axios({
method: method,
url: "/api/v1/financial/contracts/contract/project/acceptancs",
url:
_this.contract_base_url +
_this.contract_unid +
"/project/acceptancs",
data: {
list_data: [
_this.first_acceptances_form,
_this.final_acceptances_form
]
}
},
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.encode == 200) {
......@@ -1566,29 +1649,234 @@ export default {
},
created() {
this.get_provinces();
var id = this.$route.params.contract_unid;
if (id != "0") {
this.operate_type = [1, 1, 1, 1, 1, 1];
this.form.contract_unid = id;
this.$Axios({
method: "get",
url: this.contract_base_url + id
url: this.contract_base_url + id,
headers: { "Content-Type": "application/json" }
})
.then(response => {
this.$set(this.form, "contract_unid", response.data.contract_unid);
// this.$set(this.form, "province", response.data.province);
// this.$set(this.form, "city", response.data.city);
// this.$set(this.form, "county", response.data.county);
this.$set(this.form, "province", "06FB2BFD29");
this.get_cities();
this.$set(this.form, "city", "4B4BD6A81w");
this.get_counties();
this.$set(this.form, "county", "865A12C46C");
this.$set(
this.form,
"contract_state",
parseInt(response.data.contract_state)
);
this.$set(
this.form,
"contract_type",
parseInt(response.data.contract_type)
);
this.$set(this.form, "is_archive", response.data.is_archive);
// this.$set(
// this.form,
// "amount_state_unid",
// parseInt(response.data.amount_state_unid)
// );
this.$set(this.form, "amount_state_unid", 1);
this.$set(
this.form,
"salesperson_unid",
response.data.salesperson_unid
);
this.get_projects();
this.$set(this.form, "project_unid", response.data.project_unid);
this.get_customers();
this.$set(this.form, "customer_unid", response.data.customer_unid);
this.$set(this.form, "deduct_amount", response.data.deduct_amount);
this.$set(
this.form,
"contract_amount_note",
response.data.deduct_amount
);
this.$set(this.form, "stop_amount", response.data.stop_amount);
this.$set(this.form, "reback_note", response.data.reback_note);
this.$set(
this.form,
"exemptions_amount",
response.data.exemptions_amount
);
this.$set(
this.form,
"contract_remain_note",
response.data.contract_remain_note
);
this.$set(
this.form,
"bad_amount_note",
response.data.bad_amount_note
);
this.$set(
this.form,
"mainten_start_point",
parseInt(response.data.mainten_start_point)
);
this.$set(this.form, "contract_note", response.data.contract_note);
this.$set(
this.form,
"contract_amount",
response.data.contract_amount
);
this.$set(
this.form,
"guarantee_period",
response.data.guarantee_period
);
this.$set(
this.form,
"product_line_type",
parseInt(response.data.product_line_type)
);
this.$set(
this.form,
"confirm_income_amount",
response.data.confirm_income_amount
);
this.$set(this.form, "bad_amount", response.data.bad_amount);
// 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);
});
this.$Axios({
method: "get",
url: this.contract_base_url + id + "/payments",
headers: { "Content-Type": "application/json" }
})
.then(response => {
this.form = response.data;
if (this.form.start_guarantee_date) {
this.$delete(this.form, "start_guarantee_date");
for (let i = 0; i < response.data.length; i++) {
var item = {};
const e = response.data[i];
item.payment_type = parseInt(e.payment_type);
item.days = e.days;
item.payment_propority = e.payment_propority * 100;
item.payment_requirement = e.payment_requirement;
item.amount = this.form.contract_amount * item.payment_propority;
this.payments_data.push(item);
}
if (this.form.end_guarantee_date) {
this.$delete(this.form, "end_guarantee_date");
})
.catch(err => {
console.log(err.message);
});
this.$Axios({
method: "get",
url: this.contract_base_url + id + "/rebacks",
headers: { "Content-Type": "application/json" }
})
.then(response => {
console.log(response.data);
})
.catch(err => {
console.log(err.message);
});
this.$Axios({
method: "get",
url: this.contract_base_url + id + "/receipts",
headers: { "Content-Type": "application/json" }
})
.then(response => {
for (let i = 0; i < response.data.length; i++) {
var e = response.data[i];
var item = {};
item.oa_flow_id = e.oa_flow_id;
item.receipt_amount = e.receipt_amount;
item.receipt_note = e.receipt_note;
item.receipt_progress = e.receipt_progress;
this.receipts_data.push(item);
}
this.guarantee_date.push(response.data.start_guarantee_date);
this.guarantee_date.push(response.data.end_guarantee_date);
})
.catch(err => {
console.log(err.message);
});
this.$Axios({
method: "get",
url: this.contract_base_url + id + "/delivers",
headers: { "Content-Type": "application/json" }
})
.then(response => {
for (let i = 0; i < response.data.list_deliver_data.length; i++) {
var e = response.data.list_deliver_data[i];
var item = {};
item.deliver_goods_date = e.deliver_goods_date;
item.goods_acceptanc_date = e.goods_acceptanc_date;
this.delivers_data.push(item);
}
})
.catch(err => {
console.log(err.message);
});
this.$Axios({
method: "get",
url: this.contract_base_url + id + "/acceptancs",
headers: { "Content-Type": "application/json" }
})
.then(response => {
for (let i = 0; i < response.data.list_check_data.length; i++) {
var e = response.data.list_check_data[i];
if (e.acceptanc_type == "1") {
this.$set(this.first_acceptances_form, "acceptance_type", "1");
this.$set(
this.first_acceptances_form,
"acceptance_date",
e.acceptanc_date
);
this.$set(
this.first_acceptances_form,
"acceptance_note",
e.acceptanc_note
);
} else if (e.acceptanc_type == "2") {
this.$set(this.final_acceptances_form, "acceptance_type", "2");
this.$set(
this.final_acceptances_form,
"acceptance_date",
e.acceptanc_date
);
this.$set(
this.final_acceptances_form,
"acceptance_note",
e.acceptanc_note
);
}
}
})
.catch(err => {
console.log(err.message);
});
}
},
beforeCreate() {
var time = 1000;
if (this.$route.params.contract_unid != 0) {
time = 3000
}
const loading = this.$loading({
lock: true,
text: "加载中,请稍等",
background: "rgba(0, 0, 0, 1)"
});
setTimeout(() => {
loading.close();
}, time);
}
};
</script>
......
<template>
<div id="login_box">
<h2 style="text-align:center">合同管理系统</h2>
<br>
<el-form ref="form" :model="form" :rules="rules" label-width="60px" label-position="top">
<el-form-item label="姓名" prop="username">
<el-input v-model="form.username"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input type="password" v-model="form.password" auto-complete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('form')">提交</el-button>
<el-button @click="resetForm('form')">重置</el-button>
</el-form-item>
</el-form>
<el-row type="flex" justify="center" align="middle" style="height:80%">
<el-card class="box-card" shadow="hover" style="width:25%">
<div slot="header" style="text-align:center" class="clearfix">
<span style="font-size:24px">合同管理系统</span>
</div>
<el-form ref="login_form" :model="form" :rules="rules" label-width="60px" label-position="top">
<el-form-item prop="username">
<el-input v-model="form.username">
<template slot="prepend">姓名</template>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input type="password" v-model="form.password" auto-complete="off">
<template slot="prepend">密码</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm('login_form')">提交</el-button>
<el-button @click="resetForm('login_form')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</el-row>
</div>
</template>
......@@ -23,47 +32,45 @@ export default {
data() {
return {
form: {
username: localStorage.getItem("username"),
username: "",
password: ""
},
rules: {
username: [
{required: true, message: '请输入用户名', trigger: 'blur'}
],
password: [
{required: true, message: '请输入登录密码', trigger: 'blur'}
]
}
username: [
{ required: true, message: "请输入用户名", trigger: "blur" }
],
password: [
{ required: true, message: "请输入登录密码", trigger: "blur" }
]
}
};
},
methods: {
submitForm(form){
this.$refs[form].validate((valid) => {
submitForm(form) {
this.$refs[form].validate(valid => {
if (valid) {
console.log(valid);
console.log(this.form.username);
console.log(this.form.password);
window.localStorage.setItem("username",this.form.username);
window.sessionStorage.setItem('loginCheck',true);
window.sessionStorage.setItem("username",this.form.username);
this.$router.push({path:"/nav/search"});
window.localStorage.setItem("username", this.form.username);
window.sessionStorage.setItem("loginCheck", true);
window.sessionStorage.setItem("username", this.form.username);
this.$router.push({ path: "/nav/search" });
}
});
},
resetForm(form){
resetForm(form) {
this.$refs[form].resetFields();
}
}
},
mounted() {
this.form.username = localStorage.getItem("username");
},
};
</script>
<style scoped>
#login_box {
position: absolute;
/* height: 300px; */
width: 300px;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
height: 100%
}
</style>
......@@ -59,30 +59,8 @@ export default {
this.$router.push({ path: "/" });
}
},
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);
}
);
mounted() {
}
};
</script>
......
......@@ -8,7 +8,7 @@ import 'element-ui/lib/theme-chalk/index.css'
import Axios from 'axios'
import '../static/city-data'
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import "./mock"
// import "./mock"
import '../static/disparch'
......
disparch_data = {
code_base_url: "http://192.168.9.162:20080/api/v1/codes/",
contract_base_url: "http://192.168.9.162:20080/api/v1/financial/contracts",
contract_base_url: "http://192.168.9.162:20080/api/v1/financial/contracts/",
}
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>finance_serv</title><link href=./static/css/app.a5c2291a4b1d7b7e03c0ab4f126c292e.css rel=stylesheet></head><body style="height: 100%"><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9b1c2d2ef553539ff67b.js></script><script type=text/javascript src=./static/js/app.30725199e95365e974a7.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>finance_serv</title><link href=./static/css/app.cfb4d4522c121f38ec61d980b85a5fa2.css rel=stylesheet></head><body style="height: 100%"><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.9b1c2d2ef553539ff67b.js></script><script type=text/javascript src=./static/js/app.7fab0de8531ebe620737.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 ad6458dea9d6bc7c5053"],"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 ad6458dea9d6bc7c5053"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap c71e097c9d3cfcc964e5"],"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 c71e097c9d3cfcc964e5"],"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!