人民医院前端

addOrEditInfOrder.vue 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <template>
  2. <div v-loading="loading">
  3. <el-row :gutter="5">
  4. <el-col :span="24">
  5. <el-form
  6. ref="ruleForm"
  7. :rules="rules"
  8. :model="ruleForm"
  9. label-width="150px"
  10. style="font-size: 14px"
  11. class="order_form">
  12. <!-- 工单信息 -->
  13. <el-row v-if="JSON.stringify(orderTypeData)==='{}'">
  14. <el-col :span="10">
  15. <el-form-item label="业务类别" prop="F_Type1">
  16. <select-order-type
  17. v-if="OrderDetailFlag"
  18. :first-order-type="firstOrderTypeParam"
  19. @post-first-order-type="getFirstOrderType" />
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="10">
  23. <el-form-item label="工单类别" prop="F_Type2">
  24. <select-order-type-two
  25. v-if="OrderDetailFlag"
  26. :second-order-type="secondOrderTypeParam"
  27. @post-second-order-type="getSecondOrderType" />
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row>
  32. <el-col :span="12">
  33. <el-form-item label="来电人" prop="F_Customer">
  34. <el-input v-model="ruleForm.F_Customer" placeholder="请输入姓名" />
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <el-form-item label="电话" prop="F_Phon">
  39. <el-input v-model="ruleForm.F_Phon" placeholder="请输入电话" />
  40. </el-form-item>
  41. </el-col>
  42. </el-row>
  43. <el-row>
  44. <el-col :span="12">
  45. <el-form-item label="性别" prop="F_Sex">
  46. <el-radio-group v-model="ruleForm.F_Sex">
  47. <el-radio label="0">男</el-radio>
  48. <el-radio label="1">女</el-radio>
  49. </el-radio-group>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="12">
  53. <el-form-item label="与患者关系" prop="F_Relationship">
  54. <el-input v-model="ruleForm.F_Relationship" placeholder="请输入与患者关系" />
  55. </el-form-item>
  56. </el-col>
  57. </el-row>
  58. <el-row>
  59. <el-col :span="12">
  60. <el-form-item label="患者身份证号" prop="F_IDNumber">
  61. <el-input v-model="ruleForm.F_IDNumber" placeholder="请输入患者身份证号" />
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="12">
  65. <el-form-item label="患者姓名" prop="F_FullName">
  66. <el-input v-model="ruleForm.F_FullName" placeholder="请输入患者姓名" />
  67. </el-form-item>
  68. </el-col>
  69. </el-row>
  70. <el-row>
  71. <el-col :span="24">
  72. <el-form-item label="家庭住址" prop="F_CusAddress">
  73. <el-input v-model="ruleForm.F_CusAddress" type="textarea" placeholder="请输入家庭住址" />
  74. </el-form-item>
  75. </el-col>
  76. </el-row>
  77. <el-row v-if="ruleForm.type2Arr[1] == 8009&&iswomanage!=1">
  78. <el-col :span="24">
  79. <el-form-item label="预约时间" prop="F_AppointmentTime">
  80. <el-date-picker
  81. v-model="ruleForm.F_AppointmentTime"
  82. style="width: 100%;"
  83. type="date"
  84. placeholder="选择预约时间"
  85. value-format="yyyy-MM-dd" />
  86. </el-form-item>
  87. </el-col>
  88. </el-row>
  89. <el-row v-if="ruleForm.type2Arr[0] == 8039">
  90. <el-col :span="12">
  91. <el-form-item label="地区" prop="F_Address">
  92. <el-input v-model="ruleForm.F_Address" placeholder="请输入地区" />
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="12">
  96. <el-form-item label="首次检查医院" prop="F_FirstCheckHospital">
  97. <el-input v-model="ruleForm.F_FirstCheckHospital" placeholder="请输入首次检查医院" />
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="12">
  101. <el-form-item label="肺结节大小" prop="F_NoduleSize">
  102. <el-input v-model="ruleForm.F_NoduleSize" type="number" placeholder="请输入肺结节大小">
  103. <i slot="suffix" style="font-style:normal;margin-right: 10px;">mm</i>
  104. </el-input>
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="12">
  108. <el-form-item label="首次发现肺结节时间" prop="F_FirstFindTime">
  109. <el-date-picker
  110. v-model="ruleForm.F_FirstFindTime"
  111. style="width: 100%;"
  112. type="date"
  113. placeholder="选择日期"
  114. value-format="yyyy-MM-dd" />
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="24">
  118. <el-form-item label="紧急程度" prop="F_Urgency">
  119. <el-radio-group v-model="ruleForm.F_Urgency">
  120. <el-radio label="0">常规</el-radio>
  121. <el-radio label="1">紧急</el-radio>
  122. </el-radio-group>
  123. </el-form-item>
  124. </el-col>
  125. </el-row>
  126. <el-row>
  127. <el-col :span="24">
  128. <el-form-item label="工单内容" prop="F_WorkOrderContents">
  129. <el-input v-model="ruleForm.F_WorkOrderContents" type="textarea" placeholder="请输入工单内容" />
  130. </el-form-item>
  131. </el-col>
  132. </el-row>
  133. <el-row>
  134. <el-col :span="24">
  135. <el-form-item label="处理意见" prop="F_DealOpinions">
  136. <el-input v-model="ruleForm.F_DealOpinions" type="textarea" placeholder="请输入处理意见" />
  137. </el-form-item>
  138. </el-col>
  139. </el-row>
  140. <el-row v-if="ruleForm.type2Arr[0] == 8015||ruleForm.type2Arr[0] == 8023||ruleForm.type2Arr[0] == 8031">
  141. <el-col :span="12">
  142. <el-form-item :label="zpdptname" prop="F_ComplaintDept">
  143. <select-dept-tree :deptparam="deptidArr" @post-deptid="getDeptid" />
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="12">
  147. <el-form-item :label="zppername" prop="F_ComplaintUser">
  148. <el-select
  149. v-model="ruleForm.F_ComplaintUser"
  150. placeholder="请选择人员"
  151. style="width: 100%;"
  152. @change="changeRepairman">
  153. <el-option
  154. v-for="item in repairman"
  155. :key="item.usercode"
  156. :label="item.username"
  157. :value="item.usercode" />
  158. </el-select>
  159. </el-form-item>
  160. </el-col>
  161. </el-row>
  162. <el-row v-if="ruleForm.type2Arr[0] == 8015&&iswomanage!=1">
  163. <el-col :span="24">
  164. <el-form-item label="投诉来源">
  165. <el-select v-model="ruleForm.F_ComplaintSource" style="width: 100%;">
  166. <el-option
  167. v-for="(item,index) in tousuArr"
  168. :key="index"
  169. :label="item.F_Name"
  170. :value="item.F_DictionaryValueId"/>
  171. </el-select>
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row>
  176. <el-col :span="24">
  177. <el-form-item label="处理方式" prop="opt">
  178. <el-radio-group v-model="ruleForm.opt">
  179. <el-radio label="1">立即办理</el-radio>
  180. <!-- <el-radio label="2">提交审核</el-radio> -->
  181. <el-radio label="3">转派</el-radio>
  182. </el-radio-group>
  183. </el-form-item>
  184. </el-col>
  185. </el-row>
  186. <el-row v-if="ruleForm.opt == '3'">
  187. <el-col :span="12">
  188. <el-form-item label="转派部门" prop="clbm">
  189. <select-dept-tree :deptparam="deptidArr1" @post-deptid="getDeptid1" />
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="12">
  193. <el-form-item label="接收人" prop="clid">
  194. <el-select v-model="ruleForm.clid" placeholder="请选择接收人" style="width: 100%;" @change="changeRepairman1">
  195. <el-option
  196. v-for="item in repairman1"
  197. :key="item.usercode"
  198. :label="item.username"
  199. :value="item.usercode" />
  200. </el-select>
  201. </el-form-item>
  202. </el-col>
  203. </el-row>
  204. <el-row :md="24">
  205. <el-form-item>
  206. <el-button type="primary" @click="submitForm">提交工单</el-button>
  207. </el-form-item>
  208. </el-row>
  209. </el-form>
  210. </el-col>
  211. </el-row>
  212. </div>
  213. </template>
  214. <script>
  215. import {
  216. addOrEdittOrder,
  217. updateWorkOrder,
  218. GetOrderDetail,
  219. getTouSuSelect
  220. } from '@/api/orderManagement/orderList'
  221. import {
  222. GetPerson
  223. } from '@/api/commonAPI'
  224. export default {
  225. name: 'AddOrEditInfOrder',
  226. props: {
  227. callinNum: {
  228. type: String,
  229. default: ''
  230. },
  231. wid: {
  232. type: String,
  233. default: ''
  234. },
  235. iswomanage: {
  236. type: String,
  237. default: ''
  238. },
  239. rtype: {
  240. type: String,
  241. default: ''
  242. },
  243. // callid: {
  244. // type: String,
  245. // default: ''
  246. // },
  247. // rowid: {
  248. // type: Number,
  249. // default: 0
  250. // },
  251. layerid: {
  252. type: String,
  253. default: ''
  254. },
  255. orderTypeData: {
  256. type: Object,
  257. default() {
  258. return {}
  259. }
  260. },
  261. personParmsData: {
  262. type: Object,
  263. default() {
  264. return {}
  265. }
  266. }
  267. },
  268. data() {
  269. return {
  270. zpdptname: '',
  271. zppername: '',
  272. typeid: 1,
  273. orderPid: 0,
  274. callid: window.localStorage.getItem('callidSave'),
  275. deptidArr: [],
  276. repairman: [],
  277. deptidArr1: [],
  278. repairman1: [],
  279. tousuArr: [],
  280. firstOrderTypeParam: {
  281. typeid: 1,
  282. name: '',
  283. pid: 0
  284. },
  285. secondOrderTypeParam: {
  286. typeid: 0,
  287. name: '',
  288. pid: 0
  289. },
  290. thirdOrderTypeParam: {
  291. typeid: 0,
  292. name: '',
  293. pid: 0
  294. },
  295. inServicesParam: {
  296. id: 0,
  297. name: ''
  298. },
  299. rules: {
  300. F_Type2: [{
  301. required: true,
  302. message: '请选择工单类别',
  303. trigger: 'blur'
  304. }],
  305. F_Customer: [{
  306. required: true,
  307. message: '姓名不能为空',
  308. trigger: 'blur'
  309. }],
  310. F_Phon: [{
  311. required: true,
  312. message: '手机号不能为空',
  313. trigger: 'blur'
  314. },
  315. {
  316. pattern: /^((0\d{2,3}-\d{5,8})|(1[345789]\d{9}))$/,
  317. message: '请输入正确的电话号码或者固话号码',
  318. trigger: 'blur'
  319. }],
  320. F_IDNumber: [{
  321. required: true,
  322. message: '请输入身份证号',
  323. trigger: 'blur'
  324. },
  325. {
  326. pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
  327. message: '请输入正确的身份证号码',
  328. trigger: 'blur'
  329. }],
  330. F_WorkOrderContents: [{
  331. required: true,
  332. message: '请输入工单内容',
  333. trigger: 'blur'
  334. }],
  335. F_FirstCheckHospital: [{
  336. required: true,
  337. message: '请输入首次检查医院',
  338. trigger: 'blur'
  339. }],
  340. F_NoduleSize: [{
  341. required: true,
  342. message: '请输入肺结核大小',
  343. trigger: 'blur'
  344. }],
  345. F_FirstFindTime: [{
  346. required: true,
  347. message: '请选择发现时间',
  348. trigger: 'change'
  349. }],
  350. F_Cathetertype: [{
  351. required: true,
  352. message: '请输入置管类型',
  353. trigger: 'blur'
  354. }],
  355. F_Catheterdept: [{
  356. required: true,
  357. message: '请输入置管科室',
  358. trigger: 'blur'
  359. }],
  360. F_Cathetertime: [{
  361. required: true,
  362. message: '请输入置管时间',
  363. trigger: 'change'
  364. }],
  365. F_BedNum: [{
  366. required: true,
  367. message: '请输入床号',
  368. trigger: 'blur'
  369. }],
  370. F_InpatientNum: [{
  371. required: true,
  372. message: '请输入住院号',
  373. trigger: 'blur'
  374. }],
  375. F_ComplaintDept: [{
  376. required: true,
  377. message: '请选择部门',
  378. trigger: 'change'
  379. }],
  380. F_ComplaintUser: [{
  381. required: true,
  382. message: '请选择人员',
  383. trigger: 'change'
  384. }],
  385. clbm: [{
  386. required: true,
  387. message: '请选择转派部门',
  388. trigger: 'change'
  389. }],
  390. clid: [{
  391. required: true,
  392. message: '请选择接收人',
  393. trigger: 'change'
  394. }]
  395. },
  396. F_Type2: '',
  397. ruleForm: {
  398. F_CallID: '',
  399. F_ID: '',
  400. F_Source: '电话', // 业务类别
  401. F_Type1: '', // 工单类别
  402. // F_TypeName1: '', // 工单类别
  403. F_Type2: '', // 工单子类
  404. // F_TypeName2: '', // 工单子类
  405. // F_Type3: '', // 工单三类
  406. // F_TypeName3: '', // 工单三类
  407. identification: '',
  408. type2Arr: [],
  409. F_Customer: '', // 姓名
  410. F_Sex: '0', // 性别
  411. F_Phon: '', // 电话
  412. F_CusAddress: '', // 家庭住址
  413. F_IdCard: '', // 身份证号
  414. F_FullName: '',
  415. F_Relationship: '',
  416. F_IDNumber: '',
  417. F_ServiceItems: '', // 服务项目
  418. F_Address: '', // 地区
  419. F_FirstCheckHospital: '', // 首次检查医院
  420. F_NoduleSize: '', // 肺结节大小
  421. F_FirstFindTime: '', // 首次发现肺结节时间
  422. F_Urgency: '0', // 紧急程度
  423. F_Cathetertype: '', // 置管类型
  424. F_Catheterdept: '', // 置管科室
  425. F_Cathetertime: '', // 置管时间
  426. F_AppointmentTime: '', // 预约时间
  427. F_BedNum: '', // 床号
  428. F_InpatientNum: '', // 住院号
  429. opt: '1', // 处理方式
  430. clbm: '',
  431. clid: '',
  432. cont: '',
  433. F_ComplaintSource: 4010,
  434. F_ComplaintDept: '',
  435. F_ComplaintUser: '',
  436. F_WorkOrderContents: '', // 工单内容
  437. F_DealOpinions: '' // 处理意见
  438. },
  439. loading: false,
  440. isButton: true
  441. }
  442. },
  443. watch: {
  444. 'orderTypeData.F_Type2': function() {
  445. this.ruleForm.type2Arr = this.orderTypeData.type2Arr
  446. this.ruleForm.F_Type2 = this.orderTypeData.F_Type2
  447. this.ruleForm.identification = this.orderTypeData.identification
  448. this.changeName(this.ruleForm.F_Type2)
  449. }
  450. },
  451. created() {
  452. if (this.callinNum) {
  453. this.ruleForm.F_Phon = this.callinNum
  454. }
  455. if (this.wid && parseInt(this.rtype) === 1000) {
  456. this.OrderDetail()
  457. }
  458. if (this.iswomanage) {
  459. this.ruleForm.F_ComplaintSource = ''
  460. this.ruleForm.F_AppointmentTime = ''
  461. }
  462. this.gettsSelect()
  463. },
  464. methods: {
  465. changeName(id) {
  466. const twoTypeInfo = this.$store.getters.workTypeMap[parseInt(id || 0)]
  467. if (twoTypeInfo && twoTypeInfo.tag) {
  468. if (twoTypeInfo.tag === 'ywzx_jy') {
  469. this.zpdptname = '建议部门'
  470. this.zppername = '建议人'
  471. }
  472. if (twoTypeInfo.tag === 'ywzx_ts') {
  473. this.zpdptname = '投诉部门'
  474. this.zppername = '投诉人'
  475. }
  476. if (twoTypeInfo.tag === 'ywzx_by') {
  477. this.zpdptname = '表扬部门'
  478. this.zppername = '表扬人'
  479. }
  480. }
  481. },
  482. // 获取详情
  483. OrderDetail() {
  484. const params = {
  485. WorkOrderCode: this.wid
  486. }
  487. GetOrderDetail(params).then((response) => {
  488. this.loading = false
  489. if (response.state.toLowerCase() === 'success') {
  490. const res = response.data[0]
  491. if (res) {
  492. this.rowid = res.F_ID
  493. this.ruleForm.F_ID = res.F_ID
  494. this.ruleForm.F_Source = res.F_Source // 业务类别
  495. this.ruleForm.F_Type1 = res.F_type1 // 工单类别
  496. this.firstOrderTypeParam.name = res.typename1
  497. this.$emit('r2type', res.F_type2)
  498. this.ruleForm.F_Type2 = res.F_type2 // 工单子类
  499. this.F_Type2 = res.F_type2
  500. if (res.F_type2) {
  501. this.ruleForm.type2Arr = this.$store.getters.workTypeMap[parseInt(res.F_type2)].ids.slice(1)
  502. }
  503. this.ruleForm.F_Customer = res.F_Customer // 姓名
  504. this.ruleForm.F_Sex = res.F_Sex.toString() // 性别
  505. this.ruleForm.F_Phon = res.F_Phon // 电话
  506. this.ruleForm.F_CusAddress = res.F_CusAddress // 家庭住址
  507. this.ruleForm.F_IdCard = res.F_IdCard // 身份证号
  508. this.ruleForm.F_ServiceItems = res.F_ServiceItems // 服务项目
  509. this.ruleForm.F_Address = res.F_Address // 地区
  510. this.ruleForm.F_FirstCheckHospital = res.F_FirstCheckHospital // 首次检查医院
  511. this.ruleForm.F_NoduleSize = res.F_NoduleSize // 肺结节大小
  512. this.ruleForm.F_FirstFindTime = res.F_FirstFindTime // 首次发现肺结节时间
  513. this.ruleForm.F_Urgency = res.F_Urgency.toString() // 紧急程度
  514. this.ruleForm.F_Cathetertype = res.F_Cathetertype // 置管类型
  515. this.ruleForm.F_Catheterdept = res.F_Catheterdept // 置管科室
  516. this.ruleForm.F_Cathetertime = res.F_Cathetertime // 置管时间
  517. this.ruleForm.F_BedNum = res.F_BedNum // 床号
  518. this.ruleForm.F_InpatientNum = res.F_InpatientNum // 住院号
  519. if (res.F_DealType === '立即办理') {
  520. this.ruleForm.opt = '1'
  521. } else if (res.F_DealType === '提交审核') {
  522. this.ruleForm.opt = '2'
  523. } else if (res.F_DealType === '转派') {
  524. this.ruleForm.opt = '3'
  525. }
  526. this.ruleForm.F_WorkOrderContents = res.F_WorkOrderContents // 工单内容
  527. this.ruleForm.F_DealOpinions = res.F_DealOpinions // 处理意见
  528. this.ruleForm.F_FullName = res.F_FullName
  529. this.ruleForm.F_IDNumber = res.F_IDNumber
  530. this.ruleForm.F_Relationship = res.F_Relationship
  531. this.changeName(this.ruleForm.type2Arr[0])
  532. if (res.F_ComplaintDept) {
  533. this.deptidArr = this.$store.getters.deptmap[parseInt(res.F_ComplaintDept)].ids
  534. this.getRepairman(res.F_ComplaintDept, 0)
  535. this.ruleForm.F_ComplaintDept = res.F_ComplaintDept
  536. this.ruleForm.F_ComplaintUser = res.F_ComplaintUser
  537. }
  538. if (res.DealDept) {
  539. this.deptidArr1 = this.$store.getters.deptmap[parseInt(res.DealDept)].ids
  540. console.log(this.$store.getters.deptmap[parseInt(res.DealDept)].ids, '00000')
  541. this.getRepairman1(res.DealDept, 0)
  542. this.ruleForm.clbm = res.DealDept
  543. this.ruleForm.clid = res.DealUser
  544. }
  545. }
  546. }
  547. }).catch(() => {
  548. })
  549. },
  550. submitForm() {
  551. console.log(this.ruleForm.F_Type2, 'this.ruleForm.F_type2')
  552. if (!this.ruleForm.F_Type2) {
  553. this.$message.error('请选择工单类别')
  554. return
  555. }
  556. this.$refs.ruleForm.validate((valid) => {
  557. if (valid) {
  558. this.loading = true
  559. const params = {
  560. F_CallID: this.ruleForm.F_CallID,
  561. F_ID: this.ruleForm.F_ID,
  562. F_ComplaintSource: this.ruleForm.F_ComplaintSource,
  563. F_Source: this.ruleForm.F_Source, // 业务类别
  564. F_Type1: this.orderTypeData && this.orderTypeData.F_Type1, // 工单类别
  565. F_Type2: this.ruleForm.F_Type2, // 工单子类
  566. // F_Type3: this.ruleForm.F_Type3, // 工单子类
  567. F_Customer: this.ruleForm.F_Customer, // 姓名
  568. F_Sex: this.ruleForm.F_Sex, // 性别
  569. F_Phon: this.ruleForm.F_Phon, // 电话
  570. F_CusAddress: this.ruleForm.F_CusAddress, // 家庭住址
  571. F_IdCard: this.ruleForm.F_IdCard, // 身份证号
  572. F_FullName: this.ruleForm.F_FullName, // 患者姓名
  573. F_Relationship: this.ruleForm.F_Relationship, // 患者关系
  574. F_IDNumber: this.ruleForm.F_IDNumber, // 患者身份证
  575. F_Address: this.ruleForm.F_Address, // 地区
  576. F_FirstCheckHospital: this.ruleForm.F_FirstCheckHospital, // 首次检查医院
  577. F_NoduleSize: this.ruleForm.F_NoduleSize, // 肺结节大小
  578. F_FirstFindTime: this.ruleForm.F_FirstFindTime, // 首次发现肺结节时间
  579. F_Urgency: this.ruleForm.F_Urgency, // 紧急程度
  580. F_Cathetertype: this.ruleForm.F_Cathetertype, // 置管类型
  581. F_Catheterdept: this.ruleForm.F_Catheterdept, // 置管科室
  582. F_Cathetertime: this.ruleForm.F_Cathetertime, // 置管时间
  583. F_AppointmentTime: this.ruleForm.F_AppointmentTime, // 预约时间
  584. F_BedNum: this.ruleForm.F_BedNum, // 床号
  585. F_InpatientNum: this.ruleForm.F_InpatientNum, // 住院号
  586. opt: Number(this.ruleForm.opt), // 处理方式
  587. F_ComplaintDept: this.ruleForm.F_ComplaintDept, // 投诉部门
  588. F_ComplaintUser: this.ruleForm.F_ComplaintUser, // 投诉人
  589. clid: this.ruleForm.clid, // 指派人
  590. clbm: this.ruleForm.clbm, // 指派部门
  591. F_WorkOrderContents: this.ruleForm.F_WorkOrderContents, // 工单内容
  592. F_DealOpinions: this.ruleForm.F_DealOpinions // 处理意见
  593. }
  594. // 添加
  595. if (!this.wid) {
  596. addOrEdittOrder(params)
  597. .then((response) => {
  598. this.loading = false
  599. if (response.state.toLowerCase() === 'success') {
  600. this.$message({
  601. message: '恭喜你,添加成功!',
  602. type: 'success',
  603. duration: 1000
  604. })
  605. this.resetForm()
  606. this.$parent.$layer.close(this.layerid)
  607. this.$parent.getList()
  608. } else {
  609. this.$message({
  610. message: '添加失败!',
  611. type: 'success',
  612. duration: 1000
  613. })
  614. }
  615. })
  616. .catch((response) => {
  617. this.loading = false
  618. })
  619. return
  620. }
  621. if (this.wid) {
  622. // 编辑
  623. params.F_Type2 = this.F_Type2
  624. updateWorkOrder(params)
  625. .then((response) => {
  626. this.loading = false
  627. if (response.state.toLowerCase() === 'success') {
  628. this.$message({
  629. message: '恭喜你,工单信息编辑成功!',
  630. type: 'success',
  631. duration: 1000
  632. })
  633. this.$parent.$layer.closeAll()
  634. // this.$parent.$parent.getList()
  635. }
  636. })
  637. .catch(() => {
  638. this.loading = false
  639. })
  640. }
  641. } else {
  642. this.$message({
  643. type: 'error',
  644. message: '请输入有效的必填项信息!',
  645. offset: 50,
  646. duration: 1000
  647. })
  648. return false
  649. }
  650. })
  651. },
  652. getDeptid(data) {
  653. this.ruleForm.F_ComplaintDept = data[data.length - 1]
  654. this.getRepairman(data[data.length - 1], 0)
  655. },
  656. getRepairman(id, state) {
  657. return new Promise((resolve) => {
  658. const params = {
  659. deptid: id // 字典管理的工单标识
  660. }
  661. GetPerson(params).then((res) => {
  662. if (state === 0) {
  663. this.repairman = res.rows
  664. } else if (state === 1) {
  665. this.assignman = res.rows
  666. }
  667. })
  668. resolve()
  669. })
  670. },
  671. getDeptid1(data) {
  672. this.ruleForm.clbm = data[data.length - 1]
  673. this.getRepairman1(data[data.length - 1], 0)
  674. },
  675. getRepairman1(id, state) {
  676. return new Promise((resolve) => {
  677. const params = {
  678. deptid: id // 字典管理的工单标识
  679. }
  680. GetPerson(params).then((res) => {
  681. if (state === 0) {
  682. this.repairman1 = res.rows
  683. } else if (state === 1) {
  684. this.assignman1 = res.rows
  685. }
  686. })
  687. resolve()
  688. })
  689. },
  690. changeRepairman(data) {
  691. },
  692. changeRepairman1(data) {
  693. },
  694. genderParams() {
  695. this.ruleForm.F_Customer = this.personParmsData.F_Customer // 姓名
  696. this.ruleForm.F_Phon = this.personParmsData.F_Phon // 电话
  697. this.ruleForm.F_Sex = this.personParmsData.F_Sex // 性别
  698. this.ruleForm.F_IdCard = this.personParmsData.F_IdCard // 身份证号
  699. this.ruleForm.F_CusAddress = this.personParmsData.F_CusAddress // 地址
  700. },
  701. // 重置工单
  702. resetForm() {
  703. this.ruleForm.F_Source = '' // 业务类别
  704. // this.ruleForm.F_Type1 = '' // 工单类别
  705. // this.ruleForm.F_TypeName1 = '' // 工单类别
  706. // this.ruleForm.F_Type2 = '' // 工单子类
  707. // this.ruleForm.F_TypeName2 = '' // 工单子类
  708. // this.ruleForm.F_Type3 = '' // 工单三类
  709. // this.ruleForm.F_TypeName3 = '' // 工单三类
  710. this.ruleForm.F_Customer = '' // 姓名
  711. this.ruleForm.F_Sex = '0' // 性别
  712. this.ruleForm.F_Phon = '' // 电话
  713. this.ruleForm.F_CusAddress = '' // 家庭住址
  714. this.ruleForm.F_IdCard = '' // 身份证号
  715. this.ruleForm.F_ServiceItems = '' // 服务项目
  716. this.ruleForm.F_Address = '' // 地区
  717. this.ruleForm.F_FirstCheckHospital = '' // 首次检查医院
  718. this.ruleForm.F_NoduleSize = '' // 肺结节大小
  719. this.ruleForm.F_FirstFindTime = '' // 首次发现肺结节时间
  720. this.ruleForm.F_Urgency = '0' // 紧急程度
  721. this.ruleForm.F_Cathetertype = '' // 置管类型
  722. this.ruleForm.F_Catheterdept = '' // 置管科室
  723. this.ruleForm.F_Cathetertime = '' // 置管时间
  724. this.ruleForm.F_BedNum = '' // 床号
  725. this.ruleForm.F_InpatientNum = '' // 住院号
  726. this.ruleForm.opt = '' // 处理方式
  727. this.ruleForm.F_WorkOrderContents = '' // 工单内容
  728. this.ruleForm.F_DealOpinions = '' // 处理意见
  729. this.ruleForm.F_Relationship = ''
  730. this.ruleForm.F_FullName = ''
  731. this.ruleForm.F_IDNumber = ''
  732. },
  733. // 工单类型切换清空
  734. resetOrderType() {
  735. this.ruleForm.F_Type3 = '' // 工单三类
  736. this.ruleForm.F_TypeName3 = '' // 工单三类
  737. this.ruleForm.F_ServiceItems = '' // 服务项目
  738. this.ruleForm.F_Address = '' // 地区
  739. this.ruleForm.F_FirstCheckHospital = '' // 首次检查医院
  740. this.ruleForm.F_NoduleSize = '' // 肺结节大小
  741. this.ruleForm.F_FirstFindTime = '' // 首次发现肺结节时间
  742. this.ruleForm.F_Urgency = '0' // 紧急程度
  743. this.ruleForm.F_Cathetertype = '' // 置管类型
  744. this.ruleForm.F_Catheterdept = '' // 置管科室
  745. this.ruleForm.F_Cathetertime = '' // 置管时间
  746. this.ruleForm.F_BedNum = '' // 床号
  747. this.ruleForm.F_InpatientNum = '' // 住院号
  748. this.ruleForm.F_Relationship = ''
  749. this.ruleForm.F_FullName = ''
  750. this.ruleForm.F_IDNumber = ''
  751. },
  752. // 投诉来源下拉框数据
  753. gettsSelect() {
  754. const params = {
  755. Flag: 'tsly',
  756. Name: ''
  757. }
  758. getTouSuSelect(params).then(res => {
  759. this.tousuArr = res.rows
  760. })
  761. }
  762. }
  763. }
  764. </script>
  765. <style rel="stylesheet/scss" lang="scss">
  766. .order_form {
  767. .form_select {
  768. width: 100%;
  769. }
  770. .form_date {
  771. width: 100%;
  772. }
  773. }
  774. </style>