You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

324 lines
11 KiB

2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 month ago
1 year ago
1 month ago
2 years ago
1 month ago
2 years ago
1 year ago
1 month ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 month ago
1 year ago
2 years ago
1 month ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
1 month ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
1 month ago
2 years ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 month ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
1 month ago
1 year ago
1 month ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. <template>
  2. <div style="display: flex">
  3. <div :style="`width: ${window.pageWidth - 120}px;`">
  4. <el-table :data="phoneFollowUp" border :height="window.pageHeight < 600
  5. ? 150
  6. : Math.floor((window.pageHeight + 20) / 3)
  7. " size="small" highlight-current-row ref="phoneFollowUp" @row-click="rowick">
  8. <el-table-column type="index" label="序号" width="50" align="center" />
  9. <el-table-column prop="patientName" label="姓名" min-width="80" />
  10. <el-table-column prop="mobileTelephone" label="手机号" min-width="130" align="center" />
  11. <!-- <el-table-column prop="SmsTypeName" label="短信类别" min-width="80" align="center">
  12. </el-table-column> -->
  13. <el-table-column prop="content" label="短信内容" min-width="300" />
  14. <el-table-column prop="isComplete" label="完成" min-width="40" align="center">
  15. <template slot-scope="scope">
  16. <el-checkbox v-model="scope.row.isComplete" true-label="Y" false-label="N" disabled />
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="planSendDate" label="推送时间" min-width="300" />
  20. <el-table-column prop="lastModifierName" label="修改人" min-width="80" align="center" />
  21. <el-table-column prop="lastModificationTime" label="修改日期" min-width="100" align="center">
  22. <template slot-scope="scope">
  23. <div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
  24. </template>
  25. </el-table-column>
  26. <el-table-column prop="creatorName" label="登记人" min-width="80" align="center" />
  27. <el-table-column prop="creationTime" label="登记日期" min-width="100" align="center">
  28. <template slot-scope="scope">
  29. <div>{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div>
  30. </template>
  31. </el-table-column>
  32. </el-table>
  33. </div>
  34. <div style="width: 120px; margin-top: 50px">
  35. <div style="margin-left: 10px">
  36. <el-button class="commonbutton" type="primary" @click="btnAdd">新增随访</el-button>
  37. </div>
  38. <!-- <div style="margin: 10px;">
  39. <el-button class="commonbutton" type="primary" @click="btnEdit">编辑随访</el-button>
  40. </div> -->
  41. <div style="margin: 10px">
  42. <el-button class="commonbutton" type="primary" @click="btnDel">删除随访</el-button>
  43. </div>
  44. </div>
  45. <el-dialog :title="title == 1 ? '新增' : '修改'" :visible.sync="dialogVisible" width="75%"
  46. :close-on-click-modal="false">
  47. <el-form ref="form" :model="form" label-width="80px">
  48. <el-row>
  49. <el-col :span="8">
  50. <el-form-item label="编号">
  51. <el-input v-model="form.id" disabled size="small"></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="8">
  55. <el-form-item label="随访来源" prop="followUpSourceId">
  56. <el-select v-model="form.followUpSourceId" placeholder="随访来源" size="small">
  57. <el-option v-for="item in dict.followUpSources" :key="item.id" :label="item.displayName"
  58. :value="item.id"></el-option>
  59. </el-select>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="8">
  63. <el-form-item label="随访类型" prop="followUpTypeId">
  64. <el-select v-model="form.followUpTypeId" placeholder="随访来源" size="small">
  65. <el-option v-for="item in dict.followUpTypes" :key="item.id" :label="item.displayName"
  66. :value="item.id"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. </el-col>
  70. </el-row>
  71. <el-row>
  72. <el-col :span="8">
  73. <el-form-item label="间隔天数">
  74. <el-input v-model="form.intervalDays" size="small"></el-input>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :span="8">
  78. <el-form-item label="生成次数">
  79. <el-input v-model="form.generateCount" size="small"></el-input>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="8">
  83. <el-form-item label="开始时间">
  84. <el-date-picker placeholder="选择日期时间" size="small" v-model="form.startDate" value-format="yyyy-MM-dd"
  85. editable style="width: 177px">
  86. </el-date-picker>
  87. </el-form-item>
  88. </el-col>
  89. </el-row>
  90. <el-row>
  91. <el-col :span="24">
  92. <el-form-item label="短信内容">
  93. <!-- <el-input
  94. v-model="form.parmValue"
  95. size="small"
  96. ></el-input> -->
  97. <el-input v-model="form.content"></el-input>
  98. </el-form-item>
  99. </el-col>
  100. </el-row>
  101. <el-row>
  102. <el-divider></el-divider>
  103. <el-col :span="4" style="margin-left: 15px">
  104. <el-form-item label="创建者">
  105. <el-input v-model="form.creatorName" disabled size="small"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="6">
  109. <el-form-item label="创建时间">
  110. <el-input :value="form.creationTime | dateFormat" disabled size="small"></el-input>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="4">
  114. <el-form-item label="修改者">
  115. <el-input v-model="form.lastModifierName" disabled size="small"></el-input>
  116. </el-form-item>
  117. </el-col>
  118. <el-col :span="6">
  119. <el-form-item label="修改时间">
  120. <el-input style="width: 85%" :value="form.lastModificationTime | dateFormat" disabled
  121. size="small"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. </el-form>
  126. <span slot="footer" class="dialog-footer">
  127. <el-button @click="dialogVisible = false" class="difference"> </el-button>
  128. <el-button type="primary" @click="addoredit" class="commonbutton"> </el-button>
  129. </span>
  130. </el-dialog>
  131. </div>
  132. </template>
  133. <script>
  134. import moment from "moment";
  135. import { mapState } from "vuex";
  136. import { dddw } from "../../utlis/proFunc";
  137. import { getapi, postapi, putapi, deletapi } from "../../api/api";
  138. export default {
  139. components: {},
  140. props: ['refParams'],
  141. data() {
  142. return {
  143. phoneFollowUp: [], // 电话随访
  144. curRow: {},
  145. dialogVisible: false,
  146. form: {
  147. startDate: "",
  148. intervalDays: "",
  149. generateCount: "",
  150. content: "",
  151. followUpSourceId: "03", // 01-医生站,02-总检医生站,03-客服,99-其它
  152. followUpTypeId: "01" // 01-普通,02-复查,03-危急值,99-其它,01-30为系统保留,31以后给客户自定义用
  153. },
  154. title: "",
  155. rules: {
  156. followUpSourceId: [
  157. { required: true, message: "请填写随访来源", trigger: "blur" },
  158. ],
  159. followUpTypeId: [
  160. { required: true, message: "请填写随访类型", trigger: "blur" },
  161. ]
  162. },
  163. };
  164. },
  165. created() { },
  166. updated() {
  167. this.$nextTick(() => {
  168. this.$refs["phoneFollowUp"].doLayout();
  169. });
  170. },
  171. //挂载完成
  172. mounted() {
  173. this.dictInit();
  174. },
  175. computed: {
  176. ...mapState(["window", "dict"]),
  177. },
  178. methods: {
  179. dddw,
  180. moment,
  181. // 初始化字典信息
  182. dictInit() {
  183. // 获取组合项目包含的明细
  184. postapi("/api/app/Asbitem/GetSimpleAsbitemWithDetails").then((res) => {
  185. if (res.code > -1) this.asbItems = res.data;
  186. });
  187. // 获取随访来源
  188. postapi("/api/app/FollowUpSource/GetList").then((res) => {
  189. if (res.code > -1) this.dict.followUpSources = res.data;
  190. });
  191. // 获取随访类型
  192. postapi("/api/app/FollowUpType/GetList").then((res) => {
  193. if (res.code > -1) this.dict.followUpTypes = res.data;
  194. });
  195. },
  196. getLists() {
  197. if (this.refParams.followUpId) {
  198. postapi("/api/app/SmsSend/GetList", {
  199. followUpId: this.refParams.followUpId,
  200. }).then((res) => {
  201. if (res.code > -1) this.phoneFollowUp = res.data;
  202. });
  203. } else {
  204. this.phoneFollowUp = []
  205. }
  206. },
  207. rowick(row) {
  208. this.curRow = { ...row };
  209. },
  210. addoredit() {
  211. if (this.title == 1) {
  212. if (this.form.intervalDays == "") {
  213. this.$message.warning("请输入间隔天数");
  214. } else if (this.form.startDate == "") {
  215. this.$message.warning("请选择开始时间");
  216. } else if (this.form.generateCount == "") {
  217. this.$message.warning("请输入生成天数");
  218. } else if (this.form.content == "") {
  219. this.$message.warning("请输入短信内容");
  220. } else {
  221. postapi("/api/app/SmsSend/AutoCreate", {
  222. followUpId: this.refParams.followUpId,
  223. intervalDays: this.form.intervalDays,
  224. startDate: this.form.startDate,
  225. generateCount: this.form.generateCount,
  226. content: this.form.content,
  227. followUpSourceId: this.form.followUpSourceId,
  228. followUpTypeId: this.form.followUpTypeId
  229. }).then((res) => {
  230. if (res.code > -1) {
  231. this.getLists();
  232. this.dialogVisible = false;
  233. }
  234. });
  235. }
  236. }
  237. },
  238. // 设置颜色
  239. setColor(checkCompleteFlag) {
  240. let color = "#52555F";
  241. switch (checkCompleteFlag) {
  242. case "0":
  243. color = "#FF5054";
  244. break;
  245. case "2":
  246. color = "#396FFA";
  247. break;
  248. default:
  249. break;
  250. }
  251. return color;
  252. },
  253. // 新增
  254. btnAdd() {
  255. this.dialogVisible = true;
  256. this.title = 1;
  257. this.form = this.$options.data().form;
  258. },
  259. // 编辑
  260. btnEdit() { },
  261. // 删除
  262. btnDel() {
  263. if (this.curRow.id == undefined) {
  264. this.$message.warning("请选择删除的数据");
  265. } else {
  266. this.$confirm("是否确认删除,是否继续", "提示", {
  267. confirmButtonText: "确定",
  268. cancelButtonText: "取消",
  269. type: "warning",
  270. cancelButtonClass: "difference",
  271. confirmButtonClass: "commonbutton",
  272. })
  273. .then(() => {
  274. postapi("/api/app/SmsSend/Delete", {
  275. smsSendId: this.curRow.id,
  276. }).then((res) => {
  277. if (res.code != -1) {
  278. this.curRow = this.$options.data().curRow;
  279. this.getLists();
  280. //this.$message.success("删除成功");
  281. }
  282. });
  283. })
  284. .catch(() => { });
  285. }
  286. },
  287. },
  288. //监听事件
  289. watch: {
  290. //人员ID未切换换时 也可以强制刷新数据
  291. "refParams.brushTimes": {
  292. // immediate:true,
  293. handler(newVal, oldVal) {
  294. console.log(
  295. `watch 短信随访 newVal:${newVal} oldVal:${oldVal} followUpId: ${this.refParams.followUpId}`
  296. );
  297. if (newVal != oldVal) {
  298. this.getLists();
  299. }
  300. },
  301. },
  302. },
  303. };
  304. </script>
  305. <style scoped>
  306. @import "../../assets/css/global.css";
  307. .box {
  308. display: flex;
  309. }
  310. </style>