|
@@ -8,7 +8,6 @@
|
|
<data-time-query
|
|
<data-time-query
|
|
:query="query"
|
|
:query="query"
|
|
style="width:100%"
|
|
style="width:100%"
|
|
- @change="onSearchBtnClick"
|
|
|
|
></data-time-query>
|
|
></data-time-query>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -21,7 +20,6 @@
|
|
filterable
|
|
filterable
|
|
clearable
|
|
clearable
|
|
placeholder="输入供应商全名或缩写"
|
|
placeholder="输入供应商全名或缩写"
|
|
- @change="onSearchBtnClick"
|
|
|
|
></my-select>
|
|
></my-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -31,9 +29,7 @@
|
|
<my-select
|
|
<my-select
|
|
v-model="query.tagApplyStateId"
|
|
v-model="query.tagApplyStateId"
|
|
:options="optionGroup.TagApplyState ? optionGroup.TagApplyState.list : []"
|
|
:options="optionGroup.TagApplyState ? optionGroup.TagApplyState.list : []"
|
|
- @change="onSearchBtnClick"
|
|
|
|
>
|
|
>
|
|
- <el-option label="全部" value=""></el-option>
|
|
|
|
</my-select>
|
|
</my-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -83,6 +79,7 @@
|
|
@click="onExportTemplateBtnClick"
|
|
@click="onExportTemplateBtnClick"
|
|
>下载模版</el-button>
|
|
>下载模版</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="query.tagApplyStateId === '0'"
|
|
:disabled="selectedList.length === 0"
|
|
:disabled="selectedList.length === 0"
|
|
icon="el-icon-check"
|
|
icon="el-icon-check"
|
|
plain
|
|
plain
|
|
@@ -92,6 +89,7 @@
|
|
@click="onConfirmOrderBtnClick"
|
|
@click="onConfirmOrderBtnClick"
|
|
>确认订单</el-button>
|
|
>确认订单</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="query.tagApplyStateId === '1'"
|
|
:disabled="selectedList.length === 0"
|
|
:disabled="selectedList.length === 0"
|
|
icon="el-icon-check"
|
|
icon="el-icon-check"
|
|
plain
|
|
plain
|
|
@@ -182,13 +180,14 @@
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作栏"
|
|
label="操作栏"
|
|
- min-width="80"
|
|
|
|
|
|
+ min-width="120"
|
|
header-align="center"
|
|
header-align="center"
|
|
align="center"
|
|
align="center"
|
|
>
|
|
>
|
|
<template v-slot="{ row }">
|
|
<template v-slot="{ row }">
|
|
<div class="flex center layout-gap">
|
|
<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="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>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -242,7 +241,10 @@ export default {
|
|
this.loadList()
|
|
this.loadList()
|
|
},
|
|
},
|
|
onExportOrderBtnClick () {
|
|
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 () {
|
|
onExportTemplateBtnClick () {
|
|
this.$refs.dialogExportTemplate.open()
|
|
this.$refs.dialogExportTemplate.open()
|
|
@@ -250,28 +252,20 @@ export default {
|
|
onConfirmPayBtnClick () {
|
|
onConfirmPayBtnClick () {
|
|
const { selectedList } = this
|
|
const { selectedList } = this
|
|
const { $$idProp } = 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) {
|
|
tagSelectAble (row) {
|
|
- return row.tagApplyStateId === '0' || row.tagApplyStateId === '1'
|
|
|
|
|
|
+ return row.tagApplyStateId === this.query.tagApplyStateId
|
|
},
|
|
},
|
|
onOpenDetailEditorBtnClick (data) {
|
|
onOpenDetailEditorBtnClick (data) {
|
|
this.$$request(TagApply.$$api.getDetail, data, this)
|
|
this.$$request(TagApply.$$api.getDetail, data, this)
|
|
@@ -281,25 +275,34 @@ export default {
|
|
},
|
|
},
|
|
onConfirmOrderBtnClick () {
|
|
onConfirmOrderBtnClick () {
|
|
const { selectedList } = this
|
|
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(() => {})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|