| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567 |
- <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="hetong"
- @change="hetongChange" v-if="type != 'detail'">
- </uni-data-select>
- <text v-else>{{getButtChange(form.heTongId,hetong)}}</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" />
- </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="name">
- <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="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>
- </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>
- <!-- <uni-group mode="card" :title="'样品' + (index+1)" v-for="(item,index) in form.lhypb" :key="index"
- v-if="index == lhypbIndex">
- <lhypb-message :item="item" :itemType="false" :type="type" :jianCeTypeList="jianCeTypeList"
- :heTongId="form.heTongId" @countTotal="getTotal" @getParentContent="getJianXiangData">>
- </lhypb-message>
- <u-button type="error" class="btn green-back-color" @click="deletSing(index)"
- v-if="type != 'detail'">
- 删除样品编号“{{item.yangPinBianHao}}”的样品
- </u-button>
- </uni-group> -->
- <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;" v-if="buttonFlagNum !== '0'"></view>
- </u-form>
- <view class="bottomBtn" v-if="buttonFlagNum !== '0'">
- <u-row v-if="buttonFlagNum === '1'">
- <u-button type="error" @click="onSubmit(3)" style="width: 100%;margin: 20rpx;">提交
- </u-button>
- </u-row>
- <u-row v-else>
- <u-col span="6">
- <u-button type="success" @click="onSubmit(1)" class="btn green-back-color"
- style="margin-bottom: 15rpx;" v-if="type != 'detail'">
- 暂存
- </u-button>
- </u-col>
- <u-col span="6">
- <u-button type="success" class="btn btn-back-color" @click="onSubmit(2)" v-if="type != 'detail'">提交
- </u-button>
- </u-col>
- </u-row>
- </view>
- <u-back-top :scroll-top="scrollTop" :icon-style="iconStyle" bottom="400"></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 {
- 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
- },
- data() {
- return {
- activeNum: 1,
- form: {
- baoGaoBianZhiYuan: '',
- weiTuoLeiXing: '',
- weiTuoDanLaiYuan: '',
- weiTuoBianHao: '',
- heTongId: '',
- heTongBianHao: '',
- weiTuoHeTong: '',
- weiTuoDanWei: '',
- songJianDanWei: '',
- qiWangWanChengShi: '',
- lhypb: [],
- fuKuanFangShi: '',
- baoGaoLeiXing: '简易',
- chuJuBaoGaoYaoQiu: '常规',
- chuBaoGaoShiJian: '',
- yangBenChuLi: '',
- weiTuoFangMingChe: '',
- weiTuoFangLianXiR: '',
- weiTuoFangLianXiD: '',
- weiTuoRiQi: '',
- weiTuoFangQueRen: '',
- zongJia: 0,
- zhanShiBiaoId: this.generateUUID()
- },
- 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,
- //性别
- sexList: order.sex,
- //签名显示
- 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
- }
- },
- onLoad(options) {
- let administrator = uni.getStorageSync('administrator')
- this.administrator = administrator
- this.getInit()
- if (administrator) {
- this.getAdministrator()
- }
- if ((administrator && options.id) || !administrator) {
- this.getDataHetong(options.id)
- }
- //一开始查合同 如果修改或者明细 传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: {
- //超级用户 获取全部客户信息
- getAdministrator() {
- let sql =
- `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) => {
- 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() {
- //获取账号id
- let info = uni.getStorageSync(USER_INFO)
- if (info.employee.id) {
- this.userid = info.employee.id || ''
- }
- if (info.org !== null) {
- this.orgId = info.org.id || ''
- }
- // this.getDataHetong()
- //获取时间
- 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.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 smsParams = {
- alias: "lhwtdh"
- };
- let this_ = this
- this.$http.post("/ibps/business/v3/jc/sys/getNextIdByAlias", smsParams).then(res => {
- if (res.data.state == 200) {
- const data = res.data.data
- this_.form.weiTuoBianHao = data
- }
- });
- },
- //获取样品编号
- getLhypbh(callback) {
- let smsParams = {
- alias: "lhypbh"
- };
- let this_ = this
- this.$http.post("/ibps/business/v3/jc/sys/getNextIdByAlias", smsParams).then(res => {
- if (res.data.state == 200) {
- const data = res.data.data
- 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
- if (result.chu_ju_bao_gao_ya == '特急') {
- this.total = parseFloat(result.zong_jia_) / 1.5
- } else if (result.chu_ju_bao_gao_ya == '加急') {
- this.total = parseFloat(result.zong_jia_) / 1.2
- } else {
- this.total = parseFloat(result.zong_jia_)
- }
- this.getTaoCanXiangMu(result.he_tong_id_)
- this.hetongChange(result.he_tong_id_, this.type, id)
- // this.getJiance(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
- }
- // let 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.zhuang_tai_='生效中' and tb.shi_fou_guo_shen_ = '已完成'`
- let 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
- this.hetongList = result
- let list = []
- result.forEach((item, index) => {
- let obj = {
- text: item.he_tong_bian_hao_,
- value: item.id_
- }
- list.push(obj);
- })
- this.hetong = list
- } 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_ || ''
- }
- this.getJiance(e, type, weiTouId)
- this.getTaoCanList(data.xuan_ze_tao_can_)
- }
- },
- //根据合同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_
- }
- 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_
- }
- this.jianCeTypeList.push(obj)
- }
- }
- })
- result.forEach((item, index) => {
- 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}')`
- 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
- }
- },
- //特急 加急 常规
- getMultiple() {
- this.getTotal()
- },
- //调用日期组件
- dateClick(type, index) {
- this.listType = type
- if (type == 'report') {
- this.mode = 'date'
- this.dateShow = true
- }
- if (type == 'weiTuo') {
- this.mode = 'date'
- this.dateShow = true
- }
- },
- //日期回调
- dateChange(e) {
- if (this.listType == 'report') {
- this.form.chuBaoGaoShiJian = e.result
- }
- if (this.listType == 'weiTuo') {
- this.form.weiTuoRiQi = e.result
- }
- },
- 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 == '') {
- 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 = '未结清'
- this.form.lhypb.forEach((item, index) => {
- 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.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.chuBaoGaoYaoQiu = this.form.chuJuBaoGaoYaoQiu
- 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.jianCeTypeList = this.jianCeTypeList
- this.form.originalTotal = this.total
- 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
- }
- }
- //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 {
- meth.getPrompt('提交异常!', 'fail')
- 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 {
- meth.getPrompt('提交异常!', 'fail')
- uni.hideLoading()
- }
- });
- },
- //数据留痕
- getLiuHen() {
- this.form.taoCanShow = this.taoCanShow
- this.form.hetongList = this.hetongList
- this.form.hetong = this.hetong
- 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('暂存失败')
- }
- });
- } 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.$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)
- })
- },
- deletSing(index) {
- this.form.lhypb.splice(index, 1)
- if (this.form.lhypb.length == index) {
- this.lhypbIndex = this.form.lhypb.length - 1
- }
- },
- //弹出框显示
- 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.getDataHetong('', e)
- }
- }
- }
- </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;
- }
- </style>
|