caozong
zcx 1 year ago
parent 9631dba573
commit a2c29e8dda
  1. 8
      src/views/zs/sign/columns.js
  2. 12
      src/views/zs/sign/components/CheckDialog/components/SignForm.vue
  3. 104
      src/views/zs/sign/components/SettlementDialog.vue
  4. 14
      src/views/zs/sign/components/SignFormDialog.vue
  5. 26
      src/views/zs/sign/index.vue

@ -160,5 +160,13 @@ export const defaultColumns = [{
width: 140,
visible: true,
overflow: true
},
{
key: 21,
prop: 'settlementMoney',
label: '结算金额',
width: 140,
visible: true,
overflow: true
}
];

@ -121,13 +121,15 @@
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="线下接待人员" prop="offlineReceiver">
<el-select v-model="modalForm.offlineReceiver" multiple placeholder="请选择" clearable size="small" :disabled="!modalForm.signEdit || modalForm.clueId != undefined">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="撞单人员" prop="zhuangDanList">
<el-select v-model="modalForm.zhuangDanList" placeholder="请选择" clearable size="small">
<el-option v-for="(dict, index) in zhuangDanOptions" :key="index" :label="dict.consultUserName" :value="dict.consultUser" />
</el-select>
</el-form-item>
</el-col>-->
</el-col>
</el-row>
<el-row>

@ -0,0 +1,104 @@
<template>
<!-- 结算对话框 -->
<el-dialog v-if="visible" v-loading="signLoading" title="结算" :visible.sync="visible" width="600px" append-to-body :close-on-click-modal="false" style>
<el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="110px" >
<el-row>
<!-- <el-col :span="24">
<el-form-item label="学员姓名" prop="name">
<el-input v-model="modalForm.name" :disabled="modalForm.clueId != undefined" />
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item label="结算金额" prop="settlementMoney">
<el-input v-model="modalForm.settlementMoney" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" :disabled="!canSubmit" @click="handleSubmit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { updateSign } from '@/api/zs/sign';
import { validateMoney } from '@/utils/validate';
export default {
name: 'SettlementDialog',
data() {
return {
admin: localStorage.getItem('admin'),
preUrl: process.env.VUE_APP_BASE_API,
userId: localStorage.getItem('userId'),
visible: false,
signLoading: false,
modalForm: {},
modalRules: {
settlementMoney: [{ required: true, message: '结算金额不为空', trigger: 'blur' },
{ required: true, validator: validateMoney, trigger: 'blur' }]
},
};
},
methods: {
init(info = undefined) {
this.canSubmit = true;
this.$nextTick(() => {
this.resetForm('modalForm');
if (info && info.signId) {
this.modalForm = {... info}
}
this.visible = true;
});
},
//
resetForm() {
this.modalForm = {
signId: undefined,
settlementMoney: undefined,
};
},
handleSubmit() {
//
this.$refs.modalForm.validate((valid) => {
if (valid) {
this.canSubmit = false;
updateSign(this.modalForm).then((resp) => {
if (resp.code == 200) {
this.$message.success('提交成功');
this.visible = false;
this.$emit('refreshDataList');
} else {
this.canSubmit = true;
}
});
}
});
},
}
};
</script>
<style scoped>
.demo-image__item {
width: 100px;
height: 100px;
display: inline-block;
}
.image-list-item {
width: 100%;
height: 100%;
}
.el-upload--picture-card {
width: 100px !important;
height: 100px !important;
}
</style>

@ -124,13 +124,6 @@
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="线下接待人员" prop="offlineReceiver">
<el-select v-model="modalForm.offlineReceiver" multiple placeholder="请选择" clearable size="small" :disabled="modalForm.clueId != undefined">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>-->
</el-row>
<el-row>
@ -141,13 +134,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col v-if="admin == 'true'" :span="12">
<el-form-item label="佣金明细" prop="commission">
<el-select v-model="modalForm.commission" placeholder="请选择" clearable size="small">
<el-option v-for="(dict, index) in commissionOptions" :key="index" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>

@ -21,17 +21,18 @@
</el-table-column>
<el-table-column v-else-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
</template>
<el-table-column align="center" width="100" fixed="right" label="审核状态">
<!-- <el-table-column align="center" width="100" fixed="right" label="审核状态">
<template slot-scope="{row}">
<el-button v-if="row.checkState == 1" type="danger" size="mini">待审核</el-button>
<el-button v-else-if="row.checkState == 2" type="success" size="mini">已审核</el-button>
<el-button v-else-if="row.checkState == 3" type="warning" size="mini">驳回</el-button>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" fixed="right" align="center" width="160">
<template slot-scope="{row}">
<el-button v-show="row.checkState == 0 || row.checkState == 3" v-hasPermi="['zs:sign:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(row)">修改</el-button>
<el-button v-if="row.checkState == 1" v-hasPermi="['zs:sign:check']" size="mini" type="text" @click="handleCheck(row)">审核</el-button>
<!-- <el-button v-if="row.checkState == 1" v-hasPermi="['zs:sign:check']" size="mini" type="text" @click="handleCheck(row)">审核</el-button> -->
<el-button v-if="row.checkState == 1" v-hasPermi="['zs:sign:settlement']" size="mini" type="text" @click="handleSettlement(row)">结算</el-button>
<el-button v-hasPermi="['zs:sign:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
</template>
</el-table-column>
@ -43,10 +44,13 @@
<SignFormDialog v-if="dialog.signVisible" ref="signDialogForm" :dialog-visible="dialog.signVisible" @refreshDataList="_getTableList" />
<!-- 引入审核弹框 -->
<CheckDialog v-if="dialog.checkVisible" ref="checkDialogForm" :dialog-visible="dialog.checkVisible" @refreshDataList="_getTableList" />
<!-- <CheckDialog v-if="dialog.checkVisible" ref="checkDialogForm" :dialog-visible="dialog.checkVisible" @refreshDataList="_getTableList" /> -->
<!-- 导入对话框 -->
<UploadDialog v-if="dialog.uploadVisible" />
<!-- 结算对话框 -->
<SettlementDialog v-if="dialog.settlementVisible" ref="SettlementDialog" @refreshDataList="_getTableList"/>
</div>
</template>
@ -58,6 +62,7 @@ import SearchForm from './components/SearchForm.vue';
import SignFormDialog from './components/SignFormDialog.vue';
import { defaultColumns } from './columns.js';
import UploadDialog from './components/UploadDialog.vue';
import SettlementDialog from './components/SettlementDialog.vue';
export default {
name: 'Sign',
@ -65,7 +70,8 @@ export default {
SearchForm,
CheckDialog,
SignFormDialog,
UploadDialog
UploadDialog,
SettlementDialog
},
data() {
return {
@ -97,7 +103,8 @@ export default {
dialog: {
signVisible: false,
checkVisible: false,
uploadVisible: false
uploadVisible: false,
settlementVisible: true
},
options: {
userOptions: [],
@ -225,6 +232,13 @@ export default {
this.$nextTick(() => {
this.$refs.checkDialogForm.init(item);
});
},
//
handleSettlement(item){
this.dialog.settlementVisible = true
this.$nextTick(() => {
this.$refs.SettlementDialog.init(item);
})
}
}
};

Loading…
Cancel
Save