[update] 支出合同接口联调;打包、打包成员维护页面;企业选择组件只读

This commit is contained in:
zhaoxiao
2021-09-08 19:16:13 +08:00
parent 5372161e2f
commit dff860c5be
17 changed files with 1604 additions and 48 deletions
@@ -0,0 +1,176 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :xl="12" :sm="24">
<a-form-item label="开票金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入开票金额"
v-decorator="['invoicingAmount',validatorRules.invoicingAmount]"
:maxLength='50'
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
</a-form-item>
</a-col>
<a-col :xl="12" :sm="24">
<a-form-item label="开票号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入开票号"
v-decorator="['invoicingNum', validatorRules.invoicingNum]"
:maxLength='50'
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :xl="12" :sm="24">
<a-form-item label="开票时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择开票时间"
style="width: 100%;"
v-decorator="['invoicingTime', validatorRules.invoicingTime]"
:trigger-change="true"
v-bind="$attrs"
date-format="YYYY-MM-DD"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
<a-textarea
placeholder="请输入备注"
v-decorator="['remarks']"
:auto-size="{ minRows: 3, maxRows: 6 }"
:maxLength='200'
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
</a-form-item>
</a-col>
</a-row>
</a-form>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:loading="loading"
class="j-table-force-nowrap">
<template slot="text" slot-scope="text">
<j-ellipsis :value="text" :length="18"></j-ellipsis>
</template>
</a-table>
</a-spin>
</j-modal>
</template>
<script>
import JDate from '../../../components/tools/JDate'
import { money } from '../../../utils/validate'
export default {
name: 'BatchInvoicingModule',
components: { JDate },
data() {
return {
title: '批量开票',
width: 1000,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 }
},
remarksLabelCol: {
xs: { span: 24 },
sm: { span: 3 }
},
remarksWrapperCol: {
xs: { span: 24 },
sm: { span: 21 }
},
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '打包项目名称',
align: 'center',
dataIndex: 'chargeProject',
scopedSlots: { customRender: 'projectName' }
}
],
dataSource: [],
loading: false,
validatorRules: {
invoicingAmount: {
rules: [{ required: true, validator: this.checkMoney }],
validateTrigger: 'blur'
},
invoicingNum: {
rules: [{ required: true, message: '请输入开票号' }],
validateTrigger: 'blur'
},
invoicingTime: {
rules: [{ required: true, message: '请选择开票时间' }],
validateTrigger: 'blur'
},
}
}
},
methods: {
handleOk() {
},
handleCancel() {
this.close()
},
open() {
this.visible = true
},
close() {
this.visible = false
},
/**
* 校验金额格式
* @param rules
* @param value
* @param callback
*/
checkMoney(rules, value, callback) {
if (value) {
if (money(value)) {
callback()
return
}
callback('请输入正确格式的金额')
}
callback('请输入开票金额')
}
}
}
</script>
<style scoped>
</style>