| | |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;">财务上报</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" @click="$refs.ValueTable.openUpload()" v-if="inPower"> |
| | | <i class="el-icon-upload2" style="color: #3A7BFA;"></i> |
| | | <span style="color: #3A7BFA;">导入</span> |
| | | </el-button> |
| | | <el-button size="medium" @click="$refs.ValueTable.openDownDia()" v-if="outPower"> |
| | | <i class="el-icon-download" style="color: #3A7BFA;"></i> |
| | | <span style="color: #3A7BFA;">导出</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">系统日期:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="选择日期" |
| | | value-format="yyyy-MM-dd HH:mm:ss" clearable></el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">账户名:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" v-model="componentData.entity.name" clearable placeholder="账户名" @keyup.enter.native="refreshTable()"></el-input> |
| | | <el-input size="small" v-model="componentData.entity.name" clearable placeholder="账户名" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.dataReporting.selectFinanceSubmitList" :upUrl="$api.dataReporting.updateFinanceSubmit" :delUrl="$api.dataReporting.delFinanceSubmit" :componentData="componentData" :key="upIndex"/> |
| | | <ValueTable ref="ValueTable" :url="$api.dataReporting.selectFinanceSubmitList" |
| | | :upUrl="$api.dataReporting.updateFinanceSubmit" :delUrl="$api.dataReporting.delFinanceSubmit" |
| | | :componentData="componentData" :key="upIndex" :downUrl="$api.dataReporting.downFinanceSubmitFile" :inputUrl="$api.dataReporting.inputFinanceSubmitCsv"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | componentData: { |
| | | entity: { |
| | | name: null, |
| | | createTime: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | |
| | | product: { |
| | | select: [] |
| | | }, |
| | | custom: {select: []} |
| | | custom: { |
| | | select: [] |
| | | } |
| | | }, |
| | | requiredAdd: ['company', 'name', 'employeeRebate'], |
| | | requiredUp: ['company', 'name', 'employeeRebate'] |
| | |
| | | upIndex: 0, |
| | | product: [], |
| | | custom: [], |
| | | addPower: true |
| | | addPower: true, |
| | | inPower: true, |
| | | outPower: true |
| | | } |
| | | }, |
| | | created() { |
| | | var today = new Date(); |
| | | var yyyy = today.getFullYear(); |
| | | var mm = today.getMonth() + 1; |
| | | var dd = today.getDate() |
| | | if (dd < 10) { |
| | | dd = "0" + dd; |
| | | } |
| | | if (mm < 10) { |
| | | mm = "0" + mm; |
| | | } |
| | | this.componentData.entity.createTime = this.HaveJson(`${yyyy}-${mm}-${dd} 00:00:00`) |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | let inPower = false |
| | | let outPower = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if(power[i].menuMethod=='updateFinanceSubmit'){ |
| | | up = true |
| | |
| | | if(power[i].menuMethod=='addFinanceSubmit'){ |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'inputFinanceSubmitCsv') { |
| | | inPower = true |
| | | } |
| | | if (power[i].menuMethod == 'downFinanceSubmitFile') { |
| | | outPower = true |
| | | } |
| | | } |
| | | if(!del){ |
| | | this.componentData.do.splice(1, 1) |
| | |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.inPower = inPower |
| | | this.outPower = outPower |
| | | } |
| | | } |
| | | } |