Commit 2e3648bd by chenwq

删除

1 parent 624a6e01
<template>
<div>
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" btnOkLabel="关闭" noCancel="true" @closeDialog="handleClose" @confirmDialog="handleClose">
<d2-dialog title="系统对账单" :is-visible="billVisible" class="privacyDailog" width="80%" btnOkLabel="返回" :noCancel="noCancel" @closeDialog="handleClose" @confirmDialog="handleClose">
<el-table :data="tableList" style="width: 100%" ref="billMutiTable" show-summary :summary-method="getSummaries" :span-method="arraySpanMethod" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column v-for="(item, idx) in tableHeader" :key="idx" :label="item.moduleName">
......@@ -108,6 +108,7 @@ export default {
data() {
return {
isEdit: false,
noCancel: true,
billTypeStr: 'traffic',
tmplFieldsList: [],
tableHeader: [],
......
......@@ -31,7 +31,7 @@
</div>
<!-- 选择输入组合框 -->
<div v-else-if="subItem.editType === 'selectInput'">
<div v-else-if="subItem.editType == 'selectInput'">
<div class="select-input-container">
<el-input placeholder="请输入" v-model.trim="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.inputField]" :clearable="item.isClear || false" :maxlength="item.maxlength || ''" class="input-with-select" @blur="billCompute(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.inputField) }">
<el-select v-model="scope.row[subItem.extInfo.source || 'ORDER'][subItem.editObj.selectField]" style="width: 90px" :popper-append-to-body="false" slot="prepend" placeholder="请选择" @change="handleSelectInputChange(scope.$index, subItem)" :class="{ 'is-error': hasError(scope.$index, subItem.extInfo.source || 'ORDER', subItem.editObj.selectField) }">
......@@ -54,6 +54,11 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<DynamicAddTable ref="dynamicAdd" :adjustments="adjustments" @handleInputBlur="billCompute"></DynamicAddTable>
<div>总金额:{{total}}元</div>
......@@ -396,7 +401,7 @@ export default {
sceneType: this.sceneType
}
console.log(dynamicForm)
editBill({json: JSON.stringify(dynamicForm)}).then(res => {
editBill({ json: JSON.stringify(dynamicForm) }).then(res => {
this.$message.success("操作成功")
this.$emit('handleConfirm')
})
......@@ -610,6 +615,21 @@ export default {
}
},
handleDelete(rowIndex, row) {
if(this.tableList.length == 1) {
this.$message.error("至少选择一个")
return true
}
const orderCode = row.ORDER.orderCode
let list = []
this.tableList.forEach(item => {
if(item.ORDER.orderCode != orderCode) {
list.push(item)
}
})
this.tableList = deepClone(list)
},
// 输入框
selectAddAttr(val, rowIndex, fieldConfig) {
this[fieldConfig.editObj.fn(val, rowIndex, fieldConfig)]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!