|
@@ -483,6 +483,15 @@
|
|
|
icon="el-icon-setting"
|
|
|
@click="setCourseSOP(scope.row)"
|
|
|
>设置课程SOP</el-button> -->
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleChangeStatus(scope.row)"
|
|
|
+ v-hasPermi="['qw:externalContact:changeStatus']"
|
|
|
+ >
|
|
|
+ 修改状态
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -829,8 +838,26 @@
|
|
|
<info ref="Details" />
|
|
|
</el-drawer>
|
|
|
<el-dialog :title="user.title" :visible.sync="user.open" width="800px" append-to-body>
|
|
|
- <selectUser ref="selectUser" @bindMiniCustomerId="bindMiniCustomerId"></selectUser>
|
|
|
- </el-dialog>
|
|
|
+ <selectUser ref="selectUser" @bindMiniCustomerId="bindMiniCustomerId"></selectUser>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="修改客户状态" :visible.sync="statusDialog.open" width="500px" append-to-body>
|
|
|
+ <el-form ref="statusForm" :model="statusForm" :rules="statusRules" label-width="100px">
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
+ <el-select v-model="statusForm.status" placeholder="请选择状态" size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in statusOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="statusDialog.open = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitStatusForm">提 交</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -852,7 +879,7 @@ import {
|
|
|
setCustomerCourseSop,
|
|
|
getCustomerCourseSop,
|
|
|
setCustomerCourseSopList,
|
|
|
- syncMyExternalContact, unBindUserId, updateExternalContactCall,exportMyExternalContact
|
|
|
+ syncMyExternalContact, unBindUserId, updateExternalContactCall,exportMyExternalContact,updateExternalContactStatus
|
|
|
} from '@/api/qw/externalContact'
|
|
|
import info from "@/views/qw/externalContact/info.vue";
|
|
|
import {getMyQwUserList, getMyQwCompanyList, handleInputAuthAppKey, updateUser} from "@/api/qw/user";
|
|
@@ -872,6 +899,19 @@ export default {
|
|
|
components:{PaginationMore, mycustomer,customerDetails,SopDialog,selectUser,info},
|
|
|
data() {
|
|
|
return {
|
|
|
+ statusDialog: {
|
|
|
+ open: false,
|
|
|
+ title: "修改客户状态"
|
|
|
+ },
|
|
|
+ statusForm: {
|
|
|
+ id: null,
|
|
|
+ status: null
|
|
|
+ },
|
|
|
+ statusRules: {
|
|
|
+ status: [
|
|
|
+ {required: true, message: '状态不能为空', trigger: 'change'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
doctorList:[],
|
|
|
diagnosisForm:{},
|
|
|
diagnosisOpen:false,
|
|
@@ -1255,6 +1295,34 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ handleChangeStatus(row) {
|
|
|
+ this.statusForm = {
|
|
|
+ id: row.id,
|
|
|
+ status: String(row.status) // 保证与 dictValue 类型一致
|
|
|
+ };
|
|
|
+ this.statusDialog.open = true;
|
|
|
+ },
|
|
|
+ submitStatusForm() {
|
|
|
+ this.$refs["statusForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ const params = {
|
|
|
+ id: this.statusForm.id,
|
|
|
+ status: this.statusForm.status
|
|
|
+ };
|
|
|
+
|
|
|
+ // 调用接口更新状态
|
|
|
+ updateExternalContactStatus(params).then(response => {
|
|
|
+ this.msgSuccess("状态修改成功");
|
|
|
+ this.statusDialog.open = false;
|
|
|
+ this.getList(); // 刷新列表
|
|
|
+ }).catch(error => {
|
|
|
+ console.error('状态修改失败:', error);
|
|
|
+ this.$message.error('状态修改失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
/** 查询企业微信客户列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|