|
|
@@ -7,7 +7,8 @@
|
|
|
switchFullscreen
|
|
|
@ok="handleOk"
|
|
|
@cancel="handleCancel"
|
|
|
- cancelText="关闭">
|
|
|
+ cancelText="关闭"
|
|
|
+ :footer="null">
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
<a-form :form="form">
|
|
|
|
|
|
@@ -39,7 +40,12 @@
|
|
|
:beforeUpload="beforeUpload1"
|
|
|
@change="handleChange1"
|
|
|
>
|
|
|
- <div>
|
|
|
+ <div style="display: flex;flex-direction: row;justify-content: center" v-if="hlwImgList1.length>0" >
|
|
|
+ <div style="padding-left: 10px" v-for="(item, index) in hlwImgList1" :key="index">
|
|
|
+ <img :src="getAvatarView(hlwImgList1[index])" alt="头像" style="height:104px;max-width:300px"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
<a-icon :type="'plus'" />
|
|
|
<div class="ant-upload-text">上传</div>
|
|
|
</div>
|
|
|
@@ -57,7 +63,7 @@
|
|
|
<a-input v-decorator="['invoiceNumber', validatorRules.invoiceNumber]" placeholder="请输入发票号码"></a-input>
|
|
|
</a-form-item>
|
|
|
|
|
|
- <a-form-item label="发票照片" :labelCol="labelCol" :wrapperCol="wrapperCol" :required="true">
|
|
|
+ <a-form-item label="发票照片" :labelCol="labelCol" :wrapperCol="wrapperCol" :required="true">
|
|
|
<a-upload
|
|
|
listType="picture-card"
|
|
|
class="avatar-uploader"
|
|
|
@@ -68,7 +74,12 @@
|
|
|
:beforeUpload="beforeUpload"
|
|
|
@change="handleChange"
|
|
|
>
|
|
|
- <div>
|
|
|
+ <div style="display: flex;flex-direction: row;justify-content: center" v-if="hlwImgList.length>0" >
|
|
|
+ <div style="padding-left: 10px" v-for="(item, index) in hlwImgList" :key="index">
|
|
|
+ <img :src="getAvatarView(hlwImgList[index])" alt="头像" style="height:104px;max-width:300px"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
<a-icon :type="'plus'" />
|
|
|
<div class="ant-upload-text">上传</div>
|
|
|
</div>
|
|
|
@@ -81,6 +92,10 @@
|
|
|
|
|
|
</a-form>
|
|
|
</a-spin>
|
|
|
+ <div v-if="model.type!=1" class="drawer-bootom-button">
|
|
|
+ <a-button class="ant-btn" @click="handleCancel">取消</a-button>
|
|
|
+ <a-button class="ant-btn ant-btn-primary" style="margin-left: 8px" @click="handleOk">确定</a-button>
|
|
|
+ </div>
|
|
|
</j-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -102,6 +117,8 @@
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ hlwImgList:[],
|
|
|
+ hlwImgList1:[],
|
|
|
canClick:true,
|
|
|
headers:{},
|
|
|
fileList: [],
|
|
|
@@ -162,13 +179,24 @@
|
|
|
this.canClick=true
|
|
|
this.fileList=[]
|
|
|
this.fileList1=[]
|
|
|
+ this.hlwImgList=[]
|
|
|
+ this.hlwImgList1=[]
|
|
|
this.form.resetFields();
|
|
|
this.model = Object.assign({}, record);
|
|
|
+ if(this.model.invoice!=null){
|
|
|
+ this.hlwImgList=this.model.invoice.split(',')
|
|
|
+ }
|
|
|
+ if(this.model.serviceInvoice!=null){
|
|
|
+ this.hlwImgList1=this.model.serviceInvoice.split(',')
|
|
|
+ }
|
|
|
this.visible = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.form.setFieldsValue(pick(this.model,'amount','invoiceNumber','serviceInvoiceNumber','invoice','sysOrgCode','uploadTime','uploadBy'))
|
|
|
})
|
|
|
},
|
|
|
+ getAvatarView(img){
|
|
|
+ return this.url.imgerver + img;
|
|
|
+ },
|
|
|
close () {
|
|
|
this.$emit('close');
|
|
|
this.visible = false;
|
|
|
@@ -364,4 +392,17 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+ .drawer-bootom-button {
|
|
|
+ position: absolute;
|
|
|
+ bottom: -8px;
|
|
|
+ width: 100%;
|
|
|
+ border-top: 1px solid #e8e8e8;
|
|
|
+ padding: 10px 16px;
|
|
|
+ text-align: right;
|
|
|
+ left: 0;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 0 0 2px 2px;
|
|
|
+ }
|
|
|
+</style>
|