processFeedback.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  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. this.$nextTick(() => {
  420. this.isShowDatePicker2 = true
  421. })
  422. },
  423. getEndOfDayTimestamp(timestamp) {
  424. // 创建一个日期对象
  425. const date = new Date(timestamp)
  426. // 设置为当天的 23:59:59
  427. date.setHours(23, 59, 59, 999)
  428. // 返回时间戳
  429. return date.getTime()
  430. },
  431. // 赋值预约改约结束时间
  432. confirmDate2(e) {
  433. this.isShowDatePicker2 = false
  434. this.date2 = this.formatTimestamp(e.value)
  435. },
  436. // 赋值反馈日期
  437. confirmDate3(e) {
  438. this.isShowDatePicker3 = false
  439. this.date3 = this.formatTimestamp(e.value)
  440. },
  441. formatter(type, value) {
  442. if (type === 'year') {
  443. return `${value}年`
  444. }
  445. if (type === 'month') {
  446. return `${value}月`
  447. }
  448. if (type === 'day') {
  449. return `${value}日`
  450. }
  451. if (type === 'hour') {
  452. return `${value}时`
  453. }
  454. if (type === 'minute') {
  455. return `${value}分`
  456. }
  457. return value
  458. },
  459. // 获取详情
  460. getOrderDetail() {
  461. return new Promise((resolve, reject) => {
  462. this.$api
  463. .post('/pg/order/base/detail', {
  464. orderBaseId: this.id
  465. })
  466. .then(res => {
  467. this.orderDetail = res.data
  468. resolve(1)
  469. })
  470. .catch(res => {
  471. reject(0)
  472. })
  473. })
  474. },
  475. changeType(val) {
  476. if (!this.orderDetail.appointmentTime && val == '完工反馈') {
  477. return this.$tips('请先预约工单再完工反馈')
  478. }
  479. this.typeVal = val
  480. },
  481. // 去采集
  482. toCollect() {
  483. this.$navToPage({
  484. url: `/packageWorkorder/pages/infoCollect/list?id=${this.id}`
  485. })
  486. },
  487. formatTimestamp(timestamp) {
  488. const date = new Date(timestamp)
  489. const year = date.getFullYear()
  490. const month = (date.getMonth() + 1).toString().padStart(2, '0')
  491. const day = date.getDate().toString().padStart(2, '0')
  492. const hours = date.getHours().toString().padStart(2, '0')
  493. const minutes = date.getMinutes().toString().padStart(2, '0')
  494. const seconds = date.getSeconds().toString().padStart(2, '0')
  495. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
  496. },
  497. // 添加图片
  498. async addImage() {
  499. uni.chooseImage({
  500. count: 6 - this.imageList.length,
  501. success: res => {
  502. uni.showLoading()
  503. res.tempFilePaths.forEach(async item => {
  504. let data = await uploadImgFull(item)
  505. this.imageList.push(data)
  506. })
  507. uni.hideLoading()
  508. },
  509. fail: err => {}
  510. })
  511. },
  512. // 删除图片
  513. delImage(index) {
  514. this.imageList.splice(index, 1)
  515. },
  516. //预览图片
  517. prevImg(current) {
  518. uni.previewImage({
  519. current,
  520. urls: this.imageList.map(item => {
  521. return item.url
  522. })
  523. })
  524. },
  525. prevSignImg(url) {
  526. uni.previewImage({
  527. current: url,
  528. urls: [url]
  529. })
  530. },
  531. // 去收费
  532. toCharge() {
  533. if (this.orderDetail.orderType == 'INSTALL') {
  534. this.$navToPage({
  535. url: `/packageMaterial/pages/sale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
  536. this.id
  537. }`
  538. })
  539. } else {
  540. this.$navToPage({
  541. url: `/packageMaterial/pages/newSale/index?type=${this.orderDetail.orderType == 'INSTALL' ? 'M' : 'P'}&oid=${
  542. this.id
  543. }`
  544. })
  545. }
  546. },
  547. toSignName() {
  548. this.$navToPage({
  549. url: `/packageWorkorder/pages/signName`
  550. })
  551. },
  552. // ----------------------------------------------------------------------
  553. // 提交
  554. async submitData() {
  555. if (!this.canClickBtn) return this.$toast('请勿频繁操作')
  556. this.canClickBtn = false
  557. setTimeout(() => {
  558. this.canClickBtn = true
  559. }, 3000)
  560. let params = {
  561. id: this.id,
  562. orderBaseId: this.id,
  563. type: this.typeVal,
  564. typeText: this.typeVal,
  565. imgSrc: this.imageList
  566. .map(item => {
  567. return item.url
  568. })
  569. .join(',')
  570. }
  571. if (~['延误'].indexOf(this.typeVal)) {
  572. if (!this.ywlxValue) {
  573. return this.$toast('请选择延误类型')
  574. }
  575. params.ywType = this.ywlxValue
  576. }
  577. if (~['待件'].indexOf(this.typeVal)) {
  578. if (!this.daijian.length) {
  579. return this.$toast('请填写待件信息')
  580. }
  581. for (var item of this.daijian) {
  582. if (!item.val1 || !item.val2) {
  583. return this.$toast('请填写完整待件信息')
  584. }
  585. }
  586. params.applyNum = this.daijian.map(item => `${item.val1}|${item.val2}`).join(',')
  587. }
  588. if (~['预约', '改约', '拉修', '不接电话', '延误', '待件'].indexOf(this.typeVal)) {
  589. if (!this.date) {
  590. return this.$toast('请选择开始时间')
  591. }
  592. if (!this.date2) {
  593. return this.$toast('请选择结束时间')
  594. }
  595. params.appointmentTime = this.date
  596. params.appointmentEndTime = this.date2
  597. }
  598. if (~['异常反馈'].indexOf(this.typeVal)) {
  599. if (!this.yclxValue) {
  600. return this.$toast('请选择异常类型')
  601. }
  602. if (!this.ycyyValue) {
  603. return this.$toast('请选择异常原因')
  604. }
  605. params.exType = this.yclxValue
  606. params.exNote = this.ycyyValue
  607. }
  608. if (~['完工反馈'].indexOf(this.typeVal)) {
  609. if (!this.signNameUrl) {
  610. return this.$toast('请签名')
  611. }
  612. const lo = await this.$getAddress()
  613. params.userSign = this.signNameUrl
  614. params.address = lo.address || ''
  615. }
  616. if (~['质量信息'].indexOf(this.typeVal)) {
  617. if (!this.zlfkbh) {
  618. return this.$toast('请输入质量反馈编号')
  619. }
  620. if (!this.date3) {
  621. return this.$toast('请选择反馈日期')
  622. }
  623. params.zlNumber = this.zlfkbh
  624. params.fkTime = this.date3
  625. }
  626. if (!this.remarkVal) {
  627. return this.$toast('请填写备注信息')
  628. } else {
  629. params.remark = this.remarkVal
  630. params.content = this.remarkVal
  631. params.overRemark = this.remarkVal
  632. }
  633. // ------------------------------------------------------------------
  634. // 改约
  635. if (~['预约', '改约'].indexOf(this.typeVal)) {
  636. this.$api
  637. .post('/changeOrder/changeAppointmentTime', {
  638. ...params
  639. })
  640. .then(res => {
  641. this.submitSuccess()
  642. })
  643. }
  644. // 完工反馈
  645. else if (~['完工反馈'].indexOf(this.typeVal)) {
  646. this.$api
  647. .post('/changeOrder/submitAll', {
  648. ...params
  649. })
  650. .then(res => {
  651. this.submitSuccess('YWG')
  652. })
  653. } else {
  654. this.$api
  655. .postJson('/pg/order/base/operator/add', {
  656. ...params
  657. })
  658. .then(res => {
  659. this.submitSuccess()
  660. })
  661. }
  662. },
  663. submitSuccess(tab = '') {
  664. this.$successToast('反馈成功')
  665. this.crossPage.$emit('refreshWorkorderList', { tab: tab })
  666. this.crossPage.$emit('refreshWorkorderDetail', '')
  667. setTimeout(() => {
  668. this.$navToPage(
  669. {
  670. delta: 1
  671. },
  672. 'navigateBack'
  673. )
  674. }, 500)
  675. }
  676. }
  677. }
  678. </script>
  679. <style lang="scss" scoped>
  680. .all-container {
  681. padding-bottom: 30rpx;
  682. }
  683. .common-title {
  684. font-size: 32rpx;
  685. font-weight: 600;
  686. padding: 30rpx 0;
  687. text {
  688. color: $minor-color;
  689. }
  690. }
  691. .type-container {
  692. background: #ffffff;
  693. padding: 0 30rpx;
  694. .list {
  695. display: flex;
  696. flex-wrap: wrap;
  697. justify-content: space-between;
  698. .item {
  699. width: calc((100% - 30rpx) / 3);
  700. height: 80rpx;
  701. line-height: 80rpx;
  702. text-align: center;
  703. border-radius: 20rpx;
  704. background: #f4f5f9;
  705. margin-bottom: 30rpx;
  706. &.active {
  707. background: $theme-color;
  708. color: #ffffff;
  709. }
  710. }
  711. }
  712. }
  713. .date-conteiner {
  714. background: #ffffff;
  715. padding: 30rpx 30rpx;
  716. .item {
  717. display: flex;
  718. align-items: center;
  719. justify-content: space-between;
  720. height: 50rpx;
  721. .label {
  722. margin-right: 30rpx;
  723. text {
  724. color: $error-color;
  725. }
  726. }
  727. .picker {
  728. .placeholder {
  729. color: $sec-font;
  730. }
  731. .iconfont {
  732. margin-left: 12rpx;
  733. color: $sec-font;
  734. }
  735. }
  736. }
  737. }
  738. .over-container {
  739. background: #ffffff;
  740. padding: 10rpx 30rpx;
  741. .row {
  742. height: 100rpx;
  743. display: flex;
  744. align-items: center;
  745. justify-content: space-between;
  746. .label {
  747. font-size: 32rpx;
  748. font-weight: 600;
  749. display: flex;
  750. align-items: center;
  751. text {
  752. color: $minor-color;
  753. }
  754. ::v-deep .u-icon {
  755. margin-left: 8rpx;
  756. }
  757. }
  758. .btn {
  759. ::v-deep .u-button {
  760. height: 60rpx;
  761. }
  762. }
  763. }
  764. }
  765. .sign-container {
  766. background: #ffffff;
  767. padding: 0 30rpx 30rpx;
  768. .empty {
  769. height: 200rpx;
  770. background: #f4f5f9;
  771. display: flex;
  772. align-items: center;
  773. justify-content: center;
  774. border-radius: 12rpx;
  775. color: $sec-font;
  776. }
  777. .img {
  778. position: relative;
  779. image {
  780. width: 100%;
  781. height: 200rpx;
  782. }
  783. text {
  784. position: absolute;
  785. right: -10rpx;
  786. top: -10rpx;
  787. width: 40rpx;
  788. height: 40rpx;
  789. border-radius: 50%;
  790. background: #ff3f42;
  791. font-size: 24rpx;
  792. color: #ffffff;
  793. text-align: center;
  794. line-height: 40rpx;
  795. display: block;
  796. }
  797. }
  798. }
  799. .remark-container {
  800. padding: 1rpx 30rpx 30rpx;
  801. background: #ffffff;
  802. ::v-deep .u-textarea {
  803. background: #f4f5f9;
  804. }
  805. }
  806. .image-container {
  807. padding: 1rpx 30rpx 30rpx;
  808. background: #ffffff;
  809. .images {
  810. display: flex;
  811. flex-wrap: wrap;
  812. .add {
  813. display: flex;
  814. flex-direction: column;
  815. align-items: center;
  816. justify-content: center;
  817. width: 146rpx;
  818. height: 146rpx;
  819. border: 2rpx dashed #dadada;
  820. border-radius: 10rpx;
  821. margin-top: 20rpx;
  822. .iconfont {
  823. font-size: 48rpx;
  824. color: #999999;
  825. }
  826. .text {
  827. font-size: 24rpx;
  828. color: #999999;
  829. margin-top: 10rpx;
  830. }
  831. }
  832. .img {
  833. position: relative;
  834. margin-right: 20rpx;
  835. margin-top: 20rpx;
  836. &:nth-child(4n) {
  837. margin-right: 0;
  838. }
  839. image {
  840. width: 150rpx;
  841. height: 150rpx;
  842. border-radius: 10rpx;
  843. overflow: hidden;
  844. display: block;
  845. }
  846. text {
  847. position: absolute;
  848. right: -10rpx;
  849. top: -10rpx;
  850. width: 40rpx;
  851. height: 40rpx;
  852. border-radius: 50%;
  853. background: #ff3f42;
  854. font-size: 24rpx;
  855. color: #ffffff;
  856. text-align: center;
  857. line-height: 40rpx;
  858. display: block;
  859. }
  860. }
  861. }
  862. }
  863. </style>