|
@@ -8,7 +8,6 @@
|
|
|
<data-time-query
|
|
|
:query="query"
|
|
|
style="width:100%"
|
|
|
- @change="onSearchBtnClick"
|
|
|
></data-time-query>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -21,7 +20,6 @@
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="输入供应商全名或缩写"
|
|
|
- @change="onSearchBtnClick"
|
|
|
></my-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -31,9 +29,7 @@
|
|
|
<my-select
|
|
|
v-model="query.tagApplyStateId"
|
|
|
:options="optionGroup.TagApplyState ? optionGroup.TagApplyState.list : []"
|
|
|
- @change="onSearchBtnClick"
|
|
|
>
|
|
|
- <el-option label="全部" value=""></el-option>
|
|
|
</my-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -83,6 +79,7 @@
|
|
|
@click="onExportTemplateBtnClick"
|
|
|
>下载模版</el-button>
|
|
|
<el-button
|
|
|
+ v-if="query.tagApplyStateId === '0'"
|
|
|
:disabled="selectedList.length === 0"
|
|
|
icon="el-icon-check"
|
|
|
plain
|
|
@@ -92,6 +89,7 @@
|
|
|
@click="onConfirmOrderBtnClick"
|
|
|
>确认订单</el-button>
|
|
|
<el-button
|
|
|
+ v-if="query.tagApplyStateId === '1'"
|
|
|
:disabled="selectedList.length === 0"
|
|
|
icon="el-icon-check"
|
|
|
plain
|
|
@@ -182,13 +180,14 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
label="操作栏"
|
|
|
- min-width="80"
|
|
|
+ min-width="120"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
>
|
|
|
<template v-slot="{ row }">
|
|
|
<div class="flex center layout-gap">
|
|
|
<edit-button :data="row" :on-click="onOpenDetailEditorBtnClick" icon="el-icon-tickets">详情</edit-button>
|
|
|
+ <edit-button :data="row" :on-click="onDeleteBtnClick" :disabled="row.tagApplyStateId!=='0'&& row.tagApplyStateId!=='1'" icon="el-icon-delete">删除</edit-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -242,7 +241,10 @@ export default {
|
|
|
this.loadList()
|
|
|
},
|
|
|
onExportOrderBtnClick () {
|
|
|
- this.$refs.orderExportDialog.open(this.selectedData)
|
|
|
+ this.$$request(TagApply.$$api.getDetail, this.selectedData, this)
|
|
|
+ .then(data => {
|
|
|
+ this.$refs.orderExportDialog.open(data)
|
|
|
+ }).catch(console.error).finally(() => {})
|
|
|
},
|
|
|
onExportTemplateBtnClick () {
|
|
|
this.$refs.dialogExportTemplate.open()
|
|
@@ -250,28 +252,20 @@ export default {
|
|
|
onConfirmPayBtnClick () {
|
|
|
const { selectedList } = this
|
|
|
const { $$idProp } = this
|
|
|
- const ids = []
|
|
|
- selectedList.forEach(data => {
|
|
|
- if (data.tagApplyStateId === '1') {
|
|
|
- ids.push(data.id)
|
|
|
+ this.$$api.confirmPay(selectedList.map(data => data[$$idProp])).then((flag) => {
|
|
|
+ if (flag) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ position: 'bottom-right'
|
|
|
+ })
|
|
|
+ this.loadList()
|
|
|
}
|
|
|
- })
|
|
|
- if (ids.length > 0) {
|
|
|
- this.$$api.confirmPay(selectedList.map(data => data[$$idProp])).then((flag) => {
|
|
|
- if (flag) {
|
|
|
- this.$notify({
|
|
|
- title: '成功',
|
|
|
- message: '操作成功',
|
|
|
- type: 'success',
|
|
|
- position: 'bottom-right'
|
|
|
- })
|
|
|
- this.loadList()
|
|
|
- }
|
|
|
- }).catch(console.error).finally(() => {})
|
|
|
- }
|
|
|
+ }).catch(console.error).finally(() => {})
|
|
|
},
|
|
|
tagSelectAble (row) {
|
|
|
- return row.tagApplyStateId === '0' || row.tagApplyStateId === '1'
|
|
|
+ return row.tagApplyStateId === this.query.tagApplyStateId
|
|
|
},
|
|
|
onOpenDetailEditorBtnClick (data) {
|
|
|
this.$$request(TagApply.$$api.getDetail, data, this)
|
|
@@ -281,25 +275,34 @@ export default {
|
|
|
},
|
|
|
onConfirmOrderBtnClick () {
|
|
|
const { selectedList } = this
|
|
|
- const ids = []
|
|
|
- selectedList.forEach(data => {
|
|
|
- if (data.tagApplyStateId === '0') {
|
|
|
- ids.push(data.id)
|
|
|
+ const { $$idProp } = this
|
|
|
+ this.$$api.confirmOrder(selectedList.map(data => data[$$idProp])).then((flag) => {
|
|
|
+ if (flag) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ position: 'bottom-right'
|
|
|
+ })
|
|
|
+ this.loadList()
|
|
|
}
|
|
|
- })
|
|
|
- if (ids.length > 0) {
|
|
|
- this.$$api.confirmOrder(ids).then((flag) => {
|
|
|
- if (flag) {
|
|
|
- this.$notify({
|
|
|
- title: '成功',
|
|
|
- message: '操作成功',
|
|
|
- type: 'success',
|
|
|
- position: 'bottom-right'
|
|
|
- })
|
|
|
- this.loadList()
|
|
|
- }
|
|
|
- }).catch(console.error).finally(() => {})
|
|
|
- }
|
|
|
+ }).catch(console.error).finally(() => {})
|
|
|
+ },
|
|
|
+ onDeleteBtnClick (data) {
|
|
|
+ this.$confirm(`此操作将删除该记录, 是否继续?`, '确认', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ confirmButtonClass: 'confirm-dialog-confirm-btn',
|
|
|
+ cancelButtonClass: 'confirm-dialog-cancel-btn',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$$request(TagApply.$$api.delete, data, this)
|
|
|
+ .then(flag => {
|
|
|
+ if (flag) {
|
|
|
+ this.loadList()
|
|
|
+ }
|
|
|
+ }).catch(console.error).finally(() => {})
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|