| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607 |
- <template>
- <view>
- <cu-custom bgColor="bg-luohu" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">检测委托</block>
- <block slot="right" v-if="buttonFlagNum === '1'">
- <text @click="getBack">退回原因</text>
- </block>
- </cu-custom>
- <u-form :model="form" ref="form" label-width="220" :error-type="errorType" :disabled="type == 'detail' ? true : false">
- <top ref="top" @activeNumClick="activeNumClick"></top>
- <view v-show="activeNum == 1">
- <uni-group mode="card">
- <u-form-item label="委托类型">
- <u-input placeholder="请输入委托类型" v-model="form.weiTuoLeiXing" disabled />
- </u-form-item>
- <u-form-item label="委托编号">
- <u-input placeholder="请输入委托编号" v-model="form.weiTuoBianHao" disabled />
- </u-form-item>
- <u-form-item label="用户选择" required v-if="administrator">
- <uni-data-select placeholder="请选择合同选择" v-model="form.baoGaoBianZhiYuan" :localdata="userList" @change="userListChange" v-if="type != 'detail'">
- </uni-data-select>
- <text v-else>{{getButtChange(form.baoGaoBianZhiYuan,userList)}}</text>
- </u-form-item>
- <u-form-item label="合同选择" prop="heTongId" required>
- <uni-data-select placeholder="请选择合同选择" v-model="form.heTongId" :localdata="hetongList" @change="hetongChange" v-if="type != 'detail'">
- </uni-data-select>
- <text v-else>{{getButtChange(form.heTongId,hetongList)}}</text>
- </u-form-item>
- <u-form-item label="委托来源">
- <u-input placeholder="请输入委托来源" v-model="form.weiTuoDanLaiYuan" disabled />
- </u-form-item>
- <u-form-item label="合同类型" prop="weiTuoHeTong">
- <u-input placeholder="请输入合同类型" v-model="form.weiTuoHeTong" disabled />
- </u-form-item>
- <u-form-item label="委托单位">
- <u-input placeholder="请输入委托单位" v-model="form.weiTuoDanWei" disabled />
- </u-form-item>
- <u-form-item label="送检单位" prop="songJianDanWei" required>
- <u-input placeholder="请输入送检单位" v-model="form.songJianDanWei" :disabled="type == 'detail' ? true : false" />
- </u-form-item>
- </uni-group>
- <uni-group mode="card">
- <u-form-item label="付款方式">
- <u-input placeholder="请输入付款方式" v-model="form.fuKuanFangShi" disabled />
- </u-form-item>
- <u-form-item label="报告类型">
- <u-radio-group v-model="form.baoGaoLeiXing" v-if="type != 'detail'">
- <u-radio v-for="(item, index) in reportTypeList" :key="index" :name="item.name">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- <text v-else>{{getButtChange(form.baoGaoLeiXing,reportTypeList)}}</text>
- </u-form-item>
- <u-form-item label="出报告要求" prop="chuJuBaoGaoYaoQiu">
- <u-radio-group v-model="form.chuJuBaoGaoYaoQiu" v-if="type != 'detail'" @change="getMultiple()">
- <u-radio v-for="(item, index) in reportRequireList" :key="index" :name="item.name">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- <text v-else>{{getButtChange(form.chuJuBaoGaoYaoQiu,reportRequireList)}}</text>
- </u-form-item>
- <u-form-item label="报告发放方式" prop="chuBaoGaoShiJian">
- <uni-data-checkbox multiple v-model="form.chuBaoGaoShiJianValue" :localdata="chuBaoGaoShiJianList" v-if="type != 'detail'" @change="chuBaoGaoChange"></uni-data-checkbox>
- <text v-else>{{form.chuBaoGaoShiJian}}</text>
- </u-form-item>
- <u-form-item label="样品是否带有传染性疾病" prop="name">
- <u-radio-group v-model="form.biaoQianTuPianJudge" v-if="type != 'detail'">
- <u-radio v-for=" (item, index) in judgeList" :key="index" :name="item.name">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- <text v-else>{{form.biaoQianTuPianJudge}}</text>
- </u-form-item>
- <view v-if="form.biaoQianTuPianJudge == '是'">
- <view class="qingshe">
- <view class="qingTitle">
- 若样品带有传染性疾病请在此备注
- </view>
- </view>
- <u-form-item label="备注">
- <u-input placeholder="请输入备注" v-model="form.biaoQianTuPian" :disabled="type == 'detail'?true :false" />
- </u-form-item>
- </view>
- <u-form-item label="检毕样品处置" prop="yangBenChuLi" required>
- <u-input placeholder="请选择检毕样品处置" type="select" v-model="form.yangBenChuLi" @click="sheetClick('disposition')" v-if="type != 'detail'" />
- <text v-else>{{form.yangBenChuLi}}</text>
- </u-form-item>
- <u-form-item class="lineStyle" label="是否需要原始数据" prop="name">
- <u-radio-group v-model="form.jianCeKaiShiShiJi" v-if="type != 'detail'">
- <u-radio v-for=" (item, index) in judgeListOpposite" :key="index" :name="item.name">
- {{item.name}}
- </u-radio>
- </u-radio-group>
- <text class="fontSty" v-if="type != 'detail'">(需提前沟通并加收费用)</text>
- <text v-else>{{form.jianCeKaiShiShiJi}}</text>
- </u-form-item>
- </uni-group>
- </view>
- <view v-show="activeNum == 2">
- <u-button type="success" class="btn green-back-color" @click="getSing()" v-if="type != 'detail'">添加样品
- </u-button>
- <view class="tagBox" v-if="form.lhypb.length > 1">
- <uni-tag class="tagSin" :text="'样品:'+(index+1)" :type="lhypbIndex == index ? 'primary':'warning'" :circle="true" v-for="(item,index) in form.lhypb" :key="index" @click="lhypbIndex = index" />
- </view>
- <view v-for="(item,index) in form.lhypb" :key="index" v-if="index == lhypbIndex">
- <lhypb-com :item="item" :index="index" :type="type" @deleteClick="deletSing" @updateClick="updateClick">
- </lhypb-com>
- </view>
- </view>
- <view v-show="activeNum == 3">
- <uni-group mode="card">
- <u-form-item label="总价">
- <u-input placeholder="请输入总价" v-model="form.zongJia" disabled />
- </u-form-item>
- </uni-group>
- <uni-group mode="card">
- <u-form-item label="委托方" prop="weiTuoFangMingChe" required>
- <u-input placeholder="请输入委托人信息" v-model="form.weiTuoFangMingChe" :disabled="type == 'detail'?true :false" />
- </u-form-item>
- <u-form-item label="联系人" prop="weiTuoFangLianXiR" required>
- <u-input placeholder="请输入联系人" v-model="form.weiTuoFangLianXiR" :disabled="type == 'detail'?true :false" />
- </u-form-item>
- <u-form-item label="联系电话" prop="weiTuoFangLianXiD" required>
- <u-input placeholder="请输入联系电话" v-model="form.weiTuoFangLianXiD" :disabled="type == 'detail'?true :false" />
- </u-form-item>
- <u-form-item label="委托日期" prop="weiTuoRiQi">
- <u-input placeholder="请选择委托日期" type="select" v-model="form.weiTuoRiQi" @click="dateClick('weiTuo')" v-if="type != 'detail'" />
- <text v-else>{{form.weiTuoRiQi}}</text>
- </u-form-item>
- <u-form-item label="委托签名" label-position="top" required>
- <view style="width: 100%;">
- <view style="text-align: right;width: 100%;">
- <view v-if="type != 'detail'">
- <u-button type="primary" size="mini" @click="qianming(0)" class="btn-back-color">
- 签名</u-button>
- <u-button type="error" size="mini" @click="deqianming(0)" style="margin-left: 15rpx;" v-if="form.weiTuoFangQueRen != ''">
- 取消</u-button>
- </view>
- </view>
- <view style="width: 100%;" v-if="form.weiTuoFangQueRen != ''">
- <image :src="form.weiTuoFangQueRen" style="width: 100%;height: 500rpx;border: 1px #eee solid;">
- </image>
- </view>
- </view>
- </u-form-item>
- </uni-group>
- </view>
- <view style="height: 100rpx;"></view>
- </u-form>
- <order-buttom :type="type" :activeNum="activeNum" :buttonFlagNum="buttonFlagNum" @nextStep="nextStep" @lastStep="lastStep" @onSubmit="onSubmit"></order-buttom>
- <u-back-top :scroll-top="scrollTop" :icon-style="iconStyle" bottom="400" top="100"></u-back-top>
- <u-calendar v-model="dateShow" :mode="mode" max-date="2050-01-01" @change="dateChange"></u-calendar>
- <u-action-sheet :list="list" v-model="sheetShow" @click="actionSheetCallback"></u-action-sheet>
- <u-select v-model="selectShow" :list="list" @confirm="selectConfirm"></u-select>
- <u-popup mode="center" v-model="popupShow">
- <view style="padding: 30rpx;background: #FFFFFF;width: 100%;">
- <view class="cu-form-group ">
- <view class="title">
- 签名
- </view>
- </view>
- <autograph @save="save" @clear="clear" @close="close"></autograph>
- </view>
- </u-popup>
- <u-popup v-model="lhypbShow" mode="bottom" height="80%" border-radius="20">
- <view>
- <lhypb-message ref="lhypbMessage" :type="lhypbIndexData" :jianCeTypeList="jianCeTypeList" :taoCanShow="taoCanShow" :heTongId="form.heTongId" :itemType="itemType" :chuJuBaoGaoYaoQiu="form.chuJuBaoGaoYaoQiu" @deletClick="deletClick" @sumbitSingClick="sumbitSingClick" @getParentContent="getJianXiangData">
- </lhypb-message>
- </view>
- </u-popup>
- <u-modal v-model="meassageShow" :show-cancel-button="true" :show-confirm-button="false" title="检测项目" @cancel="cancel">
- <view class="u-update-content">
- <rich-text :nodes="content"></rich-text>
- </view>
- </u-modal>
- <u-modal v-model="backShow" :show-cancel-button="true" :show-confirm-button="false" title="退回提示" @cancel="cancel">
- <view class="u-update-content">
- <rich-text :nodes="content"></rich-text>
- </view>
- </u-modal>
- </view>
- </template>
- <script>
- import appSelect from '@/components/my-componets/appSelect.vue'
- import md5 from "@/common/util/md5.js"
- import autograph from '@/components/autograph/autograph'
- import popup from '@/components/popup/popup.vue'
- import order from './order/test.json'
- import lhypbMessage from '@/pages/jiance/order/lhypbMessage.vue'
- import message from '@/pages/jiance/order/message.vue'
- import top from '@/pages/jiance/order/top.vue'
- import lhypbCom from '@/pages/jiance/order/lhypbCom.vue'
- import orderButtom from '@/pages/jiance/order/orderButtom.vue'
- import {
- ACCESS_TOKEN,
- USER_NAME,
- USER_INFO
- } from "@/common/util/constants"
- import service from './order/meth.js'
- import meth from './order/meth.js'
- export default {
- components: {
- lhypbMessage,
- message,
- top,
- lhypbCom,
- orderButtom
- },
- data() {
- return {
- activeNum: 1,
- form: {
- baoGaoBianZhiYuan: '',
- weiTuoLeiXing: '',
- weiTuoDanLaiYuan: '',
- weiTuoBianHao: '',
- heTongId: '',
- heTongBianHao: '',
- weiTuoHeTong: '',
- weiTuoDanWei: '',
- songJianDanWei: '',
- qiWangWanChengShi: '',
- lhypb: [],
- fuKuanFangShi: '',
- baoGaoLeiXing: '简易',
- chuJuBaoGaoYaoQiu: '常规',
- chuBaoGaoShiJian: '电子报告',
- chuBaoGaoShiJianValue: ['电子报告'],
- yangBenChuLi: '按照检测方样本管理规程处理',
- weiTuoFangMingChe: '',
- weiTuoFangLianXiR: '',
- weiTuoFangLianXiD: '',
- weiTuoRiQi: '',
- weiTuoFangQueRen: '',
- zongJia: 0,
- zhanShiBiaoId: this.generateUUID(),
- biaoQianTuPianJudge: '否',
- jianCeKaiShiShiJi: '否',
- biaoQianTuPian: '',
- kaiPiaoZhuangTai: '未开票',
- },
- rules: {
- heTongId: [{
- required: true,
- message: '请选择合同',
- trigger: ['change', 'blur'],
- }],
- songJianDanWei: [{
- required: true,
- message: '请输入送检单位',
- trigger: 'blur',
- }],
- yangBenChuLi: [{
- required: true,
- message: '请选择样本处理',
- trigger: ['change', 'blur'],
- }],
- chuBaoGaoShiJian: [{
- required: true,
- message: '请输入出报告时间',
- trigger: 'blur',
- }],
- weiTuoFangMingChe: [{
- required: true,
- message: '请输入委托方',
- trigger: 'blur',
- }],
- weiTuoFangLianXiD: [{
- required: true,
- message: '请输入联系电话',
- trigger: 'blur',
- }],
- weiTuoFangLianXiR: [{
- required: true,
- message: '请输入联系人',
- trigger: 'blur',
- }],
- weiTuoFangQueRen: [{
- required: true,
- message: '请委托人签名',
- trigger: 'blur',
- }],
- },
- errorType: ['toast'],
- //日期
- dateType: 'inspect',
- dateShow: false,
- mode: 'date',
- //委托来源
- reportSourceList: order.reportSource,
- //报告类型
- reportTypeList: order.reportType,
- //报告要求
- reportRequireList: order.reportRequire,
- //样本类型
- sampleTypeList: order.sampleType,
- //样本状态
- sampleStateList: order.sampleState,
- //样本运输条件
- transportTypeList: order.transportType,
- //样本规格
- specificationList: order.specification,
- //样品处理
- dispositionList: order.disposition,
- chuBaoGaoShiJianList: order.chuBaoGaoShiJianList,
- //性别
- sexList: order.sex,
- //是否判断
- judgeList: order.judgeList,
- judgeListOpposite: order.judgeListOpposite,
- //签名显示
- qianshow: false,
- qianIndex: 0,
- //下拉框
- sheetShow: false,
- list: [],
- listType: '',
- listIndex: 0,
- //账号id
- userid: '',
- time: '',
- time2: '', //有时分秒
- orgId: '',
- //合同
- hetong: [],
- hetongList: [],
- heTongShow: false,
- //检测项目
- jianCeList: [],
- //检测类型
- jianCeType: '',
- jianCeTypeList: [],
- type: '', //判断哪个功能
- id: '', //委托单id
- taskId: '',
- total: 0,
- popupShow: false,
- selectShow: false,
- scrollTop: 0,
- iconStyle: {
- color: '#FFFFFF'
- },
- lhypbIndex: 0,
- lhypbShow: false,
- lhypbIndexData: 'add', //判断样品添加还是修改
- buttonFlagNum: '',
- taoCanList: [],
- taoCanShow: true,
- taoCanXiangmMuList: [],
- meassageShow: false,
- content: ``,
- itemType: true,
- deleteString: '',
- backShow: false,
- option: '',
- userList: [],
- administrator: false,
- orgid: '',
- temporaryForm: null
- }
- },
- onLoad(options) {
- //获取账号id
- let info = uni.getStorageSync(USER_INFO)
- if (info.user.id) {
- this.userid = info.user.id || ''
- }
- if (options.baoGaoBianZhi) {
- this.baoGaoBianZhi = options.baoGaoBianZhi
- }
- let administrator = uni.getStorageSync('administrator')
- this.administrator = administrator
- this.getInit()
- if (administrator) {
- this.getAdministrator()
- }
- if ((administrator && options.id) || !administrator) {
- this.getDataHetong(options.id, this.baoGaoBianZhi)
- }
- //一开始查合同 如果修改或者明细 传option.id
- // if (options && options.type != 'detail') {
- // this.getDataHetong(options.id)
- // } else {
- // this.getLiuHenWeiTuoDan(options.id)
- // }
- if (options.saveId) { //是不是暂存信息
- this.buttonFlagNum = '3'
- this.saveId = options.saveId
- this.getSaveData(options.saveId)
- } else if (options.type && options.type != '') { //是不是修改信息
- this.type = options.type
- } else {
- this.getLhwtdh()
- }
- if (options.id) { //是不是修改信息
- this.id = options.id
- // this.getDe(options.id)
- if (options.type == 'edit') {
- this.getTaskId(options.id)
- }
- }
- if (options.buttonFlag) {
- this.buttonFlagNum = options.buttonFlag
- }
- },
- onReady() {
- this.$refs.form.setRules(this.rules);
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- methods: {
- //上一步
- lastStep() {
- let index = JSON.parse(JSON.stringify(this.activeNum))
- this.$refs.top.activeNum = index - 1
- this.activeNum = index - 1
- },
- //下一步
- nextStep() {
- let index = JSON.parse(JSON.stringify(this.activeNum))
- if (index == '1' && !service.getActiveNum1(this.form)) {
- return
- }
- this.$refs.top.activeNum = index + 1
- this.activeNum = index + 1
- },
- //超级用户 获取全部客户信息
- getAdministrator() {
- let sql =
- `select ID_,NAME_,qq_,GROUP_ID_ from ibps_party_employee where STATUS_ = 'actived' and ID_ != '-1' and ID_ != '702117247933480960' and ID_ != '1115242459127873536' and ID_ != '1115242765924433920' and ID_ != '1100468240921919488' order by FIELD(GROUP_ID_, '1041786072788369408') desc,create_time_ desc`
- // `select ID_,NAME_ from ibps_party_employee where GROUP_ID_ = '1041786072788369408' and STATUS_ = 'actived'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data
- result.forEach((item, index) => {
- if (item.GROUP_ID_ == '1041786072788369408') {
- this.$set(item, 'text', `${item.NAME_} (${item.qq_})`)
- } else {
- this.$set(item, 'text', `${item.NAME_} (内部)`)
- }
- this.$set(item, 'value', item.ID_)
- })
- this.userList = result
- }
- })
- },
- //根据委托单id查询 taskId
- getTaskId(id) {
- let sql =
- `select TASK_ID_,PROC_INST_ID_ from ibps_bpm_tasks where NAME_ = '编制' and NODE_ID_ = 'Activity_1n1jgcs' and PROC_DEF_KEY_ = 'Process_1589cp3' and EXEC_ID_ = (select PROC_INST_ID_ from act_ru_execution where ACT_ID_ = 'Activity_1n1jgcs' and BUSINESS_KEY_ = '${id}') ORDER BY CREATE_TIME_ desc`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data[0]
- this.taskId = result.TASK_ID_
- if (this.buttonFlagNum === '1') {
- this.getProcInstId(result.PROC_INST_ID_)
- }
- }
- })
- },
- //根据委托单id查询 taskId
- getProcInstId(id) {
- let sql =
- `select OPTION_ from ibps_bpm_oper_log where PROC_INST_ID_ = '${id}' and OPER_TYPE_ = 'rejectToStart' order by create_time_ desc limit 1`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data[0]
- this.option = result.OPTION_
- }
- })
- },
- //初始化
- getInit() {
- let info = uni.getStorageSync(USER_INFO)
- this.orgId = info.org?.id || ''
- this.time = meth.time(10)
- this.time2 = meth.time(19)
- this.form.weiTuoLeiXing = '客户委托'
- this.form.weiTuoRiQi = this.time
- },
- //根据暂存id获取暂存详情信息
- getSaveData(id) {
- uni.showLoading({
- mask: true,
- title: '加载中'
- });
- let sql =
- `select * from t_mjsjdzcb where id_ = '${id}'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const data = res.data.variables.data[0]
- const result = JSON.parse(data.bao_cun_nei_rong_)
- this.form = result
- this.jianCeTypeList = result.jianCeTypeList
- this.total = result.originalTotal
- this.hetongList = result.hetongList
- this.taoCanShow = result.taoCanShow
- this.taoCanList = result.taoCanList
- this.jianCeList = result.jianCeList
- this.getBeingTimeCount(result.weiTuoBianHao)
- this.getJiance(result.heTongId, '')
- uni.hideLoading()
- }
- })
- },
- //明细
- getLiuHenWeiTuoDan(id) {
- let sql =
- `select b.bao_cun_nei_rong_ as content from t_lhwtsqb a left join t_mjsjdzcb b on a.wei_tuo_bian_hao_ = b.wei_tuo_dan_hao_ and b.dui_ying_shu_ju_b = 't_lhwtblh' where a.id_ = '${id}' order by b.create_time_ desc LIMIT 1`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const datas = res.data.variables.data
- if (datas.length > 0) {
- let data = datas[0].content
- let content = JSON.parse(data)
- this.taoCanShow = content.taoCanShow
- this.hetong = content.hetongList
- this.form = content
- }
- }
- })
- },
- //判断委托单编号是否在委托表上
- getBeingTimeCount(bianHao) {
- let sql =
- `select count(*) as count from t_lhwtsqb where wei_tuo_bian_hao_ = '${bianHao}'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const data = res.data.variables.data[0]
- if (data.count > 0) {
- this.getLhwtdh()
- if (this.form.lhypb.length > 0) {
- this.form.lhypb.forEach((item, index) => {
- this.getLhypbh(res => {
- item.yangPinBianHao = res
- })
- })
- }
- }
- }
- })
- },
- //获取委托编号
- getLhwtdh() {
- let this_ = this
- this.$http.get("/ibps/platform/v3/identity/getNextIdByAlias?alias=lhwtdh").then(res => {
- if (res.data.state == 200) {
- const data = res.data.data
- this_.form.weiTuoBianHao = data
- }
- });
- },
- //获取样品编号
- getLhypbh(callback) {
- uni.showLoading({
- title: '生成样品编号中',
- mask: true
- })
- let this_ = this
- this.$http.get("/ibps/platform/v3/identity/getNextIdByAlias?alias=lhypbh").then(res => {
- if (res.data.state == 200) {
- const data = res.data.data
- uni.hideLoading()
- callback(data)
- }
- });
- },
- //自动获取委托详情数据
- getDe(id) {
- uni.showLoading({
- mask: true,
- title: '加载中'
- });
- let sql =
- `select * from t_lhwtsqb where id_ = '${id}'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data[0]
- let form = service.getForm(result)
- this.form = form
- this.total = parseFloat(result.zong_jia_) / (result.chu_ju_bao_gao_ya === '特急' ? 1.5 : result.chu_ju_bao_gao_ya === '加急' ? 1.2 : 1)
- this.getTaoCanXiangMu(result.he_tong_id_)
- this.hetongChange(result.he_tong_id_, this.type, id)
- this.getZhanShiBiao(result.zhan_shi_biao_id_)
- // uni.hideLoading()
- } else {
- // uni.hideLoading()
- }
- }).catch(res => {
- uni.hideLoading()
- })
- },
- //获取展示表
- getZhanShiBiao(shenQingId) {
- let sql = `select * from t_lhwtzsb where shen_qing_id_ = '${shenQingId}'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data
- let list = []
- result.forEach(item => {
- list.push(item.id_)
- })
- this.deleteString = list.join(",")
- }
- })
- },
- //获取样品
- getYangPin(id) {
- // uni.showLoading({
- // mask: true,
- // title: '加载中'
- // });
- let sql =
- `select * from t_lhypb where parent_id_ = '${id}' order by yang_pin_bian_hao asc`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data
- let list = service.getListForm(result, this.jianCeList, this.taoCanXiangmMuList, this
- .taoCanList)
- this.form.lhypb = list
- //this.getTotal()
- uni.hideLoading()
- } else {
- uni.hideLoading()
- }
- }).catch(res => {
- uni.hideLoading()
- })
- },
- //获取合同 //weiTouId 委托id特殊 在委托详情和修改才出现
- getDataHetong(weiTouId = '', userId = '') {
- let info = uni.getStorageSync(USER_INFO);
- if (!this.administrator) {
- userId = info.user.id
- }
- if (!userId) {
- return
- }
- let sql = ``
- sql =
- `select tb.*,ty.ke_hu_ming_cheng_ as ke_hu_dang_wei from t_bjd tb,t_yxkh ty where tb.ke_hu_ming_cheng_ = ty.id_ and tb.ke_hu_zhang_hao_ ='${userId}' and tb.zhuang_tai_='生效中' and tb.shi_fou_guo_shen_ = '已完成'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data
- if (result.length > 0) {
- this.heTongShow = false
- result.forEach((item, index) => {
- this.$set(item, 'text', item.he_tong_bian_hao_)
- this.$set(item, 'value', item.id_)
- })
- this.hetongList = result
- } else {
- this.heTongShow = true
- uni.showToast({
- title: '你好,该账户还没有与本公司签订合同,或者你合同已失效。',
- icon: 'none',
- duration: 2000
- })
- }
- if (weiTouId) {
- this.getDe(weiTouId)
- }
- }
- });
- },
- //选择合同 e 合同id type 判断这个是否添加add 还是 修改 明细 detail id 委托单id
- hetongChange(e, type = '', weiTouId = '') {
- //从合同中选择付款方式
- if (e != '') {
- let data = this.hetongList.find((item, index) => item.id_ == e)
- if (!type) {
- this.form.weiTuoDanLaiYuan = data.wei_tuo_dan_lai_y || ''
- this.form.weiTuoHeTong = data.he_tong_lei_xing_ || ''
- this.form.fuKuanFangShi = data.fu_kuan_fang_shi_ || ''
- this.form.weiTuoDanWei = data.zhuan_huan_ke_hu_ || ''
- this.form.songJianDanWei = data.zhuan_huan_ke_hu_ || ''
- this.form.weiTuoFangLianXiD = data.dian_hua_ || ''
- this.form.weiTuoFangLianXiR = data.lian_xi_ren_ || ''
- this.form.weiTuoFangMingChe = data.ke_hu_dang_wei || ''
- this.form.heTongBianHao = data.he_tong_bian_hao_ || ''
- }
- let tcbh = ''
- if(data.xuan_ze_tao_can_=='' || data.xuan_ze_tao_can_ == null){
- tcbh = data.xin_zeng_tao_can_
- }
- else if(data.xin_zeng_tao_can_=='' || data.xin_zeng_tao_can_ == null){
- tcbh = data.xuan_ze_tao_can_
- }else{
- tcbh = data.xuan_ze_tao_can_+','+data.xin_zeng_tao_can_
- }
- this.getJiance(e, type, weiTouId)
- this.getTaoCanList(tcbh)
- }
- },
- //根据合同id选择检测项目
- getJiance(id, type, weiTouId) {
- let sql =
- `select tw.*,tb.zhe_hou_jia_ge_,tb.xiang_mu_dan_jia_ from t_htjcxmjmb tb left join t_mjjcnlfw tw on tb.jian_ce_xiang_mu_ = tw.id_ and tb.shi_fou_you_xiao_='有效' where tb.parent_id_ = '${id}' and tw.xiang_mu_bian_hao not like '%/%' order by tw.nodekey1_ asc`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- let result = res.data.variables.data
- if (result.length > 0) {
- result.forEach((item, index) => {
- if (this.jianCeTypeList.length == 0) {
- let obj = {
- // text: item.jian_ce_lei_bie_
- value: item.jian_ce_lei_bie_,
- text: item.jian_ce_lei_bie_,
- id: item.jian_ce_lei_bie_,
- name: item.jian_ce_lei_bie_
- }
- this.jianCeTypeList.push(obj)
- } else {
- let gg = this.jianCeTypeList.findIndex(it => it.value == item
- .jian_ce_lei_bie_)
- if (gg < 0) {
- let obj = {
- // text: item.jian_ce_lei_bie_
- value: item.jian_ce_lei_bie_,
- text: item.jian_ce_lei_bie_,
- id: item.jian_ce_lei_bie_,
- name: item.jian_ce_lei_bie_
- }
- this.jianCeTypeList.push(obj)
- }
- }
- })
- result.forEach((item, index) => {
- item.zhe_hou_jia_ge_ = (parseFloat(item.zhe_hou_jia_ge_)).toFixed(2)
- this.$set(item, 'checked', false)
- })
- this.jianCeList = result
- if (type != "") {
- this.getYangPin(weiTouId)
- }
- } else {
- meth.getPrompt('该合同没有检测项目')
- }
- }
- });
- },
- //获取属于合同套餐的全部项目
- getTaoCanXiangMu(heTongid) {
- let sql =
- `select tm.*,tt.zhe_hou_jia_ge_,tt.tao_can_zhu_jian_,tt.id_ as tczbId from t_mjjcnlfw tm,t_httcb tt where tm.id_ = tt.jian_ce_xiang_mu_ and parent_id_ = '${heTongid}'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const datas = res.data.variables.data
- this.taoCanXiangmMuList = datas
- }
- })
- },
- //根据合同查询套餐 1根据合同人套餐id里面选择套餐 2.根据合同id选择套餐
- getTaoCanList(id, type) {
- let sql =
- `select * from t_jctc where FIND_IN_SET(id_,'${id}') and zhuang_tai_ = '有效'`
- let requestData = this.$sig(sql)
- this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
- if (res.data.state == 200) {
- const datas = res.data.variables.data
- if (datas.length > 0) {
- this.taoCanShow = true
- datas.forEach(item => {
- this.$set(item, 'checked', false)
- })
- this.taoCanList = datas
- } else {
- setTimeout(function() {
- meth.getPrompt('该合同没有套餐检测项目', 'none', 1000)
- }, 500);
- this.taoCanShow = false
- this.taoCanList = []
- }
- }
- })
- },
- //选择项目
- changeIndex(it, index, x) {
- let itemData = this.form.lhypb[index]
- this.form.lhypb[index].jianCeList[x].checked = !this.form.lhypb[index].jianCeList[x].checked
- let show = itemData.jianCeList.some(item => item.id_ == '1039826037036285952' || item.id_ ==
- '1040205909151711232')
- if (show) {
- itemData.mingChengShow = true
- }
- this.getTotal()
- },
- getTotal() {
- var total = 0
- this.form.lhypb.forEach((item, index) => {
- let itemTotal = 0
- item.jianCeList.forEach((it, x) => {
- if (it.checked) {
- total += parseFloat(it.zhe_hou_jia_ge_ || 0)
- itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
- }
- })
- item.taoCanXiangMuList.forEach((it, x) => {
- total += parseFloat(it.zhe_hou_jia_ge_ || 0)
- itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
- })
- if (this.form.chuJuBaoGaoYaoQiu == '特急') {
- itemTotal = itemTotal * 1.5
- } else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
- itemTotal = itemTotal * 1.2
- } else {
- itemTotal = itemTotal
- }
- item.yangPinZongJia = itemTotal
- })
- this.total = total
- if (this.form.chuJuBaoGaoYaoQiu == '特急') {
- this.form.zongJia = total * 1.5
- } else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
- this.form.zongJia = total * 1.2
- } else {
- this.form.zongJia = total
- }
- this.form.zongJia = (this.form.zongJia).toFixed(2)
- },
- //特急 加急 常规
- getMultiple() {
- this.getTotal()
- },
- //调用日期组件
- dateClick(type, index) {
- this.listType = type
- if (type == 'report' || type == 'weiTuo') {
- this.mode = 'date'
- this.dateShow = true
- }
- },
- //日期回调
- dateChange(e) {
- switch (this.listType) {
- case 'report':
- this.form.chuBaoGaoShiJian = e.result
- break
- case 'weiTuo':
- this.form.weiTuoRiQi = e.result
- break
- }
- },
- sheetClick(type, index) {
- this.listType = type
- this.sheetShow = true
- if (type == 'disposition') {
- this.list = this.dispositionList
- }
- },
- //下拉框回调
- actionSheetCallback(e) {
- let that = this
- let lists = that.form.lhypb[this.listIndex]
- if (this.listType == 'disposition') {
- this.form.yangBenChuLi = this.list[e].text
- }
- },
- selectClick(type, index) {
- this.listType = type
- this.selectShow = true
- if (type == 'jianCeType') {
- this.list = this.jianCeTypeList
- this.listIndex = index
- }
- },
- selectConfirm(e) {
- let that = this
- let lists = that.form.lhypb[this.listIndex]
- if (this.listType == 'jianCeType') {
- lists.jianCeType = e[0].value
- }
- },
- onSubmit(valueType) {
- if (valueType == '1') {
- this.sumbit(valueType)
- } else {
- let that = this
- uni.showModal({
- title: '提示',
- content: '委托单编号:' + this.form.weiTuoBianHao + '金额为' + this.form.zongJia + '元,是否确定下单?',
- success: function(res) {
- if (res.confirm) {
- that.sumbit(valueType)
- } else if (res.cancel) {}
- }
- });
- }
- },
- //提交 //1 暂存 2提交 3驳回提交
- sumbit(valueType) {
- //委托提交判断
- if (valueType != 1) {
- if (this.heTongShow) {
- meth.getPrompt("你好,该账户还没有与本公司签订合同,或者你合同已失效。")
- return
- }
- if (this.form.lhypb.length == 0) {
- meth.getPrompt("请填写该委托单需要检测的样品信息")
- return
- }
- if (this.form.weiTuoFangQueRen == '') {
- this.qianming(0)
- meth.getPrompt("请委托人签名")
- return
- }
- uni.showLoading({
- mask: true,
- title: '加载中'
- });
- }
- let para = {
- "parameters": [{
- "key": "defId",
- "value": "1033014823429865472"
- },
- {
- "key": "version",
- "value": "0"
- },
- {
- "key": "data",
- "value": ""
- }
- ]
- }
- //如果是暂存数据 id清楚
- if (this.buttonFlagNum === '3') {
- this.form.id = ''
- this.form.zhanShiBiaoId = this.generateUUID()
- }
- this.form.shiFouGuoShen = "已编制"
- this.form.bianZhiRen = this.userid
- this.form.bianZhiShiJian = this.time
- this.form.bianZhiBuMen = this.orgId
- this.form.weiTuoZhuangTai = '待审核'
- this.form.fuKuanZhuangTai = '未结清'
- if (this.form.biaoQianTuPianJudge == '否') {
- this.form.biaoQianTuPian = '否'
- }
- if (!this.administrator) {
- this.form.baoGaoBianZhiYuan = this.userid
- }
- this.form.lhypb.forEach((item, index) => {
- item.weiTuoDanHao = this.form.weiTuoBianHao
- item.weiTuoDanWei = this.form.weiTuoDanWei
- item.lianXiRen = this.form.weiTuoFangLianXiR
- item.lianXiDianHua = this.form.weiTuoFangLianXiD
- item.heTongBianHao = this.form.heTongId
- item.jiaoFeiFangShi = this.form.fuKuanFangShi
- item.fuKuanZhuangTai = '未结清'
- item.heTongLeiXing = this.form.weiTuoHeTong
- item.weiTuoRiQi = this.form.weiTuoRiQi
- item.songJianDanWei = this.form.songJianDanWei
- item.bianZhiRen = this.userid
- item.bianZhiShiJian = meth.time(10)
- item.bianZhiBuMen = this.orgId
- item.chuBaoGaoYaoQiu = this.form.chuJuBaoGaoYaoQiu
- if (this.buttonFlagNum === '3') {
- item.id = ''
- item.parentId = ''
- }
- let list1 = []
- let list2 = []
- let list3 = []
- let list4 = []
- let list5 = []
- let list6 = []
- let list7 = []
- let list8 = []
- let list9 = []
- //常规检测项目处理
- item.jianCeXiangMu2 = []
- item.jianCeList.forEach((it, x) => {
- if (it.checked) {
- item.jianCeXiangMu2.push(it.id_)
- list6.push(it.zhe_hou_jia_ge_)
- list7.push(it.jian_ce_xiang_mu_)
- let listTe = 0
- if (this.form.chuJuBaoGaoYaoQiu == '常规') {
- listTe = parseFloat(it.zhe_hou_jia_ge_)
- } else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
- listTe = parseFloat(it.zhe_hou_jia_ge_) * 1.2
- } else if (this.form.chuJuBaoGaoYaoQiu == '特急') {
- listTe = parseFloat(it.zhe_hou_jia_ge_) * 1.5
- }
- list9.push(listTe)
- }
- })
- item.jianCeXiangMu = item.jianCeXiangMu2.join(",")
- item.changGuiJiaGe = list6.join(",")
- item.changGuiXiangMuMi = list7.join(",")
- item.changGuiZheHouJia = list9.join(",")
- item.yangPinZongShu = parseFloat(item.shuLiangSi || 0) + parseFloat(item.shuLiangSan || 0) + parseFloat(item.shuLiangEr || 0) + parseFloat(item.shuLiang || 0)
- item.taoCanList.forEach(it => {
- if (it.checked) {
- list1.push(it.id_)
- }
- })
- item.xuanZeTaoCan = list1.join(',')
- if (item.taoCanXiangMuList.length > 0) {
- //套餐检测项目处理
- item.taoCanXiangMuList.forEach(it => {
- list2.push(it.id_)
- let listTo = 0
- if (this.form.chuJuBaoGaoYaoQiu == '常规') {
- listTo = parseFloat(it.zhe_hou_jia_ge_)
- } else if (this.form.chuJuBaoGaoYaoQiu == '加急') {
- listTo = parseFloat(it.zhe_hou_jia_ge_) * 1.2
- } else if (this.form.chuJuBaoGaoYaoQiu == '特急') {
- listTo = parseFloat(it.zhe_hou_jia_ge_) * 1.5
- }
- list8.push(listTo)
- list3.push(it.zhe_hou_jia_ge_)
- list4.push(it.jian_ce_xiang_mu_)
- list5.push(it.tczbId) //套餐子表项目
- })
- item.taoCanZiBiaoId = list5.join(',')
- item.taoCanMingCheng = list4.join(',')
- item.taoCanJiaGe = list3.join(',')
- item.taoCanXiangMu = list2.join(',')
- item.taoCanZheHouJiaGe = list8.join(",")
- } else {
- item.taoCanZiBiaoId = ''
- item.taoCanMingCheng = ''
- item.taoCanJiaGe = ''
- item.taoCanXiangMu = ''
- item.taoCanZheHouJiaGe = ''
- }
- if (item.shuLiang == 0) {
- item.shuLiang = ''
- }
- if (item.shuLiangEr == 0) {
- item.shuLiangEr = ''
- }
- if (item.shuLiangSan == 0) {
- item.shuLiangSan = ''
- }
- if (item.shuLiangSi == 0) {
- item.shuLiangSi = ''
- }
- })
- //委托提交判断
- if (valueType != 1) {
- for (let index in this.form.lhypb) {
- let item = this.form.lhypb[index]
- if (item.yangPinMingCheng == '') {
- meth.getPrompt(`请输入样品信息${parseInt(index)+1}的样品名称`)
- return
- }
- }
- let showIndex = this.form.lhypb.findIndex(item => item.jianCeXiangMu == '' && item.taoCanXiangMuList
- .length ==
- 0)
- if (showIndex >= 0) {
- meth.getPrompt(`请在样品信息${showIndex+1}选择委托单需要检测项目`)
- return
- }
- }
- //委托暂存判断
- if (valueType == 1) {
- this.form.taoCanShow = this.taoCanShow
- this.form.jianCeTypeList = this.jianCeTypeList
- this.form.originalTotal = this.total
- this.form.hetongList = this.hetongList
- this.form.taoCanList = this.taoCanList
- this.form.jianCeList = this.jianCeList
- this.getBeingSave(this.form)
- return
- }
- //驳回同意数据封装
- var editData = {}
- if (valueType == 3) {
- this.form.id = this.id
- editData = {
- data: JSON.stringify(this.form),
- opinion: '重新提交审核',
- taskId: this.taskId
- }
- }
- this.temporaryForm = JSON.parse(JSON.stringify(this.form))
- // if (valueType != 1) {
- // this.form.lhypb.forEach(item => {
- // delete item.jianCeList
- // delete item.taoCanXiangMuList
- // })
- // }
- //end
- para.parameters[2].value = JSON.stringify(this.form)
- //数据添加到展示表上
- var lhwt = []
- if (valueType == 2 || valueType == 3) {
- this.form.lhypb.forEach((item, index) => {
- let bit = {
- he_tong_id_: this.form.heTongBianHao,
- he_tong_bian_hao_: this.form.heTongId,
- jiao_fei_fang_shi: this.form.fuKuanFangShi,
- shen_qing_id_: this.form.zhanShiBiaoId,
- wei_tuo_bian_hao_: this.form.weiTuoBianHao,
- wei_tuo_lai_yuan_: this.form.weiTuoDanLaiYuan,
- wei_tuo_lei_xing_: this.form.weiTuoLeiXing,
- wei_tuo_ren_: this.form.weiTuoFangLianXiR,
- wei_tuo_ri_qi_: this.form.weiTuoRiQi,
- yang_pin_bian_hao: item.yangPinBianHao,
- yang_pin_ming_che: item.yangPinMingCheng,
- zhuang_tai_: "委托进行中"
- }
- lhwt.push(bit)
- })
- }
- this.$refs.form.validate(valid => {
- if (valid) {
- if (valueType == 3) {
- if (this.deleteString) {
- this.getDeleteString()
- }
- this.setZhanShiBiao(lhwt)
- this.getArgee(editData)
- } else if (valueType == 2) {
- if (this.saveId && this.buttonFlagNum === '3') {
- this.getDeleteZanCun()
- }
- this.setZhanShiBiao(lhwt)
- this.getSave(para)
- }
- } else {
- meth.getPrompt('必选项没有填写')
- uni.hideLoading();
- }
- });
- },
- //删除展示表数据
- getDeleteString() {
- let params = {}
- params['tableName'] = 't_lhwtzsb'
- params['paramWhere'] = "{id_:'" + this.deleteString + "'}"
- let requestData = this.$sig(params)
- this.$http.post("/ibps/business/v3/sys/universal/batchDelete", requestData).then(res => {
- if (res.data.state == 200) {}
- })
- },
- //保存
- getSave(data) {
- this.$http.post("ibps/business/v3/bpm/instance/start", data).then(res => {
- if (res.data.state == 200) {
- this.$tip.success('提交成功!')
- this.getLiuHen()
- uni.hideLoading();
- this.$Router.replaceAll({
- name: 'index'
- })
- } else {
- this.form = JSON.parse(JSON.stringify(this.temporaryForm))
- meth.getPrompt('提交异常!', 'error')
- uni.hideLoading()
- }
- });
- },
- //据添加到展示表上
- setZhanShiBiao(params) {
- let pp = {
- paramWhere: [],
- tableName: "t_lhwtzsb"
- }
- pp.paramWhere = params
- let dataPP = this.$sig(pp)
- this.$http.post("/ibps/business/v3/sys/universal/addDataContextTable", dataPP).then(res => {
- if (res.data.state == 200) {
- }
- });
- },
- //驳回同意数据请求
- getArgee(data) {
- this.$http.post("/ibps/business/v3/bpm/task/agree", data).then(res => {
- if (res.data.state == 200) {
- this.$tip.success('提交成功!')
- this.getLiuHen()
- uni.hideLoading();
- this.$Router.replaceAll({
- name: 'index'
- })
- } else {
- this.form = JSON.parse(JSON.stringify(this.temporaryForm))
- meth.getPrompt('提交异常!', 'fail')
- uni.hideLoading()
- }
- });
- },
- //数据留痕
- getLiuHen() {
- this.form.taoCanShow = this.taoCanShow
- this.form.hetongList = this.hetongList
- this.form.taoCanList = this.taoCanList
- this.form.jianCeTypeList = this.jianCeTypeList
- this.form.jianCeList = this.jianCeList
- let dataContent = JSON.stringify(this.form)
- let list = []
- let obj = {
- wei_tuo_dan_hao_: this.form.weiTuoBianHao,
- bao_cun_nei_rong_: dataContent,
- dui_ying_shu_ju_b: 't_lhwtblh',
- bao_cun_biao_ti_: '委托单留痕',
- zhuang_tai_: '留痕',
- bian_zhi_shi_jian: this.time2,
- bian_zhi_ren_: this.userid
- }
- list.push(obj)
- const params2 = {
- tableName: 't_mjsjdzcb',
- paramWhere: list
- }
- let data = this.$sig(params2)
- this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data).then(res => {
- if (res.data.state == 200) {}
- });
- },
- //删除展示表数据
- getDeleteZanCun() {
- let params = {}
- params['tableName'] = 't_mjsjdzcb'
- params['paramWhere'] = "{id_:'" + this.saveId + "'}"
- let requestData = this.$sig(params)
- this.$http.post("/ibps/business/v3/sys/universal/batchDelete", requestData).then(res => {
- if (res.data.state == 200) {}
- })
- },
- getBeingSave(dataCom) {
- uni.showModal({
- title: '提示',
- content: '是否把现有信息保存?',
- success: res => {
- if (res.confirm) {
- let dataContent = JSON.stringify(dataCom)
- let list = []
- let obj = {
- wei_tuo_dan_hao_: dataCom.weiTuoBianHao,
- bao_cun_nei_rong_: dataContent,
- dui_ying_shu_ju_b: 't_lhwtsqb',
- bao_cun_biao_ti_: '委托单',
- zhuang_tai_: '未完成',
- bian_zhi_shi_jian: this.time2,
- bian_zhi_ren_: this.userid
- }
- list.push(obj)
- const params2 = {
- tableName: 't_mjsjdzcb',
- paramWhere: list
- }
- let data = this.$sig(params2)
- this.$http.post("ibps/business/v3/sys/universal/addDataContextTable", data)
- .then(res => {
- if (res.data.state == 200) {
- meth.getPrompt('暂存成功')
- } else {
- meth.getPrompt('暂存失败', 'error')
- }
- });
- } else if (res.cancel) {}
- }
- });
- },
- //添加样品记录
- getSing() {
- if (this.form.heTongId == '') {
- return meth.getPrompt('请选择合同')
- }
- this.getLhypbh(res => {
- let data = meth.getMjypbSin(res, this.jianCeList, this.taoCanList)
- this.lhypbShow = true
- this.lhypbIndexData = 'add'
- this.itemType = true
- this.$nextTick(() => {
- this.$refs.lhypbMessage.getInit(data)
- })
- })
- },
- updateClick(index, type) {
- let obj = this.form.lhypb[index]
- if (type == 'detail') {
- this.itemType = false
- } else {
- this.itemType = true
- }
- this.lhypbIndexData = type
- this.lhypbShow = true
- this.$nextTick(() => {
- this.$refs.lhypbMessage.getInit(obj)
- })
- this.getTotal()
- },
- deletSing(index) {
- if (index != 0) {
- this.lhypbIndex = index - 1
- } else {
- this.lhypbIndex = 0
- }
- this.form.lhypb.splice(index, 1)
- this.getTotal()
- },
- //弹出框显示
- qianming(index) {
- this.qianshow = true
- this.qianIndex = index
- this.popupShow = true
- },
- //清除签名
- deqianming(index) {
- if (index == 0) {
- this.form.weiTuoFangQueRen = ''
- }
- },
- //保存签名
- save(val) {
- if (this.qianIndex == 0) {
- this.form.weiTuoFangQueRen = val
- }
- this.qianshow = false
- this.popupShow = false
- },
- //清除签名
- clear(val) {
- if (this.qianIndex == 0) {
- this.form.weiTuoFangQueRen = ''
- }
- },
- /**
- * 关闭签名弹窗
- */
- close() {
- this.popupShow = false
- },
- /**
- * @param {Object} data
- * @param {Object} list
- * 过滤,只要判断数据在数组中text字段
- */
- getButtChange(data, list) {
- if (data && list) {
- let itemData = list.find(item => item.value == data)
- if (itemData) {
- return itemData.text
- } else {
- return data
- }
- }
- return data
- },
- /**
- * 生成唯一id
- */
- generateUUID() {
- var d = new Date().getTime();
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- var r = (d + Math.random() * 16) % 16 | 0;
- d = Math.floor(d / 16);
- return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);
- });
- return uuid;
- },
- //取消
- deletClick() {
- this.lhypbShow = false
- },
- //样品保存返回数据保存到样品表上,修改样品对对应的样品表
- sumbitSingClick(item) {
- if (this.lhypbIndexData == 'add') {
- this.lhypbShow = false
- this.form.lhypb.push(item)
- } else {
- this.lhypbShow = false
- this.form.lhypb[this.lhypbIndex] = item
- }
- this.getTotal()
- },
- //退回原因
- getBack() {
- this.content = this.option
- this.backShow = true
- },
- //检测详情弹出框
- getJianXiangData(item) {
- let content = `
- 1. 检测项目编号:${item.xiang_mu_bian_hao}<br>
- 2. 检测项目名称:${item.jian_ce_xiang_mu_}<br>
- 3. 检测类别:${item.jian_ce_lei_bie_}<br>
- 4. 操作规程:${item.yi_ju_de_biao_zhu}<br>
- 5. 送样要求:${item.yang_pin_tiao_jia}<br>
- 6. 报告周期(工作日):${item.bao_gao_zhou_qi_g}<br>
- 7. 价格:${item.zhe_hou_jia_ge_}元<br>
- `
- this.content = content
- this.meassageShow = true
- },
- cancel() {
- this.meassageShow = false
- this.backShow = false
- },
- //切换
- activeNumClick(index) {
- if (index != '1') {
- if (!service.getActiveNum1(this.form)) {
- return
- }
- }
- this.$refs.top.activeNum = index
- this.activeNum = index
- },
- userListChange(e) {
- this.hetongList = []
- this.getDataHetong('', e)
- },
- chuBaoGaoChange(e) {
- this.form.chuBaoGaoShiJian = e.detail.value.join(",")
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .btn {
- margin: 15rpx
- }
- .qingshe {
- background-color: #f0f9eb;
- color: #67c23a;
- padding: 15rpx 20rpx;
- border-radius: 8rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 25rpx;
- }
- .tagBox {
- display: flex;
- flex-wrap: wrap;
- margin: 20rpx 10rpx;
- .tagSin {
- margin: 10rpx;
- }
- }
- .jiancexiangm {
- padding: 10rpx 30rpx;
- // width: 100%;
- padding: 20rpx;
- margin-bottom: 20rpx;
- background-color: #f1f1f1;
- border-radius: 8rpx;
- font-size: 26rpx;
- color: $u-content-color;
- line-height: 1.7;
- view {
- line-height: 30rpx;
- }
- }
- .btnBox {
- display: flex;
- flex-wrap: wrap;
- .btnSin {
- margin: 10rpx 5rpx;
- }
- }
- .u-full-content {
- background-color: #00C777;
- }
- .u-update-content {
- font-size: 26rpx;
- color: $u-content-color;
- line-height: 1.7;
- padding: 30rpx;
- }
- .bottomBtn {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: #FFFFFF;
- z-index: 999;
- }
- /deep/ .uni-group__content {
- padding: 15rpx 25rpx;
- }
- //换行居中
- /deep/ uni-text span {
- white-space: normal;
- word-break: break-all;
- text-align: center;
- display: inline-block;
- }
- /deep/ .uni-checkbox-input::before {
- display: block;
- }
- /deep/ .u-form-item--right__content__slot {
- display: block;
- }
- /deep/ .uni-group__title {
- background-color: #f0f9eb;
- color: #67c23a !important;
- }
- /deep/ .uni-group__title-text {
- color: #67c23a !important;
- }
- /deep/ .lineStyle .u-form-item__body{
- // align-items: baseline;
- .fontSty{
- font-size: 22rpx;
- color: #ff9900;
- }
- }
- </style>
|