|
@@ -71,21 +71,21 @@
|
|
|
<span>应收费用</span>
|
|
|
</div>
|
|
|
<el-button type="danger" plain size="small"
|
|
|
- :disabled="!selectionDList.length || detailData.seeDisabled" @click="batchDelete('D')">批量删除</el-button>
|
|
|
+ :disabled="!selectionDList.length || detailData.seeDisabled || pleasereviewType" @click="batchDelete('D')">批量删除</el-button>
|
|
|
<el-button type="success" plain size="small"
|
|
|
- :disabled="!selectionDList.length || detailData.seeDisabled" @click="GenerateBillsfun('D')">应收账单
|
|
|
+ :disabled="!selectionDList.length || detailData.seeDisabled || pleasereviewType" @click="GenerateBillsfun('D')">应收账单
|
|
|
</el-button>
|
|
|
<el-button type="danger" plain size="small"
|
|
|
- :disabled="!selectionDList.length || detailData.seeDisabled" @click="RevokingBillsfun('D')">撤销账单
|
|
|
+ :disabled="!selectionDList.length || detailData.seeDisabled || pleasereviewType" @click="RevokingBillsfun('D')">撤销账单
|
|
|
</el-button>
|
|
|
<el-button type="primary" plain size="small" @click="printingCostsfun('D')">打印账单</el-button>
|
|
|
- <el-button type="success" plain size="small" :disabled="!this.assemblyForm.id || detailData.seeDisabled" @click="templateClick('D')">应收模板</el-button>
|
|
|
- <el-button type="info" plain size="small" :disabled="detailData.seeDisabled" @click="feecenterSubmitListfun">保存账单</el-button>
|
|
|
- <el-button type="primary" plain size="small" :disabled="detailData.seeDisabled" @click="copyfun('D')">生成应付</el-button>
|
|
|
+ <el-button type="success" plain size="small" :disabled="!this.assemblyForm.id || detailData.seeDisabled || pleasereviewType" @click="templateClick('D')">应收模板</el-button>
|
|
|
+ <el-button type="info" plain size="small" :disabled="detailData.seeDisabled || pleasereviewType" @click="feecenterSubmitListfun">保存账单</el-button>
|
|
|
+ <el-button type="primary" plain size="small" :disabled="detailData.seeDisabled || pleasereviewType" @click="copyfun('D')">生成应付</el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="scope">
|
|
|
<el-button type="primary" size="small" icon="el-icon-plus" circle
|
|
|
- :disabled="detailData.seeDisabled" @click="addDfun"></el-button>
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType" @click="addDfun"></el-button>
|
|
|
</template>
|
|
|
<template slot="index" slot-scope="scope">
|
|
|
<span>{{scope.index + 1}}</span>
|
|
@@ -183,12 +183,12 @@
|
|
|
<span>{{row.isTax?'是':'否'}}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.edit" type="number" v-model="row.price" size="small"
|
|
|
+ <el-input v-if="row.edit" type="number" v-model="row.price" size="small" :min="1"
|
|
|
placeholder="请输入" @blur="priceinputfun($event,row)"></el-input>
|
|
|
<span v-else>{{row.price}}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small"
|
|
|
+ <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
|
|
|
placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
|
|
|
<span v-else>{{row.quantity}}</span>
|
|
|
</template>
|
|
@@ -199,8 +199,8 @@
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'D')">保存</el-button>
|
|
|
- <el-button v-else type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled" @click="editDfun(scope.row,scope.index)">编辑</el-button>
|
|
|
- <el-button type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled" @click="deletefun(scope.row,scope.index,'D')">删除</el-button>
|
|
|
+ <el-button v-else type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled || pleasereviewType" @click="editDfun(scope.row,scope.index)">编辑</el-button>
|
|
|
+ <el-button type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled || pleasereviewType" @click="deletefun(scope.row,scope.index,'D')">删除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-card>
|
|
@@ -224,20 +224,35 @@
|
|
|
<span>应付费用</span>
|
|
|
</div>
|
|
|
<el-button type="danger" plain size="small"
|
|
|
- :disabled="!selectionCList.length || detailData.seeDisabled" @click="batchDelete('C')">批量删除</el-button>
|
|
|
+ :disabled="!selectionCList.length || detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="batchDelete('C')">批量删除
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" plain size="small"
|
|
|
- :disabled="!selectionCList.length || detailData.seeDisabled" @click="GenerateBillsfun('C')" >应付账单</el-button>
|
|
|
+ :disabled="!selectionCList.length || detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="GenerateBillsfun('C')" >应付账单
|
|
|
+ </el-button>
|
|
|
<el-button type="danger" plain size="small"
|
|
|
- :disabled="!selectionCList.length || detailData.seeDisabled" @click="RevokingBillsfun('C')">撤销账单
|
|
|
+ :disabled="!selectionCList.length || detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="RevokingBillsfun('C')">撤销账单
|
|
|
</el-button>
|
|
|
<el-button type="primary" plain size="small" @click="printingCostsfun('C')">打印账单</el-button>
|
|
|
- <el-button type="success" plain size="small" :disabled="!this.assemblyForm.id || detailData.seeDisabled" @click="templateClick('C')">应付模板</el-button>
|
|
|
- <el-button type="info" plain size="small" :disabled="detailData.seeDisabled" @click="feecenterSubmitListfun">保存账单</el-button>
|
|
|
- <el-button type="primary" plain size="small" :disabled="detailData.seeDisabled" @click="copyfun('C')">生成应收</el-button>
|
|
|
+ <el-button type="success" plain size="small"
|
|
|
+ :disabled="!this.assemblyForm.id || detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="templateClick('C')">应付模板
|
|
|
+ </el-button>
|
|
|
+ <el-button type="info" plain size="small"
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="feecenterSubmitListfun">保存账单
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" plain size="small"
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType"
|
|
|
+ @click="copyfun('C')">生成应收
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot="indexHeader" slot-scope="scope">
|
|
|
<el-button type="primary" size="small" icon="el-icon-plus" circle
|
|
|
- :disabled="detailData.seeDisabled" @click="addCfun"></el-button>
|
|
|
+ :disabled="detailData.seeDisabled || pleasereviewType" @click="addCfun">
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
<template slot="index" slot-scope="scope">
|
|
|
<span>{{scope.index + 1}}</span>
|
|
@@ -335,12 +350,12 @@
|
|
|
<span>{{row.isTax?'是':'否'}}</span>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.edit" type="number" v-model="row.price" size="small"
|
|
|
+ <el-input v-if="row.edit" type="number" v-model="row.price" size="small" :min="1"
|
|
|
placeholder="请输入" @blur="priceinputfun($event,row)"></el-input>
|
|
|
<span v-else>{{row.price}}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
- <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small"
|
|
|
+ <el-input v-if="row.edit" type="number" v-model="row.quantity" size="small" :min="1"
|
|
|
placeholder="请输入" @blur="quantityinputfun(row)"></el-input>
|
|
|
<span v-else>{{row.quantity}}</span>
|
|
|
</template>
|
|
@@ -351,8 +366,8 @@
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="menu">
|
|
|
<el-button v-if="scope.row.edit" type="text" size="small" @click="savefun(scope.row,scope.index,'C')">保存</el-button>
|
|
|
- <el-button v-else type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled" @click="editCfun(scope.row,scope.index)">编辑</el-button>
|
|
|
- <el-button type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled" @click="deletefun(scope.row,scope.index,'C')">删除</el-button>
|
|
|
+ <el-button v-else type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled || pleasereviewType" @click="editCfun(scope.row,scope.index)">编辑</el-button>
|
|
|
+ <el-button type="text" size="small" :disabled="scope.row.accStatus || detailData.seeDisabled || pleasereviewType" @click="deletefun(scope.row,scope.index,'C')">删除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-card>
|
|
@@ -579,6 +594,11 @@
|
|
|
type:Object
|
|
|
},
|
|
|
detailData:{},
|
|
|
+ // 请核之后禁用
|
|
|
+ pleasereviewType:{
|
|
|
+ type:Boolean,
|
|
|
+ default:false,
|
|
|
+ },
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
@@ -1529,51 +1549,39 @@
|
|
|
},
|
|
|
// 批量删除
|
|
|
batchDelete(dc){
|
|
|
- let arr = []
|
|
|
- if (dc == 'D') {
|
|
|
- for(let item of this.selectionDList) {
|
|
|
- if (item.id) {
|
|
|
- arr.push(item.id)
|
|
|
- }
|
|
|
- }
|
|
|
- }else {
|
|
|
- for(let item of this.selectionCList) {
|
|
|
- if (item.id) {
|
|
|
- arr.push(item.id)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
this.$confirm("确定将选择数据删除?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(()=>{
|
|
|
- if (arr.length != 0) {
|
|
|
- feecenterRemove(arr.join(',')).then(res=>{
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.$emit('billsDetailfun')
|
|
|
- })
|
|
|
- }
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
if (dc == 'D') {
|
|
|
- for (let index = this.selectionDList.length; index >= 0; index--) {
|
|
|
- this.assemblyForm.feeCenterListD.splice(index, 1)
|
|
|
- }
|
|
|
- // for (let item of this.selectionDList) {
|
|
|
- // this.assemblyForm.feeCenterListD.splice(item.$index, 1)
|
|
|
- // }
|
|
|
+ multiList = this.selectionDList
|
|
|
+ arr = this.assemblyForm.feeCenterListD
|
|
|
}else {
|
|
|
- for (let index = this.selectionCList.length; index >= 0; index--) {
|
|
|
- this.assemblyForm.feeCenterListC.splice(index, 1)
|
|
|
+ multiList = this.selectionCList
|
|
|
+ arr = this.assemblyForm.feeCenterListC
|
|
|
+ }
|
|
|
+ // 获取有id 的数据
|
|
|
+ const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
+ let arrIds = itemsWithId.map(item=>item.id) // 获取id 数据
|
|
|
+ // 把选中的删除掉
|
|
|
+ multiList.forEach((item)=>{
|
|
|
+ for (let index in arr) {
|
|
|
+ if (JSON.stringify(item) == JSON.stringify(arr[index])) {
|
|
|
+ arr.splice(Number(index),1)
|
|
|
+ }
|
|
|
}
|
|
|
- // for (let item of this.selectionCList) {
|
|
|
- // this.assemblyForm.feeCenterListC.splice(item.$index, 1)
|
|
|
- // }
|
|
|
+ })
|
|
|
+ // 有id 的处理
|
|
|
+ if(itemsWithId.length != 0) {
|
|
|
+ feecenterRemove(arrIds.join(',')).then(res=>{
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ // this.$emit('billsDetailfun')
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- // this.deletefun({id:arr.join(',')})
|
|
|
},
|
|
|
// 应收删除
|
|
|
deletefun(row,index,dc) {
|