Commit ee90193a by 谢明辉

a

1 parent 88baea44
......@@ -9,10 +9,10 @@
</div>
<transition name="el-fade-in-linear">
<el-form id="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" :rules="add_rules" v-show="contract_show" :disabled="disabled_list[0]==1">
<el-form id="form" :inline="true" :model="form" class="demo-form-inline" label-width="100px" :rules="add_rules" v-show="contract_show" :disabled="disabled_list[0]==1" ref="contract_form">
<el-row style="text-align:left">
<el-col :span="8">
<el-form-item label="合同编号">
<el-form-item label="合同编号" prop="contract_unid">
<el-select class="width-220" v-model="form.contract_unid" clearable filterable placeholder="合同编号" @change="get_contract_info(form.contract_unid)">
<el-option v-for="(item,index) in contract_unid_selected_data" :key="index" :label="item" :value="item">
</el-option>
......@@ -28,7 +28,7 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="项目名称">
<el-form-item label="项目名称" prop="project_unid">
<el-select class="width-220" v-model="form.project_unid" clearable filterable placeholder="项目名称">
<el-option v-for="(item,index) in project_unid_selected_data" :key="index" :label="item.project_name" :value="item.project_unid">
</el-option>
......@@ -38,7 +38,7 @@
</el-row>
<el-row style="text-align:left">
<el-col :span="8">
<el-form-item label="客户名称">
<el-form-item label="客户名称" prop="customer_unid">
<el-select class="width-220" v-model="form.customer_unid" clearable filterable placeholder="客户名称">
<el-option v-for="(item,index) in customer_unid_selected_data" :key="item.customer_unid" :label="item.customer_name" :value="item.customer_unid">
</el-option>
......@@ -47,16 +47,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="项目所在地">
<el-select style="width:100px" v-model="form.province" clearable placeholder="省" @change="get_cities()">
<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_value" clearable placeholder="省" @change="get_cities()">
<el-option v-for="(item,index) in provinces" :key="index" :label="item.name" :value="item.province_unid + '#' + item.name">
</el-option>
</el-select>
<el-select style="width:100px" v-model="form.city" clearable placeholder="市" @change="get_counties()">
<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_value" clearable placeholder="市" @change="get_counties()">
<el-option v-for="(item,index) in cities" :key="index" :label="item.name" :value="item.city_unid + '#' + item.name">
</el-option>
</el-select>
<el-select style="width:100px" v-model="form.county" clearable placeholder="区县">
<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_value" clearable placeholder="区县">
<el-option v-for="(item,index) in counties" :key="index" :label="item.name" :value="item.county_unid + '#' + item.name">
</el-option>
</el-select>
</el-form-item>
......@@ -242,7 +242,7 @@
</el-col>
<el-col :span="9">
<el-form-item label="上传文件">
<el-upload class="upload-demo" :action="upload_url" drag multiple :file-list="contract_appendix_list" :http-request="contract_upload" :on-remove="on_remove">
<el-upload class="upload-demo" :action="upload_url" drag multiple :file-list="contract_appendix_list" :http-request="contract_upload" :on-remove="on_remove" :on-preview="download_file">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或点击上传</div>
</el-upload>
......@@ -522,7 +522,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="上传文件">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="delivers_form.delivers_appendix_list" :http-request="delivers_upload" :on-remove="on_remove">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="delivers_form.delivers_appendix_list" :http-request="delivers_upload" :on-remove="on_remove" :on-preview="download_file">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
......@@ -572,7 +572,7 @@
</el-row>
<el-row>
<el-form-item lalel="上传附件">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="first_acceptancs_appendix_list" :http-request="first_acceptances_upload" :on-remove="on_remove">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="first_acceptancs_appendix_list" :http-request="first_acceptances_upload" :on-remove="on_remove" :on-preview="download_file">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
......@@ -607,7 +607,7 @@
</el-row>
<el-row>
<el-form-item lalel="上传附件">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="acceptancs_appendix_list" :http-request="acceptances_upload" :on-remove="on_remove">
<el-upload class="upload-demo" :action="upload_url" multiple :file-list="acceptancs_appendix_list" :http-request="acceptances_upload" :on-remove="on_remove" :on-preview="download_file">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
......@@ -675,11 +675,11 @@ export default {
// 客户名称
customer_unid: null,
// 项目所在省
province: "",
province_value: "",
// // 项目所在市
city: "",
city_value: "",
// // 项目所在区
county: "",
county_value: "",
// 质保周期
guarantee_period: 6,
// 签订时间
......@@ -777,6 +777,21 @@ export default {
// 表单验证~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
add_rules: {
project_unid: {
required: true,
message: "不能为空",
trigger: "blur"
},
customer_unid: {
required: true,
message: "不能为空",
trigger: "blur"
},
contract_unid: {
required: true,
message: "不能为空",
trigger: "blur"
},
contract_amount: twodecimalrule,
deduct_amount: twodecimalrule,
stop_amount: twodecimalrule,
......@@ -893,6 +908,36 @@ export default {
};
},
computed: {
get_province_unid() {
if (this.form.province_value) {
return this.form.province_value.split("#")[0];
}
},
get_province_name() {
if (this.form.province_value) {
return this.form.province_value.split("#")[1];
}
},
get_city_unid() {
if (this.form.city_value) {
return this.form.city_value.split("#")[0];
}
},
get_city_name() {
if (this.form.city_value) {
return this.form.city_value.split("#")[1];
}
},
get_county_unid() {
if (this.form.county_value) {
return this.form.county_value.split("#")[0];
}
},
get_county_name() {
if (this.form.county_value) {
return this.form.county_value.split("#")[1];
}
},
get_year() {
if (this.form.sign_date) {
var date = this.form.sign_date;
......@@ -1068,6 +1113,11 @@ export default {
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// methods++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
methods: {
download_file(f) {
console.log(f);
window.open(f.url);
},
// upload+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contract_upload(f) {
let param = new FormData(); //创建form对象
......@@ -1112,7 +1162,6 @@ export default {
_this.$message.err("上传失败");
};
xhr.onreadystatechange = function() {
debugger;
if (xhr.readyState == 4 && xhr.status == 200 && !xhr.response.encode) {
var a = JSON.parse(xhr.response);
var b = {};
......@@ -1328,20 +1377,6 @@ export default {
console.log(err.message);
});
},
customerIdRemoteMethod(query) {
this.$Axios({
method: "get",
url: this.contract_base_url + "customers",
headers: { "Content-Type": "application/json" }
})
.then(response => {
this.customer_unid_selected_data = response.data;
})
.catch(err => {
console.log(err.message);
});
},
// remoteMethod~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// dialog_confirm_start~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -1660,15 +1695,15 @@ export default {
});
},
get_cities() {
this.form.city = "";
this.form.county = "";
if (this.form.province) {
this.form.city_value = "";
this.form.county_value = "";
if (this.form.province_value) {
this.$Axios({
method: "get",
url:
this.code_base_url +
"countries/0E229CD043/provinces/" +
this.form.province +
this.get_province_unid +
"/cities"
})
.then(response => {
......@@ -1680,16 +1715,16 @@ export default {
}
},
get_counties() {
this.form.county = "";
if (this.form.province && this.form.city) {
this.form.county_value = "";
if (this.form.province_value && this.form.city_value) {
this.$Axios({
method: "get",
url:
this.code_base_url +
"countries/0E229CD043/provinces/" +
this.form.province +
this.get_province_unid +
"/cities/" +
this.form.city +
this.get_city_unid +
"/counties"
})
.then(response => {
......@@ -1784,12 +1819,29 @@ export default {
"contract_unid",
response.data.contract_unid
);
this.$set(this.form, "province", response.data.province);
this.get_cities();
this.$set(this.form, "city", response.data.city);
this.get_counties();
this.$set(this.form, "county", response.data.county);
if (response.data.province) {
this.$set(
this.form,
"province_value",
response.data.province + "#" + response.data.province_name
);
}
if (response.data.city) {
this.get_cities();
this.$set(
this.form,
"city_value",
response.data.city + "#" + response.data.city_name
);
}
if (response.data.county) {
this.get_counties();
this.$set(
this.form,
"county_value",
response.data.county + "#" + response.data.county_name
);
}
if (response.data.contract_state) {
this.$set(
this.form,
......@@ -1828,19 +1880,23 @@ export default {
this.$set(
this.form,
"deduct_amount",
response.data.deduct_amount
response.data.deduct_amount.toFixed(2)
);
this.$set(
this.form,
"contract_amount_note",
response.data.deduct_amount
response.data.deduct_amount.toFixed(2)
);
this.$set(
this.form,
"stop_amount",
response.data.stop_amount.toFixed(2)
);
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
response.data.exemptions_amount.toFixed(2)
);
this.$set(
this.form,
......@@ -1868,7 +1924,7 @@ export default {
this.$set(
this.form,
"contract_amount",
response.data.contract_amount
response.data.contract_amount.toFixed(2)
);
this.$set(
this.form,
......@@ -1886,10 +1942,14 @@ export default {
this.$set(
this.form,
"confirm_income_amount",
response.data.confirm_income_amount
response.data.confirm_income_amount.toFixed(2)
);
this.$set(this.form, "sign_date", response.data.sign_date);
this.$set(this.form, "bad_amount", response.data.bad_amount);
this.$set(
this.form,
"bad_amount",
response.data.bad_amount.toFixed(2)
);
for (let i = 0; i < response.data.appendix_list.length; i++) {
const e = response.data.appendix_list[i];
var b = {};
......@@ -1905,8 +1965,16 @@ export default {
this.$delete(this.form, "end_guarantee_date");
}
this.guarantee_date = [];
this.guarantee_date.push(response.data.start_guarantee_date);
this.guarantee_date.push(response.data.end_guarantee_date);
if (response.data.start_guarantee_date) {
this.guarantee_date.push(response.data.start_guarantee_date);
} else {
this.guarantee_date.push("");
}
if (response.data.end_guarantee_date) {
this.guarantee_date.push(response.data.end_guarantee_date);
} else {
this.guarantee_date.push("");
}
}
})
.catch(err => {
......@@ -2079,28 +2147,43 @@ export default {
},
// getlocation end~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// !!!!!!~~~~~~~~~~~~~submit~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// !!!!!!~~~~~~~~~~~~~submittttttt~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
form_submit(name) {
switch (name) {
case "form":
this.form.start_guarantee_date = this.start_guarantee_date;
this.form.end_guarantee_date = this.end_guarantee_date;
this.$Axios({
method: "put",
url: this.contract_base_url + this.form.contract_unid,
data: this.form,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.ecode == 200) {
this.$alert("提交成功");
} else {
this.$alert("提交失败:" + response.data.enote);
}
})
.catch(err => {
this.$alert("提交失败");
});
this.$refs["contract_form"].validate(valid => {
if (valid) {
this.form.start_guarantee_date = this.start_guarantee_date;
this.form.end_guarantee_date = this.end_guarantee_date;
this.form.province = this.get_province_unid;
this.form.province_name = this.get_province_name;
this.form.city = this.get_city_unid;
this.form.city_name = this.get_city_name;
this.form.county = this.get_county_unid;
this.form.county_name = this.get_county_name;
this.$Axios({
method: "put",
url: this.contract_base_url + this.form.contract_unid,
data: this.form,
headers: { "Content-Type": "application/json" }
})
.then(response => {
if (response.data.ecode == 200) {
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
})
.catch(err => {
this.$message.error("提交失败");
});
}
});
break;
// ---------
case "payment":
......@@ -2141,7 +2224,15 @@ export default {
});
}
}
a == 0 ? this.$alert("提交成功") : this.$alert("提交失败");
if (a == 0) {
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
break;
// -------
case "reback":
......@@ -2176,8 +2267,15 @@ export default {
});
}
}
a == 0 ? this.$alert("提交成功") : this.$alert("提交失败");
if (a == 0) {
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
break;
case "receipt":
var a = 0;
......@@ -2219,8 +2317,15 @@ export default {
});
}
}
a == 0 ? this.$alert("提交成功") : this.$alert("提交失败");
if (a == 0) {
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
break;
case "deliver":
var a = 0;
......@@ -2261,9 +2366,18 @@ export default {
});
}
}
a == 0 ? this.$alert("提交成功") : this.$alert("提交失败");
if (a == 0) {
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
break;
case "project":
var a = 0;
var _this = this;
var p1 = new Promise(function(resolve, reject) {
_this.$refs.first_acceptancs_form.validate(valid => {
......@@ -2280,21 +2394,16 @@ export default {
});
});
Promise.all([p1, p2]).then(function() {
var first_method, final_method;
if (_this.first_acceptancs_form.acceptanc_unid != null) {
_this.$Axios({
method: "put",
url:
_this.contract_base_url +
_this.form.contract_unid +
"/project/acceptancs",
data: {
list_check_data: [_this.first_acceptancs_form]
},
headers: { "Content-Type": "application/json" }
});
first_method = "put";
} else {
_this.$Axios({
method: "post",
first_method = "post";
}
_this
.$Axios({
method: first_method,
url:
_this.contract_base_url +
_this.form.contract_unid +
......@@ -2303,24 +2412,19 @@ export default {
list_check_data: [_this.first_acceptancs_form]
},
headers: { "Content-Type": "application/json" }
})
.then()
.catch(err => {
a++;
});
}
if (_this.final_acceptancs_form.acceptanc_unid != null) {
_this.$Axios({
method: "put",
url:
_this.contract_base_url +
_this.form.contract_unid +
"/project/acceptancs",
data: {
list_check_data: [_this.final_acceptancs_form]
},
headers: { "Content-Type": "application/json" }
});
final_method = "put";
} else {
_this.$Axios({
method: "post",
final_method = "post";
}
_this
.$Axios({
method: final_method,
url:
_this.contract_base_url +
_this.form.contract_unid +
......@@ -2329,14 +2433,26 @@ export default {
list_check_data: [_this.final_acceptancs_form]
},
headers: { "Content-Type": "application/json" }
})
.then()
.catch(err => {
a++;
});
}
});
if (a == 0) {
debugger;
this.$message({
type: "success",
message: "提交成功"
});
this.$router.go(0);
} else {
this.$message.error("提交失败");
}
break;
default:
break;
}
this.$router.go(0);
}
},
created() {
......@@ -2346,29 +2462,95 @@ export default {
if (e.role_unid == "ec480894ee85f1fa282ee7fa27be9cbc") {
this.disabled_list[1] = 0;
} else if (e.role_unid == "91d5185d47e3bad099e17570b0dd0ed2") {
this.disabled_list[0] = 0;
this.disabled_list = [0, 0, 0];
} else if (e.role_unid == "65f881ffa510eb9ec0c0dc76d625515f") {
this.disabled_list[2] = 0;
} else if (e.role_unid == "b126ebb9fbc87f4997cb0498a88b5f4c") {
this.disabled_list[0] = 0;
}
}
this.get_provinces();
this.get_contract_state_data();
this.get_contract_type_data();
this.get_amount_state_unid_data();
this.get_mainten_start_point_data();
this.get_product_line_type_data();
this.get_payment_type_data();
this.get_salesperson();
this.get_contract_unid();
this.get_projects();
this.get_customers();
if (sessionStorage.getItem("provinces")) {
this.provinces = JSON.parse(sessionStorage.getItem("provinces"));
} else {
this.get_provinces();
}
if (sessionStorage.getItem("contract_state_data")) {
this.contract_state_data = JSON.parse(
sessionStorage.getItem("contract_state_data")
);
} else {
this.get_contract_state_data();
}
if (sessionStorage.getItem("contract_type_data")) {
this.contract_type_data = JSON.parse(
sessionStorage.getItem("contract_type_data")
);
} else {
this.get_contract_type_data();
}
if (sessionStorage.getItem("amount_state_unid_data")) {
this.amount_state_unid_data = JSON.parse(
sessionStorage.getItem("amount_state_unid_data")
);
} else {
this.get_amount_state_unid_data();
}
if (sessionStorage.getItem("mainten_start_point_data")) {
this.mainten_start_point_data = JSON.parse(
sessionStorage.getItem("mainten_start_point_data")
);
} else {
this.get_mainten_start_point_data();
}
if (sessionStorage.getItem("product_line_type_data")) {
this.product_line_type_data = JSON.parse(
sessionStorage.getItem("product_line_type_data")
);
} else {
this.get_product_line_type_data();
}
if (sessionStorage.getItem("payment_type_data")) {
this.payment_type_data = JSON.parse(
sessionStorage.getItem("payment_type_data")
);
} else {
this.get_payment_type_data();
}
if (sessionStorage.getItem("salesperson_unid_selected_data")) {
this.salesperson_unid_selected_data = JSON.parse(
sessionStorage.getItem("salesperson_unid_selected_data")
);
} else {
this.get_salesperson();
}
if (sessionStorage.getItem("contract_unid_selected_data")) {
this.contract_unid_selected_data = JSON.parse(
sessionStorage.getItem("contract_unid_selected_data")
);
} else {
this.get_contract_unid();
}
if (sessionStorage.getItem("project_unid_selected_data")) {
this.project_unid_selected_data = JSON.parse(
sessionStorage.getItem("project_unid_selected_data")
);
} else {
this.get_projects();
}
if (sessionStorage.getItem("customer_unid_selected_data")) {
this.customer_unid_selected_data = JSON.parse(
sessionStorage.getItem("customer_unid_selected_data")
);
} else {
this.get_customers();
}
var id = this.$route.params.contract_unid;
this.get_contract_info(id);
},
watch: {
$route(to, from) {
this.$router.go(0);
// this.$router.go(0);
}
}
};
......
......@@ -31,7 +31,10 @@ export default {
name: "login",
data() {
return {
contract_base_url: disparch_data.contract_base_url,
code_base_url: disparch_data.code_base_url,
auth_base_url: disparch_data.auth_base_url,
net_error: false,
form: {
username: "",
password: ""
......@@ -67,10 +70,35 @@ export default {
type: "error"
});
} else {
window.sessionStorage.setItem("username", this.form.username);
window.sessionStorage.setItem("user_unid", res.data.user_unid);
window.sessionStorage.setItem('user_roles',JSON.stringify(res.data.roles));
this.$router.push({ path: "/nav/search" });
window.sessionStorage.setItem("user_name", "汪汪汪");
window.sessionStorage.setItem(
"user_roles",
JSON.stringify(res.data.roles)
);
// this.get_provinces();
// this.get_contract_state_data();
// this.get_contract_type_data();
// this.get_amount_state_unid_data();
// this.get_mainten_start_point_data();
// this.get_product_line_type_data();
// this.get_payment_type_data();
// this.get_salesperson();
// this.get_contract_unid();
// this.get_projects();
// this.get_customers();
this.get_provinces(),
this.get_contract_state_data(),
this.get_contract_type_data(),
this.get_amount_state_unid_data(),
this.get_mainten_start_point_data(),
this.get_product_line_type_data(),
this.get_payment_type_data(),
this.get_salesperson(),
this.get_contract_unid(),
this.get_projects(),
this.get_customers();
this.$router.push({ path: "/nav/main" });
}
})
.catch(err => {
......@@ -85,7 +113,221 @@ export default {
resetForm(form) {
this.$refs[form].resetFields();
},
is_login() {}
is_login() {},
get_provinces() {
this.$Axios({
method: "get",
url: this.code_base_url + "countries/0E229CD043/provinces"
})
.then(response => {
sessionStorage.setItem(
"provinces",
JSON.stringify(response.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_contract_state_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/13BEFACBCF/codes"
})
.then(res => {
sessionStorage.setItem(
"contract_state_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_contract_type_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/8EC31D08A0/codes"
})
.then(res => {
sessionStorage.setItem(
"contract_type_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_amount_state_unid_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/42407C5EF2/codes"
})
.then(res => {
sessionStorage.setItem(
"amount_state_unid_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_mainten_start_point_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/55B997D596/codes"
})
.then(res => {
sessionStorage.setItem(
"mainten_start_point_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_product_line_type_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/4FC51AD3C9/codes"
})
.then(res => {
sessionStorage.setItem(
"product_line_type_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_payment_type_data() {
this.$Axios({
method: "get",
url: this.code_base_url + "custom/cates/215649FB93/codes"
})
.then(res => {
sessionStorage.setItem(
"payment_type_data",
JSON.stringify(res.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_salesperson() {
this.$Axios({
method: "get",
url: this.auth_base_url + "users",
params: {
norm_type: "employee"
}
})
.then(response => {
sessionStorage.setItem(
"salesperson_unid_selected_data",
JSON.stringify(response.data.list_data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_contract_unid() {
this.$Axios({
method: "get",
url: this.contract_base_url + "codes"
})
.then(response => {
sessionStorage.setItem(
"contract_unid_selected_data",
JSON.stringify(response.data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_projects() {
this.$Axios({
method: "get",
url: this.contract_base_url + "projects",
headers: { "Content-Type": "application/json" }
})
.then(response => {
sessionStorage.setItem(
"project_unid_selected_data",
JSON.stringify(response.data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
},
get_customers() {
this.$Axios({
method: "get",
url: this.contract_base_url + "customers",
headers: { "Content-Type": "application/json" }
})
.then(response => {
sessionStorage.setItem(
"customer_unid_selected_data",
JSON.stringify(response.data)
);
})
.catch(err => {
this.$router.push({ path: "/" });
this.$message({
message: "网络错误",
type: "error"
});
});
}
},
mounted() {
this.form.username = localStorage.getItem("username");
......
<template>
<div style="text-align:center">
<img src="../assets/logo.png" alt="" style="padding-top:15%">
</div>
</template>
<script>
export default {
}
</script>
<template>
<el-container>
<el-aside width="10%">
<el-container>
<el-aside width="10%">
<el-menu :default-active="$route.path" class="el-menu-vertical-demo" router :collapse="false">
<div style="height:20%;text-align:center">
<img src="../assets/logo.png" alt="" style="width:100%;height:63%">
</div>
<el-menu :default-active="$route.path" class="el-menu-vertical-demo" router :collapse="false ">
<div style="height:20%" @mousemove="collapse = false" @mouseout="collapse = true">
</div>
<el-menu-item index="/nav/search">
<i class="el-icon-search"></i>
<span slot="title">检索合同</span>
</el-menu-item>
<el-menu-item index="/nav/contract/0">
<i class="el-icon-plus"></i>
<span slot="title">合同信息</span>
</el-menu-item>
<el-menu-item index="/nav/manage">
<i class="el-icon-setting"></i>
<span slot="title">后台管理</span>
</el-menu-item>
<el-menu-item index="" @click="exit">
<i class="el-icon-back"></i>
<span slot="title">退出</span>
</el-menu-item>
</el-menu>
</el-aside>
<el-main>
<keep-alive include="search">
<router-view></router-view>
</keep-alive>
</el-main>
</el-container>
<el-menu-item index="/nav/search">
<i class="el-icon-search"></i>
<span slot="title">检索合同</span>
</el-menu-item>
<el-menu-item index="/nav/contract/0">
<i class="el-icon-plus"></i>
<span slot="title">合同信息</span>
</el-menu-item>
<el-menu-item index="/nav/manage" v-show="management">
<i class="el-icon-setting"></i>
<span slot="title">后台管理</span>
</el-menu-item>
<el-menu-item index="" @click="exit">
<i class="el-icon-back"></i>
<span slot="title">退出</span>
</el-menu-item>
<el-menu-item index="" style="position:absolute;bottom:50px">
<span slot="title">{{department}}&nbsp:&nbsp{{username}}</span>
</el-menu-item>
</el-menu>
</el-aside>
<el-main>
<keep-alive include="search">
<router-view></router-view>
</keep-alive>
</el-main>
</el-container>
</template>
<script>
......@@ -38,7 +44,9 @@ export default {
name: "HelloWorld",
data() {
return {
management: false,
username: "",
department: "",
collapse: true
};
},
......@@ -64,7 +72,17 @@ export default {
this.$router.push({ path: "/" });
}
},
mounted() {}
created() {
this.username = sessionStorage.getItem("user_name");
var roles = JSON.parse(sessionStorage.getItem("user_roles"));
for (let i = 0; i < roles.length; i++) {
const e = roles[i];
if (e.role_unid == "91d5185d47e3bad099e17570b0dd0ed2") {
this.management = true;
}
this.department = e.name;
}
}
};
</script>
......@@ -72,9 +90,7 @@ export default {
.el-main {
text-align: center;
}
.el-menu {
position: relative;
}
.el-container,
.el-aside {
......
......@@ -106,15 +106,19 @@
</el-form-item>
</el-col>
<el-col :span="12" style="text-align:left">
<el-form-item label="项目所在地">
<el-form-item label="项目所在地" prop="province">
<el-select style="width:100px" v-model="search_form.province" 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-form-item prop="city">
<el-select style="width:100px" v-model="search_form.city" clearable placeholder="市" @change="get_counties()">
<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-form-item prop="county">
<el-select style="width:100px" v-model="search_form.county" clearable placeholder="区县">
<el-option v-for="(item,index) in counties" :key="index" :label="item.name" :value="item.county_unid">
</el-option>
......@@ -276,7 +280,7 @@
</el-table-column>
<el-table-column label="产品线类型" prop="product_line_type_name" min-width="120" align="center">
</el-table-column>
<el-table-column label="销售员" prop="salesperson_unid" min-width="100" align="center">
<el-table-column label="销售员" prop="salesperson_name" min-width="100" align="center">
</el-table-column>
<el-table-column label="省" prop="province_name" min-width="80" align="center">
</el-table-column>
......@@ -358,9 +362,9 @@ export default {
is_archive: null,
amount_state_unid: null,
confirm_income_amount: null,
province_name: null,
city_name: null,
county_name: null,
province: null,
city: null,
county: null,
start_data: null,
end_date: null,
overdays_start_point: null,
......@@ -377,7 +381,21 @@ export default {
current_page: 1,
search_form_rules: {
confirm_income_amount: twodecimalrule
confirm_income_amount: twodecimalrule,
amount_start_point: twodecimalrule,
amount_end_point: twodecimalrule,
leave_amount_start_point: twodecimalrule,
leave_amount_end_point: twodecimalrule,
overdays_start_point: {
pattern: /((^[1-9]\d*)|^0)$/,
message: "请输入正确天数",
trigger: "blur"
},
overdays_end_point: {
pattern: /((^[1-9]\d*)|^0)$/,
message: "请输入正确天数",
trigger: "blur"
}
}
};
},
......@@ -629,11 +647,39 @@ export default {
}
},
created() {
this.get_provinces();
this.get_amount_state_unid_data();
this.get_contract_type_data();
this.get_contract_state_data();
this.get_product_line_type_data();
if (sessionStorage.getItem("provinces")) {
this.provinces = JSON.parse(sessionStorage.getItem("provinces"));
} else {
this.get_provinces();
}
if (sessionStorage.getItem("amount_state_unid_data")) {
this.amount_state_unid_data = JSON.parse(
sessionStorage.getItem("amount_state_unid_data")
);
} else {
this.get_amount_state_unid_data();
}
if (sessionStorage.getItem("contract_type_data")) {
this.contract_type_data = JSON.parse(
sessionStorage.getItem("contract_type_data")
);
} else {
this.get_contract_type_data();
}
if (sessionStorage.getItem("contract_state_data")) {
this.contract_state_data = JSON.parse(
sessionStorage.getItem("contract_state_data")
);
} else {
this.get_contract_state_data();
}
if (sessionStorage.getItem("product_line_type_data")) {
this.product_line_type_data = JSON.parse(
sessionStorage.getItem("product_line_type_data")
);
} else {
this.get_product_line_type_data();
}
}
};
</script>
......
......@@ -5,6 +5,7 @@ import Login from '@/components/login'
import Search from '@/components/search'
import Contract from '@/components/contract'
import Manage from '@/components/manage'
import Main from '@/components/main'
Vue.use(Router)
......@@ -26,6 +27,9 @@ export default new Router({
}, {
path: 'manage',
component: Manage
}, {
path: 'main',
component:Main
}]
}
]
......
<!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.16aa81df25fe4757798d7a2d668fa3a0.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.b67357410593246be62c.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.1b0dea1eaff8fa49f575dc3e7f7de691.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.3e334764b999a4bcfed2.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.
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 3a0dff34328e542fcb4a"],"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 3a0dff34328e542fcb4a"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 22cb64dc626683ce09a7"],"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 22cb64dc626683ce09a7"],"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!