rapidRepNext.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. <template>
  2. <view class="handler">
  3. <view class="head">
  4. <view class="tab" :class="{active: tab.value === dataInfo.tabActiveValue}" v-for="tab in dataInfo.tabs" :key="tab.id" @click="clickTab(tab.value)">
  5. {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
  6. </view>
  7. </view>
  8. <view class="body view-body page_padding">
  9. <!-- 科内报修 -->
  10. <template v-if="dataInfo.tabActiveValue === 'doing'">
  11. <view class="form_item">
  12. <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
  13. <uni-data-picker class="value" placeholder="请选择院区"
  14. v-model="dataInfo.branch" :localdata="branchData" @change="doingDeptChange"
  15. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
  16. </uni-data-picker>
  17. </view>
  18. <view class="form_item">
  19. <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
  20. <uni-data-picker class="value" placeholder="请选择报修科室"
  21. v-model="dataInfo.department" :localdata="dataInfo.repairTypeList"
  22. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.department}">
  23. </uni-data-picker>
  24. </view>
  25. <view class="candidate" v-if="itemUser">
  26. <view class="candidate-item" v-for="(item, index) in itemUser.commonDeptDTO" :key="item" @click="itemCandidate(item)">{{item.dept}}</view>
  27. </view>
  28. <view class="form_item column">
  29. <view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
  30. <uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址" :class="{formRed: isSubmit && !dataInfo.address }" />
  31. </view>
  32. <view class="candidate">
  33. <view class="candidate-item" v-for="item in addresData" :key="item" @click="itemAddres(item)">{{item.name}}</view>
  34. </view>
  35. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
  36. <view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
  37. <input class="item-input" placeholder="请输入联系人" v-model="dataInfo.contacts" />
  38. </view>
  39. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
  40. <view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
  41. <input class="item-input" placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
  42. </view>
  43. </template>
  44. <!-- 公共报修 -->
  45. <template v-if="dataInfo.tabActiveValue === 'overtime'">
  46. <view class="form_item" v-if="isRepair.valueconfig==1">
  47. <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
  48. <uni-data-picker class="value" placeholder="请选择院区" @change="overDeptChange"
  49. v-model="dataInfo.branch" :localdata="branchData"
  50. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
  51. </uni-data-picker>
  52. </view>
  53. <view class="form_item" v-if="isRepair.valueconfig==1">
  54. <view class="title select"><text class="required newicon newicon-bitian"></text>楼栋:</view>
  55. <uni-data-picker class="value" placeholder="请选择楼栋" @change="areaChange"
  56. v-model="dataInfo.areaId" :localdata="dataInfo.buildingTypeList"
  57. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.areaId}">
  58. </uni-data-picker>
  59. </view>
  60. <view class="form_item" v-if="isRepair.valueconfig==1">
  61. <view class="title select"><text class="required newicon newicon-bitian"></text>楼层:</view>
  62. <uni-data-picker class="value" placeholder="请选择楼层"
  63. v-model="dataInfo.placeId" :localdata="dataInfo.placeTypeList"
  64. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.placeId}">
  65. </uni-data-picker>
  66. </view>
  67. <view class="form_item column" v-if="isRepair.valueconfig==1">
  68. <view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
  69. <uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址" :class="{formRed: isSubmit && !dataInfo.address}" />
  70. </view>
  71. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
  72. <view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
  73. <input class="item-input value" placeholder="请输入联系人" v-model="dataInfo.contacts"/>
  74. </view>
  75. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
  76. <view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
  77. <input class="item-input value" placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
  78. </view>
  79. </template>
  80. </view>
  81. <view class="foot_common_btns">
  82. <button @click="goBackOrToList" type="default" class="primaryButton btn">上一步</button>
  83. <button @click="submit" type="default" class="primaryButton btn">提交</button>
  84. </view>
  85. <NumberModal v-if="dataInfo.isNumber" @cancelEmit="cancelNumber" @confirmEmit="conformNumber" @removeEmit="removeNumber" :selectData="dataInfo.selectData" :selectType="dataInfo.selectType" :evtNumber="dataInfo.evtNumber" showRemove></NumberModal>
  86. </view>
  87. </template>
  88. <script setup>
  89. import { ref, reactive, computed } from 'vue'
  90. import NumberModal from '@/components/NumberModal.vue';
  91. import { onLoad } from '@dcloudio/uni-app'
  92. import { generateNumberArray } from '@/utils/index.js'
  93. import { api_getDictionary, api_sj,api_request, getFetchDataList, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
  94. import { defaultColor } from '@/static/js/theme.js'
  95. import { useSetTitle } from '@/share/useSetTitle.js'
  96. import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
  97. import { useUploadFile } from '@/share/useUploadFile.js'
  98. import { useGoBack } from '@/share/useGoBack.js'
  99. import { useLoginUserStore } from '@/stores/loginUser'
  100. import { useHandlerStore } from '@/stores/handler'
  101. useSetTitle();
  102. const loginUserStore = useLoginUserStore();
  103. const handlerStore = useHandlerStore();
  104. const { makePhoneCall } = useMakePhoneCall();
  105. const { uploadFile } = useUploadFile();
  106. const { goBack } = useGoBack();
  107. // 主题颜色
  108. const primaryColor = ref(defaultColor)
  109. // 备用机选项
  110. const machineData = ref([
  111. {
  112. text:'是',
  113. value:1
  114. },
  115. {
  116. text:'否',
  117. value:0
  118. },
  119. ])
  120. const isDept = ref({})
  121. const isRepair = ref({})
  122. const branchData = ref([])
  123. const candidateData = ref(loginUserStore.loginUser.user)
  124. const repairIncident = ref(null)
  125. const addresData = ref([
  126. {name:'护士站'},
  127. {name:'卫生间'},
  128. {name:'更衣室'},
  129. {name:'治疗室'}
  130. ])
  131. // 数据
  132. const dataInfo = reactive({
  133. tabs: [
  134. {id: 5, name: '科内报修', value: 'doing', num: ''},
  135. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  136. ],
  137. tabActiveValue: 'doing',//当前选择的tab
  138. incidentId: undefined,//事件ID
  139. incidentData: {
  140. repairIncidentType:{
  141. id:''
  142. },
  143. department:{
  144. id:''
  145. }
  146. },//事件对象
  147. repairTypeList:[],//科室数据
  148. buildingTypeList:[],//楼栋数据
  149. placeTypeList:[],//楼层数据
  150. department:'',//报修科室
  151. address:'',//详细地址
  152. contacts:'',//联系人
  153. contactsInformation:'',//手机
  154. areaId:'',//楼栋
  155. placeId:'',//楼层
  156. branch:'', //院区
  157. })
  158. // 故障处理用是否提供备用机
  159. const newProvideBackupMachine = ref(0)
  160. // 知识库id
  161. const solutionId = ref(null)
  162. // 是否提交
  163. const isSubmit = ref(false)
  164. // 处理图片
  165. const handlerImgRef = ref(null)
  166. // 用户信息
  167. const itemUser = ref(null)
  168. // 是否进入汇总单
  169. const isInSummaryOrder = computed(() => {
  170. return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
  171. })
  172. // 上一步或者返回列表
  173. function goBackOrToList(){
  174. uni.setStorageSync('rapidRepNext',JSON.stringify(dataInfo))
  175. goBack();
  176. }
  177. // 重置
  178. function reset(){
  179. // dataInfo.department = '',//报修科室
  180. dataInfo.address = '',//详细地址
  181. // dataInfo.contacts = '',//联系人
  182. // dataInfo.contactsInformation = ''//手机
  183. dataInfo.areaId = ''//楼栋
  184. dataInfo.placeId = '' //院区
  185. dataInfo.placeTypeList = []
  186. }
  187. // 初始化表单
  188. function initForm(){
  189. if(dataInfo.tabActiveValue === 'doing'){
  190. // getRepairTypes()
  191. getUserInfo()
  192. }else if(dataInfo.tabActiveValue === 'overtime'){
  193. getbuildingList()
  194. }
  195. }
  196. function itemCandidate(item){
  197. // console.log(55,index)
  198. // let arr = loginUserStore.loginUser.user.commonDept.split(',')
  199. // console.log(66,arr)
  200. dataInfo.department = item.id
  201. }
  202. function itemAddres(item){
  203. dataInfo.address = item.name
  204. }
  205. function getUserInfo(){
  206. let user = loginUserStore.loginUser.user
  207. let postData = {
  208. idx: 0,
  209. sum: 999,
  210. user: {
  211. hospital:{
  212. id:user.currentHospital.id
  213. },
  214. name: user.name,
  215. }
  216. }
  217. api_user(postData).then(res => {
  218. if(res.status == 200){
  219. itemUser.value = res.list.find(i=>i.id==user.id)
  220. }else{
  221. uni.showToast({
  222. icon: 'none',
  223. title: res.msg || '请求数据失败!'
  224. });
  225. }
  226. })
  227. }
  228. // 点击tab
  229. function clickTab(tabValue){
  230. if(dataInfo.tabActiveValue == tabValue){
  231. return;
  232. }
  233. dataInfo.tabActiveValue = tabValue;
  234. isSubmit.value = false;
  235. reset();
  236. if(tabValue=='doing'){
  237. let user = loginUserStore.loginUser.user
  238. if(user){
  239. dataInfo.department = user.dept.id
  240. }
  241. }else{
  242. dataInfo.department = ''
  243. }
  244. dataInfo.category = dataInfo.incidentData.category || {};
  245. dataInfo.synergetic = dataInfo.incidentData.synergetic || [];
  246. newProvideBackupMachine.value = dataInfo.incidentData.provideBackupMachine
  247. initForm();
  248. }
  249. // 获取事件详情
  250. function getIncidentDetail(){
  251. if(uni.getStorageSync('rapidRepNext')){
  252. let data = JSON.parse(uni.getStorageSync('rapidRepNext'))
  253. if(data){
  254. dataInfo.department = data.department//报修科室
  255. dataInfo.address = data.address//详细地址
  256. dataInfo.contacts = data.contacts//联系人
  257. dataInfo.contactsInformation = data.contactsInformation//手机
  258. dataInfo.branch = data.branch//院区
  259. dataInfo.areaId = data.areaId//楼栋
  260. getRepairTypes()
  261. }
  262. }
  263. if(uni.getStorageSync('repairData')){
  264. let data = JSON.parse(uni.getStorageSync('repairData'))
  265. if(data){
  266. dataInfo.description = data.description
  267. dataInfo.handlerImgList = data.handlerImgList
  268. dataInfo.serverId = data.serverId
  269. dataInfo.assetId = data.assetId
  270. }
  271. }
  272. let data = JSON.parse(uni.getStorageSync('sysData'))
  273. isDept.value = data.find(i=>i.keyconfig=='deptRepair')
  274. isRepair.value = data.find(i=>i.keyconfig=='publicRepair')
  275. if(isDept.value.valueconfig==1 && isRepair.value.valueconfig==1){
  276. dataInfo.tabs = [
  277. {id: 5, name: '科内报修', value: 'doing', num: ''},
  278. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  279. ]
  280. dataInfo.tabActiveValue = 'doing'
  281. }else if(isDept.value.valueconfig==1){
  282. dataInfo.tabs = [
  283. {id: 5, name: '科内报修', value: 'doing', num: ''},
  284. ]
  285. dataInfo.tabActiveValue = 'doing'
  286. }else if(isRepair.value.valueconfig==1){
  287. dataInfo.tabs = [
  288. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  289. ]
  290. dataInfo.tabActiveValue = 'overtime'
  291. getbuildingList()
  292. }
  293. let user = loginUserStore.loginUser.user
  294. if(user){
  295. if(user.currentHospital.parent){
  296. dataInfo.branch = user.currentHospital.parent.id
  297. }else{
  298. dataInfo.branch = user.currentHospital.id
  299. }
  300. dataInfo.contacts = user.name
  301. dataInfo.contactsInformation = user.phone
  302. dataInfo.department = user.dept.id
  303. getRepairTypes()
  304. }
  305. let postData = {
  306. "key": 'repair_incident_type',
  307. "type": "list",
  308. };
  309. api_getDictionary(postData).then(res => {
  310. res = res || [];
  311. repairIncident.value = res
  312. })
  313. getBranch()
  314. }
  315. // 获取院区列表
  316. function getBranch(){
  317. let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
  318. branchData.value = arr.map(v => ({
  319. text: v.hosName,
  320. value: v.id,
  321. }));
  322. }
  323. // 科内报修选择院区
  324. function doingDeptChange(){
  325. getRepairTypes()
  326. }
  327. // 公区报修选择院区
  328. function overDeptChange(){
  329. getbuildingList()
  330. }
  331. // 获取报修科室列表
  332. function getRepairTypes(){
  333. uni.showLoading({
  334. title: "加载中",
  335. mask: true,
  336. });
  337. let postData = {
  338. department: {
  339. hospital: dataInfo.branch,
  340. },
  341. idx:0,
  342. sum:9999
  343. }
  344. api_department(postData).then(res => {
  345. uni.hideLoading();
  346. res = res.list || [];
  347. dataInfo.repairTypeList = res.map(v => ({
  348. text: v.dept,
  349. value: v.id,
  350. floor: v.floor
  351. }));
  352. let isDeptId = dataInfo.repairTypeList.filter(i=>i.value==dataInfo.department)
  353. if(isDeptId.length==0){
  354. dataInfo.department = ''
  355. }
  356. })
  357. }
  358. // 获取楼栋
  359. function getbuildingList(){
  360. uni.showLoading({
  361. title: "加载中",
  362. mask: true,
  363. });
  364. let postData = {
  365. idx: 0,
  366. sum: 9999,
  367. building:{
  368. hosId: dataInfo.branch,
  369. }
  370. };
  371. getFetchDataList("simple/data", "building", postData)
  372. .then((res) => {
  373. uni.hideLoading();
  374. res = res.list || [];
  375. dataInfo.buildingTypeList = res.map(v => ({
  376. text: v.buildingName,
  377. value: v.id
  378. }));
  379. });
  380. }
  381. function areaChange(e){
  382. getPlaceList(dataInfo.areaId)
  383. }
  384. // 获取楼层
  385. function getPlaceList(e){
  386. let postData = {
  387. idx: 0,
  388. sum: 9999,
  389. floor: {
  390. buildId:e,
  391. hosId:dataInfo.branch
  392. }
  393. };
  394. getFetchDataList("simple/data", "floor", postData)
  395. .then((res) => {
  396. uni.hideLoading();
  397. res = res.list || [];
  398. dataInfo.placeTypeList = res.map(v => ({
  399. text: v.floorName,
  400. value: v.id
  401. }));
  402. });
  403. }
  404. // 提交
  405. function submit(){
  406. isSubmit.value = true;
  407. submitHandler()
  408. }
  409. // 处理提交事件
  410. function handlerOrder(){
  411. let postData = {
  412. incident: dataInfo.incidentData,
  413. serverId: ''
  414. }
  415. postData.incident.place = {}
  416. if(dataInfo.tabActiveValue === 'doing'){
  417. let data = repairIncident.value.find(i=>i.value=='dept')
  418. dataInfo.incidentData.repairIncidentType.id = data.id
  419. let deptItem = dataInfo.repairTypeList.find(i=>i.value == dataInfo.department)
  420. console.log(333,deptItem)
  421. if(deptItem){
  422. postData.incident.place.id = deptItem.floor.id
  423. }
  424. }else if(dataInfo.tabActiveValue === 'overtime'){
  425. let data = repairIncident.value.find(i=>i.value=='public')
  426. dataInfo.incidentData.repairIncidentType.id = data.id
  427. postData.incident.place.id = dataInfo.placeId;
  428. }
  429. dataInfo.incidentData.department.id = dataInfo.department
  430. postData.incident.description = dataInfo.description;
  431. if(dataInfo.serverId){
  432. postData.serverId = dataInfo.serverId;
  433. }else{
  434. delete postData.serverId
  435. }
  436. postData.incident.assetId = dataInfo.assetId;
  437. postData.incident.houseNumber = dataInfo.address;
  438. postData.incident.contacts = dataInfo.contacts;
  439. postData.incident.contactsInformation = dataInfo.contactsInformation;
  440. postData.incident.hosId = dataInfo.branch;
  441. let repairsType = uni.getStorageSync('repairsType')
  442. // postData.incident.buildId = dataInfo.areaId; //areaId:楼栋
  443. // postData.incident.floorId = dataInfo.placeId;//placeId:楼层
  444. // buildId
  445. // floorId
  446. api_getDictionary({
  447. key: "incident_source",
  448. type: "list"
  449. }).then(res1=>{
  450. let incidentSourceList = res1 || [];
  451. let im = incidentSourceList.find(v => v.value === 'im');
  452. // api_sj().then(res2=>{
  453. // postData.incident.incidentsign = res2.data;
  454. postData.incident.source = im;
  455. postData.incident.fromWx = true;
  456. postData.incident.requester = loginUserStore.loginUser.user;
  457. postData.incident.acceptUser = loginUserStore.loginUser.user;
  458. postData.incident.deleteFlag = 0
  459. api_request(postData).then(res=>{
  460. if(res.state == 200){
  461. dataInfo.incidentId = res.data.id
  462. let handlerOrder$ = res.data;
  463. let requestList = [handlerOrder$];
  464. if(dataInfo.handlerImgList.length){ // 有图片
  465. dataInfo.handlerImgList.forEach(v => {
  466. let handlerOrderImg$ = handlerOrderImg(v);
  467. requestList.push(handlerOrderImg$);
  468. })
  469. console.log(9999,requestList);
  470. Promise.all(requestList).then(resList => {
  471. uni.hideLoading();
  472. console.log(9999,resList);
  473. // if(resList[0].state == 200){
  474. uni.showToast({
  475. icon: 'none',
  476. title: '报修成功',
  477. mask: true,
  478. });
  479. setTimeout(() => {
  480. uni.setStorageSync('rapidRepNext','')
  481. uni.setStorageSync('repairData','')
  482. if(repairsType=='home'){
  483. uni.reLaunch({
  484. url: '/pages/repair/home',
  485. })
  486. }else{
  487. uni.navigateTo({
  488. url: `/pages/myRepair/myRepair`
  489. })
  490. }
  491. }, 1500)
  492. // }else{
  493. // uni.showToast({
  494. // icon: 'none',
  495. // title: resList[0].msg || '请求数据失败!'
  496. // });
  497. // }
  498. })
  499. }else{
  500. uni.showToast({
  501. icon: 'none',
  502. title: '报修成功',
  503. mask: true,
  504. });
  505. setTimeout(() => {
  506. uni.setStorageSync('rapidRepNext','')
  507. uni.setStorageSync('repairData','')
  508. if(repairsType=='home'){
  509. uni.reLaunch({
  510. url: '/pages/repair/home',
  511. })
  512. }else{
  513. uni.navigateTo({
  514. url: `/pages/myRepair/myRepair`
  515. })
  516. }
  517. }, 1500)
  518. }
  519. }else{
  520. uni.showToast({
  521. icon: 'none',
  522. title: res.msg || '请求数据失败!'
  523. });
  524. }
  525. })
  526. // })
  527. })
  528. }
  529. // 处理图片
  530. function handlerOrderImg(imgObj){
  531. let allData = null
  532. if(imgObj.extname=='mp4' ||
  533. imgObj.extname=='avi' ||
  534. imgObj.extname=='mpeg' ||
  535. imgObj.extname=='wmv'){
  536. allData = uploadFile(imgObj, 'wechatIncidentVideo', dataInfo.incidentId)
  537. }else{
  538. allData = uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
  539. }
  540. return allData
  541. }
  542. // 处理提交
  543. function submitHandler(){
  544. console.log(dataInfo);
  545. if(dataInfo.tabActiveValue=='doing'){
  546. if(dataInfo.department==''){
  547. uni.showToast({
  548. icon: 'none',
  549. title: '请选择报修科室'
  550. });
  551. return;
  552. }
  553. }else{
  554. if(dataInfo.branch==''){
  555. uni.showToast({
  556. icon: 'none',
  557. title: '请选择院区'
  558. });
  559. return;
  560. }
  561. if(dataInfo.areaId==''){
  562. uni.showToast({
  563. icon: 'none',
  564. title: '请选择楼栋'
  565. });
  566. return;
  567. }
  568. if(dataInfo.placeId==''){
  569. uni.showToast({
  570. icon: 'none',
  571. title: '请选择楼层'
  572. });
  573. return;
  574. }
  575. }
  576. if(dataInfo.address==''){
  577. uni.showToast({
  578. icon: 'none',
  579. title: '请输入详细地址'
  580. });
  581. return;
  582. }
  583. if(dataInfo.contacts==''){
  584. uni.showToast({
  585. icon: 'none',
  586. title: '请输入联系人'
  587. });
  588. return;
  589. }
  590. if(dataInfo.contactsInformation==''){
  591. uni.showToast({
  592. icon: 'none',
  593. title: '请输入联系电话'
  594. });
  595. return;
  596. }
  597. console.log(dataInfo.handlerImgList)
  598. uni.showLoading({
  599. title: "加载中",
  600. mask: true,
  601. });
  602. handlerOrder()
  603. }
  604. // 获取文本内容
  605. function getHtml(html) {
  606. const tempDiv = document.createElement('div');
  607. tempDiv.innerHTML = html;
  608. return tempDiv.textContent || tempDiv.innerText || '';
  609. }
  610. onLoad((option) => {
  611. initForm()
  612. getIncidentDetail();
  613. })
  614. </script>
  615. <style lang="scss" scoped>
  616. .handler{
  617. height: 100%;
  618. display: flex;
  619. flex-direction: column;
  620. justify-content: space-between;
  621. .head{
  622. height: 88rpx;
  623. display: flex;
  624. position: fixed;
  625. z-index: 99;
  626. width: 100%;
  627. background-color: #fff;
  628. font-size: 30rpx;
  629. .tab{
  630. flex: 1;
  631. display: flex;
  632. justify-content: center;
  633. align-items: center;
  634. border-bottom: 4rpx solid transparent;
  635. &.active{
  636. color: $uni-primary;
  637. border-color: $uni-primary;
  638. }
  639. }
  640. }
  641. .body{
  642. margin-top: 88rpx;
  643. box-sizing: border-box;
  644. flex: 1;
  645. min-height: 0;
  646. &.bg{
  647. background-color: #F7F7F7;
  648. }
  649. .summaryItem{
  650. &:first-of-type{
  651. .summaryItem_head{
  652. border-bottom: 1rpx solid #DDDDDD;
  653. }
  654. }
  655. .summary_total{
  656. padding: 20rpx 0;
  657. display: flex;
  658. justify-content: center;
  659. align-items: center;
  660. }
  661. .summaryItem_head{
  662. padding: 24rpx;
  663. font-size: 26rpx;
  664. color: #3A3A3A;
  665. }
  666. .summaryItem_body{
  667. font-size: 30rpx;
  668. background-color: #fff;
  669. .summaryItem_bodyItem{
  670. padding: 24rpx;
  671. border-bottom: 1rpx solid #DDDDDD;
  672. .summaryItem_bodyItem_top{
  673. display: flex;
  674. justify-content: space-between;
  675. align-items: center;
  676. .value{
  677. padding-left: 48rpx;
  678. flex-shrink: 0;
  679. }
  680. }
  681. .summaryItem_bodyItem_bottom{
  682. margin-top: 24rpx;
  683. display: flex;
  684. justify-content: space-between;
  685. align-items: center;
  686. .name{
  687. text-align: right;
  688. flex: 1;
  689. }
  690. .value{
  691. width: 240rpx;
  692. text-align: right;
  693. padding-left: 48rpx;
  694. flex-shrink: 0;
  695. }
  696. }
  697. }
  698. }
  699. .summaryItem_foot{
  700. font-size: 30rpx;
  701. background-color: #fff;
  702. &.total{
  703. margin-top: 24rpx;
  704. }
  705. .summaryItem_foot_total{
  706. padding: 24rpx 0;
  707. display: flex;
  708. justify-content: center;
  709. align-items: center;
  710. }
  711. .summaryItem_foot_add{
  712. border-top: 1rpx solid #DDDDDD;
  713. padding: 24rpx 0;
  714. display: flex;
  715. justify-content: center;
  716. align-items: center;
  717. .newicon-icon-test{
  718. font-size: 30rpx;
  719. font-weight: bold;
  720. }
  721. }
  722. }
  723. }
  724. .form_item_column{
  725. padding-top: 24rpx;
  726. min-height: 86rpx;
  727. .form_item{
  728. padding-top: 0;
  729. min-height: auto;
  730. }
  731. }
  732. .candidate{
  733. display: flex;
  734. flex-wrap: wrap;
  735. .candidate-item{
  736. padding: 6rpx 15rpx;
  737. font-size: 26rpx;
  738. color: #949494;
  739. background: #E9E9E9;
  740. border-radius: 50rpx;
  741. margin-right: 20rpx;
  742. margin-top: 15rpx;
  743. }
  744. }
  745. .form_item{
  746. display: flex;
  747. align-items: center;
  748. padding-top: 24rpx;
  749. min-height: 86rpx;
  750. &.column{
  751. height: auto;
  752. flex-direction: column;
  753. align-items: flex-start;
  754. .import-rep{
  755. padding: 5rpx 10rpx;
  756. border-radius: 50rpx;
  757. background: #d1fcd5;
  758. color: #49b856;
  759. font-size: 24rpx;
  760. }
  761. .title{
  762. margin-right: 0;
  763. }
  764. .title-width{
  765. width: 100%;
  766. }
  767. .title-fl-sb{
  768. display: flex;
  769. justify-content: space-between;
  770. width: 100%;
  771. }
  772. .value{
  773. margin-top: 10rpx;
  774. padding-left: 20rpx;
  775. box-sizing: border-box;
  776. }
  777. .tips{
  778. padding: 24rpx;
  779. text-align: center;
  780. font-size: 22rpx;
  781. color: #909399;
  782. width: 100%;
  783. box-sizing: border-box;
  784. }
  785. }
  786. .title{
  787. font-size: 26rpx;
  788. display: flex;
  789. align-items: center;
  790. margin-right: 12rpx;
  791. flex-shrink: 0;
  792. &.select{
  793. width: calc(5em + 20rpx);
  794. }
  795. }
  796. .value{
  797. width: 100%;
  798. &.category{
  799. width: 100%;
  800. display: flex;
  801. justify-content: space-between;
  802. align-items: center;
  803. .categoryName{
  804. font-size: 26rpx;
  805. color: #555;
  806. flex: 1;
  807. }
  808. .newicon-weibiaoti2010104{
  809. color: $uni-primary;
  810. margin-left: 24rpx;
  811. }
  812. }
  813. .imgTips{
  814. color: #909399;
  815. font-size: 22rpx;
  816. }
  817. }
  818. .item-input{
  819. border: 1px solid #DBDBDB;
  820. height: 70rpx;
  821. line-height: 70rpx;
  822. padding: 0 10rpx;
  823. border-radius: 4rpx;
  824. width: 100%;
  825. font-size: 14px;
  826. }
  827. .synergeticNames{
  828. font-size: 26rpx;
  829. margin-right: 24rpx;
  830. }
  831. .synergeticAdd{
  832. flex-shrink: 0;
  833. }
  834. }
  835. }
  836. }
  837. </style>