|
@@ -58,7 +58,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getList, add, update, remove, getDetail } from '@/api/order/address'
|
|
|
|
|
|
+import { getList, add, update, getDetail } from '@/api/order/address'
|
|
import { getCustomerList } from '@/api/common/index'
|
|
import { getCustomerList } from '@/api/common/index'
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import RegionCascader from '@/components/region-cascader'
|
|
import RegionCascader from '@/components/region-cascader'
|
|
@@ -734,63 +734,6 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 删除
|
|
|
|
- * @param {CustomerAddressItem} row - 行数据
|
|
|
|
- * @param {number} index - 行索引
|
|
|
|
- * @returns {Promise<void>}
|
|
|
|
- */
|
|
|
|
- async rowDel(row, index) {
|
|
|
|
- try {
|
|
|
|
- await this.$confirm('确定将选择数据删除?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- })
|
|
|
|
- await remove(row.id)
|
|
|
|
- this.onLoad(this.page)
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '操作成功!'
|
|
|
|
- })
|
|
|
|
- } catch (error) {
|
|
|
|
- // 用户取消删除或删除失败
|
|
|
|
- if (error !== 'cancel') {
|
|
|
|
- window.console.log(error)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 批量删除
|
|
|
|
- * @returns {Promise<void>}
|
|
|
|
- */
|
|
|
|
- async handleDelete() {
|
|
|
|
- if (this.selectionList.length === 0) {
|
|
|
|
- this.$message.warning('请选择至少一条数据')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- try {
|
|
|
|
- await this.$confirm('确定将选择数据删除?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- })
|
|
|
|
- await remove(this.ids)
|
|
|
|
- this.onLoad(this.page)
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '操作成功!'
|
|
|
|
- })
|
|
|
|
- this.$refs.crud.toggleSelection()
|
|
|
|
- } catch (error) {
|
|
|
|
- // 用户取消删除或删除失败
|
|
|
|
- if (error !== 'cancel') {
|
|
|
|
- window.console.log(error)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
* 搜索回调
|
|
* 搜索回调
|
|
* @param {CustomerAddressQueryParams} params - 搜索参数
|
|
* @param {CustomerAddressQueryParams} params - 搜索参数
|
|
* @param {Function} done - 完成回调
|
|
* @param {Function} done - 完成回调
|