给商品增加图片上传功能,单据增加附件,优化付款收款单

This commit is contained in:
季圣华
2021-07-02 00:52:30 +08:00
parent 9af01678a7
commit ae00d062b2
31 changed files with 566 additions and 252 deletions

View File

@@ -795,6 +795,20 @@
</a-row>
</section>
</template>
<template v-if="fileList.length>0">
<a-row class="form-row" :gutter="24">
<a-col :span="8">
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="附件">
<ul style="list-style-type:none">
<li v-for="(item,index) in fileList" :key="index">
<a :href="item.url" target="_blank">{{item.name}}</a>
</li>
</ul>
</a-form-item>
</a-col>
<a-col :span="16"></a-col>
</a-row>
</template>
</a-form>
</j-modal>
</a-card>
@@ -814,6 +828,7 @@
visible: false,
model: {},
billType: '',
fileList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@@ -1036,6 +1051,20 @@
methods: {
show(record, type) {
this.billType = type
//附件下载
let fileName = record.fileName
if(fileName) {
let fileArr = fileName.split(",")
this.fileList = []
for(let i=0; i<fileArr.length; i++) {
let fileInfo = {}
fileInfo.name= fileArr[i].replace("bill/","")
fileInfo.url= window._CONFIG['domianURL'] + '/systemConfig/static/' + fileArr[i]
this.fileList.push(fileInfo)
}
} else {
this.fileList = []
}
this.visible = true;
this.model = Object.assign({}, record);
this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2)