tousu.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. <template>
  2. <view class="container">
  3. <cu-custom bgColor="bg-luohu" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">客户投诉</block>
  6. </cu-custom>
  7. <view class="cu-form-group" style="z-index: 999;">
  8. <view class="title">投诉单位</view>
  9. <input v-model="form.guanLianKeHu" name="input" placeholder="请输入投诉单位" disabled>
  10. </view>
  11. <view class="cu-form-group" style="z-index: 999;">
  12. <view class="title">
  13. <span style="color: red;">*</span>
  14. 投诉人
  15. </view>
  16. <input v-model="form.Complainants" name="input" placeholder="请输入投诉人" :disabled="id != '' ? true : false">
  17. </view>
  18. <view class="cu-form-group" style="z-index: 999;">
  19. <view class="title">
  20. <span style="color: red;">*</span>
  21. 电话
  22. </view>
  23. <input v-model="form.telephone" name="input" placeholder="请输入电话" :disabled="id != '' ? true : false">
  24. </view>
  25. <view class="cu-form-group" style="z-index: 999;">
  26. <view class="title">
  27. <span style="color: red;">*</span>
  28. 投诉日期
  29. </view>
  30. <input v-model="form.touSuRiQi" name="input" placeholder="请输入投诉日期" disabled @click="showClick">
  31. </view>
  32. <view class="cu-form-group" style="z-index: 999;">
  33. <view class="title">
  34. <span style="color: red;">*</span>
  35. 邮箱
  36. </view>
  37. <input v-model="form.postcode" name="input" placeholder="请输入邮箱" :disabled="id != '' ? true : false">
  38. </view>
  39. <view class="cu-form-group" style="z-index: 999;">
  40. <view class="title">
  41. <span style="color: red;">*</span>
  42. 关联样品
  43. </view>
  44. <input v-model="form.guanLianYangPin" name="input" placeholder="请选择关联样品" disabled v-if="form.guanLianYangPin == '' && id == ''">
  45. <text style="width: 100%;" @click="getShow" v-else>{{getYangPin(form.guanLianYangPin)}}</text>
  46. <u-button type="success" size="mini" @click="getShow" v-if="form.guanLianYangPin == '' && id == ''">选择
  47. </u-button>
  48. <u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42" v-if="form.guanLianYangPin != '' && id == ''" @click="form.guanLianYangPin = ''"></u-icon>
  49. </view>
  50. <view class="cu-form-group" style="z-index: 999;">
  51. <view class="title">
  52. <span style="color: red;">*</span>
  53. 投诉方式
  54. </view>
  55. <input v-model="form.complaintsWay" name="input" placeholder="请选择投诉方式">
  56. <u-button type="success" size="mini" @click="selectShowClick" v-if="form.complaintsWay == '' && id == ''">选择
  57. </u-button>
  58. <u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42" v-if="form.complaintsWay != '' && id == ''" @click="form.complaintsWay = ''"></u-icon>
  59. <!-- <input v-model="form.complaintsWay" name="input" placeholder="请输入投诉方式" disabled @click="selectShowClick"> -->
  60. </view>
  61. <uni-section title="投诉内容" type="line" padding>
  62. <textarea maxlength="-1" auto-height v-model="form.content" placeholder="投诉内容" :disabled="id != '' ? true : false"></textarea>
  63. </uni-section>
  64. <uni-section title="上传附件" type="line">
  65. <view class="example-body" v-if="id == ''">
  66. <uni-file-picker limit="100" file-mediatype="all" @select="select" @progress="progress" @success="success" @fail="fail" @delete="deleteMe" :auto-upload="false" ref="uploadMe"></uni-file-picker>
  67. </view>
  68. <view class="u-p-b-15">
  69. <view v-for="(item,index) in fuJianShangChuanArray" :key="index" style="margin: 0 10rpx;">
  70. <view class="fileBox">
  71. <view @click="uploadClick(item.id,item.name)">
  72. <u-icon size="30" name="file-text-fill"></u-icon>
  73. {{item.name}}
  74. </view>
  75. <view style="width: 50rpx;" @click="deleteMe(item.id)" v-if="(type != 1 && type != 2)">
  76. <u-icon size="26" name="close"></u-icon>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. </uni-section>
  82. <view v-if="id != ''">
  83. <uni-section title="确认意见" type="line" v-if="form.shiFouGuoShen == '已反馈' || form.shiFouGuoShen == '已审核' || form.shiFouGuoShen == '已处理' || form.shiFouGuoShen == '已处理结果确认' || form.shiFouGuoShen == '1'">
  84. <view class="u-m-15 u-p-b-15">
  85. {{form.youWuYouXiaoTouSu}}
  86. </view>
  87. <view class="u-m-15 u-p-b-15">
  88. 审批意见:{{option2}}
  89. </view>
  90. </uni-section>
  91. <uni-section title="处理措施" type="line" v-if="form.shiFouGuoShen == '已反馈' || form.shiFouGuoShen == '已处理' || form.shiFouGuoShen == '已处理结果确认' || form.shiFouGuoShen == '1'">
  92. <view class="u-m-15 u-p-b-15">
  93. 调查情况:{{form.officeSurvey}}
  94. </view>
  95. <view class="u-m-15 u-p-b-15">
  96. 处理措施:{{form.chuLiCuoShi}}
  97. </view>
  98. <view class="u-m-15 u-p-b-15">
  99. 审批意见:{{option3}}
  100. </view>
  101. </uni-section>
  102. <uni-section title="处理结果确认" type="line" v-if="form.shiFouGuoShen == '已反馈' || form.shiFouGuoShen == '已处理结果确认' || form.shiFouGuoShen == '1'">
  103. <view class="u-m-15 u-p-b-15">
  104. 处理时间:{{form.chuLiShiJian}}
  105. </view>
  106. <view class="u-m-15 u-p-b-15">
  107. 审批意见:{{option4}}
  108. </view>
  109. </uni-section>
  110. <uni-section title="处理结果是否通知当事人" type="line" v-if="form.shiFouGuoShen == '已反馈' || form.shiFouGuoShen == '1'">
  111. <view class="u-m-15 u-p-b-15">
  112. 通知:{{form.chuLiJieGuoShiFou}}
  113. </view>
  114. <view class="u-m-15 u-p-b-15">
  115. 审批意见:{{option}}
  116. </view>
  117. </uni-section>
  118. </view>
  119. <view v-if="(id != '' && form.shiFouGuoShen == '1') || (id != '' && type == '1')">
  120. <uni-section title="客户确认" type="line">
  121. <view class="u-m-15 u-p-b-15">
  122. <uni-data-checkbox selectedColor="red" v-model="form.shiFouTongYi" :localdata="sexList" v-if="type == '1'">
  123. </uni-data-checkbox>
  124. <view v-if="type == '2'">{{form.shiFouTongYi}}</view>
  125. </view>
  126. </uni-section>
  127. <uni-section title="签名" type="line" padding>
  128. <view style="width: 100%;">
  129. <view style="text-align: right;width: 100%;" v-if="type == '1'">
  130. <view v-if="id != ''">
  131. <u-button type="primary" size="mini" @click="qianming">
  132. 签名</u-button>
  133. <u-button type="primary" size="mini" @click="deqianming" style="margin-left: 15rpx;" v-if="form.qianMing != ''">
  134. 取消</u-button>
  135. </view>
  136. </view>
  137. <view style="width: 100%;" v-if="form.qianMing != ''">
  138. <image :src="form.qianMing" style="width: 100%;height: 500rpx;border: 1px #eee solid;">
  139. </image>
  140. </view>
  141. </view>
  142. </uni-section>
  143. </view>
  144. <view class="padding flex flex-direction">
  145. <u-button type="success" class="btn btn-back-color" @click="onSubmit" v-if="id == ''">提交
  146. </u-button>
  147. <u-button type="success" class="btn btn-back-color" @click="getArgee()" v-if="id != '' && type == '1'">签名确认
  148. </u-button>
  149. </view>
  150. <u-calendar v-model="show" :mode="mode" @change="dateChange"></u-calendar>
  151. <!-- <u-select v-model="selectShow" :list="list" title="投诉方式" @confirm="selecConfirm"></u-select> -->
  152. <lin-popup ref="picker2" :title="'投诉方式'" :list="list" @onConfirm="selecConfirm"></lin-popup>
  153. <lin-popup ref="picker" :title="'样品选择'" :list="yangPinList" @onConfirm="onConfirm"></lin-popup>
  154. <u-popup mode="center" v-model="popupShow">
  155. <view style="padding: 30rpx;background: #FFFFFF;width: 100%;">
  156. <view class="cu-form-group ">
  157. <view class="title">签名</view>
  158. </view>
  159. <autograph @save="save" @clear="clear" @close="close"></autograph>
  160. </view>
  161. </u-popup>
  162. </view>
  163. </template>
  164. <script>
  165. import {
  166. ACCESS_TOKEN,
  167. USER_NAME,
  168. USER_INFO
  169. } from "@/common/util/constants" // 拉取登录token,userName,userInfo
  170. import http from '@/common/service/http.js'
  171. import appSelect from '@/components/my-componets/appSelect.vue'
  172. import myDate from '@/components/my-componets/my-date.vue'
  173. import test from './tousu/list.json'
  174. import autograph from '@/components/autograph/autograph'
  175. export default {
  176. components: {
  177. myDate,
  178. appSelect,
  179. autograph
  180. },
  181. data() {
  182. return {
  183. option2: '',
  184. option3: '',
  185. option4: '',
  186. show: false,
  187. mode: 'date',
  188. selectShow: false,
  189. list: test.list,
  190. buMenList: [],
  191. fuJianShangChuanArray: [],
  192. popupShow: false,
  193. id: '',
  194. type: '',
  195. form: {
  196. id: '',
  197. guanLianKeHu: '',
  198. company: "",
  199. telephone: "",
  200. postcode: "",
  201. Complainants: "",
  202. touSuRiQi: "",
  203. guanLianYangPin: "",
  204. complaintsWay: "",
  205. content: "",
  206. yeShu: "",
  207. fuJianShangChuan: "",
  208. youWuYouXiaoTouSu: "",
  209. xuanZeRen: '',
  210. officeSurvey: "",
  211. chuLiCuoShi: "",
  212. chuLiShiJian: "",
  213. chuLiJieGuoShiFou: "",
  214. shiFouTongYi: "",
  215. qianMing: "",
  216. bianZhiRen: "",
  217. bianZhiSJ: "",
  218. bianZhiBuMen: "",
  219. acceptor: "",
  220. // acceptanceDate: "",
  221. shouLiBuMen: "",
  222. zeRenBuMenFuZeRen: "",
  223. zeRenShouLiRiQi: "",
  224. zeRenBuMen: "",
  225. zhiLiangFuZeRen: "",
  226. zhiLiangRiQi: "",
  227. zhiLiangBuMen: "",
  228. shouLiRen2: "",
  229. shouLiRiQi2: "",
  230. shouLiBuMen2: "",
  231. qianMingRiQi: "",
  232. shiFouGuoShen: '',
  233. shouLiRiQi3: '',
  234. qiMingRen: ''
  235. },
  236. sexList: [{
  237. text: "同意",
  238. value: "同意"
  239. }, {
  240. text: "不同意",
  241. value: "不同意"
  242. }],
  243. yangPinList: [],
  244. option: '',
  245. orgId: ''
  246. }
  247. },
  248. filters: {
  249. },
  250. onLoad(options) {
  251. if (options.id) {
  252. this.id = options.id
  253. this.type = options.type
  254. this.getTaskId(this.id)
  255. }
  256. },
  257. created() {
  258. var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
  259. var time = nowDate.toJSON().split('T').join(' ').substr(0, 10);
  260. let info = uni.getStorageSync(USER_INFO);
  261. let useId = info.user.id
  262. let name = info.user.name
  263. this.form.Complainants = name
  264. this.form.guanLianKeHu = info.user.qq
  265. this.form.telephone = info.user.mobile
  266. this.form.company = useId
  267. this.form.postcode = info.user.email
  268. this.form.touSuRiQi = time
  269. this.orgId = info.org.id
  270. this.getData()
  271. },
  272. methods: {
  273. //根据投诉id查询 taskId
  274. getTaskId(id) {
  275. let sql =
  276. `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '客户确认' and NODE_ID_ = 'Activity_1sdpied' and PROC_DEF_KEY_ = 'Process_1ydqnej' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_1sdpied' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
  277. let requestData = this.$sig(sql)
  278. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  279. if (res.data.state == 200) {
  280. if (res.data.variables.data.length > 0) {
  281. let result = res.data.variables.data[0]
  282. if (result.TASK_ID_) {
  283. this.taskId = result.TASK_ID_
  284. }
  285. }
  286. }
  287. })
  288. },
  289. //根据委托单id查询 taskId
  290. getProcInstId(id, type) {
  291. let sql =
  292. `select OPTION_,CREATE_TIME_,CREATE_BY_ FROM ibps_bpm_oper_log WHERE PROC_INST_ID_ = (SELECT PROC_INST_ID_ FROM ibps_bpm_bus_rel WHERE BUSINESSKEY_ = '${id}')AND NODE_ID_ = '${type}' order by CREATE_TIME_ DESC LIMIT 1`
  293. let requestData = this.$sig(sql)
  294. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  295. if (res.data.state == 200) {
  296. let result = res.data.variables.data[0]
  297. if (type == 'Activity_08txd6d') {
  298. this.option2 = result.OPTION_
  299. }
  300. if (type == 'Activity_0r73zvr') {
  301. this.option3 = result.OPTION_
  302. }
  303. if (type == 'Activity_0u632sc') {
  304. this.option4 = result.OPTION_
  305. }
  306. if (type == 'Activity_0dpz207') {
  307. this.option = result.OPTION_
  308. }
  309. }
  310. })
  311. },
  312. //查投诉详情
  313. getDe(id) {
  314. let sql =
  315. `select a.*,b.name_ from t_complaint a left join ibps_party_employee b on a.complainants_ = b.id_ where a.id_ = '${id}'`
  316. let requestData = this.$sig(sql)
  317. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  318. if (res.data.state == 200) {
  319. const data = res.data.variables.data[0]
  320. this.form.id = data.id_
  321. // this.form.ComplainantsName = data.name_
  322. this.form.Complainants = data.complainants_
  323. this.form.telephone = data.telephone_
  324. this.form.postcode = data.postcode_
  325. this.form.company = data.company_
  326. this.form.touSuRiQi = data.tou_su_ri_qi_
  327. this.form.address = data.address_
  328. this.form.complaintsWay = data.complaints_way_
  329. this.form.content = data.content_
  330. this.form.yeShu = data.ye_shu_
  331. this.form.fuJianShangChuan = data.fu_jian_shang_chu
  332. this.form.youWuYouXiaoTouSu = data.you_wu_you_xiao_
  333. this.form.officeSurvey = data.office_survey_
  334. this.form.chuLiCuoShi = data.chu_li_cuo_shi_
  335. this.form.chuLiShiJian = data.chu_li_shi_jian_
  336. this.form.chuLiJieGuoShiFou = data.chu_li_jie_guo_sh
  337. this.form.shiFouTongYi = data.shi_fou_tong_yi_
  338. this.form.bianZhiRen = data.bian_zhi_ren_
  339. this.form.bianZhiSJ = data.bian_zhi_sj_
  340. this.form.bianZhiBuMen = data.bian_zhi_bu_men_
  341. this.form.acceptor = data.acceptor_
  342. // this.form.acceptanceDate = data.acceptance_date_
  343. this.form.shouLiBuMen = data.shou_li_bu_men_
  344. this.form.zeRenBuMenFuZeRen = data.ze_ren_bu_men_fu_
  345. this.form.zeRenShouLiRiQi = data.ze_ren_shou_li_ri
  346. this.form.zeRenBuMen = data.zhi_liang_bu_men_
  347. this.form.zhiLiangFuZeRen = data.zhi_liang_fu_ze_r
  348. this.form.zhiLiangRiQi = data.zhi_liang_ri_qi_
  349. this.form.zhiLiangBuMen = data.zhi_liang_bu_men_
  350. this.form.shouLiRen2 = data.shou_li_ren_2_
  351. this.form.shouLiRiQi2 = data.shou_li_ri_qi_2_
  352. this.form.shouLiBuMen2 = data.shou_li_bu_men_2_
  353. this.form.shiFouGuoShen = data.shi_fou_guo_shen_
  354. this.form.xuanZeRen = data.xuan_ze_ren_
  355. this.form.qianMing = data.qian_ming_
  356. this.form.qianMingRiQi = data.qian_ming_ri_qi_
  357. this.form.shouLiRiQi3 = data.shou_li_ri_qi_3_
  358. this.form.guanLianYangPin = data.guan_lian_yang_pi
  359. this.form.qiMingRen = data.qi_ming_ren_
  360. if (data.fu_jian_shang_chu && data.fu_jian_shang_chu != '') {
  361. this.getFileList(data.fu_jian_shang_chu)
  362. }
  363. if (data.shi_fou_guo_shen_ == '已反馈' || data.shi_fou_guo_shen_ == '已审核' || data.shi_fou_guo_shen_ == '已处理' || data.shi_fou_guo_shen_ == '已处理结果确认' || data.shi_fou_guo_shen_ == '1') {
  364. this.getProcInstId(data.id_, 'Activity_08txd6d')
  365. }
  366. if (data.shi_fou_guo_shen_ == '已反馈' || data.shi_fou_guo_shen_ == '已处理' || data.shi_fou_guo_shen_ == '已处理结果确认' || data.shi_fou_guo_shen_ == '1') {
  367. this.getProcInstId(data.id_, 'Activity_0r73zvr')
  368. }
  369. if (data.shi_fou_guo_shen_ == '已反馈' || data.shi_fou_guo_shen_ == '已处理结果确认' || data.shi_fou_guo_shen_ == '1') {
  370. this.getProcInstId(data.id_, 'Activity_0u632sc')
  371. }
  372. if (data.shi_fou_guo_shen_ == '已反馈' || data.shi_fou_guo_shen_ == '1') {
  373. this.getProcInstId(data.id_, 'Activity_0dpz207')
  374. }
  375. uni.hideLoading()
  376. }
  377. })
  378. },
  379. getFileList(ids) {
  380. this.$uploades.getFilesList(ids, this).then(res => {
  381. this.fuJianShangChuanArray = res
  382. })
  383. },
  384. // 获取上传状态
  385. select(file) {
  386. this.$uploades.selectUpload(file).then(res => {
  387. res.forEach(item => {
  388. this.fuJianShangChuanArray.push(item)
  389. })
  390. })
  391. },
  392. // 删除
  393. deleteMe(id) {
  394. this.fuJianShangChuanArray = this.fuJianShangChuanArray.filter(item => item.id !== id)
  395. },
  396. // 获取上传进度
  397. progress(e) {},
  398. // 上传成功
  399. success(file) {},
  400. // 上传失败
  401. fail(e) {},
  402. onSubmit() {
  403. if (!this.form.guanLianYangPin) {
  404. return this.$methCommon.getPrompt('请选择样品')
  405. }
  406. let tmpArray = []
  407. this.fuJianShangChuanArray.forEach((item) => {
  408. tmpArray.push(item.id)
  409. })
  410. let info = uni.getStorageSync(USER_INFO);
  411. let useId = info.user.id
  412. var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
  413. var time = nowDate.toJSON().split('T').join(' ').substr(0, 10);
  414. let para = {
  415. "parameters": [{
  416. "key": "defId",
  417. "value": "887034508145065984"
  418. },
  419. {
  420. "key": "version",
  421. "value": "0"
  422. },
  423. {
  424. "key": "data",
  425. "value": ""
  426. }
  427. ]
  428. }
  429. this.form.nianDu = time.substring(0, 4)
  430. this.form.fuJianShangChuan = tmpArray.join(",")
  431. this.form.bianZhiRen = useId
  432. this.form.bianZhiSJ = time
  433. this.form.shiFouGuoShen = "已编制"
  434. this.form.zhuangTai = "已登记"
  435. this.form.bianZhiBuMen = "1041786072788369408"
  436. para.parameters[2].value = JSON.stringify(this.form);
  437. let that = this;
  438. this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
  439. if (res.data.state == 200) {
  440. this.$methCommon.getPrompt('提交成功', 'success')
  441. this.$Router.replace({
  442. name: 'index'
  443. })
  444. } else {
  445. this.$methCommon.getPrompt('请求出现错误', 'error')
  446. }
  447. }).catch((err) => {
  448. this.$methCommon.getPrompt('请求出现错误,请稍后再试', 'error')
  449. })
  450. },
  451. //签名确定
  452. getArgee() {
  453. uni.showLoading({
  454. mask: true,
  455. title: '加载中'
  456. });
  457. let info = uni.getStorageSync(USER_INFO);
  458. let useId = info.user.id
  459. var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
  460. var time = nowDate.toJSON().split('T').join(' ').substr(0, 10);
  461. this.form.qianMingRiQi = time
  462. this.form.shiFouGuoShen = '1'
  463. this.form.qianMingRen = useId
  464. this.form.zhuangTai = "已完成"
  465. let editData = {
  466. data: JSON.stringify(this.form),
  467. opinion: '',
  468. taskId: this.taskId
  469. }
  470. this.$http.post("/ibps/business/v3/bpm/task/agree", editData).then(res => {
  471. if (res.data.state == 200) {
  472. this.$methCommon.getPrompt('提交成功', 'success')
  473. uni.hideLoading();
  474. this.$Router.replaceAll({
  475. name: 'index'
  476. })
  477. } else {
  478. this.$methCommon.getPrompt('提交异常', 'error')
  479. this.$Router.replaceAll({
  480. name: 'index'
  481. })
  482. }
  483. });
  484. },
  485. getHouSumit(form) {
  486. let params = {
  487. qian_ming_ri_qi_: form.qianMingRiQi,
  488. qian_ming_: form.qianMing,
  489. shi_fou_guo_shen_: '1',
  490. shi_fou_tong_yi_: form.shiFouTongYi
  491. }
  492. let pp = {
  493. paramWhere: [{
  494. id_: form.id
  495. }],
  496. tableName: "t_complaint",
  497. paramCond: params
  498. }
  499. let data = this.$sig(pp)
  500. this.$http.post("ibps/business/v3/sys/universal/updateDatasContextTable", data).then(res => {
  501. if (res.data.state == 200) {} else {}
  502. });
  503. },
  504. dateChange(e) {
  505. this.form.touSuRiQi = e.result
  506. },
  507. selecConfirm(index, item) {
  508. this.form.complaintsWay = item.name
  509. },
  510. selectShowClick() {
  511. // if (this.id == '') {
  512. // this.selectShow = true
  513. // }
  514. if (this.id != '') {
  515. return
  516. }
  517. this.$refs['picker2'].show();
  518. },
  519. showClick() {
  520. if (this.id == '') {
  521. this.show = true
  522. }
  523. },
  524. //弹出框显示
  525. qianming(index) {
  526. this.qianshow = true
  527. this.qianIndex = index
  528. this.popupShow = true
  529. },
  530. //清除签名
  531. deqianming(index) {
  532. this.form.qianMing = ''
  533. },
  534. //保存签名
  535. save(val) {
  536. this.form.qianMing = val
  537. this.popupShow = false
  538. },
  539. //清除签名
  540. clear(val) {
  541. this.form.qianMing = ''
  542. },
  543. getShow() {
  544. if (this.id != '') {
  545. return
  546. }
  547. this.$refs['picker'].show();
  548. },
  549. // 拉取样品列表数据
  550. getData() {
  551. let info = uni.getStorageSync(USER_INFO);
  552. let useId = info.user.id
  553. let sql = `select a.id_,a.create_time_,a.yang_pin_ming_che,a.yang_pin_bian_hao,a.song_jian_pi_hao_ from t_lhypb a left join t_lhwtsqb b on a.parent_id_ = b.id_ left join t_bjd c on b.he_tong_id_ = c.id_ where (a.create_by_= '${useId}' or c.ke_hu_zhang_hao_ = '${useId}') and b.wei_tuo_lei_xing_ = '客户委托' and a.create_time_ > DATE_SUB(NOW(),INTERVAL 3 MONTH) ORDER BY a.create_time_ desc`
  554. let requestData = this.$sig(sql)
  555. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  556. if (res.data.state == 200) {
  557. const datas = res.data.variables.data
  558. if (datas.length > 0) {
  559. datas.forEach((item, index) => {
  560. this.$set(item, 'name', item.yang_pin_bian_hao + '-' + item.song_jian_pi_hao_ + '-' + item
  561. .yang_pin_ming_che)
  562. })
  563. this.yangPinList = datas
  564. if (this.id) {
  565. this.getDe(this.id)
  566. }
  567. }
  568. }
  569. })
  570. },
  571. onConfirm(index, item) {
  572. this.form.guanLianYangPin = item.id_
  573. },
  574. getYangPin(id) {
  575. if (id) {
  576. let itemData = this.yangPinList.find(item => item.id_ == id)
  577. if (itemData) {
  578. return itemData.yang_pin_bian_hao + '-' + itemData.song_jian_pi_hao_ + '-' + itemData
  579. .yang_pin_ming_che
  580. } else {
  581. return ''
  582. }
  583. } else {
  584. return ''
  585. }
  586. },
  587. close() {
  588. this.popupShow = false
  589. },
  590. uploadClick(id, item) {
  591. this.$uploades.download(id, item, this)
  592. }
  593. }
  594. }
  595. </script>
  596. <style>
  597. .cu-form-group .title {
  598. min-width: 180rpx;
  599. }
  600. .btn {
  601. margin: 15rpx
  602. }
  603. .uni-file-pickerheight {
  604. box-sizing: border-box;
  605. overflow: hidden;
  606. }
  607. .uni-file-picker__container {
  608. display: flex;
  609. box-sizing: border-box;
  610. flex-wrap: wrap;
  611. margin: -5px;
  612. }
  613. .file-picker__box {
  614. height: 0px;
  615. width: 33.3%;
  616. }
  617. .file-picker__box {
  618. position: relative;
  619. width: 33.3%;
  620. height: 0;
  621. padding-top: 33.33%;
  622. box-sizing: border-box;
  623. }
  624. .file-picker__box-content {
  625. border-width: 1px;
  626. border-style: solid;
  627. border-color: rgb(238, 238, 238);
  628. border-radius: 3px;
  629. }
  630. .is-add {
  631. display: flex;
  632. align-items: center;
  633. justify-content: center;
  634. }
  635. .file-picker__box-content {
  636. position: absolute;
  637. top: 0;
  638. right: 0;
  639. bottom: 0;
  640. left: 0;
  641. margin: 5px;
  642. border: 1px #eee solid;
  643. border-radius: 5px;
  644. overflow: hidden;
  645. }
  646. .is-addheight {
  647. display: flex;
  648. align-items: center;
  649. justify-content: center;
  650. }
  651. .icon-addheight {
  652. width: 50px;
  653. height: 5px;
  654. background-color: #f1f1f1;
  655. border-radius: 2px;
  656. }
  657. .rotateheight {
  658. position: absolute;
  659. -webkit-transform: rotate(90deg);
  660. transform: rotate(90deg);
  661. }
  662. .example-body {
  663. padding: 10px;
  664. padding-top: 0;
  665. }
  666. .custom-image-box {
  667. /* #ifndef APP-NVUE */
  668. display: flex;
  669. /* #endif */
  670. flex-direction: row;
  671. justify-content: space-between;
  672. align-items: center;
  673. }
  674. .text {
  675. font-size: 14px;
  676. color: #333;
  677. }
  678. .fileBox {
  679. line-height: 50rpx;
  680. color: #888888;
  681. display: flex;
  682. align-items: center;
  683. justify-content: space-between;
  684. border: 1rpx solid #DDDDDD;
  685. border-radius: 8rpx;
  686. padding: 5rpx;
  687. margin-top: 10rpx;
  688. }
  689. </style>