|
|
@@ -13,11 +13,14 @@
|
|
|
<u-input placeholder="请输入姓名" v-model="form.xingMing" :disabled="type == 'detail'?true :false" />
|
|
|
</u-form-item>
|
|
|
<u-form-item label="性别">
|
|
|
- <u-radio-group v-model="form.xingBie" v-if="type != 'detail'">
|
|
|
+ <uni-data-select placeholder="请选择性别" v-model="form.xingBie" :localdata="sexList"
|
|
|
+ v-if="type != 'detail'">
|
|
|
+ </uni-data-select>
|
|
|
+ <!-- <u-radio-group v-model="form.xingBie" v-if="type != 'detail'">
|
|
|
<u-radio v-for="(it, index) in sexList" :key="index" :name="it.name">
|
|
|
{{it.name}}
|
|
|
</u-radio>
|
|
|
- </u-radio-group>
|
|
|
+ </u-radio-group> -->
|
|
|
<text v-else>{{form.xingBie}}</text>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="年龄">
|
|
|
@@ -30,35 +33,54 @@
|
|
|
<u-form-item label="样本状态" prop="yangPinZhuangTai" required>
|
|
|
<u-input placeholder="请选择样本状态" v-model="form.yangPinZhuangTai"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('state')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('state')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="送检时间" prop="songJianShiJian" required>
|
|
|
<u-input placeholder="请选择送检时间" v-model="form.songJianShiJian" disabled />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="dateClick('inspect')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="dateClick('inspect')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="备注">
|
|
|
<u-input placeholder="请输入备注" v-model="form.beiZhu1" :disabled="type == 'detail'?true :false" />
|
|
|
</u-form-item>
|
|
|
|
|
|
- <view class="qingshe" style="background-color: #99cc66;">
|
|
|
- <view class="qingTitle" style="color: #FFFFFF;">
|
|
|
+ <view class="qingshe">
|
|
|
+ <view class="qingTitle">
|
|
|
常规项目选择
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-form-item label="项目编号搜索" v-if="type != 'detail'">
|
|
|
+ <u-input placeholder="请输入项目编号搜索" v-model="form.search" />
|
|
|
+ </u-form-item>
|
|
|
|
|
|
- <u-form-item label="检测类型">
|
|
|
+ <u-form-item label="检测类型" v-if="type != 'detail'">
|
|
|
<!-- <u-input placeholder="请选择检测类型" type="select" v-model="form.jianCeType"
|
|
|
@click="selectClick('jianCeType')" /> -->
|
|
|
+ <lin-select item-key="id" placeholder='请输入内容' :binData="jianCeTypeList" checkType="checkbox"
|
|
|
+ tags="name" inputStyle="" selectStyle="" overflow="hide" @getBackVal="checkBoxChange">
|
|
|
+ </lin-select>
|
|
|
+
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <view v-if="false">
|
|
|
<uni-data-checkbox v-model="form.jianCeType" multiple :localdata="jianCeTypeList"
|
|
|
@change="checkBoxChange">
|
|
|
</uni-data-checkbox>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <u-form-item label="检测项目" prop="name">
|
|
|
+ <div style="display: flex;justify-content: flex-end;" @click="jianCeShow = !jianCeShow">
|
|
|
+ <!-- <checkbox :checked="checked" style="margin-right: 15rpx;" @click="checkedChange" />全选 -->
|
|
|
+ <u-icon name="arrow-up" color="#999" v-if="jianCeShow">
|
|
|
+ </u-icon>
|
|
|
+ <u-icon name="arrow-down" color="#999" v-else></u-icon>
|
|
|
+ </div>
|
|
|
</u-form-item>
|
|
|
|
|
|
- <u-form-item label="检测项目" prop="name" label-position="top">
|
|
|
+ <view v-if="jianCeShow">
|
|
|
<view v-if="type != 'detail'">
|
|
|
<view>
|
|
|
<checkbox-group v-for="(it, x) in form.jianCeList" :key="x">
|
|
|
@@ -72,6 +94,7 @@
|
|
|
{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
|
|
|
<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '0'}}元]</text>
|
|
|
</view>
|
|
|
+ <view>检测类别:{{it.jian_ce_lei_bie_}}</view>
|
|
|
<!-- <view>{{it.yi_ju_de_biao_zhu || ''}}</view> -->
|
|
|
<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
|
|
|
</view>
|
|
|
@@ -81,7 +104,7 @@
|
|
|
<view>
|
|
|
<checkbox-group v-for="(it, x) in form.jianCeList" :key="x">
|
|
|
<label class=" uni-list-cell uni-list-cell-pd"
|
|
|
- v-show="(form.jianCeTypeString.indexOf(it.jian_ce_lei_bie_) !== -1) && !it.checked"
|
|
|
+ v-show="((form.jianCeTypeString.indexOf(it.jian_ce_lei_bie_ || '') !== -1) || (form.search && it.xiang_mu_bian_hao.indexOf(form.search) !== -1)) && !it.checked"
|
|
|
style="display: flex;margin: 15rpx 10rpx;font-size: 20rpx;line-height: 40rpx;">
|
|
|
<view>
|
|
|
<checkbox :checked="it.checked" :value="it.id_" @click="changeIndex(it,x)" />
|
|
|
@@ -91,6 +114,7 @@
|
|
|
{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
|
|
|
<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '0'}}元]</text>
|
|
|
</view>
|
|
|
+ <view>检测类别:{{it.jian_ce_lei_bie_}}</view>
|
|
|
<!-- <view>{{it.yi_ju_de_biao_zhu || ''}}</view> -->
|
|
|
<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
|
|
|
</view>
|
|
|
@@ -107,15 +131,17 @@
|
|
|
{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
|
|
|
<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
|
|
|
</view>
|
|
|
+ <view>检测类别:{{it.jian_ce_lei_bie_}}</view>
|
|
|
<!-- <view>{{it.yi_ju_de_biao_zhu || ''}}</view> -->
|
|
|
<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </u-form-item>
|
|
|
+ </view>
|
|
|
+
|
|
|
|
|
|
- <view class="qingshe" style="background-color: #99cc66;" v-if="taoCanShow">
|
|
|
- <view class="qingTitle" style="color: #FFFFFF;">
|
|
|
+ <view class="qingshe" v-if="taoCanShow">
|
|
|
+ <view class="qingTitle">
|
|
|
套餐选择
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -132,7 +158,16 @@
|
|
|
:text="it.tao_can_ming_chen" :key="x" />
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
- <view v-if="form.taoCanXiangMuList && form.taoCanXiangMuList.length > 0">
|
|
|
+
|
|
|
+ <u-form-item label="套餐项目" prop="name" v-if="taoCanShow">
|
|
|
+ <div style="display: flex;justify-content: flex-end;"
|
|
|
+ @click="taoCanXiangMuShow = !taoCanXiangMuShow">
|
|
|
+ <u-icon name="arrow-up" v-if="taoCanXiangMuShow"></u-icon>
|
|
|
+ <u-icon name="arrow-down" v-else></u-icon>
|
|
|
+ </div>
|
|
|
+ </u-form-item>
|
|
|
+
|
|
|
+ <view v-if="taoCanXiangMuShow && form.taoCanXiangMuList && form.taoCanXiangMuList.length > 0">
|
|
|
<view style="padding: 0 20rpx;">
|
|
|
<view v-for="(it, x) in form.taoCanXiangMuList" :key="x" @click.stop="getSty(it)">
|
|
|
<view class="jiancexiangm">
|
|
|
@@ -156,29 +191,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<block v-if="form.showBoolean1">
|
|
|
- <u-form-item label="样品类型①">
|
|
|
+ <u-form-item label="样品类型①" required>
|
|
|
<u-input placeholder="请选择样品类型①" v-model="form.yangPinLeiXing"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('yangpinType1')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('yangpinType1','样品类型')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品运输条件①">
|
|
|
+ <u-form-item label="样品运输条件①" required>
|
|
|
<u-input placeholder="请选择样品运输条件①" v-model="form.yangBenYunShuTiao"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('transportType1')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('transportType1')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="数量①">
|
|
|
+ <u-form-item label="样品数量①" required>
|
|
|
<uni-number-box v-model="form.shuLiang" v-if="type != 'detail'"></uni-number-box>
|
|
|
<text v-else>{{form.shuLiang}}</text>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品规格①">
|
|
|
+ <u-form-item label="样品规格①" required>
|
|
|
<u-input placeholder="请输入样品规格①" v-model="form.yangPinGuiGe"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button slot="right" type="success" size="mini" @click="sheetClick('specification1')"
|
|
|
- v-if="type != 'detail'">规格
|
|
|
+ <u-button slot="right" type="success" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('specification1','样品规格')" v-if="type != 'detail'">规格
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
</block>
|
|
|
@@ -195,29 +230,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<block v-if="form.showBoolean2">
|
|
|
- <u-form-item label="样品类型②">
|
|
|
+ <u-form-item label="样品类型②" required>
|
|
|
<u-input placeholder="请选择样品类型②" v-model="form.yangPinLeiXingEr"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('yangpinType2')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('yangpinType2','样品类型')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品运输条件②">
|
|
|
+ <u-form-item label="样品运输条件②" required>
|
|
|
<u-input placeholder="请选择样品运输条件②" v-model="form.yangPinYunShuTiao"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('transportType2')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('transportType2')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="数量②">
|
|
|
+ <u-form-item label="样品数量②" required>
|
|
|
<uni-number-box v-model="form.shuLiangEr" v-if="type != 'detail'"></uni-number-box>
|
|
|
<text v-else>{{form.shuLiangEr}}</text>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品规格②">
|
|
|
+ <u-form-item label="样品规格②" required>
|
|
|
<u-input placeholder="请输入样品规格②" v-model="form.yangPinGuiGeEr"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button slot="right" type="success" size="mini" @click="sheetClick('specification2')"
|
|
|
- v-if="type != 'detail'">规格
|
|
|
+ <u-button slot="right" type="success" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('specification2','样品规格')" v-if="type != 'detail'">规格
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
</block>
|
|
|
@@ -235,29 +270,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<block v-if="form.showBoolean3">
|
|
|
- <u-form-item label="样品类型③">
|
|
|
+ <u-form-item label="样品类型③" required>
|
|
|
<u-input placeholder="请选择样品类型③" v-model="form.yangPinLeiXingSan"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('yangpinType3')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('yangpinType3','样品类型')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品运输条件③">
|
|
|
+ <u-form-item label="样品运输条件③" required>
|
|
|
<u-input placeholder="请选择样品运输条件③" v-model="form.yangPinYunShuSan"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('transportType3')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('transportType3')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="数量③">
|
|
|
+ <u-form-item label="样品数量③" required>
|
|
|
<uni-number-box v-model="form.shuLiangSan" v-if="type != 'detail'"></uni-number-box>
|
|
|
<text v-else>{{form.shuLiangSan}}</text>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品规格③">
|
|
|
+ <u-form-item label="样品规格③" required>
|
|
|
<u-input placeholder="请输入样品规格③" v-model="form.yangPinGuiGeSan"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button slot="right" type="success" size="mini" @click="sheetClick('specification3')"
|
|
|
- v-if="type != 'detail'">规格
|
|
|
+ <u-button slot="right" type="success" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('specification3','样品规格')" v-if="type != 'detail'">规格
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
</block>
|
|
|
@@ -275,29 +310,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<block v-if="form.showBoolean4">
|
|
|
- <u-form-item label="样品类型④">
|
|
|
+ <u-form-item label="样品类型④" required>
|
|
|
<u-input placeholder="请选择样品类型④" v-model="form.yangPinLeiXingSi"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('yangpinType4')"
|
|
|
- v-if="type != 'detail'">选择
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('yangpinType4','样品类型')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品运输条件④">
|
|
|
+ <u-form-item label="样品运输条件④" required>
|
|
|
<u-input placeholder="请选择样品运输条件④" v-model="form.yangPinYunShuSi"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button type="success" slot="right" size="mini" @click="sheetClick('transportType4')"
|
|
|
- v-if="type != 'detail'">ѡ��
|
|
|
+ <u-button type="success" slot="right" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('transportType4')" v-if="type != 'detail'">选择
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="数量④">
|
|
|
+ <u-form-item label="样品数量④" required>
|
|
|
<uni-number-box v-model="form.shuLiangSi" v-if="type != 'detail'"></uni-number-box>
|
|
|
<text v-else>{{form.shuLiangSi}}</text>
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="样品规格④">
|
|
|
+ <u-form-item label="样品规格④" required>
|
|
|
<u-input placeholder="请输入样品规格④" v-model="form.yangPinGuiGeSi"
|
|
|
:disabled="type == 'detail'?true :false" />
|
|
|
- <u-button slot="right" type="success" size="mini" @click="sheetClick('specification4')"
|
|
|
- v-if="type != 'detail'">规格
|
|
|
+ <u-button slot="right" type="success" class="btn-back-color" size="mini"
|
|
|
+ @click="sheetClick('specification4','样品规格')" v-if="type != 'detail'">规格
|
|
|
</u-button>
|
|
|
</u-form-item>
|
|
|
</block>
|
|
|
@@ -317,11 +352,11 @@
|
|
|
<view class="btnBottom" v-if="itemType">
|
|
|
<u-row>
|
|
|
<u-col span="6">
|
|
|
- <u-button type="error" class="btn" @click="deletSing">取消
|
|
|
+ <u-button type="success" class="btn green-back-color" @click="deletSing">取消
|
|
|
</u-button>
|
|
|
</u-col>
|
|
|
<u-col span="6">
|
|
|
- <u-button type="success" class="btn" @click="sumbitSing">保存
|
|
|
+ <u-button type="success" class="btn btn-back-color" @click="sumbitSing">保存
|
|
|
</u-button>
|
|
|
</u-col>
|
|
|
</u-row>
|
|
|
@@ -333,12 +368,19 @@
|
|
|
<u-select v-model="selectShow" :list="list" @confirm="selectConfirm"></u-select>
|
|
|
<u-calendar v-model="dateShow" :mode="mode" max-date="2050-01-01" @change="dateChange"></u-calendar>
|
|
|
|
|
|
+ <lin-popup ref="picker" :title="title" :list="list" @onConfirm="onConfirm"></lin-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import order from './test.json'
|
|
|
+ import linSelect from '@/components/lin-select/lin-select.vue'
|
|
|
+ import meth from './meth.js'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ linSelect
|
|
|
+ },
|
|
|
props: {
|
|
|
jianCeTypeList: {
|
|
|
type: Array,
|
|
|
@@ -371,17 +413,22 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ jianCeShow: true,
|
|
|
+ taoCanXiangMuShow: true,
|
|
|
+ checked: false,
|
|
|
errorType: ['toast'],
|
|
|
form: this.item,
|
|
|
//样本状态
|
|
|
sampleStateList: order.sampleState,
|
|
|
sexList: order.sex,
|
|
|
//样本类型
|
|
|
- sampleTypeList: order.sampleType,
|
|
|
+ sampleTypeList: [],
|
|
|
//样本运输条件
|
|
|
transportTypeList: order.transportType,
|
|
|
//样本规格
|
|
|
- specificationList: order.specification,
|
|
|
+ // specificationList: order.specification,
|
|
|
+ specificationList: [],
|
|
|
+ validList: order.validList,
|
|
|
list: [],
|
|
|
listType: '',
|
|
|
sheetShow: false,
|
|
|
@@ -409,11 +456,13 @@
|
|
|
message: '请输入送检时间',
|
|
|
trigger: 'blur',
|
|
|
}],
|
|
|
- }
|
|
|
+ },
|
|
|
+ title: ''
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // console.log(this.itemType)
|
|
|
+ this.getYpbzggb()
|
|
|
+ this.getYplxb()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -421,14 +470,61 @@
|
|
|
getInit(data) {
|
|
|
this.form = JSON.parse(JSON.stringify(data))
|
|
|
},
|
|
|
+ //样品类型
|
|
|
+ getYplxb() {
|
|
|
+ let sql =
|
|
|
+ `select lei_xing_ from t_yplxb 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) {
|
|
|
+ const datas = res.data.variables.data
|
|
|
+ if (datas.length > 0) {
|
|
|
+ datas.forEach(item => {
|
|
|
+ this.$set(item, 'name', item.lei_xing_)
|
|
|
+ })
|
|
|
+ this.sampleTypeList = datas
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //样品规格
|
|
|
+ getYpbzggb() {
|
|
|
+ let sql =
|
|
|
+ `select yang_pin_gui_ge_ from t_ypbzggb 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) {
|
|
|
+ const datas = res.data.variables.data
|
|
|
+ if (datas.length > 0) {
|
|
|
+ datas.forEach(item => {
|
|
|
+ this.$set(item, 'name', item.yang_pin_gui_ge_)
|
|
|
+ })
|
|
|
+ this.specificationList = datas
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//委托项目 点击事件
|
|
|
changeIndex(it, x) {
|
|
|
+ let taoCanXiangMuList = this.form.taoCanXiangMuList
|
|
|
+ if (taoCanXiangMuList.length > 0 && !it.checked) {
|
|
|
+ //判断是否与套餐项目相同
|
|
|
+ let showData = taoCanXiangMuList.findIndex(item => item.id_ == it.id_)
|
|
|
+ if (showData >= 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: it.xiang_mu_bian_hao + '项目与套餐项目相同',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
let itemData = this.form
|
|
|
this.form.jianCeList[x].checked = !this.form.jianCeList[x].checked
|
|
|
|
|
|
let show = itemData.jianCeList.some(item => (item.id_ == '1039826037036285952' || item.id_ ==
|
|
|
'1040205909151711232') && item.checked)
|
|
|
- console.log(show)
|
|
|
|
|
|
if (show) {
|
|
|
itemData.mingChengShow = true
|
|
|
@@ -494,13 +590,12 @@
|
|
|
}
|
|
|
},
|
|
|
//弹出框初始化
|
|
|
- sheetClick(type) {
|
|
|
+ sheetClick(type, title = '') {
|
|
|
this.listType = type
|
|
|
- this.sheetShow = true
|
|
|
+ this.title = title
|
|
|
if (type == 'state') {
|
|
|
this.list = this.sampleStateList
|
|
|
}
|
|
|
-
|
|
|
//1
|
|
|
if (type.includes('yangpinType')) {
|
|
|
this.list = this.sampleTypeList
|
|
|
@@ -514,6 +609,13 @@
|
|
|
if (type == 'disposition') {
|
|
|
this.list = this.dispositionList
|
|
|
}
|
|
|
+
|
|
|
+ if (type.includes('specification') || type.includes('yangpinType')) {
|
|
|
+ this.$refs['picker'].show();
|
|
|
+ } else {
|
|
|
+ this.sheetShow = true
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//弹出框初始化
|
|
|
selectConfirm(e) {
|
|
|
@@ -534,48 +636,24 @@
|
|
|
}
|
|
|
|
|
|
//1
|
|
|
- if (this.listType == 'yangpinType1') {
|
|
|
- lists.yangPinLeiXing = that.list[e].text
|
|
|
- }
|
|
|
if (this.listType == 'transportType1') {
|
|
|
lists.yangBenYunShuTiao = that.list[e].text
|
|
|
}
|
|
|
- if (this.listType == 'specification1') {
|
|
|
- lists.yangPinGuiGe = that.list[e].text
|
|
|
- }
|
|
|
|
|
|
//2
|
|
|
- if (this.listType == 'yangpinType2') {
|
|
|
- lists.yangPinLeiXingEr = that.list[e].text
|
|
|
- }
|
|
|
if (this.listType == 'transportType2') {
|
|
|
lists.yangPinYunShuTiao = that.list[e].text
|
|
|
}
|
|
|
- if (this.listType == 'specification2') {
|
|
|
- lists.yangPinGuiGeEr = that.list[e].text
|
|
|
- }
|
|
|
|
|
|
//3
|
|
|
- if (this.listType == 'yangpinType3') {
|
|
|
- lists.yangPinLeiXingSan = that.list[e].text
|
|
|
- }
|
|
|
if (this.listType == 'transportType3') {
|
|
|
lists.yangPinYunShuSan = that.list[e].text
|
|
|
}
|
|
|
- if (this.listType == 'specification3') {
|
|
|
- lists.yangPinGuiGeSan = that.list[e].text
|
|
|
- }
|
|
|
|
|
|
- //3
|
|
|
- if (this.listType == 'yangpinType4') {
|
|
|
- lists.yangPinLeiXingSi = that.list[e].text
|
|
|
- }
|
|
|
+ //4
|
|
|
if (this.listType == 'transportType4') {
|
|
|
lists.yangPinYunShuSi = that.list[e].text
|
|
|
}
|
|
|
- if (this.listType == 'specification4') {
|
|
|
- lists.yangPinGuiGeSi = that.list[e].text
|
|
|
- }
|
|
|
|
|
|
if (this.listType == 'disposition') {
|
|
|
this.form.yangBenChuLi = this.list[e].text
|
|
|
@@ -604,9 +682,27 @@
|
|
|
this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
|
|
|
if (res.data.state == 200) {
|
|
|
const datas = res.data.variables.data
|
|
|
+ let list = []
|
|
|
datas.forEach(item => {
|
|
|
this.form.taoCanXiangMuList.push(item)
|
|
|
+
|
|
|
+ //判断与常规项目是否相同
|
|
|
+ let ypglOne = this.form.jianCeList
|
|
|
+ ypglOne.forEach(it => {
|
|
|
+ if ((item.id_ == it.id_) && it.checked) {
|
|
|
+ list.push(it.xiang_mu_bian_hao)
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
+
|
|
|
+ if (list.length > 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: list.join(",") + '项目与已常规项目相同',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.getTotal()
|
|
|
}
|
|
|
})
|
|
|
@@ -621,6 +717,25 @@
|
|
|
if (this.form.yangPinZongJia == '') {
|
|
|
this.form.yangPinZongJia = 0
|
|
|
}
|
|
|
+ for (let item of this.validList) {
|
|
|
+ if (this.form[item.value] == '') {
|
|
|
+ this.$showToast.getShowToast(item.toast, item.num)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // let itemShow = this.form.jianCeList.every(item => !item.checked)
|
|
|
+ // if (itemShow && this.form.taoCanXiangMuList.length == 0) {
|
|
|
+ // return meth.getPrompt('请选择常规项目或者套餐项目')
|
|
|
+ // }
|
|
|
+
|
|
|
+ if (!meth.getJudge(this.form)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// let showIndex = this.form.lhypb.findIndex(item => item.jianCeXiangMu == '')
|
|
|
// if (showIndex >= 0) {
|
|
|
// uni.showToast({
|
|
|
@@ -648,10 +763,50 @@
|
|
|
this.$emit('getParentContent', item)
|
|
|
},
|
|
|
checkBoxChange(e) {
|
|
|
- // console.log(e)
|
|
|
- let dataList = e.detail.value
|
|
|
- this.form.jianCeTypeString = dataList.join(",")
|
|
|
- // console.log(this.form.jianCeTypeString)
|
|
|
+ this.form.jianCeTypeString = e
|
|
|
+ },
|
|
|
+ checkedChange() {
|
|
|
+ this.checked = !this.checked
|
|
|
+ if (this.form.jianCeList && this.form.jianCeList.length > 0) {
|
|
|
+ this.form.jianCeList.forEach(item => {
|
|
|
+ if (this.form.jianCeTypeString.indexOf(item.jian_ce_lei_bie_) !== -1) {
|
|
|
+ item.checked = this.checked
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ onConfirm(e) {
|
|
|
+ let that = this
|
|
|
+ let lists = that.form
|
|
|
+
|
|
|
+ //样品类型
|
|
|
+ if (this.listType == 'yangpinType1') {
|
|
|
+ lists.yangPinLeiXing = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'yangpinType2') {
|
|
|
+ lists.yangPinLeiXingEr = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'yangpinType3') {
|
|
|
+ lists.yangPinLeiXingSan = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'yangpinType4') {
|
|
|
+ lists.yangPinLeiXingSi = that.list[e].name
|
|
|
+ }
|
|
|
+
|
|
|
+ //样品规格
|
|
|
+ if (this.listType == 'specification1') {
|
|
|
+ lists.yangPinGuiGe = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'specification2') {
|
|
|
+ lists.yangPinGuiGeEr = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'specification3') {
|
|
|
+ lists.yangPinGuiGeSan = that.list[e].name
|
|
|
+ }
|
|
|
+ if (this.listType == 'specification4') {
|
|
|
+ lists.yangPinGuiGeSi = that.list[e].name
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onReady() {
|