|
@@ -16,7 +16,7 @@
|
|
|
<Popu v-if="visible">
|
|
|
<el-page-header slot="head" :content="content" @back="handleClose" />
|
|
|
<FrockForm
|
|
|
- v-if="['add', 'edit','apply'].includes(module)"
|
|
|
+ v-if="['add', 'edit', 'apply'].includes(module)"
|
|
|
:detail-id="detailId"
|
|
|
:module="module"
|
|
|
@updateList="handleClose"
|
|
@@ -24,7 +24,15 @@
|
|
|
<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>
|
|
|
|
|
@@ -83,84 +91,89 @@ export default {
|
|
|
console.log(this.isTradeExaminer, 9999)
|
|
|
return this.isTradeExaminer
|
|
|
? [
|
|
|
- [
|
|
|
[
|
|
|
- {
|
|
|
- name: '更新',
|
|
|
- click: () => {
|
|
|
- if (this.recordSelected.length === 0) {
|
|
|
- this.$message.error('请选择需要更新的数据')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
- if (!(this.recordSelected[index].orderStatus == '已审核' && this.recordSelected[index].status == '跟进中')) {
|
|
|
- this.$message.error('请选择审核通过并且跟进中的数据')
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '更新',
|
|
|
+ click: () => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要更新的数据')
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
+ if (
|
|
|
+ !(
|
|
|
+ this.recordSelected[index].orderStatus == '已审核' &&
|
|
|
+ this.recordSelected[index].status == '跟进中'
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ this.$message.error('请选择审核通过并且跟进中的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.operateType = 'update'
|
|
|
+ this.operateTitle = '更新'
|
|
|
+ this.operateVisible = true
|
|
|
}
|
|
|
- this.operateType = 'update'
|
|
|
- this.operateTitle = '更新'
|
|
|
- this.operateVisible = true
|
|
|
}
|
|
|
- }
|
|
|
- ]
|
|
|
- ],
|
|
|
- [
|
|
|
+ ]
|
|
|
+ ],
|
|
|
[
|
|
|
- {
|
|
|
- name: '替换业务员',
|
|
|
- click: () => {
|
|
|
- if (this.recordSelected.length === 0) {
|
|
|
- this.$message.error('请选择需要替换业务员的数据')
|
|
|
- return
|
|
|
- }
|
|
|
- for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
- if (this.recordSelected[index].orderStatus !== '已审核') {
|
|
|
- this.$message.error('请选择审核通过的数据')
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '替换业务员',
|
|
|
+ click: () => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要替换业务员的数据')
|
|
|
return
|
|
|
}
|
|
|
+ for (let index = 0; index < this.recordSelected.length; index++) {
|
|
|
+ if (this.recordSelected[index].orderStatus !== '已审核') {
|
|
|
+ this.$message.error('请选择审核通过的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.operateType = 'replace'
|
|
|
+ this.operateTitle = '替换业务员'
|
|
|
+ this.operateVisible = true
|
|
|
}
|
|
|
- this.operateType = 'replace'
|
|
|
- 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 !== '保存') {
|
|
|
- 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 !== '保存') {
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -179,16 +192,32 @@ export default {
|
|
|
columnParsing(item, defaultData) {
|
|
|
if (item.colName === 'project_no') {
|
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
|
- return (<el-link type='primary' underline={false} onClick={() => {
|
|
|
- const page = this.$router.resolve({
|
|
|
- path: '/commercialEngineering/frockList',
|
|
|
- query: {
|
|
|
- detailId: row.id,
|
|
|
- module: 'detail'
|
|
|
- }
|
|
|
- })
|
|
|
- window.open(page.href, '_blank')
|
|
|
- }}>{row.projectNo}</el-link>)
|
|
|
+ return (
|
|
|
+ <div style="padding:0 6px;cursor: pointer;" class={{ 'text-view': true, 'text-view-copy': column.isCopy }}>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ underline={false}
|
|
|
+ onClick={() => {
|
|
|
+ const page = this.$router.resolve({
|
|
|
+ path: '/commercialEngineering/frockList',
|
|
|
+ query: {
|
|
|
+ detailId: row.id,
|
|
|
+ module: 'detail'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(page.href, '_blank')
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {row.projectNo}
|
|
|
+ </el-link>
|
|
|
+ {column.isCopy ? (
|
|
|
+ <i
|
|
|
+ class={['el-icon-document-copy', column.columnCopyClass]}
|
|
|
+ data-clipboard-text={row[column.columnAttributes.prop]}
|
|
|
+ ></i>
|
|
|
+ ) : null}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
return defaultData
|
|
@@ -201,11 +230,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'
|
|
@@ -216,10 +245,10 @@ export default {
|
|
|
申请修改
|
|
|
</el-button>
|
|
|
) : null}
|
|
|
- {this.isTradeExaminer && row.orderStatus !== 'SAVE' ? (
|
|
|
+ {this.isTradeExaminer && row.orderStatus !== 'SAVE' ? (
|
|
|
<el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.content = '审核'
|
|
|
this.module = 'examine'
|
|
@@ -248,10 +277,10 @@ export default {
|
|
|
{(this.isTradeExaminer &&
|
|
|
(row.orderStatus === 'SAVE' || row.orderStatus === 'RETURN' || row.status === 'ING')) ||
|
|
|
row.orderStatus === 'SAVE' ||
|
|
|
- row.orderStatus === 'RETURN'
|
|
|
- ? <el-button
|
|
|
- size='mini'
|
|
|
- type='text'
|
|
|
+ row.orderStatus === 'RETURN' ? (
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
onClick={() => {
|
|
|
this.content = '编辑'
|
|
|
this.module = 'edit'
|
|
@@ -259,24 +288,28 @@ export default {
|
|
|
this.visible = true
|
|
|
}}
|
|
|
>
|
|
|
- 编辑
|
|
|
- </el-button> : null
|
|
|
- }
|
|
|
- {row.orderStatus === 'OK' && row.status === 'ING'
|
|
|
- ? <el-button size='mini' type='text' onClick={() => {
|
|
|
- this.operateType = 'update'
|
|
|
- this.operateTitle = '更新'
|
|
|
- this.recordSelected = [row]
|
|
|
- this.operateVisible = true
|
|
|
- }}>
|
|
|
- 更新
|
|
|
- </el-button> : null
|
|
|
- }
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ ) : null}
|
|
|
+ {row.orderStatus === 'OK' && row.status === 'ING' ? (
|
|
|
+ <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) ? (
|
|
|
+ {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'
|