|
@@ -87,6 +87,27 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="批量失效" :visible.sync="batchCancelVisible" :before-close="batchCancelClose" :close-on-click-modal="false">
|
|
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 10, maxRows: 20 }" v-model="cancelForm.websits"
|
|
|
|
|
+ @input="formatWebsitsInput" placeholder="请输入要失效的网点编号"></el-input>
|
|
|
|
|
+ <div style="margin-top: 20px; text-align: right">
|
|
|
|
|
+ <el-button @click="batchCancelClose">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="batchCancelSubmit">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="批量挂起" :visible.sync="batchPendVisible" :before-close="batchPendClose" :close-on-click-modal="false">
|
|
|
|
|
+ <el-select v-model="pendForm.contractTemplateId" placeholder="请选择合同模板">
|
|
|
|
|
+ <el-option v-for="item in contractTemplateMAIN" :key="item.contractTemplateId" :label="item.contractTemplateName" :value="item.contractTemplateId"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 10, maxRows: 20 }" v-model="pendForm.websits"
|
|
|
|
|
+ @input="formatWebsitsInput" placeholder="请输入要挂起的网点编号" style="margin-top: 20px;"></el-input>
|
|
|
|
|
+ <div style="margin-top: 20px; text-align: right">
|
|
|
|
|
+ <el-button @click="batchPendClose">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="batchPendSubmit">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</template-page>
|
|
</template-page>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -104,9 +125,12 @@ import {
|
|
|
fddCommonDownloadContract,
|
|
fddCommonDownloadContract,
|
|
|
websitContractSignConfirm,
|
|
websitContractSignConfirm,
|
|
|
websitContractSignCount,
|
|
websitContractSignCount,
|
|
|
- websitContractSignSingleSign
|
|
|
|
|
|
|
+ websitContractSignSingleSign,
|
|
|
|
|
+ websitContractSignCancelBatch,
|
|
|
|
|
+ websitContractSignPendBatch
|
|
|
} from '@/api/networkContractSigning'
|
|
} from '@/api/networkContractSigning'
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
|
|
+import { contractTemplateList } from '@/api/fddContractTemplate.js'
|
|
|
export default {
|
|
export default {
|
|
|
components: { TemplatePage },
|
|
components: { TemplatePage },
|
|
|
mixins: [import_mixin, operation_mixin],
|
|
mixins: [import_mixin, operation_mixin],
|
|
@@ -126,10 +150,20 @@ export default {
|
|
|
formData: {},
|
|
formData: {},
|
|
|
formRules: {},
|
|
formRules: {},
|
|
|
shenheBool: false,
|
|
shenheBool: false,
|
|
|
|
|
+ batchCancelVisible: false,
|
|
|
|
|
+ batchPendVisible: false,
|
|
|
|
|
+ pendForm: {
|
|
|
|
|
+ contractTemplateId: '',
|
|
|
|
|
+ websits: ''
|
|
|
|
|
+ },
|
|
|
form: {
|
|
form: {
|
|
|
status: 'OK'
|
|
status: 'OK'
|
|
|
},
|
|
},
|
|
|
- statusList: []
|
|
|
|
|
|
|
+ cancelForm: {
|
|
|
|
|
+ websits: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ statusList: [],
|
|
|
|
|
+ contractTemplateMAIN: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -156,7 +190,34 @@ export default {
|
|
|
return this?.userData?.adminWebsitIds || []
|
|
return this?.userData?.adminWebsitIds || []
|
|
|
},
|
|
},
|
|
|
optionsEvensGroup() {
|
|
optionsEvensGroup() {
|
|
|
- return []
|
|
|
|
|
|
|
+ return [
|
|
|
|
|
+ [
|
|
|
|
|
+ [
|
|
|
|
|
+ this.optionsEvensAuth('batchCancel', {
|
|
|
|
|
+ click: () => {
|
|
|
|
|
+ this.batchCancelVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ ],
|
|
|
|
|
+ [
|
|
|
|
|
+ this.optionsEvensAuth('batchPend', {
|
|
|
|
|
+ click: async () => {
|
|
|
|
|
+ await contractTemplateList({
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: -1,
|
|
|
|
|
+ params: [
|
|
|
|
|
+ { param: 'a.contract_type', compare: '=', value: 'MAIN' },
|
|
|
|
|
+ { param: 'a.status', compare: '=', value: 'ON' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ this.contractTemplateMAIN = res.data.records
|
|
|
|
|
+ })
|
|
|
|
|
+ this.batchPendVisible = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ ]
|
|
|
|
|
+ ]
|
|
|
|
|
+ ]
|
|
|
},
|
|
},
|
|
|
items() {
|
|
items() {
|
|
|
return [
|
|
return [
|
|
@@ -360,7 +421,7 @@ export default {
|
|
|
<div style="padding-left:10px">
|
|
<div style="padding-left:10px">
|
|
|
{
|
|
{
|
|
|
{ WAIT_SIGN: '待签约', WAIT: '待审核', OK: '审核通过', REJECT: '驳回' }[
|
|
{ WAIT_SIGN: '待签约', WAIT: '待审核', OK: '审核通过', REJECT: '驳回' }[
|
|
|
- row.contractStatus
|
|
|
|
|
|
|
+ row.contractStatus
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
</div>
|
|
</div>
|
|
@@ -419,7 +480,7 @@ export default {
|
|
|
</el-button>
|
|
</el-button>
|
|
|
) : null}
|
|
) : null}
|
|
|
{row.contractStatus == 'OK' &&
|
|
{row.contractStatus == 'OK' &&
|
|
|
- (this.adminWebsitIds.includes(this.formData?.parentId) || this.userData.type == 1) ? (
|
|
|
|
|
|
|
+ (this.adminWebsitIds.includes(this.formData?.parentId) || this.userData.type == 1) ? (
|
|
|
<el-button
|
|
<el-button
|
|
|
type="text"
|
|
type="text"
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
@@ -434,18 +495,17 @@ export default {
|
|
|
</el-button>
|
|
</el-button>
|
|
|
) : null}
|
|
) : null}
|
|
|
{row.contractStatus == 'WAIT_SIGN' &&
|
|
{row.contractStatus == 'WAIT_SIGN' &&
|
|
|
- !(
|
|
|
|
|
- this.formData.items.filter(v => v.contractStatus == 'WAIT_SIGN').length ===
|
|
|
|
|
- this.formData.items.length
|
|
|
|
|
- ) ? (
|
|
|
|
|
|
|
+ !(
|
|
|
|
|
+ this.formData.items.filter(v => v.contractStatus == 'WAIT_SIGN').length ===
|
|
|
|
|
+ this.formData.items.length
|
|
|
|
|
+ ) ? (
|
|
|
<el-button
|
|
<el-button
|
|
|
type="text"
|
|
type="text"
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
websitContractSignSingleSign({
|
|
websitContractSignSingleSign({
|
|
|
id: this.formData.id,
|
|
id: this.formData.id,
|
|
|
- returnUrl: `${window.location.href.split('#')?.[0]}#/networkSigning?id=${
|
|
|
|
|
- this.formData.id
|
|
|
|
|
- }&itemId=${row.id}`,
|
|
|
|
|
|
|
+ returnUrl: `${window.location.href.split('#')?.[0]}#/networkSigning?id=${this.formData.id
|
|
|
|
|
+ }&itemId=${row.id}`,
|
|
|
itemId: row.id
|
|
itemId: row.id
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.data.jump) {
|
|
if (res.data.jump) {
|
|
@@ -571,7 +631,7 @@ export default {
|
|
|
loseEfficacy: {
|
|
loseEfficacy: {
|
|
|
prompt: '是否确定设为失效?',
|
|
prompt: '是否确定设为失效?',
|
|
|
conditions: ({ row, index, column }) => {
|
|
conditions: ({ row, index, column }) => {
|
|
|
- return row.status !== 'CANCEL'
|
|
|
|
|
|
|
+ return !['CANCEL', 'PEND', 'REJECT'].includes(row.status)
|
|
|
},
|
|
},
|
|
|
click: ({ row, index, column }) => {
|
|
click: ({ row, index, column }) => {
|
|
|
websitContractSignCancel({
|
|
websitContractSignCancel({
|
|
@@ -617,7 +677,63 @@ export default {
|
|
|
window.open(res.data.url, '_blank')
|
|
window.open(res.data.url, '_blank')
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ batchCancelClose() {
|
|
|
|
|
+ this.batchCancelVisible = false
|
|
|
|
|
+ this.cancelForm.websits = ''
|
|
|
|
|
+ },
|
|
|
|
|
+ // 格式化网点编号输入
|
|
|
|
|
+ formatWebsitsInput() {
|
|
|
|
|
+ // 先处理已有的逗号和空格,将所有分隔符统一为换行符
|
|
|
|
|
+ let input = this.cancelForm.websits
|
|
|
|
|
+ .replace(/[\s,,]+/g, '\n') // 将逗号、空格、中文逗号替换为换行符
|
|
|
|
|
+ .replace(/\n+/g, '\n') // 合并连续的换行符
|
|
|
|
|
+ .trim() // 去除首尾空白
|
|
|
|
|
+
|
|
|
|
|
+ // 如果是空字符串,直接返回
|
|
|
|
|
+ if (!input) {
|
|
|
|
|
+ this.cancelForm.websits = ''
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 将换行符分隔的内容转换为英文逗号分隔
|
|
|
|
|
+ this.cancelForm.websits = input.split('\n').join(',')
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批量失效提交
|
|
|
|
|
+ batchCancelSubmit() {
|
|
|
|
|
+ if (!this.cancelForm.websits) {
|
|
|
|
|
+ this.$message({ type: 'warning', message: '请输入要失效的网点编号!' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ websitContractSignCancelBatch({
|
|
|
|
|
+ websits: this.cancelForm.websits
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ this.$message({ type: 'success', message: '批量失效成功!' })
|
|
|
|
|
+ this.batchCancelClose()
|
|
|
|
|
+ this.$refs?.pageRef?.refreshList()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批量挂起关闭
|
|
|
|
|
+ batchPendClose() {
|
|
|
|
|
+ this.batchPendVisible = false
|
|
|
|
|
+ this.pendForm.websits = ''
|
|
|
|
|
+ this.pendForm.contractTemplateId = ''
|
|
|
|
|
+ },
|
|
|
|
|
+ // 批量挂起提交
|
|
|
|
|
+ batchPendSubmit() {
|
|
|
|
|
+ if (!this.pendForm.websits) {
|
|
|
|
|
+ this.$message({ type: 'warning', message: '请输入要挂起的网点编号!' })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ websitContractSignPendBatch({
|
|
|
|
|
+ contractTemplateId: this.pendForm.contractTemplateId,
|
|
|
|
|
+ websits: this.pendForm.websits
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ this.$message({ type: 'success', message: '批量挂起成功!' })
|
|
|
|
|
+ this.batchPendClose()
|
|
|
|
|
+ this.$refs?.pageRef?.refreshList()
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|