Commit 2f4211ed authored by 黄奎's avatar 黄奎

111

parent 9a97c946
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
this.getCheckStatus(); this.getCheckStatus();
this.getWarehouseId(); this.getWarehouseId();
//上传接口路径 //上传接口路径
this.importFileUrl2 = this.domainManager().DomainUrl + this.importFileUrl2 = this.domainManager().ZCApiUrl +
"/api/file/LocalFileUploadImportForSuppliesCheck"; "/api/file/LocalFileUploadImportForSuppliesCheck";
//添加滚动事件 //添加滚动事件
window.addEventListener('scroll', this.handleScroll) window.addEventListener('scroll', this.handleScroll)
......
...@@ -6,21 +6,18 @@ ...@@ -6,21 +6,18 @@
<span @click="showTable=1,getList()" :class="showTable==1?'spanActive':''">待签字</span> <span @click="showTable=1,getList()" :class="showTable==1?'spanActive':''">待签字</span>
<span @click="showTable=2,getList()" :class="showTable==2?'spanActive':''">已签字</span> <span @click="showTable=2,getList()" :class="showTable==2?'spanActive':''">已签字</span>
</span> </span>
<span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;" class="f12 cd6"> <span @click="morequery=!morequery" style="display:inline-flex;align-items:center;cursor: pointer;"
class="f12 cd6">
<span style="margin-right:5px">高级查询</span> <span style="margin-right:5px">高级查询</span>
<img v-show="!morequery" style="width:12px;height:12px" src="../../assets/img/more.png" alt=""> <img v-show="!morequery" style="width:12px;height:12px" src="../../assets/img/more.png" alt="">
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt=""> <img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt="">
</span> </span>
<span @click="getList" style="margin-left:20px" class="chaxunSpan">查询</span> <span @click="getList" style="margin-left:20px" class="chaxunSpan">查询</span>
<!-- <span @click="chongzhi" style="margin-left:20px" class="addSpan">重置</span> -->
<!-- <span @click="addSupplier" style="margin-left:20px" class="addSpan">
<img style="width:10px;height:10px;margin-right:6px" src="../../assets/img/add.png" alt="">
新增</span> -->
</div> </div>
<div class="padContent"> <div class="padContent">
<ul v-show="morequery" class="queryul"> <ul v-show="morequery" class="queryul">
<li style="float:left"> <li style="float:left">
<!-- :alwaysOpen="true" -->
<treeselect style="height:50px;width:215px;" :options="treedata" v-model="msg.CategoryId" placeholder="分类" <treeselect style="height:50px;width:215px;" :options="treedata" v-model="msg.CategoryId" placeholder="分类"
:normalizer="normalizer" /> :normalizer="normalizer" />
</li> </li>
...@@ -35,46 +32,32 @@ ...@@ -35,46 +32,32 @@
</li> </li>
<li> <li>
<el-select size="small" filterable clearable v-model="msg.AuditStatus" placeholder="状态"> <el-select size="small" filterable clearable v-model="msg.AuditStatus" placeholder="状态">
<el-option <el-option v-for="item in StateEnumList" :key="item.Id" :label="item.Name" :value="item.Id">
v-for="item in StateEnumList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<el-select filterable clearable size="small" v-model="msg.EmployeeId" placeholder="领取人" :filter-method="getEmployee1"> <el-select filterable clearable size="small" v-model="msg.EmployeeId" placeholder="领取人"
<el-option :filter-method="getEmployee1">
v-for="item in EmployeeList1" <el-option v-for="item in EmployeeList1" :key="item.EmployeeId" :label="item.EmName"
:key="item.EmployeeId"
:label="item.EmName"
:value="item.EmployeeId"> :value="item.EmployeeId">
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<el-select filterable clearable size="small" v-model="msg.Source" placeholder="来源"> <el-select filterable clearable size="small" v-model="msg.Source" placeholder="来源">
<el-option <el-option v-for="item in SourceList" :key="item.Id" :label="item.Name" :value="item.Id">
v-for="item in SourceList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<el-date-picker <el-date-picker v-model="dateList" type="daterange" range-separator="至" value-format="yyyy-MM-dd"
v-model="dateList" start-placeholder="开始时间" end-placeholder="结束日期">
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始时间"
end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</li> </li>
</ul> </ul>
<table v-loading="loading" style="margin-top:10px" class="myTable noHoverTable" border="0" cellspacing="0" cellpadding="0"> <table v-loading="loading" style="margin-top:10px" class="myTable noHoverTable" border="0" cellspacing="0"
cellpadding="0">
<thead> <thead>
<th>状态</th> <th>状态</th>
<th>类型</th> <th>类型</th>
...@@ -108,7 +91,8 @@ ...@@ -108,7 +91,8 @@
</td> </td>
<td :rowspan="item.DetailList.length" v-if="index==0">{{item.SourceName}}</td> <td :rowspan="item.DetailList.length" v-if="index==0">{{item.SourceName}}</td>
<td :rowspan="item.DetailList.length" v-if="index==0"> <td :rowspan="item.DetailList.length" v-if="index==0">
<span class="underline" v-if="item.TempleteId>0" @click="See(item,'approvalDetails','SignMan','chakan')">{{item.OrderCode}}</span> <span class="underline" v-if="item.TempleteId>0"
@click="See(item,'approvalDetails','SignMan','chakan')">{{item.OrderCode}}</span>
<span v-else>{{item.OrderCode}}</span> <span v-else>{{item.OrderCode}}</span>
</td> </td>
...@@ -124,21 +108,17 @@ ...@@ -124,21 +108,17 @@
<p>{{item.UpdateBy}}</p> <p>{{item.UpdateBy}}</p>
<p>{{item.UpdateDate}}</p> <p>{{item.UpdateDate}}</p>
</td> </td>
<td :class="index1==tableData.length-1?'lastTdRight':''" :rowspan="item.DetailList.length" v-if="index==0"> <td :class="index1==tableData.length-1?'lastTdRight':''" :rowspan="item.DetailList.length"
v-if="index==0">
<el-tooltip class="item" effect="dark" content="流程查看" placement="top"> <el-tooltip class="item" effect="dark" content="流程查看" placement="top">
<img v-if="item.TempleteId>0" @click="See(item,'approvalDetails','SignMan','chakan')" style="width:24px;height:24px" src="../../assets/img/chakan.png" alt=""> <img v-if="item.TempleteId>0" @click="See(item,'approvalDetails','SignMan','chakan')"
style="width:24px;height:24px" src="../../assets/img/chakan.png" alt="">
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="签名" placement="top"> <el-tooltip class="item" effect="dark" content="签名" placement="top">
<img v-show="showTable==1" @click="See(item,'approvalDetails','SignMan','shenpi')" style="width:24px;height:24px" src="../../assets/img/shenpi.png" alt=""> <img v-show="showTable==1" @click="See(item,'approvalDetails','SignMan','shenpi')"
style="width:24px;height:24px" src="../../assets/img/shenpi.png" alt="">
</el-tooltip> </el-tooltip>
<!-- <el-tooltip class="item" effect="dark" content="转交" placement="top">
<img v-show="showTable==1" @click="ZhuanJiao(item)" style="width:24px;height:24px" src="../../assets/img/huifu.png" alt="">
</el-tooltip> -->
<!-- <span class="commonStyle hoverSpan2"></span> -->
</td> </td>
</tr> </tr>
</template> </template>
...@@ -147,30 +127,19 @@ ...@@ -147,30 +127,19 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<el-pagination @current-change="currentChange" background :page-size="msg.pageSize" layout="prev, pager, next"
<el-pagination
@current-change="currentChange"
background
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog title="转交" :visible.sync="dialogState" width="530px">
<el-dialog
title="转交"
:visible.sync="dialogState"
width="530px">
<el-form class="MyEditForm" :model="addMsg" :rules="rules" ref="addMsg" label-width="0px"> <el-form class="MyEditForm" :model="addMsg" :rules="rules" ref="addMsg" label-width="0px">
<div class="basefix"> <div class="basefix">
<el-form-item label="" prop="AuditEmId"> <el-form-item label="" prop="AuditEmId">
<span class="label">转交人</span> <span class="label">转交人</span>
<el-select filterable size="small" v-model="addMsg.AuditEmId" placeholder="转交人" :filter-method="getEmployee2"> <el-select filterable size="small" v-model="addMsg.AuditEmId" placeholder="转交人"
<el-option :filter-method="getEmployee2">
v-for="item in EmployeeList2" <el-option v-for="item in EmployeeList2" :key="item.EmployeeId" :label="item.EmName"
:key="item.EmployeeId"
:label="item.EmName"
:value="item.EmployeeId"> :value="item.EmployeeId">
</el-option> </el-option>
</el-select> </el-select>
...@@ -180,7 +149,6 @@ ...@@ -180,7 +149,6 @@
<el-input v-model="addMsg.Description"></el-input> <el-input v-model="addMsg.Description"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div class="btnformItem"> <div class="btnformItem">
<span class="submitBtn" type="primary" @click="submitForm('addMsg')">确定</span> <span class="submitBtn" type="primary" @click="submitForm('addMsg')">确定</span>
<span class="exitBtn" @click="dialogState=false">取消</span> <span class="exitBtn" @click="dialogState=false">取消</span>
...@@ -194,30 +162,29 @@ ...@@ -194,30 +162,29 @@
</template> </template>
<script> <script>
import CheckDetails from "@/components/global/CheckDetails.vue"; import CheckDetails from "@/components/global/CheckDetails.vue";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: 'Supplierman', name: 'SignMan',
components: { components: {
Treeselect, Treeselect,
CheckDetails CheckDetails
}, },
data(){ data() {
return{ return {
CheckDetailState:false, CheckDetailState: false,
EmployeeList1:[], EmployeeList1: [],
EmployeeList2:[], EmployeeList2: [],
StateEnumList: [],
StateEnumList:[], showTable: 1,
showTable:1, morequery: false,
morequery:false, currentPage: 1,
currentPage:1,
tableData: [], tableData: [],
loading:false, loading: false,
total:0, total: 0,
treedata:[], treedata: [],
SourceList:[], SourceList: [],
normalizer(node) { normalizer(node) {
var obj = { var obj = {
id: node.Id, id: node.Id,
...@@ -228,76 +195,77 @@ export default { ...@@ -228,76 +195,77 @@ export default {
} }
return obj; return obj;
}, },
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:10, pageSize: 10,
OrderCode:'', OrderCode: '',
PropertyNum:'', PropertyNum: '',
PropertyName:'', PropertyName: '',
CategoryId:null, CategoryId: null,
AuditStatus:'', AuditStatus: '',
EmployeeId:'', EmployeeId: '',
StartTime:'', StartTime: '',
EndTime:'', EndTime: '',
Source:'', Source: '',
}, },
addMsg:{ addMsg: {
AuditEmId:'', AuditEmId: '',
WorkFlowId:'', WorkFlowId: '',
TransferEmpId:'', TransferEmpId: '',
Description:'', Description: '',
}, },
dialogtitle:'新增', dialogtitle: '新增',
dialogState:false, dialogState: false,
AuditList:[], AuditList: [],
SignList:[], SignList: [],
rules:{ rules: {
AuditEmId: [ AuditEmId: [{
{ required: true, message: '请选择转交人', trigger: 'change' } required: true,
] message: '请选择转交人',
}, trigger: 'change'
nodemsg:{ }]
ParentId:-1, },
Tier:'', nodemsg: {
Name:'', ParentId: -1,
Type:1, Tier: '',
}, Name: '',
dateList:[], Type: 1,
EmName:'', },
dateList: [],
EmName: '',
} }
}, },
created(){ created() {
this.showTable=this.$route.query.showTable?this.$route.query.showTable:1; this.showTable = this.$route.query.showTable ? this.$route.query.showTable : 1;
}, },
mounted(){ mounted() {
this.getList(); this.getList();
this.getNode(); this.getNode();
this.getSource(); this.getSource();
this.getStateEnum(); this.getStateEnum();
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.addMsg.TransferEmpId=userInfo.EmployeeId; this.addMsg.TransferEmpId = userInfo.EmployeeId;
}, },
methods:{ methods: {
getCheckDes(item){ getCheckDes(item) {
this.PropertyId=item.PropertyId; this.PropertyId = item.PropertyId;
this.CheckDetailState=true; this.CheckDetailState = true;
setTimeout(()=>{ setTimeout(() => {
this.$refs.mychild.InitData(this.PropertyId); this.$refs.mychild.InitData(this.PropertyId);
},10) }, 10)
}, },
submitForm(formName) { submitForm(formName) {
let arr=[]; let arr = [];
arr.push(this.addMsg); arr.push(this.addMsg);
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.apiJavaPost("/api/property/AuditCareOf",arr, this.apiJavaPost("/api/property/AuditCareOf", arr,
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.getList(); this.getList();
this.Success(res.data.message) this.Success(res.data.message)
this.dialogState=false; this.dialogState = false;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -310,20 +278,20 @@ export default { ...@@ -310,20 +278,20 @@ export default {
} }
}); });
}, },
ZhuanJiao(item){ ZhuanJiao(item) {
this.dialogState=true; this.dialogState = true;
this.addMsg.WorkFlowId=item.Id; this.addMsg.WorkFlowId = item.Id;
}, },
See(item,path,backto,type){ See(item, path, backto, type) {
let shenpistr=type; let shenpistr = type;
this.$router.push({ this.$router.push({
path: "/" + path, path: "/" + path,
query: { query: {
Id:item.Id, Id: item.Id,
backto:backto, backto: backto,
showTable:this.showTable, showTable: this.showTable,
compType:shenpistr, compType: shenpistr,
} }
}); });
}, },
...@@ -331,26 +299,28 @@ export default { ...@@ -331,26 +299,28 @@ export default {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
getEmployee1(val){ getEmployee1(val) {
if(val!=''){ if (val != '') {
this.EmName=val; this.EmName = val;
this.getEmployee(1); this.getEmployee(1);
} }
}, },
getEmployee2(val){ getEmployee2(val) {
if(val!=''){ if (val != '') {
this.EmName=val; this.EmName = val;
this.getEmployee(2); this.getEmployee(2);
} }
}, },
getEmployee(num){ getEmployee(num) {
this.apiJavaPost("/api/User/GetEmployeeList",{EmName:this.EmName}, this.apiJavaPost("/api/User/GetEmployeeList", {
EmName: this.EmName
},
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
if(num==1){ if (num == 1) {
this.EmployeeList1=res.data.data; this.EmployeeList1 = res.data.data;
}else{ } else {
this.EmployeeList2=res.data.data; this.EmployeeList2 = res.data.data;
} }
} else { } else {
...@@ -360,11 +330,11 @@ export default { ...@@ -360,11 +330,11 @@ export default {
null null
); );
}, },
getStateEnum(){ getStateEnum() {
this.apiJavaPost("/api/property/GetPropertyOrderStateEnumList",{}, this.apiJavaPost("/api/property/GetPropertyOrderStateEnumList", {},
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.StateEnumList=res.data.data; this.StateEnumList = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -372,32 +342,28 @@ export default { ...@@ -372,32 +342,28 @@ export default {
null null
); );
}, },
getList(){ getList() {
if(this.dateList&&this.dateList.length>0){ if (this.dateList && this.dateList.length > 0) {
this.msg.StartTime=this.dateList[0]; this.msg.StartTime = this.dateList[0];
this.msg.EndTime=this.dateList[1]; this.msg.EndTime = this.dateList[1];
} } else {
else{ this.msg.StartTime = '';
this.msg.StartTime=''; this.msg.EndTime = '';
this.msg.EndTime='';
} }
if(this.showTable==1){ if (this.showTable == 1) {
this.getDaiSign(); this.getDaiSign();
} } else if (this.showTable == 2) {
else if(this.showTable==2){
this.getYiSign(); this.getYiSign();
} }
}, },
getDaiSign(){ getDaiSign() {
this.loading=true; this.loading = true;
this.apiJavaPost("/api/property/GetPropertyWaitMySignPageList",this.msg, this.apiJavaPost("/api/property/GetPropertyWaitMySignPageList", this.msg,
res => { res => {
this.loading=false; this.loading = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.tableData=res.data.data.pageData; this.tableData = res.data.data.pageData;
this.total=res.data.data.count; this.total = res.data.data.count;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -406,14 +372,14 @@ export default { ...@@ -406,14 +372,14 @@ export default {
null null
); );
}, },
getYiSign(){ getYiSign() {
this.loading=true; this.loading = true;
this.apiJavaPost("/api/property/GetPropertyMySignedPageList",this.msg, this.apiJavaPost("/api/property/GetPropertyMySignedPageList", this.msg,
res => { res => {
this.loading=false; this.loading = false;
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.tableData=res.data.data.pageData; this.tableData = res.data.data.pageData;
this.total=res.data.data.count; this.total = res.data.data.count;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
...@@ -422,11 +388,11 @@ export default { ...@@ -422,11 +388,11 @@ export default {
null null
); );
}, },
getNode(){ getNode() {
this.apiJavaPost("/api/property/CateporyGetTreeList",this.nodemsg, this.apiJavaPost("/api/property/CateporyGetTreeList", this.nodemsg,
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.treedata=res.data.data; this.treedata = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -434,11 +400,11 @@ export default { ...@@ -434,11 +400,11 @@ export default {
null null
); );
}, },
getSource(){ getSource() {
this.apiJavaPost("/api/property/GetPropertySourceEnumList",{}, this.apiJavaPost("/api/property/GetPropertySourceEnumList", {},
res => { res => {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.SourceList=res.data.data; this.SourceList = res.data.data;
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -446,17 +412,12 @@ export default { ...@@ -446,17 +412,12 @@ export default {
null null
); );
}, },
}, },
}
}
</script> </script>
<style scoped> <style scoped>
.spotquery{ .spotquery {
box-sizing: border-box; box-sizing: border-box;
}
}
</style> </style>
\ No newline at end of file
...@@ -111,9 +111,9 @@ ...@@ -111,9 +111,9 @@
}; };
}, },
created() { created() {
this.importFileUrl2 = this.domainManager().DomainUrl + this.importFileUrl2 = this.domainManager().ZCApiUrl +
"/api/file/LocalFileUploadImport"; "/api/file/LocalFileUploadImport";
this.downList = this.domainManager().LocalTemplateFileDownLoadUrl + "/ExportFile/资产导入模板.xls"; this.downList = this.domainManager().ZCApiUrl + "/ExportFile/资产导入模板.xls";
}, },
mounted() { mounted() {
......
...@@ -11,70 +11,24 @@ export default { ...@@ -11,70 +11,24 @@ export default {
}, },
//域名管理对象 //域名管理对象
Vue.prototype.domainManager = function () { Vue.prototype.domainManager = function () {
var domainUrl = "http://reborn.oytour.com"; //主域名 var zcApiUrl = "http://192.168.5.46:5001"; //资产接口地址
let locationName = window.location.hostname; let viittoFileUrl = "http://192.168.5.214:8130"; //文件预览地址
let javaUrldo = ""; let uploadUrl = "http://192.168.5.214:8120"; //文件上传地址
javaUrldo = locationName.indexOf('zcyx') !== -1 || locationName.indexOf('viitto') !== -1 ? (locationName.indexOf('oytour') !== -1 ? "http://property.oytour.com" : "http://47.96.12.235:9001") : "http://192.168.2.65:8018";
if (this.isOnline()) { if (this.isOnline()) {
domainUrl = "http://property.oytour.com" zcApiUrl = "http://property.oytour.com";
viittoFileUrl = "http://staticfile.oytour.com";
uploadUrl = "http://uploadfile.oytour.com"
} }
var obj = { var obj = {
//主地址 ZCApiUrl: zcApiUrl,
DomainUrl: domainUrl, ViittoFileUrl: viittoFileUrl,
//上传文件URL UploadUrl: uploadUrl,
UploadFileUrl: domainUrl + '/api/File/post',
LocalTemplateFileDownLoadUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
javaUrl: locationName.indexOf('zcyx') !== -1 ? "http://property.oytour.com" : locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://property.oytour.com" : "http://192.168.5.46:5001",
ViittoFileUrl: locationName.indexOf('zcyx') !== -1 || locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://staticfile.oytour.com" : 'http://192.168.2.214:8130',
UploadUrl: locationName.indexOf('zcyx') !== -1 || locationName.indexOf('zcyx.oytour.com') !== -1 ? "http://uploadfile.oytour.com" : "http://192.168.2.214:8120",
LocalFileStreamDownLoadUrl: domainUrl + "/api/file/GetFileFromWebApi",
JavaLocalFileStreamDownLoadUrl: javaUrldo,
}; };
console.log(locationName.indexOf('zcyx'))
return obj; return obj;
}, },
Vue.prototype.GetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().LocalFileStreamDownLoadUrl;
var timestamp = (new Date()).valueOf();
if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({
path: '/login'
})
}
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().secretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
}).then((res) => {
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
})
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
successCall(res);
}).catch(function (res) {});
},
Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) { Vue.prototype.JavaGetLocalFile = function (cmd, msg, fileName, successCall) {
var apiurl = this.domainManager().JavaLocalFileStreamDownLoadUrl + cmd; var apiurl = this.domainManager().ZCApiUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") { if (!localStorage.zcuserInfo && localStorage.zcuserInfo != "" && this.$route.path.toLowerCase() != "/login") {
this.$router.push({ this.$router.push({
...@@ -91,7 +45,7 @@ export default { ...@@ -91,7 +45,7 @@ export default {
let groupId = zcuserInfo.RB_Group_id ? zcuserInfo.RB_Group_id : 0; let groupId = zcuserInfo.RB_Group_id ? zcuserInfo.RB_Group_id : 0;
let uid = zcuserInfo.EmployeeId ? zcuserInfo.EmployeeId : 0; let uid = zcuserInfo.EmployeeId ? zcuserInfo.EmployeeId : 0;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
// var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
...@@ -101,13 +55,7 @@ export default { ...@@ -101,13 +55,7 @@ export default {
"uid": uid, "uid": uid,
"groupId": groupId "groupId": groupId
} }
// var postData = {
// "msg": msg,
// "cmd": cmd,
// "timestamp": timestamp,
// "token": token,
// "sign": md5Str
// }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
responseType: 'arraybuffer' responseType: 'arraybuffer'
}).then((res) => { }).then((res) => {
...@@ -185,80 +133,19 @@ export default { ...@@ -185,80 +133,19 @@ export default {
this.Info("已取消操作"); this.Info("已取消操作");
}); });
}, },
//压缩图片
//path : 图片路径
//type : m_filt 填充 m_w 宽度固定 高度不固定 m_h 高度固定 宽度不固定
// w : 宽
// h : 高
Vue.prototype.compressImg = function (path, type, w, h) {
let url = this.domainManager().UploadUrl;
let poise = 'width=';
w = w ? w : ''
h = h ? h : ''
if (type === 'w') {
poise = 'width'
} else if (type === 'h') {
poise = 'height'
}
return path.split('?')[0] + '?width=' + w;
}
//打开新窗口连接 //打开新窗口连接
Vue.prototype.OpenNewUrl = function (URL) { Vue.prototype.OpenNewUrl = function (URL) {
if (URL != '') { if (URL != '') {
window.open('http://' + URL, '_blank'); window.open('http://' + URL, '_blank');
} }
} }
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
var token = "";
var key = "";
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().token;
key = this.getLocalStorage().secretKey;
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
}
if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId = 2;
}
this.$http.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
}
})
.then(res => {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
})
} else if (res.data.resultCode == 10005) {
this.$router.go(-1)
} else {
successCall(res)
}
}, faildCall)
},
Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) { Vue.prototype.apiJavaPost = function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
var apiurl = this.domainManager().javaUrl + cmd; var apiurl = this.domainManager().ZCApiUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
this.apiurl = apiurl; this.apiurl = apiurl;
var token = ""; var token = "";
...@@ -270,8 +157,6 @@ export default { ...@@ -270,8 +157,6 @@ export default {
} }
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`msg=YXZCGL2020&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`msg=YXZCGL2020&timestamp=${timestamp}&token=${token}&key=${key}`);
// var md5Str = md5(`msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"msg": msg, "msg": msg,
"timestamp": timestamp, "timestamp": timestamp,
...@@ -279,7 +164,6 @@ export default { ...@@ -279,7 +164,6 @@ export default {
"sign": md5Str "sign": md5Str
} }
if (localStorage.g && localStorage.g != 'undefined') { if (localStorage.g && localStorage.g != 'undefined') {
// postData.groupId = parseInt(JSON.parse(localStorage.g).i)
postData.groupId = 2; postData.groupId = 2;
} }
this.$http.post(apiurl, postData, { this.$http.post(apiurl, postData, {
...@@ -375,6 +259,5 @@ export default { ...@@ -375,6 +259,5 @@ export default {
value = value.replace(this.$commonUtils.Regex.isInteger, ""); value = value.replace(this.$commonUtils.Regex.isInteger, "");
item[filed] = value; item[filed] = value;
} }
} }
} }
import Home from '../components/Home' import Home from '../components/Home'
import Login from '../components/global/Login' import Login from '../components/global/Login'
import Autologin from '../components/global/Autologin' import Autologin from '../components/global/Autologin'
import index from '../components/global/index' import index from '../components/global/index'
export default { export default {
routes: [ routes: [{
{
path: '/login', path: '/login',
name: 'Login', name: 'Login',
component: Login component: Login
...@@ -29,8 +27,7 @@ export default { ...@@ -29,8 +27,7 @@ export default {
meta: { meta: {
title: '首页' title: '首页'
}, },
children: [ children: [{
{
path: '/Home', path: '/Home',
name: 'Home', name: 'Home',
component: Home component: Home
...@@ -86,23 +83,23 @@ export default { ...@@ -86,23 +83,23 @@ export default {
name: 'outboundOperate', name: 'outboundOperate',
component: resolve => require(['@/components/assetsman/outboundOperate'], resolve), component: resolve => require(['@/components/assetsman/outboundOperate'], resolve),
}, },
                { {
                    path: '/outboundDetails',  path: '/outboundDetails',
                    name: 'outboundDetails', name: 'outboundDetails',
                    component: resolve => require(['@/components/assetsman/outboundDetails'], resolve), component: resolve => require(['@/components/assetsman/outboundDetails'], resolve),
            }, },
// 采购列表 // 采购列表
{ {
                    path: '/procurementList',  path: '/procurementList',
                    name: 'procurementList', name: 'procurementList',
                    component: resolve => require(['@/components/assetsman/procurementList'], resolve), component: resolve => require(['@/components/assetsman/procurementList'], resolve),
            }, },
//采购详情 //采购详情
{ {
                    path: '/procurementDetails',  path: '/procurementDetails',
                    name: 'procurementDetails', name: 'procurementDetails',
                    component: resolve => require(['@/components/assetsman/procurementDetails'], resolve), component: resolve => require(['@/components/assetsman/procurementDetails'], resolve),
            }, },
// 派发&退库 // 派发&退库
{ {
path: '/PaiTui', path: '/PaiTui',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment