processFeedback.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <template>
  2. <zj-page-layout :hasFooter="true">
  3. <view class="all-container">
  4. <view class="type-container mt30">
  5. <view class="common-title"><text>*</text>反馈类型</view>
  6. <view class="list">
  7. <view
  8. class="item"
  9. v-for="(item, index) in typeList"
  10. :key="index"
  11. :class="typeVal === item.value ? 'active' : ''"
  12. @tap="changeType(item.value)"
  13. >{{ item.name }}</view
  14. >
  15. </view>
  16. </view>
  17. <!-- -->
  18. <!-- -->
  19. <!-- -->
  20. <!-- -->
  21. <!-- -->
  22. <view class="date-conteiner mt30" v-if="~['延误'].indexOf(typeVal)">
  23. <view class="item">
  24. <view class="label"><text>*</text>延误类型</view>
  25. <view class="picker" @tap="ywlxShow = true">
  26. <text class="value" v-if="ywlxValue">{{ ywlxValue }}</text>
  27. <text class="placeholder" v-else>请选择</text>
  28. <text class="iconfont icon-jinru"></text>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- -->
  33. <!-- -->
  34. <!-- -->
  35. <!-- -->
  36. <!-- -->
  37. <view class="date-conteiner mt30" v-if="~['待件'].indexOf(typeVal)">
  38. <view v-for="(item, index) in daijian" :key="index">
  39. <view style="display: flex; justify-content: space-between; align-items: center">
  40. <view class="common-title"><text>*</text>待件{{ index + 1 }}</view>
  41. <view>
  42. <text @tap="addDaijian" style="color: blue" v-if="index + 1 == daijian.length">添加</text>
  43. <text @tap="delDaijian(index)" style="margin-left: 10px; color: red" v-if="daijian.length > 1">删除</text>
  44. </view>
  45. </view>
  46. <view class="item">
  47. <view class="label"><text>*</text>待件-申请编号</view>
  48. <view class="picker">
  49. <u--input placeholder="请输入" style="height: 100%" v-model="item.val1"></u--input>
  50. </view>
  51. </view>
  52. <br />
  53. <view class="item">
  54. <view class="label"><text>*</text>待件-物料编号</view>
  55. <view class="picker">
  56. <u--input placeholder="请输入" style="height: 100%" v-model="item.val2"></u--input>
  57. </view>
  58. </view>
  59. <br />
  60. </view>
  61. </view>
  62. <!-- -->
  63. <!-- -->
  64. <!-- -->
  65. <!-- -->
  66. <!-- -->
  67. <block v-if="~['预约', '改约', '拉修', '不接电话', '延误', '待件'].indexOf(typeVal)">
  68. <view class="date-conteiner mt30">
  69. <view class="item">
  70. <view class="label"
  71. ><text>*</text
  72. >{{ ~['改约', '拉修', '不接电话', '延误', '待件'].indexOf(typeVal) ? '改约' : '预约' }}上门开始时间</view
  73. >
  74. <view class="picker" @tap="isShowDatePicker = true">
  75. <text class="value" v-if="date">{{ date }}</text>
  76. <text class="placeholder" v-else>请选择</text>
  77. <text class="iconfont icon-jinru"></text>
  78. </view>
  79. </view>
  80. </view>
  81. <view class="date-conteiner mt30">
  82. <view class="item">
  83. <view class="label"
  84. ><text>*</text
  85. >{{ ~['改约', '拉修', '不接电话', '延误', '待件'].indexOf(typeVal) ? '改约' : '预约' }}上门结束时间</view
  86. >
  87. <view class="picker" @tap="setisShowDatePicker2">
  88. <text class="value" v-if="date2">{{ date2 }}</text>
  89. <text class="placeholder" v-else>请选择</text>
  90. <text class="iconfont icon-jinru"></text>
  91. </view>
  92. </view>
  93. </view>
  94. </block>
  95. <!-- -->
  96. <!-- -->
  97. <!-- -->
  98. <!-- -->
  99. <!-- -->
  100. <block v-if="~['异常反馈'].indexOf(typeVal)">
  101. <view class="date-conteiner mt30">
  102. <view class="item">
  103. <view class="label"><text>*</text>异常类型</view>
  104. <view class="picker" @tap="yclxShow = true">
  105. <text class="value" v-if="yclxValue">{{ yclxValue }}</text>
  106. <text class="placeholder" v-else>请选择</text>
  107. <text class="iconfont icon-jinru"></text>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="date-conteiner mt30">
  112. <view class="item">
  113. <view class="label"><text>*</text>异常原因</view>
  114. <view class="picker" @tap="ycyyShow = true">
  115. <text class="value" v-if="ycyyValue">{{ ycyyValue }}</text>
  116. <text class="placeholder" v-else>请选择</text>
  117. <text class="iconfont icon-jinru"></text>
  118. </view>
  119. </view>
  120. </view>
  121. </block>
  122. <!-- -->
  123. <!-- -->
  124. <!-- -->
  125. <!-- -->
  126. <!-- -->
  127. <block v-if="~['完工反馈'].indexOf(typeVal)">
  128. <view class="over-container mt30">
  129. <view class="row">
  130. <view class="label"><text>*</text>完工采集</view>
  131. <view class="btn"
  132. ><u-button
  133. type="primary"
  134. :text="orderDetail && orderDetail.isGather == 'YES' ? '查看采集' : '数据采集'"
  135. @click="toCollect"
  136. ></u-button>
  137. </view>
  138. </view>
  139. <view class="row">
  140. <view class="label"
  141. >收费项目<u-icon
  142. name="question-circle"
  143. color="#999999"
  144. @click="$tips('在服务过程中消耗的产品(配件)')"
  145. ></u-icon
  146. ></view>
  147. <view class="btn"><u-button type="primary" text="添加" @click="toCharge"></u-button></view>
  148. </view>
  149. </view>
  150. <view class="sign-container mt30">
  151. <view class="common-title"><text>*</text>客户签名</view>
  152. <view class="empty" @tap="toSignName" v-if="!signNameUrl">点我签名</view>
  153. <view class="img" v-else>
  154. <image :src="signNameUrl" mode="widthFix" @tap="prevSignImg(signNameUrl)"></image>
  155. <text class="iconfont icon-guanbi1" @tap="signNameUrl = ''"></text>
  156. </view>
  157. </view>
  158. </block>
  159. <!-- -->
  160. <!-- -->
  161. <!-- -->
  162. <!-- -->
  163. <!-- -->
  164. <block v-if="~['质量信息'].indexOf(typeVal)">
  165. <view class="date-conteiner mt30">
  166. <view class="item">
  167. <view class="label"><text>*</text>质量反馈编号</view>
  168. <view class="picker">
  169. <u--input placeholder="请输入" style="height: 100%" v-model="zlfkbh"></u--input>
  170. </view>
  171. </view>
  172. </view>
  173. <view class="date-conteiner mt30">
  174. <view class="item">
  175. <view class="label"><text>*</text>反馈日期</view>
  176. <view class="picker" @tap="isShowDatePicker3 = true">
  177. <text class="value" v-if="date3">{{ date3 }}</text>
  178. <text class="placeholder" v-else>请选择</text>
  179. <text class="iconfont icon-jinru"></text>
  180. </view>
  181. </view>
  182. </view>
  183. </block>
  184. <!-- -->
  185. <!-- -->
  186. <!-- -->
  187. <!-- -->
  188. <!-- -->
  189. <view class="mt30 remark-container">
  190. <view class="common-title"><text>*</text>备注信息</view>
  191. <u--textarea v-model="remarkVal" placeholder="请输入备注内容" fixed border="none" height="120"></u--textarea>
  192. </view>
  193. <view class="mt30 image-container">
  194. <view class="common-title">上传图片(最多6张)</view>
  195. <view class="images">
  196. <block v-for="(item, index) in imageList" :key="index">
  197. <view class="img">
  198. <image :src="item.url" mode="aspectFill" @tap="prevImg(item.url)"></image>
  199. <text class="iconfont icon-guanbi1" @tap="delImage(index)"></text>
  200. </view>
  201. </block>
  202. <view class="add" @tap="addImage" v-if="imageList.length < 6">
  203. <text class="iconfont icon-xiangji"></text>
  204. <text class="text">添加图片</text>
  205. </view>
  206. </view>
  207. </view>
  208. </view>
  209. <template slot="footer">
  210. <view class="footer-btn-group">
  211. <u-button text="确定" type="primary" size="large" @click="submitData"></u-button>
  212. </view>
  213. </template>
  214. <u-datetime-picker
  215. v-if="isShowDatePicker"
  216. :show="isShowDatePicker"
  217. v-model="datePickerValue"
  218. type="datetime"
  219. placeholder="选择日期和时间"
  220. @confirm="confirmDate"
  221. @cancel="isShowDatePicker = false"
  222. @close="isShowDatePicker = false"
  223. :minDate="minDate"
  224. :formatter="formatter"
  225. :style="{ width: '100%' }"
  226. />
  227. <u-datetime-picker
  228. v-if="isShowDatePicker2"
  229. :show="isShowDatePicker2"
  230. v-model="datePickerValue2"
  231. type="datetime"
  232. placeholder="选择日期和时间"
  233. @confirm="confirmDate2"
  234. @cancel="isShowDatePicker2 = false"
  235. @close="isShowDatePicker2 = false"
  236. :minDate="minDate2"
  237. :maxDate="maxDate2"
  238. :formatter="formatter"
  239. :style="{ width: '100%' }"
  240. />
  241. <zjDialogPicker
  242. ref="yclxList"
  243. :isShow="yclxShow"
  244. :multiple="false"
  245. :styleType="2"
  246. :title="'异常类型'"
  247. :list="yclxList"
  248. :keyName="'label'"
  249. @cancel="yclxShow = false"
  250. @confirm="confirmyClx"
  251. />
  252. <zjDialogPicker
  253. ref="ycyyList"
  254. :isShow="ycyyShow"
  255. :multiple="false"
  256. :styleType="2"
  257. :title="'异常原因'"
  258. :list="ycyyList"
  259. :keyName="'label'"
  260. @cancel="ycyyShow = false"
  261. @confirm="confirmYcyy"
  262. />
  263. <zjDialogPicker
  264. ref="ywlxList"
  265. :isShow="ywlxShow"
  266. :multiple="false"
  267. :styleType="2"
  268. :title="'延误类型'"
  269. :list="ywlxList"
  270. :keyName="'label'"
  271. @cancel="ywlxShow = false"
  272. @confirm="confirmYwlx"
  273. />
  274. <u-datetime-picker
  275. :show="isShowDatePicker3"
  276. v-model="datePickerValue3"
  277. type="datetime"
  278. placeholder="选择日期和时间"
  279. @confirm="confirmDate3"
  280. @cancel="isShowDatePicker3 = false"
  281. @close="isShowDatePicker3 = false"
  282. :formatter="formatter"
  283. :style="{ width: '100%' }"
  284. />
  285. </zj-page-layout>
  286. </template>
  287. <script>
  288. import { uploadImgFull } from '@/common/utils/util.js'
  289. import zjDialogPicker from '@/components/zj-dialog/zj-dialog-picker.vue'
  290. export default {
  291. components: {
  292. zjDialogPicker
  293. },
  294. data() {
  295. return {
  296. typeVal: '备注',
  297. typeList: [
  298. { name: '备注', value: '备注' },
  299. { name: '预约', value: '预约' },
  300. { name: '改约', value: '改约' },
  301. { name: '异常反馈', value: '异常反馈' },
  302. { name: '完工反馈', value: '完工反馈' },
  303. { name: '待件', value: '待件' },
  304. { name: '拉修', value: '拉修' },
  305. { name: '不接电话', value: '不接电话' },
  306. { name: '延误', value: '延误' },
  307. { name: '质量信息', value: '质量信息' }
  308. ],
  309. ywlxList: [
  310. { label: '无人接听', value: '无人接听' },
  311. { label: '天气原因', value: '天气原因' },
  312. { label: '配件未到货', value: '配件未到货' },
  313. { label: '异常工单', value: '异常工单' }
  314. ],
  315. yclxShow: false,
  316. ycyyShow: false,
  317. ywlxShow: false,
  318. abnormalList: [],
  319. isShowDatePicker3: false,
  320. datePickerValue3: new Date().getTime(),
  321. minDate: new Date().getTime(),
  322. minDate2: null,
  323. maxDate2: null,
  324. datePickerValue: new Date().getTime(),
  325. isShowDatePicker: false,
  326. datePickerValue2: new Date().getTime(),
  327. isShowDatePicker2: false,
  328. canClickBtn: true,
  329. //
  330. id: '',
  331. yclxValue: '', //异常类型
  332. ycyyValue: '', //异常原因
  333. ywlxValue: '', //延误类型
  334. zlfkbh: '', //质量反馈编号
  335. date3: '', // 反馈日期时间
  336. date: '', //预约改约上门开始时间
  337. date2: '', //预约改约上门结束时间
  338. remarkVal: '', // 备注值
  339. imageList: [], //上传的文件数据
  340. signNameUrl: '', //签名
  341. daijian: [{ val1: '', val2: '' }], // 待件信息
  342. orderDetail: {}
  343. }
  344. },
  345. async onLoad({ id }) {
  346. this.id = id
  347. this.getOrderDetail()
  348. this.crossPage.$on('finishSign', async data => {
  349. this.signNameUrl = data
  350. })
  351. this.crossPage.$on('refreshFeedbackForm', () => {
  352. this.getOrderDetail()
  353. })
  354. this.$api
  355. .post('/pg/order/base/abnormalList', { exType: '' })
  356. .then(res => {
  357. this.abnormalList = res.data
  358. })
  359. .catch(res => {})
  360. },
  361. onUnload() {
  362. this.crossPage.$off('finishSign')
  363. this.crossPage.$off('refreshFeedbackForm')
  364. },
  365. computed: {
  366. yclxList() {
  367. return [...new Set(this.abnormalList.map(item => item.exType))]?.map(v => ({ label: v, value: v })) || []
  368. },
  369. ycyyList() {
  370. return this.yclxValue
  371. ? this.abnormalList
  372. ?.filter(item => item.exType === this.yclxValue)
  373. ?.map(v => ({ label: v.exNote, value: v.exNote }))
  374. : []
  375. }
  376. },
  377. methods: {
  378. // 添加待件
  379. addDaijian() {
  380. this.daijian.push({ val1: '', val2: '' })
  381. },
  382. // 删除待件
  383. delDaijian(index) {
  384. this.daijian.splice(index, 1)
  385. },
  386. // 异常类型
  387. confirmyClx([index]) {
  388. this.yclxValue = this.yclxList?.[index]?.label || ''
  389. this.ycyyValue = ''
  390. this.yclxShow = false
  391. },
  392. // 异常原因
  393. confirmYcyy([index]) {
  394. this.ycyyValue = this.ycyyList?.[index]?.label || ''
  395. this.ycyyShow = false
  396. },
  397. // 延误类型
  398. confirmYwlx([index]) {
  399. this.ywlxValue = this.ywlxList?.[index]?.label || ''
  400. this.ywlxShow = false
  401. },
  402. // 赋值预约改约开始时间
  403. confirmDate(e) {
  404. this.isShowDatePicker = false
  405. this.date = ''
  406. this.$nextTick(() => {
  407. this.date = this.formatTimestamp(e.value)
  408. this.date2 = ''
  409. this.datePickerValue2 = new Date(e.value).getTime()
  410. })
  411. },
  412. // 校验预约改约开始时间是否已选择
  413. setisShowDatePicker2() {
  414. if (!this.date) {
  415. return this.$tips(`请先选择${this.typeVal}开始时间`)
  416. }
  417. this.minDate2 = Number(new Date(this.date))
  418. this.maxDate2 = Number(this.getEndOfDayTimestamp(this.minDate2))
  419. console.log(this.date, this.minDate2, this.maxDate2)
  420. this.$nextTick(() => {
  421. this.isShowDatePicker2 = true
  422. })
  423. },
  424. getEndOfDayTimestamp(timestamp) {
  425. // 创建一个日期对象
  426. const date = new Date(timestamp)
  427. // 设置为当天的 23:59:59
  428. date.setHours(23, 59, 59, 999)
  429. // 返回时间戳
  430. return date.getTime()
  431. },
  432. // 赋值预约改约结束时间
  433. confirmDate2(e) {
  434. this.isShowDatePicker2 = false
  435. this.date2 = this.formatTimestamp(e.value)
  436. },
  437. // 赋值反馈日期
  438. confirmDate3(e) {
  439. this.isShowDatePicker3 = false
  440. this.date3 = this.formatTimestamp(e.value)
  441. },
  442. formatter(type, value) {
  443. if (type === 'year') {
  444. return `${value}年`
  445. }
  446. if (type === 'month') {
  447. return `${value}月`
  448. }
  449. if (type === 'day') {
  450. return `${value}日`
  451. }
  452. if (type === 'hour') {
  453. return `${value}时`
  454. }
  455. if (type === 'minute') {
  456. return `${value}分`
  457. }
  458. return value
  459. },
  460. // 获取详情
  461. getOrderDetail() {
  462. return new Promise((resolve, reject) => {
  463. this.$api
  464. .post('/pg/order/base/detail', {
  465. orderBaseId: this.id
  466. })
  467. .then(res => {
  468. this.orderDetail = res.data
  469. resolve(1)
  470. })
  471. .catch(res => {
  472. reject(0)
  473. })
  474. })
  475. },
  476. changeType(val) {
  477. if (!this.orderDetail.appointmentTime && val == '完工反馈') {
  478. return this.$tips('请先预约工单再完工反馈')
  479. }
  480. this.typeVal = val
  481. },
  482. // 去采集
  483. toCollect() {
  484. this.$navToPage({
  485. url: `/packageWorkorder/pages/infoCollect/list?id=${this.id}`
  486. })
  487. },
  488. formatTimestamp(timestamp) {
  489. const date = new Date(timestamp)
  490. const year = date.getFullYear()
  491. const month = (date.getMonth() + 1).toString().padStart(2, '0')
  492. const day = date.getDate().toString().padStart(2, '0')
  493. const hours = date.getHours().toString().padStart(2, '0')
  494. const minutes = date.getMinutes().toString().padStart(2, '0')
  495. const seconds = date.getSeconds().toString().padStart(2, '0')
  496. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  497. },
  498. // 添加图片
  499. async addImage() {
  500. uni.chooseImage({
  501. count: 6 - this.imageList.length,
  502. success: res => {
  503. uni.showLoading()
  504. res.tempFilePaths.forEach(async item => {
  505. let data = await uploadImgFull(item)
  506. this.imageList.push(data)
  507. })
  508. uni.hideLoading()
  509. },
  510. fail: err => {}
  511. })
  512. },
  513. // 删除图片
  514. delImage(index) {
  515. this.imageList.splice(index, 1)
  516. },
  517. //预览图片
  518. prevImg(current) {
  519. uni.previewImage({
  520. current,
  521. urls: this.imageList.map(item => {
  522. return item.url
  523. })
  524. })
  525. },
  526. prevSignImg(url) {
  527. uni.previewImage({
  528. current: url,
  529. urls: [url]
  530. })
  531. },
  532. // 去收费
  533. toCharge() {
  534. if (this.orderDetail.orderType == 'INSTALL') {
  535. this.$navToPage({
  536. url: `/packageMaterial/pages/sale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
  537. this.id
  538. }`
  539. })
  540. } else {
  541. this.$navToPage({
  542. url: `/packageMaterial/pages/newSale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
  543. this.id
  544. }`
  545. })
  546. }
  547. },
  548. toSignName() {
  549. this.$navToPage({
  550. url: `/packageWorkorder/pages/signName`
  551. })
  552. },
  553. // ----------------------------------------------------------------------
  554. // 提交
  555. async submitData() {
  556. if (!this.canClickBtn) return this.$toast('请勿频繁操作')
  557. this.canClickBtn = false
  558. setTimeout(() => {
  559. this.canClickBtn = true
  560. }, 3000)
  561. let params = {
  562. id: this.id,
  563. orderBaseId: this.id,
  564. type: this.typeVal,
  565. typeText: this.typeVal,
  566. imgSrc: this.imageList
  567. .map(item => {
  568. return item.url
  569. })
  570. .join(',')
  571. }
  572. if (~['延误'].indexOf(this.typeVal)) {
  573. if (!this.ywlxValue) {
  574. return this.$toast('请选择延误类型')
  575. }
  576. params.ywType = this.ywlxValue
  577. }
  578. if (~['待件'].indexOf(this.typeVal)) {
  579. if (!this.daijian.length) {
  580. return this.$toast('请填写待件信息')
  581. }
  582. for (var item of this.daijian) {
  583. if (!item.val1 || !item.val2) {
  584. return this.$toast('请填写完整待件信息')
  585. }
  586. }
  587. params.applyNum = this.daijian.map(item => `${item.val1}|${item.val2}`).join(',')
  588. }
  589. if (~['预约', '改约', '拉修', '不接电话', '延误', '待件'].indexOf(this.typeVal)) {
  590. if (!this.date) {
  591. return this.$toast('请选择开始时间')
  592. }
  593. if (!this.date2) {
  594. return this.$toast('请选择结束时间')
  595. }
  596. params.appointmentTime = this.date
  597. params.appointmentEndTime = this.date2
  598. }
  599. if (~['异常反馈'].indexOf(this.typeVal)) {
  600. if (!this.yclxValue) {
  601. return this.$toast('请选择异常类型')
  602. }
  603. if (!this.ycyyValue) {
  604. return this.$toast('请选择异常原因')
  605. }
  606. params.exType = this.yclxValue
  607. params.exNote = this.ycyyValue
  608. }
  609. if (~['完工反馈'].indexOf(this.typeVal)) {
  610. if (!this.signNameUrl) {
  611. return this.$toast('请签名')
  612. }
  613. const lo = await this.$getAddress()
  614. params.userSign = this.signNameUrl
  615. params.address = lo.address || ''
  616. }
  617. if (~['质量信息'].indexOf(this.typeVal)) {
  618. if (!this.zlfkbh) {
  619. return this.$toast('请输入质量反馈编号')
  620. }
  621. if (!this.date3) {
  622. return this.$toast('请选择反馈日期')
  623. }
  624. params.zlNumber = this.zlfkbh
  625. params.fkTime = this.date3
  626. }
  627. if (!this.remarkVal) {
  628. return this.$toast('请填写备注信息')
  629. } else {
  630. params.remark = this.remarkVal
  631. params.content = this.remarkVal
  632. params.overRemark = this.remarkVal
  633. }
  634. // ------------------------------------------------------------------
  635. // 改约
  636. if (~['预约', '改约'].indexOf(this.typeVal)) {
  637. this.$api
  638. .post('/changeOrder/changeAppointmentTime', {
  639. ...params
  640. })
  641. .then(res => {
  642. this.submitSuccess()
  643. })
  644. }
  645. // 完工反馈
  646. else if (~['完工反馈'].indexOf(this.typeVal)) {
  647. this.$api
  648. .post('/changeOrder/submitAll', {
  649. ...params
  650. })
  651. .then(res => {
  652. this.submitSuccess('YWG')
  653. })
  654. } else {
  655. this.$api
  656. .postJson('/pg/order/base/operator/add', {
  657. ...params
  658. })
  659. .then(res => {
  660. this.submitSuccess()
  661. })
  662. }
  663. },
  664. submitSuccess(tab = '') {
  665. this.$successToast('反馈成功')
  666. this.crossPage.$emit('refreshWorkorderList', { tab: tab })
  667. this.crossPage.$emit('refreshWorkorderDetail', '')
  668. setTimeout(() => {
  669. this.$navToPage(
  670. {
  671. delta: 1
  672. },
  673. 'navigateBack'
  674. )
  675. }, 500)
  676. }
  677. }
  678. }
  679. </script>
  680. <style lang="scss" scoped>
  681. .all-container {
  682. padding-bottom: 30rpx;
  683. }
  684. .common-title {
  685. font-size: 32rpx;
  686. font-weight: 600;
  687. padding: 30rpx 0;
  688. text {
  689. color: $minor-color;
  690. }
  691. }
  692. .type-container {
  693. background: #ffffff;
  694. padding: 0 30rpx;
  695. .list {
  696. display: flex;
  697. flex-wrap: wrap;
  698. justify-content: space-between;
  699. .item {
  700. width: calc((100% - 30rpx) / 3);
  701. height: 80rpx;
  702. line-height: 80rpx;
  703. text-align: center;
  704. border-radius: 20rpx;
  705. background: #f4f5f9;
  706. margin-bottom: 30rpx;
  707. &.active {
  708. background: $theme-color;
  709. color: #ffffff;
  710. }
  711. }
  712. }
  713. }
  714. .date-conteiner {
  715. background: #ffffff;
  716. padding: 30rpx 30rpx;
  717. .item {
  718. display: flex;
  719. align-items: center;
  720. justify-content: space-between;
  721. height: 50rpx;
  722. .label {
  723. margin-right: 30rpx;
  724. text {
  725. color: $error-color;
  726. }
  727. }
  728. .picker {
  729. .placeholder {
  730. color: $sec-font;
  731. }
  732. .iconfont {
  733. margin-left: 12rpx;
  734. color: $sec-font;
  735. }
  736. }
  737. }
  738. }
  739. .over-container {
  740. background: #ffffff;
  741. padding: 10rpx 30rpx;
  742. .row {
  743. height: 100rpx;
  744. display: flex;
  745. align-items: center;
  746. justify-content: space-between;
  747. .label {
  748. font-size: 32rpx;
  749. font-weight: 600;
  750. display: flex;
  751. align-items: center;
  752. text {
  753. color: $minor-color;
  754. }
  755. ::v-deep .u-icon {
  756. margin-left: 8rpx;
  757. }
  758. }
  759. .btn {
  760. ::v-deep .u-button {
  761. height: 60rpx;
  762. }
  763. }
  764. }
  765. }
  766. .sign-container {
  767. background: #ffffff;
  768. padding: 0 30rpx 30rpx;
  769. .empty {
  770. height: 200rpx;
  771. background: #f4f5f9;
  772. display: flex;
  773. align-items: center;
  774. justify-content: center;
  775. border-radius: 12rpx;
  776. color: $sec-font;
  777. }
  778. .img {
  779. position: relative;
  780. image {
  781. width: 100%;
  782. height: 200rpx;
  783. }
  784. text {
  785. position: absolute;
  786. right: -10rpx;
  787. top: -10rpx;
  788. width: 40rpx;
  789. height: 40rpx;
  790. border-radius: 50%;
  791. background: #ff3f42;
  792. font-size: 24rpx;
  793. color: #ffffff;
  794. text-align: center;
  795. line-height: 40rpx;
  796. display: block;
  797. }
  798. }
  799. }
  800. .remark-container {
  801. padding: 1rpx 30rpx 30rpx;
  802. background: #ffffff;
  803. ::v-deep .u-textarea {
  804. background: #f4f5f9;
  805. }
  806. }
  807. .image-container {
  808. padding: 1rpx 30rpx 30rpx;
  809. background: #ffffff;
  810. .images {
  811. display: flex;
  812. flex-wrap: wrap;
  813. .add {
  814. display: flex;
  815. flex-direction: column;
  816. align-items: center;
  817. justify-content: center;
  818. width: 146rpx;
  819. height: 146rpx;
  820. border: 2rpx dashed #dadada;
  821. border-radius: 10rpx;
  822. margin-top: 20rpx;
  823. .iconfont {
  824. font-size: 48rpx;
  825. color: #999999;
  826. }
  827. .text {
  828. font-size: 24rpx;
  829. color: #999999;
  830. margin-top: 10rpx;
  831. }
  832. }
  833. .img {
  834. position: relative;
  835. margin-right: 20rpx;
  836. margin-top: 20rpx;
  837. &:nth-child(4n) {
  838. margin-right: 0;
  839. }
  840. image {
  841. width: 150rpx;
  842. height: 150rpx;
  843. border-radius: 10rpx;
  844. overflow: hidden;
  845. display: block;
  846. }
  847. text {
  848. position: absolute;
  849. right: -10rpx;
  850. top: -10rpx;
  851. width: 40rpx;
  852. height: 40rpx;
  853. border-radius: 50%;
  854. background: #ff3f42;
  855. font-size: 24rpx;
  856. color: #ffffff;
  857. text-align: center;
  858. line-height: 40rpx;
  859. display: block;
  860. }
  861. }
  862. }
  863. }
  864. </style>