Commit 51a5cfde authored by Mac's avatar Mac

1

parent 759a1f0d
......@@ -20,6 +20,7 @@
"lockr": "^0.8.5",
"quasar": "^1.0.0",
"relation-graph": "^1.0.8",
"v-viewer": "^1.5.1",
"vue-easytable": "^1.7.2",
"vue-i18n": "^8.0.0",
"xlsx": "^0.16.8",
......
......@@ -12,7 +12,7 @@ export default {
<style>
@import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_vhc2pmigytp.css');
@import url('//at.alicdn.com/t/font_2077629_1d3rshddcgk.css');
html,
body,
......
......@@ -6,10 +6,12 @@ import axios from 'axios'
import 'vue-easytable/libs/themes-base/index.css'
import {VTable,VPagination} from 'vue-easytable'
import commonUtils from '../pages/financial/utils/commonUtils'
import 'viewerjs/dist/viewer.css'
import Viewer from 'v-viewer'
Vue.http = Vue.prototype.$http = axios
Vue.commonUtils = Vue.prototype.$commonUtils=commonUtils
// 时间扩展格式化
Date.prototype.Format = function (fmt) {
var o = {
......@@ -29,7 +31,11 @@ Date.prototype.Format = function (fmt) {
};
Vue.use(ElementUI)
Vue.use(Erpindex)
Vue.use(Viewer,{
defaultOptions: {
zIndex: 9999
}
})
Vue.component(VTable.name, VTable)
Vue.component(VPagination.name, VPagination)
......
......@@ -711,7 +711,9 @@
}, err => {})
},
AuditOrRefund(){
this.MsgBus.$emit('msg');
// this.MsgBus.$emit('msg');
this.$router.go(-1)
},
//点击显示附件
showFileList(item){
......
......@@ -366,7 +366,9 @@
</div>
</template>
<script>
import {
UploadSelfFile
} from '../../../api/common/common'
export default {
data(){
return {
......@@ -478,11 +480,9 @@
this.apipost('Financial_post_SetFundTransfer', this.msg, res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message);
var tempStr = '/financial/CapitalAllocation/' ;
this.$router.push({
name:'CapitalAllocation',
query:{
blank:'y'
}
path: tempStr
});
}else{
this.$message.error(res.data.message);
......@@ -690,27 +690,29 @@
if (!typeOk) return this.$message.error(this.$t('tips.qscWEfile'));
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
let path = "/Upload/Temporary"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
UploadSelfFile('Temporary', file.file, x => {
console.log("xs",x)
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
if (this.inUploadTrue) {
this.inList[this.inUploadIndex].vorcherInos.push({
Content: x.data.FilePath,
Content: x.FileUrl,
ID:0,
Type:fileTypeNumber,
Url:this.domainManager().ViittoFileUrl + x.data.FilePath,
Url:x.FileUrl,
})
} else {
this.outList[this.inUploadIndex].vorcherInos.push({
Content: x.data.FilePath,
Content: x.FileUrl,
ID:0,
Type:fileTypeNumber,
Url:this.domainManager().ViittoFileUrl + x.data.FilePath,
Url:x.FileUrl,
})
}
this.$message.success(thi.$t('fnc.scchenggong'));
this.$message.success(this.$t('tips.scchenggong'));
});
},
deleteUploadFile: function (type, i , ind) { // 删除上传文件
if (type===1) {
......
......@@ -258,37 +258,7 @@ export default{
});
}
},
//上传文件到本地服务器
Vue.prototype.UploadSelfFileT = function (path, files, successCall, ocr) {
if (files && files.length > 0) {
let nameList = new Array()
for (let index = 0; index < files.length; index++) {
nameList.push(this.random_string());
}
let that = this;
co(function* () {
for (let index = 0; index < files.length; index++) {
let fileName = nameList[index]
fileName = path + fileName + "." + files[index].name.split('.').pop()
var formData = new FormData();
var uploadUrl = that.domainManager().UploadUrl + "/Upload?filePath=" + path + '&ocr=' + ocr;
formData.append("myfile", files[index]);
that.$http.post(uploadUrl, formData, {})
.then(res => {
successCall(res);
}).catch(function (reason) {
that.$refs['my-upload'].clearFiles();
that.$message.error('上传失败!');
that.MsgBus.$emit('UploadSelfFileErr')
});
}
}).catch(function (err) {
that.$refs['my-upload'].clearFiles();
that.$message.error('上传失败!');
});
}
},
//价钱格式化,三位数逗号分隔,保留两位小数 duanjun
Vue.prototype.moneyFormat = function (value) {
let nStr = Number(value).toFixed(2)
......
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