weituo.vue 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-luohu" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">检测申请</block>
  6. </cu-custom>
  7. <form>
  8. <uni-group mode="card" style="overflow: visible;">
  9. <view class="cu-form-group">
  10. <view class="title">申请时间</view>
  11. <uni-datetime-picker v-model="tianxie" type="date" />
  12. </view>
  13. <!-- <view class="cu-form-group">
  14. <view class="title" >委托时间</view>
  15. <uni-datetime-picker v-model="weituo" type="date" :border="true"/>
  16. </view> -->
  17. <view class="cu-form-group margin-top" style="z-index: 999;">
  18. <view class="title">合同编号</view>
  19. <uni-data-select v-model="radiohetong" :localdata="hetong" @change="changehetong"></uni-data-select>
  20. </view>
  21. <uni-collapse-item title="下单单位信息">
  22. <uni-card :is-shadow="false">
  23. <text class="uni-body">
  24. 委托单位:{{weituodanwei}}
  25. 联系人:{{lianxiren}}
  26. 联系电话:{{lianxidianhua}}
  27. 单位地址:{{danweidizhi}}
  28. </text>
  29. </uni-card>
  30. </uni-collapse-item>
  31. </uni-group>
  32. <!-- <uni-section title="选择合同" type="circle" style=" margin-left: 20rpx;margin-right: 20rpx; border-radius: 3%;">
  33. <uni-data-select
  34. v-model="value"
  35. :localdata="range"
  36. @change="change"
  37. emptyText="暂无合同"
  38. ></uni-data-select>
  39. </uni-section> -->
  40. <view v-for="(item,i) in yangpin" style="border: #000000;font-size: smaller">
  41. <uni-group mode="card" :title="'样品信息:'+(i+1)">
  42. <view class="cu-form-group margin-top">
  43. <view class="title" style="font-size: smaller;">样品名称</view>
  44. <input placeholder="请输入样品名称" v-model="item.yangPinMingCheng" name="input"></input>
  45. </view>
  46. <view class="cu-form-group ">
  47. <view class="title" style="font-size: smaller;">批号</view>
  48. <input placeholder="请输入规格型号" v-model="item.yangpihao" name="input"></input>
  49. </view>
  50. <view class="cu-form-group">
  51. <view class="title" style="font-size: smaller;">代次</view>
  52. <input placeholder="请输入规格型号" v-model="item.yangpindaici" name="input"></input>
  53. </view>
  54. <!-- <view class="cu-form-group ">
  55. <view class="title" >检测项目</view>
  56. <input placeholder="检测项目" v-model="ypguige" name="input"></input>
  57. </view> -->
  58. <!-- <view class="example-body2 uni-px-5 uni-pb-5">
  59. <uni-data-checkbox :multiple="false" v-model="item.radio" :localdata="item.jiancecanshu" @change="changeCheckbox(i)">
  60. </uni-data-checkbox>
  61. </view> -->
  62. <view class="uni-px-5 uni-pb-5">
  63. <uni-data-checkbox multiple v-model="item.checkbox" :localdata="item.jiancecanshu" icon="right"
  64. @change="calc($event,i)"></uni-data-checkbox>
  65. </view>
  66. <view>
  67. <view style="margin-bottom: 25rpx; float: right;">
  68. <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;text-decoration: line-through;
  69. font-family: cursive;">
  70. 原价:
  71. <text style="color: #aa2a10;">{{item.yuanjia}}</text>
  72. </view>
  73. <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
  74. 小计:{{item.zongjia}}¥
  75. </view>
  76. </view>
  77. <view class="padding flex flex-direction">
  78. <button size="mini" type="warn" @click="deleteYangPin(i)">删除</button>
  79. <!-- <button class="cu-btn bg-blue lg" @click="onSubmit">注册并登录</button> -->
  80. </view>
  81. </uni-group>
  82. </view>
  83. <view class="padding flex flex-direction" style="margin-bottom: 40rpx;">
  84. <button class="cu-btn bg-blue lg" style=" background-color: #7d7dff;text-align: center;"
  85. @click="addYangPin">添加样品及检测项目</button>
  86. <view style="margin-bottom: 25rpx; float: right;color: #aa0000; ">
  87. <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;
  88. text-decoration: line-through;font-family: cursive;">原价:
  89. <text style="color: #be0000;">{{yuanjia}}</text>
  90. </view>
  91. <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
  92. 总计:{{total}}¥
  93. </view>
  94. </view>
  95. <uni-group mode="card" title="样品处理">
  96. <view class="cu-form-group">
  97. <view class="title" style="font-size: small;">样品是否有感染 </view>
  98. <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio7" :localdata="ganran"
  99. @change="change(cunchuyaoqiu[radio5].text)"></uni-data-checkbox>
  100. </view>
  101. <view class="cu-form-group">
  102. <view class="title" style="font-size: small;">储存要求</view>
  103. <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio5" :localdata="cunchuyaoqiu"
  104. @change="change(cunchuyaoqiu[radio5].text)"></uni-data-checkbox>
  105. </view>
  106. <view class="cu-form-group ">
  107. <view class="title" style="font-size: small;">存储其它要求</view>
  108. <input placeholder="其它要求" v-model="yangPinCunChuYq" name="input"></input>
  109. </view>
  110. <view class="cu-form-group">
  111. <view class="title" style="font-size: small;">余样处理</view>
  112. <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio6" :localdata="yuyangchuli"
  113. @change="change(yuyangchuli[radio6].text)"></uni-data-checkbox>
  114. </view>
  115. <view class="cu-form-group">
  116. <view class="title" style="font-size: small;">检测类别</view>
  117. <app-select style="padding-left: 0rpx;" v-model="type1" placeholder="请选择检测类别" :dict="plan_type1"
  118. space></app-select>
  119. </view>
  120. </uni-group>
  121. <view class="" style="padding-left: 10rpx;padding-right: 10rpx;">
  122. <uni-section title="" type="circle" padding title="报告信息">
  123. <view class="cu-form-group">
  124. <view>报告份数</view>
  125. <uni-number-box v-model="vModelValue" @blur="blur" @focus="focus" @change="changeValue" :min="1"
  126. :max="3" />
  127. </view>
  128. <view class="cu-form-group">
  129. <view class="title">报告形式</view>
  130. <uni-data-checkbox v-model="radio2" :localdata="xingshi" @change="change(xingshi[radio2].text)">
  131. </uni-data-checkbox>
  132. </view>
  133. <view class="cu-form-group">
  134. <view class="title">取报告方式</view>
  135. <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio4" :localdata="baogao"
  136. @change="change(baogao[radio4].text)"></uni-data-checkbox>
  137. </view>
  138. <view class="cu-form-group">
  139. <view class="title">缴费方式</view>
  140. <uni-data-checkbox v-model="radio8" :localdata="jiaoFeiFangShi"
  141. @change="change(jiaoFeiFangShi[radio8].text)" :disabled="disabledjiaofei">
  142. </uni-data-checkbox>
  143. </view>
  144. <view class="cu-form-group" style="justify-content: flex-start;">
  145. <view class="title">其它缴费方式</view>
  146. <view><input class="uni-input" v-model="jiaoFeiQiTa" /></view>
  147. </view>
  148. <view class="cu-form-group" style="justify-content: flex-start;">
  149. <view class="title">备注</view>
  150. <view><input class="uni-input" v-model="remark" /></view>
  151. </view>
  152. <!-- <view class="cu-form-group">
  153. <view class="title">检测结论</view>
  154. <uni-data-checkbox v-model="radio3" :localdata="jielun" @change="change(jielun[radio3].text)">
  155. </uni-data-checkbox>
  156. </view> -->
  157. <view class="padding flex flex-direction" style="margin-bottom: 100rpx;">
  158. <view style="margin-bottom: 25rpx; float: right;color: #aa0000; ">
  159. <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;
  160. text-decoration: line-through;font-family: cursive;">原价:
  161. <text style="color: #e70000;">{{yuanjia}}</text>
  162. </view>
  163. <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
  164. 总计:{{total}}¥
  165. </view>
  166. <button class="cu-btn bg-blue lg" @click="sumit">提交</button>
  167. </view>
  168. <uni-collapse-item title="声明" :open="open">
  169. <uni-card :is-shadow="false">
  170. <text class="uni-body" style="color: #DD514C;">
  171. 1. 本实验室仅对来样负责, 结果仅反映对该样品的评价。
  172. 2. 对送检样品中包含的任何已知的或潜在危害, 如放射性、 致病性、 有毒或爆炸性的样品, 应事先说明, 否则后果由委托单位承担。
  173. 3. 委托单位对样品的代表性和资料的真实性负责, 因提供给本实验室不清楚、 不正确、 不完全、 误导或虚假信息导致的任何不正确结果,
  174. 本实验室及本实验室的任何员工都不对客户或任何第三方承担责任。
  175. 4. 委托方应提供符合检测要求样品,如果样品数量或包装要求不满足实验要求,委托方应重新提供符合要求的样本,否则因此可能产生的后果由委托方承担。
  176. 5. 委托单位应认真详细填写本委托检测协议书相关内容, 由于填写不清造成报告修改, 应支付修改报告费用。
  177. 6. 委托单位对检测报告有特殊要求, 对检测结果有测量不确定度要求时, 需在委托单上说明。
  178. 7. 委托单位对检测结果如有异议, 应于收到报告之日起五个工作日内向本实验室书面提出, 同时附上报告原件或数据; 如果复核后数据无误, 委托单位需支付复测费用。
  179. 不可重复性实验不进行复测。
  180. 8. 对因任何超出本实验室控制的原因, 包括战争、 政府禁令、 自然灾害、 设备故障、 客户失于履行他的任何责任等不可抗力因素而直接或间接导致的任何延期、
  181. 部分或全部服务不能实施, 本实验室不承担责任。
  182. 9.本实验室不负责任何间接或其他衍生性损失, 包括且不限于利润损失、 业务损失、 机会损失、 商誉损失及产品召回之成本。 本实验室亦不负责可能由客户所造成之第三者的任何损失、
  183. 损害或费用之索赔 ( 包括且不限于产品责任之索赔)。 对于任何索赔, 赔付金额不超过本委托单中规定支付的总金额。
  184. 10.本实验室对在检测活动中获得或产生的所有信息履行保密义务, 除客户公开的信息或与客户有约定, 其他所有信息均予以保密。
  185. 11.本检测委托单一式两份, 双方各保留一份, 仅原件有效。
  186. 12.检测方接收邮箱 services@mingjiantech.com,联系电话18124144016。
  187. 13. 送样地址:深圳市南山区源兴科技大厦东座0303 明鉴(收)电话18124144016。
  188. </text>
  189. </uni-card>
  190. </uni-collapse-item>
  191. </uni-section>
  192. </view>
  193. </form>
  194. </view>
  195. </template>
  196. <script>
  197. const plan_type = [{
  198. text: '返回给委托人',
  199. value: '1'
  200. }, {
  201. text: '自取',
  202. value: '2'
  203. }, {
  204. text: '不取回',
  205. value: '3'
  206. }];
  207. const plan_type1 = [{
  208. text: '委托检测',
  209. value: '1'
  210. }, {
  211. text: '抽样检测',
  212. value: '2'
  213. }];
  214. import myDate from '@/components/my-componets/my-date.vue'
  215. import appSelect from '@/components/my-componets/appSelect.vue'
  216. import md5 from "@/common/util/md5.js"
  217. import {
  218. ACCESS_TOKEN,
  219. USER_NAME,
  220. USER_INFO
  221. } from "@/common/util/constants"
  222. export default {
  223. components: {
  224. myDate,
  225. appSelect
  226. },
  227. data() {
  228. return {
  229. yuanjia: 0,
  230. disabledjiaofei: true,
  231. zhekou: 1,
  232. radiohetong: "",
  233. hetong: [],
  234. jiancecanshu: [],
  235. jiaoFeiQiTa: "", //缴费方式其它
  236. yangPinCunChuYq: "", //样品存储其它要求
  237. userid: '',
  238. weituodanwei: '',
  239. lianxiren: '',
  240. lianxidianhua: '',
  241. danweidizhi: '',
  242. tianxie: new Date(),
  243. weituo: '',
  244. value: 0,
  245. range: [],
  246. yangpin: [],
  247. remark: '无特殊要求',
  248. jiance: [],
  249. ypname: '',
  250. ypguige: '',
  251. ypshuliang: '',
  252. yppihao: '',
  253. ypchuzhi: '',
  254. ypleibie: '',
  255. fangfa: [],
  256. fangfaText: '',
  257. total: 0,
  258. open: true,
  259. rateValue: 0,
  260. vModelValue: 1,
  261. radio1: 0,
  262. radio2: 1,
  263. radio3: 1,
  264. radio4: 0,
  265. radio5: 0,
  266. radio6: 0,
  267. radio7: 1,
  268. radio8: 0,
  269. jiaoFeiFangShi: [{
  270. text: '预付',
  271. value: 0,
  272. }, {
  273. text: '月结',
  274. value: 1,
  275. },
  276. {
  277. text: '其它',
  278. value: 2,
  279. },
  280. ],
  281. ganran: [{
  282. text: '是',
  283. value: 0
  284. }, {
  285. text: '否',
  286. value: 1
  287. }, ],
  288. checkbox2: [],
  289. sex: [{
  290. text: '碳素钢和中低合金钢',
  291. value: 0,
  292. canshu: []
  293. }, {
  294. text: '金属零件',
  295. value: 1,
  296. canshu: []
  297. }],
  298. xingshi: [{
  299. text: '电子版(PDF)',
  300. value: 0
  301. }, {
  302. text: '纸质版',
  303. value: 1
  304. }],
  305. jielun: [{
  306. text: '要',
  307. value: 0
  308. }, {
  309. text: '不要',
  310. value: 1
  311. }],
  312. baogao: [{
  313. text: '自取',
  314. value: 0
  315. }, {
  316. text: '邮寄(到付)',
  317. value: 1
  318. }, {
  319. text: 'Email',
  320. value: 2
  321. }],
  322. cunchuyaoqiu: [{
  323. text: '常温',
  324. value: 0
  325. }, {
  326. text: '2-8°C',
  327. value: 1
  328. }, {
  329. text: '避光',
  330. value: 2
  331. }, {
  332. text: '其它',
  333. value: 3
  334. }, ],
  335. //余样处理
  336. yuyangchuli: [{
  337. text: '委托方(自取)',
  338. value: 0
  339. }, {
  340. text: '邮寄(到付)',
  341. value: 1
  342. }, {
  343. text: '授权本实验室自行处理',
  344. value: 2
  345. }],
  346. value: 0,
  347. type: "default",
  348. inverted: false,
  349. leibie: "",
  350. weituodanhao: '',
  351. plan_type1,
  352. plan_type,
  353. type2: '',
  354. type1: '',
  355. beginTime: '',
  356. index: -1,
  357. leixing: '',
  358. switchC: true,
  359. imgList: [],
  360. };
  361. },
  362. onLoad: function(option) {
  363. //初始换用户信息
  364. let info = uni.getStorageSync(USER_INFO);
  365. console.log(info)
  366. if (info == undefined) {
  367. return;
  368. }
  369. this.weituodanwei = info.employee.orgName;
  370. this.userid = info.employee.id;
  371. this.lianxiren = info.employee.name;
  372. this.lianxidianhua = info.employee.mobile
  373. this.getjianceData();
  374. this.getDataHetong();
  375. let query = this.$Route.query
  376. },
  377. methods: {
  378. changeCheckbox(i) {
  379. this.yangpin[i].checkbox = [];
  380. },
  381. addYangPin() {
  382. let data = {};
  383. data.yangPinMingCheng = '';
  384. data.yangpihao = '';
  385. data.yangpindaici = '';
  386. data.jianCeXiangMu = '';
  387. data.radio = 0;
  388. data.jiancecanshu = this.jiancecanshu;
  389. data.checkbox = [];
  390. data.zongjia = 0;
  391. data.yuanjia = 0;
  392. data.zhekou = 1;
  393. this.yangpin.push(data);
  394. console.log(this.yangpin)
  395. },
  396. deleteYangPin(i) {
  397. this.$delete(this.yangpin, i)
  398. },
  399. onChange(e) {
  400. //console.log('rate发生改变:' + JSON.stringify(e))
  401. console.log(e)
  402. // console.log(this.rateValue);
  403. },
  404. sumit() {
  405. let para = {
  406. "parameters": [{
  407. "key": "defId",
  408. "value": "989811420067528704"
  409. },
  410. {
  411. "key": "version",
  412. "value": "0"
  413. },
  414. {
  415. "key": "data",
  416. "value": ""
  417. }
  418. ]
  419. }
  420. let paradata = {
  421. "id": "",
  422. "zhuangTai": "待运营中心审核",
  423. "shiFouGuoShen": "已编制",
  424. "shenQingLaiYuan": "客户下单",
  425. "shenQingLeiXing": "检测申请",
  426. "heTongBianHao": "",
  427. "weiTuoDanWei": "",
  428. "lianXiDianHua": "",
  429. "weiTuoBianHao": "",
  430. "lianXiRen": "",
  431. "danWeiDiZhi": "",
  432. "bianZhiShiJian": "", //填写日期
  433. "weiTuoRiQi": "", //委托日期
  434. "tongXunDiZhi": "",
  435. "yangPinShiFouYouG": "",
  436. "mjypb": [{
  437. "yangPinMingCheng": "",
  438. "piHao": "",
  439. "daiCi": "",
  440. "yangPinBianHao": "",
  441. "jianCeXiangMu": "",
  442. "id": "",
  443. "waiJian": ""
  444. }],
  445. "yangPinCunChuYaoQ": "",
  446. "yangPinCunChuYq": "",
  447. "yuYangChuLi": "",
  448. "baoGaoXingShi": "",
  449. "baoGaoHuoQu": "",
  450. "baoGaoFenShu": "",
  451. "jiaoFeiFangShi": "",
  452. "email": "",
  453. "jiaoFeiQiTa": "",
  454. "beiZhuHuoQiTaYueD": "",
  455. "weiTuoRenQianZi": "",
  456. "weiTuoRenQianZiRi": "",
  457. "chengJieRenQianZi": "",
  458. "chengJieRenQianZ": "",
  459. "bianZhiBuMen": "",
  460. "bianZhiRen": this.userid,
  461. "yangPinMingCheng": "",
  462. "piHao": "",
  463. "daiCi": "",
  464. "jianCeXiangMu": "",
  465. "zongJia": this.total,
  466. "yuanJia": this.yuanjia,
  467. "zheKou": this.zhekou
  468. };
  469. //组装参数
  470. paradata.mjypb = []; //样品数据赋值
  471. for (let i in this.yangpin) {
  472. let entity = {};
  473. entity.yangPinMingCheng = this.yangpin[i].yangPinMingCheng;
  474. entity.piHao = this.yangpin[i].yangpihao;
  475. entity.daiCi = this.yangpin[i].yangpindaici;
  476. let xiangmu = '';
  477. for (let j in this.yangpin[i].checkbox) { //组装已选检测项目
  478. let box = this.yangpin[i].checkbox[j];
  479. if (j > 0) {
  480. xiangmu = xiangmu + ',';
  481. }
  482. xiangmu = xiangmu + this.yangpin[i].jiancecanshu[box].id_;
  483. }
  484. entity.jianCeXiangMu = xiangmu;
  485. //console.log(xiangmu)
  486. //entity.jianCeXiangMu=this.yangpin[i].jianCeXiangMu;
  487. paradata.mjypb.push(entity)
  488. }
  489. //样品处理
  490. paradata.yangPinShiFouYouG = this.ganran[this.radio7].text; //是否感染
  491. paradata.yangPinCunChuYaoQ = this.cunchuyaoqiu[this.radio5].text; //存储要求
  492. paradata.yuYangChuLi = this.yuyangchuli[this.radio6].text; //余样处理
  493. paradata.shenQingLeiXing = "委托检测"; //申请类型
  494. paradata.yangPinCunChuYq = this.yangPinCunChuYq; //存储其它要求
  495. paradata.jiaoFeiQiTa = this.jiaoFeiQiTa; //其它缴费方式
  496. paradata.beiZhuHuoQiTaYueD = this.remark; //备注
  497. paradata.bianZhiShiJian = this.tianxie; //填写时间
  498. paradata.paradata = this.weituo; //委托日期
  499. //报告信息
  500. paradata.baoGaoFenShu = this.vModelValue;
  501. //基本信息
  502. paradata.weiTuoDanWei = this.weituodanwei;
  503. paradata.lianXiRen = this.lianxiren;
  504. paradata.lianXiDianHua = this.lianxidianhua;
  505. paradata.danWeiDiZhi = this.danweidizhi;
  506. //合同编号
  507. if ("" == (this.radiohetong)) {
  508. paradata.heTongBianHao = "无合同";
  509. } else {
  510. paradata.heTongBianHao = this.hetong[this.radiohetong].text;
  511. }
  512. //缴费方式
  513. paradata.jiaoFeiFangShi = this.jiaoFeiFangShi[this.radio8].text;
  514. //报告获取
  515. paradata.baoGaoHuoQu = this.baogao[this.radio4].text;
  516. //报告形式
  517. paradata.baoGaoXingShi = this.xingshi[this.radio2].text;
  518. para.parameters[2].value = JSON.stringify(paradata);
  519. //开启流程
  520. //ibps/business/v3/bpm/instance/start
  521. this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
  522. if (res.data.state == 200) {
  523. this.$tip.success('提交成功!')
  524. this.$Router.replaceAll({
  525. name: 'index'
  526. })
  527. } else {
  528. this.$tip.success('提交异常!')
  529. this.$Router.replaceAll({
  530. name: 'index'
  531. })
  532. }
  533. });
  534. },
  535. calc(e, i) {
  536. console.log(e)
  537. console.log(i)
  538. //计算单样品小计
  539. let total = 0;
  540. let data = e.detail.data;
  541. for (let i in data) {
  542. //计算价格
  543. total = total + parseFloat(data[i].dan_jia_);
  544. //生成检测项目数据
  545. }
  546. this.yangpin[i].yuanjia = total; //原价
  547. this.yangpin[i].zongjia = total;
  548. //this.total=total
  549. this.recalc();
  550. },
  551. //根据折扣重新计算金额
  552. recalc() {
  553. let zhekou = this.zhekou;
  554. console.log("折扣:" + zhekou)
  555. for (let i in this.yangpin) {
  556. this.yangpin[i].zongjia = this.yangpin[i].zongjia * zhekou;
  557. }
  558. //计算总价
  559. let zongjia = 0;
  560. let yuanjia = 0;
  561. for (let i in this.yangpin) {
  562. zongjia = zongjia + this.yangpin[i].zongjia;
  563. yuanjia = yuanjia + this.yangpin[i].yuanjia;
  564. }
  565. this.total = zongjia;
  566. this.yuanjia = yuanjia;
  567. },
  568. getjianceData() {
  569. let para = {
  570. "parameters": [{
  571. "key": "response_data",
  572. "value": "{\"template_id\":\"991748988552085504\",\"template_type\":\"\",\"attrs\":{\"init_query\":\"Y\",\"need_page\":\"Y\",\"page_size\":20,\"display_field\":\"能力范围列表\"},\"query_columns\":[{\"label\":\"检测项目名称\",\"name\":\"jian_ce_xiang_mu_\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"required\":false,\"placeholder\":\"请输入\",\"mobile\":true,\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"类别\",\"name\":\"lei_bie_\",\"field_type\":\"radio\",\"field_options\":{\"required\":false,\"hide_rights\":false,\"read_rights\":false,\"hide_label\":false,\"is_label_width\":false,\"label_width\":100,\"label_width_unit\":\"px\",\"mobile\":true,\"arrangement\":\"horizontal\",\"default_value_type\":\"fixed\",\"datasource\":\"custom\",\"options\":[{\"val\":\"非\",\"label\":\"非\",\"checked\":false},{\"val\":\"cnas/CMA\",\"label\":\"cnas/CMA\",\"checked\":false},{\"val\":\"cnas\",\"label\":\"cnas\",\"disabled\":false},{\"val\":\"CMA\",\"label\":\"CMA\",\"disabled\":false}],\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"}],\"display_columns\":[{\"label\":\"类别\",\"name\":\"lei_bie_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"100\",\"same\":\"Y\",\"field_type\":\"radio\",\"field_options\":{\"required\":false,\"hide_rights\":false,\"read_rights\":false,\"hide_label\":false,\"is_label_width\":false,\"label_width\":100,\"label_width_unit\":\"px\",\"mobile\":true,\"arrangement\":\"horizontal\",\"default_value_type\":\"fixed\",\"datasource\":\"custom\",\"options\":[{\"val\":\"非\",\"label\":\"非\",\"checked\":false},{\"val\":\"cnas/CMA\",\"label\":\"cnas/CMA\",\"checked\":false},{\"val\":\"cnas\",\"label\":\"cnas\",\"disabled\":false},{\"val\":\"CMA\",\"label\":\"CMA\",\"disabled\":false}],\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"检测项目名称\",\"name\":\"jian_ce_xiang_mu_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"260\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"required\":false,\"placeholder\":\"请输入\",\"mobile\":true,\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"依据的标准(方法)名称及编号(含年号)\",\"name\":\"yi_ju_de_biao_zhu\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"500\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"required\":false,\"placeholder\":\"请输入\",\"mobile\":true,\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"限制范围\",\"name\":\"xian_zhi_fan_wei_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"required\":false,\"placeholder\":\"请输入\",\"mobile\":true,\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"主要仪器设备\",\"name\":\"zhu_yao_yi_qi_she\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"required\":false,\"placeholder\":\"请输入\",\"mobile\":true,\"display\":true,\"clearable\":true},\"data_type\":\"varchar\"},{\"label\":\"环境要求\",\"name\":\"huan_jing_yao_qiu\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"placeholder\":\"请输入\",\"required\":false,\"is_min_length\":false,\"is_max_length\":false,\"hide_rights\":false,\"read_rights\":false,\"hide_label\":false,\"is_width\":false,\"width\":100,\"width_unit\":\"%\",\"is_label_width\":false,\"label_width\":100,\"label_width_unit\":\"px\",\"clearable\":true,\"mobile\":true,\"display\":true},\"data_type\":\"varchar\"},{\"label\":\"单价\",\"name\":\"dan_jia_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"default_value_type\":\"fixed\",\"placeholder\":\"请输入\",\"required\":false,\"is_min_length\":false,\"is_max_length\":false,\"hide_rights\":false,\"read_rights\":false,\"hide_label\":false,\"is_width\":false,\"width\":100,\"width_unit\":\"%\",\"is_label_width\":false,\"label_width\":100,\"label_width_unit\":\"px\",\"clearable\":true,\"mobile\":true,\"display\":true},\"data_type\":\"varchar\"}],\"orig_display_columns\":[{\"label\":\"类别\",\"name\":\"lei_bie_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"100\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"检测项目名称\",\"name\":\"jian_ce_xiang_mu_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"260\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"依据的标准(方法)名称及编号(含年号)\",\"name\":\"yi_ju_de_biao_zhu\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"500\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"限制范围\",\"name\":\"xian_zhi_fan_wei_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"主要仪器设备\",\"name\":\"zhu_yao_yi_qi_she\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"环境要求\",\"name\":\"huan_jing_yao_qiu\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"160\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}},{\"label\":\"单价\",\"name\":\"dan_jia_\",\"rights\":[{\"type\":\"all\"}],\"noRightStyle\":\"\",\"align\":\"left\",\"sortable\":false,\"width\":\"\",\"same\":\"Y\",\"field_type\":\"text\",\"field_options\":{\"datefmt_type\":\"date\",\"datefmt\":\"yyyy-MM-dd\",\"selector_type\":\"user\",\"number_type\":\"orig\",\"options\":[{\"val\":\"\",\"label\":\"\"}],\"store\":\"id\",\"dictionary\":\"\"}}],\"sort_columns\":\"\",\"buttons\":{\"function_buttons\":[{\"button_type\":\"search\",\"label\":\"查询\",\"position\":\"toolbar\"},{\"button_type\":\"add\",\"label\":\"添加\",\"rights\":[{\"type\":\"all\"}],\"position\":\"all\",\"style\":\"success\"},{\"button_type\":\"remove\",\"label\":\"删除\",\"rights\":[{\"type\":\"all\"}],\"position\":\"toolbar\",\"style\":\"danger\"},{\"label\":\"编辑\",\"button_type\":\"edit\"}],\"edit_buttons\":[{\"button_type\":\"close\",\"label\":\"关闭\"},{\"button_type\":\"save\",\"label\":\"保存\"}]},\"export_columns\":\"\",\"datasetKey\":\"mjnlfw\",\"unique\":\"id_\"}"
  573. },
  574. {
  575. "key": "filter_condition_key",
  576. "value": ""
  577. }
  578. ],
  579. "requestPage": {
  580. "pageNo": 1,
  581. "limit": 200,
  582. "totalCount": 25
  583. },
  584. "sorts": []
  585. }
  586. this.$http.post("/ibps/business/v3/data/template/queryDataTable", para).then(res => {
  587. if (res.data.state == 200) {
  588. //console.log(res.data.data.dataResult)
  589. let data = res.data.data.dataResult;
  590. for (let i in data) {
  591. data[i].value = i;
  592. data[i].text = data[i].jian_ce_xiang_mu_ + " 单价: " + data[i].dan_jia_;
  593. }
  594. this.jiancecanshu = data;
  595. }
  596. });
  597. /* let pagepara={
  598. "parameters": [],
  599. "requestPage": {
  600. "pageNo": 1,
  601. "limit": 100,
  602. "offset": 0,
  603. "totalCount": 12
  604. }
  605. }
  606. let this_=this;
  607. //"ibps/business/v3/entrust/sysjtsjpz/query"
  608. this.$http.post("/ibps/business/v3/entrust/sysjtsjpz/query", pagepara).then(res => {
  609. if (res.data.state == 200) {
  610. console.log(res.data.variables.data)
  611. let data=res.data.variables.data;
  612. //console.log(filterJson(data,"jianCeDuiXiang"))
  613. let jianceduix=filterJson(data,"jianCeDuiXiang")
  614. let datajiance=[]
  615. for(let i in jianceduix){
  616. let yy={};
  617. yy.jianceduix=jianceduix[i].jianCeDuiXiang;
  618. yy.jianCeLeiBie=jianceduix[i].jianCeLeiBie;
  619. yy.jianCeFangFa=jianceduix[i].jianCeFangFa;
  620. yy.canshu=data.filter(function(item){
  621. return item.jianCeDuiXiang==jianceduix[i].jianCeDuiXiang
  622. })
  623. datajiance.push(yy);
  624. }
  625. //let jiance=[];
  626. for(let i in datajiance){
  627. let entity={};
  628. entity.value=i;
  629. entity.text=datajiance[i].jianceduix;
  630. entity.leixing=datajiance[i].jianCeLeiBie;
  631. entity.canshu=datajiance[i].canshu;
  632. entity.fangfa=datajiance[i].jianCeFangFa;
  633. for(let j in datajiance[i].canshu){
  634. datajiance[i].canshu[j].text=datajiance[i].canshu[j].xiangMuCanShu+" 单价:"+datajiance[i].canshu[j].price +"¥"
  635. datajiance[i].canshu[j].value=j;
  636. // datajiance[i].canshu[j].selected=true;
  637. }
  638. if(i<2){
  639. this_.sex[i]=entity;//
  640. }else{
  641. this_.sex.push(entity)
  642. }
  643. //jiance.push(entity)
  644. }
  645. this_.radio1=0;
  646. console.log(this_.sex)
  647. //this_.radio1=0;
  648. }
  649. });
  650. this.radio1=0;
  651. //this.defaultdata=[0,1];
  652. //委托单号
  653. let smsParams = {
  654. alias: "gzyrwtbh"
  655. };
  656. this.$http.post("/ibps/business/v3/jc/sys/getNextIdByAlias", smsParams).then(res => {
  657. if (res.data.state == 200) {
  658. console.log(res.data.data)
  659. this_.weituodanhao = res.data.data
  660. }
  661. });
  662. //查询方法名称
  663. let data = 'select * FROM t_ffgl';
  664. data = '{"sql":"' + data + '"}'
  665. let md5 = this.sig(data) //加密, 获取md5密文
  666. let requestData = data.slice(0, 1) + '"sig":"' + md5 + '",' + data.slice(1) //结果拼接
  667. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  668. if (res.data.state == 200) {
  669. this.fangfa = res.data.variables.data
  670. }
  671. }); */
  672. },
  673. DateChange(e) {
  674. this.myFormData.birthday = e.detail.value
  675. },
  676. SwitchC(e) {
  677. this.switchC = e.detail.value
  678. },
  679. sig(sql) {
  680. let rul = (sql.length + 9) * 12 * 3 + 168
  681. let salt = "JinYuanXinTong"
  682. return md5(rul + '' + salt)
  683. },
  684. ChooseImage() {
  685. var that = this;
  686. uni.chooseImage({
  687. count: 4, //默认9
  688. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  689. sourceType: ['album'], //从相册选择
  690. success: (res) => {
  691. that.$http.upload(that.$config.apiUrl + that.uploadUrl, {
  692. filePath: res.tempFilePaths[0],
  693. name: 'file'
  694. })
  695. .then(res => {
  696. that.myFormData.avatar = res.data.message;
  697. })
  698. .catch(err => {
  699. that.$tip.error(err.data.message)
  700. });
  701. this.imgList = res.tempFilePaths
  702. }
  703. });
  704. },
  705. ViewImage(e) {
  706. uni.previewImage({
  707. urls: this.imgList,
  708. current: e.currentTarget.dataset.url
  709. });
  710. },
  711. DelImg(e) {
  712. uni.showModal({
  713. title: '召唤师',
  714. content: '确定要删除这段回忆吗?',
  715. cancelText: '再看看',
  716. confirmText: '再见',
  717. success: res => {
  718. if (res.confirm) {
  719. this.imgList.splice(e.currentTarget.dataset.index, 1)
  720. }
  721. }
  722. })
  723. },
  724. getDataHetong() {
  725. let info = uni.getStorageSync(USER_INFO);
  726. if (info == undefined) {
  727. return;
  728. }
  729. info.employee.name;
  730. let data = '';
  731. data =
  732. "select * from t_bjd where ke_hu_ming_cheng_ in(select id_ from t_yxkh where ke_hu_ming_cheng_='" +
  733. info.employee.name + "') and zhuang_tai_='生效中'";
  734. data = '{"sql":"' + data + '"}'
  735. let md5 = this.sig(data) //加密, 获取md5密文
  736. let requestData = data.slice(0, 1) + '"sig":"' + md5 + '",' + data.slice(1) //结果拼接
  737. this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
  738. if (res.data.state == 200) {
  739. // console.log(res.data.variables.data)
  740. let result = res.data.variables.data;
  741. console.log(111111111)
  742. console.log(result)
  743. if (result.length == 0) {
  744. //无合同信息 固定缴费方式为预付
  745. this.radio8 = 0;
  746. this.disabledjiaofei = true;
  747. } else {
  748. this.hetong = [];
  749. for (let i in result) {
  750. result[i].text = result[i].he_tong_bian_hao_;
  751. result[i].value = i;
  752. // this.hetong.push(result[i]);
  753. this.$set(this.hetong, i, result[i])
  754. }
  755. //this.radiohetong=0;
  756. //this.$forceUpdate();
  757. }
  758. /* this.range=[];
  759. for(let i in result){
  760. result[i].value=i;
  761. result[i].text=result[i].he_tong_bian_hao_;
  762. //this.range.push(result[i])
  763. this.$set(this.range,i,result[i])
  764. }
  765. console.log(this.range)
  766. this.$forceUpdate(); */
  767. }
  768. });
  769. },
  770. change(e) {
  771. console.log(e)
  772. },
  773. changehetong(i) {
  774. console.log(i)
  775. if (i == "") {
  776. this.zhekou = 1;
  777. //固定缴费方式
  778. this.radio8 = 0;
  779. this.disabledjiaofei = true;
  780. return;
  781. } else {
  782. this.disabledjiaofei = true;
  783. //从合同中选择付款方式
  784. let fangshi = this.hetong[i].fu_kuan_fang_shi_;
  785. for (let i in this.jiaoFeiFangShi) {
  786. if (this.jiaoFeiFangShi[i].text == fangshi) {
  787. this.radio8 = this.jiaoFeiFangShi[i].value;
  788. }
  789. }
  790. }
  791. console.log(this.hetong[i])
  792. let zhekou = zhuanhuan(this.hetong[i].you_hui_gui_ze_)
  793. this.zhekou = zhekou;
  794. this.recalc();
  795. //从合同中获取付款方式
  796. },
  797. changeValue(value) {
  798. console.log('返回数值:', value);
  799. },
  800. focus(e) {
  801. console.log('focus:', e);
  802. },
  803. blur(e) {
  804. console.log('blur:', e);
  805. },
  806. setType() {
  807. let types = ["default", "primary", "success", "warning", "error"];
  808. let index = types.indexOf(this.type);
  809. types.splice(index, 1);
  810. let randomIndex = Math.floor(Math.random() * 4);
  811. this.type = types[randomIndex];
  812. },
  813. setInverted(index) {
  814. this.canshu[index].show = !this.canshu[index].show;
  815. },
  816. onSubmit() {
  817. let data = {
  818. crmZhuangTai: "crm",
  819. weiTuoZhuangTai: "待审核",
  820. id: "",
  821. weiTuoDanHaoZhuan: "",
  822. yangPinBianHaoZhu: "",
  823. shouLiBuMen: "检测室",
  824. weiTuoFang: "外部委托",
  825. jianCeWeiZhi: "",
  826. shouLiShiJian: "2022-06-07",
  827. dingDanHao: "",
  828. dingDanLaiYuan: "业务人员下单",
  829. baoJiaDan: "",
  830. quDao: "手机下单",
  831. xiaoShouRenYuan: "",
  832. zongJinE: this.total,
  833. weiTuoDanHao: "",
  834. lianXiRen: "",
  835. weiTuoDanWei: "",
  836. lianXiFangShi: "",
  837. qiWangWanChengShi: "",
  838. tongXunDiZhi: "质量部",
  839. gdyrqcyp: [],
  840. yangPinChuZhi: "",
  841. jianCeLeiBie: "",
  842. keHuYaoQiu: "无特殊要求",
  843. jcxmcrm: [], //检测项目
  844. quBaoGaoFangShiJi: "自取",
  845. baoGaoFenShu: 1,
  846. qiTaYaoQiu: this.remark,
  847. jianCeJieGuoZuoCh: "不要",
  848. jianCeJieLun: "不要",
  849. jianCeBaoGaoZhong: "不要",
  850. hkfab: [],
  851. dingDanShenHeYiJi: "",
  852. dingDanShenPiYiJi: "",
  853. bianZhiRen: "",
  854. yangPinMingCheng: "样品名称",
  855. guiGeXingHao: "",
  856. shengChanRiQiPiHa: "",
  857. shouJiKeHuId: ""
  858. };
  859. //组装数据
  860. //获取下单用户信息
  861. let info = uni.getStorageSync(USER_INFO);
  862. console.log(info)
  863. if (info == undefined) {
  864. return;
  865. }
  866. data.lianXiRen = info.username;
  867. data.weiTuoDanWei = info.companyid;
  868. data.lianXiFangShi = info.number;
  869. data.dingDanLaiYuan = "手机下单";
  870. data.shouLiBuMen = "检测室";
  871. data.shouJiKeHuId = info.id;
  872. data.weiTuoDanHao = this.weituodanhao;
  873. data.qiWangWanChengShi = this.beginTime;
  874. data.jcxmcrm = this.jiance;
  875. //样品处置
  876. if (this.type2 == "" || this.type1 == "") {
  877. this.$tip.alert("请选择检测类别或处置方式");
  878. return false;
  879. }
  880. data.yangPinChuZhi = this.plan_type[this.type2 - 1].text;
  881. //检测类别
  882. data.jianCeLeiBie = this.plan_type1[this.type1 - 1].text;
  883. //样品名称、规格、数量、批号
  884. let yangpin = {
  885. yangPinMingCheng: this.ypname,
  886. guiGeXingHao: this.ypguige,
  887. shuLiang: this.ypshuliang,
  888. shengChanRiQiPiHa: this.yppihao
  889. }
  890. data.gdyrqcyp.push(yangpin);
  891. //报告份数
  892. data.baoGaoFenShu = this.vModelValue;
  893. //检测结论
  894. data.jianCeJieLun = this.jielun[this.radio3].text;
  895. data.quBaoGaoFangShiJi = this.baogao[this.radio4].text
  896. let para = {
  897. boCode: "gdyrqcwt",
  898. version: 0,
  899. formKey: "ddfq",
  900. pk: "",
  901. data: JSON.stringify(data)
  902. }
  903. // console.log(para)
  904. let that = this;
  905. this.$http.post("ibps/business/v3/data/template/saveFormData/vo", para).then(res => {
  906. if (res.data.state == 200) {
  907. this.$tip.success("下单成功!")
  908. this.$Router.replace({
  909. name: 'index'
  910. })
  911. } else {
  912. this.$tip.error("请求错误: " + res.data.message)
  913. }
  914. }).catch((err) => {
  915. let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
  916. this.$tip.error(msg);
  917. });
  918. //============================================================================================================
  919. },
  920. }
  921. }
  922. //过滤数据
  923. function filterJson(data, Name) { //data是json对象,Name是根据什么字段去重
  924. var map = {},
  925. dest = [];
  926. for (var i = 0; i < data.length; i++) {
  927. var ai = data[i];
  928. if (i == 0) {
  929. dest.push(ai);
  930. } else {
  931. var filterData = dest.filter(function(e) {
  932. return e[Name] == ai[Name];
  933. })
  934. if (filterData.length == 0) {
  935. dest.push(ai);
  936. }
  937. }
  938. }
  939. return dest;
  940. }
  941. //百分比转换为小数
  942. function zhuanhuan(data)
  943. {
  944. var str = data.replace("%", "");
  945. str = str / 100
  946. return str;
  947. }
  948. </script>
  949. <style>
  950. .cu-form-group .title {
  951. min-width: calc(4em + 15px);
  952. }
  953. .example-body {
  954. /* #ifndef APP-PLUS-NVUE */
  955. display: flex;
  956. /* #endif */
  957. flex-direction: row;
  958. justify-content: flex-start;
  959. align-items: flex-end;
  960. flex-wrap: wrap;
  961. }
  962. .tag-view {
  963. margin-right: 10px;
  964. }
  965. .example-body2 {
  966. padding: 12px;
  967. background-color: #FFFFFF;
  968. }
  969. .result-box {
  970. text-align: center;
  971. padding: 20px 0px;
  972. font-size: 16px;
  973. }
  974. .uni-list-item {
  975. border-bottom-style: solid;
  976. border-bottom-width: 1px;
  977. border-bottom-color: #eee;
  978. font-size: 14px;
  979. }
  980. .uni-list-item__container {
  981. /* #ifndef APP-NVUE */
  982. display: flex;
  983. width: 100%;
  984. box-sizing: border-box;
  985. /* #endif */
  986. padding: 12px 15px;
  987. flex: 1;
  988. position: relative;
  989. flex-direction: row;
  990. justify-content: space-between;
  991. align-items: center;
  992. }
  993. .uni-list-item__content-title {
  994. font-size: 14px;
  995. color: #666;
  996. }
  997. </style>