| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143 |
- <template>
- <view>
- <cu-custom bgColor="bg-luohu" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">检测申请</block>
- </cu-custom>
- <form>
- <uni-group mode="card" style="overflow: visible;">
- <view class="cu-form-group">
- <view class="title">申请时间</view>
- <uni-datetime-picker v-model="tianxie" type="date" />
- </view>
- <!-- <view class="cu-form-group">
- <view class="title" >委托时间</view>
- <uni-datetime-picker v-model="weituo" type="date" :border="true"/>
- </view> -->
- <view class="cu-form-group margin-top" style="z-index: 999;">
- <view class="title">合同编号</view>
- <uni-data-select v-model="radiohetong" :localdata="hetong" @change="changehetong"></uni-data-select>
- </view>
- <uni-collapse-item title="下单单位信息">
- <uni-card :is-shadow="false">
- <text class="uni-body">
- 委托单位:{{weituodanwei}}
- 联系人:{{lianxiren}}
- 联系电话:{{lianxidianhua}}
- 单位地址:{{danweidizhi}}
- </text>
- </uni-card>
- </uni-collapse-item>
- </uni-group>
- <!-- <uni-section title="选择合同" type="circle" style=" margin-left: 20rpx;margin-right: 20rpx; border-radius: 3%;">
- <uni-data-select
- v-model="value"
- :localdata="range"
- @change="change"
- emptyText="暂无合同"
- ></uni-data-select>
- </uni-section> -->
- <view v-for="(item,i) in yangpin" style="border: #000000;font-size: smaller">
- <uni-group mode="card" :title="'样品信息:'+(i+1)">
- <view class="cu-form-group margin-top">
- <view class="title" style="font-size: smaller;">样品名称</view>
- <input placeholder="请输入样品名称" v-model="item.yangPinMingCheng" name="input"></input>
- </view>
- <view class="cu-form-group ">
- <view class="title" style="font-size: smaller;">批号</view>
- <input placeholder="请输入规格型号" v-model="item.yangpihao" name="input"></input>
- </view>
- <view class="cu-form-group">
- <view class="title" style="font-size: smaller;">代次</view>
- <input placeholder="请输入规格型号" v-model="item.yangpindaici" name="input"></input>
- </view>
- <!-- <view class="cu-form-group ">
- <view class="title" >检测项目</view>
- <input placeholder="检测项目" v-model="ypguige" name="input"></input>
- </view> -->
- <!-- <view class="example-body2 uni-px-5 uni-pb-5">
- <uni-data-checkbox :multiple="false" v-model="item.radio" :localdata="item.jiancecanshu" @change="changeCheckbox(i)">
- </uni-data-checkbox>
- </view> -->
- <view class="uni-px-5 uni-pb-5">
- <uni-data-checkbox multiple v-model="item.checkbox" :localdata="item.jiancecanshu" icon="right"
- @change="calc($event,i)"></uni-data-checkbox>
- </view>
- <view>
- <view style="margin-bottom: 25rpx; float: right;">
- <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;text-decoration: line-through;
- font-family: cursive;">
- 原价:
- <text style="color: #aa2a10;">{{item.yuanjia}}</text>
- </view>
- <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
- 小计:{{item.zongjia}}¥
- </view>
- </view>
- <view class="padding flex flex-direction">
- <button size="mini" type="warn" @click="deleteYangPin(i)">删除</button>
- <!-- <button class="cu-btn bg-blue lg" @click="onSubmit">注册并登录</button> -->
- </view>
- </uni-group>
- </view>
- <view class="padding flex flex-direction" style="margin-bottom: 40rpx;">
- <button class="cu-btn bg-blue lg" style=" background-color: #7d7dff;text-align: center;"
- @click="addYangPin">添加样品及检测项目</button>
- <view style="margin-bottom: 25rpx; float: right;color: #aa0000; ">
- <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;
- text-decoration: line-through;font-family: cursive;">原价:
- <text style="color: #be0000;">{{yuanjia}}</text>
- </view>
- <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
- 总计:{{total}}¥
- </view>
- </view>
- <uni-group mode="card" title="样品处理">
- <view class="cu-form-group">
- <view class="title" style="font-size: small;">样品是否有感染 </view>
- <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio7" :localdata="ganran"
- @change="change(cunchuyaoqiu[radio5].text)"></uni-data-checkbox>
- </view>
- <view class="cu-form-group">
- <view class="title" style="font-size: small;">储存要求</view>
- <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio5" :localdata="cunchuyaoqiu"
- @change="change(cunchuyaoqiu[radio5].text)"></uni-data-checkbox>
- </view>
- <view class="cu-form-group ">
- <view class="title" style="font-size: small;">存储其它要求</view>
- <input placeholder="其它要求" v-model="yangPinCunChuYq" name="input"></input>
- </view>
- <view class="cu-form-group">
- <view class="title" style="font-size: small;">余样处理</view>
- <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio6" :localdata="yuyangchuli"
- @change="change(yuyangchuli[radio6].text)"></uni-data-checkbox>
- </view>
- <view class="cu-form-group">
- <view class="title" style="font-size: small;">检测类别</view>
- <app-select style="padding-left: 0rpx;" v-model="type1" placeholder="请选择检测类别" :dict="plan_type1"
- space></app-select>
- </view>
- </uni-group>
- <view class="" style="padding-left: 10rpx;padding-right: 10rpx;">
- <uni-section title="" type="circle" padding title="报告信息">
- <view class="cu-form-group">
- <view>报告份数</view>
- <uni-number-box v-model="vModelValue" @blur="blur" @focus="focus" @change="changeValue" :min="1"
- :max="3" />
- </view>
- <view class="cu-form-group">
- <view class="title">报告形式</view>
- <uni-data-checkbox v-model="radio2" :localdata="xingshi" @change="change(xingshi[radio2].text)">
- </uni-data-checkbox>
- </view>
- <view class="cu-form-group">
- <view class="title">取报告方式</view>
- <uni-data-checkbox style="flex-wrap: nowrap;" v-model="radio4" :localdata="baogao"
- @change="change(baogao[radio4].text)"></uni-data-checkbox>
- </view>
- <view class="cu-form-group">
- <view class="title">缴费方式</view>
- <uni-data-checkbox v-model="radio8" :localdata="jiaoFeiFangShi"
- @change="change(jiaoFeiFangShi[radio8].text)" :disabled="disabledjiaofei">
- </uni-data-checkbox>
- </view>
- <view class="cu-form-group" style="justify-content: flex-start;">
- <view class="title">其它缴费方式</view>
- <view><input class="uni-input" v-model="jiaoFeiQiTa" /></view>
- </view>
- <view class="cu-form-group" style="justify-content: flex-start;">
- <view class="title">备注</view>
- <view><input class="uni-input" v-model="remark" /></view>
- </view>
- <!-- <view class="cu-form-group">
- <view class="title">检测结论</view>
- <uni-data-checkbox v-model="radio3" :localdata="jielun" @change="change(jielun[radio3].text)">
- </uni-data-checkbox>
-
- </view> -->
- <view class="padding flex flex-direction" style="margin-bottom: 100rpx;">
- <view style="margin-bottom: 25rpx; float: right;color: #aa0000; ">
- <view v-if="zhekou!=1" style="color: #3A3A3A;font-size: smaller;
- text-decoration: line-through;font-family: cursive;">原价:
- <text style="color: #e70000;">{{yuanjia}}</text>
- </view>
- <view v-if="zhekou!=1" style="color: #4CD964;font-family: cursive;">折扣:{{zhekou}}</view>
- 总计:{{total}}¥
- </view>
- <button class="cu-btn bg-blue lg" @click="sumit">提交</button>
- </view>
- <uni-collapse-item title="声明" :open="open">
- <uni-card :is-shadow="false">
- <text class="uni-body" style="color: #DD514C;">
- 1. 本实验室仅对来样负责, 结果仅反映对该样品的评价。
- 2. 对送检样品中包含的任何已知的或潜在危害, 如放射性、 致病性、 有毒或爆炸性的样品, 应事先说明, 否则后果由委托单位承担。
- 3. 委托单位对样品的代表性和资料的真实性负责, 因提供给本实验室不清楚、 不正确、 不完全、 误导或虚假信息导致的任何不正确结果,
- 本实验室及本实验室的任何员工都不对客户或任何第三方承担责任。
- 4. 委托方应提供符合检测要求样品,如果样品数量或包装要求不满足实验要求,委托方应重新提供符合要求的样本,否则因此可能产生的后果由委托方承担。
- 5. 委托单位应认真详细填写本委托检测协议书相关内容, 由于填写不清造成报告修改, 应支付修改报告费用。
- 6. 委托单位对检测报告有特殊要求, 对检测结果有测量不确定度要求时, 需在委托单上说明。
- 7. 委托单位对检测结果如有异议, 应于收到报告之日起五个工作日内向本实验室书面提出, 同时附上报告原件或数据; 如果复核后数据无误, 委托单位需支付复测费用。
- 不可重复性实验不进行复测。
- 8. 对因任何超出本实验室控制的原因, 包括战争、 政府禁令、 自然灾害、 设备故障、 客户失于履行他的任何责任等不可抗力因素而直接或间接导致的任何延期、
- 部分或全部服务不能实施, 本实验室不承担责任。
- 9.本实验室不负责任何间接或其他衍生性损失, 包括且不限于利润损失、 业务损失、 机会损失、 商誉损失及产品召回之成本。 本实验室亦不负责可能由客户所造成之第三者的任何损失、
- 损害或费用之索赔 ( 包括且不限于产品责任之索赔)。 对于任何索赔, 赔付金额不超过本委托单中规定支付的总金额。
- 10.本实验室对在检测活动中获得或产生的所有信息履行保密义务, 除客户公开的信息或与客户有约定, 其他所有信息均予以保密。
- 11.本检测委托单一式两份, 双方各保留一份, 仅原件有效。
- 12.检测方接收邮箱 services@mingjiantech.com,联系电话18124144016。
- 13. 送样地址:深圳市南山区源兴科技大厦东座0303 明鉴(收)电话18124144016。
- </text>
- </uni-card>
- </uni-collapse-item>
- </uni-section>
- </view>
- </form>
- </view>
- </template>
- <script>
- const plan_type = [{
- text: '返回给委托人',
- value: '1'
- }, {
- text: '自取',
- value: '2'
- }, {
- text: '不取回',
- value: '3'
- }];
- const plan_type1 = [{
- text: '委托检测',
- value: '1'
- }, {
- text: '抽样检测',
- value: '2'
- }];
- import myDate from '@/components/my-componets/my-date.vue'
- import appSelect from '@/components/my-componets/appSelect.vue'
- import md5 from "@/common/util/md5.js"
- import {
- ACCESS_TOKEN,
- USER_NAME,
- USER_INFO
- } from "@/common/util/constants"
- export default {
- components: {
- myDate,
- appSelect
- },
- data() {
- return {
- yuanjia: 0,
- disabledjiaofei: true,
- zhekou: 1,
- radiohetong: "",
- hetong: [],
- jiancecanshu: [],
- jiaoFeiQiTa: "", //缴费方式其它
- yangPinCunChuYq: "", //样品存储其它要求
- userid: '',
- weituodanwei: '',
- lianxiren: '',
- lianxidianhua: '',
- danweidizhi: '',
- tianxie: new Date(),
- weituo: '',
- value: 0,
- range: [],
- yangpin: [],
- remark: '无特殊要求',
- jiance: [],
- ypname: '',
- ypguige: '',
- ypshuliang: '',
- yppihao: '',
- ypchuzhi: '',
- ypleibie: '',
- fangfa: [],
- fangfaText: '',
- total: 0,
- open: true,
- rateValue: 0,
- vModelValue: 1,
- radio1: 0,
- radio2: 1,
- radio3: 1,
- radio4: 0,
- radio5: 0,
- radio6: 0,
- radio7: 1,
- radio8: 0,
- jiaoFeiFangShi: [{
- text: '预付',
- value: 0,
- }, {
- text: '月结',
- value: 1,
- },
- {
- text: '其它',
- value: 2,
- },
- ],
- ganran: [{
- text: '是',
- value: 0
- }, {
- text: '否',
- value: 1
- }, ],
- checkbox2: [],
- sex: [{
- text: '碳素钢和中低合金钢',
- value: 0,
- canshu: []
- }, {
- text: '金属零件',
- value: 1,
- canshu: []
- }],
- xingshi: [{
- text: '电子版(PDF)',
- value: 0
- }, {
- text: '纸质版',
- value: 1
- }],
- jielun: [{
- text: '要',
- value: 0
- }, {
- text: '不要',
- value: 1
- }],
- baogao: [{
- text: '自取',
- value: 0
- }, {
- text: '邮寄(到付)',
- value: 1
- }, {
- text: 'Email',
- value: 2
- }],
- cunchuyaoqiu: [{
- text: '常温',
- value: 0
- }, {
- text: '2-8°C',
- value: 1
- }, {
- text: '避光',
- value: 2
- }, {
- text: '其它',
- value: 3
- }, ],
- //余样处理
- yuyangchuli: [{
- text: '委托方(自取)',
- value: 0
- }, {
- text: '邮寄(到付)',
- value: 1
- }, {
- text: '授权本实验室自行处理',
- value: 2
- }],
- value: 0,
- type: "default",
- inverted: false,
- leibie: "",
- weituodanhao: '',
- plan_type1,
- plan_type,
- type2: '',
- type1: '',
- beginTime: '',
- index: -1,
- leixing: '',
- switchC: true,
- imgList: [],
- };
- },
- onLoad: function(option) {
- //初始换用户信息
- let info = uni.getStorageSync(USER_INFO);
- console.log(info)
- if (info == undefined) {
- return;
- }
- this.weituodanwei = info.employee.orgName;
- this.userid = info.employee.id;
- this.lianxiren = info.employee.name;
- this.lianxidianhua = info.employee.mobile
- this.getjianceData();
- this.getDataHetong();
- let query = this.$Route.query
- },
- methods: {
- changeCheckbox(i) {
- this.yangpin[i].checkbox = [];
- },
- addYangPin() {
- let data = {};
- data.yangPinMingCheng = '';
- data.yangpihao = '';
- data.yangpindaici = '';
- data.jianCeXiangMu = '';
- data.radio = 0;
- data.jiancecanshu = this.jiancecanshu;
- data.checkbox = [];
- data.zongjia = 0;
- data.yuanjia = 0;
- data.zhekou = 1;
- this.yangpin.push(data);
- console.log(this.yangpin)
- },
- deleteYangPin(i) {
- this.$delete(this.yangpin, i)
- },
- onChange(e) {
- //console.log('rate发生改变:' + JSON.stringify(e))
- console.log(e)
- // console.log(this.rateValue);
- },
- sumit() {
- let para = {
- "parameters": [{
- "key": "defId",
- "value": "989811420067528704"
- },
- {
- "key": "version",
- "value": "0"
- },
- {
- "key": "data",
- "value": ""
- }
- ]
- }
- let paradata = {
- "id": "",
- "zhuangTai": "待运营中心审核",
- "shiFouGuoShen": "已编制",
- "shenQingLaiYuan": "客户下单",
- "shenQingLeiXing": "检测申请",
- "heTongBianHao": "",
- "weiTuoDanWei": "",
- "lianXiDianHua": "",
- "weiTuoBianHao": "",
- "lianXiRen": "",
- "danWeiDiZhi": "",
- "bianZhiShiJian": "", //填写日期
- "weiTuoRiQi": "", //委托日期
- "tongXunDiZhi": "",
- "yangPinShiFouYouG": "",
- "mjypb": [{
- "yangPinMingCheng": "",
- "piHao": "",
- "daiCi": "",
- "yangPinBianHao": "",
- "jianCeXiangMu": "",
- "id": "",
- "waiJian": ""
- }],
- "yangPinCunChuYaoQ": "",
- "yangPinCunChuYq": "",
- "yuYangChuLi": "",
- "baoGaoXingShi": "",
- "baoGaoHuoQu": "",
- "baoGaoFenShu": "",
- "jiaoFeiFangShi": "",
- "email": "",
- "jiaoFeiQiTa": "",
- "beiZhuHuoQiTaYueD": "",
- "weiTuoRenQianZi": "",
- "weiTuoRenQianZiRi": "",
- "chengJieRenQianZi": "",
- "chengJieRenQianZ": "",
- "bianZhiBuMen": "",
- "bianZhiRen": this.userid,
- "yangPinMingCheng": "",
- "piHao": "",
- "daiCi": "",
- "jianCeXiangMu": "",
- "zongJia": this.total,
- "yuanJia": this.yuanjia,
- "zheKou": this.zhekou
- };
- //组装参数
- paradata.mjypb = []; //样品数据赋值
- for (let i in this.yangpin) {
- let entity = {};
- entity.yangPinMingCheng = this.yangpin[i].yangPinMingCheng;
- entity.piHao = this.yangpin[i].yangpihao;
- entity.daiCi = this.yangpin[i].yangpindaici;
- let xiangmu = '';
- for (let j in this.yangpin[i].checkbox) { //组装已选检测项目
- let box = this.yangpin[i].checkbox[j];
- if (j > 0) {
- xiangmu = xiangmu + ',';
- }
- xiangmu = xiangmu + this.yangpin[i].jiancecanshu[box].id_;
- }
- entity.jianCeXiangMu = xiangmu;
- //console.log(xiangmu)
- //entity.jianCeXiangMu=this.yangpin[i].jianCeXiangMu;
- paradata.mjypb.push(entity)
- }
- //样品处理
- paradata.yangPinShiFouYouG = this.ganran[this.radio7].text; //是否感染
- paradata.yangPinCunChuYaoQ = this.cunchuyaoqiu[this.radio5].text; //存储要求
- paradata.yuYangChuLi = this.yuyangchuli[this.radio6].text; //余样处理
- paradata.shenQingLeiXing = "委托检测"; //申请类型
- paradata.yangPinCunChuYq = this.yangPinCunChuYq; //存储其它要求
- paradata.jiaoFeiQiTa = this.jiaoFeiQiTa; //其它缴费方式
- paradata.beiZhuHuoQiTaYueD = this.remark; //备注
- paradata.bianZhiShiJian = this.tianxie; //填写时间
- paradata.paradata = this.weituo; //委托日期
- //报告信息
- paradata.baoGaoFenShu = this.vModelValue;
- //基本信息
- paradata.weiTuoDanWei = this.weituodanwei;
- paradata.lianXiRen = this.lianxiren;
- paradata.lianXiDianHua = this.lianxidianhua;
- paradata.danWeiDiZhi = this.danweidizhi;
- //合同编号
- if ("" == (this.radiohetong)) {
- paradata.heTongBianHao = "无合同";
- } else {
- paradata.heTongBianHao = this.hetong[this.radiohetong].text;
- }
- //缴费方式
- paradata.jiaoFeiFangShi = this.jiaoFeiFangShi[this.radio8].text;
- //报告获取
- paradata.baoGaoHuoQu = this.baogao[this.radio4].text;
- //报告形式
- paradata.baoGaoXingShi = this.xingshi[this.radio2].text;
- para.parameters[2].value = JSON.stringify(paradata);
- //开启流程
- //ibps/business/v3/bpm/instance/start
- this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
- if (res.data.state == 200) {
- this.$tip.success('提交成功!')
- this.$Router.replaceAll({
- name: 'index'
- })
- } else {
- this.$tip.success('提交异常!')
- this.$Router.replaceAll({
- name: 'index'
- })
- }
- });
- },
- calc(e, i) {
- console.log(e)
- console.log(i)
- //计算单样品小计
- let total = 0;
- let data = e.detail.data;
- for (let i in data) {
- //计算价格
- total = total + parseFloat(data[i].dan_jia_);
- //生成检测项目数据
- }
- this.yangpin[i].yuanjia = total; //原价
- this.yangpin[i].zongjia = total;
- //this.total=total
- this.recalc();
- },
- //根据折扣重新计算金额
- recalc() {
- let zhekou = this.zhekou;
- console.log("折扣:" + zhekou)
- for (let i in this.yangpin) {
- this.yangpin[i].zongjia = this.yangpin[i].zongjia * zhekou;
- }
- //计算总价
- let zongjia = 0;
- let yuanjia = 0;
- for (let i in this.yangpin) {
- zongjia = zongjia + this.yangpin[i].zongjia;
- yuanjia = yuanjia + this.yangpin[i].yuanjia;
- }
- this.total = zongjia;
- this.yuanjia = yuanjia;
- },
- getjianceData() {
- let para = {
- "parameters": [{
- "key": "response_data",
- "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_\"}"
- },
- {
- "key": "filter_condition_key",
- "value": ""
- }
- ],
- "requestPage": {
- "pageNo": 1,
- "limit": 200,
- "totalCount": 25
- },
- "sorts": []
- }
- this.$http.post("/ibps/business/v3/data/template/queryDataTable", para).then(res => {
- if (res.data.state == 200) {
- //console.log(res.data.data.dataResult)
- let data = res.data.data.dataResult;
- for (let i in data) {
- data[i].value = i;
- data[i].text = data[i].jian_ce_xiang_mu_ + " 单价: " + data[i].dan_jia_;
- }
- this.jiancecanshu = data;
- }
- });
- /* let pagepara={
- "parameters": [],
- "requestPage": {
- "pageNo": 1,
- "limit": 100,
- "offset": 0,
- "totalCount": 12
- }
- }
- let this_=this;
- //"ibps/business/v3/entrust/sysjtsjpz/query"
- this.$http.post("/ibps/business/v3/entrust/sysjtsjpz/query", pagepara).then(res => {
- if (res.data.state == 200) {
- console.log(res.data.variables.data)
- let data=res.data.variables.data;
- //console.log(filterJson(data,"jianCeDuiXiang"))
- let jianceduix=filterJson(data,"jianCeDuiXiang")
- let datajiance=[]
- for(let i in jianceduix){
- let yy={};
- yy.jianceduix=jianceduix[i].jianCeDuiXiang;
- yy.jianCeLeiBie=jianceduix[i].jianCeLeiBie;
- yy.jianCeFangFa=jianceduix[i].jianCeFangFa;
- yy.canshu=data.filter(function(item){
- return item.jianCeDuiXiang==jianceduix[i].jianCeDuiXiang
- })
- datajiance.push(yy);
-
- }
- //let jiance=[];
- for(let i in datajiance){
- let entity={};
- entity.value=i;
- entity.text=datajiance[i].jianceduix;
- entity.leixing=datajiance[i].jianCeLeiBie;
- entity.canshu=datajiance[i].canshu;
- entity.fangfa=datajiance[i].jianCeFangFa;
- for(let j in datajiance[i].canshu){
- datajiance[i].canshu[j].text=datajiance[i].canshu[j].xiangMuCanShu+" 单价:"+datajiance[i].canshu[j].price +"¥"
- datajiance[i].canshu[j].value=j;
- // datajiance[i].canshu[j].selected=true;
- }
- if(i<2){
- this_.sex[i]=entity;//
- }else{
- this_.sex.push(entity)
- }
-
-
- //jiance.push(entity)
- }
-
-
-
- this_.radio1=0;
-
- console.log(this_.sex)
- //this_.radio1=0;
- }
- });
-
- this.radio1=0;
- //this.defaultdata=[0,1];
- //委托单号
- let smsParams = {
- alias: "gzyrwtbh"
- };
-
- this.$http.post("/ibps/business/v3/jc/sys/getNextIdByAlias", smsParams).then(res => {
- if (res.data.state == 200) {
- console.log(res.data.data)
- this_.weituodanhao = res.data.data
- }
- });
-
- //查询方法名称
- let data = 'select * FROM t_ffgl';
- data = '{"sql":"' + data + '"}'
- let md5 = this.sig(data) //加密, 获取md5密文
- let requestData = data.slice(0, 1) + '"sig":"' + md5 + '",' + data.slice(1) //结果拼接
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- this.fangfa = res.data.variables.data
- }
- }); */
- },
- DateChange(e) {
- this.myFormData.birthday = e.detail.value
- },
- SwitchC(e) {
- this.switchC = e.detail.value
- },
- sig(sql) {
- let rul = (sql.length + 9) * 12 * 3 + 168
- let salt = "JinYuanXinTong"
- return md5(rul + '' + salt)
- },
- ChooseImage() {
- var that = this;
- uni.chooseImage({
- count: 4, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择
- success: (res) => {
- that.$http.upload(that.$config.apiUrl + that.uploadUrl, {
- filePath: res.tempFilePaths[0],
- name: 'file'
- })
- .then(res => {
- that.myFormData.avatar = res.data.message;
- })
- .catch(err => {
- that.$tip.error(err.data.message)
- });
- this.imgList = res.tempFilePaths
- }
- });
- },
- ViewImage(e) {
- uni.previewImage({
- urls: this.imgList,
- current: e.currentTarget.dataset.url
- });
- },
- DelImg(e) {
- uni.showModal({
- title: '召唤师',
- content: '确定要删除这段回忆吗?',
- cancelText: '再看看',
- confirmText: '再见',
- success: res => {
- if (res.confirm) {
- this.imgList.splice(e.currentTarget.dataset.index, 1)
- }
- }
- })
- },
- getDataHetong() {
- let info = uni.getStorageSync(USER_INFO);
- if (info == undefined) {
- return;
- }
- info.employee.name;
- let data = '';
- data =
- "select * from t_bjd where ke_hu_ming_cheng_ in(select id_ from t_yxkh where ke_hu_ming_cheng_='" +
- info.employee.name + "') and zhuang_tai_='生效中'";
- data = '{"sql":"' + data + '"}'
- let md5 = this.sig(data) //加密, 获取md5密文
- let requestData = data.slice(0, 1) + '"sig":"' + md5 + '",' + data.slice(1) //结果拼接
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- // console.log(res.data.variables.data)
- let result = res.data.variables.data;
- console.log(111111111)
- console.log(result)
- if (result.length == 0) {
- //无合同信息 固定缴费方式为预付
- this.radio8 = 0;
- this.disabledjiaofei = true;
- } else {
- this.hetong = [];
- for (let i in result) {
- result[i].text = result[i].he_tong_bian_hao_;
- result[i].value = i;
- // this.hetong.push(result[i]);
- this.$set(this.hetong, i, result[i])
- }
- //this.radiohetong=0;
- //this.$forceUpdate();
- }
- /* this.range=[];
- for(let i in result){
- result[i].value=i;
- result[i].text=result[i].he_tong_bian_hao_;
- //this.range.push(result[i])
- this.$set(this.range,i,result[i])
- }
- console.log(this.range)
- this.$forceUpdate(); */
- }
- });
- },
- change(e) {
- console.log(e)
- },
- changehetong(i) {
- console.log(i)
- if (i == "") {
- this.zhekou = 1;
- //固定缴费方式
- this.radio8 = 0;
- this.disabledjiaofei = true;
- return;
- } else {
- this.disabledjiaofei = true;
- //从合同中选择付款方式
- let fangshi = this.hetong[i].fu_kuan_fang_shi_;
- for (let i in this.jiaoFeiFangShi) {
- if (this.jiaoFeiFangShi[i].text == fangshi) {
- this.radio8 = this.jiaoFeiFangShi[i].value;
- }
- }
- }
- console.log(this.hetong[i])
- let zhekou = zhuanhuan(this.hetong[i].you_hui_gui_ze_)
- this.zhekou = zhekou;
- this.recalc();
- //从合同中获取付款方式
- },
- changeValue(value) {
- console.log('返回数值:', value);
- },
- focus(e) {
- console.log('focus:', e);
- },
- blur(e) {
- console.log('blur:', e);
- },
- setType() {
- let types = ["default", "primary", "success", "warning", "error"];
- let index = types.indexOf(this.type);
- types.splice(index, 1);
- let randomIndex = Math.floor(Math.random() * 4);
- this.type = types[randomIndex];
- },
- setInverted(index) {
- this.canshu[index].show = !this.canshu[index].show;
- },
- onSubmit() {
- let data = {
- crmZhuangTai: "crm",
- weiTuoZhuangTai: "待审核",
- id: "",
- weiTuoDanHaoZhuan: "",
- yangPinBianHaoZhu: "",
- shouLiBuMen: "检测室",
- weiTuoFang: "外部委托",
- jianCeWeiZhi: "",
- shouLiShiJian: "2022-06-07",
- dingDanHao: "",
- dingDanLaiYuan: "业务人员下单",
- baoJiaDan: "",
- quDao: "手机下单",
- xiaoShouRenYuan: "",
- zongJinE: this.total,
- weiTuoDanHao: "",
- lianXiRen: "",
- weiTuoDanWei: "",
- lianXiFangShi: "",
- qiWangWanChengShi: "",
- tongXunDiZhi: "质量部",
- gdyrqcyp: [],
- yangPinChuZhi: "",
- jianCeLeiBie: "",
- keHuYaoQiu: "无特殊要求",
- jcxmcrm: [], //检测项目
- quBaoGaoFangShiJi: "自取",
- baoGaoFenShu: 1,
- qiTaYaoQiu: this.remark,
- jianCeJieGuoZuoCh: "不要",
- jianCeJieLun: "不要",
- jianCeBaoGaoZhong: "不要",
- hkfab: [],
- dingDanShenHeYiJi: "",
- dingDanShenPiYiJi: "",
- bianZhiRen: "",
- yangPinMingCheng: "样品名称",
- guiGeXingHao: "",
- shengChanRiQiPiHa: "",
- shouJiKeHuId: ""
- };
- //组装数据
- //获取下单用户信息
- let info = uni.getStorageSync(USER_INFO);
- console.log(info)
- if (info == undefined) {
- return;
- }
- data.lianXiRen = info.username;
- data.weiTuoDanWei = info.companyid;
- data.lianXiFangShi = info.number;
- data.dingDanLaiYuan = "手机下单";
- data.shouLiBuMen = "检测室";
- data.shouJiKeHuId = info.id;
- data.weiTuoDanHao = this.weituodanhao;
- data.qiWangWanChengShi = this.beginTime;
- data.jcxmcrm = this.jiance;
- //样品处置
- if (this.type2 == "" || this.type1 == "") {
- this.$tip.alert("请选择检测类别或处置方式");
- return false;
- }
- data.yangPinChuZhi = this.plan_type[this.type2 - 1].text;
- //检测类别
- data.jianCeLeiBie = this.plan_type1[this.type1 - 1].text;
- //样品名称、规格、数量、批号
- let yangpin = {
- yangPinMingCheng: this.ypname,
- guiGeXingHao: this.ypguige,
- shuLiang: this.ypshuliang,
- shengChanRiQiPiHa: this.yppihao
- }
- data.gdyrqcyp.push(yangpin);
- //报告份数
- data.baoGaoFenShu = this.vModelValue;
- //检测结论
- data.jianCeJieLun = this.jielun[this.radio3].text;
- data.quBaoGaoFangShiJi = this.baogao[this.radio4].text
- let para = {
- boCode: "gdyrqcwt",
- version: 0,
- formKey: "ddfq",
- pk: "",
- data: JSON.stringify(data)
- }
- // console.log(para)
- let that = this;
- this.$http.post("ibps/business/v3/data/template/saveFormData/vo", para).then(res => {
- if (res.data.state == 200) {
- this.$tip.success("下单成功!")
- this.$Router.replace({
- name: 'index'
- })
- } else {
- this.$tip.error("请求错误: " + res.data.message)
- }
- }).catch((err) => {
- let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
- this.$tip.error(msg);
- });
- //============================================================================================================
- },
- }
- }
- //过滤数据
- function filterJson(data, Name) { //data是json对象,Name是根据什么字段去重
- var map = {},
- dest = [];
- for (var i = 0; i < data.length; i++) {
- var ai = data[i];
- if (i == 0) {
- dest.push(ai);
- } else {
- var filterData = dest.filter(function(e) {
- return e[Name] == ai[Name];
- })
- if (filterData.length == 0) {
- dest.push(ai);
- }
- }
- }
- return dest;
- }
- //百分比转换为小数
- function zhuanhuan(data)
- {
- var str = data.replace("%", "");
- str = str / 100
- return str;
- }
- </script>
- <style>
- .cu-form-group .title {
- min-width: calc(4em + 15px);
- }
- .example-body {
- /* #ifndef APP-PLUS-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: flex-start;
- align-items: flex-end;
- flex-wrap: wrap;
- }
- .tag-view {
- margin-right: 10px;
- }
- .example-body2 {
- padding: 12px;
- background-color: #FFFFFF;
- }
- .result-box {
- text-align: center;
- padding: 20px 0px;
- font-size: 16px;
- }
- .uni-list-item {
- border-bottom-style: solid;
- border-bottom-width: 1px;
- border-bottom-color: #eee;
- font-size: 14px;
- }
- .uni-list-item__container {
- /* #ifndef APP-NVUE */
- display: flex;
- width: 100%;
- box-sizing: border-box;
- /* #endif */
- padding: 12px 15px;
- flex: 1;
- position: relative;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
- .uni-list-item__content-title {
- font-size: 14px;
- color: #666;
- }
- </style>
|