|
@@ -229,15 +229,32 @@
|
|
|
</el-menu>
|
|
|
<div style="margin:10px">
|
|
|
<el-button
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ type="danger"
|
|
|
+ v-if="cancelButton === true"
|
|
|
+ size="mini"
|
|
|
+ @click="cancel"
|
|
|
+ >返回列表
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ icon="el-icon-arrow-left"
|
|
|
+ type="danger"
|
|
|
+ v-if="cancelButton === false"
|
|
|
+ size="mini" @click="homePage"
|
|
|
+ >返回首页
|
|
|
+ </el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
@click="addList"
|
|
|
v-if="invoiceInfo"
|
|
|
>新行</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
+ type="warning"
|
|
|
+ size="mini"
|
|
|
@click="innerVisible = true"
|
|
|
v-if="feeInfo"
|
|
|
:disabled="doNot"
|
|
@@ -245,12 +262,18 @@
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- size="small"
|
|
|
+ size="mini"
|
|
|
@click=""
|
|
|
v-if="feeInfo"
|
|
|
:disabled="doNot"
|
|
|
>生成发票</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ :disabled="doNot"
|
|
|
+ @click="submit"
|
|
|
+ >保 存</el-button>
|
|
|
</div>
|
|
|
<el-table
|
|
|
v-if="feeInfo"
|
|
@@ -305,22 +328,57 @@
|
|
|
:fixed="item.fixed"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.fMblno" v-if="item.label == 'fMblno'"/>
|
|
|
- <el-input v-model="scope.row.fBscorpno" v-if="item.label == 'fBscorpno'"/>
|
|
|
- <el-input v-model="scope.row.fProductName" v-if="item.label == 'fProductName'"/>
|
|
|
- <el-input v-model="scope.row.fBsdate" v-if="item.label == 'fBsdate'"/>
|
|
|
- <el-input v-model="scope.row.fFeeName" v-if="item.label == 'fFeeName'"/>
|
|
|
- <el-input v-model="scope.row.fSrcdc" v-if="item.label == 'fSrcdc'"/>
|
|
|
- <el-input v-model="scope.row.fBilltype" v-if="item.label == 'fBilltype'"/>
|
|
|
- <el-input v-model="scope.row.fBusinessType" v-if="item.label == 'fBusinessType'"/>
|
|
|
- <el-input v-model="scope.row.fAmtdr" v-if="item.label == 'fAmtdr'"/>
|
|
|
- <el-input v-model="scope.row.fAmt" v-if="item.label == 'fAmt'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
- <el-input v-model="scope.row.fRemarks" v-if="item.label == 'fRemarks'"/>
|
|
|
+ <el-select
|
|
|
+ :disabled="notChange"
|
|
|
+ v-model="scope.row.fFeeName"
|
|
|
+ @change="changeId"
|
|
|
+ v-if="item.label == 'fFeeName'"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in fCNameOptions"
|
|
|
+ :key="dict.fId"
|
|
|
+ :label="dict.fName"
|
|
|
+ :value="dict.fId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.fModel" v-if="item.label == 'fModel'"/>
|
|
|
+ <el-select :disabled="notChange" v-model="scope.row.fSbu" v-if="item.label == 'fSbu'">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in unitOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.fNumber" @change="priceTotal"
|
|
|
+ v-if="item.label == 'fNumber'"
|
|
|
+ />
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.fUnitprice" @change="priceTotal"
|
|
|
+ v-if="item.label == 'fUnitprice'"
|
|
|
+ />
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.fMoney" disabled v-if="item.label == 'fMoney'"/>
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.fTaxrate" @change="priceTotal"
|
|
|
+ v-if="item.label == 'fTaxrate'"
|
|
|
+ />
|
|
|
+ <el-input v-model="scope.row.fTax" disabled v-if="item.label == 'fTax'"/>
|
|
|
+ <el-input v-model="scope.row.fAmount" disabled v-if="item.label == 'fAmount'"/>
|
|
|
+ <el-select :disabled="notChange" v-model="scope.row.fStatus" v-if="item.label == 'fStatus'">
|
|
|
+ <el-option label="是" value="0"/>
|
|
|
+ <el-option label="否" value="1"/>
|
|
|
+ </el-select>
|
|
|
+ <el-input :disabled="notChange" v-model="scope.row.remarks" v-if="item.label == 'remarks'"/>
|
|
|
+ <el-input v-model="scope.row.createBy" disabled v-if="item.label == 'createBy'"/>
|
|
|
+ <el-date-picker :disabled="notChange" v-model="scope.row.createTime" style="width:100%" type="date"
|
|
|
+ placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
+ v-if="item.label == 'createTime'"
|
|
|
+ />
|
|
|
+ <el-input v-model="scope.row.updateBy" disabled
|
|
|
+ v-if="item.label == 'updateBy' && scope.row.fStatus == '0'"
|
|
|
+ />
|
|
|
+ <el-date-picker :disabled="notChange" v-model="scope.row.updateTime" style="width:100%" type="date"
|
|
|
+ placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
+ v-if="item.label == 'updateTime' && scope.row.fStatus == '0'"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -608,10 +666,6 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <div slot="footer" class="dialog-footer" style="margin:20px;float: right">
|
|
|
-
|
|
|
- <el-button type="primary" :disabled="doNot" @click="submit">保 存</el-button>
|
|
|
- </div>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
@@ -622,6 +676,7 @@ import Cookies from 'js-cookie'
|
|
|
import { listCharge, listCharges } from '@/api/finance/charge'
|
|
|
import { addSet, select } from '@/api/system/set'
|
|
|
import draggable from "vuedraggable";
|
|
|
+import { listFees } from '@/api/finance/applyForInvoice/chargeInvoice'
|
|
|
|
|
|
Vue.directive("dialogDrag", {
|
|
|
bind(el, binding, vnode, oldVnode) {
|
|
@@ -687,6 +742,10 @@ export default {
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
+ unitOptions:[],
|
|
|
+ fCNameOptions:[],
|
|
|
+ notChange: false,
|
|
|
+ cancelButton:true,
|
|
|
form:{
|
|
|
|
|
|
},
|
|
@@ -774,117 +833,110 @@ export default {
|
|
|
],
|
|
|
tableDate2: [
|
|
|
{
|
|
|
- surface: "1",
|
|
|
- label: "fMblno",
|
|
|
- name: "货物或应税劳务、服务名称",
|
|
|
+ surface: '1',
|
|
|
+ label: 'fFeeName',
|
|
|
+ name: '货物或应税劳务、服务名称',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "2",
|
|
|
- label: "fBscorpno",
|
|
|
- name: "规格型号",
|
|
|
+ surface: '2',
|
|
|
+ label: 'fModel',
|
|
|
+ name: '规格型号',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "3",
|
|
|
- label: "fProductName",
|
|
|
- name: "单位",
|
|
|
+ surface: '3',
|
|
|
+ label: 'fSbu',
|
|
|
+ name: '单位',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "4",
|
|
|
- label: "fBsdate",
|
|
|
- name: "数量",
|
|
|
+ surface: '4',
|
|
|
+ label: 'fNumber',
|
|
|
+ name: '数量',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "5",
|
|
|
- label: "fFeeName",
|
|
|
- name: "单价(含税)",
|
|
|
+ surface: '5',
|
|
|
+ label: 'fUnitprice',
|
|
|
+ name: '单价(含税)',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "6",
|
|
|
- label: "fSrcdc",
|
|
|
- name: "收/付",
|
|
|
+ surface: '6',
|
|
|
+ label: 'fMoney',
|
|
|
+ name: '金额(含税)',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "7",
|
|
|
- label: "fBilltype",
|
|
|
- name: "金额(含税)",
|
|
|
+ surface: '7',
|
|
|
+ label: 'fTaxrate',
|
|
|
+ name: '税率(%)',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "8",
|
|
|
- label: "fBusinessType",
|
|
|
- name: "税率",
|
|
|
+ surface: '8',
|
|
|
+ label: 'fTax',
|
|
|
+ name: '税额',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
- },
|
|
|
- {
|
|
|
- surface: "9",
|
|
|
- label: "fAmtdr",
|
|
|
- name: "税额",
|
|
|
- checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "10",
|
|
|
- label: "fAmt",
|
|
|
- name: "合计金额",
|
|
|
+ surface: '9',
|
|
|
+ label: 'fAmount',
|
|
|
+ name: '合计金额(元)',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "11",
|
|
|
- label: "fRemarks",
|
|
|
- name: "作废状态",
|
|
|
+ surface: '10',
|
|
|
+ label: 'fStatus',
|
|
|
+ name: '作废状态',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "12",
|
|
|
- label: "fRemarks",
|
|
|
- name: "备注",
|
|
|
+ surface: '11',
|
|
|
+ label: 'remarks',
|
|
|
+ name: '备注',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "13",
|
|
|
- label: "fRemarks",
|
|
|
- name: "录入人",
|
|
|
+ surface: '12',
|
|
|
+ label: 'createBy',
|
|
|
+ name: '录入人',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "14",
|
|
|
- label: "fRemarks",
|
|
|
- name: "录入时间",
|
|
|
+ surface: '13',
|
|
|
+ label: 'createTime',
|
|
|
+ name: '录入时间',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "15",
|
|
|
- label: "fRemarks",
|
|
|
- name: "作废人",
|
|
|
+ surface: '14',
|
|
|
+ label: 'updateBy',
|
|
|
+ name: '作废人',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- surface: "16",
|
|
|
- label: "fRemarks",
|
|
|
- name: "作废时间",
|
|
|
+ surface: '15',
|
|
|
+ label: 'updateTime',
|
|
|
+ name: '作废时间',
|
|
|
checked: 0,
|
|
|
- width: 100,
|
|
|
- },
|
|
|
+ width: 100
|
|
|
+ }
|
|
|
],
|
|
|
setRowList: [],
|
|
|
getRowList: [],
|
|
@@ -916,8 +968,16 @@ export default {
|
|
|
this.getRowList = this.tableDate;
|
|
|
this.setRowList2 = this.tableDate2;
|
|
|
this.getRowList2 = this.tableDate2;
|
|
|
+ if (Cookies.get('sysType') == 3) {
|
|
|
+ this.getDicts('data_unitfees').then((response) => {
|
|
|
+ if (response.data) {
|
|
|
+ this.unitOptions = response.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
this.getRow();
|
|
|
this.getRow2();
|
|
|
+ this.feeName()
|
|
|
},
|
|
|
activated() {
|
|
|
if(this.$route.query.data){
|
|
@@ -929,6 +989,51 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ changeId() {
|
|
|
+ for (let item in this.invoiceList) {
|
|
|
+ this.invoiceList[item].fFeeid = this.invoiceList[item].fFeeName
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //金额(含税)
|
|
|
+ priceTotal() {
|
|
|
+ for (let li in this.invoiceList) {
|
|
|
+ if (this.invoiceList[li].fNumber || this.invoiceList[li].fUnitprice) {
|
|
|
+ this.$set(this.invoiceList[li], 'fMoney', (this.invoiceList[li].fNumber * this.invoiceList[li].fUnitprice).toFixed(2))
|
|
|
+ }
|
|
|
+ if (this.invoiceList[li].fTaxrate && this.invoiceList[li].fNumber
|
|
|
+ || this.invoiceList[li].fTaxrate && this.invoiceList[li].fUnitprice
|
|
|
+ || this.invoiceList[li].fNumber && this.invoiceList[li].fUnitprice) {
|
|
|
+ this.$set(this.invoiceList[li], 'fTax', (this.invoiceList[li].fMoney * (this.invoiceList[li].fTaxrate / 100) / (1 + this.invoiceList[li].fTaxrate / 100)).toFixed(2))
|
|
|
+ if (this.invoiceList[li].fMoney && this.invoiceList[li].fTax) {
|
|
|
+ this.$set(this.invoiceList[li], 'fAmount', (this.invoiceList[li].fMoney - this.invoiceList[li].fTax).toFixed(2))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取服务费名称
|
|
|
+ feeName() {
|
|
|
+ let query = { pageNum: 1, fDc: 'C' }
|
|
|
+ listFees(query).then((response) => {
|
|
|
+ this.fCNameOptions = response.rows
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.$confirm("返回列表,是否保存?", "提示", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.submit(Cookies.get("sysType"))
|
|
|
+ this.$router.push({path:'/finance/controlOverInvoices/invoice'})
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.mainTable = false
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
submit(){
|
|
|
|
|
|
},
|