|
@@ -10,7 +10,7 @@
|
|
|
:options-evens-group="optionsEvensGroup"
|
|
|
:table-attributes="tableAttributes"
|
|
|
:table-events="tableEvents"
|
|
|
- :replaceOrNotMap ="false"
|
|
|
+ :replaceOrNotMap="false"
|
|
|
:ellipsis="false"
|
|
|
|
|
|
>
|
|
@@ -25,7 +25,9 @@
|
|
|
<Detail v-if="['detail'].includes(module)" :detail-id="detailId" :module="module" @updateList="handleClose" />
|
|
|
<Examine v-if="['examine'].includes(module)" :detail-id="detailId" :module="module" @updateList="handleClose" />
|
|
|
</Popu>
|
|
|
- <Operate v-if="operateVisible" :operate-visible="operateVisible" :operate-type="operateType" :operate-title="operateTitle" :detail-id="detailId" :record-selected="recordSelected" @close="handleClose" />
|
|
|
+ <Operate v-if="operateVisible" :operate-visible="operateVisible" :operate-type="operateType"
|
|
|
+ :operate-title="operateTitle" :detail-id="detailId" :record-selected="recordSelected" @close="handleClose"
|
|
|
+ />
|
|
|
|
|
|
</template-page>
|
|
|
</template>
|
|
@@ -36,15 +38,17 @@ import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import add_callback_mixin from '@/components/template/add_callback_mixin.js'
|
|
|
import Popu from '@/components/template/popu.vue'
|
|
|
import CrossDistrictForm from './crossDistrictForm.vue'
|
|
|
+import list_mixin from '../mixin/list'
|
|
|
import Detail from './detail.vue'
|
|
|
import Examine from './examine.vue'
|
|
|
import Operate from '../components/operate.vue'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
|
import { getLoginCrossDistrictList, exportLoginCrossDistrict } from '@/api/crossDistrict'
|
|
|
+
|
|
|
export default {
|
|
|
components: { TemplatePage, Popu, CrossDistrictForm, Detail, Examine, Operate },
|
|
|
- mixins: [import_mixin, add_callback_mixin],
|
|
|
+ mixins: [import_mixin, add_callback_mixin, list_mixin],
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
@@ -77,9 +81,13 @@ export default {
|
|
|
[
|
|
|
{
|
|
|
name: '添加记录',
|
|
|
- click: this.addOn(() => {
|
|
|
- this.visible = true
|
|
|
- })
|
|
|
+ click: () => {
|
|
|
+ this.checkTradeLogin(() => {
|
|
|
+ this.addOn(() => {
|
|
|
+ this.visible = true
|
|
|
+ })()
|
|
|
+ }, { isSpan: true})
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
],
|
|
@@ -133,36 +141,36 @@ export default {
|
|
|
]
|
|
|
: []
|
|
|
})(),
|
|
|
- [
|
|
|
- [
|
|
|
- {
|
|
|
- name: '删除',
|
|
|
- click: () => {
|
|
|
- if (this.recordSelected.length === 0) {
|
|
|
- this.$message.error('请选择需要删除的数据')
|
|
|
- return
|
|
|
- }
|
|
|
- if(!this.isTradeExaminer){
|
|
|
- for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
- if (this.recordSelected[index].orderStatus !== 'SAVE') {
|
|
|
- this.$message.error('请选择保存的数据')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
- // if (this.recordSelected[index].orderStatus !== '已审核') {
|
|
|
- // this.$message.error('请选择审核通过的数据')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
- this.operateType = 'delete'
|
|
|
- this.operateTitle = '删除'
|
|
|
- this.operateVisible = true
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '删除',
|
|
|
+ click: () => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要删除的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.isTradeExaminer) {
|
|
|
+ for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
+ if (this.recordSelected[index].orderStatus !== 'SAVE') {
|
|
|
+ this.$message.error('请选择保存的数据')
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
- ]
|
|
|
- ]
|
|
|
+ }
|
|
|
+ // for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
+ // if (this.recordSelected[index].orderStatus !== '已审核') {
|
|
|
+ // this.$message.error('请选择审核通过的数据')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ this.operateType = 'delete'
|
|
|
+ this.operateTitle = '删除'
|
|
|
+ this.operateVisible = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -181,7 +189,8 @@ export default {
|
|
|
columnParsing(item, defaultData) {
|
|
|
if (item.colName === 'project_no') {
|
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
|
- return ( <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
|
|
|
+ return (
|
|
|
+ <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
underline={false}
|
|
@@ -216,11 +225,11 @@ export default {
|
|
|
operation() {
|
|
|
return (h, { row, index, column }) => {
|
|
|
return (
|
|
|
- <div class='operation-btns'>
|
|
|
- {!this.isTradeExaminer && ((row.orderStatus === 'OK') && row.status === 'ING' && !row.isApplyUpdate) ? (
|
|
|
+ <div class="operation-btns">
|
|
|
+ {!this.isTradeExaminer && ((row.orderStatus === 'OK') && row.status === 'ING' && !row.isApplyUpdate) ? (
|
|
|
<el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.detailId = row.id
|
|
|
this.operateType = 'apply'
|
|
@@ -233,8 +242,8 @@ export default {
|
|
|
) : null}
|
|
|
{this.isTradeExaminer && row.orderStatus !== 'SAVE' ? (
|
|
|
<el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.content = '审核'
|
|
|
this.module = 'examine'
|
|
@@ -262,8 +271,8 @@ export default {
|
|
|
row.orderStatus === 'SAVE' ||
|
|
|
row.orderStatus === 'RETURN'
|
|
|
? <el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.content = '编辑'
|
|
|
this.module = 'edit'
|
|
@@ -271,24 +280,25 @@ export default {
|
|
|
this.visible = true
|
|
|
}}
|
|
|
>
|
|
|
- 编辑
|
|
|
+ 编辑
|
|
|
</el-button> : null
|
|
|
}
|
|
|
{row.orderStatus === 'OK' && row.status === 'ING'
|
|
|
- ? <el-button size='mini' type='text' onClick={() => {
|
|
|
+ ? <el-button size="mini" type="text" onClick={() => {
|
|
|
this.operateType = 'update'
|
|
|
this.operateTitle = '更新'
|
|
|
this.recordSelected = [row]
|
|
|
this.operateVisible = true
|
|
|
- }}>
|
|
|
- 更新
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 更新
|
|
|
</el-button> : null
|
|
|
}
|
|
|
|
|
|
{this.isTradeExaminer && ((row.orderStatus === 'OK' || row.orderStatus === 'FAIL') && row.isApplyUpdate) ? (
|
|
|
<el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.detailId = row.id
|
|
|
this.operateType = 'examine'
|